diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 8202a0f97466..f75aa87df91f 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -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 @@ -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 >> @@ -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 >> @@ -100,7 +96,7 @@ 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.19.1-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: @@ -108,7 +104,7 @@ executors: kitchensink-executor: docker: - - image: cypress/base-internal:20.18.1-bullseye + - image: cypress/base-internal:20.19.1-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: @@ -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.19.1-bullseye user: node environment: PLATFORM: linux @@ -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 @@ -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.5.6 --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 @@ -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.19.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 @@ -1942,7 +1938,7 @@ jobs: parallelism: 1 working_directory: ~/cypress docker: - - image: cypress/base-internal:20.18.1-bullseye + - image: cypress/base-internal:20.19.1-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 diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.yml b/.github/ISSUE_TEMPLATE/1-bug-report.yml index 19d6046515e1..dba19e0a5eaa 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.yml +++ b/.github/ISSUE_TEMPLATE/1-bug-report.yml @@ -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.19.1 validations: required: true - type: input diff --git a/.github/ISSUE_TEMPLATE/2-memory-issue.yml b/.github/ISSUE_TEMPLATE/2-memory-issue.yml index f492fbb8d201..585b129f911b 100644 --- a/.github/ISSUE_TEMPLATE/2-memory-issue.yml +++ b/.github/ISSUE_TEMPLATE/2-memory-issue.yml @@ -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.19.1 validations: required: true - type: input diff --git a/.github/ISSUE_TEMPLATE/3-install-issue.yml b/.github/ISSUE_TEMPLATE/3-install-issue.yml index 2a4ce852ce3d..99e56e98f94a 100644 --- a/.github/ISSUE_TEMPLATE/3-install-issue.yml +++ b/.github/ISSUE_TEMPLATE/3-install-issue.yml @@ -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.19.1 validations: required: true - type: dropdown diff --git a/.node-version b/.node-version index d4b7699d36ca..79495348c8e1 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -20.18.1 +20.19.1 diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 58e3af7f96dc..51d425cc1fe9 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -17,6 +17,12 @@ _Released 5/6/2025 (PENDING)_ - The Assertions menu when you right click in `experimentalStudio` tests now displays in dark mode. Addresses [#10621](https://github.com/cypress-io/cypress-services/issues/10621). Addressed in [#31598](https://github.com/cypress-io/cypress/pull/31598). - 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.5.6`. 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.19.1`. 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_ diff --git a/docker-compose.yml b/docker-compose.yml index 64f5dcbc70c1..07ab05ffa314 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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.19.1-bullseye ports: - 5566:5566 - 5567:5567 diff --git a/package.json b/package.json index a30aecde7a75..c9a0116bc18b 100644 --- a/package.json +++ b/package.json @@ -141,7 +141,7 @@ "dedent": "^0.7.0", "del": "3.0.0", "detect-port": "^2.1.0", - "electron": "33.2.1", + "electron": "34.5.6", "electron-builder": "^25.1.8", "enzyme-adapter-react-16": "1.12.1", "eslint": "^8.56.0", @@ -214,7 +214,7 @@ "yarn-deduplicate": "3.1.0" }, "engines": { - "node": ">=20.18.1", + "node": ">=20.19.1", "yarn": ">=1.22.22" }, "productName": "Cypress", @@ -279,6 +279,7 @@ "@types/react": "18.3.12", "browserify-sign": "4.2.2", "devtools-protocol": "0.0.1413303", + "node-abi": "3.74.0", "sharp": "0.29.3", "vue-template-compiler": "2.6.12" }, diff --git a/packages/data-context/src/data/ProjectConfigIpc.ts b/packages/data-context/src/data/ProjectConfigIpc.ts index 32a186229f81..b12a8ad0320a 100644 --- a/packages/data-context/src/data/ProjectConfigIpc.ts +++ b/packages/data-context/src/data/ProjectConfigIpc.ts @@ -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)) { debug('found typescript in %s', this.projectRoot) if (isProjectUsingESModules) { debug(`using --experimental-specifier-resolution=node with --loader ${tsNodeEsm}`) diff --git a/packages/electron/README.md b/packages/electron/README.md index 208a609b2810..b83ef961ad0c 100644 --- a/packages/electron/README.md +++ b/packages/electron/README.md @@ -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`. \ No newline at end of file diff --git a/packages/server/package.json b/packages/server/package.json index 22136fc63685..b3a95a697b06 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -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", diff --git a/scripts/binary/trigger-publish-binary-pipeline.js b/scripts/binary/trigger-publish-binary-pipeline.js index a57cfa801d6b..b7d7954d5d8c 100644 --- a/scripts/binary/trigger-publish-binary-pipeline.js +++ b/scripts/binary/trigger-publish-binary-pipeline.js @@ -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, }, diff --git a/system-tests/projects/v8-snapshot/native-modules/app.js b/system-tests/projects/v8-snapshot/native-modules/app.js index 2960b672d166..88ad3648c59e 100644 --- a/system-tests/projects/v8-snapshot/native-modules/app.js +++ b/system-tests/projects/v8-snapshot/native-modules/app.js @@ -9,4 +9,9 @@ async function watchAndLearn () { console.log(JSON.stringify({ itemIsDir: fsevents.constants.ItemIsDir })) } -watchAndLearn() +watchAndLearn().then(() => { + process.exit(0) +}).catch((err) => { + console.error(err) + process.exit(1) +}) diff --git a/system-tests/test-binary/module_api_spec.ts b/system-tests/test-binary/module_api_spec.ts index 03ac8eb60246..b0d68c31cf1b 100644 --- a/system-tests/test-binary/module_api_spec.ts +++ b/system-tests/test-binary/module_api_spec.ts @@ -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.19.1-bullseye', withBinary: true, project: 'module-api', browser: 'electron', diff --git a/yarn.lock b/yarn.lock index 2e5019d6384b..e48a2a2c67d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11033,6 +11033,14 @@ better-sqlite3@11.5.0: bindings "^1.5.0" prebuild-install "^7.1.1" +better-sqlite3@11.9.1: + 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" @@ -14952,10 +14960,10 @@ electron-to-chromium@^1.5.73: resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.116.tgz#b779d73cd0cc75305d12ae4f061d7f7bcee4c761" integrity sha512-mufxTCJzLBQVvSdZzX1s5YAuXsN1M4tTyYxOOL1TcSKtIzQ9rjIrm7yFK80rN5dwGTePgdoABDSHpuVtRQh0Zw== -electron@33.2.1: - version "33.2.1" - resolved "https://registry.yarnpkg.com/electron/-/electron-33.2.1.tgz#d0d7bba7a7abf4f14881d0a6e03c498b301a2d5f" - integrity sha512-SG/nmSsK9Qg1p6wAW+ZfqU+AV8cmXMTIklUL18NnOKfZLlum4ZsDoVdmmmlL39ZmeCaq27dr7CgslRPahfoVJg== +electron@34.5.6: + version "34.5.6" + resolved "https://registry.yarnpkg.com/electron/-/electron-34.5.6.tgz#b18f1973df9846ff41ab98c7f9a25c35d5ebf731" + integrity sha512-cmP0CDnWFwyZrzn72AXS9oJiOjNIRPgKpGO2ykz3Syo+9B2RJ9WQzxOKkpntcWE5/nRsyFkRUCMTgGo3uNvCxQ== dependencies: "@electron/get" "^2.0.0" "@types/node" "^20.9.0" @@ -23508,17 +23516,10 @@ nock@13.2.9: 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== +node-abi@3.74.0, 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"