Electron 42
Electron 42 has been released! It includes upgrades to Chromium 148.0.7778.96, V8 14.8, and Node v24.15.0.
The Electron team is excited to announce the release of Electron 42! You can install it with npm via npm install electron@latest or download it from our releases website. Continue reading for details about this release.
If you have any feedback, please share it with us on Bluesky or Mastodon, or join our community Discord! Bugs and feature requests can be reported in Electron's issue tracker.
Notable Changes
macOS notifications now use UNNotification API
Electron has migrated from the deprecated NSUserNotification API to the UNNotification API on macOS. The new API requires that an application be code-signed in order for notifications to be displayed. If an application is not code-signed, notifications will emit a failed event on the Notification object. #47817
Additionally, Electron 42 adds Notification.getHistory() for macOS (#51123), and id and groupId options to the Notification constructor to allow custom identifiers and visual grouping in Notification Center (#50304).
electron no longer downloads itself via postinstall script
Previously, the electron npm package would download the Electron binary from the repository's GitHub Releases in the package's postinstall script. With recent supply chain security attacks against the npm ecosystem with postinstall scripts as a common attack vector, Electron will now download itself dynamically the first time that its main bin script is run (e.g. via npx electron). With this change, you can now use Electron with the npm --ignore-scripts flag. See RFC #22 for more context. #49328
If you need to download the Electron binary on-demand, you can now call the install-electron script:
npm install electron --save-dev --ignore-scripts
npx install-electron
WebAuthn Touch ID support on macOS
Added app.configureWebAuthn({ touchID: { keychainAccessGroup } }) to enable the WebAuthn Touch ID platform authenticator on macOS. This also introduces a select-webauthn-account session event for discoverable-credential selection. #51411
View animations and background blur
Added animation functionality to view.setBounds() and added view.setBackgroundBlur(), allowing for smoother UI transitions and native background blur effects. #48812
Stack Changes
-
Chromium
148.0.7778.96 -
Node
v24.15.0 -
V8
14.8
Electron 42 upgrades Chromium from 146.0.7680.65 to 148.0.7778.96, Node.js from v24.14.0 to v24.15.0, and V8 from 14.6 to 14.8.
New Features and Improvements
- Added
app.configureWebAuthn({ touchID: { keychainAccessGroup } })to enable the WebAuthn Touch ID platform authenticator on macOS. Also introduces aselect-webauthn-accountsession event for discoverable-credential selection. #51411 (Also in 41) - Added
allowExtensionsprivilege toprotocol.registerSchemesAsPrivileged()to enable Chrome extensions on custom protocols. #49951 - Added
Notification.getHistory()for macOS. #51123 - Added
Notification.handleActivation(callback)API on Windows to handle notification clicks, replies, and action buttons — including when the app is launched from a notification (cold start). #49919 - Added
ELECTRON_INSTALL_PLATFORMandELECTRON_INSTALL_ARCHvariables to install binaries from other platforms and architectures. #49981 - Added
app.isActive()to check if the app is the active/foreground application (macOS only). #49622 - Added
globalShortcut.setSuspended()andglobalShortcut.isSuspended()methods to temporarily suspend and resume global shortcut handling. #50777 - Added
idandgroupIdoptions to the notification constructor on macOS for custom identifiers and visual grouping in Notification Center. #50304 - Added
id,groupId, andgroupTitlesupport for Windows notifications. #50895 - Added
nativeTheme.shouldDifferentiateWithoutColoron macOS. #50409 (Also in 41) - Added animation functionality to
view.setBounds()and addedview.setBackgroundBlur(). #48812 - Added support for heap profiling in
contentTracing. #51162 (Also in 41) - Added support for importing shared textures using the nv16 pixel format. #51187
- Added support for importing shared textures using the p010le 10-bit YUV pixel format. #49272
- Added support for several more
safeStoragebackends via new asynchronous functionality in safeStorage. #49054 - Added support for the
urgencyoption in notifications on Windows. #50383 (Also in 41) - Added the ability to capture JS stack trace on renderer OOM. #50911
- Electron now downloads its binary into
node_modulesdynamically on first launch instead of running apostinstallscript. Added theinstall-electronscript to manually trigger the download as well. #49328 - Enabled wasm trap handlers behind
WasmTrapHandlersfuse. #48983 (Also in 41) - Replaced deprecated
NSUserNotificationwith User Notifications. #47817
Breaking Changes
Behavior Changed: macOS notifications now use UNNotification API
Electron has migrated from the deprecated NSUserNotification API to the UNNotification API on macOS. The new API requires that an application be code-signed in order for notifications to be displayed. If an application is not code-signed, notifications will emit a failed event on the Notification object. #47817
Behavior Changed: electron no longer downloads itself via postinstall script
Previously, the electron npm package would download the Electron binary from the repository's GitHub Releases in the package's postinstall script. With recent supply chain security attacks against the npm ecosystem with postinstall scripts as a common attack vector, Electron will now download itself dynamically the first time that its main bin script is run (e.g. via npx electron). See RFC #22 for more context. #49328
Behavior Changed: Offscreen rendering default device scale factor
Previously, OSR used the primary display's device scale factor for rendering. Starting from Electron 42, the default changes to a constant value of 1.0 for more consistent output sizes. Use webPreferences.offscreen.deviceScaleFactor to specify a custom value. #49683
Removed: quotas object from Session.clearStorageData(options)
When calling Session.clearStorageData(options), the options.quotas object is no longer supported because it has been removed from upstream Chromium.
Removed: ELECTRON_SKIP_BINARY_DOWNLOAD environment variable
This environment variable is no longer supported due to the new lazy download behavior. #50459
Deprecated: Passing only an array hslShift to nativeImage.createFromNamedImage()
Passing only an array hslShift to nativeImage.createFromNamedImage() is deprecated. You should now pass an options object with an hslShift property instead:
// Deprecated
nativeImage.createFromNamedImage(imageName, [0, 1, -1]);
// Replace with
nativeImage.createFromNamedImage(imageName, {
hslShift: [0, 1, -1],
});
End of Support for 39.x.y
Electron 39.x.y has reached end-of-support as per the project's support policy. Developers and applications are encouraged to upgrade to a newer version of Electron. See https://releases.electronjs.org/schedule to see the timeline for supported versions of Electron.
What's Next
In the short term, you can expect the team to continue to focus on keeping up with the development of the major components that make up Electron, including Chromium, Node, and V8.
You can find Electron's public timeline here.
More information about future changes can be found on the Planned Breaking Changes page.
