Skip to content

dependency: Update Electron to 34 #31260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 23 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
899d395
dependency: update Electron to 34
jennifer-shehane Mar 11, 2025
34a6dfa
Merge branch 'develop' into electron-34
jennifer-shehane Mar 11, 2025
0890191
setup workflows to run against binary branch and on all tests
jennifer-shehane Mar 11, 2025
81c8c49
Merge branch 'electron-34' of https://github.com/cypress-io/cypress i…
jennifer-shehane Mar 11, 2025
ba034c5
changelog entry
jennifer-shehane Mar 11, 2025
2f9af48
node version did bump minorly
jennifer-shehane Mar 11, 2025
db00fe6
Merge branch 'develop' into electron-34
jennifer-shehane Mar 11, 2025
c51227e
Update base-internal image to match new node version
jennifer-shehane Mar 11, 2025
aacef9e
fix typo
jennifer-shehane Mar 11, 2025
15957d2
changelog updates
jennifer-shehane Mar 11, 2025
2dc47e5
Merge branch 'develop' into electron-34
jennifer-shehane Mar 12, 2025
d3647fb
bumping to newest version just released today - hopefully solves glib…
jennifer-shehane Mar 12, 2025
705eb8c
fix cy in cy
ryanthemanuel Mar 13, 2025
1e9c1ed
remove extra register_ts_node require
jennifer-shehane Mar 13, 2025
7021a82
Merge branch 'develop' into electron-34
jennifer-shehane Mar 14, 2025
2ab3b0f
Merge branch 'develop' into electron-34
jennifer-shehane Apr 10, 2025
0a9bece
Merge branch 'develop' into electron-34
jennifer-shehane Apr 16, 2025
52fdef0
Merge branch 'develop' into electron-34
jennifer-shehane Apr 18, 2025
4965a79
Merge branch 'develop' into electron-34
cacieprins Apr 29, 2025
2044f47
updated lockfile
cacieprins Apr 29, 2025
6792e06
upgrade better-sqlite3
cacieprins Apr 30, 2025
d93bae8
changelog
cacieprins May 2, 2025
a84b9c9
Merge branch 'develop' into electron-34
cacieprins May 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 10 additions & 14 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ mainBuildFilters: &mainBuildFilters
- /^release\/\d+\.\d+\.\d+$/
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- 'update-v8-snapshot-cache-on-develop'
- 'ryanm/fix/having-trouble-debugging-your-ci-failures'
- 'electron-34'

# 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 @@ -49,11 +49,7 @@ macWorkflowFilters: &darwin-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal:
[
'ryanm/fix/having-trouble-debugging-your-ci-failures',
<< pipeline.git.branch >>
]
- equal: [ 'electron-34', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -91,7 +87,7 @@ windowsWorkflowFilters: &windows-workflow-filters
- equal: [ develop, << pipeline.git.branch >> ]
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
- equal: [ 'chore/fix_reporter_app_cy_in_cy_flake', << pipeline.git.branch >> ]
- equal: [ 'electron-34', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -100,15 +96,15 @@ executors:
# the Docker image with Cypress dependencies and Chrome browser
cy-doc:
docker:
- image: cypress/base-internal:20.18.1-bullseye
- image: cypress/base-internal:20.18.3-bullseye
# by default, we use "medium" to balance performance + CI costs. bump or reduce on a per-job basis if needed.
resource_class: medium
environment:
PLATFORM: linux

kitchensink-executor:
docker:
- image: cypress/base-internal:20.18.1-bullseye
- image: cypress/base-internal:20.18.3-bullseye
# 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 @@ -117,7 +113,7 @@ executors:
# Docker image with non-root "node" user
non-root-docker-user:
docker:
- image: cypress/base-internal:20.18.1-bullseye
- image: cypress/base-internal:20.18.3-bullseye
user: node
environment:
PLATFORM: linux
Expand Down Expand Up @@ -165,7 +161,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" != "ryanm/fix/having-trouble-debugging-your-ci-failures" ]]; then
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "electron-34" ]]; 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 @@ -630,7 +626,7 @@ commands:
apt update && apt install -y docker.io
docker run -d --name better-sqlite3-builder cypress/base-internal:20.15.0-buster-python3.8-gcc-10.5 /bin/bash -c "sleep 1000000000"
docker cp ~/cypress/node_modules/better-sqlite3 better-sqlite3-builder:/better-sqlite3
docker exec -it better-sqlite3-builder /bin/bash -c "cd /better-sqlite3 && source /root/.bashrc && chown -R root:root . && npm install --ignore-scripts && npx --no-install prebuild -r electron -t 33.2.1 --include-regex 'better_sqlite3.node$'"
docker exec -it better-sqlite3-builder /bin/bash -c "cd /better-sqlite3 && source /root/.bashrc && chown -R root:root . && npm install --ignore-scripts && npx --no-install prebuild -r electron -t 34.3.3 --include-regex 'better_sqlite3.node$'"
docker cp better-sqlite3-builder:/better-sqlite3/build/Release/better_sqlite3.node ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node
docker rm -f better-sqlite3-builder
cp ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node ~/cypress/better_sqlite3.node
Expand Down Expand Up @@ -1908,7 +1904,7 @@ jobs:
working_directory: ~/cypress
docker:
# we need an image with yarn 4 berry installed on it to run this test
- image: cypress/base-internal:20.18.1-yarn-berry
- image: cypress/base-internal:20.18.3-yarn-berry
environment:
# needed to inform the bootstrap-docker-container.sh script to link the binary in the system-test project directory
REPO_DIR: /root/cypress
Expand Down Expand Up @@ -1942,7 +1938,7 @@ jobs:
parallelism: 1
working_directory: ~/cypress
docker:
- image: cypress/base-internal:20.18.1-bullseye
- image: cypress/base-internal:20.18.3-bullseye
environment:
# needed to inform the bootstrap-docker-container.sh script to link the binary in the system-test project directory
REPO_DIR: /root/cypress
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. v20.18.1
placeholder: ex. v20.18.3
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. v20.18.1
placeholder: ex. v20.18.3
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. v20.18.1
placeholder: ex. v20.18.3
validations:
required: true
- type: dropdown
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.18.1
20.18.3
6 changes: 6 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ _Released 5/6/2025 (PENDING)_

- The URL in the Cypress App no longer displays a white background when the URL is loading. Fixes [#31556](https://github.com/cypress-io/cypress/issues/31556).

**Dependency Updates:**

- Upgraded `electron` from `33.2.1` to `34.3.3`. Addresses [#31245](https://github.com/cypress-io/cypress/issues/31245). Addressed in [#31260](https://github.com/cypress-io/cypress/pull/31260).
- Upgraded bundled Node.js version from `20.18.1` to `20.18.3`. Addresses [#31245](https://github.com/cypress-io/cypress/issues/31245). Addressed in [#31260](https://github.com/cypress-io/cypress/pull/31260).
- Upgraded bundled Chromium version from `130.0.6723.137` to `132.0.6834.210`. Addresses [#31245](https://github.com/cypress-io/cypress/issues/31245). Addressed in [#31260](https://github.com/cypress-io/cypress/pull/31260).

## 14.3.2

_Released 4/22/2025_
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
- .:/opt/cypress
ci:
# This should mirror the image used in workflows.yml
image: cypress/base-internal:20.18.1-bullseye
image: cypress/base-internal:20.18.3-bullseye
ports:
- 5566:5566
- 5567:5567
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
"yarn-deduplicate": "3.1.0"
},
"engines": {
"node": ">=20.18.1",
"node": ">=20.18.3",
"yarn": ">=1.22.22"
},
"productName": "Cypress",
Expand Down Expand Up @@ -279,6 +279,7 @@
"@types/react": "18.3.12",
"browserify-sign": "4.2.2",
"devtools-protocol": "0.0.1413303",
"node-abi": "3.74.0",
Copy link
Member Author

Choose a reason for hiding this comment

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

"sharp": "0.29.3",
"vue-template-compiler": "2.6.12"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/data-context/src/data/ProjectConfigIpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ export class ProjectConfigIpc extends EventEmitter {
// If they've got TypeScript installed, we can use
// ts-node for CommonJS
// ts-node/esm for ESM
if (hasTypeScriptInstalled(this.projectRoot)) {
// If we're in a cy in cy project, we will handle registering typescript directly in the server entry point
if (!process.env.CYPRESS_INTERNAL_E2E_TESTING_SELF_PARENT_PROJECT && hasTypeScriptInstalled(this.projectRoot)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Electron must have changed something with their spawn call. We're unsure what, but when cy-in-cy all of this logic is unnecessary.

debug('found typescript in %s', this.projectRoot)
if (isProjectUsingESModules) {
debug(`using --experimental-specifier-resolution=node with --loader ${tsNodeEsm}`)
Expand Down
9 changes: 9 additions & 0 deletions packages/electron/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,12 @@ Upgrading `electron` involves more than just bumping this package's `package.jso

*Solution*: This is often due to a mismatched prebuild of `better-sqlite3`. Ensure your repository is clear of untracked files with `git clean -xfd`, and run `yarn` again. If the issue persists, ensure you are running the latest version of your operating system. Electron prebuilds key to darwin/linux/windows, and do not differentiate between versions of the same.

#### node-abi out of date

If you run into an error like below, please try some of the strategies below.

```shell
Could not detect abi for version X.X.X and runtime electron. Updating "node-abi" might help solve this issue if it is a new release of electron
```

*Solution*: See if there's a new version of `@electron/rebuild` with a newer version of `node-abi` within it. If there is not a newer version, find the [latest release](https://github.com/electron/node-abi/releases) of `node-abi` that has an updated ABI registry with an `abi` entry matching the major version of Electron that you're updating to. Set this `node-abi` version in the `resolutions` of our [package.json](./package.json) file and rerun `yarn`.
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"ast-types": "0.13.3",
"axios": "^1.7.9",
"base64url": "^3.0.1",
"better-sqlite3": "11.5.0",
"better-sqlite3": "11.9.1",
"black-hole-stream": "0.0.1",
"bluebird": "3.7.2",
"body-parser": "1.20.0",
Expand Down
2 changes: 1 addition & 1 deletion scripts/binary/trigger-publish-binary-pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const { getNextVersionForBinary } = require('../get-next-version')
job_name: process.env.CIRCLE_JOB,
triggered_workflow_id: process.env.CIRCLE_WORKFLOW_ID,
triggered_job_url: process.env.CIRCLE_BUILD_URL,
branch: process.env.CIRCLE_BRANCH,
branch: 'electron-34',
should_persist_artifacts: Boolean(process.env.SHOULD_PERSIST_ARTIFACTS),
binary_version: nextVersion,
},
Expand Down
2 changes: 1 addition & 1 deletion system-tests/test-binary/module_api_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import systemTests from '../lib/system-tests'
describe('module API', () => {
systemTests.it('can run module API Mocha spec', {
timeout: 240000,
dockerImage: 'cypress/base-internal:20.18.1-bullseye',
dockerImage: 'cypress/base-internal:20.18.3-bullseye',
withBinary: true,
project: 'module-api',
browser: 'electron',
Expand Down
23 changes: 12 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11033,6 +11033,14 @@ [email protected]:
bindings "^1.5.0"
prebuild-install "^7.1.1"

[email protected]:
version "11.9.1"
resolved "https://registry.yarnpkg.com/better-sqlite3/-/better-sqlite3-11.9.1.tgz#0540da2f2ce24cbd766bb35db412f4be2c75b8bb"
integrity sha512-Ba0KR+Fzxh2jDRhdg6TSH0SJGzb8C0aBY4hR8w8madIdIzzC6Y1+kx5qR6eS1Z+Gy20h6ZU28aeyg0z1VIrShQ==
dependencies:
bindings "^1.5.0"
prebuild-install "^7.1.1"

big.js@^5.2.2:
version "5.2.2"
resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328"
Expand Down Expand Up @@ -23508,17 +23516,10 @@ [email protected]:
lodash "^4.17.21"
propagate "^2.0.0"

node-abi@^2.7.0:
version "2.30.1"
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.30.1.tgz#c437d4b1fe0e285aaf290d45b45d4d7afedac4cf"
integrity sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==
dependencies:
semver "^5.4.1"

node-abi@^3.3.0, node-abi@^3.45.0:
version "3.68.0"
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.68.0.tgz#8f37fb02ecf4f43ebe694090dcb52e0c4cc4ba25"
integrity sha512-7vbj10trelExNjFSBm5kTvZXXa7pZyKWx9RCKIyqe6I9Ev3IzGpQoqBP3a+cOdxY+pWj6VkP28n/2wWysBHD/A==
[email protected], node-abi@^2.7.0, node-abi@^3.3.0, node-abi@^3.45.0:
version "3.74.0"
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.74.0.tgz#5bfb4424264eaeb91432d2adb9da23c63a301ed0"
integrity sha512-c5XK0MjkGBrQPGYG24GBADZud0NCbznxNx0ZkS+ebUTrmV1qTDxPxSL8zEAPURXSbLRWVexxmP4986BziahL5w==
dependencies:
semver "^7.3.5"

Expand Down
Loading