Upgrade to Electron 43.3.0 - #505
Merged
Merged
Conversation
Electron 33
Chromium 130 -> 138.0.7204.251, Node 20.18 -> 22.21.1, native ABI 130 -> 136. Both native deps (sqlite3, windows-focus-assist) are N-API, so they stay ABI-compatible; electron-builder still rebuilds them at packaging time. Toolchain: - electron-builder 25.1.8 -> 26.15.3. v25 bundles @electron/rebuild 3.6.1, whose node-abi does not know Electron 37, so packaging fails on the native rebuild step. The @electron/rebuild resolution moves 3.7.2 -> ^4.2.0 to match. - electron-builder 26 walks the peer dependencies of production packages, and electron-chrome-extension / @electron/remote both peer-depend on `electron`. That dragged the 318MB dev Electron distribution into the asar, so it is now excluded explicitly in electron-builder.yml. Breaking changes handled: - session.setPreloads() is deprecated since Electron 35, replaced by session.registerPreloadScript(). - Removed the dead `new-window` webview event and `nativeWindowOpen` webpreference, both gone since Electron 22, plus the `native-window-open` switch lookup (kept as a constant so behavior is unchanged). - Default user agent bumped from Chrome/129 to Chrome/138 to match Chromium. Verified: yarn build, 33 test suites / 214 tests, electron-builder --win --dir, packaged app boots (sqlite migrations + REHYDRATION_COMPLETE) and `yarn dev` boots with the new preload registration.
Electron 37 bundles Node 22.21.1, so the build toolchain now matches the runtime. Bumps .nvmrc, the volta pin, devEngines and all three GitHub workflows from Node 20 (end-of-life) to 22. Verified on Node 22.21.1: yarn install, yarn build and the full test suite (33 suites, 214 tests) all pass.
Electron 37
Chromium 138 -> 144.0.7559.236, Node 22.21.1 -> 24.15.0, native ABI 136 -> 143. Electron 40 bundles Node 24, so the dev toolchain moves with it: .nvmrc, the volta pin, devEngines and all three workflows now require Node 24. The native dependencies are N-API, so they stay ABI-compatible, and electron-builder 26.15.3 already resolves the Electron 40 ABI. Breaking changes handled: - clipboard access from renderers is deprecated in Electron 40. The `copy-url-to-clipboard` webview method now runs the call in the main process through @electron/remote. The other call sites (context-menu.ts) were already main-side. - The `UseOzonePlatform` feature flag is gone in Electron 38, where Ozone became the only path and --ozone-platform defaults to auto. Dropped it from the Linux AppImage wrapper, keeping the explicit --ozone-platform=wayland fallback. - Default user agent bumped from Chrome/138 to Chrome/144. CI cleanup: - Removed the "Configure Node" steps that downgraded to npm@8 to set a custom node_gyp. The node-gyp 12.4.0 / @electron/node-gyp resolutions supersede them, sqlite3 resolves a prebuilt N-API binary, and npm 8 does not belong near Node 24. - devEngines was using a shape npm rejects, which made every npm invocation in this repo fail. It now declares only the node runtime; adding the matching packageManager entry is deliberately avoided, because npm then enforces it and refuses to run npx at all. Verified on Node 24.19.0: yarn build, 33 test suites / 214 tests, electron-builder --win --dir, packaged app boots (migrations + REHYDRATION_COMPLETE) and yarn dev boots.
Electron 40
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this PR
Nothing new. Electron version upgrade only and necessary changes
Doesn't work: