Compare commits

...

4 Commits

Author SHA1 Message Date
Jerome Prinet
3709737ee5 Handle breaking changes in nock 15.0.0 (encapsulates replyWithError response in object) 2025-10-30 12:40:04 +01:00
Jerome Prinet
1ed61ac712 Upgrade current version of Gradle 8 2025-10-30 12:39:08 +01:00
Jerome Prinet
cd435c3832 Apply patch on @actions/cache 4.1.0 2025-10-29 14:59:30 +01:00
dependabot[bot]
a5d256c82b Bump the npm-dependencies group across 1 directory with 11 updates
Bumps the npm-dependencies group with 11 updates in the /sources directory:

| Package | From | To |
| --- | --- | --- |
| [@actions/artifact](https://github.com/actions/toolkit/tree/HEAD/packages/artifact) | `2.3.2` | `4.0.0` |
| [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache) | `4.0.5` | `4.1.0` |
| [semver](https://github.com/npm/node-semver) | `7.7.2` | `7.7.3` |
| [@jest/globals](https://github.com/jestjs/jest/tree/HEAD/packages/jest-globals) | `30.1.2` | `30.2.0` |
| [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `24.5.2` | `24.9.1` |
| [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `8.44.1` | `8.46.2` |
| [jest](https://github.com/jestjs/jest/tree/HEAD/packages/jest) | `30.1.3` | `30.2.0` |
| [nock](https://github.com/nock/nock) | `13.5.6` | `15.0.0` |
| [patch-package](https://github.com/ds300/patch-package) | `8.0.0` | `8.0.1` |
| [ts-jest](https://github.com/kulshekhar/ts-jest) | `29.4.4` | `29.4.5` |
| [typescript](https://github.com/microsoft/TypeScript) | `5.9.2` | `5.9.3` |



Updates `@actions/artifact` from 2.3.2 to 4.0.0
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/artifact/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/@actions/cache@4.0.0/packages/artifact)

Updates `@actions/cache` from 4.0.5 to 4.1.0
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/cache)

Updates `semver` from 7.7.2 to 7.7.3
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.7.2...v7.7.3)

Updates `@jest/globals` from 30.1.2 to 30.2.0
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v30.2.0/packages/jest-globals)

Updates `@types/node` from 24.5.2 to 24.9.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@typescript-eslint/eslint-plugin` from 8.44.1 to 8.46.2
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.46.2/packages/eslint-plugin)

Updates `jest` from 30.1.3 to 30.2.0
- [Release notes](https://github.com/jestjs/jest/releases)
- [Changelog](https://github.com/jestjs/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jestjs/jest/commits/v30.2.0/packages/jest)

Updates `nock` from 13.5.6 to 15.0.0
- [Release notes](https://github.com/nock/nock/releases)
- [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nock/nock/compare/v13.5.6...v15.0.0)

Updates `patch-package` from 8.0.0 to 8.0.1
- [Release notes](https://github.com/ds300/patch-package/releases)
- [Changelog](https://github.com/ds300/patch-package/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ds300/patch-package/commits)

Updates `ts-jest` from 29.4.4 to 29.4.5
- [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.4.4...v29.4.5)

Updates `typescript` from 5.9.2 to 5.9.3
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.9.2...v5.9.3)

---
updated-dependencies:
- dependency-name: "@actions/artifact"
  dependency-version: 4.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: "@actions/cache"
  dependency-version: 4.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: semver
  dependency-version: 7.7.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: "@jest/globals"
  dependency-version: 30.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@types/node"
  dependency-version: 24.9.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.46.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: jest
  dependency-version: 30.2.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: npm-dependencies
- dependency-name: nock
  dependency-version: 15.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: npm-dependencies
- dependency-name: patch-package
  dependency-version: 8.0.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: ts-jest
  dependency-version: 29.4.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
- dependency-name: typescript
  dependency-version: 5.9.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 23:22:43 +00:00
6 changed files with 649 additions and 836 deletions

1178
sources/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -35,8 +35,8 @@
"node": ">=24.0.0"
},
"dependencies": {
"@actions/artifact": "2.3.2",
"@actions/cache": "4.0.5",
"@actions/artifact": "4.0.0",
"@actions/cache": "4.1.0",
"@actions/core": "1.11.1",
"@actions/exec": "1.1.1",
"@actions/github": "6.0.1",
@@ -45,31 +45,31 @@
"@actions/tool-cache": "2.0.2",
"@octokit/webhooks-types": "7.6.1",
"cheerio": "1.1.2",
"semver": "7.7.2",
"semver": "7.7.3",
"string-argv": "0.3.2",
"unhomoglyph": "1.0.6",
"which": "5.0.0"
},
"devDependencies": {
"@gradle-tech/develocity-agent": "2.0.2",
"@jest/globals": "30.1.2",
"@jest/globals": "30.2.0",
"@types/jest": "30.0.0",
"@types/node": "24.5.2",
"@types/node": "24.9.1",
"@types/semver": "7.7.1",
"@types/unzipper": "0.10.11",
"@types/which": "3.0.4",
"@typescript-eslint/eslint-plugin": "8.44.1",
"@typescript-eslint/eslint-plugin": "8.46.2",
"@vercel/ncc": "0.38.4",
"dedent": "1.7.0",
"eslint": "9.24.0",
"globals": "16.4.0",
"jest": "30.1.3",
"nock": "13.5.6",
"jest": "30.2.0",
"nock": "15.0.0",
"npm-run-all": "4.1.5",
"patch-package": "8.0.0",
"patch-package": "8.0.1",
"prettier": "3.6.2",
"ts-jest": "29.4.4",
"typescript": "5.9.2"
"ts-jest": "29.4.5",
"typescript": "5.9.3"
},
"overrides": {
"@azure/logger": "1.1.4",

View File

@@ -1,248 +0,0 @@
diff --git a/node_modules/@actions/cache/lib/cache.d.ts b/node_modules/@actions/cache/lib/cache.d.ts
index ef0928b..d06e675 100644
--- a/node_modules/@actions/cache/lib/cache.d.ts
+++ b/node_modules/@actions/cache/lib/cache.d.ts
@@ -21,7 +21,8 @@ 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 +32,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 41f2a37..2fe1600 100644
--- a/node_modules/@actions/cache/lib/cache.js
+++ b/node_modules/@actions/cache/lib/cache.js
@@ -165,26 +165,29 @@ function restoreCacheV1(paths, primaryKey, restoreKeys, options, enableCrossOsAr
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 {
- // warn on cache restore failure and continue build
- // Log server errors (5xx) as errors, all other errors as warnings
- if (typedError instanceof http_client_1.HttpClientError &&
- typeof typedError.statusCode === 'number' &&
- typedError.statusCode >= 500) {
- core.error(`Failed to restore: ${error.message}`);
- }
- else {
- core.warning(`Failed to restore: ${error.message}`);
- }
- }
+
+ // PATCHED - Include size of restored entry
+ return new CacheEntry(cacheEntry.cacheKey, archiveFileSize);
}
+ // PATCHED - propagate errors
+ // catch (error) {
+ // const typedError = error;
+ // if (typedError.name === ValidationError.name) {
+ // throw error;
+ // }
+ // else {
+ // // warn on cache restore failure and continue build
+ // // Log server errors (5xx) as errors, all other errors as warnings
+ // if (typedError instanceof http_client_1.HttpClientError &&
+ // typeof typedError.statusCode === 'number' &&
+ // typedError.statusCode >= 500) {
+ // core.error(`Failed to restore: ${error.message}`);
+ // }
+ // else {
+ // core.warning(`Failed to restore: ${error.message}`);
+ // }
+ // }
+ //}
finally {
// Try to delete the archive to save space
try {
@@ -257,26 +260,29 @@ function restoreCacheV2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
}
yield (0, tar_1.extractTar)(archivePath, compressionMethod);
core.info('Cache restored successfully');
- return response.matchedKey;
- }
- 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
- // Log server errors (5xx) as errors, all other errors as warnings
- if (typedError instanceof http_client_1.HttpClientError &&
- typeof typedError.statusCode === 'number' &&
- typedError.statusCode >= 500) {
- core.error(`Failed to restore: ${error.message}`);
- }
- else {
- core.warning(`Failed to restore: ${error.message}`);
- }
- }
+
+ // PATCHED - Include size of restored entry
+ return new CacheEntry(response.matchedKey, 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
+ // // Log server errors (5xx) as errors, all other errors as warnings
+ // if (typedError instanceof http_client_1.HttpClientError &&
+ // typeof typedError.statusCode === 'number' &&
+ // typedError.statusCode >= 500) {
+ // core.error(`Failed to restore: ${error.message}`);
+ // }
+ // else {
+ // core.warning(`Failed to restore: ${error.message}`);
+ // }
+ // }
+ //}
finally {
try {
if (archivePath) {
@@ -367,27 +373,31 @@ function saveCacheV1(paths, key, options, enableCrossOsArchive = false) {
}
core.debug(`Saving Cache (ID: ${cacheId})`);
yield cacheHttpClient.saveCache(cacheId, archivePath, '', options);
+
+ // PATCHED - Include size of 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 {
- // Log server errors (5xx) as errors, all other errors as warnings
- if (typedError instanceof http_client_1.HttpClientError &&
- typeof typedError.statusCode === 'number' &&
- typedError.statusCode >= 500) {
- core.error(`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 {
+ // // Log server errors (5xx) as errors, all other errors as warnings
+ // if (typedError instanceof http_client_1.HttpClientError &&
+ // typeof typedError.statusCode === 'number' &&
+ // typedError.statusCode >= 500) {
+ // core.error(`Failed to save: ${typedError.message}`);
+ // }
+ // else {
+ // core.warning(`Failed to save: ${typedError.message}`);
+ // }
+ // }
+ //}
finally {
// Try to delete the archive to save space
try {
@@ -471,27 +481,31 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
}
cacheId = parseInt(finalizeResponse.entryId);
+
+ // PATCHED - Include size of 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 {
- // Log server errors (5xx) as errors, all other errors as warnings
- if (typedError instanceof http_client_1.HttpClientError &&
- typeof typedError.statusCode === 'number' &&
- typedError.statusCode >= 500) {
- core.error(`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 {
+ // // Log server errors (5xx) as errors, all other errors as warnings
+ // if (typedError instanceof http_client_1.HttpClientError &&
+ // typeof typedError.statusCode === 'number' &&
+ // typedError.statusCode >= 500) {
+ // core.error(`Failed to save: ${typedError.message}`);
+ // }
+ // else {
+ // core.warning(`Failed to save: ${typedError.message}`);
+ // }
+ // }
+ //}
finally {
// Try to delete the archive to save space
try {
@@ -504,4 +518,12 @@ function saveCacheV2(paths, key, options, enableCrossOsArchive = false) {
return cacheId;
});
}
+// PATCHED - CacheEntry class
+class CacheEntry {
+ constructor(key, size) {
+ this.key = key;
+ this.size = size;
+ }
+}
+
//# sourceMappingURL=cache.js.map
\ No newline at end of file

View File

@@ -0,0 +1,28 @@
diff --git a/node_modules/@actions/cache/lib/cache.d.ts b/node_modules/@actions/cache/lib/cache.d.ts
index 28669b9..806a5a6 100644
--- a/node_modules/@actions/cache/lib/cache.d.ts
+++ b/node_modules/@actions/cache/lib/cache.d.ts
@@ -24,7 +24,8 @@ 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
*
@@ -34,4 +35,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);
+}

View File

@@ -54,7 +54,7 @@ test('will cleanup unused gradle versions', async () => {
const transforms3 = path.resolve(gradleUserHome, "caches/transforms-3")
const metadata100 = path.resolve(gradleUserHome, "caches/modules-2/metadata-2.100")
const wrapper802 = path.resolve(gradleUserHome, "wrapper/dists/gradle-8.0.2-bin")
const gradleCurrent = path.resolve(gradleUserHome, "caches/8.14.2")
const gradleCurrent = path.resolve(gradleUserHome, "caches/8.14.3")
const metadataCurrent = path.resolve(gradleUserHome, "caches/modules-2/metadata-2.107")
expect(fs.existsSync(gradle802)).toBe(true)

View File

@@ -65,10 +65,9 @@ describe('retry', () => {
nock('https://services.gradle.org', {allowUnmocked: true})
.get('/versions/all')
.times(3)
.replyWithError({
message: 'connect ECONNREFUSED 104.18.191.9:443',
code: 'ECONNREFUSED'
})
.replyWithError(
Object.assign(new Error('Connection refused'), { code: 'ECONNREFUSED' }),
)
const validChecksums = await checksums.fetchUnknownChecksums(false, knownChecksumsWithout8_1())
expect(validChecksums.checksums.size).toBeGreaterThan(0)