Skip to content

Commit

Permalink
chore: update electron sub dependencies (#27361)
Browse files Browse the repository at this point in the history
* 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]
  • Loading branch information
AtofStryker committed Jul 26, 2023
1 parent 3caabd3 commit 4466d34
Show file tree
Hide file tree
Showing 8 changed files with 230 additions and 157 deletions.
10 changes: 5 additions & 5 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'
- 'chore/debug-arm64-notary'
- 'chore/update-electron-sub-dependencies'
- 'chore/use_cloud_m1_runners'
- 'publish-binary'

Expand All @@ -43,7 +43,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: [ 'chore/debug-arm64-notary', << pipeline.git.branch >> ]
- equal: [ 'chore/update-electron-sub-dependencies', << pipeline.git.branch >> ]
- equal: [ 'chore/use_cloud_m1_runners', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
Expand All @@ -55,7 +55,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: [ 'chore/debug-arm64-notary', << pipeline.git.branch >> ]
- equal: [ 'chore/update-electron-sub-dependencies', << pipeline.git.branch >> ]
- equal: [ 'chore/use_cloud_m1_runners', << pipeline.git.branch >> ]
- equal: [ 'publish-binary', << pipeline.git.branch >> ]
- matches:
Expand All @@ -77,7 +77,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/debug-arm64-notary', << pipeline.git.branch >> ]
- equal: [ 'chore/update-electron-sub-dependencies', << pipeline.git.branch >> ]
- equal: [ 'chore/use_cloud_m1_runners', << pipeline.git.branch >> ]
- matches:
pattern: /^release\/\d+\.\d+\.\d+$/
Expand Down Expand Up @@ -148,7 +148,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" != "publish-binary" && "$CIRCLE_BRANCH" != "mschile/issue-26900_browserCriClient" ]]; then
echo 'if ! [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "publish-binary" && "$CIRCLE_BRANCH" != "chore/update-electron-sub-dependencies" ]]; 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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"del": "3.0.0",
"detect-port": "^1.3.0",
"electron": "21.0.0",
"electron-builder": "^22.13.1",
"electron-builder": "^23.6.0",
"enzyme-adapter-react-16": "1.12.1",
"eslint": "7.22.0",
"eslint-plugin-cypress": "2.11.2",
Expand Down
10 changes: 9 additions & 1 deletion packages/electron/lib/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,15 @@ module.exports = {
},

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

const iconPath = icons.getPathToIcon('cypress')
Expand Down
2 changes: 1 addition & 1 deletion packages/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"minimist": "1.2.8"
},
"devDependencies": {
"electron-packager": "15.4.0",
"electron-packager": "17.0.0",
"execa": "4.1.0",
"mocha": "3.5.3",
"systeminformation": "5.16.9"
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"debug": "^4.3.4",
"dirt-simple-file-cache": "^0.4.0",
"duplexify": "4.1.1",
"electron-context-menu": "3.1.1",
"electron-context-menu": "3.6.1",
"errorhandler": "1.5.1",
"evil-dns": "0.2.0",
"execa": "1.0.0",
Expand Down
22 changes: 0 additions & 22 deletions patches/electron-context-menu+3.1.1.patch

This file was deleted.

2 changes: 1 addition & 1 deletion tooling/electron-mksnapshot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"watch": "tsc --watch"
},
"dependencies": {
"@electron/get": "^1.12.4",
"@electron/get": "^2.0.2",
"debug": "^4.3.4",
"extract-zip": "^2.0.1",
"fs-extra": "^10.0.0",
Expand Down
Loading

5 comments on commit 4466d34

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 4466d34 Jul 26, 2023

Choose a reason for hiding this comment

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

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.17.3/linux-arm64/develop-4466d341a4640cf3ddccabc63da48ff8e5753bd6/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 4466d34 Jul 26, 2023

Choose a reason for hiding this comment

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

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.17.3/linux-x64/develop-4466d341a4640cf3ddccabc63da48ff8e5753bd6/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 4466d34 Jul 26, 2023

Choose a reason for hiding this comment

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

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.17.3/darwin-x64/develop-4466d341a4640cf3ddccabc63da48ff8e5753bd6/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 4466d34 Jul 26, 2023

Choose a reason for hiding this comment

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

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.17.3/darwin-arm64/develop-4466d341a4640cf3ddccabc63da48ff8e5753bd6/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 4466d34 Jul 26, 2023

Choose a reason for hiding this comment

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

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.17.3/win32-x64/develop-4466d341a4640cf3ddccabc63da48ff8e5753bd6/cypress.tgz

Please sign in to comment.