-
Notifications
You must be signed in to change notification settings - Fork 966
chore(desktop): upgrade electron to v40 #1194
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6bb3316
chore(desktop): upgrade electron to v40 and related dependencies
Kitenite b383c39
chore: update biome schema version to 2.3.14
Kitenite 5d9eb32
fix(desktop): add prebuild-install for electron-builder compatibility
Kitenite b9ae2ca
fix(desktop): update @sentry/electron to ^7.7.0
Kitenite 90166b3
Merge remote-tracking branch 'origin' into kitenite/upgrade-electron
Kitenite File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
Electron 40 release notes breaking changes💡 Result:
Electron v40.0.0 breaking changes (per official release notes / breaking-changes docs):
clipboardAPI directly from renderer processes. If you need clipboard from a renderer, move the call to a preload and expose it viacontextBridge. [1][2]dsym.ziptodsym.tar.xz(xz compression) to support larger files; tooling that downloads/consumes Electron dSYMs may need to handle.tar.xz. [1][2]Sources: [1] Electron v40.0.0 release notes, [2] Electron “Breaking Changes” (Planned Breaking API Changes 40.0).
🌐 Web query:
Electron 40 Node 22.15 native module compatibility💡 Result:
Electron 40.0.0 ships with Node.js 24.11.1, not Node 22.15.0. So a native addon binary built against Node 22.15.0’s Node-ABI (
NODE_MODULE_VERSION) generally will not load in Electron 40—you must use an Electron-40 build (or rebuild from source) of the module. [1][2]What to do:
node-gypaddons): rebuild it for Electron 40 (recommended tool:@electron/rebuild). Electron explicitly requires native modules be recompiled for Electron’s ABI. [2][3]If you specifically need Node 22.15 compatibility, that corresponds to older Electron nightlies/branches, not Electron 40 stable. (Electron 40 stable is already on Node 24.) [1]
Sources: Electron 40 release metadata (Node 24.11.1) [1]; Electron native module ABI guidance [2];
@electron/rebuildpurpose [3]; Node 22.15.0 N-API version [4].🌐 Web query:
better-sqlite3 node-pty Electron 40 compatibility💡 Result:
Electron 40.0.0 (released Jan 13, 2026) ships with Node.js 24.11.1 (plus Chromium 144 / V8 14.4). That means native addons must be rebuilt (or have prebuilds) targeting Electron 40’s ABI, not your system Node. [1][2][3]
better-sqlite3 ↔ Electron 40
node-pty ↔ Electron 40
node-ptyis also a native addon, so it has the same rule: it must be compiled for Electron’s ABI. (Upstream notes Node/Electron minimums and expects builds aligned with the Electron/VS Code toolchain.) [7]node-ptyto @homebridge/node-pty-prebuilt-multiarch; it downloads a matching prebuild when available and otherwise falls back to building via node-gyp. Whether Electron 40 prebuilds exist depends on that package’s release artifacts, but the fallback build path is built-in. [8][9]Practical compatibility checklist (Electron 40)
better-sqlite3: >= 12.1.0 (often safest for Node 24-era builds/prebuilds). [4][5]node-pty: either rebuild from source for Electron 40, or consider the Homebridge prebuilt fork. [6][8][9]@electron/rebuild) so packaged apps don’t ship Node-built.nodebinaries. [6]Sources: Electron 40 release details [1][2][3], Electron native module rebuild guidance [6], better-sqlite3 Node 24/prebuild context [4][5], node-pty / prebuilt fork behavior [7][8][9].
Ensure native modules are rebuilt for Electron 40 (Node 24.11.1), and verify clipboard API usage.
Electron 40.0.0 ships with Node 24.11.1 (not 22.15). Both
better-sqlite3(v12.6.2) andnode-pty(v1.1.0) must be rebuilt against Electron 40's native ABI—prebuilt binaries for Node 22 will not load. Use@electron/rebuildduring packaging to ensure bundled modules target Electron's runtime.Additionally, verify that the application does not use the
clipboardAPI directly from renderer processes; this is now deprecated in Electron 40 and must be moved to a preload script exposed viacontextBridge.🤖 Prompt for AI Agents