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

fix(dep): Upgrade Electron 28 #28959

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
121aef3
bump Electron/node/node-abi + run extra workflows in CI
jennifer-shehane Feb 16, 2024
a74681e
empty commit
jennifer-shehane Feb 16, 2024
6e73a3e
bump docker images to node + chrome versions for Electron 28
jennifer-shehane Feb 20, 2024
05f873d
bump node types
jennifer-shehane Feb 20, 2024
1cbd4ea
bump xcode to version with default Node v18.17.1
jennifer-shehane Feb 20, 2024
fe34d4d
Merge branch 'develop' into electron-28
jennifer-shehane Feb 20, 2024
837a079
Bump types/node
jennifer-shehane Feb 20, 2024
23cbb71
Merge branch 'electron-28' of https://github.com/cypress-io/cypress i…
jennifer-shehane Feb 20, 2024
652eeaa
update getFileName to follow types of string or undefined
jennifer-shehane Feb 20, 2024
0d3bae1
ts-ignore fetch spread
jennifer-shehane Feb 21, 2024
8e66ac2
yarn lock update
jennifer-shehane Feb 21, 2024
2ef87a0
bump system test yarn lock
jennifer-shehane Feb 21, 2024
3b9c2d9
yarn/types node bump
jennifer-shehane Feb 22, 2024
de8ab30
fix types definition for node types
jennifer-shehane Feb 22, 2024
306e5b6
Merge branch 'develop' into electron-28
jennifer-shehane Feb 22, 2024
5f40d20
Merge branch 'develop' into electron-28
jennifer-shehane Mar 5, 2024
1401928
Merge branch 'develop' into electron-28
jennifer-shehane Mar 7, 2024
1113a99
Merge branch 'develop' of github.com:cypress-io/cypress into electron-28
AtofStryker May 15, 2024
ef36f34
empty commit to run ci [run ci]
AtofStryker May 15, 2024
763367a
fix merge conflict because vscode is really slow to save files with h…
AtofStryker May 15, 2024
1fbc23c
empty commit to run ci [run ci]
AtofStryker May 15, 2024
2a6d6e2
print original toString for fs temporarily to swap value [run ci]
AtofStryker May 15, 2024
decdca0
fix typing issues
AtofStryker May 15, 2024
99d1620
update integrity check [run ci]
AtofStryker May 15, 2024
52addeb
fix stack integrity check
AtofStryker May 15, 2024
500225b
use 18.20.2 docker image [run ci]
AtofStryker May 15, 2024
de6a1fd
Update binary-integrity-check-source.js
ryanthemanuel May 15, 2024
e858554
Update smoke.js
ryanthemanuel May 15, 2024
9985f75
update trigger binary publish and bump cache [run ci]
AtofStryker May 15, 2024
67c4065
Merge branch 'electron-28' of github.com:cypress-io/cypress into elec…
AtofStryker May 15, 2024
ef8361c
bump cache [run ci]
AtofStryker May 15, 2024
a32c241
fix issues with browser window sending cross origin requests as the w…
AtofStryker May 15, 2024
9595366
update docker images [run ci]
AtofStryker May 16, 2024
a5d92ae
Merge branch 'develop' into electron-28
AtofStryker May 16, 2024
f871559
add changelog entry
AtofStryker May 16, 2024
aa36916
update to latest electron 28
AtofStryker May 16, 2024
b0276b6
Merge branch 'electron-28' of github.com:cypress-io/cypress into elec…
AtofStryker May 16, 2024
c5c44af
fix error in changelog
AtofStryker May 16, 2024
0d14d87
fix snapshots in firefox with firefox 126 update
AtofStryker May 16, 2024
1549bd2
Merge branch 'electron-28' of github.com:cypress-io/cypress into elec…
AtofStryker May 16, 2024
208bc8b
polish firefox system tests for somewhat hacky work around
AtofStryker May 16, 2024
55287d4
update cy-non-proxied image to fit base64 encoding in test
AtofStryker May 16, 2024
8286d7b
empty commit to trigger ci [run ci]
AtofStryker May 17, 2024
f56bb33
Merge branch 'develop' into electron-28
jennifer-shehane May 21, 2024
a589f05
Merge branch 'develop' into electron-28
jennifer-shehane May 21, 2024
1607e5e
Merge branch 'develop' into electron-28
jennifer-shehane Sep 11, 2024
950ea49
fix snapshot
ryanthemanuel Sep 11, 2024
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
21 changes: 10 additions & 11 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ mainBuildFilters: &mainBuildFilters
- develop
- /^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'
- 'fix/revert_ozone_hint'
- 'electron-28'
- 'publish-binary'
- 'chore/support_hidpi_wayland'
- 'ryanm/chore/fix-kitchensink-against-staging'
- 'update-v8-snapshot-cache-on-develop'

# 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 @@ -44,6 +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: [ 'electron-28', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -54,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: [ 'fix/revert_ozone_hint', << pipeline.git.branch >> ]
- equal: [ 'electron-28', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -77,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: [ 'chore/support_hidpi_wayland', << pipeline.git.branch >> ]
- equal: [ 'electron-28', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
value: << pipeline.git.branch >>
Expand All @@ -86,7 +85,7 @@ executors:
# the Docker image with Cypress dependencies and Chrome browser
cy-doc:
docker:
- image: cypress/browsers-internal:node18.17.1-chrome124-ff125
- image: cypress/browsers-internal:node18.18.2-chrome125-ff126
# 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 @@ -105,7 +104,7 @@ executors:
# Docker image with non-root "node" user
non-root-docker-user:
docker:
- image: cypress/browsers-internal:node18.17.1-chrome124-ff125
- image: cypress/browsers-internal:node18.18.2-chrome125-ff126
user: node
environment:
PLATFORM: linux
Expand Down Expand Up @@ -153,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" != "fix/revert_ozone_hint" ]]; then
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "publish-binary" && "$CIRCLE_BRANCH" != "electron-28" ]]; 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 @@ -532,7 +531,7 @@ commands:
apt update && apt install -y docker.io
docker run -d --name centos7-builder cypress/centos7-builder:latest /bin/bash -c "sleep 1000000000"
docker cp ~/cypress/node_modules/better-sqlite3 centos7-builder:/better-sqlite3
docker exec -it centos7-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 27.1.3 --include-regex 'better_sqlite3.node$'"
docker exec -it centos7-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 28.3.1 --include-regex 'better_sqlite3.node$'"
docker cp centos7-builder:/better-sqlite3/build/Release/better_sqlite3.node ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node
docker rm -f centos7-builder
cp ~/cypress/node_modules/better-sqlite3/build/Release/better_sqlite3.node ~/cypress/better_sqlite3.node
Expand Down Expand Up @@ -2373,7 +2372,7 @@ jobs:
<<: *defaults
resource_class: small
docker:
- image: cypress/base-internal:18.17.1
- image: cypress/base-internal:18.18.2
steps:
- maybe_skip_binary_jobs
- restore_workspace_binaries
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.17.1
18.18.2
3 changes: 3 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ _Released 5/21/2024_

**Dependency Updates:**

- Upgraded `electron` from to `27.3.10` to `28.3.1`.
- Upgraded bundled Node.js version from `18.17.1` to `18.18.2`.
- Upgraded bundled Chromium version from `118.0.5993.117` to `120.0.6099.56`.
Comment on lines +205 to +207
Copy link
Contributor

Choose a reason for hiding this comment

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

These lines need to be moved up to the top of the CHANGELOG

Copy link
Member Author

Choose a reason for hiding this comment

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

We're running the 29 upgrade first. Electron 28 contains a breaking change, so we're likely to skip this and it will be dead. We'll revisit if we have to though. #30224

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense!

- Updated js-cookie from `2.2.1` to `3.0.5`. Addressed in [#29497](https://github.com/cypress-io/cypress/pull/29497).
- Updated randomstring from `1.1.5` to `1.3.0`. Addressed in [#29503](https://github.com/cypress-io/cypress/pull/29503).

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:node18.17.1-chrome118-ff115
image: cypress/browsers-internal:node18.18.2-chrome125-ff126
ports:
- 5566:5566
- 5567:5567
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.17.5",
"@types/node": "^18.18.2",
"chai": "4.2.0",
"mocha": "3.5.3",
"typescript": "^5.4.5"
Expand Down
2 changes: 1 addition & 1 deletion npm/puppeteer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"puppeteer-core": "^21.2.1"
},
"devDependencies": {
"@types/node": "^18.17.5",
"@types/node": "^18.18.2",
"chai-as-promised": "^7.1.1",
"chokidar": "^3.5.3",
"express": "4.19.2",
Expand Down
2 changes: 1 addition & 1 deletion npm/puppeteer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"types": [
"cypress",
"./support",
"./node_modules/@types/node"
"node"
Copy link
Member Author

Choose a reason for hiding this comment

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

]
},
"include": [
Expand Down
7 changes: 5 additions & 2 deletions npm/vite-dev-server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@
* as importsNotUsedAsValues, we need to use "verbatimModuleSyntax", which will require this package to be an ES Module.
*/
"importsNotUsedAsValues": "error",
/* skips checking declaration types. we skip this because we have multiple versions of vite installed as dev dependencies */
"skipLibCheck": true,
/* issues with node typings clashing with vite 4.
* There are no plans to backport a fix, but might be able to remove this configuration once the repo is on vite version 5.
* @see https://github.com/vitejs/vite/issues/15714#issuecomment-1933724182
*/
"skipLibCheck": true
},
"include": ["src"],
"exclude": ["node_modules", "*.js"]
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 @@ -29,7 +29,7 @@
"webpack-merge": "^5.4.0"
},
"devDependencies": {
"@types/node": "18.17.5",
"@types/node": "^18.18.2",
"@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
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"@types/lodash": "^4.14.168",
"@types/markdown-it": "12.2.3",
"@types/mocha": "8.0.3",
"@types/node": "18.17.5",
"@types/node": "^18.18.2",
"@types/prismjs": "1.16.0",
"@types/react": "16.9.50",
"@types/react-dom": "16.9.8",
Expand Down Expand Up @@ -140,7 +140,7 @@
"dedent": "^0.7.0",
"del": "3.0.0",
"detect-port": "^1.6.1",
"electron": "27.3.10",
"electron": "28.3.1",
"electron-builder": "^23.6.0",
"enzyme-adapter-react-16": "1.12.1",
"eslint": "^8.56.0",
Expand Down Expand Up @@ -206,7 +206,7 @@
"yarn-deduplicate": "3.1.0"
},
"engines": {
"node": ">=18.17.0",
"node": ">=18.18.0",
"yarn": ">=1.22.17"
},
"productName": "Cypress",
Expand Down
1 change: 1 addition & 0 deletions packages/data-context/src/DataContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export class DataContext {
@cached
get cloud () {
return new CloudDataSource({
// @ts-ignore
fetch: (...args) => this.util.fetch(...args),
Copy link
Member Author

Choose a reason for hiding this comment

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

getUser: () => this.coreData.user,
logout: () => this.actions.auth.logout().catch(this.logTraceError),
Expand Down
1 change: 1 addition & 0 deletions packages/driver/cypress/e2e/commands/net_stubbing.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ describe('network stubbing', { retries: 15 }, function () {

beforeEach(function () {
cy.spy(Cypress.utils, 'warning')
cy.visit('/fixtures/empty.html')
Copy link
Contributor

Choose a reason for hiding this comment

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

with Electron 28, we need to visit a url to establish origin , even though the document.location is already on the correct origin. A bit strange, but this does make sense for security purposes. I do not think this is a breaking change but more so an oddity with the test.

Copy link
Member Author

Choose a reason for hiding this comment

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

What is the error when this happens?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Will this be technically breaking? Folks could have tests that could have worked previously without a visit that no longer work?

Copy link
Contributor

Choose a reason for hiding this comment

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

The error was fairly vague via ERR_INVALID_ARGUMENT when an xhr request would fire. The only way I could resolve it was to visit and establish the origin before making requests to that origin server. By guess is it was a problem with the domain not being established while attempting to make same origin connections. This could technically be breaking, I wonder for those doing API testing, but I would also think most people doing API testing are doing so from cypress commands through the node API and not browser requests before visiting a page

})

context('cy.intercept()', function () {
Expand Down
10 changes: 10 additions & 0 deletions packages/driver/cypress/e2e/commands/waiting.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,8 @@ describe('src/cy/commands/waiting', () => {

describe('explicit wait time', function () {
it('can turn off logging when protocol is disabled', { protocolEnabled: false }, function () {
cy.visit('/fixtures/empty.html')

cy.on('_log:added', (attrs, log) => {
this.hiddenLog = log
})
Expand All @@ -960,6 +962,8 @@ describe('src/cy/commands/waiting', () => {
})

it('can send hidden log when protocol is enabled', { protocolEnabled: true }, function () {
cy.visit('/fixtures/empty.html')

cy.on('_log:added', (attrs, log) => {
this.hiddenLog = log
})
Expand All @@ -977,6 +981,8 @@ describe('src/cy/commands/waiting', () => {

describe('wait for xhr', function () {
it('can turn off logging when protocol is disabled', { protocolEnabled: false }, function () {
cy.visit('/fixtures/empty.html')

cy.on('_log:added', (attrs, log) => {
if (attrs.name === 'wait') {
this.hiddenWaitLog = log
Expand Down Expand Up @@ -1004,6 +1010,8 @@ describe('src/cy/commands/waiting', () => {
})

it('can send hidden log when protocol is enabled', { protocolEnabled: true }, function () {
cy.visit('/fixtures/empty.html')

cy.on('_log:added', (attrs, log) => {
if (attrs.name === 'wait') {
this.hiddenWaitLog = log
Expand Down Expand Up @@ -1035,6 +1043,8 @@ describe('src/cy/commands/waiting', () => {
})

it('can turn off logging for wait for xhr', { protocolEnabled: true }, function () {
cy.visit('/fixtures/empty.html')

cy.on('_log:added', (attrs, log) => {
if (attrs.name === 'wait') {
this.hiddenWaitLog = log
Expand Down
2 changes: 1 addition & 1 deletion packages/errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@packages/types": "0.0.0-development",
"@types/chai": "4.2.15",
"@types/mocha": "8.2.2",
"@types/node": "18.17.5",
"@types/node": "^18.18.2",
"@types/pngjs": "^6.0.1",
"ansi-styles": "^5",
"chai": "4.2.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { SocketShape } from '@packages/socket/lib/types'
import type { ClientOptions } from '@urql/core'

export const urqlFetchSocketAdapter = (io: SocketShape): ClientOptions['fetch'] => {
return (url, fetchOptions = {}) => {
return (url, fetchOptions: RequestInit = {}) => {
return new Promise<Response>((resolve, reject) => {
// Handle aborted requests
if (fetchOptions.signal) {
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
"@types/chrome-remote-interface": "0.31.14",
"@types/http-proxy": "1.17.4",
"@types/mime": "3.0.1",
"@types/node": "18.17.5",
"@types/node": "^18.18.2",
"@types/request-promise": "^4.1.48",
"babel-loader": "9.1.3",
"chai": "1.10.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {},
"devDependencies": {
"@types/node": "18.17.5",
"@types/node": "^18.18.2",
"devtools-protocol": "0.0.1346313",
"typescript": "^5.4.5"
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/binary/binary-integrity-check-source.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function validateElectron (electron) {

function validateFs (fs) {
// Hard coded function as this is electron code and there's not an easy way to get the function string at package time. If this fails on an updated version of electron, we'll need to update this.
if (originalToString.call(fs.readFileSync) !== `function(e,s){const n=splitPath(e);if(!n.isAsar)return F.apply(this,arguments);const{asarPath:a,filePath:i}=n,o=getOrCreateArchive(a);if(!o)throw createError("INVALID_ARCHIVE",{asarPath:a});const c=o.getFileInfo(i);if(!c)throw createError("NOT_FOUND",{asarPath:a,filePath:i});if(0===c.size)return s?"":r.Buffer.alloc(0);if(c.unpacked){const e=o.copyFileOut(i);return t.readFileSync(e,s)}if(s){if("string"==typeof s)s={encoding:s};else if("object"!=typeof s)throw new TypeError("Bad arguments")}else s={encoding:null};const{encoding:f}=s,l=r.Buffer.alloc(c.size),u=o.getFdAndValidateIntegrityLater();if(!(u>=0))throw createError("NOT_FOUND",{asarPath:a,filePath:i});return logASARAccess(a,i,c.offset),t.readSync(u,l,0,c.size,c.offset),validateBufferIntegrity(l,c.integrity),f?l.toString(f):l}`) {
if (originalToString.call(fs.readFileSync) !== `function(e,r){const n=splitPath(e);if(!n.isAsar)return F.apply(this,arguments);const{asarPath:a,filePath:i}=n,o=getOrCreateArchive(a);if(!o)throw createError("INVALID_ARCHIVE",{asarPath:a});const c=o.getFileInfo(i);if(!c)throw createError("NOT_FOUND",{asarPath:a,filePath:i});if(0===c.size)return r?"":s.Buffer.alloc(0);if(c.unpacked){const e=o.copyFileOut(i);return t.readFileSync(e,r)}if(r){if("string"==typeof r)r={encoding:r};else if("object"!=typeof r)throw new TypeError("Bad arguments")}else r={encoding:null};const{encoding:f}=r,l=s.Buffer.alloc(c.size),u=o.getFdAndValidateIntegrityLater();if(!(u>=0))throw createError("NOT_FOUND",{asarPath:a,filePath:i});return logASARAccess(a,i,c.offset),t.readSync(u,l,0,c.size,c.offset),validateBufferIntegrity(l,c.integrity),f?l.toString(f):l}`) {
console.error(`Integrity check failed for toString.call(fs.readFileSync)`)
throw new Error(integrityErrorMessage)
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/binary/smoke.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ const runIntegrityTest = async function (buildAppExecutable, buildAppDir, e2e) {
console.error(`extra keys in electron process: ${extraKeys}`)
}

const allowList = ['__core-js_shared__', 'getSnapshotResult', 'supportTypeScript', 'Iterator']
const allowList = ['__core-js_shared__', 'getSnapshotResult', 'supportTypeScript']

await testAlteringEntryPoint(`(${compareGlobals.toString()})()`, `extra keys in electron process: ${allowList}\nIntegrity check failed with expected stack length 9 but got 10`)

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: 'upgrade-electron-28',
Copy link
Contributor

Choose a reason for hiding this comment

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

we will need to remove this post merging (as well as merging the updated binary code)

should_persist_artifacts: Boolean(process.env.SHOULD_PERSIST_ARTIFACTS),
binary_version: nextVersion,
},
Expand Down
25 changes: 25 additions & 0 deletions system-tests/lib/normalizeStdout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,31 @@ export const normalizeStdout = function (str: string, options: any = {}) {
if (options.sanitizeScreenshotDimensions) {
// screenshot dimensions
str = str.replace(/(\(\d+x\d+\))/g, replaceScreenshotDims)
// Since Firefox 126, the expected height pixels on screenshots have been off by 1 pixel
// this is a small margin of error, which we will account for here by adding a pixel to the expected snapshot
} else if (options.browser === 'firefox') {
try {
const widthAndHeightMatcher = new RegExp(/(?<full>\((?<width>\d+)x(?<height>\d+)\))/g)
const matches = widthAndHeightMatcher.exec(str)

if (matches !== null) {
const fullString = matches.groups.full
const width = parseInt(matches.groups.width)
let height = parseInt(matches.groups.height)

// A bit hacky, but all of our system tests in firefox have even pixel snapshots.
// This coercion is necessary because sub window snapshots, such as
// element or viewport captures, have the correct viewport.
// Since in this context we cannot deterministically figure out where the
// snapshot came from, this "workaround" accomplishes getting the correct height
// in the snapshot.
height = height % 2 === 0 ? height : height + 1

str = str.replaceAll(fullString, `(${width}x${height})`)
}
} catch (e) {
// swallow error here as system test will fail anyway and problem should be obvious
}
}

return replaceStackTraceLines(str, options.browser)
Expand Down
2 changes: 1 addition & 1 deletion system-tests/projects/angular-13/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@angular-devkit/build-angular": "~13.3.6",
"@angular/cli": "~13.3.6",
"@angular/compiler-cli": "~13.3.0",
"@types/node": "^18.17.5",
"@types/node": "^18.18.2",
"typescript": "~4.6.2"
},
"projectFixtureDirectory": "angular"
Expand Down
15 changes: 11 additions & 4 deletions system-tests/projects/angular-13/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1490,10 +1490,12 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.6.tgz#0ba49ac517ad69abe7a1508bc9b3a5483df9d5d7"
integrity sha512-/xUq6H2aQm261exT6iZTMifUySEt4GR5KX8eYyY+C4MSNPqSh9oNIP7tz2GLKTlFaiBbgZNxffoR3CVRG+cljw==

"@types/node@^18.17.5":
version "18.17.5"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.17.5.tgz#c58b12bca8c2a437b38c15270615627e96dd0bc5"
integrity sha512-xNbS75FxH6P4UXTPUJp/zNPq6/xsfdJKussCWNOnz4aULWIRwMgP1LgaB5RiBnMX1DPCYenuqGZfnIAx5mbFLA==
"@types/node@^18.18.2":
version "18.19.17"
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.17.tgz#a581a9fb4b2cfdbc61f008804f4436b2d5c40354"
integrity sha512-SzyGKgwPzuWp2SHhlpXKzCX0pIOfcI4V2eF37nNBJOhwlegQ83omtVQ1XxZpDE06V/d6AQvfQdPfnw0tRC//Ng==
dependencies:
undici-types "~5.26.4"

"@types/parse-json@^4.0.0":
version "4.0.0"
Expand Down Expand Up @@ -5831,6 +5833,11 @@ typescript@~4.6.2:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9"
integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==

undici-types@~5.26.4:
version "5.26.5"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==

unicode-canonical-property-names-ecmascript@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ describe('windowSize', () => {
} else {
expect({
innerWidth: top.window.innerWidth,
innerHeight: top.window.innerHeight,
// Since Firefox 126, the expected height pixels on screenshots have been off by 1 pixel
// this is a small margin of error, which we will account for here by adding a pixel to the expected snapshot
innerHeight: Cypress.browser.name === 'firefox' ? top.window.innerHeight + 1 : top.window.innerHeight,
// screenWidth: top.screen.width,
// screenHeight: top.screen.height,
// availWidth: top.screen.availWidth,
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:18.17.1',
dockerImage: 'cypress/base-internal:18.18.2',
withBinary: true,
project: 'module-api',
browser: 'electron',
Expand Down
Loading
Loading