@cypress/github-action 6.7.0 → 6.7.2

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 +23 -1
  2. package/dist/index.js +67 -55
  3. package/package.json +5 -5
package/README.md CHANGED
@@ -243,6 +243,28 @@ Replace the `latest` tag with a specific version image tag from [`cypress/browse
243
243
 
244
244
  Include `options: --user 1001` to avoid permissions issues.
245
245
 
246
+ When using [cypress/included](https://github.com/cypress-io/cypress-docker-images/tree/master/included) Docker images, set the environment variable `CYPRESS_INSTALL_BINARY=0` to suppress saving the Cypress binary cache, otherwise cache restore errors may occur. The example below shows how to do this:
247
+
248
+ ```yml
249
+ name: Test with Docker cypress/included
250
+ on: push
251
+ jobs:
252
+ cypress-run:
253
+ runs-on: ubuntu-22.04
254
+ container:
255
+ # Cypress Docker image from https://hub.docker.com/r/cypress/included
256
+ # with Cypress globally pre-installed
257
+ image: cypress/included:latest
258
+ options: --user 1001
259
+ steps:
260
+ - uses: actions/checkout@v4
261
+ - uses: cypress-io/github-action@v6
262
+ with:
263
+ browser: chrome
264
+ env:
265
+ CYPRESS_INSTALL_BINARY: 0
266
+ ```
267
+
246
268
  Refer to [cypress-io/cypress-docker-images](https://github.com/cypress-io/cypress-docker-images) for further information about using Cypress Docker images. Cypress offers the [Cypress Docker Factory](https://github.com/cypress-io/cypress-docker-images/tree/master/factory) to generate additional Docker images with selected components and versions.
247
269
 
248
270
  [![Docker example](https://github.com/cypress-io/github-action/actions/workflows/example-docker.yml/badge.svg)](.github/workflows/example-docker.yml)
@@ -1148,7 +1170,7 @@ If you are using [pnpm workspaces](https://pnpm.io/workspaces) you need to insta
1148
1170
 
1149
1171
  [![pnpm workspaces example](https://github.com/cypress-io/github-action/actions/workflows/example-start-and-pnpm-workspaces.yml/badge.svg)](.github/workflows/example-start-and-pnpm-workspaces.yml)
1150
1172
 
1151
- See the example project [start-and-pnpm-workspaces](examples/start-and-pnpm-workspaces/) and the [example-start-and-pnpm-workspaces.yml](.github/workflows/example-start-and-pnpm-workspaces.yml) workflow for a full working example including pnpm caching.
1173
+ See the example project [start-and-pnpm-workspaces](examples/start-and-pnpm-workspaces/) and the [example-start-and-pnpm-workspaces.yml](.github/workflows/example-start-and-pnpm-workspaces.yml) workflow for a full working example.
1152
1174
 
1153
1175
  ### Yarn Classic
1154
1176
 
package/dist/index.js CHANGED
@@ -46556,8 +46556,8 @@ const braces = (input, options = {}) => {
46556
46556
  let output = [];
46557
46557
 
46558
46558
  if (Array.isArray(input)) {
46559
- for (let pattern of input) {
46560
- let result = braces.create(pattern, options);
46559
+ for (const pattern of input) {
46560
+ const result = braces.create(pattern, options);
46561
46561
  if (Array.isArray(result)) {
46562
46562
  output.push(...result);
46563
46563
  } else {
@@ -46691,7 +46691,7 @@ braces.create = (input, options = {}) => {
46691
46691
  return [input];
46692
46692
  }
46693
46693
 
46694
- return options.expand !== true
46694
+ return options.expand !== true
46695
46695
  ? braces.compile(input, options)
46696
46696
  : braces.expand(input, options);
46697
46697
  };
@@ -46715,30 +46715,32 @@ const fill = __nccwpck_require__(6330);
46715
46715
  const utils = __nccwpck_require__(5207);
46716
46716
 
46717
46717
  const compile = (ast, options = {}) => {
46718
- let walk = (node, parent = {}) => {
46719
- let invalidBlock = utils.isInvalidBrace(parent);
46720
- let invalidNode = node.invalid === true && options.escapeInvalid === true;
46721
- let invalid = invalidBlock === true || invalidNode === true;
46722
- let prefix = options.escapeInvalid === true ? '\\' : '';
46718
+ const walk = (node, parent = {}) => {
46719
+ const invalidBlock = utils.isInvalidBrace(parent);
46720
+ const invalidNode = node.invalid === true && options.escapeInvalid === true;
46721
+ const invalid = invalidBlock === true || invalidNode === true;
46722
+ const prefix = options.escapeInvalid === true ? '\\' : '';
46723
46723
  let output = '';
46724
46724
 
46725
46725
  if (node.isOpen === true) {
46726
46726
  return prefix + node.value;
46727
46727
  }
46728
+
46728
46729
  if (node.isClose === true) {
46730
+ console.log('node.isClose', prefix, node.value);
46729
46731
  return prefix + node.value;
46730
46732
  }
46731
46733
 
46732
46734
  if (node.type === 'open') {
46733
- return invalid ? (prefix + node.value) : '(';
46735
+ return invalid ? prefix + node.value : '(';
46734
46736
  }
46735
46737
 
46736
46738
  if (node.type === 'close') {
46737
- return invalid ? (prefix + node.value) : ')';
46739
+ return invalid ? prefix + node.value : ')';
46738
46740
  }
46739
46741
 
46740
46742
  if (node.type === 'comma') {
46741
- return node.prev.type === 'comma' ? '' : (invalid ? node.value : '|');
46743
+ return node.prev.type === 'comma' ? '' : invalid ? node.value : '|';
46742
46744
  }
46743
46745
 
46744
46746
  if (node.value) {
@@ -46746,8 +46748,8 @@ const compile = (ast, options = {}) => {
46746
46748
  }
46747
46749
 
46748
46750
  if (node.nodes && node.ranges > 0) {
46749
- let args = utils.reduce(node.nodes);
46750
- let range = fill(...args, { ...options, wrap: false, toRegex: true });
46751
+ const args = utils.reduce(node.nodes);
46752
+ const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true });
46751
46753
 
46752
46754
  if (range.length !== 0) {
46753
46755
  return args.length > 1 && range.length > 1 ? `(${range})` : range;
@@ -46755,10 +46757,11 @@ const compile = (ast, options = {}) => {
46755
46757
  }
46756
46758
 
46757
46759
  if (node.nodes) {
46758
- for (let child of node.nodes) {
46760
+ for (const child of node.nodes) {
46759
46761
  output += walk(child, node);
46760
46762
  }
46761
46763
  }
46764
+
46762
46765
  return output;
46763
46766
  };
46764
46767
 
@@ -46777,7 +46780,7 @@ module.exports = compile;
46777
46780
 
46778
46781
 
46779
46782
  module.exports = {
46780
- MAX_LENGTH: 1024 * 64,
46783
+ MAX_LENGTH: 10000,
46781
46784
 
46782
46785
  // Digits
46783
46786
  CHAR_0: '0', /* 0 */
@@ -46846,7 +46849,7 @@ const stringify = __nccwpck_require__(8750);
46846
46849
  const utils = __nccwpck_require__(5207);
46847
46850
 
46848
46851
  const append = (queue = '', stash = '', enclose = false) => {
46849
- let result = [];
46852
+ const result = [];
46850
46853
 
46851
46854
  queue = [].concat(queue);
46852
46855
  stash = [].concat(stash);
@@ -46856,15 +46859,15 @@ const append = (queue = '', stash = '', enclose = false) => {
46856
46859
  return enclose ? utils.flatten(stash).map(ele => `{${ele}}`) : stash;
46857
46860
  }
46858
46861
 
46859
- for (let item of queue) {
46862
+ for (const item of queue) {
46860
46863
  if (Array.isArray(item)) {
46861
- for (let value of item) {
46864
+ for (const value of item) {
46862
46865
  result.push(append(value, stash, enclose));
46863
46866
  }
46864
46867
  } else {
46865
46868
  for (let ele of stash) {
46866
46869
  if (enclose === true && typeof ele === 'string') ele = `{${ele}}`;
46867
- result.push(Array.isArray(ele) ? append(item, ele, enclose) : (item + ele));
46870
+ result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
46868
46871
  }
46869
46872
  }
46870
46873
  }
@@ -46872,9 +46875,9 @@ const append = (queue = '', stash = '', enclose = false) => {
46872
46875
  };
46873
46876
 
46874
46877
  const expand = (ast, options = {}) => {
46875
- let rangeLimit = options.rangeLimit === void 0 ? 1000 : options.rangeLimit;
46878
+ const rangeLimit = options.rangeLimit === undefined ? 1000 : options.rangeLimit;
46876
46879
 
46877
- let walk = (node, parent = {}) => {
46880
+ const walk = (node, parent = {}) => {
46878
46881
  node.queue = [];
46879
46882
 
46880
46883
  let p = parent;
@@ -46896,7 +46899,7 @@ const expand = (ast, options = {}) => {
46896
46899
  }
46897
46900
 
46898
46901
  if (node.nodes && node.ranges > 0) {
46899
- let args = utils.reduce(node.nodes);
46902
+ const args = utils.reduce(node.nodes);
46900
46903
 
46901
46904
  if (utils.exceedsLimit(...args, options.step, rangeLimit)) {
46902
46905
  throw new RangeError('expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.');
@@ -46912,7 +46915,7 @@ const expand = (ast, options = {}) => {
46912
46915
  return;
46913
46916
  }
46914
46917
 
46915
- let enclose = utils.encloseBrace(node);
46918
+ const enclose = utils.encloseBrace(node);
46916
46919
  let queue = node.queue;
46917
46920
  let block = node;
46918
46921
 
@@ -46922,7 +46925,7 @@ const expand = (ast, options = {}) => {
46922
46925
  }
46923
46926
 
46924
46927
  for (let i = 0; i < node.nodes.length; i++) {
46925
- let child = node.nodes[i];
46928
+ const child = node.nodes[i];
46926
46929
 
46927
46930
  if (child.type === 'comma' && node.type === 'brace') {
46928
46931
  if (i === 1) queue.push('');
@@ -46995,22 +46998,21 @@ const parse = (input, options = {}) => {
46995
46998
  throw new TypeError('Expected a string');
46996
46999
  }
46997
47000
 
46998
- let opts = options || {};
46999
- let max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
47001
+ const opts = options || {};
47002
+ const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
47000
47003
  if (input.length > max) {
47001
47004
  throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
47002
47005
  }
47003
47006
 
47004
- let ast = { type: 'root', input, nodes: [] };
47005
- let stack = [ast];
47007
+ const ast = { type: 'root', input, nodes: [] };
47008
+ const stack = [ast];
47006
47009
  let block = ast;
47007
47010
  let prev = ast;
47008
47011
  let brackets = 0;
47009
- let length = input.length;
47012
+ const length = input.length;
47010
47013
  let index = 0;
47011
47014
  let depth = 0;
47012
47015
  let value;
47013
- let memo = {};
47014
47016
 
47015
47017
  /**
47016
47018
  * Helpers
@@ -47073,7 +47075,6 @@ const parse = (input, options = {}) => {
47073
47075
  if (value === CHAR_LEFT_SQUARE_BRACKET) {
47074
47076
  brackets++;
47075
47077
 
47076
- let closed = true;
47077
47078
  let next;
47078
47079
 
47079
47080
  while (index < length && (next = advance())) {
@@ -47129,7 +47130,7 @@ const parse = (input, options = {}) => {
47129
47130
  */
47130
47131
 
47131
47132
  if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
47132
- let open = value;
47133
+ const open = value;
47133
47134
  let next;
47134
47135
 
47135
47136
  if (options.keepQuotes !== true) {
@@ -47161,8 +47162,8 @@ const parse = (input, options = {}) => {
47161
47162
  if (value === CHAR_LEFT_CURLY_BRACE) {
47162
47163
  depth++;
47163
47164
 
47164
- let dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;
47165
- let brace = {
47165
+ const dollar = prev.value && prev.value.slice(-1) === '$' || block.dollar === true;
47166
+ const brace = {
47166
47167
  type: 'brace',
47167
47168
  open: true,
47168
47169
  close: false,
@@ -47189,7 +47190,7 @@ const parse = (input, options = {}) => {
47189
47190
  continue;
47190
47191
  }
47191
47192
 
47192
- let type = 'close';
47193
+ const type = 'close';
47193
47194
  block = stack.pop();
47194
47195
  block.close = true;
47195
47196
 
@@ -47207,7 +47208,7 @@ const parse = (input, options = {}) => {
47207
47208
  if (value === CHAR_COMMA && depth > 0) {
47208
47209
  if (block.ranges > 0) {
47209
47210
  block.ranges = 0;
47210
- let open = block.nodes.shift();
47211
+ const open = block.nodes.shift();
47211
47212
  block.nodes = [open, { type: 'text', value: stringify(block) }];
47212
47213
  }
47213
47214
 
@@ -47221,7 +47222,7 @@ const parse = (input, options = {}) => {
47221
47222
  */
47222
47223
 
47223
47224
  if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
47224
- let siblings = block.nodes;
47225
+ const siblings = block.nodes;
47225
47226
 
47226
47227
  if (depth === 0 || siblings.length === 0) {
47227
47228
  push({ type: 'text', value });
@@ -47248,7 +47249,7 @@ const parse = (input, options = {}) => {
47248
47249
  if (prev.type === 'range') {
47249
47250
  siblings.pop();
47250
47251
 
47251
- let before = siblings[siblings.length - 1];
47252
+ const before = siblings[siblings.length - 1];
47252
47253
  before.value += prev.value + value;
47253
47254
  prev = before;
47254
47255
  block.ranges--;
@@ -47281,8 +47282,8 @@ const parse = (input, options = {}) => {
47281
47282
  });
47282
47283
 
47283
47284
  // get the location of the block on parent.nodes (block's siblings)
47284
- let parent = stack[stack.length - 1];
47285
- let index = parent.nodes.indexOf(block);
47285
+ const parent = stack[stack.length - 1];
47286
+ const index = parent.nodes.indexOf(block);
47286
47287
  // replace the (invalid) block with it's nodes
47287
47288
  parent.nodes.splice(index, 1, ...block.nodes);
47288
47289
  }
@@ -47306,9 +47307,9 @@ module.exports = parse;
47306
47307
  const utils = __nccwpck_require__(5207);
47307
47308
 
47308
47309
  module.exports = (ast, options = {}) => {
47309
- let stringify = (node, parent = {}) => {
47310
- let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
47311
- let invalidNode = node.invalid === true && options.escapeInvalid === true;
47310
+ const stringify = (node, parent = {}) => {
47311
+ const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent);
47312
+ const invalidNode = node.invalid === true && options.escapeInvalid === true;
47312
47313
  let output = '';
47313
47314
 
47314
47315
  if (node.value) {
@@ -47323,7 +47324,7 @@ module.exports = (ast, options = {}) => {
47323
47324
  }
47324
47325
 
47325
47326
  if (node.nodes) {
47326
- for (let child of node.nodes) {
47327
+ for (const child of node.nodes) {
47327
47328
  output += stringify(child);
47328
47329
  }
47329
47330
  }
@@ -47374,7 +47375,7 @@ exports.exceedsLimit = (min, max, step = 1, limit) => {
47374
47375
  */
47375
47376
 
47376
47377
  exports.escapeNode = (block, n = 0, type) => {
47377
- let node = block.nodes[n];
47378
+ const node = block.nodes[n];
47378
47379
  if (!node) return;
47379
47380
 
47380
47381
  if ((type && node.type === type) || node.type === 'open' || node.type === 'close') {
@@ -47443,13 +47444,23 @@ exports.reduce = nodes => nodes.reduce((acc, node) => {
47443
47444
 
47444
47445
  exports.flatten = (...args) => {
47445
47446
  const result = [];
47447
+
47446
47448
  const flat = arr => {
47447
47449
  for (let i = 0; i < arr.length; i++) {
47448
- let ele = arr[i];
47449
- Array.isArray(ele) ? flat(ele, result) : ele !== void 0 && result.push(ele);
47450
+ const ele = arr[i];
47451
+
47452
+ if (Array.isArray(ele)) {
47453
+ flat(ele);
47454
+ continue;
47455
+ }
47456
+
47457
+ if (ele !== undefined) {
47458
+ result.push(ele);
47459
+ }
47450
47460
  }
47451
47461
  return result;
47452
47462
  };
47463
+
47453
47464
  flat(args);
47454
47465
  return result;
47455
47466
  };
@@ -48678,6 +48689,8 @@ function useColors() {
48678
48689
  return false;
48679
48690
  }
48680
48691
 
48692
+ let m;
48693
+
48681
48694
  // Is webkit? http://stackoverflow.com/a/16459606/376773
48682
48695
  // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
48683
48696
  return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
@@ -48685,7 +48698,7 @@ function useColors() {
48685
48698
  (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
48686
48699
  // Is firefox >= v31?
48687
48700
  // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
48688
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
48701
+ (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
48689
48702
  // Double check webkit in userAgent just in case we are in a worker
48690
48703
  (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
48691
48704
  }
@@ -49314,11 +49327,11 @@ function getDate() {
49314
49327
  }
49315
49328
 
49316
49329
  /**
49317
- * Invokes `util.format()` with the specified arguments and writes to stderr.
49330
+ * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
49318
49331
  */
49319
49332
 
49320
49333
  function log(...args) {
49321
- return process.stderr.write(util.format(...args) + '\n');
49334
+ return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
49322
49335
  }
49323
49336
 
49324
49337
  /**
@@ -49907,7 +49920,7 @@ const toMaxLen = (input, maxLength) => {
49907
49920
  return negative ? ('-' + input) : input;
49908
49921
  };
49909
49922
 
49910
- const toSequence = (parts, options) => {
49923
+ const toSequence = (parts, options, maxLen) => {
49911
49924
  parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
49912
49925
  parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
49913
49926
 
@@ -49917,11 +49930,11 @@ const toSequence = (parts, options) => {
49917
49930
  let result;
49918
49931
 
49919
49932
  if (parts.positives.length) {
49920
- positives = parts.positives.join('|');
49933
+ positives = parts.positives.map(v => toMaxLen(String(v), maxLen)).join('|');
49921
49934
  }
49922
49935
 
49923
49936
  if (parts.negatives.length) {
49924
- negatives = `-(${prefix}${parts.negatives.join('|')})`;
49937
+ negatives = `-(${prefix}${parts.negatives.map(v => toMaxLen(String(v), maxLen)).join('|')})`;
49925
49938
  }
49926
49939
 
49927
49940
  if (positives && negatives) {
@@ -50019,7 +50032,7 @@ const fillNumbers = (start, end, step = 1, options = {}) => {
50019
50032
 
50020
50033
  if (options.toRegex === true) {
50021
50034
  return step > 1
50022
- ? toSequence(parts, options)
50035
+ ? toSequence(parts, options, maxLen)
50023
50036
  : toRegex(range, null, { wrap: false, ...options });
50024
50037
  }
50025
50038
 
@@ -50031,7 +50044,6 @@ const fillLetters = (start, end, step = 1, options = {}) => {
50031
50044
  return invalidRange(start, end, options);
50032
50045
  }
50033
50046
 
50034
-
50035
50047
  let format = options.transform || (val => String.fromCharCode(val));
50036
50048
  let a = `${start}`.charCodeAt(0);
50037
50049
  let b = `${end}`.charCodeAt(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cypress/github-action",
3
- "version": "6.7.0",
3
+ "version": "6.7.2",
4
4
  "description": "GitHub Action for running Cypress end-to-end and component tests",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -38,7 +38,7 @@
38
38
  "@actions/io": "1.1.3",
39
39
  "@octokit/core": "4.2.0",
40
40
  "argument-vector": "1.0.2",
41
- "debug": "4.3.4",
41
+ "debug": "4.3.6",
42
42
  "find-yarn-workspace-root": "2.0.0",
43
43
  "got": "11.8.6",
44
44
  "hasha": "5.2.2",
@@ -46,11 +46,11 @@
46
46
  "supports-color": "9.3.1"
47
47
  },
48
48
  "devDependencies": {
49
- "@types/node": "20.12.12",
49
+ "@types/node": "20.14.11",
50
50
  "@vercel/ncc": "0.38.1",
51
- "husky": "9.0.11",
51
+ "husky": "9.1.1",
52
52
  "markdown-link-check": "3.12.2",
53
- "prettier": "3.2.5"
53
+ "prettier": "3.3.3"
54
54
  },
55
55
  "publishConfig": {
56
56
  "access": "public"