@cypress/github-action 6.6.1 → 6.7.1
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.
- package/README.md +68 -56
- package/dist/index.js +62 -52
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
- Use different [working-directory](#working-directory)
|
|
47
47
|
- Use [subfolders](#subfolders)
|
|
48
48
|
- Use [pnpm](#pnpm)
|
|
49
|
+
- Use [pnpm workspaces](#pnpm-workspaces)
|
|
49
50
|
- Use [Yarn Classic](#yarn-classic)
|
|
50
51
|
- Use [Yarn Modern](#yarn-modern)
|
|
51
52
|
- Use [Yarn Plug'n'Play](#yarn-plugnplay)
|
|
@@ -66,7 +67,7 @@ Examples contained in this repository, based on current Cypress versions, can be
|
|
|
66
67
|
|
|
67
68
|
Live examples, such as [example-basic.yml](.github/workflows/example-basic.yml) are shown together with a status badge. Click on the status badge to read the source code of the workflow, for example
|
|
68
69
|
|
|
69
|
-
[](.github/workflows/example-basic.yml)
|
|
70
71
|
|
|
71
72
|
Older **external** examples based on a [Legacy Configuration](https://on.cypress.io/guides/references/legacy-configuration) for Cypress `9` and earlier can be found in the [README](https://github.com/cypress-io/github-action/blob/v5/README.md) for version `v5`.
|
|
72
73
|
|
|
@@ -89,7 +90,7 @@ jobs:
|
|
|
89
90
|
uses: cypress-io/github-action@v6
|
|
90
91
|
```
|
|
91
92
|
|
|
92
|
-
[](.github/workflows/example-basic.yml)
|
|
93
94
|
|
|
94
95
|
The workflow file [example-basic.yml](.github/workflows/example-basic.yml) shows how Cypress runs on GH Actions using Ubuntu (20 and 22), Windows, and macOS without additional OS dependencies necessary.
|
|
95
96
|
|
|
@@ -100,7 +101,7 @@ This workflow uses the default [test type](https://on.cypress.io/guides/overview
|
|
|
100
101
|
To use [Cypress Component Testing](https://on.cypress.io/component-testing) add `component: true`
|
|
101
102
|
|
|
102
103
|
```yml
|
|
103
|
-
name:
|
|
104
|
+
name: Component tests
|
|
104
105
|
on: push
|
|
105
106
|
jobs:
|
|
106
107
|
cypress-run:
|
|
@@ -114,7 +115,7 @@ jobs:
|
|
|
114
115
|
component: true
|
|
115
116
|
```
|
|
116
117
|
|
|
117
|
-
[](.github/workflows/example-component-test.yml)
|
|
118
119
|
|
|
119
120
|
See the example project [component-tests](examples/component-tests/) and the [example-component-test.yml](.github/workflows/example-component-test.yml) workflow for more details.
|
|
120
121
|
|
|
@@ -160,7 +161,7 @@ jobs:
|
|
|
160
161
|
browser: chrome
|
|
161
162
|
```
|
|
162
163
|
|
|
163
|
-
[](.github/workflows/example-chrome.yml)
|
|
164
165
|
|
|
165
166
|
### Firefox
|
|
166
167
|
|
|
@@ -178,7 +179,7 @@ jobs:
|
|
|
178
179
|
browser: firefox
|
|
179
180
|
```
|
|
180
181
|
|
|
181
|
-
[](.github/workflows/example-firefox.yml)
|
|
182
183
|
|
|
183
184
|
### Edge
|
|
184
185
|
|
|
@@ -196,7 +197,7 @@ jobs:
|
|
|
196
197
|
browser: edge
|
|
197
198
|
```
|
|
198
199
|
|
|
199
|
-
[](.github/workflows/example-edge.yml)
|
|
200
201
|
|
|
201
202
|
### Headed
|
|
202
203
|
|
|
@@ -244,7 +245,7 @@ Include `options: --user 1001` to avoid permissions issues.
|
|
|
244
245
|
|
|
245
246
|
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.
|
|
246
247
|
|
|
247
|
-
[](.github/workflows/example-docker.yml)
|
|
248
249
|
|
|
249
250
|
### Env
|
|
250
251
|
|
|
@@ -287,7 +288,7 @@ jobs:
|
|
|
287
288
|
|
|
288
289
|
For more examples, see the workflows below, using environment variables for [recording](#record-test-results-on-cypress-cloud).
|
|
289
290
|
|
|
290
|
-
[](.github/workflows/example-env.yml)
|
|
291
292
|
|
|
292
293
|
### Specs
|
|
293
294
|
|
|
@@ -368,7 +369,7 @@ jobs:
|
|
|
368
369
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
369
370
|
```
|
|
370
371
|
|
|
371
|
-
[](.github/workflows/example-recording.yml)
|
|
372
373
|
|
|
373
374
|
### Project ID and Record Key
|
|
374
375
|
|
|
@@ -508,7 +509,7 @@ jobs:
|
|
|
508
509
|
# let's make sure our "app" works on several versions of Node
|
|
509
510
|
strategy:
|
|
510
511
|
matrix:
|
|
511
|
-
node: [18, 20,
|
|
512
|
+
node: [18, 20, 22]
|
|
512
513
|
name: E2E on Node v${{ matrix.node }}
|
|
513
514
|
steps:
|
|
514
515
|
- name: Setup Node
|
|
@@ -618,7 +619,7 @@ jobs:
|
|
|
618
619
|
quiet: true
|
|
619
620
|
```
|
|
620
621
|
|
|
621
|
-
[](.github/workflows/example-quiet.yml)
|
|
622
623
|
|
|
623
624
|
### Config
|
|
624
625
|
|
|
@@ -641,7 +642,7 @@ jobs:
|
|
|
641
642
|
config: pageLoadTimeout=100000,baseUrl=http://localhost:3000
|
|
642
643
|
```
|
|
643
644
|
|
|
644
|
-
[](.github/workflows/example-config.yml)
|
|
645
646
|
|
|
646
647
|
### Config File
|
|
647
648
|
|
|
@@ -664,7 +665,7 @@ jobs:
|
|
|
664
665
|
config-file: cypress.config-alternate.js
|
|
665
666
|
```
|
|
666
667
|
|
|
667
|
-
[](.github/workflows/example-config.yml)
|
|
668
669
|
|
|
669
670
|
### Parallel
|
|
670
671
|
|
|
@@ -710,9 +711,13 @@ jobs:
|
|
|
710
711
|
|
|
711
712
|

|
|
712
713
|
|
|
713
|
-
|
|
714
|
+
The Cypress GH Action does not spawn or create any additional containers - it only links the multiple containers spawned using the matrix strategy into a single logical Cypress Cloud run where it splits the specs amongst the machines. See the [Cypress Cloud Smart Orchestration](https://on.cypress.io/guides/cloud/smart-orchestration/) guide for a detailed explanation.
|
|
715
|
+
|
|
716
|
+
If you use the GitHub Actions facility for [Re-running workflows and jobs](https://docs.github.com/en/actions/managing-workflow-runs/re-running-workflows-and-jobs), note that [Re-running failed jobs in a workflow](https://docs.github.com/en/actions/managing-workflow-runs/re-running-workflows-and-jobs?tool=webui#re-running-failed-jobs-in-a-workflow) is not suited for use with parallel recording into Cypress Cloud. Re-running failed jobs in this situation does not simply re-run failed Cypress tests. Instead it re-runs **all** Cypress tests, load-balanced over the containers with failed jobs.
|
|
714
717
|
|
|
715
|
-
|
|
718
|
+
To optimize runs when there are failing tests present, refer to optional [Cypress Cloud Smart Orchestration](https://on.cypress.io/guides/cloud/smart-orchestration/) Premium features:
|
|
719
|
+
- [Spec Prioritization](https://on.cypress.io/guides/cloud/smart-orchestration/spec-prioritization)
|
|
720
|
+
- [Run Cancellation](https://docs.cypress.io/guides/cloud/smart-orchestration/run-cancellation). See also [Specify auto cancel after failures](#specify-auto-cancel-after-failures) for details of how to set this option in a Cypress GH Action workflow.
|
|
716
721
|
|
|
717
722
|
During staged rollout of a new GitHub-hosted runner version, GitHub may provide a mixture of current and new image versions used by the container matrix. It is recommended to use a [Docker image](#docker-image) in the parallel job run which avoids any Cypress Cloud errors due to browser major version mismatch from the two different image versions. A [Docker image](#docker-image) is not necessary if testing against the default built-in Electron browser because this browser version is fixed by the Cypress version in use and it is unaffected by any GitHub runner image rollout.
|
|
718
723
|
|
|
@@ -793,7 +798,7 @@ jobs:
|
|
|
793
798
|
start-windows: npm run start:windows:server
|
|
794
799
|
```
|
|
795
800
|
|
|
796
|
-
[](.github/workflows/example-start.yml)
|
|
797
802
|
|
|
798
803
|
**Note:** A server continues to run until the end of the GitHub workflow job that started it. At the end of the job the GitHub workflow runner executes a "Complete job" phase automatically where it terminates any server processes which are still running.
|
|
799
804
|
|
|
@@ -825,7 +830,7 @@ with:
|
|
|
825
830
|
npm run web
|
|
826
831
|
```
|
|
827
832
|
|
|
828
|
-
[](.github/workflows/example-start.yml)
|
|
829
834
|
|
|
830
835
|
### Wait-on
|
|
831
836
|
|
|
@@ -848,9 +853,9 @@ jobs:
|
|
|
848
853
|
wait-on: 'http://localhost:8080'
|
|
849
854
|
```
|
|
850
855
|
|
|
851
|
-
[](.github/workflows/example-wait-on.yml)
|
|
852
857
|
|
|
853
|
-
[](.github/workflows/example-webpack.yml) (also uses `wait-on`)
|
|
854
859
|
|
|
855
860
|
By default, `wait-on` will retry for 60 seconds. You can pass a custom timeout in seconds using `wait-on-timeout`.
|
|
856
861
|
|
|
@@ -1099,8 +1104,8 @@ jobs:
|
|
|
1099
1104
|
|
|
1100
1105
|
### pnpm
|
|
1101
1106
|
|
|
1102
|
-
The package manager `pnpm` is not pre-installed in [GitHub Actions runner images](https://github.com/actions/runner-images) (unlike `npm` and `yarn`)
|
|
1103
|
-
At this time the action does not automatically cache dependencies installed by pnpm.
|
|
1107
|
+
The package manager `pnpm` is not pre-installed in [GitHub Actions runner images](https://github.com/actions/runner-images) (unlike `npm` and `yarn`) and so it must be installed in a separate workflow step (see below). 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.
|
|
1108
|
+
At this time, the action does not automatically cache dependencies installed by pnpm. We advise against attempting to work around this restriction, by caching the pnpm store directory through additional workflow steps, as this can lead to the action skipping installation of the Cypress binary, causing workflow failure.
|
|
1104
1109
|
|
|
1105
1110
|
```yaml
|
|
1106
1111
|
name: example-basic-pnpm
|
|
@@ -1112,27 +1117,38 @@ jobs:
|
|
|
1112
1117
|
- name: Checkout
|
|
1113
1118
|
uses: actions/checkout@v4
|
|
1114
1119
|
- name: Install pnpm
|
|
1115
|
-
|
|
1116
|
-
with:
|
|
1117
|
-
version: 8
|
|
1118
|
-
- name: Get pnpm store directory
|
|
1119
|
-
shell: bash
|
|
1120
|
-
run: |
|
|
1121
|
-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
1122
|
-
- name: Setup pnpm cache
|
|
1123
|
-
uses: actions/cache@v4
|
|
1124
|
-
with:
|
|
1125
|
-
path: ${{ env.STORE_PATH }}
|
|
1126
|
-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('examples/basic-pnpm/pnpm-lock.yaml') }}
|
|
1127
|
-
restore-keys: |
|
|
1128
|
-
${{ runner.os }}-pnpm-store-
|
|
1120
|
+
run: npm install -g pnpm@9
|
|
1129
1121
|
- name: Cypress run
|
|
1130
1122
|
uses: cypress-io/github-action@v6
|
|
1131
1123
|
with:
|
|
1132
1124
|
working-directory: examples/basic-pnpm
|
|
1133
1125
|
```
|
|
1134
1126
|
|
|
1135
|
-
[](.github/workflows/example-basic-pnpm.yml)
|
|
1128
|
+
|
|
1129
|
+
### pnpm workspaces
|
|
1130
|
+
|
|
1131
|
+
If you are using [pnpm workspaces](https://pnpm.io/workspaces) you need to install dependencies and run Cypress tests in a workspace in separate steps. The snippet below shows this principle.
|
|
1132
|
+
|
|
1133
|
+
```yml
|
|
1134
|
+
...
|
|
1135
|
+
- name: Install dependencies
|
|
1136
|
+
uses: cypress-io/github-action@v6
|
|
1137
|
+
with:
|
|
1138
|
+
working-directory: examples/start-and-pnpm-workspaces
|
|
1139
|
+
runTests: false
|
|
1140
|
+
|
|
1141
|
+
- name: Cypress test
|
|
1142
|
+
uses: cypress-io/github-action@v6
|
|
1143
|
+
with:
|
|
1144
|
+
install: false
|
|
1145
|
+
working-directory: examples/start-and-pnpm-workspaces/packages/workspace-1
|
|
1146
|
+
...
|
|
1147
|
+
```
|
|
1148
|
+
|
|
1149
|
+
[](.github/workflows/example-start-and-pnpm-workspaces.yml)
|
|
1150
|
+
|
|
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.
|
|
1136
1152
|
|
|
1137
1153
|
### Yarn Classic
|
|
1138
1154
|
|
|
@@ -1153,7 +1169,7 @@ jobs:
|
|
|
1153
1169
|
working-directory: examples/yarn-classic
|
|
1154
1170
|
```
|
|
1155
1171
|
|
|
1156
|
-
[](.github/workflows/example-yarn-classic.yml)
|
|
1157
1173
|
|
|
1158
1174
|
### Yarn Modern
|
|
1159
1175
|
|
|
@@ -1178,7 +1194,7 @@ jobs:
|
|
|
1178
1194
|
This example covers the [`.yarnrc.yml`](https://yarnpkg.com/configuration/yarnrc#nodeLinker) configuration `nodeLinker: node-modules` which Yarn uses by default for projects updated from Yarn Classic. For `nodeLinker: pnp` see [Yarn Plug'n'Play](#yarn-plugnplay) below.
|
|
1179
1195
|
(Note that `github-action` is not compatible with the `nodeLinker: pnpm` setting.)
|
|
1180
1196
|
|
|
1181
|
-
[](.github/workflows/example-yarn-modern.yml)
|
|
1182
1198
|
|
|
1183
1199
|
### Yarn Plug'n'Play
|
|
1184
1200
|
|
|
@@ -1203,7 +1219,7 @@ jobs:
|
|
|
1203
1219
|
|
|
1204
1220
|
This example covers the [`.yarnrc.yml`](https://yarnpkg.com/configuration/yarnrc#nodeLinker) configuration when `nodeLinker` is undefined or set to `nodeLinker: pnp` corresponding to Yarn Plug'n'Play. Yarn uses this by default for projects newly created with Yarn Modern.
|
|
1205
1221
|
|
|
1206
|
-
[](https://github.com/cypress-io/github-action/actions/workflows/example-yarn-modern-pnp.yml)
|
|
1207
1223
|
|
|
1208
1224
|
**Caution**: using the action parameter `command` causes multiple other parameters to be ignored. [See `command` section for more information.](#custom-test-command)
|
|
1209
1225
|
|
|
@@ -1230,7 +1246,7 @@ jobs:
|
|
|
1230
1246
|
wait-on: 'http://localhost:5000'
|
|
1231
1247
|
```
|
|
1232
1248
|
|
|
1233
|
-
[](.github/workflows/example-start-and-yarn-workspaces.yml)
|
|
1234
1250
|
|
|
1235
1251
|
### Custom cache key
|
|
1236
1252
|
|
|
@@ -1245,7 +1261,7 @@ jobs:
|
|
|
1245
1261
|
# let's make sure our "app" works on several versions of Node
|
|
1246
1262
|
strategy:
|
|
1247
1263
|
matrix:
|
|
1248
|
-
node: [18, 20,
|
|
1264
|
+
node: [18, 20, 22]
|
|
1249
1265
|
name: E2E on Node v${{ matrix.node }}
|
|
1250
1266
|
steps:
|
|
1251
1267
|
- name: Setup Node
|
|
@@ -1279,7 +1295,7 @@ jobs:
|
|
|
1279
1295
|
runs-on: ubuntu-22.04
|
|
1280
1296
|
strategy:
|
|
1281
1297
|
matrix:
|
|
1282
|
-
node: [18, 20,
|
|
1298
|
+
node: [18, 20, 22]
|
|
1283
1299
|
name: E2E on Node v${{ matrix.node }}
|
|
1284
1300
|
steps:
|
|
1285
1301
|
- uses: actions/setup-node@v4
|
|
@@ -1291,7 +1307,7 @@ jobs:
|
|
|
1291
1307
|
|
|
1292
1308
|
See the [Node.js](#nodejs) section for information about supported versions and usage of Node.js.
|
|
1293
1309
|
|
|
1294
|
-
[](.github/workflows/example-node-versions.yml)
|
|
1295
1311
|
|
|
1296
1312
|
### Split install and tests
|
|
1297
1313
|
|
|
@@ -1344,7 +1360,7 @@ If the project has many dependencies, but you want to install just Cypress you c
|
|
|
1344
1360
|
install: false
|
|
1345
1361
|
```
|
|
1346
1362
|
|
|
1347
|
-
[](.github/workflows/example-install-only.yml)
|
|
1348
1364
|
|
|
1349
1365
|
### Timeouts
|
|
1350
1366
|
|
|
@@ -1480,7 +1496,7 @@ This is an example of using the step output `resultsUrl`:
|
|
|
1480
1496
|
|
|
1481
1497
|
The GitHub step output `dashboardUrl` is deprecated. Cypress Dashboard is now [Cypress Cloud](https://on.cypress.io/cloud-introduction).
|
|
1482
1498
|
|
|
1483
|
-
[](.github/workflows/example-recording.yml)
|
|
1484
1500
|
|
|
1485
1501
|
**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.
|
|
1486
1502
|
|
|
@@ -1551,7 +1567,7 @@ jobs:
|
|
|
1551
1567
|
uses: cypress-io/github-action@v6
|
|
1552
1568
|
```
|
|
1553
1569
|
|
|
1554
|
-
[](.github/workflows/example-cron.yml)
|
|
1555
1571
|
|
|
1556
1572
|
### Job summary title
|
|
1557
1573
|
|
|
@@ -1608,8 +1624,7 @@ jobs:
|
|
|
1608
1624
|
|
|
1609
1625
|
Node.js is required to run this action. The recommended version `v6` supports:
|
|
1610
1626
|
|
|
1611
|
-
- **Node.js** 18.x
|
|
1612
|
-
- **Node.js** 20.x and above
|
|
1627
|
+
- **Node.js** 18.x, 20.x and 22.x
|
|
1613
1628
|
|
|
1614
1629
|
and is generally aligned with [Node.js's release schedule](https://github.com/nodejs/Release).
|
|
1615
1630
|
|
|
@@ -1617,7 +1632,7 @@ and is generally aligned with [Node.js's release schedule](https://github.com/no
|
|
|
1617
1632
|
|
|
1618
1633
|
`github-action` command-type options such as [`install-command`](https://github.com/cypress-io/github-action#custom-install-command), [`build`](https://github.com/cypress-io/github-action#build-app), [`start`](https://github.com/cypress-io/github-action#start-server) and [`command`](https://github.com/cypress-io/github-action#custom-test-command) are executed with the runner's version of Node.js. You can use GitHub's [actions/setup-node](https://github.com/actions/setup-node) to install an explicit Node.js version into the runner.
|
|
1619
1634
|
|
|
1620
|
-
[](.github/workflows/example-node-versions.yml)
|
|
1621
1636
|
|
|
1622
1637
|
Cypress itself runs with a fixed Node.js version specified by the [runs.using](https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions) parameter of [action.yml](action.yml). `github-action@v6` uses `node20`.
|
|
1623
1638
|
|
|
@@ -1627,11 +1642,8 @@ View the [CHANGELOG](./CHANGELOG.md) document for an overview of version changes
|
|
|
1627
1642
|
|
|
1628
1643
|
## Compatibility
|
|
1629
1644
|
|
|
1630
|
-
- `v6` is the current recommended version and uses `node20`
|
|
1631
|
-
- `v5`
|
|
1632
|
-
- `v4` is the minimum version required for Cypress `10.x` and later - also uses the deprecated version `node16`
|
|
1633
|
-
|
|
1634
|
-
Pay attention to any GitHub Actions deprecation warnings shown in logs which may recommend updating.
|
|
1645
|
+
- `github-action@v6` is the current recommended version and uses `node20`
|
|
1646
|
+
- `github-action` versions `v1` to `v5` are unsupported: they rely on Node.js `12` and `16` in End-of-life status.
|
|
1635
1647
|
|
|
1636
1648
|
## Contributing
|
|
1637
1649
|
|
|
@@ -1644,7 +1656,7 @@ Please see our [Contributing Guideline](./CONTRIBUTING.md) which explains how to
|
|
|
1644
1656
|
This project is licensed under the terms of the [MIT license][license-file].
|
|
1645
1657
|
|
|
1646
1658
|
<!-- badge links follow -->
|
|
1647
|
-
[ci-badge]: https://github.com/cypress-io/github-action/workflows/main/badge.svg
|
|
1659
|
+
[ci-badge]: https://github.com/cypress-io/github-action/actions/workflows/main.yml/badge.svg
|
|
1648
1660
|
[ci-workflow]: https://github.com/cypress-io/github-action/actions/workflows/main.yml
|
|
1649
1661
|
[cloud-badge]: https://img.shields.io/endpoint?url=https://cloud.cypress.io/badge/simple/3tb7jn/master&style=flat&logo=cypress
|
|
1650
1662
|
[cloud-project]: https://cloud.cypress.io/projects/3tb7jn/runs
|
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 (
|
|
46560
|
-
|
|
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
|
-
|
|
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
|
-
|
|
46719
|
-
|
|
46720
|
-
|
|
46721
|
-
|
|
46722
|
-
|
|
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 ?
|
|
46735
|
+
return invalid ? prefix + node.value : '(';
|
|
46734
46736
|
}
|
|
46735
46737
|
|
|
46736
46738
|
if (node.type === 'close') {
|
|
46737
|
-
return invalid ?
|
|
46739
|
+
return invalid ? prefix + node.value : ')';
|
|
46738
46740
|
}
|
|
46739
46741
|
|
|
46740
46742
|
if (node.type === 'comma') {
|
|
46741
|
-
return node.prev.type === 'comma' ? '' :
|
|
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
|
-
|
|
46750
|
-
|
|
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 (
|
|
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:
|
|
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
|
-
|
|
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 (
|
|
46862
|
+
for (const item of queue) {
|
|
46860
46863
|
if (Array.isArray(item)) {
|
|
46861
|
-
for (
|
|
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) :
|
|
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
|
-
|
|
46878
|
+
const rangeLimit = options.rangeLimit === undefined ? 1000 : options.rangeLimit;
|
|
46876
46879
|
|
|
46877
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
46999
|
-
|
|
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
|
-
|
|
47005
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
47165
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
47285
|
-
|
|
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
|
-
|
|
47310
|
-
|
|
47311
|
-
|
|
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 (
|
|
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
|
-
|
|
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
|
-
|
|
47449
|
-
|
|
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
|
};
|
|
@@ -49907,7 +49918,7 @@ const toMaxLen = (input, maxLength) => {
|
|
|
49907
49918
|
return negative ? ('-' + input) : input;
|
|
49908
49919
|
};
|
|
49909
49920
|
|
|
49910
|
-
const toSequence = (parts, options) => {
|
|
49921
|
+
const toSequence = (parts, options, maxLen) => {
|
|
49911
49922
|
parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
|
49912
49923
|
parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
|
49913
49924
|
|
|
@@ -49917,11 +49928,11 @@ const toSequence = (parts, options) => {
|
|
|
49917
49928
|
let result;
|
|
49918
49929
|
|
|
49919
49930
|
if (parts.positives.length) {
|
|
49920
|
-
positives = parts.positives.join('|');
|
|
49931
|
+
positives = parts.positives.map(v => toMaxLen(String(v), maxLen)).join('|');
|
|
49921
49932
|
}
|
|
49922
49933
|
|
|
49923
49934
|
if (parts.negatives.length) {
|
|
49924
|
-
negatives = `-(${prefix}${parts.negatives.join('|')})`;
|
|
49935
|
+
negatives = `-(${prefix}${parts.negatives.map(v => toMaxLen(String(v), maxLen)).join('|')})`;
|
|
49925
49936
|
}
|
|
49926
49937
|
|
|
49927
49938
|
if (positives && negatives) {
|
|
@@ -50019,7 +50030,7 @@ const fillNumbers = (start, end, step = 1, options = {}) => {
|
|
|
50019
50030
|
|
|
50020
50031
|
if (options.toRegex === true) {
|
|
50021
50032
|
return step > 1
|
|
50022
|
-
? toSequence(parts, options)
|
|
50033
|
+
? toSequence(parts, options, maxLen)
|
|
50023
50034
|
: toRegex(range, null, { wrap: false, ...options });
|
|
50024
50035
|
}
|
|
50025
50036
|
|
|
@@ -50031,7 +50042,6 @@ const fillLetters = (start, end, step = 1, options = {}) => {
|
|
|
50031
50042
|
return invalidRange(start, end, options);
|
|
50032
50043
|
}
|
|
50033
50044
|
|
|
50034
|
-
|
|
50035
50045
|
let format = options.transform || (val => String.fromCharCode(val));
|
|
50036
50046
|
let a = `${start}`.charCodeAt(0);
|
|
50037
50047
|
let b = `${end}`.charCodeAt(0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cypress/github-action",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.7.1",
|
|
4
4
|
"description": "GitHub Action for running Cypress end-to-end and component tests",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
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
17
|
"update:cypress": "./scripts/update-cypress-latest.sh",
|
|
18
|
-
"prepare": "husky
|
|
18
|
+
"prepare": "husky"
|
|
19
19
|
},
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"supports-color": "9.3.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@types/node": "20.
|
|
49
|
+
"@types/node": "20.14.2",
|
|
50
50
|
"@vercel/ncc": "0.38.1",
|
|
51
|
-
"husky": "
|
|
52
|
-
"markdown-link-check": "3.
|
|
53
|
-
"prettier": "3.
|
|
51
|
+
"husky": "9.0.11",
|
|
52
|
+
"markdown-link-check": "3.12.2",
|
|
53
|
+
"prettier": "3.3.1"
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
|
56
56
|
"access": "public"
|