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

Desktop: Upgrade to Electron 32.2.0 #11200

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions packages/app-desktop/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,7 @@ export class Bridge {
return nativeTheme.shouldUseDarkColors;
}

// eslint-disable-next-line @typescript-eslint/ban-types -- Old code before rule was applied
public addEventListener(name: string, fn: Function) {
public addEventListener(name: string, fn: ()=> void) {
if (name === 'nativeThemeUpdated') {
nativeTheme.on('updated', fn);
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/app-desktop/gui/NoteTextViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export default class NoteTextViewerComponent extends React.Component<Props, any>
className="noteTextViewer"
ref={this.webviewRef_}
style={viewerStyle}
allow='fullscreen=* autoplay=* local-fonts=* encrypted-media=*'
allow='clipboard-write=(self) fullscreen=(self) autoplay=(self) local-fonts=(self) encrypted-media=(self)'
allowFullScreen={true}
src={`joplin-content://note-viewer/${__dirname}/note-viewer/index.html`}
></iframe>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ElectronApplication } from '@playwright/test';
import { BrowserWindow, MessageBoxOptions } from 'electron';
import { BaseWindow, MessageBoxOptions } from 'electron';

const setMessageBoxResponse = (electronApp: ElectronApplication, responseMatch: RegExp) => {
return electronApp.evaluate(async ({ dialog }, responseMatch) => {
type DialogArgsType = [ BrowserWindow, MessageBoxOptions ]|[MessageBoxOptions];
type DialogArgsType = [ BaseWindow, MessageBoxOptions ]|[MessageBoxOptions];

const getMatchingButton = (dialogArgs: DialogArgsType) => {
const matchingButton = (options: MessageBoxOptions) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/app-desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
"@types/styled-components": "5.1.32",
"@types/tesseract.js": "2.0.0",
"axios": "^1.7.7",
"electron": "29.4.5",
"electron": "32.2.0",
"electron-builder": "24.13.3",
"glob": "10.4.5",
"gulp": "4.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-desktop/tools/electronRebuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async function main() {
// wrong one. However it means it will have to be manually upgraded for each
// new Electron release. Some ABI map there:
// https://github.com/electron/node-abi/tree/master/test
const forceAbiArgs = '--force-abi 122';
const forceAbiArgs = '--force-abi 128';

if (isWindows()) {
// Cannot run this in parallel, or the 64-bit version might end up
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7411,7 +7411,7 @@ __metadata:
compare-versions: 6.1.0
countable: 3.0.1
debounce: 1.2.1
electron: 29.4.5
electron: 32.2.0
electron-builder: 24.13.3
electron-updater: 6.2.1
electron-window-state: 5.0.3
Expand Down Expand Up @@ -21149,16 +21149,16 @@ __metadata:
languageName: node
linkType: hard

"electron@npm:29.4.5":
version: 29.4.5
resolution: "electron@npm:29.4.5"
"electron@npm:32.2.0":
version: 32.2.0
resolution: "electron@npm:32.2.0"
dependencies:
"@electron/get": ^2.0.0
"@types/node": ^20.9.0
extract-zip: ^2.0.1
bin:
electron: cli.js
checksum: 8c90671ddbde19e3bb4a5e0544e42204b13d1d75f4f96343b400754956a750262c1ad9574f479c0c3b7e90444e675f40a3f61e5374a8bb6f6de45eb6417a7f4f
checksum: c8ae07d9cf361b1aa6fd0726d1acb78e47ba8b821f62a007b3c56764861e598428a806ed14e288278f89a013598bde38d24ecccfccd09d26e84f6770d7e7717c
languageName: node
linkType: hard

Expand Down
Loading