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: upgrade to electron 29 #30224

Closed
wants to merge 66 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 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
b52aef9
WIP
AtofStryker May 24, 2024
94a69ec
fix
ryanthemanuel Sep 11, 2024
a0ec796
merge develop
ryanthemanuel Sep 11, 2024
ac4fc2b
Bump to 29.4.6
jennifer-shehane Sep 11, 2024
01023e0
Update scripts/binary/trigger-publish-binary-pipeline.js
jennifer-shehane Sep 11, 2024
4255fb5
add code comment for why --no-use-ic flag is there
jennifer-shehane Sep 11, 2024
9f31f09
Merge branch 'electron-29' of https://github.com/cypress-io/cypress i…
jennifer-shehane Sep 11, 2024
ee67e7b
remove 'empty' visits to ensure 29 works without these changes.
jennifer-shehane Sep 11, 2024
2bce45f
try to downgrade better-sqlite
jennifer-shehane Sep 11, 2024
44c070d
better-sqlite3 10
ryanthemanuel Sep 11, 2024
9fe813a
fix build
ryanthemanuel Sep 11, 2024
ba370fc
fix
ryanthemanuel Sep 11, 2024
a50043e
ensure that the branch gets used in the publish step
ryanthemanuel Sep 11, 2024
01bdddc
turn off auto-cancellation for these runs to see what's failing
jennifer-shehane Sep 12, 2024
beea4b7
Update scripts/binary/trigger-publish-binary-pipeline.js
ryanthemanuel Sep 12, 2024
cad44d8
fix types error
ryanthemanuel Sep 12, 2024
2e8876e
remove gcc
ryanthemanuel Sep 12, 2024
0ae94b2
try something
ryanthemanuel Sep 12, 2024
f03ad63
try something else
ryanthemanuel Sep 12, 2024
4f849dd
bump Node.js to 20
jennifer-shehane Sep 13, 2024
610ea3b
Merge branch 'electron-29' of https://github.com/cypress-io/cypress i…
jennifer-shehane Sep 13, 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
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-13-24
09-11-24
29 changes: 14 additions & 15 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ 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'
- 'fix/revert_ozone_hint'
- 'publish-binary'
- 'chore/support_hidpi_wayland'
- 'ryanm/chore/fix-kitchensink-against-staging'
- 'electron-29'

# 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-29', << 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-29', << 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-29', << 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-29" ]]; 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 --save-dev prebuild@^12.0.0 && npm install --ignore-scripts && npx --no-install prebuild -r electron -t 29.4.6 --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 @@ -582,7 +581,7 @@ commands:
# internal PR
CYPRESS_RECORD_KEY=$MAIN_RECORD_KEY \
CYPRESS_INTERNAL_ENABLE_TELEMETRY="true" \
yarn cypress:run --record --parallel --group 5x-driver-<<parameters.browser>> --browser <<parameters.browser>> --runner-ui
yarn cypress:run --record --parallel --auto-cancel-after-failures false --group 5x-driver-<<parameters.browser>> --browser <<parameters.browser>> --runner-ui
else
# external PR
TESTFILES=$(circleci tests glob "cypress/e2e/**/*.cy.*" | circleci tests split --total=$CIRCLE_NODE_TOTAL)
Expand Down Expand Up @@ -656,7 +655,7 @@ commands:
PERCY_ENABLE=${PERCY_TOKEN:-0} \
PERCY_PARALLEL_TOTAL=-1 \
CYPRESS_INTERNAL_ENABLE_TELEMETRY="true" \
$cmd yarn workspace @packages/<<parameters.package>> cypress:run:<<parameters.type>> --browser <<parameters.browser>> --record --parallel --group <<parameters.package>>-<<parameters.type>>
$cmd yarn workspace @packages/<<parameters.package>> cypress:run:<<parameters.type>> --browser <<parameters.browser>> --record --parallel --auto-cancel-after-failures false --group <<parameters.package>>-<<parameters.type>>
else
# external PR

Expand Down Expand Up @@ -1943,7 +1942,7 @@ jobs:
PERCY_ENABLE=${PERCY_TOKEN:-0} \
PERCY_PARALLEL_TOTAL=-1 \
yarn percy exec --parallel -- -- \
yarn cypress:run --record --parallel --group reporter --runner-ui
yarn cypress:run --record --parallel --auto-cancel-after-failures false --group reporter --runner-ui
working_directory: packages/reporter
- verify-mocha-results
- store_test_results:
Expand All @@ -1967,7 +1966,7 @@ jobs:
PERCY_ENABLE=${PERCY_TOKEN:-0} \
PERCY_PARALLEL_TOTAL=-1 \
yarn percy exec --parallel -- -- \
yarn cypress:run --record --parallel --group webpack-dev-server
yarn cypress:run --record --parallel --auto-cancel-after-failures false --group webpack-dev-server
working_directory: npm/webpack-dev-server
- store_test_results:
path: /tmp/cypress
Expand All @@ -1989,7 +1988,7 @@ jobs:
PERCY_ENABLE=${PERCY_TOKEN:-0} \
PERCY_PARALLEL_TOTAL=-1 \
yarn percy exec --parallel -- -- \
yarn cypress:run --record --parallel --group vite-dev-server
yarn cypress:run --record --parallel --auto-cancel-after-failures false --group vite-dev-server
working_directory: npm/vite-dev-server
- store_test_results:
path: /tmp/cypress
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
20.15.0
3 changes: 3 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ _Released 9/10/2024 (PENDING)_

**Dependency Updates:**

- Upgraded `electron` from to `27.3.10` to `29.4.6`.
- Upgraded bundled Node.js version from `18.17.1` to `20.15.0`.
- Upgraded bundled Chromium version from `118.0.5993.117` to `122.0.6261.39`.
- Update `@cypress/request` from `3.0.1` to `3.0.4`. Addressed in [#30194](https://github.com/cypress-io/cypress/pull/30194).
- Updated `loader-utils` from `1.4.0` to `1.4.2`. This removes the [CVE-2022-37601](https://nvd.nist.gov/vuln/detail/CVE-2022-37601) vulnerability being reported in security scans. Addresses [#28208](https://github.com/cypress-io/cypress/issues/28208).

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:node20.15.0-chrome126-ff127
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": "^20.15.0",
"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": "^20.15.0",
"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

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": "^20.15.0",
"@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
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
"@babel/eslint-parser": "7.25.1",
"@cypress/request": "^3.0.4",
"@cypress/request-promise": "^5.0.0",
"@electron/fuses": "1.6.1",
"@electron/notarize": "^2.1.0",
"@electron/fuses": "1.8.0",
"@electron/notarize": "^2.3.2",
"@fellow/eslint-plugin-coffee": "0.4.13",
"@graphql-codegen/add": "3.1.0",
"@graphql-codegen/cli": "2.2.0",
Expand Down 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": "^20.15.0",
"@types/prismjs": "1.16.0",
"@types/react": "16.9.50",
"@types/react-dom": "16.9.8",
Expand Down Expand Up @@ -140,8 +140,8 @@
"dedent": "^0.7.0",
"del": "3.0.0",
"detect-port": "^1.6.1",
"electron": "27.3.10",
"electron-builder": "^23.6.0",
"electron": "29.4.6",
"electron-builder": "^24.13.3",
"enzyme-adapter-react-16": "1.12.1",
"eslint": "^8.56.0",
"eslint-plugin-cypress": "3.5.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
Copy link
Member

Choose a reason for hiding this comment

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

fetch: (...args) => this.util.fetch(...args),
getUser: () => this.coreData.user,
logout: () => this.actions.auth.logout().catch(this.logTraceError),
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": "^20.15.0",
"@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
1 change: 1 addition & 0 deletions packages/packherd-require/src/sourcemap-support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ class SourcemapSupport {
return pos.column + 1
}

// @ts-ignore
frame.getScriptNameOrSourceURL = function getScriptNameOrSourceURL () {
return pos.source || pos.name
}
Expand Down
2 changes: 1 addition & 1 deletion packages/server/lib/gui/windows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export function create (projectRoot, _options: WindowOptions, newBrowserWindow =
})
}

win.webContents.on('crashed', function (...args) {
win.webContents.on('render-process-gone', function (...args) {
Copy link
Member

@jennifer-shehane jennifer-shehane Sep 12, 2024

Choose a reason for hiding this comment

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

return options.onCrashed.apply(win, args)
})

Expand Down
4 changes: 2 additions & 2 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"ansi_up": "5.0.0",
"ast-types": "0.13.3",
"base64url": "^3.0.1",
"better-sqlite3": "9.2.2",
"better-sqlite3": "10.0.0",
Copy link
Member

Choose a reason for hiding this comment

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

@ryanthemanuel Do you remember the context as to why this was necessary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I do not unfortunately. We can try reverting?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@AtofStryker do you happen to remember either? I know you were working in here too at times.

Copy link
Member

Choose a reason for hiding this comment

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

I was just wondering - I don't think have confirmation that it's breaking anything - it was just a difference between 29 and 28

Copy link
Member

@jennifer-shehane jennifer-shehane Sep 12, 2024

Choose a reason for hiding this comment

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

This is needed due to this failure when it is left on 9.2.2: https://cloud.nx.app/runs/n23a1Mbn3x

Screenshot 2024-09-12 at 2 55 19 PM

"black-hole-stream": "0.0.1",
"bluebird": "3.7.2",
"bundle-require": "3.0.4",
Expand Down 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": "^20.15.0",
"@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": "^20.15.0",
"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
3 changes: 3 additions & 0 deletions scripts/binary/trigger-publish-binary-pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ const { getNextVersionForBinary } = require('../get-next-version')

const { nextVersion } = await getNextVersionForBinary()

// This is the payload that will be sent to the cypress-publish-binary project.
// The API is defined here: https://circleci.com/docs/api/v2/index.html#operation/triggerPipeline
const body = JSON.stringify({
branch: 'upgrade-electron-29',
parameters: {
temp_dir: os.tmpdir(),
sha: process.env.CIRCLE_SHA1,
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": "^20.15.0",
"typescript": "~4.6.2"
},
"projectFixtureDirectory": "angular"
Expand Down
Loading
Loading