@cypress/github-action 6.10.7 → 6.10.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +9 -9
  2. package/dist/index.js +69 -23
  3. package/package.json +12 -12
package/README.md CHANGED
@@ -566,8 +566,8 @@ jobs:
566
566
  node: [20, 22, 24, 25]
567
567
  name: E2E on Node v${{ matrix.node }}
568
568
  steps:
569
- - name: Setup Node
570
- uses: actions/setup-node@v4
569
+ - name: Install Node.js
570
+ uses: actions/setup-node@v6
571
571
  with:
572
572
  node-version: ${{ matrix.node }}
573
573
  - run: node -v
@@ -1185,9 +1185,9 @@ jobs:
1185
1185
  with:
1186
1186
  version: 10
1187
1187
  - name: Install Node.js
1188
- uses: actions/setup-node@v4
1188
+ uses: actions/setup-node@v6
1189
1189
  with:
1190
- node-version: 22
1190
+ node-version: 24
1191
1191
  cache: 'pnpm'
1192
1192
  cache-dependency-path: examples/basic-pnpm/pnpm-lock.yaml
1193
1193
  - name: Cypress run
@@ -1258,9 +1258,9 @@ jobs:
1258
1258
  uses: actions/checkout@v6
1259
1259
  - run: corepack enable # (experimental and optional)
1260
1260
  - name: Set up Yarn cache
1261
- uses: actions/setup-node@v4
1261
+ uses: actions/setup-node@v6
1262
1262
  with:
1263
- node-version: 22
1263
+ node-version: 24
1264
1264
  cache: yarn
1265
1265
  cache-dependency-path: examples/yarn-modern/yarn.lock
1266
1266
  - name: Cypress run
@@ -1345,8 +1345,8 @@ jobs:
1345
1345
  node: [20, 22, 24, 25]
1346
1346
  name: E2E on Node v${{ matrix.node }}
1347
1347
  steps:
1348
- - name: Setup Node
1349
- uses: actions/setup-node@v4
1348
+ - name: Install Node.js
1349
+ uses: actions/setup-node@v6
1350
1350
  with:
1351
1351
  node-version: ${{ matrix.node }}
1352
1352
  - name: Checkout
@@ -1379,7 +1379,7 @@ jobs:
1379
1379
  node: [20, 22, 24, 25]
1380
1380
  name: E2E on Node v${{ matrix.node }}
1381
1381
  steps:
1382
- - uses: actions/setup-node@v4
1382
+ - uses: actions/setup-node@v6
1383
1383
  with:
1384
1384
  node-version: ${{ matrix.node }}
1385
1385
  - uses: actions/checkout@v6
package/dist/index.js CHANGED
@@ -2398,6 +2398,18 @@ class CacheServiceClient {
2398
2398
  }
2399
2399
  errorMessage = `${errorMessage}: ${body.msg}`;
2400
2400
  }
2401
+ // Handle rate limiting - don't retry, just warn and exit
2402
+ // For more info, see https://docs.github.com/en/actions/reference/limits
2403
+ if (statusCode === http_client_1.HttpCodes.TooManyRequests) {
2404
+ const retryAfterHeader = response.message.headers['retry-after'];
2405
+ if (retryAfterHeader) {
2406
+ const parsedSeconds = parseInt(retryAfterHeader, 10);
2407
+ if (!isNaN(parsedSeconds) && parsedSeconds > 0) {
2408
+ (0, core_1.warning)(`You've hit a rate limit, your rate limit will reset in ${parsedSeconds} seconds`);
2409
+ }
2410
+ }
2411
+ throw new errors_1.RateLimitError(`Rate limited: ${errorMessage}`);
2412
+ }
2401
2413
  }
2402
2414
  catch (error) {
2403
2415
  if (error instanceof SyntaxError) {
@@ -2406,6 +2418,9 @@ class CacheServiceClient {
2406
2418
  if (error instanceof errors_1.UsageError) {
2407
2419
  throw error;
2408
2420
  }
2421
+ if (error instanceof errors_1.RateLimitError) {
2422
+ throw error;
2423
+ }
2409
2424
  if (errors_1.NetworkError.isNetworkErrorCode(error === null || error === void 0 ? void 0 : error.code)) {
2410
2425
  throw new errors_1.NetworkError(error === null || error === void 0 ? void 0 : error.code);
2411
2426
  }
@@ -2438,8 +2453,7 @@ class CacheServiceClient {
2438
2453
  http_client_1.HttpCodes.BadGateway,
2439
2454
  http_client_1.HttpCodes.GatewayTimeout,
2440
2455
  http_client_1.HttpCodes.InternalServerError,
2441
- http_client_1.HttpCodes.ServiceUnavailable,
2442
- http_client_1.HttpCodes.TooManyRequests
2456
+ http_client_1.HttpCodes.ServiceUnavailable
2443
2457
  ];
2444
2458
  return retryableStatusCodes.includes(statusCode);
2445
2459
  }
@@ -2475,7 +2489,7 @@ function internalCacheTwirpClient(options) {
2475
2489
  "use strict";
2476
2490
 
2477
2491
  Object.defineProperty(exports, "__esModule", ({ value: true }));
2478
- exports.UsageError = exports.NetworkError = exports.GHESNotSupportedError = exports.CacheNotFoundError = exports.InvalidResponseError = exports.FilesNotFoundError = void 0;
2492
+ exports.RateLimitError = exports.UsageError = exports.NetworkError = exports.GHESNotSupportedError = exports.CacheNotFoundError = exports.InvalidResponseError = exports.FilesNotFoundError = void 0;
2479
2493
  class FilesNotFoundError extends Error {
2480
2494
  constructor(files = []) {
2481
2495
  let message = 'No files were found to upload';
@@ -2542,6 +2556,13 @@ UsageError.isUsageErrorMessage = (msg) => {
2542
2556
  return false;
2543
2557
  return msg.includes('insufficient usage');
2544
2558
  };
2559
+ class RateLimitError extends Error {
2560
+ constructor(message) {
2561
+ super(message);
2562
+ this.name = 'RateLimitError';
2563
+ }
2564
+ }
2565
+ exports.RateLimitError = RateLimitError;
2545
2566
  //# sourceMappingURL=errors.js.map
2546
2567
 
2547
2568
  /***/ }),
@@ -9902,7 +9923,7 @@ class HttpClient {
9902
9923
  this._maxRetries = 1;
9903
9924
  this._keepAlive = false;
9904
9925
  this._disposed = false;
9905
- this.userAgent = userAgent;
9926
+ this.userAgent = this._getUserAgentWithOrchestrationId(userAgent);
9906
9927
  this.handlers = handlers || [];
9907
9928
  this.requestOptions = requestOptions;
9908
9929
  if (requestOptions) {
@@ -10382,6 +10403,17 @@ class HttpClient {
10382
10403
  }
10383
10404
  return proxyAgent;
10384
10405
  }
10406
+ _getUserAgentWithOrchestrationId(userAgent) {
10407
+ const baseUserAgent = userAgent || 'actions/http-client';
10408
+ const orchId = process.env['ACTIONS_ORCHESTRATION_ID'];
10409
+ if (orchId) {
10410
+ // Sanitize the orchestration ID to ensure it contains only valid characters
10411
+ // Valid characters: 0-9, a-z, _, -, .
10412
+ const sanitizedId = orchId.replace(/[^a-z0-9_.-]/gi, '_');
10413
+ return `${baseUserAgent} actions_orchestration_id/${sanitizedId}`;
10414
+ }
10415
+ return baseUserAgent;
10416
+ }
10385
10417
  _performExponentialBackoff(retryNumber) {
10386
10418
  return __awaiter(this, void 0, void 0, function* () {
10387
10419
  retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
@@ -20230,7 +20262,7 @@ function save(namespaces) {
20230
20262
  function load() {
20231
20263
  let r;
20232
20264
  try {
20233
- r = exports.storage.getItem('debug');
20265
+ r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;
20234
20266
  } catch (error) {
20235
20267
  // Swallow
20236
20268
  // XXX (@Qix-) should we be logging these?
@@ -20458,7 +20490,7 @@ function setup(env) {
20458
20490
 
20459
20491
  const split = (typeof namespaces === 'string' ? namespaces : '')
20460
20492
  .trim()
20461
- .replace(' ', ',')
20493
+ .replace(/\s+/g, ',')
20462
20494
  .split(',')
20463
20495
  .filter(Boolean);
20464
20496
 
@@ -100926,12 +100958,13 @@ class RequestError extends Error {
100926
100958
  */
100927
100959
  response;
100928
100960
  constructor(message, statusCode, options) {
100929
- super(message);
100961
+ super(message, { cause: options.cause });
100930
100962
  this.name = "HttpError";
100931
100963
  this.status = Number.parseInt(statusCode);
100932
100964
  if (Number.isNaN(this.status)) {
100933
100965
  this.status = 0;
100934
100966
  }
100967
+ /* v8 ignore else -- @preserve -- Bug with vitest coverage where it sees an else branch that doesn't exist */
100935
100968
  if ("response" in options) {
100936
100969
  this.response = options.response;
100937
100970
  }
@@ -100958,7 +100991,7 @@ class RequestError extends Error {
100958
100991
 
100959
100992
 
100960
100993
  // pkg/dist-src/version.js
100961
- var dist_bundle_VERSION = "0.0.0-development";
100994
+ var dist_bundle_VERSION = "10.0.7";
100962
100995
 
100963
100996
  // pkg/dist-src/defaults.js
100964
100997
  var defaults_default = {
@@ -100982,6 +101015,7 @@ function dist_bundle_isPlainObject(value) {
100982
101015
 
100983
101016
  // pkg/dist-src/fetch-wrapper.js
100984
101017
 
101018
+ var noop = () => "";
100985
101019
  async function fetchWrapper(requestOptions) {
100986
101020
  const fetch = requestOptions.request?.fetch || globalThis.fetch;
100987
101021
  if (!fetch) {
@@ -101083,7 +101117,7 @@ async function fetchWrapper(requestOptions) {
101083
101117
  async function getResponseData(response) {
101084
101118
  const contentType = response.headers.get("content-type");
101085
101119
  if (!contentType) {
101086
- return response.text().catch(() => "");
101120
+ return response.text().catch(noop);
101087
101121
  }
101088
101122
  const mimetype = (0,fast_content_type_parse/* safeParse */.xL)(contentType);
101089
101123
  if (isJSONResponse(mimetype)) {
@@ -101095,9 +101129,12 @@ async function getResponseData(response) {
101095
101129
  return text;
101096
101130
  }
101097
101131
  } else if (mimetype.type.startsWith("text/") || mimetype.parameters.charset?.toLowerCase() === "utf-8") {
101098
- return response.text().catch(() => "");
101132
+ return response.text().catch(noop);
101099
101133
  } else {
101100
- return response.arrayBuffer().catch(() => new ArrayBuffer(0));
101134
+ return response.arrayBuffer().catch(
101135
+ /* v8 ignore next -- @preserve */
101136
+ () => new ArrayBuffer(0)
101137
+ );
101101
101138
  }
101102
101139
  }
101103
101140
  function isJSONResponse(mimetype) {
@@ -101145,6 +101182,8 @@ function dist_bundle_withDefaults(oldEndpoint, newDefaults) {
101145
101182
  // pkg/dist-src/index.js
101146
101183
  var request = dist_bundle_withDefaults(endpoint, defaults_default);
101147
101184
 
101185
+ /* v8 ignore next -- @preserve */
101186
+ /* v8 ignore else -- @preserve */
101148
101187
 
101149
101188
  ;// CONCATENATED MODULE: ./node_modules/@octokit/graphql/dist-bundle/index.js
101150
101189
  // pkg/dist-src/index.js
@@ -101329,7 +101368,7 @@ var createTokenAuth = function createTokenAuth2(token) {
101329
101368
 
101330
101369
 
101331
101370
  ;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/version.js
101332
- const version_VERSION = "6.1.4";
101371
+ const version_VERSION = "7.0.6";
101333
101372
 
101334
101373
 
101335
101374
  ;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/index.js
@@ -101339,10 +101378,25 @@ const version_VERSION = "6.1.4";
101339
101378
 
101340
101379
 
101341
101380
 
101342
- const noop = () => {
101381
+ const dist_src_noop = () => {
101343
101382
  };
101344
101383
  const consoleWarn = console.warn.bind(console);
101345
101384
  const consoleError = console.error.bind(console);
101385
+ function createLogger(logger = {}) {
101386
+ if (typeof logger.debug !== "function") {
101387
+ logger.debug = dist_src_noop;
101388
+ }
101389
+ if (typeof logger.info !== "function") {
101390
+ logger.info = dist_src_noop;
101391
+ }
101392
+ if (typeof logger.warn !== "function") {
101393
+ logger.warn = consoleWarn;
101394
+ }
101395
+ if (typeof logger.error !== "function") {
101396
+ logger.error = consoleError;
101397
+ }
101398
+ return logger;
101399
+ }
101346
101400
  const userAgentTrail = `octokit-core.js/${version_VERSION} ${getUserAgent()}`;
101347
101401
  class Octokit {
101348
101402
  static VERSION = version_VERSION;
@@ -101410,15 +101464,7 @@ class Octokit {
101410
101464
  }
101411
101465
  this.request = request.defaults(requestDefaults);
101412
101466
  this.graphql = withCustomRequest(this.request).defaults(requestDefaults);
101413
- this.log = Object.assign(
101414
- {
101415
- debug: noop,
101416
- info: noop,
101417
- warn: consoleWarn,
101418
- error: consoleError
101419
- },
101420
- options.log
101421
- );
101467
+ this.log = createLogger(options.log);
101422
101468
  this.hook = hook;
101423
101469
  if (!options.authStrategy) {
101424
101470
  if (!options.auth) {
@@ -101679,7 +101725,7 @@ const supportsColor = {
101679
101725
  /***/ ((module) => {
101680
101726
 
101681
101727
  "use strict";
101682
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"5.0.1","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^2.0.0","@actions/exec":"^2.0.0","@actions/glob":"^0.5.0","@protobuf-ts/runtime-rpc":"^2.11.1","@actions/http-client":"^3.0.0","@actions/io":"^2.0.0","@azure/abort-controller":"^1.1.0","@azure/core-rest-pipeline":"^1.22.0","@azure/storage-blob":"^12.29.1","semver":"^6.3.1"},"devDependencies":{"@types/node":"^24.1.0","@types/semver":"^6.0.0","@protobuf-ts/plugin":"^2.9.4","typescript":"^5.2.2"},"overrides":{"uri-js":"npm:uri-js-replace@^1.0.1","node-fetch":"^3.3.2"}}');
101728
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@actions/cache","version":"5.0.3","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^2.0.0","@actions/exec":"^2.0.0","@actions/glob":"^0.5.0","@protobuf-ts/runtime-rpc":"^2.11.1","@actions/http-client":"^3.0.1","@actions/io":"^2.0.0","@azure/abort-controller":"^1.1.0","@azure/core-rest-pipeline":"^1.22.0","@azure/storage-blob":"^12.29.1","semver":"^6.3.1"},"devDependencies":{"@types/node":"^24.1.0","@types/semver":"^6.0.0","@protobuf-ts/plugin":"^2.9.4","typescript":"^5.2.2"},"overrides":{"uri-js":"npm:uri-js-replace@^1.0.1","node-fetch":"^3.3.2"}}');
101683
101729
 
101684
101730
  /***/ })
101685
101731
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cypress/github-action",
3
- "version": "6.10.7",
3
+ "version": "6.10.9",
4
4
  "description": "GitHub Action for running Cypress end-to-end and component tests",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -39,13 +39,13 @@
39
39
  },
40
40
  "homepage": "https://github.com/cypress-io/github-action#readme",
41
41
  "dependencies": {
42
- "@actions/cache": "5.0.1",
43
- "@actions/core": "2.0.1",
42
+ "@actions/cache": "5.0.3",
43
+ "@actions/core": "2.0.2",
44
44
  "@actions/exec": "2.0.0",
45
45
  "@actions/io": "2.0.0",
46
- "@octokit/core": "6.1.4",
46
+ "@octokit/core": "7.0.6",
47
47
  "argument-vector": "1.0.2",
48
- "debug": "4.4.0",
48
+ "debug": "4.4.3",
49
49
  "find-yarn-workspace-root": "2.0.0",
50
50
  "got": "11.8.6",
51
51
  "hasha": "5.2.2",
@@ -53,16 +53,16 @@
53
53
  "supports-color": "9.3.1"
54
54
  },
55
55
  "devDependencies": {
56
- "@eslint/js": "9.38.0",
57
- "@stylistic/eslint-plugin": "5.5.0",
58
- "@types/node": "24.0.15",
56
+ "@eslint/js": "9.39.2",
57
+ "@stylistic/eslint-plugin": "5.7.0",
58
+ "@types/node": "25.0.8",
59
59
  "@vercel/ncc": "0.38.4",
60
- "eslint": "9.38.0",
61
- "eslint-plugin-cypress": "5.2.0",
62
- "globals": "16.4.0",
60
+ "eslint": "9.39.2",
61
+ "eslint-plugin-cypress": "5.2.1",
62
+ "globals": "17.0.0",
63
63
  "husky": "9.1.7",
64
64
  "markdown-link-check": "3.14.2",
65
- "prettier": "3.6.2"
65
+ "prettier": "3.8.0"
66
66
  },
67
67
  "publishConfig": {
68
68
  "access": "public"