mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-11-22 09:02:50 +00:00
a00827eebb
Bumps the npm-dependencies group with 7 updates: | Package | From | To | | --- | --- | --- | | [@actions/artifact](https://github.com/actions/toolkit/tree/HEAD/packages/artifact) | `2.0.0` | `2.1.0` | | [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache) | `3.2.2` | `3.2.3` | | [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `6.17.0` | `6.19.1` | | [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) | `27.6.1` | `27.6.3` | | [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) | `5.1.2` | `5.1.3` | | [prettier](https://github.com/prettier/prettier) | `3.1.1` | `3.2.4` | | [ts-jest](https://github.com/kulshekhar/ts-jest) | `29.1.1` | `29.1.2` | Updates `@actions/artifact` from 2.0.0 to 2.1.0 - [Changelog](https://github.com/actions/toolkit/blob/main/packages/artifact/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/artifact) Updates `@actions/cache` from 3.2.2 to 3.2.3 - [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/cache) Updates `@typescript-eslint/parser` from 6.17.0 to 6.19.1 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v6.19.1/packages/parser) Updates `eslint-plugin-jest` from 27.6.1 to 27.6.3 - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v27.6.1...v27.6.3) Updates `eslint-plugin-prettier` from 5.1.2 to 5.1.3 - [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases) - [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v5.1.2...v5.1.3) Updates `prettier` from 3.1.1 to 3.2.4 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.1.1...3.2.4) Updates `ts-jest` from 29.1.1 to 29.1.2 - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.1.1...v29.1.2) --- updated-dependencies: - dependency-name: "@actions/artifact" dependency-type: direct:production update-type: version-update:semver-minor dependency-group: npm-dependencies - dependency-name: "@actions/cache" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: npm-dependencies - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm-dependencies - dependency-name: eslint-plugin-jest dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-dependencies - dependency-name: eslint-plugin-prettier dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-dependencies - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm-dependencies - dependency-name: ts-jest dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-dependencies ... Signed-off-by: dependabot[bot] <support@github.com>
113 lines
5.1 KiB
Diff
113 lines
5.1 KiB
Diff
diff --git a/node_modules/@actions/cache/lib/cache.d.ts b/node_modules/@actions/cache/lib/cache.d.ts
|
|
index 4658366..b796e58 100644
|
|
--- a/node_modules/@actions/cache/lib/cache.d.ts
|
|
+++ b/node_modules/@actions/cache/lib/cache.d.ts
|
|
@@ -21,7 +21,7 @@ export declare function isFeatureAvailable(): boolean;
|
|
* @param enableCrossOsArchive an optional boolean enabled to restore on windows any cache created on any platform
|
|
* @returns string returns the key for the cache hit, otherwise returns undefined
|
|
*/
|
|
-export declare function restoreCache(paths: string[], primaryKey: string, restoreKeys?: string[], options?: DownloadOptions, enableCrossOsArchive?: boolean): Promise<string | undefined>;
|
|
+export declare function restoreCache(paths: string[], primaryKey: string, restoreKeys?: string[], options?: DownloadOptions, enableCrossOsArchive?: boolean): Promise<CacheEntry | undefined>;
|
|
/**
|
|
* Saves a list of files with the specified key
|
|
*
|
|
@@ -31,4 +31,12 @@ export declare function restoreCache(paths: string[], primaryKey: string, restor
|
|
* @param options cache upload options
|
|
* @returns number returns cacheId if the cache was saved successfully and throws an error if save fails
|
|
*/
|
|
-export declare function saveCache(paths: string[], key: string, options?: UploadOptions, enableCrossOsArchive?: boolean): Promise<number>;
|
|
+export declare function saveCache(paths: string[], key: string, options?: UploadOptions, enableCrossOsArchive?: boolean): Promise<CacheEntry>;
|
|
+
|
|
+// PATCHED: Add `CacheEntry` as return type for save/restore functions
|
|
+// This allows us to track and report on cache entry sizes.
|
|
+export declare class CacheEntry {
|
|
+ key: string;
|
|
+ size?: number;
|
|
+ constructor(key: string, size?: number);
|
|
+}
|
|
diff --git a/node_modules/@actions/cache/lib/cache.js b/node_modules/@actions/cache/lib/cache.js
|
|
index 9d636aa..a176bd7 100644
|
|
--- a/node_modules/@actions/cache/lib/cache.js
|
|
+++ b/node_modules/@actions/cache/lib/cache.js
|
|
@@ -127,18 +127,21 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
|
|
core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`);
|
|
yield (0, tar_1.extractTar)(archivePath, compressionMethod);
|
|
core.info('Cache restored successfully');
|
|
- return cacheEntry.cacheKey;
|
|
- }
|
|
- 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}`);
|
|
- }
|
|
+
|
|
+ // 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
|
|
try {
|
|
@@ -206,19 +209,23 @@ 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;
|
|
- 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}`);
|
|
- }
|
|
- }
|
|
+ // 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 {
|
|
@@ -232,4 +239,11 @@ function saveCache(paths, key, options, enableCrossOsArchive = false) {
|
|
});
|
|
}
|
|
exports.saveCache = saveCache;
|
|
+class CacheEntry {
|
|
+ constructor(key, size) {
|
|
+ this.key = key;
|
|
+ this.size = size;
|
|
+ }
|
|
+}
|
|
+exports.CacheEntry = CacheEntry;
|
|
//# sourceMappingURL=cache.js.map
|
|
\ No newline at end of file
|