Electron 42
Electron 42 がリリースされました! これには Chromium 148.0.7778.96、V8 14.8、Node v24.15.0 へのアップグレードが含まれています。
Electron チームは、Electron 42 のリリース発表にワクワクしています! npm install electron@latest から npm でインストールするか、リリースウェブサイト からダウンロードできます。 このリリースの詳細は続きをご覧ください。
何かフィードバックがあれば、Bluesky や Mastodon で共有したり、コミュニティの Discord に参加してみましょう! バグや機能の要望は Electron の Issue トラッカー で報告できます。
注目すべき変更
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
累積的変更
-
Chromium
148.0.7778.96 -
Node
v24.15.0 -
V8
14.8
Electron 42 では、Chromium は 146.0.7680.65 から 148.0.7778.96 へ、Node は v24.14.0 から v24.15.0 へ、V8 は 14.6 から 14.8 へとアップグレードしています。
新機能と改善点
- 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 (及び 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 (及び 41) - Added animation functionality to
view.setBounds()and addedview.setBackgroundBlur(). #48812 - Added support for heap profiling in
contentTracing. #51162 (及び 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 (及び 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 (及び 41) - Replaced deprecated
NSUserNotificationwith User Notifications. #47817
破壊的変更
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],
});
39.x.y サポートの終了
プロジェクトの サポートポリシー に則り、Electron 39.x.y はサポート終了を迎えました。 開発者とアプリケーションは新しいバージョンの Electron にアップグレードすることを推奨します。 サポートされているバージョンの Electron のタイムラインについては、https://releases.electronjs.org/schedule を参照してください。
次回予告
短期的には、Chromium、Node、V8 といった Electron を構成する主要コンポーネントの開発に遅れないでチームが注力し続けるでしょう。
Electron の公開タイムラインはこちらで ご覧いただけます。
今後の変更についての詳細は、予定されている破壊的変更 のページをご覧ください。
