Skip to content
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

dependency: electron 33 upgrade #30716

Merged
merged 8 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
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.

11-26-24
12-04-24
20 changes: 10 additions & 10 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
- 'update-v8-snapshot-cache-on-develop'
- 'feat/support_vite_6'
- 'ryanm/chore/electron-33-upgrade'
- 'publish-binary'

# usually we don't build Mac app - it takes a long time
Expand All @@ -42,7 +42,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: [ 'feat/support_vite_6', << pipeline.git.branch >> ]
- equal: [ 'ryanm/chore/electron-33-upgrade', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -53,7 +53,7 @@ linuxArm64WorkflowFilters: &linux-arm64-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: [ 'feat/support_vite_6', << pipeline.git.branch >> ]
- equal: [ 'ryanm/chore/electron-33-upgrade', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -76,7 +76,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: [ 'build-binary-placeholder', << pipeline.git.branch >> ]
- equal: [ 'ryanm/chore/electron-33-upgrade', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -85,7 +85,7 @@ executors:
# the Docker image with Cypress dependencies and Chrome browser
cy-doc:
docker:
- image: cypress/browsers-internal:node20.18.0-bullseye-chrome129-ff131
- image: cypress/browsers-internal:node20.18.1-bullseye-chrome131-ff133
# 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 @@ -94,7 +94,7 @@ executors:

kitchensink-executor:
docker:
- image: cypress/browsers-internal:node20.18.0-bullseye-chrome129-ff131
- image: cypress/browsers-internal:node20.18.1-bullseye-chrome131-ff133
# 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 @@ -104,7 +104,7 @@ executors:
# Docker image with non-root "node" user
non-root-docker-user:
docker:
- image: cypress/browsers-internal:node20.18.0-bullseye-chrome129-ff131
- image: cypress/browsers-internal:node20.18.1-bullseye-chrome131-ff133
user: node
environment:
PLATFORM: linux
Expand Down Expand Up @@ -152,7 +152,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" != "feat/support_vite_6" ]]; then
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "ryanm/chore/electron-33-upgrade" ]]; 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 @@ -548,7 +548,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 32.2.0 --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 33.2.1 --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 @@ -1800,7 +1800,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.0-yarn-berry
- image: cypress/base-internal:20.18.1-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
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.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. v20.18.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. v20.18.0
placeholder: ex. v20.18.1
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.0
20.18.1
6 changes: 3 additions & 3 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ _Released 12/17/2024 (PENDING)_
- Prebuilt binaries for Linux are no longer compatible with Linux distributions based on glibc <2.28, for example: Ubuntu 14-18, RHEL 7, CentOS 7, Amazon Linux 2. Addresses [#29601](https://github.com/cypress-io/cypress/issues/29601).
- Cypress now only officially supports the latest 3 major versions of Chrome, Firefox, and Edge - older browser versions may still work, but we recommend keeping your browsers up to date to ensure compatibility with Cypress. A warning will no longer be displayed on browser selection in the Launchpad for any 'unsupported' browser versions. Additionally, the undocumented `minSupportedVersion` property has been removed from `Cypress.browser`. Addressed in [#30462](https://github.com/cypress-io/cypress/pull/30462).
- It is no longer possible to make a `fetch` or `XMLHttpRequest` request from the `about:blank` page in Electron (i.e. `cy.window().then((win) => win.fetch('<some-url>')`). You must use `cy.request` instead or perform some form of initial navigation via `cy.visit()`. Addressed in [#29547](https://github.com/cypress-io/cypress/pull/30394).
- Upgraded bundled Node.js version from `18.17.0` to `20.18.0`. Addresses [#29547](https://github.com/cypress-io/cypress/issues/29547).
- Upgraded bundled Node.js version from `18.17.0` to `20.18.1`. Addresses [#29547](https://github.com/cypress-io/cypress/issues/29547).
- `@cypress/webpack-dev-server` no longer supports `webpack-dev-server` version 3. Additionally, `@cypress/webpack-dev-server` now ships with `webpack-dev-server` version 5 by default. `webpack-dev-server` version 4 will need to be installed along side Cypress if you are still using `webpack` version 4. Addresses [#29308](https://github.com/cypress-io/cypress/issues/29308), [#30347](https://github.com/cypress-io/cypress/issues/30347), and [#30141](https://github.com/cypress-io/cypress/issues/30141).
- `@cypress/vite-dev-server` no longer supports `vite` versions 2 and 3. Addresses [#29377](https://github.com/cypress-io/cypress/issues/29377) and [#29378](https://github.com/cypress-io/cypress/issues/29378).
- The `experimentalJustInTimeCompile` configuration option for component testing has been replaced with a `justInTimeCompile` option that is `true` by default. This option will only compile resources directly related to your spec, compiling them 'just-in-time' before spec execution. This should result in improved memory management and performance for component tests in `cypress open` and `cypress run` modes, in particular for large component testing suites. `justInTimeCompile` is now only supported for [`webpack`](https://www.npmjs.com/package/webpack). Addresses [#30234](https://github.com/cypress-io/cypress/issues/30234). Addressed in [#30402](https://github.com/cypress-io/cypress/pull/30402).
Expand Down Expand Up @@ -58,9 +58,9 @@ in this [GitHub issue](https://github.com/cypress-io/cypress/issues/30447). Addr

**Dependency Updates:**

- Upgraded `electron` from `27.3.10` to `32.2.0`. Addresses [#29547](https://github.com/cypress-io/cypress/issues/29547).
- Upgraded `electron` from `27.3.10` to `33.2.1`. Addresses [#29547](https://github.com/cypress-io/cypress/issues/29547) and [#30561](https://github.com/cypress-io/cypress/issues/30561).
- Upgraded `@electron/rebuild` from `3.2.10` to `3.7.1`. Addresses [#28766](https://github.com/cypress-io/cypress/issues/28766) and [#30632](https://github.com/cypress-io/cypress/issues/30632).
- Upgraded bundled Chromium version from `118.0.5993.159` to `128.0.6613.178`. Addresses [#29547](https://github.com/cypress-io/cypress/issues/29547).
- Upgraded bundled Chromium version from `118.0.5993.159` to `130.0.6723.137`. Addresses [#29547](https://github.com/cypress-io/cypress/issues/29547) and [#30561](https://github.com/cypress-io/cypress/issues/30561).
- Updated `jQuery` from `3.4.1` to `3.7.1`. Addressed in [#30345](https://github.com/cypress-io/cypress/pull/30345).
- Updated `react` from `17.0.2` to `18.3.1` and `react-dom` from `17.0.2` to `18.3.1`. Addresses [#30511](https://github.com/cypress-io/cypress/issues/30511).

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/browsers-internal:node20.18.0-bullseye-chrome129-ff131
image: cypress/browsers-internal:node20.18.1-bullseye-chrome131-ff133
ports:
- 5566:5566
- 5567:5567
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@
"dedent": "^0.7.0",
"del": "3.0.0",
"detect-port": "^1.6.1",
"electron": "32.2.0",
"electron-builder": "^23.6.0",
"electron": "33.2.1",
"electron-builder": "^25.1.8",
"enzyme-adapter-react-16": "1.12.1",
"eslint": "^8.56.0",
"eslint-plugin-cypress": "3.5.0",
Expand Down Expand Up @@ -212,7 +212,7 @@
"yarn-deduplicate": "3.1.0"
},
"engines": {
"node": ">=20.18.0",
"node": ">=20.18.1",
"yarn": ">=1.22.17"
},
"productName": "Cypress",
Expand Down
2 changes: 1 addition & 1 deletion packages/data-context/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"node-machine-id": "1.1.12",
"p-defer": "^3.0.0",
"parse-glob": "3.0.4",
"prettier": "2.5.1",
"prettier": "2.8.8",
"randexp": "0.5.3",
"randomstring": "1.3.0",
"react-docgen": "6.0.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"ansi_up": "5.0.0",
"ast-types": "0.13.3",
"base64url": "^3.0.1",
"better-sqlite3": "11.3.0",
"better-sqlite3": "11.5.0",
"black-hole-stream": "0.0.1",
"bluebird": "3.7.2",
"bundle-require": "3.0.4",
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 @@ -10,7 +10,7 @@ const { getNextVersionForBinary } = require('../get-next-version')
const { nextVersion } = await getNextVersionForBinary()

const body = JSON.stringify({
branch: 'release/14.0.0',
branch: 'ryanm/chore/electron-33-upgrade',
mschile marked this conversation as resolved.
Show resolved Hide resolved
parameters: {
temp_dir: os.tmpdir(),
sha: process.env.CIRCLE_SHA1,
Expand Down
24 changes: 16 additions & 8 deletions system-tests/lib/normalizeStdout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,22 +178,30 @@ export const normalizeStdout = function (str: string, options: any = {}) {
str = str.split('\n').filter((line) => !line.includes(wdsFailedMsg)).join('\n')
}

// in Firefox 130, height dimensions are off by 1 pixel in CI, so we need to fix the offset to match common snapshots
if (options.browser === 'firefox' && process.env.CI) {
// in Firefox 130, height dimensions are off by 1 pixel (721px local and 719px CI), so we need to fix the offset to match common snapshots
// in Firefox 133, height dimensions are off by 43/44 pixels (677px local and 676px CI), so we need to fix the offset to match common snapshots
mschile marked this conversation as resolved.
Show resolved Hide resolved
if (options.browser === 'firefox') {
const dimensionRegex = new RegExp(/(\((?<width>\d+)x(?<height>\d+)\))/g)

const matches = dimensionRegex.exec(str)

if (matches?.groups?.height && matches?.groups?.width) {
const height = parseInt(matches?.groups?.height)

// only happens on default height for whatever reason in firefox 130...
if (height === 719) {
const expectedHeight = height + 1
const expectedWidth = matches?.groups?.width

str = str.replaceAll(`(${expectedWidth}x${height})`, `(${expectedWidth}x${expectedHeight})`)
let expectedHeight = height
const expectedWidth = matches?.groups?.width

if (height === 719) { // only happens on default height for whatever reason in firefox 130...
mschile marked this conversation as resolved.
Show resolved Hide resolved
expectedHeight = height + 1
} else if (height === 721) { // only happens on default height for whatever reason in firefox 130...
expectedHeight = height - 1
} else if (height === 676) { // only happens on default height for whatever reason in firefox 133...
expectedHeight = height + 44
} else if (height === 677) { // only happens on default height for whatever reason in firefox 133...
expectedHeight = height + 43
}

str = str.replaceAll(`(${expectedWidth}x${height})`, `(${expectedWidth}x${expectedHeight})`)
}
}

Expand Down
24 changes: 8 additions & 16 deletions system-tests/projects/screen-size/cypress/e2e/default_size.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,25 @@ describe('windowSize', () => {
expect({
innerWidth: top.window.innerWidth,
innerHeight: top.window.innerHeight,
// screenWidth: top.screen.width,
// screenHeight: top.screen.height,
// availWidth: top.screen.availWidth,
// availHeight: top.screen.availHeight,
}).deep.eq({
innerWidth: 1280,
innerHeight: 581, // chrome 128 decreased the size here from 633 to 581
// screenWidth: 1280,
// screenHeight: 603,
// availWidth: 1280,
// availHeight: 603,
})
} else if (Cypress.browser.name === 'firefox') {
expect({
innerWidth: top.window.innerWidth,
innerHeight: top.window.innerHeight,
}).deep.eq({
innerWidth: 1280,
innerHeight: 677, // firefox 133 decreased the size here from 720 to 677
})
} else {
expect({
innerWidth: top.window.innerWidth,
innerHeight: top.window.innerHeight,
// screenWidth: top.screen.width,
// screenHeight: top.screen.height,
// availWidth: top.screen.availWidth,
// availHeight: top.screen.availHeight,
}).deep.eq({
innerWidth: 1280,
innerHeight: 720,
// screenWidth: 1280,
// screenHeight: 720,
// availWidth: 1280,
// availHeight: 720,
})
}
})
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.0-bullseye',
dockerImage: 'cypress/base-internal:20.18.1-bullseye',
withBinary: true,
project: 'module-api',
browser: 'electron',
Expand Down
Loading
Loading