Support toml spec 1.0.0 (#245)

iarna/toml is unmaintained.
Replaced by smol-toml which is maintained and has the same api

Fixes: #242
This commit is contained in:
Kevin Stillhammer 2025-01-16 16:38:18 +01:00 committed by GitHub
parent 4e3dbecc19
commit b5f58b2abc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 1350 additions and 2777 deletions

View File

@ -6,5 +6,14 @@ readme = "README.md"
requires-python = ">=3.11" requires-python = ">=3.11"
dependencies = [] dependencies = []
[dependency-groups]
dev = [
"reuse==5.0.2",
{include-group = "lint"},
]
lint = [
"flake8==4.0.1",
]
[tool.uv] [tool.uv]
required-version = "==0.5.14" required-version = "==0.5.14"

101
dist/save-cache/index.js generated vendored
View File

@ -91444,15 +91444,6 @@ var __importStar = (this && this.__importStar) || (function () {
return result; return result;
}; };
})(); })();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.STATE_CACHE_MATCHED_KEY = exports.STATE_CACHE_KEY = void 0; exports.STATE_CACHE_MATCHED_KEY = exports.STATE_CACHE_KEY = void 0;
exports.restoreCache = restoreCache; exports.restoreCache = restoreCache;
@ -91465,13 +91456,12 @@ const exec = __importStar(__nccwpck_require__(5236));
exports.STATE_CACHE_KEY = "cache-key"; exports.STATE_CACHE_KEY = "cache-key";
exports.STATE_CACHE_MATCHED_KEY = "cache-matched-key"; exports.STATE_CACHE_MATCHED_KEY = "cache-matched-key";
const CACHE_VERSION = "1"; const CACHE_VERSION = "1";
function restoreCache() { async function restoreCache() {
return __awaiter(this, void 0, void 0, function* () { const cacheKey = await computeKeys();
const cacheKey = yield computeKeys();
let matchedKey; let matchedKey;
core.info(`Trying to restore uv cache from GitHub Actions cache with key: ${cacheKey}`); core.info(`Trying to restore uv cache from GitHub Actions cache with key: ${cacheKey}`);
try { try {
matchedKey = yield cache.restoreCache([inputs_1.cacheLocalPath], cacheKey); matchedKey = await cache.restoreCache([inputs_1.cacheLocalPath], cacheKey);
} }
catch (err) { catch (err) {
const message = err.message; const message = err.message;
@ -91481,14 +91471,12 @@ function restoreCache() {
} }
core.saveState(exports.STATE_CACHE_KEY, cacheKey); core.saveState(exports.STATE_CACHE_KEY, cacheKey);
handleMatchResult(matchedKey, cacheKey); handleMatchResult(matchedKey, cacheKey);
});
} }
function computeKeys() { async function computeKeys() {
return __awaiter(this, void 0, void 0, function* () {
let cacheDependencyPathHash = "-"; let cacheDependencyPathHash = "-";
if (inputs_1.cacheDependencyGlob !== "") { if (inputs_1.cacheDependencyGlob !== "") {
core.info(`Searching files using cache dependency glob: ${inputs_1.cacheDependencyGlob.split("\n").join(",")}`); core.info(`Searching files using cache dependency glob: ${inputs_1.cacheDependencyGlob.split("\n").join(",")}`);
cacheDependencyPathHash += yield (0, hash_files_1.hashFiles)(inputs_1.cacheDependencyGlob, true); cacheDependencyPathHash += await (0, hash_files_1.hashFiles)(inputs_1.cacheDependencyGlob, true);
if (cacheDependencyPathHash === "-") { if (cacheDependencyPathHash === "-") {
core.warning(`No file matched to [${inputs_1.cacheDependencyGlob.split("\n").join(",")}]. The cache will never get invalidated. Make sure you have checked out the target repository and configured the cache-dependency-glob input correctly.`); core.warning(`No file matched to [${inputs_1.cacheDependencyGlob.split("\n").join(",")}]. The cache will never get invalidated. Make sure you have checked out the target repository and configured the cache-dependency-glob input correctly.`);
} }
@ -91497,12 +91485,10 @@ function computeKeys() {
cacheDependencyPathHash = "-no-dependency-glob"; cacheDependencyPathHash = "-no-dependency-glob";
} }
const suffix = inputs_1.cacheSuffix ? `-${inputs_1.cacheSuffix}` : ""; const suffix = inputs_1.cacheSuffix ? `-${inputs_1.cacheSuffix}` : "";
const pythonVersion = yield getPythonVersion(); const pythonVersion = await getPythonVersion();
return `setup-uv-${CACHE_VERSION}-${(0, platforms_1.getArch)()}-${(0, platforms_1.getPlatform)()}-${pythonVersion}${cacheDependencyPathHash}${suffix}`; return `setup-uv-${CACHE_VERSION}-${(0, platforms_1.getArch)()}-${(0, platforms_1.getPlatform)()}-${pythonVersion}${cacheDependencyPathHash}${suffix}`;
});
} }
function getPythonVersion() { async function getPythonVersion() {
return __awaiter(this, void 0, void 0, function* () {
if (inputs_1.pythonVersion !== "") { if (inputs_1.pythonVersion !== "") {
return inputs_1.pythonVersion; return inputs_1.pythonVersion;
} }
@ -91517,10 +91503,10 @@ function getPythonVersion() {
}; };
try { try {
const execArgs = ["python", "find"]; const execArgs = ["python", "find"];
yield exec.exec("uv", execArgs, options); await exec.exec("uv", execArgs, options);
const pythonPath = output.trim(); const pythonPath = output.trim();
output = ""; output = "";
yield exec.exec(pythonPath, ["--version"], options); await exec.exec(pythonPath, ["--version"], options);
// output is like "Python 3.8.10" // output is like "Python 3.8.10"
return output.split(" ")[1].trim(); return output.split(" ")[1].trim();
} }
@ -91529,7 +91515,6 @@ function getPythonVersion() {
core.debug(`Failed to get python version from uv. Error: ${err.message}`); core.debug(`Failed to get python version from uv. Error: ${err.message}`);
return "unknown"; return "unknown";
} }
});
} }
function handleMatchResult(matchedKey, primaryKey) { function handleMatchResult(matchedKey, primaryKey) {
if (!matchedKey) { if (!matchedKey) {
@ -91583,22 +91568,6 @@ var __importStar = (this && this.__importStar) || (function () {
return result; return result;
}; };
})(); })();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __asyncValues = (this && this.__asyncValues) || function (o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
};
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.hashFiles = hashFiles; exports.hashFiles = hashFiles;
const crypto = __importStar(__nccwpck_require__(7598)); const crypto = __importStar(__nccwpck_require__(7598));
@ -91615,19 +91584,13 @@ const glob_1 = __nccwpck_require__(7206);
* @param pattern The glob pattern to match files. * @param pattern The glob pattern to match files.
* @param verbose Whether to log the files being hashed. * @param verbose Whether to log the files being hashed.
*/ */
function hashFiles(pattern_1) { async function hashFiles(pattern, verbose = false) {
return __awaiter(this, arguments, void 0, function* (pattern, verbose = false) { const globber = await (0, glob_1.create)(pattern);
var _a, e_1, _b, _c;
const globber = yield (0, glob_1.create)(pattern);
let hasMatch = false; let hasMatch = false;
const writeDelegate = verbose ? core.info : core.debug; const writeDelegate = verbose ? core.info : core.debug;
const result = crypto.createHash("sha256"); const result = crypto.createHash("sha256");
let count = 0; let count = 0;
try { for await (const file of globber.globGenerator()) {
for (var _d = true, _e = __asyncValues(globber.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
_c = _f.value;
_d = false;
const file = _c;
writeDelegate(file); writeDelegate(file);
if (fs.statSync(file).isDirectory()) { if (fs.statSync(file).isDirectory()) {
writeDelegate(`Skip directory '${file}'.`); writeDelegate(`Skip directory '${file}'.`);
@ -91635,21 +91598,13 @@ function hashFiles(pattern_1) {
} }
const hash = crypto.createHash("sha256"); const hash = crypto.createHash("sha256");
const pipeline = util.promisify(stream.pipeline); const pipeline = util.promisify(stream.pipeline);
yield pipeline(fs.createReadStream(file), hash); await pipeline(fs.createReadStream(file), hash);
result.write(hash.digest()); result.write(hash.digest());
count++; count++;
if (!hasMatch) { if (!hasMatch) {
hasMatch = true; hasMatch = true;
} }
} }
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
}
finally { if (e_1) throw e_1.error; }
}
result.end(); result.end();
if (hasMatch) { if (hasMatch) {
writeDelegate(`Found ${count} files to hash.`); writeDelegate(`Found ${count} files to hash.`);
@ -91657,7 +91612,6 @@ function hashFiles(pattern_1) {
} }
writeDelegate("No matches found for glob"); writeDelegate("No matches found for glob");
return ""; return "";
});
} }
@ -91701,15 +91655,6 @@ var __importStar = (this && this.__importStar) || (function () {
return result; return result;
}; };
})(); })();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.run = run; exports.run = run;
const cache = __importStar(__nccwpck_require__(5116)); const cache = __importStar(__nccwpck_require__(5116));
@ -91718,11 +91663,10 @@ const exec = __importStar(__nccwpck_require__(5236));
const fs = __importStar(__nccwpck_require__(3024)); const fs = __importStar(__nccwpck_require__(3024));
const restore_cache_1 = __nccwpck_require__(5391); const restore_cache_1 = __nccwpck_require__(5391);
const inputs_1 = __nccwpck_require__(9612); const inputs_1 = __nccwpck_require__(9612);
function run() { async function run() {
return __awaiter(this, void 0, void 0, function* () {
try { try {
if (inputs_1.enableCache) { if (inputs_1.enableCache) {
yield saveCache(); await saveCache();
// node will stay alive if any promises are not resolved, // node will stay alive if any promises are not resolved,
// which is a possibility if HTTP requests are dangling // which is a possibility if HTTP requests are dangling
// due to retries or timeouts. We know that if we got here // due to retries or timeouts. We know that if we got here
@ -91735,10 +91679,8 @@ function run() {
const err = error; const err = error;
core.setFailed(err.message); core.setFailed(err.message);
} }
});
} }
function saveCache() { async function saveCache() {
return __awaiter(this, void 0, void 0, function* () {
const cacheKey = core.getState(restore_cache_1.STATE_CACHE_KEY); const cacheKey = core.getState(restore_cache_1.STATE_CACHE_KEY);
const matchedKey = core.getState(restore_cache_1.STATE_CACHE_MATCHED_KEY); const matchedKey = core.getState(restore_cache_1.STATE_CACHE_MATCHED_KEY);
if (!cacheKey) { if (!cacheKey) {
@ -91750,14 +91692,14 @@ function saveCache() {
return; return;
} }
if (inputs_1.pruneCache) { if (inputs_1.pruneCache) {
yield pruneCache(); await pruneCache();
} }
core.info(`Saving cache path: ${inputs_1.cacheLocalPath}`); core.info(`Saving cache path: ${inputs_1.cacheLocalPath}`);
if (!fs.existsSync(inputs_1.cacheLocalPath) && !inputs_1.ignoreNothingToCache) { if (!fs.existsSync(inputs_1.cacheLocalPath) && !inputs_1.ignoreNothingToCache) {
throw new Error(`Cache path ${inputs_1.cacheLocalPath} does not exist on disk. This likely indicates that there are no dependencies to cache. Consider disabling the cache input if it is not needed.`); throw new Error(`Cache path ${inputs_1.cacheLocalPath} does not exist on disk. This likely indicates that there are no dependencies to cache. Consider disabling the cache input if it is not needed.`);
} }
try { try {
yield cache.saveCache([inputs_1.cacheLocalPath], cacheKey); await cache.saveCache([inputs_1.cacheLocalPath], cacheKey);
core.info(`cache saved with the key: ${cacheKey}`); core.info(`cache saved with the key: ${cacheKey}`);
} }
catch (e) { catch (e) {
@ -91770,17 +91712,14 @@ function saveCache() {
throw e; throw e;
} }
} }
});
} }
function pruneCache() { async function pruneCache() {
return __awaiter(this, void 0, void 0, function* () {
const options = { const options = {
silent: !core.isDebug(), silent: !core.isDebug(),
}; };
const execArgs = ["cache", "prune", "--ci"]; const execArgs = ["cache", "prune", "--ci"];
core.info("Pruning cache..."); core.info("Pruning cache...");
yield exec.exec("uv", execArgs, options); await exec.exec("uv", execArgs, options);
});
} }
run(); run();

3267
dist/setup/index.js generated vendored

File diff suppressed because it is too large Load Diff

56
dist/update-known-checksums/index.js generated vendored
View File

@ -34751,39 +34751,28 @@ var __importStar = (this && this.__importStar) || (function () {
return result; return result;
}; };
})(); })();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.updateChecksums = updateChecksums; exports.updateChecksums = updateChecksums;
const node_fs_1 = __nccwpck_require__(3024); const node_fs_1 = __nccwpck_require__(3024);
const tc = __importStar(__nccwpck_require__(3472)); const tc = __importStar(__nccwpck_require__(3472));
const known_checksums_1 = __nccwpck_require__(2764); const known_checksums_1 = __nccwpck_require__(2764);
function updateChecksums(filePath, downloadUrls) { async function updateChecksums(filePath, downloadUrls) {
return __awaiter(this, void 0, void 0, function* () { await node_fs_1.promises.rm(filePath);
yield node_fs_1.promises.rm(filePath); await node_fs_1.promises.appendFile(filePath, "// AUTOGENERATED_DO_NOT_EDIT\nexport const KNOWN_CHECKSUMS: { [key: string]: string } = {\n");
yield node_fs_1.promises.appendFile(filePath, "// AUTOGENERATED_DO_NOT_EDIT\nexport const KNOWN_CHECKSUMS: { [key: string]: string } = {\n");
let firstLine = true; let firstLine = true;
for (const downloadUrl of downloadUrls) { for (const downloadUrl of downloadUrls) {
const key = getKey(downloadUrl); const key = getKey(downloadUrl);
if (key === undefined) { if (key === undefined) {
continue; continue;
} }
const checksum = yield getOrDownloadChecksum(key, downloadUrl); const checksum = await getOrDownloadChecksum(key, downloadUrl);
if (!firstLine) { if (!firstLine) {
yield node_fs_1.promises.appendFile(filePath, ",\n"); await node_fs_1.promises.appendFile(filePath, ",\n");
} }
yield node_fs_1.promises.appendFile(filePath, ` "${key}":\n "${checksum}"`); await node_fs_1.promises.appendFile(filePath, ` "${key}":\n "${checksum}"`);
firstLine = false; firstLine = false;
} }
yield node_fs_1.promises.appendFile(filePath, ",\n};\n"); await node_fs_1.promises.appendFile(filePath, ",\n};\n");
});
} }
function getKey(downloadUrl) { function getKey(downloadUrl) {
// https://github.com/astral-sh/uv/releases/download/0.3.2/uv-aarch64-apple-darwin.tar.gz.sha256 // https://github.com/astral-sh/uv/releases/download/0.3.2/uv-aarch64-apple-darwin.tar.gz.sha256
@ -34796,25 +34785,21 @@ function getKey(downloadUrl) {
const version = parts[parts.length - 2]; const version = parts[parts.length - 2];
return `${name}-${version}`; return `${name}-${version}`;
} }
function getOrDownloadChecksum(key, downloadUrl) { async function getOrDownloadChecksum(key, downloadUrl) {
return __awaiter(this, void 0, void 0, function* () {
let checksum = ""; let checksum = "";
if (key in known_checksums_1.KNOWN_CHECKSUMS) { if (key in known_checksums_1.KNOWN_CHECKSUMS) {
checksum = known_checksums_1.KNOWN_CHECKSUMS[key]; checksum = known_checksums_1.KNOWN_CHECKSUMS[key];
} }
else { else {
const content = yield downloadAssetContent(downloadUrl); const content = await downloadAssetContent(downloadUrl);
checksum = content.split(" ")[0].trim(); checksum = content.split(" ")[0].trim();
} }
return checksum; return checksum;
});
} }
function downloadAssetContent(downloadUrl) { async function downloadAssetContent(downloadUrl) {
return __awaiter(this, void 0, void 0, function* () { const downloadPath = await tc.downloadTool(downloadUrl);
const downloadPath = yield tc.downloadTool(downloadUrl); const content = await node_fs_1.promises.readFile(downloadPath, "utf8");
const content = yield node_fs_1.promises.readFile(downloadPath, "utf8");
return content; return content;
});
} }
@ -34858,39 +34843,28 @@ var __importStar = (this && this.__importStar) || (function () {
return result; return result;
}; };
})(); })();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true })); Object.defineProperty(exports, "__esModule", ({ value: true }));
const github = __importStar(__nccwpck_require__(3228)); const github = __importStar(__nccwpck_require__(3228));
const core = __importStar(__nccwpck_require__(7484)); const core = __importStar(__nccwpck_require__(7484));
const constants_1 = __nccwpck_require__(6156); const constants_1 = __nccwpck_require__(6156);
const semver = __importStar(__nccwpck_require__(9318)); const semver = __importStar(__nccwpck_require__(9318));
const update_known_checksums_1 = __nccwpck_require__(6182); const update_known_checksums_1 = __nccwpck_require__(6182);
function run() { async function run() {
return __awaiter(this, void 0, void 0, function* () {
const checksumFilePath = process.argv.slice(2)[0]; const checksumFilePath = process.argv.slice(2)[0];
const github_token = process.argv.slice(2)[1]; const github_token = process.argv.slice(2)[1];
const octokit = github.getOctokit(github_token, { baseUrl: constants_1.GITHUB_COM_API }); const octokit = github.getOctokit(github_token, { baseUrl: constants_1.GITHUB_COM_API });
const response = yield octokit.paginate(octokit.rest.repos.listReleases, { const response = await octokit.paginate(octokit.rest.repos.listReleases, {
owner: constants_1.OWNER, owner: constants_1.OWNER,
repo: constants_1.REPO, repo: constants_1.REPO,
}); });
const downloadUrls = response.flatMap((release) => release.assets const downloadUrls = response.flatMap((release) => release.assets
.filter((asset) => asset.name.endsWith(".sha256")) .filter((asset) => asset.name.endsWith(".sha256"))
.map((asset) => asset.browser_download_url)); .map((asset) => asset.browser_download_url));
yield (0, update_known_checksums_1.updateChecksums)(checksumFilePath, downloadUrls); await (0, update_known_checksums_1.updateChecksums)(checksumFilePath, downloadUrls);
const latestVersion = response const latestVersion = response
.map((release) => release.tag_name) .map((release) => release.tag_name)
.sort(semver.rcompare)[0]; .sort(semver.rcompare)[0];
core.setOutput("latest-version", latestVersion); core.setOutput("latest-version", latestVersion);
});
} }
run(); run();

30
package-lock.json generated
View File

@ -16,8 +16,8 @@
"@actions/glob": "^0.5.0", "@actions/glob": "^0.5.0",
"@actions/io": "^1.1.3", "@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.1", "@actions/tool-cache": "^2.0.1",
"@iarna/toml": "^2.2.5", "@octokit/rest": "^21.1.0",
"@octokit/rest": "^21.1.0" "smol-toml": "^1.3.1"
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "1.9.4", "@biomejs/biome": "1.9.4",
@ -1105,11 +1105,6 @@
"node": ">=14" "node": ">=14"
} }
}, },
"node_modules/@iarna/toml": {
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz",
"integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg=="
},
"node_modules/@istanbuljs/load-nyc-config": { "node_modules/@istanbuljs/load-nyc-config": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
@ -4577,6 +4572,17 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/smol-toml": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.3.1.tgz",
"integrity": "sha512-tEYNll18pPKHroYSmLLrksq233j021G0giwW7P3D24jC54pQ5W5BXMsQ/Mvw1OJCmEYDgY+lrzT+3nNUtoNfXQ==",
"engines": {
"node": ">= 18"
},
"funding": {
"url": "https://github.com/sponsors/cyyynthia"
}
},
"node_modules/source-map": { "node_modules/source-map": {
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
@ -5940,11 +5946,6 @@
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz", "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz",
"integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==" "integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA=="
}, },
"@iarna/toml": {
"version": "2.2.5",
"resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.5.tgz",
"integrity": "sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg=="
},
"@istanbuljs/load-nyc-config": { "@istanbuljs/load-nyc-config": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
@ -8607,6 +8608,11 @@
"integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
"dev": true "dev": true
}, },
"smol-toml": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.3.1.tgz",
"integrity": "sha512-tEYNll18pPKHroYSmLLrksq233j021G0giwW7P3D24jC54pQ5W5BXMsQ/Mvw1OJCmEYDgY+lrzT+3nNUtoNfXQ=="
},
"source-map": { "source-map": {
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",

View File

@ -31,7 +31,7 @@
"@actions/io": "^1.1.3", "@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.1", "@actions/tool-cache": "^2.0.1",
"@octokit/rest": "^21.1.0", "@octokit/rest": "^21.1.0",
"@iarna/toml": "^2.2.5" "smol-toml": "^1.3.1"
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "1.9.4", "@biomejs/biome": "1.9.4",

View File

@ -1,6 +1,6 @@
import fs from "node:fs"; import fs from "node:fs";
import * as core from "@actions/core"; import * as core from "@actions/core";
import * as toml from "@iarna/toml"; import * as toml from "smol-toml";
export function getUvVersionFromConfigFile( export function getUvVersionFromConfigFile(
filePath: string, filePath: string,

View File

@ -1,6 +1,6 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */, "target": "ES2022" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
"outDir": "./lib" /* Redirect output structure to the directory. */, "outDir": "./lib" /* Redirect output structure to the directory. */,
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */, "rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,