mirror of
https://github.com/astral-sh/setup-uv.git
synced 2026-06-28 18:55:09 +00:00
Compare commits
10 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c86fe4ef1f | ||
|
|
224c887d48 | ||
|
|
b173788282 | ||
|
|
e53da17296 | ||
|
|
a9b33f0240 | ||
|
|
3faa3174e6 | ||
|
|
ca5ddd015e | ||
|
|
e2f6a928de | ||
|
|
ed73b5df24 | ||
|
|
21d5da3bc3 |
14 changed files with 723 additions and 12 deletions
|
|
@ -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'
|
||||
|
|
|
|||
5
SECURITY.md
Normal file
5
SECURITY.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Security policy
|
||||
|
||||
Report suspected vulnerabilities according to [Astral's security policy](https://github.com/astral-sh/.github/blob/main/SECURITY.md).
|
||||
|
||||
For this repository's security boundaries and reporting criteria, see the [setup-uv threat model](docs/threat-model.md).
|
||||
36
__tests__/version/uv-lock-file.test.ts
Normal file
36
__tests__/version/uv-lock-file.test.ts
Normal 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",
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
165
dist/setup/index.cjs
generated
vendored
165
dist/setup/index.cjs
generated
vendored
|
|
@ -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
|
||||
|
|
@ -91160,12 +91160,16 @@ function getLinuxOSNameVersion() {
|
|||
const id = parseOsReleaseValue(content, "ID");
|
||||
const versionId2 = parseOsReleaseValue(content, "VERSION_ID");
|
||||
const versionCodename = parseOsReleaseValue(content, "VERSION_CODENAME");
|
||||
const buildId = parseOsReleaseValue(content, "BUILD_ID");
|
||||
if (id && versionId2) {
|
||||
return `${id}-${versionId2}`;
|
||||
}
|
||||
if (id && versionCodename) {
|
||||
return `${id}-${versionCodename}`;
|
||||
}
|
||||
if (id && buildId) {
|
||||
return `${id}-${buildId}`;
|
||||
}
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
|
|
@ -91285,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
|
||||
|
|
@ -91737,6 +91741,132 @@ var fs10 = __toESM(require("node:fs"), 1);
|
|||
|
||||
// src/download/checksum/known-checksums.ts
|
||||
var KNOWN_CHECKSUMS = {
|
||||
"aarch64-apple-darwin-0.11.25": "5fc334bb25d19806262efd1f6e7d380155c7e817d89bf426df4ba7ae873c9471",
|
||||
"aarch64-pc-windows-msvc-0.11.25": "40d65c29c4d97db6a0993df665d3727700bb799b3618992ce9a4dc533c6d1a31",
|
||||
"aarch64-unknown-linux-gnu-0.11.25": "e0e9d73f74e06a7dcd53910d5962146ab48f0af9c92cc8df33a37baa0121014d",
|
||||
"aarch64-unknown-linux-musl-0.11.25": "3d9c9a95f1868ff20ac880712f3a337d710ea4b65f135184b7a35635d1acbf84",
|
||||
"arm-unknown-linux-musleabihf-0.11.25": "50ef6368eebaa9f31d8e8685a91689666c7bae86a1bd9a72b7a505f752084ef9",
|
||||
"armv7-unknown-linux-gnueabihf-0.11.25": "eb60b2931d2461022e1675a7f6c08078b1e47150edb2f7728fe117563a5ebc99",
|
||||
"armv7-unknown-linux-musleabihf-0.11.25": "50f6f10ca38e4628998c17de24c2780f429d9b354db98b1832c130b7394e8ec4",
|
||||
"i686-pc-windows-msvc-0.11.25": "91a87e8a7ea2d5e9451b9bd8b1e9fa490542311ac43e80a9115abbd231c417fb",
|
||||
"i686-unknown-linux-gnu-0.11.25": "1b0f2ceee8dbe718eb1e14d7eccf67534d2f72698f4f85e70cf8a5055412b5d3",
|
||||
"i686-unknown-linux-musl-0.11.25": "e650be31af3fd31f5e2236a47daab0899070a66a732026d140461f1614fbe786",
|
||||
"powerpc64le-unknown-linux-gnu-0.11.25": "fbf67c8beccc718b9de478d7e74d605fe9c2e259c4398f95c9df7680da710af1",
|
||||
"riscv64gc-unknown-linux-gnu-0.11.25": "29e74713e89242c6bf0971b28e904836298a04fb7e0d83262c7bd5aff695ae33",
|
||||
"riscv64gc-unknown-linux-musl-0.11.25": "90c5a720dd9ddf32de8511c79fc83bc69e38795a94b5b49fcb2d010f96b1374d",
|
||||
"s390x-unknown-linux-gnu-0.11.25": "3d508ed6e66898ce80aa668cb7d6ec4ddb4d30440fcfbd409365d3d0e4afa75c",
|
||||
"x86_64-apple-darwin-0.11.25": "65ff85b33212f75d34d7c0f0724aba9a742c74f62559f67dc0d6c543dc2fc52f",
|
||||
"x86_64-pc-windows-msvc-0.11.25": "15bfd1423b7eaa7aae949922d4712ebaac2bb44a81af64ab59bbe007090cb0d0",
|
||||
"x86_64-unknown-linux-gnu-0.11.25": "1db18b5e76fa645a7f3865773139bdec8e2d46adbdbb35e7410b34fa8015ccd2",
|
||||
"x86_64-unknown-linux-musl-0.11.25": "7195cfcc1785d0c559d4682ad9109f26664b8db4d828d42d66078ef454061891",
|
||||
"aarch64-apple-darwin-0.11.24": "7578c6087c5cd76981732b1f5d126248101faebdf81016ba780a65ce03653cdf",
|
||||
"aarch64-pc-windows-msvc-0.11.24": "51bcf8051dcc2075fba9136ece0f229205a6ef813e68e5709c6eeb18802afed5",
|
||||
"aarch64-unknown-linux-gnu-0.11.24": "e22c66d36a0098b17cff80a8647e0b8c58202af899d4e9eb820fc7ad126435a1",
|
||||
"aarch64-unknown-linux-musl-0.11.24": "222fcd9878ed6f5a8565d121d1a10e1f958e3c7b42e4ec5cbc6927b2be20cc1a",
|
||||
"arm-unknown-linux-musleabihf-0.11.24": "92fa5e688c5dac8cf459421ad65f6d21ea1c530dd2225981bcebfd5d538aa4bc",
|
||||
"armv7-unknown-linux-gnueabihf-0.11.24": "b9ec27086af022b2962428beeb5d391903d663f3bd76fed3d8a39def1cc7fe19",
|
||||
"armv7-unknown-linux-musleabihf-0.11.24": "747560329d0765623f261969fffb8acd35403c280d1baec36bed46d335731aca",
|
||||
"i686-pc-windows-msvc-0.11.24": "1df231a0da08d691c32047cce8a4aa0aba82d2a74f02999f2e4847a5e8e7e2df",
|
||||
"i686-unknown-linux-gnu-0.11.24": "e7444c509c01efb293d2e0c78d306ec2624aa9d1d63c7fed095e0a3e29800bb9",
|
||||
"i686-unknown-linux-musl-0.11.24": "ec692d59d86071fd07d2e7cf8cef8473941019238dd00c0481e6db59b79b4665",
|
||||
"powerpc64le-unknown-linux-gnu-0.11.24": "29db3e6f7422f027d14f5718fe3efa4b6b475ada234d7b10b6002ba1367cdc08",
|
||||
"riscv64gc-unknown-linux-gnu-0.11.24": "3e975a156d5972359c6b12ce3235a5cf68f838a0be3605c5800996556b902674",
|
||||
"riscv64gc-unknown-linux-musl-0.11.24": "4d39d5eec286daab074b5b2ed142cd9d9042306a2996f708f5a86dcd19a35eaf",
|
||||
"s390x-unknown-linux-gnu-0.11.24": "a0baa1dc34efcb896c8e82e0844b10e308cf48fb1f5060cef6d12ea5a801c3f7",
|
||||
"x86_64-apple-darwin-0.11.24": "8e026ec796a2760c33c832298b0910bf07fb369d00cc075761c321923ac37522",
|
||||
"x86_64-pc-windows-msvc-0.11.24": "af9573a2e36f7020b18ec5fdde20117aae74bbad3f4acb3dc3fc03319f1aa083",
|
||||
"x86_64-unknown-linux-gnu-0.11.24": "5ce1ad074a78f96c5c8122088bb85a12eb282195bc1453151a48762e4fc31fed",
|
||||
"x86_64-unknown-linux-musl-0.11.24": "2f9eaa976cf8ad8574623dde6916fb87ec047524fe65b99dc11e44e33eae4bfb",
|
||||
"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",
|
||||
"aarch64-unknown-linux-musl-0.11.20": "79931fc8e82dddff6eb9cab32aa8492e35bc22767322dd68cad36012411ae6d5",
|
||||
"arm-unknown-linux-musleabihf-0.11.20": "4113bf774c0626d82374fcb4de1dbe117f38e68cfd4cf7360e44259ca62a6d48",
|
||||
"armv7-unknown-linux-gnueabihf-0.11.20": "b8004b8be37d13ae8c05e8d55028d9ea3ea387fa61a96eeda7812e1a413fd9f8",
|
||||
"armv7-unknown-linux-musleabihf-0.11.20": "1a6ab0ebac84282838ec96dadb245b1d4404ea8a40e375822cc5a2f1f3997d72",
|
||||
"i686-pc-windows-msvc-0.11.20": "00c3f694414bf3821922dc9766cec373bcceb16ae3d98ff1fd0774b97bbc55fb",
|
||||
"i686-unknown-linux-gnu-0.11.20": "08d3e199788ca3ce331da13cc4df15449bd44844a1262597bacea15bb1e42a0d",
|
||||
"i686-unknown-linux-musl-0.11.20": "0556b545dcba5402c6120575e66e046f3165df4be6baed6992ba7ebc000054e6",
|
||||
"powerpc64le-unknown-linux-gnu-0.11.20": "555c15dfb8e95e9edb5d4c4f442f9a77fe7f007804da164450cac1eddb41bcde",
|
||||
"riscv64gc-unknown-linux-gnu-0.11.20": "f78a42002f4c7702688493f7513a081939ca3d52b41dcc7b9224bb660f0c4c28",
|
||||
"riscv64gc-unknown-linux-musl-0.11.20": "7433aed57cf15cf0657d0ce7c655f95eb00e54e49a0dc408d0170467260843d9",
|
||||
"s390x-unknown-linux-gnu-0.11.20": "208af0d9d0099f86ed093b68b05703451b884f6db351f9555fda905d3538e53d",
|
||||
"x86_64-apple-darwin-0.11.20": "bef01a86faab997f6022b45cfa29bfc5b090f2f72cd4a91d2ecefe641efdabe7",
|
||||
"x86_64-pc-windows-msvc-0.11.20": "4c281f1b6b9ccb14d9567ebde9a218a7cabfb35e5ffe8c1d4ef5e2821a655474",
|
||||
"x86_64-unknown-linux-gnu-0.11.20": "5de211d9278af365497d387e25316907b3b4a9f25b4476dd6dbf238d6f85cff3",
|
||||
"x86_64-unknown-linux-musl-0.11.20": "a7545a1360d29baa696753af2f41849047b332bcb90e8ea75ad0568e7f865e35",
|
||||
"aarch64-apple-darwin-0.11.19": "d8f59c38e8c4168ee468d423cd63184be12fa6995a4283d41ee1a14d003c9453",
|
||||
"aarch64-pc-windows-msvc-0.11.19": "5592a990a9d9901fd0d23992d872f2ec3ca91b7bbd3d5f0bb5e6f42b851493d8",
|
||||
"aarch64-unknown-linux-gnu-0.11.19": "83b13ab184a45b7d9a3b0e4b10eaebd50ad41e66cb16dcce8e60aa7be13ae399",
|
||||
"aarch64-unknown-linux-musl-0.11.19": "767629b64cdf078c32e42819db28d5ca868b8dc7e3a879967fadc3e4f7f66be3",
|
||||
"arm-unknown-linux-musleabihf-0.11.19": "638bb5aac6419e062149b4600c0030e2203dfbb8bf6b0db740755bb19f458abf",
|
||||
"armv7-unknown-linux-gnueabihf-0.11.19": "56c307d18acadb1bee2b76bde39cedcf0d29f93102c52f39f8c0c8a42dffe96e",
|
||||
"armv7-unknown-linux-musleabihf-0.11.19": "d807c33e89c27430a68b7be52a8a0d39e08c91dba0fa295172c6ff2ce2d07a27",
|
||||
"i686-pc-windows-msvc-0.11.19": "e701a69f0ab192fde8ea3f4cfdedfa6cade0c92cea2e350613b6528e966b50c7",
|
||||
"i686-unknown-linux-gnu-0.11.19": "d0ef2e69c44a2763161d5b5f40b722fe81e0d16bed217cbc526fb5a3640802b3",
|
||||
"i686-unknown-linux-musl-0.11.19": "f58e41864cb91fbd2306a7b46718fdd0c1029169fe03347719771a1c68a527e6",
|
||||
"powerpc64le-unknown-linux-gnu-0.11.19": "b6dcd94b5c456d11787d1e6d01b5f9a34b456e22e2dde9bbae3531dc7676c0d8",
|
||||
"riscv64gc-unknown-linux-gnu-0.11.19": "4b9ca6bd2ed1e4c2658e5f85cf8a208c192490d9d24dbf2c36d61ea10a389778",
|
||||
"riscv64gc-unknown-linux-musl-0.11.19": "184232b4e0de4d6a674d57b1d6d8c39a3c5a5dbc27f95ed972c46974d21b0115",
|
||||
"s390x-unknown-linux-gnu-0.11.19": "c4535a5f9f27a94df384ea8140b78c3e7c083d4130cd341fd826b5ab343979fb",
|
||||
"x86_64-apple-darwin-0.11.19": "1585f415cade9f061e7f00fe5b00030a79ccfac60c650242ce639ba946138d40",
|
||||
"x86_64-pc-windows-msvc-0.11.19": "1665fc8e37b5d70a134820d6d7891747471a2ac8bc940ee7af0b69fd03b28d61",
|
||||
"x86_64-unknown-linux-gnu-0.11.19": "7035608168e106375b36d0c818d537a889c51a8625fe7f8f7cad5e62b947c368",
|
||||
"x86_64-unknown-linux-musl-0.11.19": "c4c0d0a383413261af5f0f0743e1292f4aafbe907987ed83bd0ac66f0a3d7e20",
|
||||
"aarch64-apple-darwin-0.11.18": "1a7adf8dadae3b55853115d13a8bf564d219597ad13824b93b213706933863e5",
|
||||
"aarch64-pc-windows-msvc-0.11.18": "0689e1a40d36b387522d2b1b865cd98a15ddd4a7507e256ad93be6f6a335fec1",
|
||||
"aarch64-unknown-linux-gnu-0.11.18": "0f03c6648df1c159557f4222c0f37250f84733fb88d6fc3c16770e17c177a8c9",
|
||||
|
|
@ -96772,7 +96902,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);
|
||||
|
|
@ -97537,6 +97667,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 = [
|
||||
{
|
||||
|
|
@ -97547,7 +97689,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,
|
||||
|
|
@ -97559,7 +97701,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) {
|
||||
|
|
@ -97569,10 +97711,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")
|
||||
|
|
@ -97580,7 +97727,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;
|
||||
}
|
||||
|
|
@ -97907,7 +98054,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 {
|
||||
|
|
@ -98269,7 +98416,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"
|
||||
|
|
|
|||
126
dist/update-known-checksums/index.cjs
generated
vendored
126
dist/update-known-checksums/index.cjs
generated
vendored
|
|
@ -45701,6 +45701,132 @@ var semver = __toESM(require_semver(), 1);
|
|||
|
||||
// src/download/checksum/known-checksums.ts
|
||||
var KNOWN_CHECKSUMS = {
|
||||
"aarch64-apple-darwin-0.11.25": "5fc334bb25d19806262efd1f6e7d380155c7e817d89bf426df4ba7ae873c9471",
|
||||
"aarch64-pc-windows-msvc-0.11.25": "40d65c29c4d97db6a0993df665d3727700bb799b3618992ce9a4dc533c6d1a31",
|
||||
"aarch64-unknown-linux-gnu-0.11.25": "e0e9d73f74e06a7dcd53910d5962146ab48f0af9c92cc8df33a37baa0121014d",
|
||||
"aarch64-unknown-linux-musl-0.11.25": "3d9c9a95f1868ff20ac880712f3a337d710ea4b65f135184b7a35635d1acbf84",
|
||||
"arm-unknown-linux-musleabihf-0.11.25": "50ef6368eebaa9f31d8e8685a91689666c7bae86a1bd9a72b7a505f752084ef9",
|
||||
"armv7-unknown-linux-gnueabihf-0.11.25": "eb60b2931d2461022e1675a7f6c08078b1e47150edb2f7728fe117563a5ebc99",
|
||||
"armv7-unknown-linux-musleabihf-0.11.25": "50f6f10ca38e4628998c17de24c2780f429d9b354db98b1832c130b7394e8ec4",
|
||||
"i686-pc-windows-msvc-0.11.25": "91a87e8a7ea2d5e9451b9bd8b1e9fa490542311ac43e80a9115abbd231c417fb",
|
||||
"i686-unknown-linux-gnu-0.11.25": "1b0f2ceee8dbe718eb1e14d7eccf67534d2f72698f4f85e70cf8a5055412b5d3",
|
||||
"i686-unknown-linux-musl-0.11.25": "e650be31af3fd31f5e2236a47daab0899070a66a732026d140461f1614fbe786",
|
||||
"powerpc64le-unknown-linux-gnu-0.11.25": "fbf67c8beccc718b9de478d7e74d605fe9c2e259c4398f95c9df7680da710af1",
|
||||
"riscv64gc-unknown-linux-gnu-0.11.25": "29e74713e89242c6bf0971b28e904836298a04fb7e0d83262c7bd5aff695ae33",
|
||||
"riscv64gc-unknown-linux-musl-0.11.25": "90c5a720dd9ddf32de8511c79fc83bc69e38795a94b5b49fcb2d010f96b1374d",
|
||||
"s390x-unknown-linux-gnu-0.11.25": "3d508ed6e66898ce80aa668cb7d6ec4ddb4d30440fcfbd409365d3d0e4afa75c",
|
||||
"x86_64-apple-darwin-0.11.25": "65ff85b33212f75d34d7c0f0724aba9a742c74f62559f67dc0d6c543dc2fc52f",
|
||||
"x86_64-pc-windows-msvc-0.11.25": "15bfd1423b7eaa7aae949922d4712ebaac2bb44a81af64ab59bbe007090cb0d0",
|
||||
"x86_64-unknown-linux-gnu-0.11.25": "1db18b5e76fa645a7f3865773139bdec8e2d46adbdbb35e7410b34fa8015ccd2",
|
||||
"x86_64-unknown-linux-musl-0.11.25": "7195cfcc1785d0c559d4682ad9109f26664b8db4d828d42d66078ef454061891",
|
||||
"aarch64-apple-darwin-0.11.24": "7578c6087c5cd76981732b1f5d126248101faebdf81016ba780a65ce03653cdf",
|
||||
"aarch64-pc-windows-msvc-0.11.24": "51bcf8051dcc2075fba9136ece0f229205a6ef813e68e5709c6eeb18802afed5",
|
||||
"aarch64-unknown-linux-gnu-0.11.24": "e22c66d36a0098b17cff80a8647e0b8c58202af899d4e9eb820fc7ad126435a1",
|
||||
"aarch64-unknown-linux-musl-0.11.24": "222fcd9878ed6f5a8565d121d1a10e1f958e3c7b42e4ec5cbc6927b2be20cc1a",
|
||||
"arm-unknown-linux-musleabihf-0.11.24": "92fa5e688c5dac8cf459421ad65f6d21ea1c530dd2225981bcebfd5d538aa4bc",
|
||||
"armv7-unknown-linux-gnueabihf-0.11.24": "b9ec27086af022b2962428beeb5d391903d663f3bd76fed3d8a39def1cc7fe19",
|
||||
"armv7-unknown-linux-musleabihf-0.11.24": "747560329d0765623f261969fffb8acd35403c280d1baec36bed46d335731aca",
|
||||
"i686-pc-windows-msvc-0.11.24": "1df231a0da08d691c32047cce8a4aa0aba82d2a74f02999f2e4847a5e8e7e2df",
|
||||
"i686-unknown-linux-gnu-0.11.24": "e7444c509c01efb293d2e0c78d306ec2624aa9d1d63c7fed095e0a3e29800bb9",
|
||||
"i686-unknown-linux-musl-0.11.24": "ec692d59d86071fd07d2e7cf8cef8473941019238dd00c0481e6db59b79b4665",
|
||||
"powerpc64le-unknown-linux-gnu-0.11.24": "29db3e6f7422f027d14f5718fe3efa4b6b475ada234d7b10b6002ba1367cdc08",
|
||||
"riscv64gc-unknown-linux-gnu-0.11.24": "3e975a156d5972359c6b12ce3235a5cf68f838a0be3605c5800996556b902674",
|
||||
"riscv64gc-unknown-linux-musl-0.11.24": "4d39d5eec286daab074b5b2ed142cd9d9042306a2996f708f5a86dcd19a35eaf",
|
||||
"s390x-unknown-linux-gnu-0.11.24": "a0baa1dc34efcb896c8e82e0844b10e308cf48fb1f5060cef6d12ea5a801c3f7",
|
||||
"x86_64-apple-darwin-0.11.24": "8e026ec796a2760c33c832298b0910bf07fb369d00cc075761c321923ac37522",
|
||||
"x86_64-pc-windows-msvc-0.11.24": "af9573a2e36f7020b18ec5fdde20117aae74bbad3f4acb3dc3fc03319f1aa083",
|
||||
"x86_64-unknown-linux-gnu-0.11.24": "5ce1ad074a78f96c5c8122088bb85a12eb282195bc1453151a48762e4fc31fed",
|
||||
"x86_64-unknown-linux-musl-0.11.24": "2f9eaa976cf8ad8574623dde6916fb87ec047524fe65b99dc11e44e33eae4bfb",
|
||||
"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",
|
||||
"aarch64-unknown-linux-musl-0.11.20": "79931fc8e82dddff6eb9cab32aa8492e35bc22767322dd68cad36012411ae6d5",
|
||||
"arm-unknown-linux-musleabihf-0.11.20": "4113bf774c0626d82374fcb4de1dbe117f38e68cfd4cf7360e44259ca62a6d48",
|
||||
"armv7-unknown-linux-gnueabihf-0.11.20": "b8004b8be37d13ae8c05e8d55028d9ea3ea387fa61a96eeda7812e1a413fd9f8",
|
||||
"armv7-unknown-linux-musleabihf-0.11.20": "1a6ab0ebac84282838ec96dadb245b1d4404ea8a40e375822cc5a2f1f3997d72",
|
||||
"i686-pc-windows-msvc-0.11.20": "00c3f694414bf3821922dc9766cec373bcceb16ae3d98ff1fd0774b97bbc55fb",
|
||||
"i686-unknown-linux-gnu-0.11.20": "08d3e199788ca3ce331da13cc4df15449bd44844a1262597bacea15bb1e42a0d",
|
||||
"i686-unknown-linux-musl-0.11.20": "0556b545dcba5402c6120575e66e046f3165df4be6baed6992ba7ebc000054e6",
|
||||
"powerpc64le-unknown-linux-gnu-0.11.20": "555c15dfb8e95e9edb5d4c4f442f9a77fe7f007804da164450cac1eddb41bcde",
|
||||
"riscv64gc-unknown-linux-gnu-0.11.20": "f78a42002f4c7702688493f7513a081939ca3d52b41dcc7b9224bb660f0c4c28",
|
||||
"riscv64gc-unknown-linux-musl-0.11.20": "7433aed57cf15cf0657d0ce7c655f95eb00e54e49a0dc408d0170467260843d9",
|
||||
"s390x-unknown-linux-gnu-0.11.20": "208af0d9d0099f86ed093b68b05703451b884f6db351f9555fda905d3538e53d",
|
||||
"x86_64-apple-darwin-0.11.20": "bef01a86faab997f6022b45cfa29bfc5b090f2f72cd4a91d2ecefe641efdabe7",
|
||||
"x86_64-pc-windows-msvc-0.11.20": "4c281f1b6b9ccb14d9567ebde9a218a7cabfb35e5ffe8c1d4ef5e2821a655474",
|
||||
"x86_64-unknown-linux-gnu-0.11.20": "5de211d9278af365497d387e25316907b3b4a9f25b4476dd6dbf238d6f85cff3",
|
||||
"x86_64-unknown-linux-musl-0.11.20": "a7545a1360d29baa696753af2f41849047b332bcb90e8ea75ad0568e7f865e35",
|
||||
"aarch64-apple-darwin-0.11.19": "d8f59c38e8c4168ee468d423cd63184be12fa6995a4283d41ee1a14d003c9453",
|
||||
"aarch64-pc-windows-msvc-0.11.19": "5592a990a9d9901fd0d23992d872f2ec3ca91b7bbd3d5f0bb5e6f42b851493d8",
|
||||
"aarch64-unknown-linux-gnu-0.11.19": "83b13ab184a45b7d9a3b0e4b10eaebd50ad41e66cb16dcce8e60aa7be13ae399",
|
||||
"aarch64-unknown-linux-musl-0.11.19": "767629b64cdf078c32e42819db28d5ca868b8dc7e3a879967fadc3e4f7f66be3",
|
||||
"arm-unknown-linux-musleabihf-0.11.19": "638bb5aac6419e062149b4600c0030e2203dfbb8bf6b0db740755bb19f458abf",
|
||||
"armv7-unknown-linux-gnueabihf-0.11.19": "56c307d18acadb1bee2b76bde39cedcf0d29f93102c52f39f8c0c8a42dffe96e",
|
||||
"armv7-unknown-linux-musleabihf-0.11.19": "d807c33e89c27430a68b7be52a8a0d39e08c91dba0fa295172c6ff2ce2d07a27",
|
||||
"i686-pc-windows-msvc-0.11.19": "e701a69f0ab192fde8ea3f4cfdedfa6cade0c92cea2e350613b6528e966b50c7",
|
||||
"i686-unknown-linux-gnu-0.11.19": "d0ef2e69c44a2763161d5b5f40b722fe81e0d16bed217cbc526fb5a3640802b3",
|
||||
"i686-unknown-linux-musl-0.11.19": "f58e41864cb91fbd2306a7b46718fdd0c1029169fe03347719771a1c68a527e6",
|
||||
"powerpc64le-unknown-linux-gnu-0.11.19": "b6dcd94b5c456d11787d1e6d01b5f9a34b456e22e2dde9bbae3531dc7676c0d8",
|
||||
"riscv64gc-unknown-linux-gnu-0.11.19": "4b9ca6bd2ed1e4c2658e5f85cf8a208c192490d9d24dbf2c36d61ea10a389778",
|
||||
"riscv64gc-unknown-linux-musl-0.11.19": "184232b4e0de4d6a674d57b1d6d8c39a3c5a5dbc27f95ed972c46974d21b0115",
|
||||
"s390x-unknown-linux-gnu-0.11.19": "c4535a5f9f27a94df384ea8140b78c3e7c083d4130cd341fd826b5ab343979fb",
|
||||
"x86_64-apple-darwin-0.11.19": "1585f415cade9f061e7f00fe5b00030a79ccfac60c650242ce639ba946138d40",
|
||||
"x86_64-pc-windows-msvc-0.11.19": "1665fc8e37b5d70a134820d6d7891747471a2ac8bc940ee7af0b69fd03b28d61",
|
||||
"x86_64-unknown-linux-gnu-0.11.19": "7035608168e106375b36d0c818d537a889c51a8625fe7f8f7cad5e62b947c368",
|
||||
"x86_64-unknown-linux-musl-0.11.19": "c4c0d0a383413261af5f0f0743e1292f4aafbe907987ed83bd0ac66f0a3d7e20",
|
||||
"aarch64-apple-darwin-0.11.18": "1a7adf8dadae3b55853115d13a8bf564d219597ad13824b93b213706933863e5",
|
||||
"aarch64-pc-windows-msvc-0.11.18": "0689e1a40d36b387522d2b1b865cd98a15ddd4a7507e256ad93be6f6a335fec1",
|
||||
"aarch64-unknown-linux-gnu-0.11.18": "0f03c6648df1c159557f4222c0f37250f84733fb88d6fc3c16770e17c177a8c9",
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
```
|
||||
|
|
|
|||
81
docs/threat-model.md
Normal file
81
docs/threat-model.md
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
# setup-uv Repository Threat Model
|
||||
|
||||
## Overview
|
||||
|
||||
`setup-uv` is a GitHub Action that installs or reuses `uv`, modifies `PATH` and the environment for later steps, may execute a discovered Python interpreter, may create or clear a virtual environment, and may restore or save caches. It may use `github-token` to authenticate GitHub downloads; it requires no OIDC credential or additional workflow secret.
|
||||
|
||||
The consumer runtime is the selected ref's committed action metadata, bundles, and runner-interpreted companion files; source alone is not evidence of shipped behavior. Privileged automation that generates, updates, or publishes those artifacts is also in scope.
|
||||
|
||||
The assets are job credentials; integrity of installed executables, interpreter, environment, checkout, runner, artifacts, and caches; isolation between jobs sharing caches or persistent runners; integrity of published action refs; and workflow compute/storage availability.
|
||||
|
||||
Material failures are unauthorized executable selection, credential disclosure, premature execution of lower-authority content, filesystem escape or destructive path use, cross-authority cache/runner persistence, and unauthorized publication.
|
||||
|
||||
## Threat Model, Trust Boundaries, and Assumptions
|
||||
|
||||
### Authority and trust boundaries
|
||||
|
||||
| Actor or input | Trust decision |
|
||||
|---|---|
|
||||
| Maintainers, repository/configuration administrators, and GitHub infrastructure | Trusted roots for source, bundles, workflows, refs, rulesets, environments, runner protocol, hosted isolation, and cache service. A lower-authority path into these roots is in scope; their compromise alone is not a repository bug. |
|
||||
| Consumer workflow authors and runner operators | Control the action ref, trigger, runner, permissions, secrets, proxy, environment, inputs, paths, globs, and custom sources. These are trusted choices unless derived from lower-authority event data. Selecting a custom manifest delegates metadata and executable authority; selecting a path authorizes normal operations on it and intended referents. |
|
||||
| Selected checkout, project authors, and pull-request contributors | The consumer delegates project/version files, interpreter discovery state, virtual environments, symlinks, cache inputs, and code execution within `setup-uv`'s process environment. Checkout-controlled behavior is trusted unless it overrides an explicit workflow choice or crosses an independent cache, runner, remote, or publication boundary. |
|
||||
| Remote metadata and artifacts | Default official endpoints, TLS roots, and an operator proxy are trusted mutable authorities. A custom manifest authorizes its URLs and hashes; a hash supplied by that same authority detects corruption, not malice. |
|
||||
| Cache and runner-state producers/consumers | Same-principal state is trusted by default. Integrity attacks require a lower-authority producer and higher-authority consumer. Confidentiality can flow the opposite way because lower-authority refs may read eligible higher-authority caches. Shared self-hosted state creates a boundary only when principals and authority differ. |
|
||||
| GitHub-managed automation | Dependency, coding-agent, and review workflows may exist outside the committed tree. Treat them as external principals and obtain their effective trigger, actor, token, environment, ref, and write/secret authority from live evidence. |
|
||||
|
||||
### Assumptions
|
||||
|
||||
- Running the selected `uv` and checkout-selected Python interpreters is intended. Project execution is out of scope unless it bypasses an explicit workflow choice or crosses an independent cache, runner, remote, or publication boundary.
|
||||
- Mutable official manifests, ranges, `latest`, and unprotected refs are not attacker control. A protected ref or independent checksum matters only if the selected bundle actually enforces it.
|
||||
- Same-user changes to paths, environment, proxies, or tool/cache state are not separate attacks. Demonstrate a cross-principal or lower-to-higher boundary.
|
||||
- Content merged through a trust path that can also merge executable code is not a lower-authority source; require a narrower writer or post-review mutation path.
|
||||
- Running `setup-uv` on an untrusted checkout with higher authority is a consumer trust decision; checkout-selected code may inherit the action environment.
|
||||
- Authorized paths include expected symlink/junction referents. Absolute paths and paths outside the workspace are supported; an escape requires independent control crossing an unauthorized boundary.
|
||||
- Hosted runners are assumed ephemeral and isolated. Persistence or hostile co-tenancy on self-hosted runners must be demonstrated.
|
||||
- Branch/tag rules, environments, token defaults, cache visibility, fork policy, dynamic workflows, and runner allocation are external state. Re-query required approvals/checks, bypass actors, tag movement, deployment reviewers/principals, release targets, and effective permissions for each attack path.
|
||||
- Web-application classes such as sessions, CSRF, XSS, SQL injection, and tenant isolation are not applicable.
|
||||
|
||||
### Security invariants
|
||||
|
||||
1. **Published runtime:** review `action.yml`, committed `dist/*.cjs`, and runner-interpreted shipped files; source-only fixes do not protect consumers.
|
||||
2. **Executable identity:** precedence is workflow version, version file, project configuration, then `latest`. Manifest authority, platform, variant, URL, checksum, mirror fallback, extraction, and cache placement must bind the intended artifact. A tool-cache hit bypasses download validation and depends on cache provenance.
|
||||
3. **Credential recipients:** tokens and URL credentials may reach only workflow-authorized origins, redirects, paths, and logs. Metadata authority does not imply token-recipient authority.
|
||||
4. **Executable boundaries:** checkout-selected interpreters are authorized by default. Explicit workflow selections must win, and independent cache, runner, or remote state must not substitute executables or gain additional authority.
|
||||
5. **Paths and action channels:** path/environment changes, virtual-environment clearing, outputs, state, and problem matchers must affect only authorized targets and keep untrusted values as data.
|
||||
6. **Cache boundaries:** keys, scope, restore paths, and executable content must prevent lower-to-higher poisoning; cache contents and post-action path re-resolution must prevent higher-to-lower disclosure, destructive pruning, or persistence.
|
||||
7. **Workflow and release authority:** unreviewed code or mutable tooling must not acquire write, secret, OIDC, artifact, deployment, tag, or publication authority. Only the intended reviewed bundles and commit may be released.
|
||||
8. **Availability:** independently controlled manifests, archives, globs, traversal, and caches must stay within the accepted one-job resource-failure model.
|
||||
|
||||
### Finding gate
|
||||
|
||||
Before reporting, identify the attacker and victim principals; exact controlled input; scanned action and checkout refs; runtime reachability in committed bundles; effective token, secrets/OIDC, environment gates, cache scope, and runner persistence; applicable defaults and opt-ins; validation performed or skipped; declared trust roots; baseline versus incremental capability; and concrete impact. Reproduce platform-specific behavior and distinguish the scanned ref from other versions.
|
||||
|
||||
A report must demonstrate independent attacker control, a violated guarantee, committed-runtime reachability, incremental capability, and practical impact; otherwise it is not a security finding and should not be reported as one.
|
||||
|
||||
## Attack Surface, Mitigations, and Attacker Stories
|
||||
|
||||
| Surface | Security-relevant behavior and controls | Reportable attacker story |
|
||||
|---|---|---|
|
||||
| Published action and build/release supply chain | Consumers execute committed bundles and embedded dependencies. Verify source/bundle alignment, lockfile integrity, dependency-install policy, reproducible/generated-diff checks, immutable action pins, branch enforcement, and publication target checks. | A lower-authority contributor or dependency changes shipped code, or release automation publishes a different commit, by bypassing an effective review, branch, or release control. |
|
||||
| Version, manifest, proxy, and network selection | Project files may select an official version by documented precedence. Custom manifests may select URLs, hashes, variants, and platforms and may reach arbitrary network locations. Parsing should reject malformed, ambiguous, unsupported, or incorrectly typed records; verify HTTPS, time/size bounds, proxy behavior, and selected-ref defaults. | Lower-authority event/project data violates a promised fixed version, escapes the selected manifest, probes runner-only services, causes material resource use, selects attacker bytes, or redirects later credentials. Operator selection of a custom authority is not itself a finding. |
|
||||
| Artifact URL, token, checksum, extraction, and tool cache | Mirror fallback must preserve identity and checksum policy. Origin gating should restrict tokens; redirect handling should strip authorization across unauthorized hosts and reject downgrade. Verify checksum precedence and reject missing/empty hashes when policy requires validation. Independent hashes must precede extraction. Native helpers come from `PATH`; tool-cache hits skip network/hash validation. | An attacker receives a usable token outside delegated authority, bypasses an independent pin, exploits archive/link traversal, substitutes the cached executable, or poisons shared tool state later executed with higher authority. Same-authority manifest hashes and same-user cache changes do not establish the boundary. |
|
||||
| Interpreter, PATH, virtual environment, and action channels | Checkout-selected interpreters, virtual environments, paths, symlinks, and helpers are delegated project authority. Explicit workflow choices must bind; the action also changes later-step paths/environment, emits state/outputs, invokes native helpers, and consumes cache/runner state. | Independent cache, runner, or remote content substitutes an executable; an explicit workflow choice is bypassed; or action channels cross an authority boundary. Same-checkout interpreter, path, and helper effects are not findings. |
|
||||
| GitHub uv/Python caches and post action | Cache keys should partition platform, interpreter, dependency, and policy state and restore without unsafe fallback. Determine cache defaults, visibility, and the exact hit/miss path from the selected ref and GitHub policy; an exact hit may suppress post save/prune. Post processing re-reads inputs/config/environment and may save re-resolved uv or Python paths. | A lower producer supplies executable content to a higher consumer; a higher producer exposes private data to a lower cache reader; or a later successful step retargets a cache miss toward sensitive files, destructive pruning, or cross-job persistence. Existing equal-authority code with the same secrets often gains no new confidentiality. |
|
||||
| CI, updater, dynamic automation, and release workflows | PR workflows intentionally execute contributor code. Verify effective permissions, fork behavior, credential persistence, mutable tooling, security-upload authority, and whether checks are required. Updaters convert remote data into source under write authority. Distinguish ruleset-required deployment from human review present only in a workflow DAG. | Unreviewed code gains write/secret/OIDC/artifact authority; remote metadata becomes executable generated source; a dynamic workflow has unexpected authority; or an actor satisfies a deployment/tag rule without the intended review and publishes a malicious ref. |
|
||||
| Availability and logging | Manifests, version enumeration, archives, globs, hashing, caches, and remote strings can consume resources or influence logs. Verify size/count/expansion bounds, timeouts, retries, top-level error handling, and that parsing never executes data. | Independently controlled input causes reliable material workflow cost, disk/memory exhaustion, or meaningful log/output manipulation. A bounded one-job failure or operator-selected broad input is usually Low or correctness. |
|
||||
| Lower-priority classes | Shell injection is constrained where child execution uses argv, but workflow shell blocks still require quoting review. Prototype pollution requires a dangerous merge/sink. Secret-shaped strings require proof of a genuine usable secret. Documentation drift, range surprises, malformed trusted config, and test-only code normally lack a security boundary. | Report only when a concrete lower-authority value reaches an execution, credential, persistent-state, publication, or material-availability sink. |
|
||||
|
||||
## Severity Calibration (Critical, High, Medium, Low)
|
||||
|
||||
Severity follows the complete attack graph and incremental capability, not the presence of words such as token, checksum, cache, manifest, archive, Python, PATH, release, or OIDC.
|
||||
|
||||
| Severity | Threshold | Representative examples |
|
||||
|---|---|---|
|
||||
| **Critical** | A low-prerequisite remote/lower-authority attacker compromises default distribution or installation across many consumers, publishes trusted malicious action artifacts, or gains broad credentials/runner control under safe defaults without first compromising a declared trust root. | Bypass an effective hash/origin control to distribute an automatically executed malicious binary at scale; reach publication authority to ship malicious bundles or move trusted refs without required approval; exploit default-accepted archive content for host overwrite or cross-job execution across hosted runners. |
|
||||
| **High** | A demonstrated lower-authority input crosses an execution, confidentiality, integrity, or persistence boundary in a privileged job and gains substantial capability. | Independent shared-state interpreter substitution in a write/OIDC release job; shared cache poisoning later executed with secrets; high-value cache disclosure to an untrusted ref; usable write-token disclosure; independent-pin bypass; archive/cache escape into sensitive state. |
|
||||
| **Medium** | A real but constrained crossing causes limited credential/filesystem impact, reliable remote denial of service, scoped persistence, or premature execution in a realistic uncommon configuration. | Limited executable substitution from independent cache/runner state in a read-only job; same-repository cache confusion or disclosure; reliable hosted-runner exhaustion; disclosure of a usable read-only private token; output manipulation without publication or high-value credentials. |
|
||||
| **Low** | A genuine weak boundary causes narrow disclosure, log/annotation spoofing, defense-in-depth weakness, exotic cache aliasing without a privileged consumer, or limited waste. | Confusing logs with no execution effect; bounded job failure; limited overwrite of nonexecuted cache data; disclosure of a path/URL without private data or follow-on capability. |
|
||||
|
||||
Trust-root compromise may have Critical impact but is not a repository Critical without a lower-authority path into that root or an independent control that should have survived. High requires exact trigger, refs, effective authority, sink, and committed runtime; it cannot rely only on a trusted operator choosing malicious inputs, same-user state changes, or code already intentionally executed with equal authority. A separate privileged consumer, broad secret, persistent trusted state, publication path, or cross-repository boundary can raise Medium to High.
|
||||
|
||||
Normally non-reportable without additional evidence: expected mutability of ranges, `latest`, official/custom sources, or unprotected refs; documented project version selection; checkout-selected interpreters, paths, virtual environments, symlinks, and helpers; deliberate operator selection of manifests, proxies, checksums, or paths; same-principal cache/path changes; requested `uv` or dependency execution; trusted-runner `PATH` lookup; test/developer-only code without a shipped or privileged-workflow path; behavior fixed in the scanned ref; and correctness/compatibility/documentation issues without incremental confidentiality, integrity, persistence, or availability impact.
|
||||
|
|
@ -1,5 +1,257 @@
|
|||
// AUTOGENERATED_DO_NOT_EDIT
|
||||
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
|
||||
"aarch64-apple-darwin-0.11.25":
|
||||
"5fc334bb25d19806262efd1f6e7d380155c7e817d89bf426df4ba7ae873c9471",
|
||||
"aarch64-pc-windows-msvc-0.11.25":
|
||||
"40d65c29c4d97db6a0993df665d3727700bb799b3618992ce9a4dc533c6d1a31",
|
||||
"aarch64-unknown-linux-gnu-0.11.25":
|
||||
"e0e9d73f74e06a7dcd53910d5962146ab48f0af9c92cc8df33a37baa0121014d",
|
||||
"aarch64-unknown-linux-musl-0.11.25":
|
||||
"3d9c9a95f1868ff20ac880712f3a337d710ea4b65f135184b7a35635d1acbf84",
|
||||
"arm-unknown-linux-musleabihf-0.11.25":
|
||||
"50ef6368eebaa9f31d8e8685a91689666c7bae86a1bd9a72b7a505f752084ef9",
|
||||
"armv7-unknown-linux-gnueabihf-0.11.25":
|
||||
"eb60b2931d2461022e1675a7f6c08078b1e47150edb2f7728fe117563a5ebc99",
|
||||
"armv7-unknown-linux-musleabihf-0.11.25":
|
||||
"50f6f10ca38e4628998c17de24c2780f429d9b354db98b1832c130b7394e8ec4",
|
||||
"i686-pc-windows-msvc-0.11.25":
|
||||
"91a87e8a7ea2d5e9451b9bd8b1e9fa490542311ac43e80a9115abbd231c417fb",
|
||||
"i686-unknown-linux-gnu-0.11.25":
|
||||
"1b0f2ceee8dbe718eb1e14d7eccf67534d2f72698f4f85e70cf8a5055412b5d3",
|
||||
"i686-unknown-linux-musl-0.11.25":
|
||||
"e650be31af3fd31f5e2236a47daab0899070a66a732026d140461f1614fbe786",
|
||||
"powerpc64le-unknown-linux-gnu-0.11.25":
|
||||
"fbf67c8beccc718b9de478d7e74d605fe9c2e259c4398f95c9df7680da710af1",
|
||||
"riscv64gc-unknown-linux-gnu-0.11.25":
|
||||
"29e74713e89242c6bf0971b28e904836298a04fb7e0d83262c7bd5aff695ae33",
|
||||
"riscv64gc-unknown-linux-musl-0.11.25":
|
||||
"90c5a720dd9ddf32de8511c79fc83bc69e38795a94b5b49fcb2d010f96b1374d",
|
||||
"s390x-unknown-linux-gnu-0.11.25":
|
||||
"3d508ed6e66898ce80aa668cb7d6ec4ddb4d30440fcfbd409365d3d0e4afa75c",
|
||||
"x86_64-apple-darwin-0.11.25":
|
||||
"65ff85b33212f75d34d7c0f0724aba9a742c74f62559f67dc0d6c543dc2fc52f",
|
||||
"x86_64-pc-windows-msvc-0.11.25":
|
||||
"15bfd1423b7eaa7aae949922d4712ebaac2bb44a81af64ab59bbe007090cb0d0",
|
||||
"x86_64-unknown-linux-gnu-0.11.25":
|
||||
"1db18b5e76fa645a7f3865773139bdec8e2d46adbdbb35e7410b34fa8015ccd2",
|
||||
"x86_64-unknown-linux-musl-0.11.25":
|
||||
"7195cfcc1785d0c559d4682ad9109f26664b8db4d828d42d66078ef454061891",
|
||||
"aarch64-apple-darwin-0.11.24":
|
||||
"7578c6087c5cd76981732b1f5d126248101faebdf81016ba780a65ce03653cdf",
|
||||
"aarch64-pc-windows-msvc-0.11.24":
|
||||
"51bcf8051dcc2075fba9136ece0f229205a6ef813e68e5709c6eeb18802afed5",
|
||||
"aarch64-unknown-linux-gnu-0.11.24":
|
||||
"e22c66d36a0098b17cff80a8647e0b8c58202af899d4e9eb820fc7ad126435a1",
|
||||
"aarch64-unknown-linux-musl-0.11.24":
|
||||
"222fcd9878ed6f5a8565d121d1a10e1f958e3c7b42e4ec5cbc6927b2be20cc1a",
|
||||
"arm-unknown-linux-musleabihf-0.11.24":
|
||||
"92fa5e688c5dac8cf459421ad65f6d21ea1c530dd2225981bcebfd5d538aa4bc",
|
||||
"armv7-unknown-linux-gnueabihf-0.11.24":
|
||||
"b9ec27086af022b2962428beeb5d391903d663f3bd76fed3d8a39def1cc7fe19",
|
||||
"armv7-unknown-linux-musleabihf-0.11.24":
|
||||
"747560329d0765623f261969fffb8acd35403c280d1baec36bed46d335731aca",
|
||||
"i686-pc-windows-msvc-0.11.24":
|
||||
"1df231a0da08d691c32047cce8a4aa0aba82d2a74f02999f2e4847a5e8e7e2df",
|
||||
"i686-unknown-linux-gnu-0.11.24":
|
||||
"e7444c509c01efb293d2e0c78d306ec2624aa9d1d63c7fed095e0a3e29800bb9",
|
||||
"i686-unknown-linux-musl-0.11.24":
|
||||
"ec692d59d86071fd07d2e7cf8cef8473941019238dd00c0481e6db59b79b4665",
|
||||
"powerpc64le-unknown-linux-gnu-0.11.24":
|
||||
"29db3e6f7422f027d14f5718fe3efa4b6b475ada234d7b10b6002ba1367cdc08",
|
||||
"riscv64gc-unknown-linux-gnu-0.11.24":
|
||||
"3e975a156d5972359c6b12ce3235a5cf68f838a0be3605c5800996556b902674",
|
||||
"riscv64gc-unknown-linux-musl-0.11.24":
|
||||
"4d39d5eec286daab074b5b2ed142cd9d9042306a2996f708f5a86dcd19a35eaf",
|
||||
"s390x-unknown-linux-gnu-0.11.24":
|
||||
"a0baa1dc34efcb896c8e82e0844b10e308cf48fb1f5060cef6d12ea5a801c3f7",
|
||||
"x86_64-apple-darwin-0.11.24":
|
||||
"8e026ec796a2760c33c832298b0910bf07fb369d00cc075761c321923ac37522",
|
||||
"x86_64-pc-windows-msvc-0.11.24":
|
||||
"af9573a2e36f7020b18ec5fdde20117aae74bbad3f4acb3dc3fc03319f1aa083",
|
||||
"x86_64-unknown-linux-gnu-0.11.24":
|
||||
"5ce1ad074a78f96c5c8122088bb85a12eb282195bc1453151a48762e4fc31fed",
|
||||
"x86_64-unknown-linux-musl-0.11.24":
|
||||
"2f9eaa976cf8ad8574623dde6916fb87ec047524fe65b99dc11e44e33eae4bfb",
|
||||
"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",
|
||||
"aarch64-unknown-linux-musl-0.11.20":
|
||||
"79931fc8e82dddff6eb9cab32aa8492e35bc22767322dd68cad36012411ae6d5",
|
||||
"arm-unknown-linux-musleabihf-0.11.20":
|
||||
"4113bf774c0626d82374fcb4de1dbe117f38e68cfd4cf7360e44259ca62a6d48",
|
||||
"armv7-unknown-linux-gnueabihf-0.11.20":
|
||||
"b8004b8be37d13ae8c05e8d55028d9ea3ea387fa61a96eeda7812e1a413fd9f8",
|
||||
"armv7-unknown-linux-musleabihf-0.11.20":
|
||||
"1a6ab0ebac84282838ec96dadb245b1d4404ea8a40e375822cc5a2f1f3997d72",
|
||||
"i686-pc-windows-msvc-0.11.20":
|
||||
"00c3f694414bf3821922dc9766cec373bcceb16ae3d98ff1fd0774b97bbc55fb",
|
||||
"i686-unknown-linux-gnu-0.11.20":
|
||||
"08d3e199788ca3ce331da13cc4df15449bd44844a1262597bacea15bb1e42a0d",
|
||||
"i686-unknown-linux-musl-0.11.20":
|
||||
"0556b545dcba5402c6120575e66e046f3165df4be6baed6992ba7ebc000054e6",
|
||||
"powerpc64le-unknown-linux-gnu-0.11.20":
|
||||
"555c15dfb8e95e9edb5d4c4f442f9a77fe7f007804da164450cac1eddb41bcde",
|
||||
"riscv64gc-unknown-linux-gnu-0.11.20":
|
||||
"f78a42002f4c7702688493f7513a081939ca3d52b41dcc7b9224bb660f0c4c28",
|
||||
"riscv64gc-unknown-linux-musl-0.11.20":
|
||||
"7433aed57cf15cf0657d0ce7c655f95eb00e54e49a0dc408d0170467260843d9",
|
||||
"s390x-unknown-linux-gnu-0.11.20":
|
||||
"208af0d9d0099f86ed093b68b05703451b884f6db351f9555fda905d3538e53d",
|
||||
"x86_64-apple-darwin-0.11.20":
|
||||
"bef01a86faab997f6022b45cfa29bfc5b090f2f72cd4a91d2ecefe641efdabe7",
|
||||
"x86_64-pc-windows-msvc-0.11.20":
|
||||
"4c281f1b6b9ccb14d9567ebde9a218a7cabfb35e5ffe8c1d4ef5e2821a655474",
|
||||
"x86_64-unknown-linux-gnu-0.11.20":
|
||||
"5de211d9278af365497d387e25316907b3b4a9f25b4476dd6dbf238d6f85cff3",
|
||||
"x86_64-unknown-linux-musl-0.11.20":
|
||||
"a7545a1360d29baa696753af2f41849047b332bcb90e8ea75ad0568e7f865e35",
|
||||
"aarch64-apple-darwin-0.11.19":
|
||||
"d8f59c38e8c4168ee468d423cd63184be12fa6995a4283d41ee1a14d003c9453",
|
||||
"aarch64-pc-windows-msvc-0.11.19":
|
||||
"5592a990a9d9901fd0d23992d872f2ec3ca91b7bbd3d5f0bb5e6f42b851493d8",
|
||||
"aarch64-unknown-linux-gnu-0.11.19":
|
||||
"83b13ab184a45b7d9a3b0e4b10eaebd50ad41e66cb16dcce8e60aa7be13ae399",
|
||||
"aarch64-unknown-linux-musl-0.11.19":
|
||||
"767629b64cdf078c32e42819db28d5ca868b8dc7e3a879967fadc3e4f7f66be3",
|
||||
"arm-unknown-linux-musleabihf-0.11.19":
|
||||
"638bb5aac6419e062149b4600c0030e2203dfbb8bf6b0db740755bb19f458abf",
|
||||
"armv7-unknown-linux-gnueabihf-0.11.19":
|
||||
"56c307d18acadb1bee2b76bde39cedcf0d29f93102c52f39f8c0c8a42dffe96e",
|
||||
"armv7-unknown-linux-musleabihf-0.11.19":
|
||||
"d807c33e89c27430a68b7be52a8a0d39e08c91dba0fa295172c6ff2ce2d07a27",
|
||||
"i686-pc-windows-msvc-0.11.19":
|
||||
"e701a69f0ab192fde8ea3f4cfdedfa6cade0c92cea2e350613b6528e966b50c7",
|
||||
"i686-unknown-linux-gnu-0.11.19":
|
||||
"d0ef2e69c44a2763161d5b5f40b722fe81e0d16bed217cbc526fb5a3640802b3",
|
||||
"i686-unknown-linux-musl-0.11.19":
|
||||
"f58e41864cb91fbd2306a7b46718fdd0c1029169fe03347719771a1c68a527e6",
|
||||
"powerpc64le-unknown-linux-gnu-0.11.19":
|
||||
"b6dcd94b5c456d11787d1e6d01b5f9a34b456e22e2dde9bbae3531dc7676c0d8",
|
||||
"riscv64gc-unknown-linux-gnu-0.11.19":
|
||||
"4b9ca6bd2ed1e4c2658e5f85cf8a208c192490d9d24dbf2c36d61ea10a389778",
|
||||
"riscv64gc-unknown-linux-musl-0.11.19":
|
||||
"184232b4e0de4d6a674d57b1d6d8c39a3c5a5dbc27f95ed972c46974d21b0115",
|
||||
"s390x-unknown-linux-gnu-0.11.19":
|
||||
"c4535a5f9f27a94df384ea8140b78c3e7c083d4130cd341fd826b5ab343979fb",
|
||||
"x86_64-apple-darwin-0.11.19":
|
||||
"1585f415cade9f061e7f00fe5b00030a79ccfac60c650242ce639ba946138d40",
|
||||
"x86_64-pc-windows-msvc-0.11.19":
|
||||
"1665fc8e37b5d70a134820d6d7891747471a2ac8bc940ee7af0b69fd03b28d61",
|
||||
"x86_64-unknown-linux-gnu-0.11.19":
|
||||
"7035608168e106375b36d0c818d537a889c51a8625fe7f8f7cad5e62b947c368",
|
||||
"x86_64-unknown-linux-musl-0.11.19":
|
||||
"c4c0d0a383413261af5f0f0743e1292f4aafbe907987ed83bd0ac66f0a3d7e20",
|
||||
"aarch64-apple-darwin-0.11.18":
|
||||
"1a7adf8dadae3b55853115d13a8bf564d219597ad13824b93b213706933863e5",
|
||||
"aarch64-pc-windows-msvc-0.11.18":
|
||||
|
|
|
|||
|
|
@ -109,8 +109,9 @@ function getLinuxOSNameVersion(): string {
|
|||
const id = parseOsReleaseValue(content, "ID");
|
||||
const versionId = parseOsReleaseValue(content, "VERSION_ID");
|
||||
// Fallback for rolling releases (debian:unstable/testing, arch, etc.)
|
||||
// that don't have VERSION_ID but have VERSION_CODENAME
|
||||
// that don't have VERSION_ID but have VERSION_CODENAME or BUILD_ID
|
||||
const versionCodename = parseOsReleaseValue(content, "VERSION_CODENAME");
|
||||
const buildId = parseOsReleaseValue(content, "BUILD_ID");
|
||||
|
||||
if (id && versionId) {
|
||||
return `${id}-${versionId}`;
|
||||
|
|
@ -118,6 +119,9 @@ function getLinuxOSNameVersion(): string {
|
|||
if (id && versionCodename) {
|
||||
return `${id}-${versionCodename}`;
|
||||
}
|
||||
if (id && buildId) {
|
||||
return `${id}-${buildId}`;
|
||||
}
|
||||
} catch {
|
||||
// Try next 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) => {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ export type VersionFileFormat =
|
|||
| ".tool-versions"
|
||||
| "pyproject.toml"
|
||||
| "requirements"
|
||||
| "uv.lock"
|
||||
| "uv.toml";
|
||||
|
||||
export interface ParsedVersionFile {
|
||||
|
|
|
|||
24
src/version/uv-lock-file.ts
Normal file
24
src/version/uv-lock-file.ts
Normal 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue