Skip to content

Upgrade to Electron 43.3.0 - #505

Merged
viktor44 merged 22 commits into
getstation:mainfrom
viktor44:main
Aug 15, 2026
Merged

Upgrade to Electron 43.3.0#505
viktor44 merged 22 commits into
getstation:mainfrom
viktor44:main

Conversation

@viktor44

@viktor44 viktor44 commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

What is this PR

Nothing new. Electron version upgrade only and necessary changes

image

Doesn't work:

  • notifications
  • DND mode detection
  • ...

viktor44 added 22 commits August 4, 2026 01:53
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.
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.
@viktor44
viktor44 merged commit 99507a7 into getstation:main Aug 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant