Downgrade @actions/cache

This commit is contained in:
Michael B. Gale
2026-10-02 17:14:01 +01:00
parent 1f8080af29
commit 6ce88f6aaf
3 changed files with 35 additions and 50 deletions

65
lib/entry-points.js generated
View File

@@ -100013,7 +100013,7 @@ var require_package = __commonJS({
"node_modules/@actions/cache/package.json"(exports2, module2) { "node_modules/@actions/cache/package.json"(exports2, module2) {
module2.exports = { module2.exports = {
name: "@actions/cache", name: "@actions/cache",
version: "5.3.0", version: "5.2.0",
preview: true, preview: true,
description: "Actions cache lib", description: "Actions cache lib",
keywords: [ keywords: [
@@ -100050,22 +100050,22 @@ var require_package = __commonJS({
url: "https://github.com/actions/toolkit/issues" url: "https://github.com/actions/toolkit/issues"
}, },
dependencies: { dependencies: {
"@actions/core": "^2.0.3", "@actions/core": "^2.0.0",
"@actions/exec": "^2.0.0", "@actions/exec": "^2.0.0",
"@actions/glob": "^0.5.1", "@actions/glob": "^0.5.1",
"@protobuf-ts/runtime-rpc": "^2.11.1",
"@actions/http-client": "^3.0.2", "@actions/http-client": "^3.0.2",
"@actions/io": "^2.0.0", "@actions/io": "^2.0.0",
"@azure/abort-controller": "^1.1.0", "@azure/abort-controller": "^1.1.0",
"@azure/core-rest-pipeline": "^1.25.0", "@azure/core-rest-pipeline": "^1.22.0",
"@azure/storage-blob": "^12.34.0", "@azure/storage-blob": "^12.29.1",
"@protobuf-ts/runtime-rpc": "^2.11.1",
semver: "^6.3.1" semver: "^6.3.1"
}, },
devDependencies: { devDependencies: {
"@protobuf-ts/plugin": "^2.11.1", "@types/node": "^24.1.0",
"@types/node": "^24.13.6", "@types/semver": "^6.0.0",
"@types/semver": "^6.2.7", "@protobuf-ts/plugin": "^2.9.4",
typescript: "^5.9.3" typescript: "^5.2.2"
}, },
overrides: { overrides: {
"uri-js": "npm:uri-js-replace@^1.0.1", "uri-js": "npm:uri-js-replace@^1.0.1",
@@ -105592,7 +105592,6 @@ var require_tar = __commonJS({
exports2.listTar = listTar; exports2.listTar = listTar;
exports2.extractTar = extractTar3; exports2.extractTar = extractTar3;
exports2.createTar = createTar; exports2.createTar = createTar;
var core32 = __importStar2(require_core());
var exec_1 = require_exec(); var exec_1 = require_exec();
var io9 = __importStar2(require_io()); var io9 = __importStar2(require_io());
var fs_1 = require("fs"); var fs_1 = require("fs");
@@ -105645,7 +105644,7 @@ var require_tar = __commonJS({
args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path30.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path30.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path30.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path30.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path30.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path30.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename);
break; break;
case "extract": case "extract":
args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path30.sep}`, "g"), "/"), "-P", "-C", BSD_TAR_ZSTD ? quoteAbsolutePath(workingDirectory) : workingDirectory.replace(new RegExp(`\\${path30.sep}`, "g"), "/")); args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path30.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path30.sep}`, "g"), "/"));
break; break;
case "list": case "list":
args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path30.sep}`, "g"), "/"), "-P"); args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path30.sep}`, "g"), "/"), "-P");
@@ -105676,19 +105675,16 @@ var require_tar = __commonJS({
} else { } else {
args = [[...tarArgs].join(" "), [...compressionArgs].join(" ")]; args = [[...tarArgs].join(" "), [...compressionArgs].join(" ")];
} }
return { if (BSD_TAR_ZSTD) {
commands: BSD_TAR_ZSTD ? args : [args.join(" ")], return args;
requiresTempDirectory: BSD_TAR_ZSTD && type !== "create" }
}; return [args.join(" ")];
}); });
} }
function getWorkingDirectory() { function getWorkingDirectory() {
var _a6; var _a6;
return (_a6 = process.env["GITHUB_WORKSPACE"]) !== null && _a6 !== void 0 ? _a6 : process.cwd(); return (_a6 = process.env["GITHUB_WORKSPACE"]) !== null && _a6 !== void 0 ? _a6 : process.cwd();
} }
function quoteAbsolutePath(filePath) {
return `"${path30.resolve(filePath).replace(new RegExp(`\\${path30.sep}`, "g"), "/")}"`;
}
function getDecompressionProgram(tarPath, compressionMethod, archivePath) { function getDecompressionProgram(tarPath, compressionMethod, archivePath) {
return __awaiter2(this, void 0, void 0, function* () { return __awaiter2(this, void 0, void 0, function* () {
const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS;
@@ -105697,13 +105693,17 @@ var require_tar = __commonJS({
return BSD_TAR_ZSTD ? [ return BSD_TAR_ZSTD ? [
"zstd -d --long=30 --force -o", "zstd -d --long=30 --force -o",
constants_1.TarFilename, constants_1.TarFilename,
quoteAbsolutePath(archivePath) archivePath.replace(new RegExp(`\\${path30.sep}`, "g"), "/")
] : [ ] : [
"--use-compress-program", "--use-compress-program",
IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30"
]; ];
case constants_1.CompressionMethod.ZstdWithoutLong: case constants_1.CompressionMethod.ZstdWithoutLong:
return BSD_TAR_ZSTD ? ["zstd -d --force -o", constants_1.TarFilename, quoteAbsolutePath(archivePath)] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; return BSD_TAR_ZSTD ? [
"zstd -d --force -o",
constants_1.TarFilename,
archivePath.replace(new RegExp(`\\${path30.sep}`, "g"), "/")
] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"];
default: default:
return ["-z"]; return ["-z"];
} }
@@ -105748,39 +105748,24 @@ var require_tar = __commonJS({
} }
}); });
} }
function execReadCommands(archivePath, compressionMethod, type) {
return __awaiter2(this, void 0, void 0, function* () {
const { commands, requiresTempDirectory } = yield getCommands(compressionMethod, type, archivePath);
const tempDirectory = requiresTempDirectory ? yield utils.createTempDirectory() : void 0;
try {
yield execCommands(commands, tempDirectory);
} finally {
if (tempDirectory) {
try {
yield io9.rmRF(tempDirectory);
} catch (error3) {
core32.debug(`Failed to delete temporary tar directory: ${error3}`);
}
}
}
});
}
function listTar(archivePath, compressionMethod) { function listTar(archivePath, compressionMethod) {
return __awaiter2(this, void 0, void 0, function* () { return __awaiter2(this, void 0, void 0, function* () {
yield execReadCommands(archivePath, compressionMethod, "list"); const commands = yield getCommands(compressionMethod, "list", archivePath);
yield execCommands(commands);
}); });
} }
function extractTar3(archivePath, compressionMethod) { function extractTar3(archivePath, compressionMethod) {
return __awaiter2(this, void 0, void 0, function* () { return __awaiter2(this, void 0, void 0, function* () {
const workingDirectory = getWorkingDirectory(); const workingDirectory = getWorkingDirectory();
yield io9.mkdirP(workingDirectory); yield io9.mkdirP(workingDirectory);
yield execReadCommands(archivePath, compressionMethod, "extract"); const commands = yield getCommands(compressionMethod, "extract", archivePath);
yield execCommands(commands);
}); });
} }
function createTar(archiveFolder, sourceDirectories, compressionMethod) { function createTar(archiveFolder, sourceDirectories, compressionMethod) {
return __awaiter2(this, void 0, void 0, function* () { return __awaiter2(this, void 0, void 0, function* () {
(0, fs_1.writeFileSync)(path30.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); (0, fs_1.writeFileSync)(path30.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n"));
const { commands } = yield getCommands(compressionMethod, "create"); const commands = yield getCommands(compressionMethod, "create");
yield execCommands(commands, archiveFolder); yield execCommands(commands, archiveFolder);
}); });
} }

14
package-lock.json generated
View File

@@ -14,7 +14,7 @@
"dependencies": { "dependencies": {
"@actions/artifact": "^5.0.3", "@actions/artifact": "^5.0.3",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
"@actions/cache": "^5.3.0", "@actions/cache": "^5.2.0",
"@actions/core": "^2.0.3", "@actions/core": "^2.0.3",
"@actions/exec": "^2.0.0", "@actions/exec": "^2.0.0",
"@actions/github": "^8.0.1", "@actions/github": "^8.0.1",
@@ -459,19 +459,19 @@
} }
}, },
"node_modules/@actions/cache": { "node_modules/@actions/cache": {
"version": "5.3.0", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-5.3.0.tgz", "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-5.2.0.tgz",
"integrity": "sha512-VqJBlQFt1lpp7op7o/Z0syWywX9cN8TxjFCPjHyGHmXCiczU5NII5ZdEpGpTelUnOGFG2bO7viUx9q3q7WR/Gg==", "integrity": "sha512-1R1Oc8cuDNCygsIP7gLiKLGCymOw/k5FkGQkXZFcLz6/RWyMImkfP0dZX6kjA9SRAmANcKNocI2XrsIaZ1it8w==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^2.0.3", "@actions/core": "^2.0.0",
"@actions/exec": "^2.0.0", "@actions/exec": "^2.0.0",
"@actions/glob": "^0.5.1", "@actions/glob": "^0.5.1",
"@actions/http-client": "^3.0.2", "@actions/http-client": "^3.0.2",
"@actions/io": "^2.0.0", "@actions/io": "^2.0.0",
"@azure/abort-controller": "^1.1.0", "@azure/abort-controller": "^1.1.0",
"@azure/core-rest-pipeline": "^1.25.0", "@azure/core-rest-pipeline": "^1.22.0",
"@azure/storage-blob": "^12.34.0", "@azure/storage-blob": "^12.29.1",
"@protobuf-ts/runtime-rpc": "^2.11.1", "@protobuf-ts/runtime-rpc": "^2.11.1",
"semver": "^6.3.1" "semver": "^6.3.1"
} }

View File

@@ -22,7 +22,7 @@
"dependencies": { "dependencies": {
"@actions/artifact": "^5.0.3", "@actions/artifact": "^5.0.3",
"@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2", "@actions/artifact-legacy": "npm:@actions/artifact@^1.1.2",
"@actions/cache": "^5.3.0", "@actions/cache": "^5.2.0",
"@actions/core": "^2.0.3", "@actions/core": "^2.0.3",
"@actions/exec": "^2.0.0", "@actions/exec": "^2.0.0",
"@actions/github": "^8.0.1", "@actions/github": "^8.0.1",
@@ -44,8 +44,8 @@
"long": "^5.3.2", "long": "^5.3.2",
"node-forge": "^1.4.0", "node-forge": "^1.4.0",
"semver": "^7.8.5", "semver": "^7.8.5",
"uuid": "^14.0.2", "undici": "^6.28.0",
"undici": "^6.28.0" "uuid": "^14.0.2"
}, },
"devDependencies": { "devDependencies": {
"@ava/typescript": "6.0.0", "@ava/typescript": "6.0.0",