Skip to content

Commit 4466d34

Browse files
authored
chore: update electron sub dependencies (#27361)
* chore: update electron-context-menu to 3.6.1. electron-context-menu fixed the issue we were patching in sindresorhus/electron-context-menu#156, so the patch can be deleted * chore: update electron/get from v1 to v2. v2 drops node 12 so nothing breaking on our end * chore: update electron-builder to ^v23.6.0 (checkTs passing) * chore: upgrade electron packager to v16 * update electron-packager from v16 to v17 * run binary jobs for electron updates [run ci]
1 parent 3caabd3 commit 4466d34

File tree

8 files changed

+230
-157
lines changed

8 files changed

+230
-157
lines changed

.circleci/workflows.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ mainBuildFilters: &mainBuildFilters
3030
- /^release\/\d+\.\d+\.\d+$/
3131
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
3232
- 'update-v8-snapshot-cache-on-develop'
33-
- 'chore/debug-arm64-notary'
33+
- 'chore/update-electron-sub-dependencies'
3434
- 'chore/use_cloud_m1_runners'
3535
- 'publish-binary'
3636

@@ -43,7 +43,7 @@ macWorkflowFilters: &darwin-workflow-filters
4343
- equal: [ develop, << pipeline.git.branch >> ]
4444
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
4545
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
46-
- equal: [ 'chore/debug-arm64-notary', << pipeline.git.branch >> ]
46+
- equal: [ 'chore/update-electron-sub-dependencies', << pipeline.git.branch >> ]
4747
- equal: [ 'chore/use_cloud_m1_runners', << pipeline.git.branch >> ]
4848
- matches:
4949
pattern: /^release\/\d+\.\d+\.\d+$/
@@ -55,7 +55,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
5555
- equal: [ develop, << pipeline.git.branch >> ]
5656
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
5757
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
58-
- equal: [ 'chore/debug-arm64-notary', << pipeline.git.branch >> ]
58+
- equal: [ 'chore/update-electron-sub-dependencies', << pipeline.git.branch >> ]
5959
- equal: [ 'chore/use_cloud_m1_runners', << pipeline.git.branch >> ]
6060
- equal: [ 'publish-binary', << pipeline.git.branch >> ]
6161
- matches:
@@ -77,7 +77,7 @@ windowsWorkflowFilters: &windows-workflow-filters
7777
- equal: [ develop, << pipeline.git.branch >> ]
7878
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
7979
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
80-
- equal: [ 'chore/debug-arm64-notary', << pipeline.git.branch >> ]
80+
- equal: [ 'chore/update-electron-sub-dependencies', << pipeline.git.branch >> ]
8181
- equal: [ 'chore/use_cloud_m1_runners', << pipeline.git.branch >> ]
8282
- matches:
8383
pattern: /^release\/\d+\.\d+\.\d+$/
@@ -148,7 +148,7 @@ commands:
148148
name: Set environment variable to determine whether or not to persist artifacts
149149
command: |
150150
echo "Setting SHOULD_PERSIST_ARTIFACTS variable"
151-
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "publish-binary" && "$CIRCLE_BRANCH" != "mschile/issue-26900_browserCriClient" ]]; then
151+
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "publish-binary" && "$CIRCLE_BRANCH" != "chore/update-electron-sub-dependencies" ]]; then
152152
export SHOULD_PERSIST_ARTIFACTS=true
153153
fi' >> "$BASH_ENV"
154154
# You must run `setup_should_persist_artifacts` command and be using bash before running this command

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
"del": "3.0.0",
146146
"detect-port": "^1.3.0",
147147
"electron": "21.0.0",
148-
"electron-builder": "^22.13.1",
148+
"electron-builder": "^23.6.0",
149149
"enzyme-adapter-react-16": "1.12.1",
150150
"eslint": "7.22.0",
151151
"eslint-plugin-cypress": "2.11.2",

packages/electron/lib/install.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,15 @@ module.exports = {
133133
},
134134

135135
package (options = {}) {
136-
const pkgr = require('electron-packager')
136+
/**
137+
* NOTE: electron-packager as of v16.0.0 does not play well with
138+
* our mksnapshot. Requiring the package in this way, dynamically, will
139+
* make it undiscoverable by mksnapshot, which is OK since electron-packager
140+
* is a build dependency.
141+
*/
142+
const e = 'electron'
143+
const p = 'packager'
144+
const pkgr = require(`${e}-${p}`)
137145
const icons = require('@packages/icons')
138146

139147
const iconPath = icons.getPathToIcon('cypress')

packages/electron/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"minimist": "1.2.8"
2525
},
2626
"devDependencies": {
27-
"electron-packager": "15.4.0",
27+
"electron-packager": "17.0.0",
2828
"execa": "4.1.0",
2929
"mocha": "3.5.3",
3030
"systeminformation": "5.16.9"

packages/server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"debug": "^4.3.4",
5959
"dirt-simple-file-cache": "^0.4.0",
6060
"duplexify": "4.1.1",
61-
"electron-context-menu": "3.1.1",
61+
"electron-context-menu": "3.6.1",
6262
"errorhandler": "1.5.1",
6363
"evil-dns": "0.2.0",
6464
"execa": "1.0.0",

patches/electron-context-menu+3.1.1.patch

Lines changed: 0 additions & 22 deletions
This file was deleted.

tooling/electron-mksnapshot/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"watch": "tsc --watch"
1818
},
1919
"dependencies": {
20-
"@electron/get": "^1.12.4",
20+
"@electron/get": "^2.0.2",
2121
"debug": "^4.3.4",
2222
"extract-zip": "^2.0.1",
2323
"fs-extra": "^10.0.0",

0 commit comments

Comments
 (0)