Repository navigation
build(electron): upgrade the Electron runtime from 39 to 44 - #182
Merged
Merged
Conversation
Electron supports only the newest three stable majors. 39 is out of that window, so it no longer receives Chromium/V8/Node security fixes and the bundled native ABI is frozen. 44.5.0 is the current stable; 45 is not stable yet. 44 also brings the runtime onto Node 24, matching the Node 24 used by CI and required by CONTRIBUTING. No application code changes were needed. The lockfile churn is Electron's own dependency tree (@electron/get, extract-zip -> @electron-internal/extract-zip, its nested @types/node), not ours. Checked against the Electron 40-44 breaking changes for the APIs this app actually uses (ipcMain, BrowserWindow, net.fetch, protocol.handle/openExternal, dialog, Menu, app.*): - clipboard: the renderer uses navigator.clipboard.writeText, not the removed electron clipboard module. - no new Notification / setLoginItemSettings / net.request frame-destination usage. - no ia32 or armv7l packaging targets, so the dropped 32-bit builds do not apply. Verified on Linux x64 (WSL2): - `npm run typecheck` - clean - `npm test` - 469/469 pass - `npm run build:unpack && npm run smoke:packaged` - 29 checks pass, including better-sqlite3 rebuilt against Electron 44 (ABI 149), sqlite-vec loaded from app.asar.unpacked, FTS5 + bm25(), and @huggingface/transformers + onnxruntime-node loading. Two behavior changes worth knowing, neither a failure: - Electron 42 stopped downloading the binary in the `electron` package's `postinstall`. `npm ci` no longer populates `node_modules/electron/dist`; `npm run build` does not need it, `electron-builder` fetches its own copy, and `npm run dev` / `npm run eval` fetch it on first run. - Electron 43 dialogs default `defaultPath` to Downloads instead of the OS's last-used directory. The app passes no `defaultPath`, so the open/save dialogs now start in Downloads. Flagging it rather than silently changing UX. macOS/Windows packaging is left to CI verify + release. Supersedes nothing; independent of the sqlite-vec bump, which touches different lines of package.json and will need a lockfile rebase if merged second.
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
One manifest line:
electron^39.4.0→^44.5.0(lockfile resolves44.5.0).No application code changes were required.
Why now
Electron supports only the newest three stable majors. 39 is outside that window, so it no longer receives Chromium / V8 / Node security fixes.
44.5.0is the current stable (45is not stable yet). Electron 44 also moves the runtime onto Node 24, which matches the Node 24 that CI andCONTRIBUTING.mdalready require.Breaking-change review (Electron 40 → 44)
Checked the official
breaking-changes.mdagainst every Electron API this app reaches (ipcMain,BrowserWindow,net.fetch,protocol.handle,shell.openExternal/openPath,dialog,Menu,app.*,webContents.*):clipboardrearchitected + removed from renderernavigator.clipboard.writeTextinMessageItem.tsx, not theelectronmodule.ia32/armv7lpackaging targets.app.isUnityRunning()removed; login-item attributes removedlibEGL/libGLESv2no longer shipped)defaultPathnow defaults to DownloadsNotificationusage.Session.clearStorageData({ quotas })removedWebContentspdfjs-dist, not Chromium's viewer.electronno longer self-downloads inpostinstallVerification (Linux x64, WSL2)
npm run typechecknpm testnpm run build:unpack && npm run smoke:packagedThe packaged run confirms the native surface rebuilt for the new ABI:
@electron/rebuildrebuiltbetter-sqlite3for ABI 149 without falling back to a source compile problem. macOS/Windows packaging is left toverify.yml+release.yml.Two behavior changes to be aware of (not failures)
electronpackage'spostinstall.npm cino longer populatesnode_modules/electron/dist. I verifiednpm run build(electron-vite) does not need the binary,electron-builderfetches its own copy, andnpm run dev/npm run evalfetch it on first run. No repo change needed, but first-run dev now downloads ~150 MB instead of it happening at install time.dialog.showOpenDialog/showSaveDialogdefaultdefaultPathto Downloads instead of the OS's last-used directory. The app passes nodefaultPath, so dialogs now start in Downloads and the OS no longer remembers the last directory. Calling this out explicitly — happy to add remembered-directory handling as a follow-up if that is wanted, but it does not belong in an Electron bump.Relationship to the sqlite-vec PR
Independent. It touches a different
package.jsonline, but both PRs editpackage-lock.json, so whichever merges second needs a lockfile rebase. The smoke output above intentionally shows the old sqlite-vec (v0.1.7-alpha.2) because this branch is based onmain.Rollback
Revert the one manifest line and regenerate the lockfile. No schema, storage format, or app code changed, so a rollback needs no data migration.