mirror of
https://code.forgejo.org/actions/cache.git
synced 2024-11-05 02:02:53 +01:00
Update cache npm module to latest
This commit is contained in:
parent
4387dbc81a
commit
85efbb58b9
4 changed files with 37 additions and 25 deletions
20
dist/restore/index.js
vendored
20
dist/restore/index.js
vendored
|
@ -1113,7 +1113,13 @@ function resolvePaths(patterns) {
|
|||
.replace(new RegExp(`\\${path.sep}`, 'g'), '/');
|
||||
core.debug(`Matched: ${relativeFile}`);
|
||||
// Paths are made relative so the tar entries are all relative to the root of the workspace.
|
||||
paths.push(`${relativeFile}`);
|
||||
if (relativeFile === '') {
|
||||
// path.relative returns empty string if workspace and file are equal
|
||||
paths.push('.');
|
||||
}
|
||||
else {
|
||||
paths.push(`${relativeFile}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
|
@ -37272,9 +37278,9 @@ function extractTar(archivePath, compressionMethod) {
|
|||
function getCompressionProgram() {
|
||||
switch (compressionMethod) {
|
||||
case constants_1.CompressionMethod.Zstd:
|
||||
return ['--use-compress-program', 'zstd -d --long=30'];
|
||||
return ['--use-compress-program', 'unzstd --long=30'];
|
||||
case constants_1.CompressionMethod.ZstdWithoutLong:
|
||||
return ['--use-compress-program', 'zstd -d'];
|
||||
return ['--use-compress-program', 'unzstd'];
|
||||
default:
|
||||
return ['-z'];
|
||||
}
|
||||
|
@ -37305,9 +37311,9 @@ function createTar(archiveFolder, sourceDirectories, compressionMethod) {
|
|||
function getCompressionProgram() {
|
||||
switch (compressionMethod) {
|
||||
case constants_1.CompressionMethod.Zstd:
|
||||
return ['--use-compress-program', 'zstd -T0 --long=30'];
|
||||
return ['--use-compress-program', 'zstdmt --long=30'];
|
||||
case constants_1.CompressionMethod.ZstdWithoutLong:
|
||||
return ['--use-compress-program', 'zstd -T0'];
|
||||
return ['--use-compress-program', 'zstdmt'];
|
||||
default:
|
||||
return ['-z'];
|
||||
}
|
||||
|
@ -37338,9 +37344,9 @@ function listTar(archivePath, compressionMethod) {
|
|||
function getCompressionProgram() {
|
||||
switch (compressionMethod) {
|
||||
case constants_1.CompressionMethod.Zstd:
|
||||
return ['--use-compress-program', 'zstd -d --long=30'];
|
||||
return ['--use-compress-program', 'unzstd --long=30'];
|
||||
case constants_1.CompressionMethod.ZstdWithoutLong:
|
||||
return ['--use-compress-program', 'zstd -d'];
|
||||
return ['--use-compress-program', 'unzstd'];
|
||||
default:
|
||||
return ['-z'];
|
||||
}
|
||||
|
|
20
dist/save/index.js
vendored
20
dist/save/index.js
vendored
|
@ -1113,7 +1113,13 @@ function resolvePaths(patterns) {
|
|||
.replace(new RegExp(`\\${path.sep}`, 'g'), '/');
|
||||
core.debug(`Matched: ${relativeFile}`);
|
||||
// Paths are made relative so the tar entries are all relative to the root of the workspace.
|
||||
paths.push(`${relativeFile}`);
|
||||
if (relativeFile === '') {
|
||||
// path.relative returns empty string if workspace and file are equal
|
||||
paths.push('.');
|
||||
}
|
||||
else {
|
||||
paths.push(`${relativeFile}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
||||
|
@ -37272,9 +37278,9 @@ function extractTar(archivePath, compressionMethod) {
|
|||
function getCompressionProgram() {
|
||||
switch (compressionMethod) {
|
||||
case constants_1.CompressionMethod.Zstd:
|
||||
return ['--use-compress-program', 'zstd -d --long=30'];
|
||||
return ['--use-compress-program', 'unzstd --long=30'];
|
||||
case constants_1.CompressionMethod.ZstdWithoutLong:
|
||||
return ['--use-compress-program', 'zstd -d'];
|
||||
return ['--use-compress-program', 'unzstd'];
|
||||
default:
|
||||
return ['-z'];
|
||||
}
|
||||
|
@ -37305,9 +37311,9 @@ function createTar(archiveFolder, sourceDirectories, compressionMethod) {
|
|||
function getCompressionProgram() {
|
||||
switch (compressionMethod) {
|
||||
case constants_1.CompressionMethod.Zstd:
|
||||
return ['--use-compress-program', 'zstd -T0 --long=30'];
|
||||
return ['--use-compress-program', 'zstdmt --long=30'];
|
||||
case constants_1.CompressionMethod.ZstdWithoutLong:
|
||||
return ['--use-compress-program', 'zstd -T0'];
|
||||
return ['--use-compress-program', 'zstdmt'];
|
||||
default:
|
||||
return ['-z'];
|
||||
}
|
||||
|
@ -37338,9 +37344,9 @@ function listTar(archivePath, compressionMethod) {
|
|||
function getCompressionProgram() {
|
||||
switch (compressionMethod) {
|
||||
case constants_1.CompressionMethod.Zstd:
|
||||
return ['--use-compress-program', 'zstd -d --long=30'];
|
||||
return ['--use-compress-program', 'unzstd --long=30'];
|
||||
case constants_1.CompressionMethod.ZstdWithoutLong:
|
||||
return ['--use-compress-program', 'zstd -d'];
|
||||
return ['--use-compress-program', 'unzstd'];
|
||||
default:
|
||||
return ['-z'];
|
||||
}
|
||||
|
|
18
package-lock.json
generated
18
package-lock.json
generated
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
"name": "cache",
|
||||
"version": "3.0.5",
|
||||
"version": "3.0.6",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "cache",
|
||||
"version": "3.0.5",
|
||||
"version": "3.0.6",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/cache": "^3.0.0",
|
||||
"@actions/cache": "^3.0.1",
|
||||
"@actions/core": "^1.7.0",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/io": "^1.1.2"
|
||||
|
@ -36,9 +36,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@actions/cache": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.0.0.tgz",
|
||||
"integrity": "sha512-GL9CT1Fnu+pqs8TTB621q8Xa8Cilw2n9MwvbgMedetH7L1q2n6jY61gzbwGbKgtVbp3gVJ12aNMi4osSGXx3KQ==",
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.0.1.tgz",
|
||||
"integrity": "sha512-z4cbwCuzyZHQ3Y3AyQEFb+WQneC1wcOWfjrKxhulGkbXBLiMH/Uga2hknNEgOY16XaDZ7hArYaY3nUxE7IzqLQ==",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.2.6",
|
||||
"@actions/exec": "^1.0.1",
|
||||
|
@ -9533,9 +9533,9 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@actions/cache": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.0.0.tgz",
|
||||
"integrity": "sha512-GL9CT1Fnu+pqs8TTB621q8Xa8Cilw2n9MwvbgMedetH7L1q2n6jY61gzbwGbKgtVbp3gVJ12aNMi4osSGXx3KQ==",
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-3.0.1.tgz",
|
||||
"integrity": "sha512-z4cbwCuzyZHQ3Y3AyQEFb+WQneC1wcOWfjrKxhulGkbXBLiMH/Uga2hknNEgOY16XaDZ7hArYaY3nUxE7IzqLQ==",
|
||||
"requires": {
|
||||
"@actions/core": "^1.2.6",
|
||||
"@actions/exec": "^1.0.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "cache",
|
||||
"version": "3.0.5",
|
||||
"version": "3.0.6",
|
||||
"private": true,
|
||||
"description": "Cache dependencies and build outputs",
|
||||
"main": "dist/restore/index.js",
|
||||
|
@ -23,7 +23,7 @@
|
|||
"author": "GitHub",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/cache": "^3.0.0",
|
||||
"@actions/cache": "^3.0.1",
|
||||
"@actions/core": "^1.7.0",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/io": "^1.1.2"
|
||||
|
|
Loading…
Reference in a new issue