This repository has been archived by the owner on Jun 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(desktop): Bump electron to 9.4.4 (#3177)
* chore(desktop): Bump electron to 9.4.0 * chore: Bump node-abi to 2.19.3 * fix: Disable renderer process reuse * fix: Force app.allowRendererProcessReuse = false in test env * fix(desktop): Bump electron-devtools-installer to 3.1.1 * fix(desktop): Silence deprecation warning * hotfix(desktop): Patch app-builder-lib to sign macOS objects depth-first Based on electron-userland/electron-builder@7f8d59c * chore(desktop): Bump electron to 9.4.1 * chore: update electron to 9.4.4 Co-authored-by: Umair Sarfraz <aquadestructor@icloud.com>
- Loading branch information
1 parent
197d216
commit 99959df
Showing
5 changed files
with
150 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
diff --git a/node_modules/@jest-runner/electron/build/electron_process_injected_code.js b/node_modules/@jest-runner/electron/build/electron_process_injected_code.js | ||
index b4028c1..b5c256c 100644 | ||
--- a/node_modules/@jest-runner/electron/build/electron_process_injected_code.js | ||
+++ b/node_modules/@jest-runner/electron/build/electron_process_injected_code.js | ||
@@ -26,6 +26,7 @@ const isMain = process.env.isMain === 'true'; // for testing purposes, it is pro | ||
// the same scale so that renders do not vary from device to device. | ||
_electron.app.commandLine.appendSwitch('high-dpi-support', 1); | ||
_electron.app.commandLine.appendSwitch('force-device-scale-factor', 1); | ||
+_electron.app.allowRendererProcessReuse = false; | ||
_electron.app.on('ready', async () => { | ||
// electron automatically quits if all windows are destroyed, | ||
// this mainWindow will keep electron running even if all other windows | ||
diff --git a/node_modules/@jest-runner/electron/src/electron_process_injected_code.js b/node_modules/@jest-runner/electron/src/electron_process_injected_code.js | ||
index f88326c..d3d5b83 100644 | ||
--- a/node_modules/@jest-runner/electron/src/electron_process_injected_code.js | ||
+++ b/node_modules/@jest-runner/electron/src/electron_process_injected_code.js | ||
@@ -23,7 +23,7 @@ const isMain = process.env.isMain === 'true'; | ||
// the same scale so that renders do not vary from device to device. | ||
app.commandLine.appendSwitch('high-dpi-support', 1); | ||
app.commandLine.appendSwitch('force-device-scale-factor', 1); | ||
- | ||
+app.allowRendererProcessReuse = false; | ||
app.on('ready', async () => { | ||
// electron automatically quits if all windows are destroyed, | ||
// this mainWindow will keep electron running even if all other windows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
diff --git a/node_modules/app-builder-lib/electron-osx-sign/sign.js b/node_modules/app-builder-lib/electron-osx-sign/sign.js | ||
index 3b85d83..b44eb58 100644 | ||
--- a/node_modules/app-builder-lib/electron-osx-sign/sign.js | ||
+++ b/node_modules/app-builder-lib/electron-osx-sign/sign.js | ||
@@ -119,6 +119,18 @@ async function verifySignApplicationAsync (opts) { | ||
function signApplicationAsync (opts) { | ||
return walkAsync(getAppContentsPath(opts)) | ||
.then(async function (childPaths) { | ||
+ /** | ||
+ * Sort the child paths by how deep they are in the file tree. Some arcane apple | ||
+ * logic expects the deeper files to be signed first otherwise strange errors get | ||
+ * thrown our way | ||
+ */ | ||
+ childPaths = childPaths.sort((a, b) => { | ||
+ const aDepth = a.split(path.sep).length | ||
+ const bDepth = b.split(path.sep).length | ||
+ return bDepth - aDepth | ||
+ }) | ||
+ | ||
+ | ||
function ignoreFilePath (opts, filePath) { | ||
if (opts.ignore) { | ||
return opts.ignore.some(function (ignore) { |