This commit is contained in:
Jeff Dickey 2024-01-12 13:24:04 -06:00
parent 69021a0b37
commit a0783efaf9
No known key found for this signature in database
GPG key ID: 584DADE86724B407
5 changed files with 73 additions and 78 deletions

38
dist/cache-save/index.js generated vendored
View file

@ -319,7 +319,8 @@ function createHttpClient() {
return new http_client_1.HttpClient('actions/cache', [bearerCredentialHandler], getRequestOptions()); return new http_client_1.HttpClient('actions/cache', [bearerCredentialHandler], getRequestOptions());
} }
function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) {
const components = paths; // don't pass changes upstream
const components = paths.slice();
// Add compression method to cache version to restore // Add compression method to cache version to restore
// compressed cache as per compression method // compressed cache as per compression method
if (compressionMethod) { if (compressionMethod) {
@ -608,26 +609,21 @@ function resolvePaths(patterns) {
implicitDescendants: false implicitDescendants: false
}); });
try { try {
for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a;) { for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) {
_c = _g.value; _c = _g.value;
_e = false; _e = false;
try { const file = _c;
const file = _c; const relativeFile = path
const relativeFile = path .relative(workspace, file)
.relative(workspace, file) .replace(new RegExp(`\\${path.sep}`, 'g'), '/');
.replace(new RegExp(`\\${path.sep}`, 'g'), '/'); core.debug(`Matched: ${relativeFile}`);
core.debug(`Matched: ${relativeFile}`); // Paths are made relative so the tar entries are all relative to the root of the workspace.
// Paths are made relative so the tar entries are all relative to the root of the workspace. if (relativeFile === '') {
if (relativeFile === '') { // path.relative returns empty string if workspace and file are equal
// path.relative returns empty string if workspace and file are equal paths.push('.');
paths.push('.');
}
else {
paths.push(`${relativeFile}`);
}
} }
finally { else {
_e = true; paths.push(`${relativeFile}`);
} }
} }
} }
@ -729,7 +725,7 @@ var CacheFilename;
(function (CacheFilename) { (function (CacheFilename) {
CacheFilename["Gzip"] = "cache.tgz"; CacheFilename["Gzip"] = "cache.tgz";
CacheFilename["Zstd"] = "cache.tzst"; CacheFilename["Zstd"] = "cache.tzst";
})(CacheFilename = exports.CacheFilename || (exports.CacheFilename = {})); })(CacheFilename || (exports.CacheFilename = CacheFilename = {}));
var CompressionMethod; var CompressionMethod;
(function (CompressionMethod) { (function (CompressionMethod) {
CompressionMethod["Gzip"] = "gzip"; CompressionMethod["Gzip"] = "gzip";
@ -737,12 +733,12 @@ var CompressionMethod;
// This enum is for earlier version of zstd that does not have --long support // This enum is for earlier version of zstd that does not have --long support
CompressionMethod["ZstdWithoutLong"] = "zstd-without-long"; CompressionMethod["ZstdWithoutLong"] = "zstd-without-long";
CompressionMethod["Zstd"] = "zstd"; CompressionMethod["Zstd"] = "zstd";
})(CompressionMethod = exports.CompressionMethod || (exports.CompressionMethod = {})); })(CompressionMethod || (exports.CompressionMethod = CompressionMethod = {}));
var ArchiveToolType; var ArchiveToolType;
(function (ArchiveToolType) { (function (ArchiveToolType) {
ArchiveToolType["GNU"] = "gnu"; ArchiveToolType["GNU"] = "gnu";
ArchiveToolType["BSD"] = "bsd"; ArchiveToolType["BSD"] = "bsd";
})(ArchiveToolType = exports.ArchiveToolType || (exports.ArchiveToolType = {})); })(ArchiveToolType || (exports.ArchiveToolType = ArchiveToolType = {}));
// The default number of retry attempts. // The default number of retry attempts.
exports.DefaultRetryAttempts = 2; exports.DefaultRetryAttempts = 2;
// The default delay in milliseconds between retry attempts. // The default delay in milliseconds between retry attempts.

2
dist/cache-save/index.js.map generated vendored

File diff suppressed because one or more lines are too long

38
dist/index.js generated vendored
View file

@ -319,7 +319,8 @@ function createHttpClient() {
return new http_client_1.HttpClient('actions/cache', [bearerCredentialHandler], getRequestOptions()); return new http_client_1.HttpClient('actions/cache', [bearerCredentialHandler], getRequestOptions());
} }
function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) { function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) {
const components = paths; // don't pass changes upstream
const components = paths.slice();
// Add compression method to cache version to restore // Add compression method to cache version to restore
// compressed cache as per compression method // compressed cache as per compression method
if (compressionMethod) { if (compressionMethod) {
@ -608,26 +609,21 @@ function resolvePaths(patterns) {
implicitDescendants: false implicitDescendants: false
}); });
try { try {
for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a;) { for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) {
_c = _g.value; _c = _g.value;
_e = false; _e = false;
try { const file = _c;
const file = _c; const relativeFile = path
const relativeFile = path .relative(workspace, file)
.relative(workspace, file) .replace(new RegExp(`\\${path.sep}`, 'g'), '/');
.replace(new RegExp(`\\${path.sep}`, 'g'), '/'); core.debug(`Matched: ${relativeFile}`);
core.debug(`Matched: ${relativeFile}`); // Paths are made relative so the tar entries are all relative to the root of the workspace.
// Paths are made relative so the tar entries are all relative to the root of the workspace. if (relativeFile === '') {
if (relativeFile === '') { // path.relative returns empty string if workspace and file are equal
// path.relative returns empty string if workspace and file are equal paths.push('.');
paths.push('.');
}
else {
paths.push(`${relativeFile}`);
}
} }
finally { else {
_e = true; paths.push(`${relativeFile}`);
} }
} }
} }
@ -729,7 +725,7 @@ var CacheFilename;
(function (CacheFilename) { (function (CacheFilename) {
CacheFilename["Gzip"] = "cache.tgz"; CacheFilename["Gzip"] = "cache.tgz";
CacheFilename["Zstd"] = "cache.tzst"; CacheFilename["Zstd"] = "cache.tzst";
})(CacheFilename = exports.CacheFilename || (exports.CacheFilename = {})); })(CacheFilename || (exports.CacheFilename = CacheFilename = {}));
var CompressionMethod; var CompressionMethod;
(function (CompressionMethod) { (function (CompressionMethod) {
CompressionMethod["Gzip"] = "gzip"; CompressionMethod["Gzip"] = "gzip";
@ -737,12 +733,12 @@ var CompressionMethod;
// This enum is for earlier version of zstd that does not have --long support // This enum is for earlier version of zstd that does not have --long support
CompressionMethod["ZstdWithoutLong"] = "zstd-without-long"; CompressionMethod["ZstdWithoutLong"] = "zstd-without-long";
CompressionMethod["Zstd"] = "zstd"; CompressionMethod["Zstd"] = "zstd";
})(CompressionMethod = exports.CompressionMethod || (exports.CompressionMethod = {})); })(CompressionMethod || (exports.CompressionMethod = CompressionMethod = {}));
var ArchiveToolType; var ArchiveToolType;
(function (ArchiveToolType) { (function (ArchiveToolType) {
ArchiveToolType["GNU"] = "gnu"; ArchiveToolType["GNU"] = "gnu";
ArchiveToolType["BSD"] = "bsd"; ArchiveToolType["BSD"] = "bsd";
})(ArchiveToolType = exports.ArchiveToolType || (exports.ArchiveToolType = {})); })(ArchiveToolType || (exports.ArchiveToolType = ArchiveToolType = {}));
// The default number of retry attempts. // The default number of retry attempts.
exports.DefaultRetryAttempts = 2; exports.DefaultRetryAttempts = 2;
// The default delay in milliseconds between retry attempts. // The default delay in milliseconds between retry attempts.

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

71
package-lock.json generated
View file

@ -583,9 +583,9 @@
} }
}, },
"node_modules/@babel/helpers": { "node_modules/@babel/helpers": {
"version": "7.23.7", "version": "7.23.8",
"resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.7.tgz", "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.8.tgz",
"integrity": "sha512-6AMnjCoC8wjqBzDHkuqpa7jAKwvMo4dC+lr/TFBz+ucfulO1XMpDnwWPGBNwClOKZ8h6xn5N81W/R5OrcKtCbQ==", "integrity": "sha512-KDqYz4PiOWvDFrdHLPhKtCThtIcKVy6avWD2oG4GEvyQ+XDZwHD4YQd+H2vNMnq2rkdxsDkU82T+Vk8U/WXHRQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@babel/template": "^7.22.15", "@babel/template": "^7.22.15",
@ -871,9 +871,9 @@
} }
}, },
"node_modules/@babel/runtime": { "node_modules/@babel/runtime": {
"version": "7.23.7", "version": "7.23.8",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.7.tgz", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.8.tgz",
"integrity": "sha512-w06OXVOFso7LcbzMiDGt+3X7Rh7Ho8MmgPoWU3rarH+8upf+wSU/grlGbWzQyr3DkdN6ZeuMFjpdwW0Q+HxobA==", "integrity": "sha512-Y7KbAP984rn1VGMbGqKmBLio9V7y5Je9GvU4rQPCPinCyNfUcToxIXl06d59URp/F3LwinvODxab5N/G6qggkw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"regenerator-runtime": "^0.14.0" "regenerator-runtime": "^0.14.0"
@ -1017,13 +1017,13 @@
"dev": true "dev": true
}, },
"node_modules/@humanwhocodes/config-array": { "node_modules/@humanwhocodes/config-array": {
"version": "0.11.13", "version": "0.11.14",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",
"integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@humanwhocodes/object-schema": "^2.0.1", "@humanwhocodes/object-schema": "^2.0.2",
"debug": "^4.1.1", "debug": "^4.3.1",
"minimatch": "^3.0.5" "minimatch": "^3.0.5"
}, },
"engines": { "engines": {
@ -1044,9 +1044,9 @@
} }
}, },
"node_modules/@humanwhocodes/object-schema": { "node_modules/@humanwhocodes/object-schema": {
"version": "2.0.1", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz",
"integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==",
"dev": true "dev": true
}, },
"node_modules/@istanbuljs/load-nyc-config": { "node_modules/@istanbuljs/load-nyc-config": {
@ -1474,9 +1474,9 @@
"dev": true "dev": true
}, },
"node_modules/@jridgewell/trace-mapping": { "node_modules/@jridgewell/trace-mapping": {
"version": "0.3.20", "version": "0.3.21",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.21.tgz",
"integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", "integrity": "sha512-SRfKmRe1KvYnxjEMtxEr+J4HIeMX5YBg/qhRHpxEIGjhX1rshcHlnFUE9K0GazhVKWM7B+nARSkV8LuvJdJ5/g==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@jridgewell/resolve-uri": "^3.1.0", "@jridgewell/resolve-uri": "^3.1.0",
@ -2548,9 +2548,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001574", "version": "1.0.30001576",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001574.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001576.tgz",
"integrity": "sha512-BtYEK4r/iHt/txm81KBudCUcTy7t+s9emrIaHqjYurQ10x71zJ5VQ9x1dYPcz/b+pKSp4y/v1xSI67A+LzpNyg==", "integrity": "sha512-ff5BdakGe2P3SQsMsiqmt1Lc8221NR1VzHj5jXN5vBny9A6fpze94HiVV/n7XRosOlsShJcvMv5mdnpjOGCEgg==",
"dev": true, "dev": true,
"funding": [ "funding": [
{ {
@ -2876,9 +2876,9 @@
} }
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.4.620", "version": "1.4.629",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.620.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.629.tgz",
"integrity": "sha512-a2fcSHOHrqBJsPNXtf6ZCEZpXrFCcbK1FBxfX3txoqWzNgtEDG1f3M59M98iwxhRW4iMKESnSjbJ310/rkrp0g==", "integrity": "sha512-5UUkr3k3CZ/k+9Sw7vaaIMyOzMC0XbPyprKI3n0tbKDqkzTDOjK4izm7DxlkueRMim6ZZQ1ja9F7hoFVplHihA==",
"dev": true "dev": true
}, },
"node_modules/emittery": { "node_modules/emittery": {
@ -6320,9 +6320,9 @@
} }
}, },
"node_modules/prettier": { "node_modules/prettier": {
"version": "3.1.1", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.0.tgz",
"integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==", "integrity": "sha512-/vBUecTGaPlRVwyZVROVC58bYIScqaoEJzZmzQXXrZOzqn0TwWz0EnOozOlFO/YAImRnb7XsKpTCd3m1SjS2Ww==",
"dev": true, "dev": true,
"bin": { "bin": {
"prettier": "bin/prettier.cjs" "prettier": "bin/prettier.cjs"
@ -6648,15 +6648,18 @@
} }
}, },
"node_modules/safe-regex-test": { "node_modules/safe-regex-test": {
"version": "1.0.0", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.2.tgz",
"integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", "integrity": "sha512-83S9w6eFq12BBIJYvjMux6/dkirb8+4zJRA9cxNBVb7Wq5fJBW+Xze48WqR8pxua7bDuAaaAxtVVd4Idjp1dBQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"call-bind": "^1.0.2", "call-bind": "^1.0.5",
"get-intrinsic": "^1.1.3", "get-intrinsic": "^1.2.2",
"is-regex": "^1.1.4" "is-regex": "^1.1.4"
}, },
"engines": {
"node": ">= 0.4"
},
"funding": { "funding": {
"url": "https://github.com/sponsors/ljharb" "url": "https://github.com/sponsors/ljharb"
} }
@ -7311,9 +7314,9 @@
} }
}, },
"node_modules/vue-eslint-parser": { "node_modules/vue-eslint-parser": {
"version": "9.3.2", "version": "9.4.0",
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.3.2.tgz", "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-9.4.0.tgz",
"integrity": "sha512-q7tWyCVaV9f8iQyIA5Mkj/S6AoJ9KBN8IeUSf3XEmBrOtxOZnfTg5s4KClbZBCK3GtnT/+RyCLZyDHuZwTuBjg==", "integrity": "sha512-7KsNBb6gHFA75BtneJsoK/dbZ281whUIwFYdQxA68QrCrGMXYzUMbPDHGcOQ0OocIVKrWSKWXZ4mL7tonCXoUw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"debug": "^4.3.4", "debug": "^4.3.4",