mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-07-07 12:11:34 +00:00
Strip environment markers from detected uv dependency pins (#938)
## Summary - strip PEP 508 environment markers before extracting uv versions from dependency entries - cover dependency-group pins with and without whitespace before the marker - cover requirements-style pins with markers Fixes #920 ## Validation - npm ci --ignore-scripts - npm run all Refs: pi-session 019f316a-4108-7975-892f-ee5bf8abc7c3
This commit is contained in:
committed by
GitHub
parent
17c398959b
commit
d31148d669
6
dist/setup/index.cjs
generated
vendored
6
dist/setup/index.cjs
generated
vendored
@@ -97414,7 +97414,11 @@ function parsePyprojectContent(pyprojectContent) {
|
||||
return parse4(pyprojectContent);
|
||||
}
|
||||
function getUvVersionFromAllDependencies(allDependencies) {
|
||||
return allDependencies.find((dep) => dep.match(/^uv[=<>~!]/))?.match(/^uv([=<>~!]+\S*)/)?.[1].trim();
|
||||
return allDependencies.map(getUvVersionFromDependency).find((version3) => version3 !== void 0);
|
||||
}
|
||||
function getUvVersionFromDependency(dependency) {
|
||||
const dependencyWithoutMarker = dependency.split(";", 1)[0]?.trim();
|
||||
return dependencyWithoutMarker?.match(/^uv([=<>~!]+\S*)/)?.[1].trim();
|
||||
}
|
||||
|
||||
// src/version/tool-versions-file.ts
|
||||
|
||||
Reference in New Issue
Block a user