Skip to content

Commit

Permalink
Merge branch 'develop' into test/fix-run-on-win
Browse files Browse the repository at this point in the history
  • Loading branch information
AtofStryker authored Jan 17, 2025
2 parents 343cd31 + e3a2843 commit dff3334
Show file tree
Hide file tree
Showing 1,481 changed files with 103,279 additions and 314,462 deletions.
2 changes: 1 addition & 1 deletion .circleci/cache-version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Bump this version to force CI to re-create the cache from scratch.

09-12-24
1-15-24
14 changes: 3 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1
setup: true

orbs:
continuation: circleci/continuation@0.3.1
continuation: circleci/continuation@1.0.0

jobs:
verify-ci-should-run:
Expand Down Expand Up @@ -52,17 +52,9 @@ jobs:
echo "Skipping CI; branch in progress - $TRIGGER_INSTRUCTIONS"
cancel_build
- run:
name: Download .circleci/workflows.yaml
command: |
if [[ "$CIRCLE_BRANCH" == "pull/"* ]]; then
curl -o workflows.yml https://raw.githubusercontent.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/develop/.circleci/workflows.yml
else
curl -o workflows.yml https://raw.githubusercontent.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BRANCH}/.circleci/workflows.yml
fi
- checkout
- continuation/continue:
configuration_path: workflows.yml
configuration_path: .circleci/workflows.yml

workflows:
# the setup-workflow workflow is always triggered.
Expand Down
331 changes: 270 additions & 61 deletions .circleci/workflows.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1-bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ body:
attributes:
label: Node version
description: What version of node.js are you using to run Cypress?
placeholder: ex. v18.17.0
placeholder: ex. v20.18.1
validations:
required: true
- type: input
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/2-memory-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ body:
attributes:
label: Node version
description: What version of node.js are you using to run Cypress?
placeholder: ex. v18.17.0
placeholder: ex. v20.18.1
validations:
required: true
- type: input
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/3-install-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ body:
attributes:
label: Node version
description: What version of node.js are you using to run Cypress?
placeholder: ex. v18.17.0
placeholder: ex. v20.18.1
validations:
required: true
- type: dropdown
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/snyk_sca_scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -28,7 +28,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'yarn'
- name: Run yarn
run: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snyk_static_analysis_scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'yarn'
- name: Run yarn
run: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-browser-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
- name: Check for new Chrome versions
id: get-versions
uses: actions/github-script@v7
Expand Down
40 changes: 28 additions & 12 deletions .github/workflows/update_v8_snapshot_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ concurrency:
jobs:
update-v8-snapshot-cache:
strategy:
max-parallel: 1
max-parallel: 3
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
Expand All @@ -57,14 +57,20 @@ jobs:
steps:
- name: Determine snapshot files - Windows
if: ${{ matrix.platform == 'windows-latest' }}
run: echo "SNAPSHOT_FILES='tooling\v8-snapshot\cache\win32\snapshot-meta.json'" >> $GITHUB_ENV
run: |
echo "SNAPSHOT_FILES='tooling\v8-snapshot\cache\win32\snapshot-meta.json'" >> $GITHUB_ENV
echo "PLATFORM=windows" >> $GITHUB_ENV
shell: bash
- name: Determine snapshot files - Linux
if: ${{ matrix.platform == 'ubuntu-latest' }}
run: echo "SNAPSHOT_FILES='tooling/v8-snapshot/cache/linux/snapshot-meta.json'" >> $GITHUB_ENV
run: |
echo "SNAPSHOT_FILES='tooling/v8-snapshot/cache/linux/snapshot-meta.json'" >> $GITHUB_ENV
echo "PLATFORM=linux" >> $GITHUB_ENV
- name: Determine snapshot files - Mac
if: ${{ matrix.platform == 'macos-latest' }}
run: echo "SNAPSHOT_FILES='tooling/v8-snapshot/cache/darwin/snapshot-meta.json'" >> $GITHUB_ENV
run: |
echo "SNAPSHOT_FILES='tooling/v8-snapshot/cache/darwin/snapshot-meta.json'" >> $GITHUB_ENV
echo "PLATFORM=darwin" >> $GITHUB_ENV
- name: Install setuptools - Mac
if: ${{ matrix.platform == 'macos-latest' }}
run: sudo -H pip install setuptools
Expand All @@ -82,10 +88,11 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'yarn'
- name: Run yarn
run: yarn
# set the timeout here to try and deal with Windows slowness
run: yarn --network-timeout 300000
- name: Run build
run: yarn build
- name: Generate prod snapshot from scratch
Expand All @@ -108,14 +115,23 @@ jobs:
- name: Determine branch name - commit to separate branch
if: ${{ inputs.commit_directly_to_branch != true }}
run: |
echo "BRANCH_NAME=update-v8-snapshot-cache-on-${{ env.BASE_BRANCH }}" >> $GITHUB_ENV
echo "BRANCH_EXISTS=$(git show-ref --verify --quiet refs/remotes/origin/update-v8-snapshot-cache-on-${{ env.BASE_BRANCH }} && echo 'true')" >> $GITHUB_ENV
echo "BRANCH_NAME=update-v8-snapshot-cache-on-${{ env.BASE_BRANCH }}-${{ env.PLATFORM }}" >> $GITHUB_ENV
echo "BRANCH_EXISTS=$(git show-ref --verify --quiet refs/remotes/origin/update-v8-snapshot-cache-on-${{ env.BASE_BRANCH }}-${{ env.PLATFORM }} && echo 'true')" >> $GITHUB_ENV
shell: bash
- name: Check number of existing prs
id: check-number-of-existing-prs
run: |
echo "number_of_prs_for_branch=$(gh api '/repos/cypress-io/cypress/pulls?head=cypress-io:${{ env.BRANCH_NAME }}' --jq length)" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.BOT_GITHUB_ACTION_TOKEN }}
shell: bash
- name: Check need for PR or branch update
id: check-need-for-pr
run: |
echo "needs_pr=${{ steps.check-for-v8-snapshot-cache-changes.outputs.has_changes == 'true' && env.BRANCH_EXISTS != 'true' }}" >> $GITHUB_OUTPUT
echo "needs_pr=${{ steps.check-for-v8-snapshot-cache-changes.outputs.has_changes == 'true' && env.BRANCH_NAME != env.BASE_BRANCH && steps.check-number-of-existing-prs.outputs.number_of_prs_for_branch == '0' }}" >> $GITHUB_OUTPUT
echo "needs_branch_update=${{ steps.check-for-v8-snapshot-cache-changes.outputs.has_changes == 'true' && env.BRANCH_EXISTS == 'true' }}" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.BOT_GITHUB_ACTION_TOKEN }}
shell: bash
## Update available and a branch/PR already exists
- name: Checkout existing branch
Expand All @@ -125,10 +141,10 @@ jobs:
git reset --hard
git checkout ${{ env.BRANCH_NAME }}
git pull origin ${{ env.BRANCH_NAME }}
git merge --squash -Xtheirs stash
git merge -Xtheirs stash
## Update available and a PR doesn't already exist
- name: Checkout new branch
if: ${{ steps.check-need-for-pr.outputs.needs_pr == 'true' }}
if: ${{ steps.check-need-for-pr.outputs.needs_branch_update != 'true' }}
run: git checkout -b ${{ env.BRANCH_NAME }} ${{ env.BASE_BRANCH }}
## Commit changes if present
- name: Commit the changes
Expand All @@ -152,7 +168,7 @@ jobs:
github,
baseBranch: '${{ env.BASE_BRANCH }}',
branchName: '${{ env.BRANCH_NAME }}',
description: 'Update v8 snapshot cache',
description: 'Update v8 snapshot cache - ${{ env.PLATFORM }}',
body: 'This PR was automatically generated by the [update-v8-snapshot-cache](https://github.com/cypress-io/cypress/actions/workflows/update_v8_snapshot_cache.yml) github action.',
reviewers: ['ryanthemanuel']
})
11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ typings/
# Output of 'npm pack'
*.tgz

# Yarn Integrity file
# Yarn files that shouldn't be checked in
.yarnrc
.yarn/
.yarn-integrity

# dotenv environment variables file
Expand All @@ -293,15 +295,11 @@ typings/
# next.js build output
.next

# nuxt.js build output
.nuxt

# rollup.js default build output
dist/

# Uncomment the public line if your project uses Gatsby
# https://nextjs.org/blog/next-9-1#public-directory-support
# https://create-react-app.dev/docs/using-the-public-folder/#docsNav
# public

# Storybook build outputs
Expand Down Expand Up @@ -398,3 +396,6 @@ tooling/v8-snapshot/cache/prod-win32

# Cloud API validations
system-tests/lib/validations

.nx/cache
.nx/workspace-data
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.17.1
20.18.1
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
**/*

/.nx/cache
/.nx/workspace-data
3 changes: 0 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@

- [Cypress App](https://on.cypress.io/changelog)
- [`@cypress/angular`](https://github.com/cypress-io/cypress/blob/develop/npm/angular/CHANGELOG.md)
- [`@cypress/angular-signals`](https://github.com/cypress-io/cypress/blob/develop/npm/angular-signals/CHANGELOG.md)
- [`@cypress/eslint-plugin-dev`](https://github.com/cypress-io/cypress/blob/develop/npm/eslint-plugin-dev/CHANGELOG.md)
- [`@cypress/mount-utils`](https://github.com/cypress-io/cypress/blob/develop/npm/mount-utils/CHANGELOG.md)
- [`@cypress/react`](https://github.com/cypress-io/cypress/blob/develop/npm/react/CHANGELOG.md)
- [`@cypress/react18`](https://github.com/cypress-io/cypress/blob/develop/npm/react18/CHANGELOG.md)
- [`@cypress/svelte`](https://github.com/cypress-io/cypress/blob/develop/npm/svelte/CHANGELOG.md)
- [`@cypress/vite-dev-server`](https://github.com/cypress-io/cypress/blob/develop/npm/vite-dev-server/CHANGELOG.md)
- [`@cypress/vue`](https://github.com/cypress-io/cypress/blob/develop/npm/vue/CHANGELOG.md)
- [`@cypress/vue2`](https://github.com/cypress-io/cypress/blob/develop/npm/vue2/CHANGELOG.md)
- [`@cypress/webpack-batteries-included-preprocessor`](https://github.com/cypress-io/cypress/blob/develop/npm/webpack-batteries-included-preprocessor/CHANGELOG.md)
- [`@cypress/webpack-dev-server`](https://github.com/cypress-io/cypress/blob/develop/npm/webpack-dev-server/CHANGELOG.md)
- [`@cypress/webpack-preprocessor`](https://github.com/cypress-io/cypress/blob/develop/npm/webpack-preprocessor/CHANGELOG.md)
27 changes: 5 additions & 22 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,17 +182,14 @@ Here is a list of the npm packages in this repository:
| Folder Name | Package Name | Purpose |
| :----------------------------------------------------- | :--------------------------------- | :--------------------------------------------------------------------------- |
| [angular](./npm/angular) | `@cypress/angular` | Cypress component testing for Angular. |
| [angular signals](./npm/angular-signals) | `@cypress/angular-signals` | Cypress component testing for Angular 17/18 including support for signals. |
| [eslint-plugin-dev](./npm/eslint-plugin-dev) | `@cypress/eslint-plugin-dev` | Eslint plugin for internal development. |
| [grep](./npm/grep) | `@cypress/grep` | Filter tests using substring |
| [mount-utils](./npm/mount-utils) | `@cypress/mount-utils` | Common functionality for Vue/React/Angular adapters. |
| [react](./npm/react) | `@cypress/react` | Cypress component testing for React. |
| [react18](./npm/react18) | `@cypress/react18` | Cypress component testing for React 18. |
| [schematic](./npm/cypress-schematic) | `@cypress/schematic` | Official Angular Schematic and Builder for the Angular CLI.|
| [svelte](./npm/svelte) | `@cypress/svelte` | Cypress component testing for Svelte. |
| [vite-dev-server](./npm/vite-dev-server) | `@cypress/vite-dev-server` | Vite powered dev server for Component Testing. |
| [vue](./npm/vue) | `@cypress/vue` | Cypress component testing for Vue 3. |
| [vue2](./npm/vue2) | `@cypress/vue2` | Cypress component testing for Vue 2. |
| [webpack-batteries-included-preprocessor](./npm/webpack-batteries-included-preprocessor) | `@cypress/webpack-batteries-included-preprocessor` | Cypress preprocessor for bundling JavaScript via webpack with dependencies included and support for various ES features, TypeScript, and CoffeeScript. |
| [webpack-dev-server](./npm/webpack-dev-server) | `@cypress/webpack-dev-server` | Webpack powered dev server for Component Testing. |
| [webpack-preprocessor](./npm/webpack-preprocessor) | `@cypress/webpack-preprocessor` | Cypress preprocessor for bundling JavaScript via webpack. |
Expand All @@ -204,34 +201,20 @@ We try to tag all issues with a `pkg/` or `npm/` tag describing the appropriate
You must have the following installed on your system to contribute locally:

- [`Node.js`](https://nodejs.org/en/) (See the root [.node-version](.node-version) file for the required version. You can find a list of tools on [node-version-usage](https://github.com/shadowspawn/node-version-usage) to switch the version of [`Node.js`](https://nodejs.org/en/) based on [.node-version](.node-version).)
- [`yarn`](https://yarnpkg.com/en/docs/install)
- [`python`](https://www.python.org/downloads/) (since we use `node-gyp`. See their [repo](https://github.com/nodejs/node-gyp) for Python version requirements. Use Python `3.11` or lower.)
- [`Yarn v1 Classic`](https://yarnpkg.com/en/docs/install). If you have [`Node.js`](https://nodejs.org/en/) experimental [corepack](https://nodejs.org/docs/latest/api/corepack.html) enabled, installation of the Yarn package manager will be handled automatically. Attempting to install Yarn globally with npm will fail if [corepack](https://nodejs.org/docs/latest/api/corepack.html) is enabled.
- [`python`](https://www.python.org/downloads/) (since we use `node-gyp`. See their [repo](https://github.com/nodejs/node-gyp) for Python version requirements.)

#### Debian/Ubuntu

`sudo apt install g++ make` meets the additional requirements to run `node-gyp` in the context of building Cypress from source.
`python` is pre-installed on Debian-based systems including Ubuntu.
The Python versions shipped with Ubuntu versions `20.04` and `22.04` are compatible with Cypress requirements.
The Python versions shipped with Ubuntu versions `20.04`, `22.04` and `24.*` are compatible with Cypress requirements.

Only on Ubuntu `24.04` install Python `3.11` by executing the following commands:

```shell
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.11
```

Add the environment variable `NODE_GYP_FORCE_PYTHON` to `~/.bashrc`:

```shell
export NODE_GYP_FORCE_PYTHON=/usr/bin/python3.11
```

For Ubuntu `24.04` refer also to the [Release notes](https://discourse.ubuntu.com/t/noble-numbat-release-notes/39890) in the section [Unprivileged user namespace restrictions](https://discourse.ubuntu.com/t/noble-numbat-release-notes/39890#unprivileged-user-namespace-restrictions-15) and apply one of the workarounds to disable unprivileged user namespace restrictions for the entire system, either for one boot or persistently, as described. If you do not do this you may receive an error which includes the text `FATAL:setuid_sandbox_host.cc` when you try to run Cypress on this version of Ubuntu after building Cypress from source.
For Ubuntu `24.04` and above, refer also to the [Ubuntu 24.04 Release notes](https://discourse.ubuntu.com/t/noble-numbat-release-notes/39890) in the section "Unprivileged user namespace restrictions" and apply one of the workarounds to disable unprivileged user namespace restrictions for the entire system, either for one boot or persistently, as described. If you do not do this you may receive an error which includes the text `FATAL:setuid_sandbox_host.cc` when you try to run Cypress on these versions of Ubuntu after building Cypress from source.

#### Windows

When installing the Visual Studio C++ environment recommended by [node-gyp](https://github.com/nodejs/node-gyp), install also a Windows 10 SDK. The currently used version of `node-gyp` may otherwise fail to recognise the Visual Studio installation.
Currently no additional instructions for installation requirements.

### Getting Started

Expand Down
4 changes: 2 additions & 2 deletions browser-versions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"chrome:beta": "130.0.6723.19",
"chrome:stable": "129.0.6668.70",
"chrome:beta": "133.0.6943.16",
"chrome:stable": "132.0.6834.83",
"chrome:minimum": "64.0.3282.0"
}
3 changes: 0 additions & 3 deletions cli/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ package.json

# these are all copied from dist'd builds from the individual libs
/angular
/angular-signals
/react
/react18
/vue
/vue2
/svelte
/mount-utils
2 changes: 0 additions & 2 deletions cli/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ build
# ignore packages synced at build-time via
# the sync-exported-npm-with-cli.js script
vue
vue2
react*
mount-utils
angular
svelte
angular-signals
Loading

0 comments on commit dff3334

Please sign in to comment.