@cypress/github-action 5.5.0 → 5.6.0

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 +54 -31
  2. package/dist/index.js +267 -217
  3. package/package.json +10 -13
package/README.md CHANGED
@@ -35,6 +35,7 @@
35
35
  - pass [custom build id](#custom-build-id) when recording to Cypress Cloud
36
36
  - generate a [robust custom build id](#robust-custom-build-id) to allow re-running the workflow
37
37
  - use different [working-directory](#working-directory)
38
+ - use [pnpm](#pnpm)
38
39
  - use [Yarn Classic](#yarn-classic)
39
40
  - use [Yarn Modern](#yarn-modern)
40
41
  - use [Yarn workspaces](#yarn-workspaces)
@@ -116,7 +117,7 @@ When using `cypress-io/github-action@v5` from your workflow file, you automatica
116
117
 
117
118
  ```yml
118
119
  - name: Cypress run
119
- uses: cypress-io/github-action@v5.x.x
120
+ uses: cypress-io/github-action@v5.1.0
120
121
  ```
121
122
 
122
123
  By using the full version tag, you will avoid accidentally using a newer version of the action.
@@ -408,7 +409,7 @@ jobs:
408
409
  # let's make sure our "app" works on several versions of Node
409
410
  strategy:
410
411
  matrix:
411
- node: [14, 16, 18]
412
+ node: [14, 16, 18, 19]
412
413
  name: E2E on Node v${{ matrix.node }}
413
414
  steps:
414
415
  - name: Setup Node
@@ -434,7 +435,7 @@ The recording will have tags as labels on the run.
434
435
 
435
436
  ![Tags](images/tags.png)
436
437
 
437
- You can pass multiple tags using commas like `tag: node-10,nightly,staging`.
438
+ You can pass multiple tags using commas like `tag: node-18,nightly,staging`.
438
439
 
439
440
  ### Specify auto cancel after failures
440
441
 
@@ -996,6 +997,31 @@ jobs:
996
997
 
997
998
  See [cypress-gh-action-subfolders](https://github.com/bahmutov/cypress-gh-action-subfolders) (legacy) for example.
998
999
 
1000
+ ### pnpm
1001
+
1002
+ The package manager `pnpm` is not pre-installed in [GitHub Actions runner images](https://github.com/actions/runner-images) (unlike `npm` and `yarn`): to install `pnpm` include [pnpm/action-setup](https://github.com/pnpm/action-setup) in your workflow. If the action finds a `pnpm-lock.yaml` file, it uses the [pnpm](https://pnpm.io/cli/install) command `pnpm install --frozen-lockfile` by default to install dependencies.
1003
+
1004
+ ```yaml
1005
+ name: example-basic-pnpm
1006
+ on: push
1007
+ jobs:
1008
+ basic-pnpm:
1009
+ runs-on: ubuntu-22.04
1010
+ steps:
1011
+ - name: Checkout
1012
+ uses: actions/checkout@v3
1013
+ - name: Install pnpm
1014
+ uses: pnpm/action-setup@v2
1015
+ with:
1016
+ version: latest
1017
+ - name: Cypress run
1018
+ uses: cypress-io/github-action@v5
1019
+ with:
1020
+ working-directory: examples/basic-pnpm
1021
+ ```
1022
+
1023
+ [![pnpm example](https://github.com/cypress-io/github-action/workflows/example-basic-pnpm/badge.svg?branch=master)](.github/workflows/example-basic-pnpm.yml)
1024
+
999
1025
  ### Yarn Classic
1000
1026
 
1001
1027
  If a `yarn.lock` file is found, the action uses the [Yarn 1 (Classic)](https://classic.yarnpkg.com/) command `yarn --frozen-lockfile` by default to install dependencies.
@@ -1081,7 +1107,7 @@ jobs:
1081
1107
  # let's make sure our "app" works on several versions of Node
1082
1108
  strategy:
1083
1109
  matrix:
1084
- node: [14, 16, 18]
1110
+ node: [14, 16, 18, 19]
1085
1111
  name: E2E on Node v${{ matrix.node }}
1086
1112
  steps:
1087
1113
  - name: Setup Node
@@ -1115,7 +1141,7 @@ jobs:
1115
1141
  runs-on: ubuntu-22.04
1116
1142
  strategy:
1117
1143
  matrix:
1118
- node: [14, 16, 18]
1144
+ node: [14, 16, 18, 19]
1119
1145
  name: E2E on Node v${{ matrix.node }}
1120
1146
  steps:
1121
1147
  - uses: actions/setup-node@v3
@@ -1127,8 +1153,6 @@ jobs:
1127
1153
 
1128
1154
  [![Node versions example](https://github.com/cypress-io/github-action/workflows/example-node-versions/badge.svg?branch=master)](.github/workflows/example-node-versions.yml)
1129
1155
 
1130
- **Note:** because this action uses `npm ci` and `npx` commands, it requires at least Node 8.12 that includes the version of NPM with those commands.
1131
-
1132
1156
  ### Split install and tests
1133
1157
 
1134
1158
  Sometimes you may want to run additional commands between installation and tests. To enable this use the `install` and `runTests` parameters.
@@ -1223,11 +1247,25 @@ See [cypress-gh-action-example](https://github.com/bahmutov/cypress-gh-action-ex
1223
1247
 
1224
1248
  ### Installation
1225
1249
 
1226
- This action installs local dependencies using lock files. If `yarn.lock` file is found, the install uses `yarn --frozen-lockfile` command. Otherwise it expects to find `package-lock.json` and install using `npm ci` command. See the [Yarn Modern](#yarn-modern) example for instructions on installing dependencies using this later version.
1250
+ This action installs local dependencies using lock files. Ensure that exactly one type of lock file is used for each project or working-directory from the following supported package managers:
1227
1251
 
1228
- #### Minimum Node.js
1252
+ | Lock file | Package Manager | Installation command |
1253
+ | ------------------- | ------------------------------------------------------------------------------------------------ | -------------------------------- |
1254
+ | `package-lock.json` | [npm](https://docs.npmjs.com/cli/v9/commands/npm-ci) | `npm ci` |
1255
+ | `pnpm-lock.yaml` | [pnpm](https://pnpm.io/cli/install#--frozen-lockfile) | `pnpm install --frozen-lockfile` |
1256
+ | `yarn.lock` | [Yarn Classic](https://classic.yarnpkg.com/en/docs/cli/install#toc-yarn-install-frozen-lockfile) | `yarn --frozen-lockfile` |
1229
1257
 
1230
- This action uses several production dependencies. The minimum Node version required to run this action depends on the minimum Node version required by the dependencies.
1258
+ See section [Yarn Modern](#yarn-modern) for information about using Yarn version 2 and later.
1259
+
1260
+ #### Node.js Support
1261
+
1262
+ Node.js is required to run this action. The current version `v5` supports:
1263
+
1264
+ - **Node.js** 14.x
1265
+ - **Node.js** 16.x
1266
+ - **Node.js** 18.x and above
1267
+
1268
+ and is generally aligned with [Node.js's release schedule](https://github.com/nodejs/Release).
1231
1269
 
1232
1270
  ## Debugging
1233
1271
 
@@ -1299,7 +1337,9 @@ If you add `workflow_dispatch` event to your workflow, you will be able to start
1299
1337
 
1300
1338
  ### Outputs
1301
1339
 
1302
- This GH Action sets an output `dashboardUrl` if the run was recorded on [Cypress Cloud](https://on.cypress.io/dashboard-introduction), see [action.yml](action.yml). To use this output:
1340
+ This action sets a GitHub step output `dashboardUrl` if the run was recorded on [Cypress Cloud](https://on.cypress.io/dashboard-introduction) using the action parameter setting `record: true` (see [Record test results on Cypress Cloud](#record-test-results-on-cypress-cloud)). Note that using a [Custom test command](#custom-test-command) with the `command` parameter overrides the `record` parameter and in this case no `dashboardUrl` step output is saved.
1341
+
1342
+ This is an example of using the step output `dashboardUrl`:
1303
1343
 
1304
1344
  ```yml
1305
1345
  - name: Cypress tests
@@ -1308,7 +1348,7 @@ This GH Action sets an output `dashboardUrl` if the run was recorded on [Cypress
1308
1348
  # to its output values later
1309
1349
  id: cypress
1310
1350
  # Continue the build in case of an error, as we need to set the
1311
- # commit status in the next step, both in case of success and failure
1351
+ # commit status in the next step, both in case of success or failure
1312
1352
  continue-on-error: true
1313
1353
  with:
1314
1354
  record: true
@@ -1322,25 +1362,7 @@ This GH Action sets an output `dashboardUrl` if the run was recorded on [Cypress
1322
1362
 
1323
1363
  [![recording example](https://github.com/cypress-io/github-action/workflows/example-recording/badge.svg?branch=master)](.github/workflows/example-recording.yml)
1324
1364
 
1325
- **Note:** every GH workflow step can have `outcome` and `conclusion` properties. See the documentation at [steps context](https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#steps-context) page. In particular, the `output` value can be `success`, `failure`, `cancelled`, or `skipped` which you can use the next steps that follow.
1326
-
1327
- ### Docker image
1328
-
1329
- If your repository does not have `package.json` or `yarn.json` (maybe it contains a static site and does not need any dependencies), you can run Cypress tests using `cypress/included:...` [Cypress Docker images](https://github.com/cypress-io/cypress-docker-images/tree/master/included). In that case you don't even need this GH Action, instead use the Docker container and write `cypress run` command like this example from [cypress-gh-action-included](https://github.com/bahmutov/cypress-gh-action-included) (legacy)
1330
-
1331
- ```yml
1332
- name: included
1333
- on: push
1334
- jobs:
1335
- cypress-run:
1336
- runs-on: ubuntu-22.04
1337
- # Docker image with Cypress pre-installed
1338
- # https://github.com/cypress-io/cypress-docker-images/tree/master/included
1339
- container: cypress/included:3.8.3
1340
- steps:
1341
- - uses: actions/checkout@v3
1342
- - run: cypress run
1343
- ```
1365
+ **Note:** every GitHub workflow step can have `outcome` and `conclusion` properties. See the GitHub [Contexts](https://docs.github.com/en/actions/learn-github-actions/contexts) documentation section [steps context](https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#steps-context). In particular, the `outcome` or `conclusion` value can be `success`, `failure`, `cancelled`, or `skipped` which you can use in any following steps.
1344
1366
 
1345
1367
  ### Print Cypress info
1346
1368
 
@@ -1441,6 +1463,7 @@ See [Releases](https://github.com/cypress-io/github-action/releases) for full de
1441
1463
  | Version | Changes |
1442
1464
  | ------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
1443
1465
  | v5 | Examples and workflows additionally use Node.js 18. Use of the end-of-life Node.js version 12 in examples and workflows is removed. |
1466
+ | v4.2.0 | Support for pnpm added. |
1444
1467
  | v4 | Support for Cypress 10 and later versions is added. |
1445
1468
  | v3 | Action runs under Node.js 16 instead of Node.js 12. |
1446
1469
  | v2 | Cypress runs using the [NPM module API](https://docs.cypress.io/guides/guides/module-api) instead of being started via the command line. |
package/dist/index.js CHANGED
@@ -5793,11 +5793,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
5793
5793
  };
5794
5794
  var _a;
5795
5795
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5796
- exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rename = exports.readlink = exports.readdir = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0;
5796
+ exports.getCmdPath = exports.tryGetExecutablePath = exports.isRooted = exports.isDirectory = exports.exists = exports.READONLY = exports.UV_FS_O_EXLOCK = exports.IS_WINDOWS = exports.unlink = exports.symlink = exports.stat = exports.rmdir = exports.rm = exports.rename = exports.readlink = exports.readdir = exports.open = exports.mkdir = exports.lstat = exports.copyFile = exports.chmod = void 0;
5797
5797
  const fs = __importStar(__nccwpck_require__(7147));
5798
5798
  const path = __importStar(__nccwpck_require__(1017));
5799
- _a = fs.promises, exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
5799
+ _a = fs.promises
5800
+ // export const {open} = 'fs'
5801
+ , exports.chmod = _a.chmod, exports.copyFile = _a.copyFile, exports.lstat = _a.lstat, exports.mkdir = _a.mkdir, exports.open = _a.open, exports.readdir = _a.readdir, exports.readlink = _a.readlink, exports.rename = _a.rename, exports.rm = _a.rm, exports.rmdir = _a.rmdir, exports.stat = _a.stat, exports.symlink = _a.symlink, exports.unlink = _a.unlink;
5802
+ // export const {open} = 'fs'
5800
5803
  exports.IS_WINDOWS = process.platform === 'win32';
5804
+ // See https://github.com/nodejs/node/blob/d0153aee367422d0858105abec186da4dff0a0c5/deps/uv/include/uv/win.h#L691
5805
+ exports.UV_FS_O_EXLOCK = 0x10000000;
5806
+ exports.READONLY = fs.constants.O_RDONLY;
5801
5807
  function exists(fsPath) {
5802
5808
  return __awaiter(this, void 0, void 0, function* () {
5803
5809
  try {
@@ -5978,12 +5984,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
5978
5984
  Object.defineProperty(exports, "__esModule", ({ value: true }));
5979
5985
  exports.findInPath = exports.which = exports.mkdirP = exports.rmRF = exports.mv = exports.cp = void 0;
5980
5986
  const assert_1 = __nccwpck_require__(9491);
5981
- const childProcess = __importStar(__nccwpck_require__(2081));
5982
5987
  const path = __importStar(__nccwpck_require__(1017));
5983
- const util_1 = __nccwpck_require__(3837);
5984
5988
  const ioUtil = __importStar(__nccwpck_require__(1962));
5985
- const exec = util_1.promisify(childProcess.exec);
5986
- const execFile = util_1.promisify(childProcess.execFile);
5987
5989
  /**
5988
5990
  * Copies a file or folder.
5989
5991
  * Based off of shelljs - https://github.com/shelljs/shelljs/blob/9237f66c52e5daa40458f94f9565e18e8132f5a6/src/cp.js
@@ -6064,61 +6066,23 @@ exports.mv = mv;
6064
6066
  function rmRF(inputPath) {
6065
6067
  return __awaiter(this, void 0, void 0, function* () {
6066
6068
  if (ioUtil.IS_WINDOWS) {
6067
- // Node doesn't provide a delete operation, only an unlink function. This means that if the file is being used by another
6068
- // program (e.g. antivirus), it won't be deleted. To address this, we shell out the work to rd/del.
6069
6069
  // Check for invalid characters
6070
6070
  // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
6071
6071
  if (/[*"<>|]/.test(inputPath)) {
6072
6072
  throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows');
6073
6073
  }
6074
- try {
6075
- const cmdPath = ioUtil.getCmdPath();
6076
- if (yield ioUtil.isDirectory(inputPath, true)) {
6077
- yield exec(`${cmdPath} /s /c "rd /s /q "%inputPath%""`, {
6078
- env: { inputPath }
6079
- });
6080
- }
6081
- else {
6082
- yield exec(`${cmdPath} /s /c "del /f /a "%inputPath%""`, {
6083
- env: { inputPath }
6084
- });
6085
- }
6086
- }
6087
- catch (err) {
6088
- // if you try to delete a file that doesn't exist, desired result is achieved
6089
- // other errors are valid
6090
- if (err.code !== 'ENOENT')
6091
- throw err;
6092
- }
6093
- // Shelling out fails to remove a symlink folder with missing source, this unlink catches that
6094
- try {
6095
- yield ioUtil.unlink(inputPath);
6096
- }
6097
- catch (err) {
6098
- // if you try to delete a file that doesn't exist, desired result is achieved
6099
- // other errors are valid
6100
- if (err.code !== 'ENOENT')
6101
- throw err;
6102
- }
6103
6074
  }
6104
- else {
6105
- let isDir = false;
6106
- try {
6107
- isDir = yield ioUtil.isDirectory(inputPath);
6108
- }
6109
- catch (err) {
6110
- // if you try to delete a file that doesn't exist, desired result is achieved
6111
- // other errors are valid
6112
- if (err.code !== 'ENOENT')
6113
- throw err;
6114
- return;
6115
- }
6116
- if (isDir) {
6117
- yield execFile(`rm`, [`-rf`, `${inputPath}`]);
6118
- }
6119
- else {
6120
- yield ioUtil.unlink(inputPath);
6121
- }
6075
+ try {
6076
+ // note if path does not exist, error is silent
6077
+ yield ioUtil.rm(inputPath, {
6078
+ force: true,
6079
+ maxRetries: 3,
6080
+ recursive: true,
6081
+ retryDelay: 300
6082
+ });
6083
+ }
6084
+ catch (err) {
6085
+ throw new Error(`File was unable to be removed ${err}`);
6122
6086
  }
6123
6087
  });
6124
6088
  }
@@ -49199,7 +49163,7 @@ exports.colors = [6, 2, 3, 4, 5, 1];
49199
49163
  try {
49200
49164
  // Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
49201
49165
  // eslint-disable-next-line import/no-extraneous-dependencies
49202
- const supportsColor = __nccwpck_require__(9318);
49166
+ const supportsColor = __nccwpck_require__(9364);
49203
49167
 
49204
49168
  if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
49205
49169
  exports.colors = [
@@ -53011,22 +52975,6 @@ exports["default"] = (message) => {
53011
52975
  };
53012
52976
 
53013
52977
 
53014
- /***/ }),
53015
-
53016
- /***/ 1621:
53017
- /***/ ((module) => {
53018
-
53019
- "use strict";
53020
-
53021
-
53022
- module.exports = (flag, argv = process.argv) => {
53023
- const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
53024
- const position = argv.indexOf(prefix + flag);
53025
- const terminatorPosition = argv.indexOf('--');
53026
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
53027
- };
53028
-
53029
-
53030
52978
  /***/ }),
53031
52979
 
53032
52980
  /***/ 4933:
@@ -65483,149 +65431,6 @@ function coerce (version, options) {
65483
65431
  }
65484
65432
 
65485
65433
 
65486
- /***/ }),
65487
-
65488
- /***/ 9318:
65489
- /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
65490
-
65491
- "use strict";
65492
-
65493
- const os = __nccwpck_require__(2037);
65494
- const tty = __nccwpck_require__(6224);
65495
- const hasFlag = __nccwpck_require__(1621);
65496
-
65497
- const {env} = process;
65498
-
65499
- let forceColor;
65500
- if (hasFlag('no-color') ||
65501
- hasFlag('no-colors') ||
65502
- hasFlag('color=false') ||
65503
- hasFlag('color=never')) {
65504
- forceColor = 0;
65505
- } else if (hasFlag('color') ||
65506
- hasFlag('colors') ||
65507
- hasFlag('color=true') ||
65508
- hasFlag('color=always')) {
65509
- forceColor = 1;
65510
- }
65511
-
65512
- if ('FORCE_COLOR' in env) {
65513
- if (env.FORCE_COLOR === 'true') {
65514
- forceColor = 1;
65515
- } else if (env.FORCE_COLOR === 'false') {
65516
- forceColor = 0;
65517
- } else {
65518
- forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
65519
- }
65520
- }
65521
-
65522
- function translateLevel(level) {
65523
- if (level === 0) {
65524
- return false;
65525
- }
65526
-
65527
- return {
65528
- level,
65529
- hasBasic: true,
65530
- has256: level >= 2,
65531
- has16m: level >= 3
65532
- };
65533
- }
65534
-
65535
- function supportsColor(haveStream, streamIsTTY) {
65536
- if (forceColor === 0) {
65537
- return 0;
65538
- }
65539
-
65540
- if (hasFlag('color=16m') ||
65541
- hasFlag('color=full') ||
65542
- hasFlag('color=truecolor')) {
65543
- return 3;
65544
- }
65545
-
65546
- if (hasFlag('color=256')) {
65547
- return 2;
65548
- }
65549
-
65550
- if (haveStream && !streamIsTTY && forceColor === undefined) {
65551
- return 0;
65552
- }
65553
-
65554
- const min = forceColor || 0;
65555
-
65556
- if (env.TERM === 'dumb') {
65557
- return min;
65558
- }
65559
-
65560
- if (process.platform === 'win32') {
65561
- // Windows 10 build 10586 is the first Windows release that supports 256 colors.
65562
- // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
65563
- const osRelease = os.release().split('.');
65564
- if (
65565
- Number(osRelease[0]) >= 10 &&
65566
- Number(osRelease[2]) >= 10586
65567
- ) {
65568
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
65569
- }
65570
-
65571
- return 1;
65572
- }
65573
-
65574
- if ('CI' in env) {
65575
- if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
65576
- return 1;
65577
- }
65578
-
65579
- return min;
65580
- }
65581
-
65582
- if ('TEAMCITY_VERSION' in env) {
65583
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
65584
- }
65585
-
65586
- if (env.COLORTERM === 'truecolor') {
65587
- return 3;
65588
- }
65589
-
65590
- if ('TERM_PROGRAM' in env) {
65591
- const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
65592
-
65593
- switch (env.TERM_PROGRAM) {
65594
- case 'iTerm.app':
65595
- return version >= 3 ? 3 : 2;
65596
- case 'Apple_Terminal':
65597
- return 2;
65598
- // No default
65599
- }
65600
- }
65601
-
65602
- if (/-256(color)?$/i.test(env.TERM)) {
65603
- return 2;
65604
- }
65605
-
65606
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
65607
- return 1;
65608
- }
65609
-
65610
- if ('COLORTERM' in env) {
65611
- return 1;
65612
- }
65613
-
65614
- return min;
65615
- }
65616
-
65617
- function getSupportLevel(stream) {
65618
- const level = supportsColor(stream, stream && stream.isTTY);
65619
- return translateLevel(level);
65620
- }
65621
-
65622
- module.exports = {
65623
- supportsColor: getSupportLevel,
65624
- stdout: translateLevel(supportsColor(true, tty.isatty(1))),
65625
- stderr: translateLevel(supportsColor(true, tty.isatty(2)))
65626
- };
65627
-
65628
-
65629
65434
  /***/ }),
65630
65435
 
65631
65436
  /***/ 1861:
@@ -74251,6 +74056,212 @@ module.exports = require("worker_threads");
74251
74056
  "use strict";
74252
74057
  module.exports = require("zlib");
74253
74058
 
74059
+ /***/ }),
74060
+
74061
+ /***/ 9364:
74062
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __nccwpck_require__) => {
74063
+
74064
+ "use strict";
74065
+ // ESM COMPAT FLAG
74066
+ __nccwpck_require__.r(__webpack_exports__);
74067
+
74068
+ // EXPORTS
74069
+ __nccwpck_require__.d(__webpack_exports__, {
74070
+ "createSupportsColor": () => (/* binding */ createSupportsColor),
74071
+ "default": () => (/* binding */ supports_color)
74072
+ });
74073
+
74074
+ ;// CONCATENATED MODULE: external "node:process"
74075
+ const external_node_process_namespaceObject = require("node:process");
74076
+ ;// CONCATENATED MODULE: external "node:os"
74077
+ const external_node_os_namespaceObject = require("node:os");
74078
+ ;// CONCATENATED MODULE: external "node:tty"
74079
+ const external_node_tty_namespaceObject = require("node:tty");
74080
+ ;// CONCATENATED MODULE: ./node_modules/supports-color/index.js
74081
+
74082
+
74083
+
74084
+
74085
+ // From: https://github.com/sindresorhus/has-flag/blob/main/index.js
74086
+ /// function hasFlag(flag, argv = globalThis.Deno?.args ?? process.argv) {
74087
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : external_node_process_namespaceObject.argv) {
74088
+ const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
74089
+ const position = argv.indexOf(prefix + flag);
74090
+ const terminatorPosition = argv.indexOf('--');
74091
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
74092
+ }
74093
+
74094
+ const {env} = external_node_process_namespaceObject;
74095
+
74096
+ let flagForceColor;
74097
+ if (
74098
+ hasFlag('no-color')
74099
+ || hasFlag('no-colors')
74100
+ || hasFlag('color=false')
74101
+ || hasFlag('color=never')
74102
+ ) {
74103
+ flagForceColor = 0;
74104
+ } else if (
74105
+ hasFlag('color')
74106
+ || hasFlag('colors')
74107
+ || hasFlag('color=true')
74108
+ || hasFlag('color=always')
74109
+ ) {
74110
+ flagForceColor = 1;
74111
+ }
74112
+
74113
+ function envForceColor() {
74114
+ if ('FORCE_COLOR' in env) {
74115
+ if (env.FORCE_COLOR === 'true') {
74116
+ return 1;
74117
+ }
74118
+
74119
+ if (env.FORCE_COLOR === 'false') {
74120
+ return 0;
74121
+ }
74122
+
74123
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
74124
+ }
74125
+ }
74126
+
74127
+ function translateLevel(level) {
74128
+ if (level === 0) {
74129
+ return false;
74130
+ }
74131
+
74132
+ return {
74133
+ level,
74134
+ hasBasic: true,
74135
+ has256: level >= 2,
74136
+ has16m: level >= 3,
74137
+ };
74138
+ }
74139
+
74140
+ function _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
74141
+ const noFlagForceColor = envForceColor();
74142
+ if (noFlagForceColor !== undefined) {
74143
+ flagForceColor = noFlagForceColor;
74144
+ }
74145
+
74146
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
74147
+
74148
+ if (forceColor === 0) {
74149
+ return 0;
74150
+ }
74151
+
74152
+ if (sniffFlags) {
74153
+ if (hasFlag('color=16m')
74154
+ || hasFlag('color=full')
74155
+ || hasFlag('color=truecolor')) {
74156
+ return 3;
74157
+ }
74158
+
74159
+ if (hasFlag('color=256')) {
74160
+ return 2;
74161
+ }
74162
+ }
74163
+
74164
+ // Check for Azure DevOps pipelines.
74165
+ // Has to be above the `!streamIsTTY` check.
74166
+ if ('TF_BUILD' in env && 'AGENT_NAME' in env) {
74167
+ return 1;
74168
+ }
74169
+
74170
+ if (haveStream && !streamIsTTY && forceColor === undefined) {
74171
+ return 0;
74172
+ }
74173
+
74174
+ const min = forceColor || 0;
74175
+
74176
+ if (env.TERM === 'dumb') {
74177
+ return min;
74178
+ }
74179
+
74180
+ if (external_node_process_namespaceObject.platform === 'win32') {
74181
+ // Windows 10 build 10586 is the first Windows release that supports 256 colors.
74182
+ // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
74183
+ const osRelease = external_node_os_namespaceObject.release().split('.');
74184
+ if (
74185
+ Number(osRelease[0]) >= 10
74186
+ && Number(osRelease[2]) >= 10_586
74187
+ ) {
74188
+ return Number(osRelease[2]) >= 14_931 ? 3 : 2;
74189
+ }
74190
+
74191
+ return 1;
74192
+ }
74193
+
74194
+ if ('CI' in env) {
74195
+ if ('GITHUB_ACTIONS' in env) {
74196
+ return 3;
74197
+ }
74198
+
74199
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
74200
+ return 1;
74201
+ }
74202
+
74203
+ return min;
74204
+ }
74205
+
74206
+ if ('TEAMCITY_VERSION' in env) {
74207
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
74208
+ }
74209
+
74210
+ if (env.COLORTERM === 'truecolor') {
74211
+ return 3;
74212
+ }
74213
+
74214
+ if (env.TERM === 'xterm-kitty') {
74215
+ return 3;
74216
+ }
74217
+
74218
+ if ('TERM_PROGRAM' in env) {
74219
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
74220
+
74221
+ switch (env.TERM_PROGRAM) {
74222
+ case 'iTerm.app': {
74223
+ return version >= 3 ? 3 : 2;
74224
+ }
74225
+
74226
+ case 'Apple_Terminal': {
74227
+ return 2;
74228
+ }
74229
+ // No default
74230
+ }
74231
+ }
74232
+
74233
+ if (/-256(color)?$/i.test(env.TERM)) {
74234
+ return 2;
74235
+ }
74236
+
74237
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
74238
+ return 1;
74239
+ }
74240
+
74241
+ if ('COLORTERM' in env) {
74242
+ return 1;
74243
+ }
74244
+
74245
+ return min;
74246
+ }
74247
+
74248
+ function createSupportsColor(stream, options = {}) {
74249
+ const level = _supportsColor(stream, {
74250
+ streamIsTTY: stream && stream.isTTY,
74251
+ ...options,
74252
+ });
74253
+
74254
+ return translateLevel(level);
74255
+ }
74256
+
74257
+ const supportsColor = {
74258
+ stdout: createSupportsColor({isTTY: external_node_tty_namespaceObject.isatty(1)}),
74259
+ stderr: createSupportsColor({isTTY: external_node_tty_namespaceObject.isatty(2)}),
74260
+ };
74261
+
74262
+ /* harmony default export */ const supports_color = (supportsColor);
74263
+
74264
+
74254
74265
  /***/ }),
74255
74266
 
74256
74267
  /***/ 3765:
@@ -74302,6 +74313,34 @@ module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"]
74302
74313
  /******/ }
74303
74314
  /******/
74304
74315
  /************************************************************************/
74316
+ /******/ /* webpack/runtime/define property getters */
74317
+ /******/ (() => {
74318
+ /******/ // define getter functions for harmony exports
74319
+ /******/ __nccwpck_require__.d = (exports, definition) => {
74320
+ /******/ for(var key in definition) {
74321
+ /******/ if(__nccwpck_require__.o(definition, key) && !__nccwpck_require__.o(exports, key)) {
74322
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
74323
+ /******/ }
74324
+ /******/ }
74325
+ /******/ };
74326
+ /******/ })();
74327
+ /******/
74328
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
74329
+ /******/ (() => {
74330
+ /******/ __nccwpck_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
74331
+ /******/ })();
74332
+ /******/
74333
+ /******/ /* webpack/runtime/make namespace object */
74334
+ /******/ (() => {
74335
+ /******/ // define __esModule on exports
74336
+ /******/ __nccwpck_require__.r = (exports) => {
74337
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
74338
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
74339
+ /******/ }
74340
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
74341
+ /******/ };
74342
+ /******/ })();
74343
+ /******/
74305
74344
  /******/ /* webpack/runtime/compat */
74306
74345
  /******/
74307
74346
  /******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
@@ -74415,20 +74454,31 @@ const packageLockFilename = path.join(
74415
74454
  )
74416
74455
 
74417
74456
  const useYarn = () => fs.existsSync(yarnFilename)
74418
-
74419
74457
  const usePnpm = () => fs.existsSync(pnpmLockFilename)
74458
+ const useNpm = () => fs.existsSync(packageLockFilename)
74420
74459
 
74421
74460
  const lockHash = () => {
74422
74461
  const lockFilename = useYarn()
74423
74462
  ? yarnFilename
74424
74463
  : usePnpm()
74425
74464
  ? pnpmLockFilename
74426
- : packageLockFilename
74465
+ : useNpm()
74466
+ ? packageLockFilename
74467
+ : noLockFile()
74427
74468
  const fileHash = hasha.fromFileSync(lockFilename)
74428
74469
  debug(`Hash from file ${lockFilename} is ${fileHash}`)
74429
74470
  return fileHash
74430
74471
  }
74431
74472
 
74473
+ const noLockFile = () => {
74474
+ core.error(
74475
+ `Action failed. Missing package manager lockfile. ` +
74476
+ `Expecting one of package-lock.json (npm), pnpm-lock.yaml (pnpm) or yarn.lock (yarn) in working-directory ` +
74477
+ workingDirectory
74478
+ )
74479
+ process.exit(1)
74480
+ }
74481
+
74432
74482
  // enforce the same NPM cache folder across different operating systems
74433
74483
  const NPM_CACHE_FOLDER = path.join(homeDirectory, '.npm')
74434
74484
  const getNpmCache = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cypress/github-action",
3
- "version": "5.5.0",
3
+ "version": "5.6.0",
4
4
  "description": "GitHub Action for running Cypress end-to-end and component tests",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
@@ -12,9 +12,10 @@
12
12
  "scripts": {
13
13
  "test": "echo \"There are no tests :(\"",
14
14
  "build": "ncc build -o dist index.js",
15
- "format": "prettier --write index.js",
15
+ "format": "prettier --write index.js src/ping.js",
16
16
  "check:markdown": "find *.md docs/*.md -print0 | xargs -0 -n1 markdown-link-check -c md-linkcheck.json",
17
- "update:cypress": "./scripts/update-cypress-latest.sh"
17
+ "update:cypress": "./scripts/update-cypress-latest.sh",
18
+ "prepare": "husky install"
18
19
  },
19
20
  "repository": {
20
21
  "type": "git",
@@ -34,28 +35,24 @@
34
35
  "@actions/cache": "3.2.1",
35
36
  "@actions/core": "1.10.0",
36
37
  "@actions/exec": "1.1.1",
37
- "@actions/io": "1.1.2",
38
+ "@actions/io": "1.1.3",
38
39
  "@octokit/core": "4.2.0",
39
40
  "argument-vector": "1.0.2",
40
41
  "debug": "4.3.4",
41
42
  "find-yarn-workspace-root": "2.0.0",
42
43
  "got": "11.8.6",
43
44
  "hasha": "5.2.2",
44
- "quote": "0.4.0"
45
+ "quote": "0.4.0",
46
+ "supports-color": "9.3.1"
45
47
  },
46
48
  "devDependencies": {
47
- "@types/node": "18.15.3",
49
+ "@types/node": "18.15.10",
48
50
  "@vercel/ncc": "0.36.1",
49
- "husky": "7.0.4",
50
- "markdown-link-check": "3.10.3",
51
+ "husky": "8.0.3",
52
+ "markdown-link-check": "3.11.0",
51
53
  "prettier": "2.8.4"
52
54
  },
53
55
  "publishConfig": {
54
56
  "access": "public"
55
- },
56
- "husky": {
57
- "hooks": {
58
- "pre-commit": "npm run format && npm run build && git add index.js dist"
59
- }
60
57
  }
61
58
  }