Ignore deps starting with uv when finding uv version (#492)

Fixes: #489
This commit is contained in:
Kevin Stillhammer 2025-07-18 08:10:43 +02:00 committed by GitHub
parent 05273c154d
commit 7edac99f96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 4 deletions

View file

@ -15,8 +15,8 @@ function getUvVersionFromAllDependencies(
allDependencies: string[],
): string | undefined {
return allDependencies
.find((dep: string) => dep.startsWith("uv"))
?.match(/^uv([^A-Z0-9._-]+.*)$/)?.[1]
.find((dep: string) => dep.match(/^uv[=<>~!]/))
?.match(/^uv([=<>~!]+.*)$/)?.[1]
.trim();
}