Skip to content

Commit 47b36c8

Browse files
authored
Update to Electron v12, allow packaging as arm64 for macOS (#1051)
1 parent b1bcc4b commit 47b36c8

File tree

8 files changed

+124
-122
lines changed

8 files changed

+124
-122
lines changed

main/windows/config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ const openConfigWindow = async (pluginName: string) => {
2323
modal: true,
2424
webPreferences: {
2525
nodeIntegration: true,
26-
enableRemoteModule: true
26+
enableRemoteModule: true,
27+
contextIsolation: false
2728
}
2829
});
2930

@@ -52,7 +53,8 @@ const openEditorConfigWindow = async (pluginName: string, serviceTitle: string,
5253
modal: true,
5354
webPreferences: {
5455
nodeIntegration: true,
55-
enableRemoteModule: true
56+
enableRemoteModule: true,
57+
contextIsolation: false
5658
}
5759
});
5860

main/windows/cropper.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ const openCropper = (display: Display, activeDisplayId?: number) => {
4747
show: false,
4848
webPreferences: {
4949
nodeIntegration: true,
50-
enableRemoteModule: true
50+
enableRemoteModule: true,
51+
contextIsolation: false
5152
}
5253
});
5354

main/windows/dialog.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ const showDialog = async (options: DialogOptions) => new Promise<number | void>(
2626
useContentSize: true,
2727
webPreferences: {
2828
nodeIntegration: true,
29-
enableRemoteModule: true
29+
enableRemoteModule: true,
30+
contextIsolation: false
3031
}
3132
});
3233

main/windows/exports.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ const openExportsWindow = async () => {
1919
transparent: true,
2020
vibrancy: 'window',
2121
webPreferences: {
22-
nodeIntegration: true
22+
nodeIntegration: true,
23+
contextIsolation: false
2324
},
2425
route: 'exports'
2526
});

main/windows/kap-window.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export default class KapWindow<State = any> {
5252
webPreferences: {
5353
nodeIntegration: true,
5454
enableRemoteModule: true,
55+
contextIsolation: false,
5556
...rest.webPreferences
5657
},
5758
show: false

main/windows/preferences.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ const openPrefsWindow = async (options?: PreferencesWindowOptions) => {
3939
vibrancy: 'window',
4040
webPreferences: {
4141
nodeIntegration: true,
42-
enableRemoteModule: true
42+
enableRemoteModule: true,
43+
contextIsolation: false
4344
}
4445
});
4546

package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"@sentry/electron": "^2.4.0",
3737
"@sindresorhus/to-milliseconds": "^1.2.0",
3838
"ajv": "^6.12.2",
39-
"aperture": "^5.2.0",
39+
"aperture": "^6.1.0",
4040
"base64-img": "^1.0.4",
4141
"classnames": "^2.2.6",
4242
"clean-stack": "^3.0.1",
@@ -109,8 +109,8 @@
109109
"@typescript-eslint/parser": "^4.15.0",
110110
"ava": "^3.15.0",
111111
"babel-eslint": "^10.1.0",
112-
"electron": "10.4.6",
113-
"electron-builder": "^22.10.5",
112+
"electron": "12.2.3",
113+
"electron-builder": "^22.13.1",
114114
"electron-builder-notarize": "^1.2.0",
115115
"eslint-config-xo": "^0.35.0",
116116
"eslint-config-xo-react": "^0.24.0",
@@ -277,6 +277,10 @@
277277
]
278278
}
279279
]
280+
},
281+
"target": {
282+
"target": "dmg",
283+
"arch": ["x64", "arm64"]
280284
}
281285
},
282286
"dmg": {

0 commit comments

Comments
 (0)