Skip to content

Commit

Permalink
dependency: update to electron 25 and node 18 (#27715)
Browse files Browse the repository at this point in the history
* feat: update to electron 25 and bump node dependencies. need to remove
custom docker image

* chore: update node versions to 18+ [run ci]

* chore: bump @types/node from v16 to v18 and bump the typescript supported CLI version from 3.9 to 4.4

* update mock-fs to 5.2.0 to fix BigInt issue (see https://github.com/tschaub/mock-fs/releases/tag/v5.1.4) [run ci]

* chore: update electron integrity check to pass create binary job

* chore: fix issues with achrinza/node-ipc not yet having node 18 engine support (only up to 17 by patching from 9.2.2 to 9.2.5 as seen in achrinza/node-ipc#38. vue/cli-service is not maintained and we should migrate these over to vue create at some point in the near future to get rid of these resolutions

* allow for TLSv1 tests to work with node 18 as the express server running node 18 with tlsv1 needs to allow legacy ciphers

* chore: update snyk workflows to use node 18

* chore: add changelog

* update timeout

* more cleanup during binary build

* bump cache and run ci. include ignore engines for rwa and get rid of
16.16 image references

* chore: update FF tests to 115 as serialization now works with errors and click events do not get fired on buttons being typed into

* chore: don't error when symlink already exists

* chore: fix serialization test for newer versions of firefox

* chore: fix CI config

* chore: fix chrome system tests to work with chrome 114. updates mostly caused by bugs in screen height in chrome. see https://bugs.chromium.org/p/chromium/issues/detail?id=1416398

* chore: test binary against vite update in RWA

* remove wait for RWA as it shouldnt be needed for vite. link example recipes update to node 18

chore: remove commented out code

* chore: print message when DISABLE_SNAPSHOT_REQUIRE is set

* chore: clean out unneeded dependencies always

* chore: remove trailing space

* fix: propagate click events for enter and typing on firefox 106 or later

* chore: fix changelog failures

* fix: correctly simulate click events for buttons on keyup and space type  in Firefox versions greater than 91 and simulate click for buttons on enter in Firefox versions greater than or equal to 106

* chore: add documentation to type to clarify firefox synthetic events

* chore: update protocol snapshot as order or log messages seems to have changed

* update comments

* sort commandLogChanged events for protocol

* chore: remove PR ids from CRA and CER as the PRs are merged into develop

---------

Co-authored-by: Ryan Manuel <ryanm@cypress.io>
Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>
Co-authored-by: Matt Schile <mschile@cypress.io>
  • Loading branch information
4 people committed Sep 7, 2023
1 parent 617d7af commit b85dd75
Show file tree
Hide file tree
Showing 71 changed files with 838 additions and 779 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.

08-31-23
09-3-23
33 changes: 18 additions & 15 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mainBuildFilters: &mainBuildFilters
- /^release\/\d+\.\d+\.\d+$/
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- 'publish-binary'
- 'jordanpowell88/update-angular-tsconfig-path'
- 'chore/update_electron25_and_node18'

# usually we don't build Mac app - it takes a long time
# but sometimes we want to really confirm we are doing the right thing
Expand All @@ -40,7 +40,8 @@ macWorkflowFilters: &darwin-workflow-filters
or:
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'jordanpowell88/update-angular-tsconfig-path', << pipeline.git.branch >> ]
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'chore/update_electron25_and_node18', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -52,6 +53,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'jordanpowell88/update-angular-tsconfig-path', << pipeline.git.branch >> ]
- equal: [ 'publish-binary', << pipeline.git.branch >> ]
- equal: [ 'chore/update_electron25_and_node18', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -70,7 +72,8 @@ windowsWorkflowFilters: &windows-workflow-filters
or:
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'jordanpowell88/update-angular-tsconfig-path', << pipeline.git.branch >> ]
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'chore/update_electron25_and_node18', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -79,7 +82,7 @@ executors:
# the Docker image with Cypress dependencies and Chrome browser
cy-doc:
docker:
- image: cypress/browsers:node16.16.0-chrome106-ff99-edge
- image: cypress/browsers-internal:node18.15.0-chrome114-ff115
# by default, we use "medium" to balance performance + CI costs. bump or reduce on a per-job basis if needed.
resource_class: medium
environment:
Expand All @@ -89,7 +92,7 @@ executors:
# Docker image with non-root "node" user
non-root-docker-user:
docker:
- image: cypress/browsers:node16.16.0-chrome106-ff99-edge
- image: cypress/browsers-internal:node18.15.0-chrome114-ff115
user: node
environment:
PLATFORM: linux
Expand Down Expand Up @@ -140,7 +143,7 @@ commands:
name: Set environment variable to determine whether or not to persist artifacts
command: |
echo "Setting SHOULD_PERSIST_ARTIFACTS variable"
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "publish-binary" && "$CIRCLE_BRANCH" != "jordanpowell88/update-angular-tsconfig-path" && "$CIRCLE_BRANCH" != "ryanm/feat/handle-304s" ]]; then
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "publish-binary" && "$CIRCLE_BRANCH" != "update-v8-snapshot-cache-on-develop" && "$CIRCLE_BRANCH" != "chore/update_electron25_and_node18" ]]; then
export SHOULD_PERSIST_ARTIFACTS=true
fi' >> "$BASH_ENV"
# You must run `setup_should_persist_artifacts` command and be using bash before running this command
Expand Down Expand Up @@ -821,13 +824,10 @@ commands:
working_directory: /tmp/<<parameters.repo>>
command: yarn types
- run:
# NOTE: we do not need to wait for the vite dev server to start
working_directory: /tmp/<<parameters.repo>>
command: <<parameters.server-start-command>>
background: true
- run:
condition: <<parameters.wait-on>>
name: "Waiting on server to boot: <<parameters.wait-on>>"
command: "npx wait-on <<parameters.wait-on>>"
- when:
condition: <<parameters.folder>>
steps:
Expand Down Expand Up @@ -2242,7 +2242,7 @@ jobs:
<<: *defaults
resource_class: small
docker:
- image: cypress/base:16.16.0
- image: cypress/base-internal:18.15.0
steps:
- restore_workspace_binaries
- run: mkdir test-binary
Expand All @@ -2257,15 +2257,15 @@ jobs:
- run:
name: Verify Cypress binary
working_directory: test-binary
command: $(npm bin)/cypress verify
command: npx cypress verify
- run:
name: Print Cypress version
working_directory: test-binary
command: $(npm bin)/cypress version
command: npx cypress version
- run:
name: Cypress info
working_directory: test-binary
command: $(npm bin)/cypress info
command: npx cypress info

test-types-cypress-and-jest:
parameters:
Expand Down Expand Up @@ -2369,20 +2369,23 @@ jobs:
- test-binary-against-repo:
repo: cypress-example-recipes
command: npm run test:ci:firefox
browser: firefox

test-binary-against-recipes-chrome:
<<: *defaults
steps:
- test-binary-against-repo:
repo: cypress-example-recipes
command: npm run test:ci:chrome
browser: chrome

test-binary-against-recipes:
<<: *defaults
steps:
- test-binary-against-repo:
repo: cypress-example-recipes
command: npm run test:ci
browser: electron

# This is a special job. It allows you to test the current
# built test runner against a pull request in the repo
Expand Down Expand Up @@ -2410,7 +2413,7 @@ jobs:
steps:
- test-binary-against-repo:
repo: cypress-example-kitchensink
browser: "electron"
browser: electron

test-binary-against-kitchensink-firefox:
<<: *defaults
Expand Down
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. v16.16.0
placeholder: ex. v18.15.0
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. v16.16.0
placeholder: ex. v18.15.0
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. v16.16.0
placeholder: ex. v18.15.0
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 @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
node-version: [18.x]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
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 @@ -19,7 +19,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
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 @@ -26,7 +26,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18
- name: Check for new Chrome versions
id: get-versions
uses: actions/github-script@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_v8_snapshot_cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: 'yarn'
- name: Run yarn
run: yarn
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.16.0
18.15.0
8 changes: 8 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ _Released 09/12/2023 (PENDING)_

- Adds support for Nx users who want to run Angular Component Testing in parallel. Addresses [#27723](https://github.com/cypress-io/cypress/pull/27723).

**Bugfixes:**

- Fixed an issue where `enter`, `keyup`, and `space` events where not triggering `click` events properly in some versions of Firefox. Addressed in [#27715](https://github.com/cypress-io/cypress/pull/27715).

**Dependency Updates:**

- Upgraded Electron from `21.0.0` to `25.8.0`, which updates bundled Chromium from `106.0.5249.51` to `114.0.5735.289`. Addresses [#27595](https://github.com/cypress-io/cypress/issues/27595). Additionally, the Node version the binary has been upgraded from from `16.16.0` to `18.15.0`. This does **NOT** have an impact on the node version you are using with Cypress and is merely an internal update to the repository & shipped binary. Addressed in [#27715](https://github.com/cypress-io/cypress/pull/27715). Addresses [#27595](https://github.com/cypress-io/cypress/issues/27595).

## 13.1.0

_Released 08/31/2023_
Expand Down
4 changes: 2 additions & 2 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dependencies": {
"@cypress/request": "^3.0.0",
"@cypress/xvfb": "^1.2.4",
"@types/node": "^16.18.39",
"@types/node": "^18.17.5",
"@types/sinonjs__fake-timers": "8.1.1",
"@types/sizzle": "^2.3.2",
"arch": "^2.2.0",
Expand Down Expand Up @@ -95,7 +95,7 @@
"execa-wrap": "1.4.0",
"hasha": "5.2.2",
"mocha": "6.2.2",
"mock-fs": "5.1.1",
"mock-fs": "5.2.0",
"mocked-env": "1.3.2",
"nock": "13.2.9",
"proxyquire": "2.1.3",
Expand Down
4 changes: 2 additions & 2 deletions npm/create-cypress-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
"@types/babel__core": "^7.1.2",
"@types/inquirer": "7.3.1",
"@types/mock-fs": "4.10.0",
"@types/node": "16.18.39",
"@types/node": "18.17.5",
"@types/ora": "^3.2.0",
"@types/semver": "7.5.0",
"copy": "0.3.2",
"mocha": "7.1.1",
"mock-fs": "5.1.1",
"mock-fs": "5.2.0",
"snap-shot-it": "7.9.3",
"typescript": "^4.7.4"
},
Expand Down
2 changes: 1 addition & 1 deletion npm/cypress-schematic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@schematics/angular": "^14.2.1",
"@types/chai-enzyme": "0.6.7",
"@types/mocha": "8.0.3",
"@types/node": "^18.0.6",
"@types/node": "^18.17.5",
"chai": "4.2.0",
"mocha": "3.5.3",
"typescript": "^4.7.4"
Expand Down
2 changes: 1 addition & 1 deletion npm/webpack-dev-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"webpack-merge": "^5.4.0"
},
"devDependencies": {
"@types/node": "16.18.39",
"@types/node": "18.17.5",
"@types/proxyquire": "^1.3.28",
"@types/speed-measure-webpack-plugin": "^1.3.4",
"@types/webpack-dev-server-3": "npm:@types/webpack-dev-server@^3",
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
"@types/markdown-it": "12.2.3",
"@types/mini-css-extract-plugin": "1.2.3",
"@types/mocha": "8.0.3",
"@types/node": "16.18.39",
"@types/node": "18.17.5",
"@types/prismjs": "1.16.0",
"@types/react": "16.9.50",
"@types/react-dom": "16.9.8",
Expand Down Expand Up @@ -145,7 +145,7 @@
"dedent": "^0.7.0",
"del": "3.0.0",
"detect-port": "^1.3.0",
"electron": "21.0.0",
"electron": "25.8.0",
"electron-builder": "^23.6.0",
"enzyme-adapter-react-16": "1.12.1",
"eslint": "7.22.0",
Expand Down Expand Up @@ -185,7 +185,7 @@
"mocha-banner": "1.1.2",
"mocha-junit-reporter": "2.2.0",
"mocha-multi-reporters": "1.1.7",
"mock-fs": "5.1.1",
"mock-fs": "5.2.0",
"p-defer": "^3.0.0",
"patch-package": "6.4.7",
"playwright-webkit": "1.24.2",
Expand All @@ -212,7 +212,7 @@
"yarn-deduplicate": "3.1.0"
},
"engines": {
"node": ">=16.16.0",
"node": ">=18.15.0",
"yarn": ">=1.17.3"
},
"productName": "Cypress",
Expand Down
2 changes: 1 addition & 1 deletion packages/data-context/src/actions/ElectronActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export class ElectronActions {

debug('notification created %o', notification)

function clickFn (event: Event) {
function clickFn (event: Electron.Event) {
debug('notification clicked %o', event)
onClick()
notifications.delete(notification)
Expand Down
17 changes: 3 additions & 14 deletions packages/driver/cypress/e2e/e2e/origin/config_env.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,21 +233,10 @@
})

context('structuredClone()', () => {
it('(firefox) uses native structuredClone in firefox and does NOT serialize Error objects in config', {
browser: 'firefox',
}, function () {
Cypress[fnName](USED_KEYS.error, new Error('error'))

cy.origin('http://www.foobar.com:3500', { args: { fnName, USED_KEYS } }, ({ fnName, USED_KEYS }) => {
const isUndefined = Cypress[fnName](USED_KEYS.error)

expect(isUndefined).to.be.undefined
})
})

// NOTE: chrome 98 and above uses a native structuredClone() method, but that method CAN clone Error objects
it('(chromium) uses ponyfilled or native structuredClone that can serialize Error objects in config', {
browser: { family: 'chromium' },
// NOTE: firefox 114 can now serialize/clone error objects
it('uses ponyfilled or native structuredClone that can serialize Error objects in config', {
browser: '!webkit',
}, () => {
Cypress[fnName](USED_KEYS.error, new Error('error'))

Expand Down
2 changes: 1 addition & 1 deletion packages/driver/cypress/e2e/e2e/origin/validation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ describe('cy.origin', { browser: '!webkit' }, () => {
if (Cypress.browser.family === 'chromium') {
expect(err.message).to.include('HTMLDivElement object could not be cloned')
} else if (Cypress.browser.family === 'firefox') {
expect(err.message).to.include('The object could not be cloned')
expect(err.message).to.include('object could not be cloned')
}

done()
Expand Down
Loading

5 comments on commit b85dd75

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on b85dd75 Sep 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.2.0/linux-x64/develop-b85dd752f21494d64b7d7c065f74acbe6564dca8/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on b85dd75 Sep 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.2.0/linux-arm64/develop-b85dd752f21494d64b7d7c065f74acbe6564dca8/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on b85dd75 Sep 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.2.0/darwin-x64/develop-b85dd752f21494d64b7d7c065f74acbe6564dca8/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on b85dd75 Sep 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.2.0/darwin-arm64/develop-b85dd752f21494d64b7d7c065f74acbe6564dca8/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on b85dd75 Sep 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.2.0/win32-x64/develop-b85dd752f21494d64b7d7c065f74acbe6564dca8/cypress.tgz

Please sign in to comment.