Skip to content

Commit

Permalink
NPM dependency updates
Browse files Browse the repository at this point in the history
* Update development dependencies
* Update runtime dependencies
  • Loading branch information
bigdaz authored Mar 25, 2023
1 parent 951bc8a commit a8f0f0d
Show file tree
Hide file tree
Showing 8 changed files with 2,757 additions and 11,007 deletions.
5,664 changes: 773 additions & 4,891 deletions dist/main/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/main/index.js.map

Large diffs are not rendered by default.

5,660 changes: 771 additions & 4,889 deletions dist/post/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/post/index.js.map

Large diffs are not rendered by default.

2,334 changes: 1,162 additions & 1,172 deletions package-lock.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,29 @@
],
"license": "MIT",
"dependencies": {
"@actions/cache": "3.1.4",
"@actions/cache": "3.2.1",
"@actions/core": "1.10.0",
"@actions/exec": "1.1.1",
"@actions/github": "5.1.1",
"@actions/glob": "0.4.0",
"@actions/http-client": "2.0.1",
"@actions/http-client": "2.1.0",
"@actions/tool-cache": "2.0.1",
"string-argv": "0.3.1"
},
"devDependencies": {
"@types/jest": "28.1.7",
"@types/node": "16.11.21",
"@types/jest": "29.5.0",
"@types/unzipper": "0.10.5",
"@typescript-eslint/parser": "5.54.0",
"@typescript-eslint/parser": "5.56.0",
"@vercel/ncc": "0.36.1",
"eslint": "8.35.0",
"eslint-plugin-github": "4.6.1",
"eslint": "8.36.0",
"eslint-plugin-github": "4.7.0",
"eslint-plugin-jest": "27.2.1",
"jest": "28.1.3",
"jest": "29.5.0",
"js-yaml": "4.1.0",
"patch-package": "6.5.1",
"prettier": "2.8.4",
"ts-jest": "28.0.8",
"typescript": "4.9.5"
"prettier": "2.8.7",
"ts-jest": "29.0.5",
"typescript": "5.0.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,12 @@ index 4658366..b796e58 100644
+ constructor(key: string, size?: number);
+}
diff --git a/node_modules/@actions/cache/lib/cache.js b/node_modules/@actions/cache/lib/cache.js
index 0fa9df3..5f0b173 100644
index 9d636aa..a176bd7 100644
--- a/node_modules/@actions/cache/lib/cache.js
+++ b/node_modules/@actions/cache/lib/cache.js
@@ -97,26 +97,18 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
}
archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod));
core.debug(`Archive Path: ${archivePath}`);
+ const restoredEntry = new CacheEntry(cacheEntry.cacheKey);
// Download the cache from the cache entry
yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options);
if (core.isDebug()) {
yield tar_1.listTar(archivePath, compressionMethod);
}
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
+ restoredEntry.size = archiveFileSize;
@@ -127,18 +127,21 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`);
yield tar_1.extractTar(archivePath, compressionMethod);
yield (0, tar_1.extractTar)(archivePath, compressionMethod);
core.info('Cache restored successfully');
- return cacheEntry.cacheKey;
- }
Expand All @@ -55,29 +44,31 @@ index 0fa9df3..5f0b173 100644
- // Supress all non-validation cache related errors because caching should be optional
- core.warning(`Failed to restore: ${error.message}`);
- }
+ return restoredEntry;
+
+ // PATCHED - Return more inforamtion about restored entry
+ return new CacheEntry(cacheEntry.cacheKey, archiveFileSize);;
}
+ // PATCHED - propagate errors
+ // catch (error) {
+ // const typedError = error;
+ // if (typedError.name === ValidationError.name) {
+ // throw error;
+ // }
+ // else {
+ // // Supress all non-validation cache related errors because caching should be optional
+ // core.warning(`Failed to restore: ${error.message}`);
+ // }
+ // }
finally {
// Try to delete the archive to save space
@@ -156,6 +148,7 @@ function saveCache(paths, key, options, enableCrossOsArchive = false) {
const archiveFolder = yield utils.createTempDirectory();
const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod));
core.debug(`Archive Path: ${archivePath}`);
+ const savedEntry = new CacheEntry(key);
try {
yield tar_1.createTar(archiveFolder, cachePaths, compressionMethod);
if (core.isDebug()) {
@@ -163,6 +156,7 @@ function saveCache(paths, key, options, enableCrossOsArchive = false) {
try {
@@ -206,19 +209,23 @@ function saveCache(paths, key, options, enableCrossOsArchive = false) {
}
const fileSizeLimit = 10 * 1024 * 1024 * 1024; // 10GB per repo limit
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
+ savedEntry.size = archiveFileSize;
core.debug(`File Size: ${archiveFileSize}`);
// For GHES, this check will take place in ReserveCache API with enterprise file size limit
if (archiveFileSize > fileSizeLimit && !utils.isGhes()) {
@@ -186,18 +180,6 @@ function saveCache(paths, key, options, enableCrossOsArchive = false) {
core.debug(`Saving Cache (ID: ${cacheId})`);
yield cacheHttpClient.saveCache(cacheId, archivePath, options);
+
+ // PATCHED - Return more inforamtion about saved entry
+ return new CacheEntry(key, archiveFileSize);
}
- catch (error) {
- const typedError = error;
Expand All @@ -91,15 +82,23 @@ index 0fa9df3..5f0b173 100644
- core.warning(`Failed to save: ${typedError.message}`);
- }
- }
+ // PATCHED - propagate errors
+ // catch (error) {
+ // const typedError = error;
+ // if (typedError.name === ValidationError.name) {
+ // throw error;
+ // }
+ // else if (typedError.name === ReserveCacheError.name) {
+ // core.info(`Failed to save: ${typedError.message}`);
+ // }
+ // else {
+ // core.warning(`Failed to save: ${typedError.message}`);
+ // }
+ // }
finally {
// Try to delete the archive to save space
try {
@@ -207,8 +189,15 @@ function saveCache(paths, key, options, enableCrossOsArchive = false) {
core.debug(`Failed to delete archive: ${error}`);
}
}
- return cacheId;
+ return savedEntry;
@@ -232,4 +239,11 @@ function saveCache(paths, key, options, enableCrossOsArchive = false) {
});
}
exports.saveCache = saveCache;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Patch removes logging of the AZURE_LOG_LEVEL env var value
# This logging triggers a high severity Warning from CodeQL, which can prevent organizational users from adopting the action.

diff --git a/node_modules/@azure/logger/dist-esm/src/index.js b/node_modules/@azure/logger/dist-esm/src/index.js
index 116b59e..cf87f3c 100644
index cc25720..2925db5 100644
--- a/node_modules/@azure/logger/dist-esm/src/index.js
+++ b/node_modules/@azure/logger/dist-esm/src/index.js
@@ -20,7 +20,7 @@ if (logLevelFromEnv) {
Expand All @@ -15,10 +12,10 @@ index 116b59e..cf87f3c 100644
}
/**
diff --git a/node_modules/@azure/logger/dist/index.js b/node_modules/@azure/logger/dist/index.js
index 327fbdb..4432d73 100644
index 81e97c3..a0e14d8 100644
--- a/node_modules/@azure/logger/dist/index.js
+++ b/node_modules/@azure/logger/dist/index.js
@@ -122,7 +122,7 @@ if (logLevelFromEnv) {
@@ -125,7 +125,7 @@ if (logLevelFromEnv) {
setLogLevel(logLevelFromEnv);
}
else {
Expand Down

0 comments on commit a8f0f0d

Please sign in to comment.