Compare commits

...

4 Commits

Author SHA1 Message Date
eifinger 9d6f9ef13b chore: update known checksums for 0.11.23 2026-06-20 05:32:31 +00:00
github-actions[bot] a9b33f0240 chore: update known checksums for 0.11.22 (#921)
test / test-musl (push) Failing after 31s
Release Drafter / ✏️ Draft release (push) Waiting to run
test / test-default-version (macos-14) (push) Waiting to run
test / test-default-version (macos-latest) (push) Waiting to run
test / test-default-version (windows-latest) (push) Waiting to run
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Waiting to run
test / test-python-install-dir (map[expected-python-dir:D:\a\_temp\uv-python-dir os:windows-latest]) (push) Waiting to run
test / all-tests-passed (push) Blocked by required conditions
test / test-checksum (map[checksum:a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218 os:macos-latest]) (push) Waiting to run
test / test-tool-install (macos-14) (push) Waiting to run
test / test-tool-install (macos-latest) (push) Waiting to run
test / test-tool-install (windows-latest) (push) Waiting to run
test / test-python-version (macos-latest) (push) Waiting to run
test / test-python-version (windows-latest) (push) Waiting to run
test / test-activate-environment (macos-latest) (push) Waiting to run
test / test-activate-environment (windows-latest) (push) Waiting to run
test / test-activate-environment-custom-path (macos-latest) (push) Waiting to run
test / test-activate-environment-custom-path (windows-latest) (push) Waiting to run
test / test-cache-key-os-version (macos-14, macos-14) (push) Waiting to run
test / test-cache-key-os-version (macos-15, macos-15) (push) Waiting to run
test / test-cache-key-os-version (ubuntu-24.04, ubuntu-24.04) (push) Waiting to run
test / test-cache-key-os-version (windows-2022, windows-2022) (push) Waiting to run
test / test-cache-key-os-version (windows-2025, windows-2025) (push) Waiting to run
test / test-setup-cache (auto, windows-latest) (push) Waiting to run
test / test-setup-cache (false, windows-latest) (push) Waiting to run
test / test-setup-cache (true, windows-latest) (push) Waiting to run
test / test-restore-cache (auto, ubuntu-latest) (push) Blocked by required conditions
test / test-restore-cache (auto, windows-latest) (push) Blocked by required conditions
test / test-restore-cache (false, ubuntu-latest) (push) Blocked by required conditions
test / test-restore-cache (false, windows-latest) (push) Blocked by required conditions
test / test-restore-cache (true, ubuntu-latest) (push) Blocked by required conditions
test / test-restore-cache (true, windows-latest) (push) Blocked by required conditions
test / test-specific-version (map[expected-version:0.3.2 version-input:0.3.2]) (push) Failing after 49s
test / test-latest-version (latest) (push) Failing after 48s
test / test-default-version (ubuntu-latest) (push) Failing after 50s
test / test-specific-version (map[expected-version:0.3.5 version-input:0.3]) (push) Failing after 53s
test / test-specific-version (map[expected-version:0.3.0 version-input:0.3.0]) (push) Failing after 58s
test / test-specific-version (map[expected-version:0.4.25 resolution-strategy:lowest version-input:>=0.4.25,<0.5]) (push) Failing after 1m3s
test / test-specific-version (map[expected-version:0.3.5 version-input:0.3.x]) (push) Failing after 1m3s
test / test-specific-version (map[expected-version:0.4.25 resolution-strategy:lowest version-input:>=0.4.25]) (push) Failing after 1m3s
test / test-specific-version (map[expected-version:0.1.0 resolution-strategy:lowest version-input:>=0.1.0,<0.2]) (push) Failing after 1m4s
test / test-specific-version (map[expected-version:0.1.45 resolution-strategy:highest version-input:>=0.1,<0.2]) (push) Failing after 1m5s
test / test-specific-version (map[expected-version:0.4.30 version-input:>=0.4.25,<0.5]) (push) Failing after 1m6s
test / test-from-working-directory-version (map[expected-version:0.5.14 working-directory:__tests__/fixtures/pyproject-toml-project]) (push) Failing after 1m6s
test / test-uv-no-modify-path (push) Failing after 1m8s
test / test-latest-version (>=0.8) (push) Failing after 1m9s
test / test-from-working-directory-version (map[expected-version:0.5.15 working-directory:__tests__/fixtures/uv-toml-project]) (push) Failing after 34s
test / test-version-file-version (map[expected-version:0.5.15 version-file:__tests__/fixtures/.tool-versions]) (push) Failing after 49s
test / test-version-file-version (map[expected-version:0.6.17 version-file:__tests__/fixtures/uv-in-requirements-txt-project/requirements.txt]) (push) Failing after 47s
test / test-version-file-version (map[expected-version:0.8.3 version-file:__tests__/fixtures/uv-in-requirements-hash-txt-project/requirements.txt]) (push) Failing after 44s
test / test-malformed-pyproject-file-fallback (push) Failing after 49s
test / test-checksum (map[checksum:4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd os:ubuntu-latest]) (push) Failing after 45s
test / test-tool-install (ubuntu-latest) (push) Failing after 44s
test / test-uvx (push) Failing after 45s
test / test-with-explicit-token (push) Failing after 48s
test / test-activate-environment (ubuntu-latest) (push) Failing after 47s
test / test-python-version (ubuntu-latest) (push) Failing after 50s
test / test-debian-unstable (push) Failing after 46s
test / test-activate-environment-custom-path (ubuntu-latest) (push) Failing after 49s
test / test-activate-environment-no-project (push) Failing after 48s
test / test-setup-cache (false, ubuntu-latest) (push) Failing after 27s
test / test-setup-cache (auto, ubuntu-latest) (push) Failing after 32s
CodeQL / Analyze (TypeScript) (push) Failing after 2m15s
test / test-setup-cache-requirements-txt (push) Failing after 37s
test / test-setup-cache (true, ubuntu-latest) (push) Failing after 39s
test / test-restore-cache-requirements-txt (push) Has been skipped
test / test-setup-cache-dependency-glob (push) Failing after 42s
test / test-restore-cache-dependency-glob (push) Has been skipped
test / test-setup-cache-save-cache-false (push) Failing after 44s
test / test-restore-cache-save-cache-false (push) Has been skipped
test / test-cache-local (map[expected-cache-dir:/home/runner/work/_temp/setup-uv-cache os:ubuntu-latest]) (push) Failing after 43s
test / test-setup-cache-restore-cache-false (push) Failing after 45s
test / test-restore-cache-restore-cache-false (push) Has been skipped
test / test-cache-local-cache-disabled (push) Failing after 44s
test / test-cache-local-cache-disabled-but-explicit-path (push) Failing after 44s
test / test-cache-key-os-version (ubuntu-22.04, ubuntu-22.04) (push) Failing after 1m2s
test / test-custom-manifest-file (push) Failing after 48s
test / test-download-from-astral-mirror-false (push) Failing after 49s
test / test-no-python-version (push) Failing after 50s
test / test-absolute-path (push) Failing after 43s
test / test-cache-prune-force (push) Failing after 36s
test / test-cache-python-missing-managed-install-dir (push) Failing after 27s
test / test-cache-dir-from-file (push) Failing after 32s
test / test-relative-path (push) Failing after 47s
test / test-cache-python-installs (push) Failing after 28s
test / test-python-install-dir (map[expected-python-dir:/home/runner/work/_temp/uv-python-dir os:ubuntu-latest]) (push) Failing after 25s
test / test-act (push) Failing after 23s
test / test-restore-python-installs (push) Has been skipped
test / validate-typings (push) Successful in 36s
test / lint (push) Failing after 4m13s
chore: update known checksums for 0.11.22

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-06-19 08:02:13 +02:00
somaz 3faa3174e6 feat: support uv.lock as a version-file source (#918)
Adds `uv.lock` as a supported `version-file` source. When `uv` is locked
as a
dependency in `uv.lock`, the action now installs the exact pinned
version,
closing the gap reported in #682.

This is useful for deterministic CI: the same uv version is used until
the
lockfile is updated, which avoids "CI worked yesterday, fails today"
drift and
reduces supply-chain exposure from auto-installing the latest release.

The implementation mirrors the existing `version-file` parsers — a new
`uv.lock`
entry in the parser registry reads the `[[package]]` whose `name = "uv"`
and
returns its locked `version`. Scoped to explicit `version-file:
uv.lock`;
workspace auto-detection is left as a possible follow-up to avoid
precedence
ambiguity with `uv.toml` / `pyproject.toml`.

Validation (local, Node 23; dist build is esbuild-deterministic):
- `npm run all` → build clean, biome clean, package clean, jest 77/77
- New tests: 3 unit (`uv-lock-file.test.ts`) + 1 integration — exact pin
resolves
  through the full pipeline (`uv.lock` → `0.8.17`)
- dist rebuilt + committed (single bundle, no spurious churn)

related: #682
2026-06-19 07:08:57 +02:00
github-actions[bot] ca5ddd015e chore: update known checksums for 0.11.21 (#917)
test / test-specific-version (map[expected-version:0.1.0 resolution-strategy:lowest version-input:>=0.1.0,<0.2]) (push) Failing after 33s
test / test-specific-version (map[expected-version:0.3.0 version-input:0.3.0]) (push) Failing after 36s
test / test-specific-version (map[expected-version:0.1.45 resolution-strategy:highest version-input:>=0.1,<0.2]) (push) Failing after 37s
test / test-default-version (ubuntu-latest) (push) Failing after 41s
test / test-uv-no-modify-path (push) Failing after 44s
test / test-specific-version (map[expected-version:0.3.2 version-input:0.3.2]) (push) Failing after 44s
test / test-specific-version (map[expected-version:0.3.5 version-input:0.3.x]) (push) Failing after 45s
test / test-specific-version (map[expected-version:0.4.25 resolution-strategy:lowest version-input:>=0.4.25]) (push) Failing after 45s
test / test-specific-version (map[expected-version:0.3.5 version-input:0.3]) (push) Failing after 45s
test / test-latest-version (latest) (push) Failing after 45s
test / test-specific-version (map[expected-version:0.4.25 resolution-strategy:lowest version-input:>=0.4.25,<0.5]) (push) Failing after 49s
test / test-from-working-directory-version (map[expected-version:0.5.14 working-directory:__tests__/fixtures/pyproject-toml-project]) (push) Failing after 48s
test / test-latest-version (>=0.8) (push) Failing after 50s
test / test-specific-version (map[expected-version:0.4.30 version-input:>=0.4.25,<0.5]) (push) Failing after 52s
test / test-from-working-directory-version (map[expected-version:0.5.15 working-directory:__tests__/fixtures/uv-toml-project]) (push) Failing after 24s
test / test-version-file-version (map[expected-version:0.5.15 version-file:__tests__/fixtures/.tool-versions]) (push) Failing after 24s
test / test-version-file-version (map[expected-version:0.6.17 version-file:__tests__/fixtures/uv-in-requirements-txt-project/requirements.txt]) (push) Failing after 26s
test / test-version-file-version (map[expected-version:0.8.3 version-file:__tests__/fixtures/uv-in-requirements-hash-txt-project/requirements.txt]) (push) Failing after 26s
test / test-malformed-pyproject-file-fallback (push) Failing after 31s
test / test-checksum (map[checksum:4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd os:ubuntu-latest]) (push) Failing after 36s
test / test-tool-install (ubuntu-latest) (push) Failing after 43s
test / test-python-version (ubuntu-latest) (push) Failing after 44s
test / test-with-explicit-token (push) Failing after 47s
test / test-activate-environment (ubuntu-latest) (push) Failing after 42s
test / test-uvx (push) Failing after 48s
test / test-activate-environment-custom-path (ubuntu-latest) (push) Failing after 46s
test / test-musl (push) Failing after 41s
test / test-setup-cache (auto, ubuntu-latest) (push) Failing after 38s
test / test-activate-environment-no-project (push) Failing after 51s
test / test-setup-cache (false, ubuntu-latest) (push) Failing after 35s
CodeQL / Analyze (TypeScript) (push) Failing after 1m48s
test / test-setup-cache (true, ubuntu-latest) (push) Failing after 30s
test / test-setup-cache-requirements-txt (push) Failing after 26s
test / test-restore-cache-requirements-txt (push) Has been skipped
test / test-setup-cache-dependency-glob (push) Failing after 26s
test / test-restore-cache-dependency-glob (push) Has been skipped
test / test-setup-cache-save-cache-false (push) Failing after 29s
test / test-restore-cache-save-cache-false (push) Has been skipped
test / test-setup-cache-restore-cache-false (push) Failing after 32s
test / test-restore-cache-restore-cache-false (push) Has been skipped
test / test-cache-local (map[expected-cache-dir:/home/runner/work/_temp/setup-uv-cache os:ubuntu-latest]) (push) Failing after 47s
test / test-cache-local-cache-disabled (push) Failing after 47s
test / test-cache-local-cache-disabled-but-explicit-path (push) Failing after 46s
test / test-custom-manifest-file (push) Failing after 49s
test / test-download-from-astral-mirror-false (push) Failing after 48s
test / test-no-python-version (push) Failing after 52s
test / test-debian-unstable (push) Failing after 1m39s
test / test-cache-prune-force (push) Failing after 49s
test / test-cache-key-os-version (ubuntu-22.04, ubuntu-22.04) (push) Failing after 1m36s
test / test-absolute-path (push) Failing after 55s
test / test-cache-python-missing-managed-install-dir (push) Failing after 44s
test / test-relative-path (push) Failing after 57s
test / test-cache-dir-from-file (push) Failing after 54s
test / test-python-install-dir (map[expected-python-dir:/home/runner/work/_temp/uv-python-dir os:ubuntu-latest]) (push) Failing after 37s
test / test-cache-python-installs (push) Failing after 43s
test / test-restore-python-installs (push) Has been skipped
test / test-act (push) Failing after 25s
test / validate-typings (push) Successful in 55s
test / lint (push) Failing after 6m40s
test / test-tool-install (windows-latest) (push) Has been cancelled
Release Drafter / ✏️ Draft release (push) Has been cancelled
test / test-default-version (macos-14) (push) Has been cancelled
test / test-default-version (macos-latest) (push) Has been cancelled
test / test-default-version (windows-latest) (push) Has been cancelled
test / test-tool-install (macos-14) (push) Has been cancelled
test / test-tool-install (macos-latest) (push) Has been cancelled
test / test-checksum (map[checksum:a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218 os:macos-latest]) (push) Has been cancelled
test / test-python-version (macos-latest) (push) Has been cancelled
test / test-python-version (windows-latest) (push) Has been cancelled
test / test-activate-environment (macos-latest) (push) Has been cancelled
test / test-activate-environment (windows-latest) (push) Has been cancelled
test / test-activate-environment-custom-path (macos-latest) (push) Has been cancelled
test / test-activate-environment-custom-path (windows-latest) (push) Has been cancelled
test / test-cache-key-os-version (macos-14, macos-14) (push) Has been cancelled
test / test-cache-key-os-version (macos-15, macos-15) (push) Has been cancelled
test / test-cache-key-os-version (ubuntu-24.04, ubuntu-24.04) (push) Has been cancelled
test / test-cache-key-os-version (windows-2022, windows-2022) (push) Has been cancelled
test / test-cache-key-os-version (windows-2025, windows-2025) (push) Has been cancelled
test / test-setup-cache (auto, windows-latest) (push) Has been cancelled
test / test-setup-cache (false, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, windows-latest) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Has been cancelled
test / test-python-install-dir (map[expected-python-dir:D:\a\_temp\uv-python-dir os:windows-latest]) (push) Has been cancelled
test / test-restore-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (auto, windows-latest) (push) Has been cancelled
test / test-restore-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (true, windows-latest) (push) Has been cancelled
test / all-tests-passed (push) Has been cancelled
chore: update known checksums for 0.11.21

Co-authored-by: eifinger <eifinger@users.noreply.github.com>
2026-06-12 07:54:16 +02:00
11 changed files with 340 additions and 11 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ Have a look under [Advanced Configuration](#advanced-configuration) for detailed
# The version of uv to install (default: searches for version in config files, then latest)
version: ""
# Path to a file containing the version of uv to install (default: searches uv.toml then pyproject.toml)
# Path to a file containing the version of uv to install, e.g., uv.toml, pyproject.toml, .tool-versions, requirements.txt or uv.lock (default: searches uv.toml then pyproject.toml)
version-file: ""
# Resolution strategy when resolving version ranges: 'highest' or 'lowest'
+36
View File
@@ -0,0 +1,36 @@
import { describe, expect, it } from "@jest/globals";
import { getUvVersionFromUvLockContent } from "../../src/version/uv-lock-file";
const UV_LOCK = `version = 1
requires-python = ">=3.12"
[[package]]
name = "anyio"
version = "4.6.0"
source = { registry = "https://pypi.org/simple" }
[[package]]
name = "uv"
version = "0.8.17"
source = { registry = "https://pypi.org/simple" }
`;
describe("getUvVersionFromUvLockContent", () => {
it("returns the exact uv version locked in uv.lock", () => {
expect(getUvVersionFromUvLockContent(UV_LOCK)).toBe("0.8.17");
});
it("returns undefined when uv is not a locked package", () => {
const content = `version = 1
[[package]]
name = "anyio"
version = "4.6.0"
`;
expect(getUvVersionFromUvLockContent(content)).toBeUndefined();
});
it("returns undefined when there are no packages", () => {
expect(getUvVersionFromUvLockContent("version = 1\n")).toBeUndefined();
});
});
@@ -63,6 +63,24 @@ describe("resolveVersionRequest", () => {
});
});
it("uses the exact uv version locked in uv.lock when it is passed via version-file", () => {
const workingDirectory = createTempProject({
"uv.lock": `version = 1\n\n[[package]]\nname = "uv"\nversion = "0.8.17"\nsource = { registry = "https://pypi.org/simple" }\n`,
});
const request = resolveVersionRequest({
versionFile: path.join(workingDirectory, "uv.lock"),
workingDirectory,
});
expect(request).toEqual({
format: "uv.lock",
source: "version-file",
sourcePath: path.join(workingDirectory, "uv.lock"),
specifier: "0.8.17",
});
});
it("uses requirements.txt when it is passed via version-file", () => {
const workingDirectory = createTempProject({
"requirements.txt": "uv==0.6.17\nuvicorn==0.35.0\n",
+1 -1
View File
@@ -7,7 +7,7 @@ inputs:
description: "The version of uv to install e.g., `0.5.0` Defaults to the version in pyproject.toml or 'latest'."
default: ""
version-file:
description: "Path to a file containing the version of uv to install. Defaults to searching for uv.toml and if not found pyproject.toml."
description: "Path to a file containing the version of uv to install, e.g., uv.toml, pyproject.toml, .tool-versions, requirements.txt or uv.lock. Defaults to searching for uv.toml and if not found pyproject.toml."
default: ""
python-version:
description: "The version of Python to set UV_PYTHON to"
Generated Vendored
+80 -9
View File
@@ -56204,7 +56204,7 @@ var require_semver5 = __commonJS({
});
// src/setup-uv.ts
var import_node_fs7 = __toESM(require("node:fs"), 1);
var import_node_fs8 = __toESM(require("node:fs"), 1);
var path16 = __toESM(require("node:path"), 1);
// node_modules/@actions/core/lib/command.js
@@ -91289,7 +91289,7 @@ function handleMatchResult(matchedKey, primaryKey, stateKey, outputKey) {
}
// src/download/download-version.ts
var import_node_fs6 = require("node:fs");
var import_node_fs7 = require("node:fs");
var path14 = __toESM(require("node:path"), 1);
// node_modules/@actions/tool-cache/lib/tool-cache.js
@@ -91741,6 +91741,60 @@ var fs10 = __toESM(require("node:fs"), 1);
// src/download/checksum/known-checksums.ts
var KNOWN_CHECKSUMS = {
"aarch64-apple-darwin-0.11.23": "71ef9de85db820749b3b12b7585624ee279e9c5afcbc6f8236bc3d628c4305b0",
"aarch64-pc-windows-msvc-0.11.23": "c24ef88c44c5e6be3daa7357c0cd8419a88de74c5d01f4ff403e06b765249788",
"aarch64-unknown-linux-gnu-0.11.23": "1873a77350f6621279ae1a0d2227f2bd8b67131598f14a7eb0ba2215d3da2c98",
"aarch64-unknown-linux-musl-0.11.23": "80efb615b78c1e5721e5858135cd3499609b26741220332c843bd58936053bc6",
"arm-unknown-linux-musleabihf-0.11.23": "2467703669be1cf02f31f4347a11c9b10a763e794424eb1073b9fc2565ba45fc",
"armv7-unknown-linux-gnueabihf-0.11.23": "d10df2ebaa729a51d15395720c3f5e76497ae6414beb82043bb2e53f9a86314a",
"armv7-unknown-linux-musleabihf-0.11.23": "417e901f5873a62af344e25e08fb96d75be3a02628e59da4529b73c3693bd31b",
"i686-pc-windows-msvc-0.11.23": "6756a552713bd1b9bd1e8d15402db21600c4fbdeae94c70721e0387b6bbad410",
"i686-unknown-linux-gnu-0.11.23": "87c661f2ccb116dd306b69423fa51f9d7d921ba9bcb1eb8e000853dfbc4b069d",
"i686-unknown-linux-musl-0.11.23": "dac33b2ca44fc162f074bb3b08ef9018e70df930ea82e4c7906e48704b0cfd12",
"powerpc64le-unknown-linux-gnu-0.11.23": "1c87278219389da56f49670ac3f9ae72cda4c38c6a1305290961586ce1b98c3b",
"riscv64gc-unknown-linux-gnu-0.11.23": "38c3b11a79dd6729ff2f35d1882a40c8919e47f385ed51703bed8e1c1ab9afea",
"riscv64gc-unknown-linux-musl-0.11.23": "2bf05826fe1b29adc8031132581400e1ccca0c0051fcbbfe93bddefb80f8dbeb",
"s390x-unknown-linux-gnu-0.11.23": "1a13fd6ab96af55456e6f4ca3f173475e0edf9c9f887bf6e0bc545bc2d931fad",
"x86_64-apple-darwin-0.11.23": "7a88155033cc469bba5bd5a24212e355eb92e3e2a276320b669ec576296c1e25",
"x86_64-pc-windows-msvc-0.11.23": "02ad29f07e674d68726ba3bb1ff25b335d83515756e2b1a194bb56c3cc30e07c",
"x86_64-unknown-linux-gnu-0.11.23": "e12c4cda2fe8c305510a78380a88f2c32a27e90cdcd123cefd2873388f0ebb5f",
"x86_64-unknown-linux-musl-0.11.23": "6be47081100ff1ce0ac7e85ba2ac12e32f2ffa6f946d78bf7f24ee9ce3a46181",
"aarch64-apple-darwin-0.11.22": "97a45e2ff8d5ea262623eed57ec2d9c468a42d74496d5c3c3eef11340235bd7f",
"aarch64-pc-windows-msvc-0.11.22": "30fa01e0fc7c78bdaf6f369ebac401f22f0f865d650f0732a26f1df3e2c6971e",
"aarch64-unknown-linux-gnu-0.11.22": "54b22e9f5570f3643cdf85a33bbc8e9feb3fc6e836a7c660c05378434ef44fe2",
"aarch64-unknown-linux-musl-0.11.22": "bc28063fe57e76a2d632d804cae9c602f8aded1d99f41025d7fefeb66b10befd",
"arm-unknown-linux-musleabihf-0.11.22": "950284c836a2f2aff79d64e703b68ea6bc6ee3a5c5f49399a7889cdd5069d78a",
"armv7-unknown-linux-gnueabihf-0.11.22": "7ff74f488d401f66a0314f65b6970edb011885e09f154e31a307e6d620daad0d",
"armv7-unknown-linux-musleabihf-0.11.22": "10d3f2a47d8c8c99d6aaafb1ec9c98aaf0b2a8ece43af01141693596b8a5cf35",
"i686-pc-windows-msvc-0.11.22": "08388dc9258b211236136327c775f74c127a2321c4f66d7dfcd4ae5cc76748fd",
"i686-unknown-linux-gnu-0.11.22": "522c0d3e0799914cb821661b947d73cd0ee44f6f8ecdadd60bdf11bbf0efef5a",
"i686-unknown-linux-musl-0.11.22": "47e78c168133cb3dd860090de5e832292e9f6d4e3110edd5028f90500a9d791d",
"powerpc64le-unknown-linux-gnu-0.11.22": "519602d26c50891254e19eb269c35da44a330e0499107bceb7926b7b061ed455",
"riscv64gc-unknown-linux-gnu-0.11.22": "291a5506ff058ba68357298752b83b5b230212b0a15845b568029d00cc1d4e8b",
"riscv64gc-unknown-linux-musl-0.11.22": "dd03fa6c9e6ba49195ba78c401bd838496d77d25c17594b7ff0e8e151c13edb9",
"s390x-unknown-linux-gnu-0.11.22": "d5149a1bdd21dc8a86ad91d8657a4cd4eb0761a433ef0ce76117720e41ec950e",
"x86_64-apple-darwin-0.11.22": "9490033dc405b4afc8fa5f9ecd5cc1793e80c727a8c42c32ad456778720d39f2",
"x86_64-pc-windows-msvc-0.11.22": "b56939bac92d29996d351647f7c6f15b31cc69cf952d06d136de3e1e62eb64d1",
"x86_64-unknown-linux-gnu-0.11.22": "30075b14624a62021198319f22e08f1651a97d4026a8c84dab6abcbfaba0d81c",
"x86_64-unknown-linux-musl-0.11.22": "b80bd6952ee11b920b5ab2a35dbccddc364f579e5f2e028d115848cdaa72963e",
"aarch64-apple-darwin-0.11.21": "1f921d491ba5ffeea774eb04d6681ecee379101341cbb1500394993b541bf3f4",
"aarch64-pc-windows-msvc-0.11.21": "74e443f8004022dde57a1bd0d10c097830f9ea8feb4ec927db52cd5d805c2f48",
"aarch64-unknown-linux-gnu-0.11.21": "88e800834007cc5efd4675f166eb2a51e7e3ad19876d85fa8805a6fb5c922397",
"aarch64-unknown-linux-musl-0.11.21": "e71badaed2a2c3a404a0a00974b51c7ed5f5bc7be947916846005b739c68a5a2",
"arm-unknown-linux-musleabihf-0.11.21": "7cd6637deebacfa0224e53afb4dd7da4f464ba0ecc128f6f543897c157e39a0f",
"armv7-unknown-linux-gnueabihf-0.11.21": "929440f991ccd8097e01be1ec831f673ac7bbf508e94819b4270f2873f69e658",
"armv7-unknown-linux-musleabihf-0.11.21": "20f4b653a17adb09cdfa7f911d46a1f254b918a2b49bef1266c735ab4c6fced0",
"i686-pc-windows-msvc-0.11.21": "77d7979222c6bd621bdb862c9cb138be41dce1e3cea239b1e87eb82dfac2dbd5",
"i686-unknown-linux-gnu-0.11.21": "07125219898b1c8e71bc612d91b190927c6b192a7bce5dd029b1c9070e9b7049",
"i686-unknown-linux-musl-0.11.21": "865eff26cef62b7862854e176d57d9e0164daeec595723132a81aa3611238798",
"powerpc64le-unknown-linux-gnu-0.11.21": "0e97021d831f9670c8261f9270ecf94b83f1a90ff5312389e37a77676deaec87",
"riscv64gc-unknown-linux-gnu-0.11.21": "63013d7afe8fd552b273a7a5ca1f1425c0c82b12d73454d24237876bc26006e9",
"riscv64gc-unknown-linux-musl-0.11.21": "b869fe80435715b2b414443af28de96ed5d7f8c6759e12ba141abca221ebc0cd",
"s390x-unknown-linux-gnu-0.11.21": "743694a86a05eaf15d292c3d757388c4b2a11b4a7eb67f000077b4d6c467347e",
"x86_64-apple-darwin-0.11.21": "f3c8e5708a84b920c18b691214d54d2b0da6b984789caae95d47c95120cb7765",
"x86_64-pc-windows-msvc-0.11.21": "ace861f360c6de2babedc1607d0f454b6b09a820dbc8182dc15af927e4df9589",
"x86_64-unknown-linux-gnu-0.11.21": "8c88519b0ef0af9801fcdee419bbb12116bd9e6b18e162ae093c932d8b264050",
"x86_64-unknown-linux-musl-0.11.21": "9dadff5b9e7b1d2d011e41852a1cbca713d9d5d88194f2eb6bd240fa4fb0a719",
"aarch64-apple-darwin-0.11.20": "0a2b6a757d5693671a7ce0002554ae869604e1e69acb10313ac14d08374be01a",
"aarch64-pc-windows-msvc-0.11.20": "5248e1a5f980a77f153c4c452511ec6376abb8772b0979c450775f3a268fc61e",
"aarch64-unknown-linux-gnu-0.11.20": "c8b5b7f9c804b640da0bb66cddddf0a00ce971f64d8076622d70bd141bc80857",
@@ -96812,7 +96866,7 @@ function parseVersionSpecifier(specifier) {
var path13 = __toESM(require("node:path"), 1);
// src/version/file-parser.ts
var import_node_fs5 = __toESM(require("node:fs"), 1);
var import_node_fs6 = __toESM(require("node:fs"), 1);
// src/utils/config-file.ts
var import_node_fs3 = __toESM(require("node:fs"), 1);
@@ -97577,6 +97631,18 @@ function getUvVersionFromToolVersions(filePath) {
return void 0;
}
// src/version/uv-lock-file.ts
var import_node_fs5 = __toESM(require("node:fs"), 1);
function getUvVersionFromUvLock(filePath) {
const fileContent = import_node_fs5.default.readFileSync(filePath, "utf-8");
return getUvVersionFromUvLockContent(fileContent);
}
function getUvVersionFromUvLockContent(fileContent) {
const parsed = parse2(fileContent);
const uvPackage = parsed.package?.find((pkg) => pkg.name === "uv");
return uvPackage?.version;
}
// src/version/file-parser.ts
var VERSION_FILE_PARSERS = [
{
@@ -97587,7 +97653,7 @@ var VERSION_FILE_PARSERS = [
{
format: "uv.toml",
parse: (filePath) => {
const fileContent = import_node_fs5.default.readFileSync(filePath, "utf-8");
const fileContent = import_node_fs6.default.readFileSync(filePath, "utf-8");
return getConfigValueFromTomlContent(
filePath,
fileContent,
@@ -97599,7 +97665,7 @@ var VERSION_FILE_PARSERS = [
{
format: "pyproject.toml",
parse: (filePath) => {
const fileContent = import_node_fs5.default.readFileSync(filePath, "utf-8");
const fileContent = import_node_fs6.default.readFileSync(filePath, "utf-8");
const pyproject = parsePyprojectContent(fileContent);
const requiredVersion = pyproject.tool?.uv?.["required-version"];
if (requiredVersion !== void 0) {
@@ -97609,10 +97675,15 @@ var VERSION_FILE_PARSERS = [
},
supports: (filePath) => filePath.endsWith("pyproject.toml")
},
{
format: "uv.lock",
parse: (filePath) => getUvVersionFromUvLock(filePath),
supports: (filePath) => filePath.endsWith("uv.lock")
},
{
format: "requirements",
parse: (filePath) => {
const fileContent = import_node_fs5.default.readFileSync(filePath, "utf-8");
const fileContent = import_node_fs6.default.readFileSync(filePath, "utf-8");
return getUvVersionFromRequirementsText(fileContent);
},
supports: (filePath) => filePath.endsWith(".txt")
@@ -97620,7 +97691,7 @@ var VERSION_FILE_PARSERS = [
];
function getParsedVersionFile(filePath) {
info2(`Trying to find version for uv in: ${filePath}`);
if (!import_node_fs5.default.existsSync(filePath)) {
if (!import_node_fs6.default.existsSync(filePath)) {
info2(`Could not find file: ${filePath}`);
return void 0;
}
@@ -97947,7 +98018,7 @@ async function downloadArtifact(downloadUrl, artifactName, platform2, arch3, ver
);
const extension = getExtension(platform2);
const fullPathWithExtension = `${downloadPath}${extension}`;
await import_node_fs6.promises.copyFile(downloadPath, fullPathWithExtension);
await import_node_fs7.promises.copyFile(downloadPath, fullPathWithExtension);
uvDir = await extractZip(fullPathWithExtension);
}
} else {
@@ -98309,7 +98380,7 @@ async function run() {
}
}
function detectEmptyWorkdir(inputs) {
if (import_node_fs7.default.readdirSync(inputs.workingDirectory).length === 0) {
if (import_node_fs8.default.readdirSync(inputs.workingDirectory).length === 0) {
if (inputs.ignoreEmptyWorkdir) {
info2(
"Empty workdir detected. Ignoring because ignore-empty-workdir is enabled"
+54
View File
@@ -45701,6 +45701,60 @@ var semver = __toESM(require_semver(), 1);
// src/download/checksum/known-checksums.ts
var KNOWN_CHECKSUMS = {
"aarch64-apple-darwin-0.11.23": "71ef9de85db820749b3b12b7585624ee279e9c5afcbc6f8236bc3d628c4305b0",
"aarch64-pc-windows-msvc-0.11.23": "c24ef88c44c5e6be3daa7357c0cd8419a88de74c5d01f4ff403e06b765249788",
"aarch64-unknown-linux-gnu-0.11.23": "1873a77350f6621279ae1a0d2227f2bd8b67131598f14a7eb0ba2215d3da2c98",
"aarch64-unknown-linux-musl-0.11.23": "80efb615b78c1e5721e5858135cd3499609b26741220332c843bd58936053bc6",
"arm-unknown-linux-musleabihf-0.11.23": "2467703669be1cf02f31f4347a11c9b10a763e794424eb1073b9fc2565ba45fc",
"armv7-unknown-linux-gnueabihf-0.11.23": "d10df2ebaa729a51d15395720c3f5e76497ae6414beb82043bb2e53f9a86314a",
"armv7-unknown-linux-musleabihf-0.11.23": "417e901f5873a62af344e25e08fb96d75be3a02628e59da4529b73c3693bd31b",
"i686-pc-windows-msvc-0.11.23": "6756a552713bd1b9bd1e8d15402db21600c4fbdeae94c70721e0387b6bbad410",
"i686-unknown-linux-gnu-0.11.23": "87c661f2ccb116dd306b69423fa51f9d7d921ba9bcb1eb8e000853dfbc4b069d",
"i686-unknown-linux-musl-0.11.23": "dac33b2ca44fc162f074bb3b08ef9018e70df930ea82e4c7906e48704b0cfd12",
"powerpc64le-unknown-linux-gnu-0.11.23": "1c87278219389da56f49670ac3f9ae72cda4c38c6a1305290961586ce1b98c3b",
"riscv64gc-unknown-linux-gnu-0.11.23": "38c3b11a79dd6729ff2f35d1882a40c8919e47f385ed51703bed8e1c1ab9afea",
"riscv64gc-unknown-linux-musl-0.11.23": "2bf05826fe1b29adc8031132581400e1ccca0c0051fcbbfe93bddefb80f8dbeb",
"s390x-unknown-linux-gnu-0.11.23": "1a13fd6ab96af55456e6f4ca3f173475e0edf9c9f887bf6e0bc545bc2d931fad",
"x86_64-apple-darwin-0.11.23": "7a88155033cc469bba5bd5a24212e355eb92e3e2a276320b669ec576296c1e25",
"x86_64-pc-windows-msvc-0.11.23": "02ad29f07e674d68726ba3bb1ff25b335d83515756e2b1a194bb56c3cc30e07c",
"x86_64-unknown-linux-gnu-0.11.23": "e12c4cda2fe8c305510a78380a88f2c32a27e90cdcd123cefd2873388f0ebb5f",
"x86_64-unknown-linux-musl-0.11.23": "6be47081100ff1ce0ac7e85ba2ac12e32f2ffa6f946d78bf7f24ee9ce3a46181",
"aarch64-apple-darwin-0.11.22": "97a45e2ff8d5ea262623eed57ec2d9c468a42d74496d5c3c3eef11340235bd7f",
"aarch64-pc-windows-msvc-0.11.22": "30fa01e0fc7c78bdaf6f369ebac401f22f0f865d650f0732a26f1df3e2c6971e",
"aarch64-unknown-linux-gnu-0.11.22": "54b22e9f5570f3643cdf85a33bbc8e9feb3fc6e836a7c660c05378434ef44fe2",
"aarch64-unknown-linux-musl-0.11.22": "bc28063fe57e76a2d632d804cae9c602f8aded1d99f41025d7fefeb66b10befd",
"arm-unknown-linux-musleabihf-0.11.22": "950284c836a2f2aff79d64e703b68ea6bc6ee3a5c5f49399a7889cdd5069d78a",
"armv7-unknown-linux-gnueabihf-0.11.22": "7ff74f488d401f66a0314f65b6970edb011885e09f154e31a307e6d620daad0d",
"armv7-unknown-linux-musleabihf-0.11.22": "10d3f2a47d8c8c99d6aaafb1ec9c98aaf0b2a8ece43af01141693596b8a5cf35",
"i686-pc-windows-msvc-0.11.22": "08388dc9258b211236136327c775f74c127a2321c4f66d7dfcd4ae5cc76748fd",
"i686-unknown-linux-gnu-0.11.22": "522c0d3e0799914cb821661b947d73cd0ee44f6f8ecdadd60bdf11bbf0efef5a",
"i686-unknown-linux-musl-0.11.22": "47e78c168133cb3dd860090de5e832292e9f6d4e3110edd5028f90500a9d791d",
"powerpc64le-unknown-linux-gnu-0.11.22": "519602d26c50891254e19eb269c35da44a330e0499107bceb7926b7b061ed455",
"riscv64gc-unknown-linux-gnu-0.11.22": "291a5506ff058ba68357298752b83b5b230212b0a15845b568029d00cc1d4e8b",
"riscv64gc-unknown-linux-musl-0.11.22": "dd03fa6c9e6ba49195ba78c401bd838496d77d25c17594b7ff0e8e151c13edb9",
"s390x-unknown-linux-gnu-0.11.22": "d5149a1bdd21dc8a86ad91d8657a4cd4eb0761a433ef0ce76117720e41ec950e",
"x86_64-apple-darwin-0.11.22": "9490033dc405b4afc8fa5f9ecd5cc1793e80c727a8c42c32ad456778720d39f2",
"x86_64-pc-windows-msvc-0.11.22": "b56939bac92d29996d351647f7c6f15b31cc69cf952d06d136de3e1e62eb64d1",
"x86_64-unknown-linux-gnu-0.11.22": "30075b14624a62021198319f22e08f1651a97d4026a8c84dab6abcbfaba0d81c",
"x86_64-unknown-linux-musl-0.11.22": "b80bd6952ee11b920b5ab2a35dbccddc364f579e5f2e028d115848cdaa72963e",
"aarch64-apple-darwin-0.11.21": "1f921d491ba5ffeea774eb04d6681ecee379101341cbb1500394993b541bf3f4",
"aarch64-pc-windows-msvc-0.11.21": "74e443f8004022dde57a1bd0d10c097830f9ea8feb4ec927db52cd5d805c2f48",
"aarch64-unknown-linux-gnu-0.11.21": "88e800834007cc5efd4675f166eb2a51e7e3ad19876d85fa8805a6fb5c922397",
"aarch64-unknown-linux-musl-0.11.21": "e71badaed2a2c3a404a0a00974b51c7ed5f5bc7be947916846005b739c68a5a2",
"arm-unknown-linux-musleabihf-0.11.21": "7cd6637deebacfa0224e53afb4dd7da4f464ba0ecc128f6f543897c157e39a0f",
"armv7-unknown-linux-gnueabihf-0.11.21": "929440f991ccd8097e01be1ec831f673ac7bbf508e94819b4270f2873f69e658",
"armv7-unknown-linux-musleabihf-0.11.21": "20f4b653a17adb09cdfa7f911d46a1f254b918a2b49bef1266c735ab4c6fced0",
"i686-pc-windows-msvc-0.11.21": "77d7979222c6bd621bdb862c9cb138be41dce1e3cea239b1e87eb82dfac2dbd5",
"i686-unknown-linux-gnu-0.11.21": "07125219898b1c8e71bc612d91b190927c6b192a7bce5dd029b1c9070e9b7049",
"i686-unknown-linux-musl-0.11.21": "865eff26cef62b7862854e176d57d9e0164daeec595723132a81aa3611238798",
"powerpc64le-unknown-linux-gnu-0.11.21": "0e97021d831f9670c8261f9270ecf94b83f1a90ff5312389e37a77676deaec87",
"riscv64gc-unknown-linux-gnu-0.11.21": "63013d7afe8fd552b273a7a5ca1f1425c0c82b12d73454d24237876bc26006e9",
"riscv64gc-unknown-linux-musl-0.11.21": "b869fe80435715b2b414443af28de96ed5d7f8c6759e12ba141abca221ebc0cd",
"s390x-unknown-linux-gnu-0.11.21": "743694a86a05eaf15d292c3d757388c4b2a11b4a7eb67f000077b4d6c467347e",
"x86_64-apple-darwin-0.11.21": "f3c8e5708a84b920c18b691214d54d2b0da6b984789caae95d47c95120cb7765",
"x86_64-pc-windows-msvc-0.11.21": "ace861f360c6de2babedc1607d0f454b6b09a820dbc8182dc15af927e4df9589",
"x86_64-unknown-linux-gnu-0.11.21": "8c88519b0ef0af9801fcdee419bbb12116bd9e6b18e162ae093c932d8b264050",
"x86_64-unknown-linux-musl-0.11.21": "9dadff5b9e7b1d2d011e41852a1cbca713d9d5d88194f2eb6bd240fa4fb0a719",
"aarch64-apple-darwin-0.11.20": "0a2b6a757d5693671a7ce0002554ae869604e1e69acb10313ac14d08374be01a",
"aarch64-pc-windows-msvc-0.11.20": "5248e1a5f980a77f153c4c452511ec6376abb8772b0979c450775f3a268fc61e",
"aarch64-unknown-linux-gnu-0.11.20": "c8b5b7f9c804b640da0bb66cddddf0a00ce971f64d8076622d70bd141bc80857",
+11
View File
@@ -80,3 +80,14 @@ uv defined as a dependency in `pyproject.toml` or `requirements.txt`.
with:
version-file: "pyproject.toml"
```
If uv is locked as a dependency in your `uv.lock`, you can point `version-file` at the
lockfile to install the exact pinned version. This keeps CI runs deterministic and avoids
silently picking up a newer uv until the lockfile is updated.
```yaml
- name: Install uv based on the version locked in uv.lock
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version-file: "uv.lock"
```
+108
View File
@@ -1,5 +1,113 @@
// AUTOGENERATED_DO_NOT_EDIT
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
"aarch64-apple-darwin-0.11.23":
"71ef9de85db820749b3b12b7585624ee279e9c5afcbc6f8236bc3d628c4305b0",
"aarch64-pc-windows-msvc-0.11.23":
"c24ef88c44c5e6be3daa7357c0cd8419a88de74c5d01f4ff403e06b765249788",
"aarch64-unknown-linux-gnu-0.11.23":
"1873a77350f6621279ae1a0d2227f2bd8b67131598f14a7eb0ba2215d3da2c98",
"aarch64-unknown-linux-musl-0.11.23":
"80efb615b78c1e5721e5858135cd3499609b26741220332c843bd58936053bc6",
"arm-unknown-linux-musleabihf-0.11.23":
"2467703669be1cf02f31f4347a11c9b10a763e794424eb1073b9fc2565ba45fc",
"armv7-unknown-linux-gnueabihf-0.11.23":
"d10df2ebaa729a51d15395720c3f5e76497ae6414beb82043bb2e53f9a86314a",
"armv7-unknown-linux-musleabihf-0.11.23":
"417e901f5873a62af344e25e08fb96d75be3a02628e59da4529b73c3693bd31b",
"i686-pc-windows-msvc-0.11.23":
"6756a552713bd1b9bd1e8d15402db21600c4fbdeae94c70721e0387b6bbad410",
"i686-unknown-linux-gnu-0.11.23":
"87c661f2ccb116dd306b69423fa51f9d7d921ba9bcb1eb8e000853dfbc4b069d",
"i686-unknown-linux-musl-0.11.23":
"dac33b2ca44fc162f074bb3b08ef9018e70df930ea82e4c7906e48704b0cfd12",
"powerpc64le-unknown-linux-gnu-0.11.23":
"1c87278219389da56f49670ac3f9ae72cda4c38c6a1305290961586ce1b98c3b",
"riscv64gc-unknown-linux-gnu-0.11.23":
"38c3b11a79dd6729ff2f35d1882a40c8919e47f385ed51703bed8e1c1ab9afea",
"riscv64gc-unknown-linux-musl-0.11.23":
"2bf05826fe1b29adc8031132581400e1ccca0c0051fcbbfe93bddefb80f8dbeb",
"s390x-unknown-linux-gnu-0.11.23":
"1a13fd6ab96af55456e6f4ca3f173475e0edf9c9f887bf6e0bc545bc2d931fad",
"x86_64-apple-darwin-0.11.23":
"7a88155033cc469bba5bd5a24212e355eb92e3e2a276320b669ec576296c1e25",
"x86_64-pc-windows-msvc-0.11.23":
"02ad29f07e674d68726ba3bb1ff25b335d83515756e2b1a194bb56c3cc30e07c",
"x86_64-unknown-linux-gnu-0.11.23":
"e12c4cda2fe8c305510a78380a88f2c32a27e90cdcd123cefd2873388f0ebb5f",
"x86_64-unknown-linux-musl-0.11.23":
"6be47081100ff1ce0ac7e85ba2ac12e32f2ffa6f946d78bf7f24ee9ce3a46181",
"aarch64-apple-darwin-0.11.22":
"97a45e2ff8d5ea262623eed57ec2d9c468a42d74496d5c3c3eef11340235bd7f",
"aarch64-pc-windows-msvc-0.11.22":
"30fa01e0fc7c78bdaf6f369ebac401f22f0f865d650f0732a26f1df3e2c6971e",
"aarch64-unknown-linux-gnu-0.11.22":
"54b22e9f5570f3643cdf85a33bbc8e9feb3fc6e836a7c660c05378434ef44fe2",
"aarch64-unknown-linux-musl-0.11.22":
"bc28063fe57e76a2d632d804cae9c602f8aded1d99f41025d7fefeb66b10befd",
"arm-unknown-linux-musleabihf-0.11.22":
"950284c836a2f2aff79d64e703b68ea6bc6ee3a5c5f49399a7889cdd5069d78a",
"armv7-unknown-linux-gnueabihf-0.11.22":
"7ff74f488d401f66a0314f65b6970edb011885e09f154e31a307e6d620daad0d",
"armv7-unknown-linux-musleabihf-0.11.22":
"10d3f2a47d8c8c99d6aaafb1ec9c98aaf0b2a8ece43af01141693596b8a5cf35",
"i686-pc-windows-msvc-0.11.22":
"08388dc9258b211236136327c775f74c127a2321c4f66d7dfcd4ae5cc76748fd",
"i686-unknown-linux-gnu-0.11.22":
"522c0d3e0799914cb821661b947d73cd0ee44f6f8ecdadd60bdf11bbf0efef5a",
"i686-unknown-linux-musl-0.11.22":
"47e78c168133cb3dd860090de5e832292e9f6d4e3110edd5028f90500a9d791d",
"powerpc64le-unknown-linux-gnu-0.11.22":
"519602d26c50891254e19eb269c35da44a330e0499107bceb7926b7b061ed455",
"riscv64gc-unknown-linux-gnu-0.11.22":
"291a5506ff058ba68357298752b83b5b230212b0a15845b568029d00cc1d4e8b",
"riscv64gc-unknown-linux-musl-0.11.22":
"dd03fa6c9e6ba49195ba78c401bd838496d77d25c17594b7ff0e8e151c13edb9",
"s390x-unknown-linux-gnu-0.11.22":
"d5149a1bdd21dc8a86ad91d8657a4cd4eb0761a433ef0ce76117720e41ec950e",
"x86_64-apple-darwin-0.11.22":
"9490033dc405b4afc8fa5f9ecd5cc1793e80c727a8c42c32ad456778720d39f2",
"x86_64-pc-windows-msvc-0.11.22":
"b56939bac92d29996d351647f7c6f15b31cc69cf952d06d136de3e1e62eb64d1",
"x86_64-unknown-linux-gnu-0.11.22":
"30075b14624a62021198319f22e08f1651a97d4026a8c84dab6abcbfaba0d81c",
"x86_64-unknown-linux-musl-0.11.22":
"b80bd6952ee11b920b5ab2a35dbccddc364f579e5f2e028d115848cdaa72963e",
"aarch64-apple-darwin-0.11.21":
"1f921d491ba5ffeea774eb04d6681ecee379101341cbb1500394993b541bf3f4",
"aarch64-pc-windows-msvc-0.11.21":
"74e443f8004022dde57a1bd0d10c097830f9ea8feb4ec927db52cd5d805c2f48",
"aarch64-unknown-linux-gnu-0.11.21":
"88e800834007cc5efd4675f166eb2a51e7e3ad19876d85fa8805a6fb5c922397",
"aarch64-unknown-linux-musl-0.11.21":
"e71badaed2a2c3a404a0a00974b51c7ed5f5bc7be947916846005b739c68a5a2",
"arm-unknown-linux-musleabihf-0.11.21":
"7cd6637deebacfa0224e53afb4dd7da4f464ba0ecc128f6f543897c157e39a0f",
"armv7-unknown-linux-gnueabihf-0.11.21":
"929440f991ccd8097e01be1ec831f673ac7bbf508e94819b4270f2873f69e658",
"armv7-unknown-linux-musleabihf-0.11.21":
"20f4b653a17adb09cdfa7f911d46a1f254b918a2b49bef1266c735ab4c6fced0",
"i686-pc-windows-msvc-0.11.21":
"77d7979222c6bd621bdb862c9cb138be41dce1e3cea239b1e87eb82dfac2dbd5",
"i686-unknown-linux-gnu-0.11.21":
"07125219898b1c8e71bc612d91b190927c6b192a7bce5dd029b1c9070e9b7049",
"i686-unknown-linux-musl-0.11.21":
"865eff26cef62b7862854e176d57d9e0164daeec595723132a81aa3611238798",
"powerpc64le-unknown-linux-gnu-0.11.21":
"0e97021d831f9670c8261f9270ecf94b83f1a90ff5312389e37a77676deaec87",
"riscv64gc-unknown-linux-gnu-0.11.21":
"63013d7afe8fd552b273a7a5ca1f1425c0c82b12d73454d24237876bc26006e9",
"riscv64gc-unknown-linux-musl-0.11.21":
"b869fe80435715b2b414443af28de96ed5d7f8c6759e12ba141abca221ebc0cd",
"s390x-unknown-linux-gnu-0.11.21":
"743694a86a05eaf15d292c3d757388c4b2a11b4a7eb67f000077b4d6c467347e",
"x86_64-apple-darwin-0.11.21":
"f3c8e5708a84b920c18b691214d54d2b0da6b984789caae95d47c95120cb7765",
"x86_64-pc-windows-msvc-0.11.21":
"ace861f360c6de2babedc1607d0f454b6b09a820dbc8182dc15af927e4df9589",
"x86_64-unknown-linux-gnu-0.11.21":
"8c88519b0ef0af9801fcdee419bbb12116bd9e6b18e162ae093c932d8b264050",
"x86_64-unknown-linux-musl-0.11.21":
"9dadff5b9e7b1d2d011e41852a1cbca713d9d5d88194f2eb6bd240fa4fb0a719",
"aarch64-apple-darwin-0.11.20":
"0a2b6a757d5693671a7ce0002554ae869604e1e69acb10313ac14d08374be01a",
"aarch64-pc-windows-msvc-0.11.20":
+6
View File
@@ -9,6 +9,7 @@ import {
import { normalizeVersionSpecifier } from "./specifier";
import { getUvVersionFromToolVersions } from "./tool-versions-file";
import type { ParsedVersionFile, VersionFileFormat } from "./types";
import { getUvVersionFromUvLock } from "./uv-lock-file";
interface VersionFileParser {
format: VersionFileFormat;
@@ -49,6 +50,11 @@ const VERSION_FILE_PARSERS: VersionFileParser[] = [
},
supports: (filePath) => filePath.endsWith("pyproject.toml"),
},
{
format: "uv.lock",
parse: (filePath) => getUvVersionFromUvLock(filePath),
supports: (filePath) => filePath.endsWith("uv.lock"),
},
{
format: "requirements",
parse: (filePath) => {
+1
View File
@@ -11,6 +11,7 @@ export type VersionFileFormat =
| ".tool-versions"
| "pyproject.toml"
| "requirements"
| "uv.lock"
| "uv.toml";
export interface ParsedVersionFile {
+24
View File
@@ -0,0 +1,24 @@
import fs from "node:fs";
import * as toml from "smol-toml";
interface UvLockPackage {
name?: string;
version?: string;
}
interface UvLock {
package?: UvLockPackage[];
}
export function getUvVersionFromUvLock(filePath: string): string | undefined {
const fileContent = fs.readFileSync(filePath, "utf-8");
return getUvVersionFromUvLockContent(fileContent);
}
export function getUvVersionFromUvLockContent(
fileContent: string,
): string | undefined {
const parsed = toml.parse(fileContent) as UvLock;
const uvPackage = parsed.package?.find((pkg) => pkg.name === "uv");
return uvPackage?.version;
}