跳转到主内容

41 篇博文 含有标签「发行版」

查看所有标签

Electron 版本发布新步伐

· 阅读时间:约 9 分钟

从2021年9月开始,Electron将每8周发布一个新的主要稳定版本。


2019年,Electron 改为12周的发布周期,以匹配 Chromium 的6周发布周期。 最近,Chrome 和 Microsoft 都发生了一些变化,使得我们重新考虑更改 Electron 目前的发布频率:

  1. Chromium 计划从2021年9月21日的 Chrome 94 开始每4周发布一个新的里程碑。此版本节奏还每8周添加新的"扩展稳定"选项,其中包含所有更新的安全修补程序。

  2. 微软应用商店要求 基于Chromium应用的版本号不得低于最新发行版本2个版本号。 例如,如果最新发布的Chromium主版本号为85,任何基于Chromium的应用其所用版本必须为83或更高。 以上规则包含Electron应用。

从2021年9月开始,Electron将每8周发布一个新的主要稳定版本,以匹配Chromium的8周扩展稳定版本。

我们的第一个发行版Electron 15将会随Chromium扩展稳定版在2021年9月21日释出。

需要注意的是,版本发行频率的改变会影响下游应用程序的开发,我们想让我们的开发者社区尽快知晓此次改变。 请阅读我们的2021开发计划以获取更多详情。

Electron 15:临时 Alpha 内测版本

基于我们的Electron15初始版本针对的是Chromium的非扩展稳定版(其扩展稳定版基于偶数版本号),我们需要改变我们的初始目标发行日期。 然而,一款Electron的app必须使用最近两个版本以内的Chromium以便能被微软商店收录,这项新规定会使得等待两个新版本变得不可持续。

伴随着这两项要求,我们的团队也面临着时间规划上的挑战。 推进Electron 15以包括Chromium的M94版本会使得应用开发者们能快速获取最新的Chromium扩展稳定版;然而这也会使得公测版到稳定版的开发周期缩短到只有3周。

为了有利于此次变动,Electron将会提供一个临时的内测版本,并仅限于Electron 15系列的发行版。 本内测版将给与开发者们更多时间,用这款比每日版更稳定的版本去测试和规划他们的Eletron15。

Electron 15系列内测版本频道将会于2021年7月21日开通。 It will transition to a beta release on September 1st, 2021 with a stable release target of September 21st, 2021. 在那之后的Electron发行版将不再包含内测系列。

2021 发行计划

以下是我们当前的2021发行计划:

ElectronChromeAlpha 版本Beta 版本Stable 版Stable 发布周期(周数)
E13M91-2021年3月5日2021年5月25日12
E14M93-2021年5月26日2021年8月31日14
E15M942021年7月20日2021年9月01日2021年9月21日9周(包含 alpha 版本)
E16M96-2021年9月22日2021年11月16日8
E17M98-2021年11月17日2022年2月1日11

添加 alpha 通道将 Electron 15 发布前的开发时间从 3 周延长到 9 周 - 更接近我们新的 8 周周期,同时仍满足 Windows 应用商店提交的要求。

为了进一步帮助应用程序开发人员, 从2021年的剩余时间到2022年5月,我们还将把我们支持的版本政策从最新的3个版本扩展到最新的4个版本的Electron。 这意味着即使您无法立即更改升级计划,旧版本的Electron仍将收到安全更新和修复程序。

解决疑虑

在安排此发布周期更改之前,我们发布这篇文章是有原因的。 我们知道,更快的发布周期将对Electron应用程序产生真正的影响 - 其中一些应用程序可能已经认为我们的主要发布节奏过于频繁。

我们试图解决以下常见问题:

❓ 为什么要做这样的改变? 为什么不保持12周的发布节奏呢?

为了在Electron中提供最新版本的Chromium,我们的发布计划需要跟踪他们的版本。 有关Chromium发布周期的更多信息可以在这里找到

此外,目前12周的发布节奏将无法满足Microsoft应用商店的新提交要求。 即使是最新稳定版本的Electron上的应用程序也会经历大约两周的时间,他们的应用程序根据新的安全要求可能会被拒绝。

每个新的 Chromium 版本都包含新的功能,错误修复/安全修复和V8 改进。 作为应用程序开发人员,我们希望你们及时做出这些更改,所以我们的稳定版本日期将继续与其他Chromium稳定版本保持一致。 作为应用程序开发人员,您将比以前更快地获得Chromium和V8的新功能和修复程序。

❓ 现有的12周发布计划已经进展很快。 团队正在采取哪些步骤来简化升级?

更频繁发版的一个好处是发版内容_更少_ 。 我们知道升级Electron的主版本可能是困难的。 我们希望较小的版本将减少每个版本中 Chromium和Node 重大更改,以及更少的破坏性改动。

❓ 未来的 Electron 版本会提供 alpha 版本吗?

目前没有支持永久性的 Alpha 版本的计划。 此 Alpha 仅适用于 Electron 15,作为帮助开发人员在较短的发布周期内更轻松升级的一种方式。

❓ Electron 会扩展支持的版本数量吗?

随着 Electron 19 的发布,我们将支持的版本政策从 Electron 的最新三个版本扩展到最新的四个版本直到 2022 年 5 月。 在 Electron 19 发布后,我们将返回 支持最新的三个主版本,以及 beta 和 nightly 版本。

E13 (2021年5月)E14 (2021年8月)E15 (2021年9月)E16 (2021年11月)E17 (2022年2月)E18 (2022年3月)E19 (2022年5月)
13.x.y14.x.y15.x.y16.x.y17.x.y18.x.y19.x.y
12.x.y13.x.y14.x.y15.x.y16.x.y17.x.y18.x.y
11.x.y12.x.y13.x.y14.x.y15.x.y16.x.y17.x.y
----12.x.y13.x.y14.x.y15.x.y--

问题?

📨 您有任何问题或疑虑,请发送邮件至 info@electronjs.org加入我们的Discord。 我们知道这是一个将影响许多应用程序和开发者的变化,您的反馈对我们非常重要。 我们希望收到您的来信!

Electron 13.0.0

· 阅读时间:约 4 分钟

Electron 13.0.0 已发布! 它包括了到 Chromium 91 和 V8 9.1 的更新。 我们添加了多个 API 更新、错误修复和一般改进。 请阅读下文了解更多详情!


Electron 团队很高兴发布了 Electron 13.0.0.0! 您可以通过 npm 安装electron@later 或者从我们的 发布网站 下载它。 Continue reading for details about this release, and please share any feedback you have!

重要变化

架构(Stack)更新

Highlight Features

  • Added process.contextIsolated property that indicates whether the current renderer context has contextIsolation enabled. #28252
  • Added new session.storagePath API to get the path on disk for session-specific data. #28866
  • Deprecated the new-window event of WebContents. 它被替换为 webContents.setWindowOpenHandler()
  • Added process.contextId used by @electron/remote. #28251

有关新功能和变更的完整列表,请参阅 13.0.0 发布通知

重大更改

  • window.open() parameter frameName is no longer set as window title. #27481
  • Changed session.setPermissionCheckHandler(handler) to allow for handler's first parameter, webContents to be null. #19903

有关这些和未来变化的更多信息可在 计划的破坏性变化 页面找到。

API 更改

  • Added roundedCorners option for BrowserWindow. #27572
  • Added new session.storagePath API to get the path on disk for session-specific data.28866
  • Added support for passing DOM elements over the context bridge. #26776
  • Added process.uptime() to sandboxed renderers. #26684
  • Added missing fields to the parameters emitted as part of the context-menu event.#26788
  • Added support for registering Manifest V3 extension service workers.
  • Added ‘registration-completed’ event to ServiceWorkers. #27562

Removed/Deprecated Changes

The following APIs have been removed or are now deprecated:

  • Deprecated the new-window event of WebContents. 它被替换为 webContents.setWindowOpenHandler()

  • Removed deprecated shell.moveItemToTrash(). #26723

  • Removed the following deprecated BrowserWindow extension APIs:

    • BrowserWindow.addExtension(path)
    • BrowserWindow.addDevToolsExtension(path)
    • BrowserWindow.removeExtension(name)
    • BrowserWindow.removeDevToolsExtension(name)
    • BrowserWindow.getExtensions()
    • BrowserWindow.getDevToolsExtensions()

    Use the session APIs instead:

    • ses.loadExtension(path)
    • ses.removeExtension(extension_id)
    • ses.getAllExtensions()
  • systemPreferences 方法已经被废弃:

    • systemPreferences.isDarkMode()
    • systemPreferences.isInvertedColorScheme()
    • systemPreferences.isHighContrastColorScheme()

    使用 nativeTheme 属性作为替代:

    • nativeTheme.shouldUseDarkColors
    • nativeTheme.shouldUseInvertedColorScheme
    • nativeTheme.shouldUseHighContrastColors

终止对 10.x.y 的支持

根据项目的支持政策,Electron 10.x.y 已经达到了支持的终点。 我们鼓励开发者将应用程序升级到更新的 Electron 版本。

接下来

在短期内,您可以期待团队继续专注于跟上构成 Electron 的主要组件的开发,包括 Chromium、Node 和 V8。 尽管我们谨慎地避免对发布日期做出承诺,但我们的计划是大约每季度发布一次 Electron 的新主要版本以及这些组件的新版本。 暂定 14.0.0 时间表 展示了 Electron 14.0 开发生命周期中的关键日期。 Also, see our versioning document for more detailed information about versioning in Electron.

For information on planned breaking changes in upcoming versions of Electron, see our Planned Breaking Changes doc.

Electron 12.0.0

· 阅读时间:约 6 分钟

Electron 12.0.0 已发布! It includes upgrades to Chromium 89, V8 8.9 and Node.js 14.16. We've added changes to the remote module, new defaults for contextIsolation, a new webFrameMain API, and general improvements. 请阅读下文了解更多详情!


Electron 团队很高兴发布了 Electron 12.0.0.0! 您可以通过 npm 安装electron@later 或者从我们的 发布网站 下载它。 Continue reading for details about this release, and please share any feedback you have!

重要变化

架构(Stack)更新

Highlight Features

  • The ContextBridge exposeInMainWorld method can now expose non-object APIs. #26834
  • 将Nodejs版本从12更新至14 #23249
  • Added a new webFrameMain API for accessing sub-frames of a WebContents instance from the main process. #25464
  • contextIsolationworldSafeExecuteJavaScript 的默认值更改为 true#27949 #27502

有关新功能和变更的完整列表,请参阅 12.0.0 发布通知

重大更改

有关这些和未来变化的更多信息可在 计划的破坏性变化 页面找到。

API 更改

  • Added webFrameMain API: The webFrameMain module can be used to look up frames across existing WebContents instances. This is the main process equivalent of the existing webFrame API. More information about this new API can be found here, and in our documentation.
  • app API changes:
    • Added non-localized serviceName to 'child-process-gone' / app.getAppMetrics(). #25975
    • Added new app.runningUnderRosettaTranslation property to detect when running under rosetta on Apple silicon. #26444
    • Added exitCode to render-process-gone details (app & webContents). #27677
  • BrowserWindow API changes:
    • 添加BrowserWindow.isTabletMode() API。 #25209
    • Added resized (Windows/macOS) and moved (Windows) events to BrowserWindow. #26216
    • Added new system-context-menu event to allow preventing and overriding the system context menu. #25795
    • Added win.setTopBrowserView() so that BrowserViews can be raised. #27713
    • Added webPreferences.preferredSizeMode to allow sizing views according to their document's minimum size. #25874
  • contextBridge API changes:
    • Allowed ContextBridge exposeInMainWorld method to expose non-object APIs. #26834
  • display API changes:
    • Added displayFrequency property to the Display object to allow getting information about the refresh rate on Windows. #26472
  • extensions API changes:
    • Added support for some chrome.management APIs. #25098
  • MenuItem API changes:
    • Added support for showing macOS share menu. #25629
  • net API changes:
    • Added a new credentials option for net.request(). #25284
    • Added net.online for detecting whether there is currently internet connection. #21004
  • powerMonitor API changes:
    • 已添加 powerMonitor.onBatteryPower#26494
    • Added fast user switching event to powerMonitor on macOS. #25321
  • session API changes:
    • Added allowFileAccess option to ses.loadExtension() API. #27702
    • Added display-capture API for session.setPermissionRequestHandler. #27696
    • Added a disabledCipherSuites option to session.setSSLConfig. #25818
    • Added extension-loaded, extension-unloaded, and extension-ready events to session. #25385
    • Added session.setSSLConfig() to allow configuring SSL. #25461
    • Added support for explicitly specifying direct, auto_detect or system modes in session.setProxy(). #24937
    • Added Serial API support. #25237
    • Added APIs to enable/disable spell checker. #26276
  • shell API changes:
    • Added a new asynchronous shell.trashItem() API, replacing the synchronous shell.moveItemToTrash(). #25114
  • webContents API changes:
    • Added a small console hint to console to help debug renderer crashes. #25317
    • Added frame and webContents properties to the details object in webRequest handlers. #27334
    • Added webContents.forcefullyCrashRenderer() to forcefully terminate a renderer process to assist with recovering a hung renderer. #25580
    • Added setWindowOpenHandler API for renderer-created child windows, and deprecate new-window event. #24517
  • webFrame API changes:
    • Added spellcheck API to renderer. #25060

Removed/Deprecated Changes

The following APIs have been removed or are now deprecated:

  • 弃用 remote 模块。 它被 @electron/remote 代替。 #25293
  • Removed deprecated crashReporter APIs. #26709
  • Removed links to the Electron website from the default 'Help' menu in packaged apps. #25831

终止对 9.x.y 的支持

根据项目的支持政策,Electron 9.x.y 已经达到了支持的终点。 我们鼓励开发者将应用程序升级到更新的 Electron 版本。

接下来

在短期内,您可以期待团队继续专注于跟上构成 Electron 的主要组件的开发,包括 Chromium、Node 和 V8。 尽管我们谨慎地避免对发布日期做出承诺,但我们的计划是大约每季度发布一次 Electron 的新主要版本以及这些组件的新版本。 暂定 13.0.0 时间表 展示了 Electron 13.0 开发生命周期中的关键日期。 Also, see our versioning document for more detailed information about versioning in Electron.

For information on planned breaking changes in upcoming versions of Electron, see our Planned Breaking Changes doc.

Electron 11.0.0

· 阅读时间:约 4 分钟

Electron 11.0.0 已发布! 它包括升级到 Chromium 87, V8 8.7, 和 Node.js 12.18.3。 我们已经添加了对Apple silicon和一般改进的支持。 请阅读下文了解更多详情!


Electron 团队很高兴发布了 Electron 11.0.0.0! 您可以通过 npm 安装electron@later 或者从我们的 发布网站 下载它。 新版本包括内容更新及问题修复,提供对Apple M1的硬件支持。

We can't wait to see what you build with them! Continue reading for details about this release, and please share any feedback you have!

重要变化

架构(Stack)更新

Highlight Features

有关新功能和变更的完整列表,请参阅 11.0.0 发布通知

重大更改

  • 移除实验性API: BrowserView.{fromId, fromWebContents, getAllViews}BrowserViewid属性. #23578

有关这些和未来变化的更多信息可在 计划的破坏性变化 页面找到。

API 更改

  • Added app.getApplicationInfoForProtocol() API that returns detailed information about the app that handles a certain protocol. #24112
  • Added app.createThumbnailFromPath() API that returns a preview image of a file given its file path and a maximum thumbnail size. #24802
  • Added webContents.forcefullyCrashRenderer() to forcefully terminate a renderer process to assist with recovering a hung renderer. #25756

终止对 8.x.y 的支持

根据项目的支持政策,Electron 8.x.y 已经达到了支持的终点。 我们鼓励开发者将应用程序升级到更新的 Electron 版本。

接下来

在短期内,您可以期待团队继续专注于跟上构成 Electron 的主要组件的开发,包括 Chromium、Node 和 V8。 Although we are careful not to make promises about release dates, our plan is to release new major versions of Electron with new versions of those components approximately quarterly. 暂定 12.0.0 时间表 展示了 Electron 12.0 开发生命周期中的关键日期。 Also, see our versioning document for more detailed information about versioning in Electron.

For information on planned breaking changes in upcoming versions of Electron, see our Planned Breaking Changes doc.

未来将弃用 remote 模块

我们已经着手移除Electron 9中的 remote 模块, 计划在Electron 14中完成。

要想知道有关移除计划的全部细节,请阅读并关注 这里

Final Step for Requiring Native Node Modules to be Context Aware or N-API (in Electron 12)

From Electron 6 onwards, we've been laying the groundwork to require native Node modules loaded in the renderer process to be either N-API or Context Aware. Enforcing this change allows for stronger security, faster performance, and reduced maintenance workload. The final step of this plan is to remove the ability to disable render process reuse in Electron 12.

要想知道其他细节或时间相关的问题,请阅读并关注 这里

Electron 10.0.0

· 阅读时间:约 5 分钟

Electron 10.0.0 已发布! 它包括升级到 Chromium 85, V8 8.5, 和 Node.js 12.16。 我们添加了几个新的 API 集成和改进。 请阅读下文了解更多详情!


Electron 团队很高兴发布了 Electron 10.0.0.0! 您可以通过 npm 安装electron@later 或者从我们的 发布网站 下载它。 这次发布包含升级、修复和新功能。

在 Electron 10 发布版中,我们还修改了我们的版本说明。 To make it easier to tell what's brand new in Electron 10 and what may have changed between Electron 10 and past releases, we now also include changes that were introduced to Electron 10, but backported to previous releases. We hope this makes it easier to apps to find new features and bug fixes when upgrading Electron.

We can't wait to see what you build with them! Continue reading for details about this release, and please share any feedback you have!

重要变化

架构(Stack)更新

Highlight Features

  • Added contents.getBackgroundThrottling() method and contents.backgroundThrottling property. [#21036]
  • Exposed the desktopCapturer module in the main process. #23548
  • Can now check if a given session is persistent by calling the ses.isPersistent() API. #22622
  • Resolve network issues that prevented RTC calls from being connected due to network IP address changes and ICE. (Chromium issue 1113227). #24998

有关新功能和变更的完整列表,请参阅 10.0.0 发布通知

重大更改

  • Changed the default value of enableRemoteModule to false. #22091
    • This is part of our plans for deprecating the remote module and moving it to userland. You can read and follow this issue that details our reasons for this and includes a proposed timeline for deprecation.
  • Changed the default value of app.allowRendererProcessReuse to true. #22336 (Also in Electron 9)
    • This will prevent loading of non-context-aware native modules in renderer processes.
    • You can read and follow this issue that details our reasons for this and includes a proposed timeline for deprecation.
  • Fixed the positioning of window buttons on macOS when the OS locale is set to an RTL language (like Arabic or Hebrew). Frameless window apps may have to account for this change while styling their windows. #22016

有关这些和未来变化的更多信息可在 计划的破坏性变化 页面找到。

API 更改

  • Session: Can now check if a given session is persistent by calling the ses.isPersistent() API. #22622
  • Contents: Added contents.getBackgroundThrottling() method and contents.backgroundThrottling property. #21036

Deprecated APIs

The following APIs are now deprecated or removed:

  • Removed the deprecated currentlyLoggingPath property of netLog. Additionally, netLog.stopLogging no longer returns the path to the recorded log. #22732
  • Deprecated uncompressed crash uploads in crashReporter. #23598

终止对 7.x.y 的支持

根据项目的支持政策,Electron 7.x.y 已经达到了支持的终点。 我们鼓励开发者将应用程序升级到更新的 Electron 版本。

接下来

在短期内,您可以期待团队继续专注于跟上构成 Electron 的主要组件的开发,包括 Chromium、Node 和 V8。 尽管我们谨慎地避免对发布日期做出承诺,但我们的计划是大约每季度发布一次 Electron 的新主要版本以及这些组件的新版本。 暂定 11.0.0 时间表 展示了 Electron 11.0 开发生命周期中的关键日期。 Also, see our versioning document for more detailed information about versioning in Electron.

For information on planned breaking changes in upcoming versions of Electron, see our Planned Breaking Changes doc.

Continued Work for Deprecation of remote Module (in Electron 11)

We started work to remove the remote module in Electron 9 and we're continuing plans to remove the remote module. In Electron 11, we plan to continue refactor work for implementing WeakRef as we have done in Electron 10. Please read and follow this issue for full plans and details for deprecation.

Final Step for Requiring Native Node Modules to be Context Aware or N-API (in Electron 12)

Edit: Originally, this blog post stated that we would disable renderer process reuse in Electron 11. Disabling renderer process reuse has now been pushed to Electron 12.

From Electron 6 onwards, we've been laying the groundwork to require native Node modules loaded in the renderer process to be either N-API or Context Aware. Enforcing this change allows for stronger security, faster performance, and reduced maintenance workload. The final step of this plan is to remove the ability to disable render process reuse in Electron 12. Read this issue for full details including the proposed timeline.

Electron 9.0.0

· 阅读时间:约 5 分钟

Electron 9.0.0 已发布! 它包括升级到 Chromium 83, V8 8.3, 和 Node.js 12.14。 We've added several new API integrations for our spellchecker feature, enabled PDF viewer, and much more!


Electron 团队很高兴发布了 Electron 9.0.0.0! 您可以通过 npm 安装electron@later 或者从我们的 发布网站 下载它。 这次发布包含升级、修复和新功能。 We can't wait to see what you build with them! Continue reading for details about this release, and please share any feedback you have!

重要变化

架构(Stack)更新

Highlight Features

  • Multiple improvements to the spellchecker feature. See more details in #22128 and #22368.
  • Improved window events handler efficiency on Linux. #23260.
  • Enable PDF viewer. #22131.

有关新功能和变更的完整列表,请参阅 9.0.0 发布通知

重大更改

  • Deprecation warning when using remote without enableRemoteModule: true. #21546
    • This is the first step in our plans for deprecating the remote module and moving it to userland. You can read and follow this issue that details our reasons for this and includes a proposed timeline for deprecation.
  • Set app.enableRendererProcessReuse to true by default. #22336
    • This is continued work for a future requirement that native Node modules loaded in the renderer process be either N-API or Context Aware. Full info and proposed timeline is detailed in this issue.
  • Sending non-JavaScript objects over IPC now throws an exception. #21560
    • This behavior was depreciated in Electron 8.0. In Electron 9.0, the old serialization algorithm has been removed, and sending such non-serializable objects will now throw an "object could not be cloned" error.

有关这些和未来变化的更多信息可在 计划的破坏性变化 页面找到。

API 更改

  • shell API changes:
    • The shell.openItem API has been replaced with an asynchronous shell.openPath API. proposal
  • sessionAPI changes:
    • Added session.listWordsFromSpellCheckerDictionary API to list custom words in the dictionary. #22128
    • Added session.removeWordFromSpellCheckerDictionary API to remove custom words in the dictionary. #22368
    • Added session.serviceWorkerContext API to access basic service worker info and receive console logs from service workers. #22313
  • app API changes:
    • Added a new force parameter to app.focus() on macOS to allow apps to forcefully take focus. #23447
  • BrowserWindow API changes:
    • Added support for property access to some getter/setter pairs on BrowserWindow. #23208

Deprecated APIs

The following APIs are now deprecated or removed:

  • shell.openItem API is now depreciated, and replaced with an asynchronous shell.openPath API.
  • <webview>.getWebContents, which was deprecated in Electron 8.0, is now removed.
  • webFrame.setLayoutZoomLevelLimits, which was deprecated in Electron 8.0, is now removed.

终止对 6.x.y 的支持

Electron 6.x.y has reached end-of-support as per the project's support policy. 我们鼓励开发者将应用程序升级到更新的 Electron 版本。

接下来

在短期内,您可以期待团队继续专注于跟上构成 Electron 的主要组件的开发,包括 Chromium、Node 和 V8。 尽管我们谨慎地避免对发布日期做出承诺,但我们的计划是大约每季度发布一次 Electron 的新主要版本以及这些组件的新版本。 暂定 10.0.0 时间表 展示了 Electron 10.0 开发生命周期中的关键日期。 Also, see our versioning document for more detailed information about versioning in Electron.

For information on planned breaking changes in upcoming versions of Electron, see our Planned Breaking Changes doc.

Change the default of contextIsolation from false to true (Starting in Electron 10)

Without contextIsolation, any code running in a renderer process can quite easily reach into Electron internals or an app's preload script. That code can then perform privileged actions that Electron wants to keep restricted.

Changing this default improves the default security of Electron apps, so that apps will need to deliberately opt in to the insecure behaviour. Electron will depreciate the current default of contextIsolation in Electron 10.0, and change to the new default (true) in Electron 12.0.

For more information on contextIsolation, how to enable it easily and it's security benefits please see our dedicated Context Isolation Document.

Electron 8.0.0

· 阅读时间:约 6 分钟

Electron 8.0.0 已发布! 它包括升级到 Chromium 80, V8 8.0, 和 Node.js 12.13.0。 We've added Chrome's built-in spellchecker, and much more!


Electron 团队很高兴发布了 Electron 8.0.0.0! 您可以通过 npm 安装electron@later 或者从我们的 发布网站 下载它。 这次发布包含升级、修复和新功能。 We can't wait to see what you build with them! Continue reading for details about this release, and please share any feedback you have!

重要变化

架构(Stack)更新

Highlight Features

  • Implemented usage of Chrome's built-in spellchecker feature. See more details in #20692 and #21266.
  • IPC communication now uses v8's Structured Clone Algorithm. This is faster, more featureful, and less surprising than the existing logic, and brings about a 2x performance boost for large buffers and complex objects. Latency for small messages is not significantly affected. See more details in #20214.

有关新功能和变更的完整列表,请参阅 8.0.0 发布通知

重大更改

  • Show module name in deprecation warning for context-aware modules. #21952
    • This is continued work for a future requirement that native Node modules loaded in the renderer process be either N-API or Context Aware. Full info and proposed timeline is detailed in this issue.
  • Values sent over IPC are now serialized with Structured Clone Algorithm. #20214
  • Offscreen Rendering is currently disabled due to lack of a maintainer to work on this feature. It broke during the Chromium upgrade and was subsequently disabled. #20772

有关这些和未来变化的更多信息可在 计划的破坏性变化 页面找到。

API 更改

  • app API changes:
    • 已添加 app.getApplicationNameForProtocol(url)#20399
    • Added app.showAboutPanel() and app.setAboutPanelOptions(options) support on Windows. #19420
  • BrowserWindow API changes:
    • Updated docs to note that BrowserWindow options hasShadow is available on all platforms #20038
    • Added trafficLightPosition option to BrowserWindow options to allow custom positioning for traffic light buttons. #21781
    • Added accessibleTitle option to BrowserWindow for setting the accessible window title #19698
    • BrowserWindow.fromWebContents() can now return null #19983
    • Added BrowserWindow.getMediaSourceId() and BrowserWindow.moveAbove(mediaSourceId). #18926
    • Added support for will-move event on macOS. #19641
  • Documented previously undocumented crashReporter.getCrashesDirectory(). #20417
  • dialog API changes:
    • Added dontAddToRecent property to dialog.showOpenDialog and dialog.showOpenDialogSync to prevent documents from being added to recent documents on Windows in open dialogs. #19669
    • Added property customization to dialog.showSaveDialog and dialog.showSaveDialogSync. #19672
  • Notification API changes:
    • Added timeoutType option to allow Linux/Windows users to set the type of notification timeout. #20153
    • Added urgency option to set urgency on Linux notifications. #20152
  • session API changes:
    • Updated documentation on session.setProxy(config) and session.setCertificateVerifyProc(proc) to note optional options. #19604
    • Added session.downloadURL(url) to allow to triggering downloads without a BrowserWindow. #19889
    • Added support for HTTP preconnect resource hints via session.preconnect(options) and the preconnect event. #18671
    • Added session.addWordToSpellCheckerDictionary to allow custom words in the dictionary #21297
  • Added option to shell.moveItemToTrash(fullPath[, deleteOnFail]) on macOS to specify what happens when moveItemToTrash fails. #19700
  • systemPreferences API changes:
    • Updated systemPreferences.getColor(color) documentation for macOS. #20611
    • Added screen media type to systemPreferences.getMediaAccessStatus(). #20764
  • Added nativeTheme.themeSource to allow apps to override Chromium and the OS's theme choice. #19960
  • TouchBar API changes:
    • Added accessibilityLabel property to TouchBarButton and TouchBarLabel to improve TouchBarButton/TouchBarLabel accessibility. #20454
    • Updated TouchBar related documentation #19444
  • tray API changes:
    • Added new options to tray.displayBalloon(): iconType, largeIcon, noSound and respectQuietTime. #19544
    • Added tray.removeBalloon(), which removes an already displayed balloon notification. #19547
    • Added tray.focus(), which returns focus to the taskbar notification area. feat: add tray.focus() #19548
  • webContents API changes:
    • Added contents.executeJavaScriptInIsolatedWorld(worldId, scripts[, userGesture]) to expose executeJavaScriptInIsolatedWorld on the webContents API. #21190
    • Added methods to capture a hidden webContents. #21679
    • Added options to webContents.print([options], [callback]) to enable customization of print page headers and footers. #19688
    • Added ability to inspect specific shared workers via webContents.getAllSharedWorkers() and webContents.inspectSharedWorkerById(workerId). #20389
    • Added the support of fitToPageEnabled and scaleFactor options in WebContents.printToPDF(). #20436
  • Updated webview.printToPDF documentation to indicate return type is now Uint8Array. #20505

Deprecated APIs

The following APIs are now deprecated:

  • Deprecated the nonfunctional visibleOnFullScreen option within BrowserWindow.setVisibleOnAllWorkspaces prior to its removal in the next major release version. #21732
  • Deprecated alternate-selected-control-text on systemPreferences.getColor(color) for macOS. #20611
  • Deprecated setLayoutZoomLevelLimits on webContents, webFrame, and <webview> Tag because Chromium removed this capability. #21296
  • The default value of false for app.allowRendererProcessReuse is now deprecated. #21287
  • Deprecated <webview>.getWebContents() as it depends on the remote module. #20726

终止对 5.x.y 的支持

Electron 5.x.y has reached end-of-support as per the project's support policy. 我们鼓励开发者将应用程序升级到更新的 Electron 版本。

应用反馈项目

We continue to use our App Feedback Program for testing. Projects who participate in this program test Electron betas on their apps; and in return, the new bugs they find are prioritized for the stable release. If you'd like to participate or learn more, check out our blog post about the program.

接下来

在短期内,您可以期待团队继续专注于跟上构成 Electron 的主要组件的开发,包括 Chromium、Node 和 V8。 尽管我们谨慎地避免对发布日期做出承诺,但我们的计划是大约每季度发布一次 Electron 的新主要版本以及这些组件的新版本。 暂定 9.0.0 时间表 展示了 Electron 9 开发生命周期中的关键日期。 Also, see our versioning document for more detailed information about versioning in Electron.

For information on planned breaking changes in upcoming versions of Electron, see our Planned Breaking Changes doc.

Deprecation of remote Module (Starting in Electron 9)

Due to serious security liabilities, we are beginning plans to deprecate the remote module starting in Electron 9. You can read and follow this issue that details our reasons for this and includes a proposed timeline for deprecation.

Electron 7.0.0

· 阅读时间:约 4 分钟

Electron 7.0.0 已发布! 它包括升级Chromium 78, V8 7.8和Node.js 12.8.1。 我们已经添加了一个窗口到Arm 64版本,更快的 IPC 方法,一个新的 本地主题 API,还有更多!


Electron 团队很高兴发布了 Electron 7.0.0.0! 您可以通过 npm 安装electron@later 或者从我们的 发布网站 下载它。 这次发布包含升级、修复和新功能。 We can't wait to see what you build with them! Continue reading for details about this release, and please share any feedback you have!

重要变化

  • Stack Upgrades:

    StackVersion in Electron 6Version in Electron 7What's New
    Chromium76.0.3809.14678.0.3905.177, 78
    V87.67.87.7, 7.8
    Node.js12.4.012.8.112.5, 12.6, 12.7, 12.8, 12.8.1
  • Added Windows on Arm (64 bit) release. #18591, #20112

  • Added ipcRenderer.invoke() and ipcMain.handle() for asynchronous request/response-style IPC. These are strongly recommended over the remote module. See this "Electron’s ‘remote’ module considered harmful" blog post for more information. #18449

  • Added nativeTheme API to read and respond to changes in the OS's theme and color scheme. #19758, #20486

  • Switched to a new TypeScript Definitions generator. The resulting definitions are more precise; so if your TypeScript build fails, this is the likely cause. #18103

See the 7.0.0 release notes for a longer list of changes.

重大更改

有关这些和未来变化的更多信息可在 计划的破坏性变化 页面找到。

  • Removed deprecated APIs:
    • Callback-based versions of functions that now use Promises. #17907
    • Tray.setHighlightMode() (macOS). #18981
    • app.enableMixedSandbox() #17894
    • app.getApplicationMenu(),
    • app.setApplicationMenu(),
    • powerMonitor.querySystemIdleState(),
    • powerMonitor.querySystemIdleTime(),
    • webFrame.setIsolatedWorldContentSecurityPolicy(),
    • webFrame.setIsolatedWorldHumanReadableName(),
    • webFrame.setIsolatedWorldSecurityOrigin() #18159
  • Session.clearAuthCache() no longer allows filtering the cleared cache entries. #17970
  • Native interfaces on macOS (menus, dialogs, etc.) now automatically match the dark mode setting on the user's machine. #19226
  • Updated the electron module to use @electron/get. The minimum supported node version is now Node 8. #18413
  • The file electron.asar no longer exists. Any packaging scripts that depend on its existence should be updated. #18577

终止对 4.x.y 的支持

Electron 4.x.y has reached end-of-support as per the project's support policy. 我们鼓励开发者将应用程序升级到更新的 Electron 版本。

应用反馈项目

We continue to use our App Feedback Program for testing. Projects who participate in this program test Electron betas on their apps; and in return, the new bugs they find are prioritized for the stable release. If you'd like to participate or learn more, check out our blog post about the program.

接下来

在短期内,您可以期待团队继续专注于跟上构成 Electron 的主要组件的开发,包括 Chromium、Node 和 V8。 尽管我们谨慎地避免对发布日期做出承诺,但我们的计划是大约每季度发布一次 Electron 的新主要版本以及这些组件的新版本。 暂定 8.0.0 时间表 展示了 Electron 8 开发生命周期中的关键日期。 Also, see our versioning document for more detailed information about versioning in Electron.

For information on planned breaking changes in upcoming versions of Electron, see our Planned Breaking Changes doc.

Electron 6.0.0

· 阅读时间:约 5 分钟

Electron 团队很高兴发布了 Electron 6.0.0.0! 您可以通过 npm 安装electron@later 或者从我们的 发布网站 下载它。 这次发布包含升级、修复和新功能。 We can't wait to see what you build with them! Continue reading for details about this release, and please share any feedback you have!


What's New

Today marks a first for the Electron project: this is the first time we've made a stable Electron release on the same day as the corresponding Chrome stable release! 🎉

Much of Electron's functionality is provided by the core components of Chromium, Node.js, and V8. Electron keeps up-to-date with these projects to provide our users with new JavaScript features, performance improvements, and security fixes. Each of these packages has a major version bump in Electron 6:

This release also includes improvements to Electron's APIs. The release notes have a more complete list, but here are the highlights:

Promisification

Electron 6.0 continues the modernization initiative started in 5.0 to improve Promise support.

These functions now return Promises and still support older callback-based invocation:

  • contentTracing.getCategories() #16583
  • contentTracing.getCategories() #16583
  • contentTracking.getTraceBufferUs() #16600
  • contents.executeJavaScript() #17312
  • cookies.flushStore() #16464
  • cookies.get() #16464
  • cookies.remove() #16464
  • cookies.set() #16464
  • dialog.showCertificateTrustDialog() #17181
  • inAppPurchase.getProducts() #17355
  • inAppPurchase.purchaseProduct()#17355
  • netLog.stopLogging() #16862
  • session.clearAuthCache() #17259
  • session.clearCache() #17185
  • session.clearHostResolverCache() #17229
  • session.clearStorageData() #17249
  • session.getBlobData() #17303
  • session.getCacheSize() #17185
  • session.resolveProxy() #17222
  • session.setProxy() #17222
  • webContents.hasServiceWorker() #16535
  • webContents.printToPDF() #16795
  • webContents.savePage() #16742
  • webFrame.executeJavaScript() #17312
  • webFrame.executeJavaScriptInIsolatedWorld() #17312
  • webviewTag.executeJavaScript() #17312

这些功能现在有两种形式,即同步和基于Promise的异步:

  • dialog.showMessageBox()/dialog.showMessageBoxSync() #17298
  • dialog.showOpenDialog()/dialog.showOpenDialogSync() #16973
  • dialog.showSaveDialog()/dialog.showSaveDialogSync() #17054

These functions now return Promises:

Electron Helper (Renderer).app, Electron Helper (GPU).app and Electron Helper (Plugin).app

In order to enable the hardened runtime, which restricts things like writable-executable memory and loading code signed by a different Team ID, special code signing entitlements needed to be granted to the Helper.

To keep these entitlements scoped to the process types that require them, Chromium added three new variants of the Helper app: one for renderers (Electron Helper (Renderer).app), one for the GPU process (Electron Helper (GPU).app) and one for plugins (Electron Helper (Plugin).app).

Folks using electron-osx-sign to codesign their Electron app shouldn't have to make any changes to their build logic. If you're codesigning your app with custom scripts, you should ensure that the three new Helper applications are correctly codesigned.

In order to package your application correctly with these new helpers you need to be using electron-packager@14.0.4 or higher. If you are using electron-builder you should follow this issue to track support for these new helpers.

重大更改

  • This release begins laying the groundwork for a future requirement that native Node modules loaded in the renderer process be either N-API or Context Aware. The reasons for this change are faster performance, stronger security, and reduced maintenance workload. Read the full details including the proposed timeline in this issue. This change is expected to be completed in Electron v11.

  • net.IncomingMessage headers have changed slightly to more closely match Node.js behavior, particularly with the value of set-cookie and how duplicate headers are handled. #17517.

  • shell.showItemInFolder() now returns void and is an asynchronous call. #17121

  • Apps must now explicitly set a log path by calling the new function app.setAppLogPath() before using app.getPath('log'). #17841

终止对 3.x.y 的支持

Per our support policy, 3.x.y has reached end of life. 我们鼓励开发者将应用程序升级到更新的 Electron 版本。

应用反馈项目

We continue to use our App Feedback Program for testing. Projects who participate in this program test Electron betas on their apps; and in return, the new bugs they find are prioritized for the stable release. If you'd like to participate or learn more, check out our blog post about the program.

接下来

在短期内,您可以期待团队继续专注于跟上构成 Electron 的主要组件的开发,包括 Chromium、Node 和 V8。 尽管我们谨慎地避免对发布日期做出承诺,但我们的计划是大约每季度发布一次 Electron 的新主要版本以及这些组件的新版本。 暂定 7.0.0 时间表 展示了 Electron 7 开发生命周期中的关键日期。 Also, see our versioning document for more detailed information about versioning in Electron.

For information on planned breaking changes in upcoming versions of Electron, see our Planned Breaking Changes doc.

Electron 版本发布新步伐

· 阅读时间:约 4 分钟
⚡️ 更新日志(2021-07-14):我们走得更快!

在2021 年秋季,Chrome 团队 将发布节奏从每 6 周提高到每 4 周一次。 Electron 也紧随其后发布。 请阅读已更新的 8周模板 博客文章 以了解更多最新信息!

🎉 Electron 每12周将会新发布一个稳定版本! 🎉


⚡️ 哇,那也太快了! 但为什么呢?

简而言之,Chromium 不会停止发布新版本,所以 Electron 的研发也不会减速。

Chromium 的发布遵循每六周更新一次的规划。 为了在Electron中提供最新版本的Chromium,我们的发布计划需要跟踪他们的版本。 有关Chromium发布周期的更多信息可以在这里找到

🚀 为什么是每12周一次?

每6周,新的 Chromium 版本就会发布新功能,错误 / 安全修复和 V8 的改进。 Electron 用户一直迫切明确地表示希望这些更改能及时进行,因此我们调整了稳定发布日期,以匹配其他所有Chromium 稳定版本。 首先,Electron v6.0.0 将包括 M76,并计划于2019年7月30日发布稳定版,与Chromium M76同一天发布。

🚧这对我和我的 Electron 应用意味着什么?

您将能比以前更快地访问新的 Chromium 和 V8 功能和补丁。 重要的是,_当这些新变化到来时_您也能知道,因此您将能够使用比以前更好的信息进行规划。

Electron 团队 将继续支持 最新的三个主要版本。 例如,当 v6.0.0 在 2019 年 7 月 30 日稳定时,我们将继续支持 v6.x、v5.x 和 v4.x,而 v3.x 将寿终正寝。

💬 应用反馈项目

请考虑加入我们的 应用反馈计划 ,以帮助我们测试 Beta 版和应用稳定性。 Projects who participate in this program test Electron betas on their apps; and in return, the new bugs they find are prioritized for the stable release.

📝 Electron 版本简史

在 v3.0.0 之前,有关稳定版本的发布决策没有规律进行。 我们添加了项目的内部时间表与 v3.0.0 和 v4.0.0。 今年早些时候,我们决定首次发布 Electron v5.0.0 的稳定发布日期。 总的来说,宣布我们的稳定发布日期得到了积极的回应,我们很高兴在未来的版本中继续这样做。

为了更好地简化这些与升级相关的工作,我们的更新发布工作组将会和我们的治理组合作 他们使得我们能够更好地确定这项工作的优先级并委派这项工作,我们希望在后续的版本中这些改变都会变得更加明显。

以下是我们和 Chromium 相比的更新计划表:

line graph comparing Electron versus Chromium versions

📨 如果您有任何疑问,请发送电子邮件至 info@electronjs.org