跳转到主内容

Electron 16.0.0

· 阅读时间:约 5 分钟

Electron 16.0.0 已发布! 它包括升级到 Chromium 96, V8 9.6, 和 Node.js 16.9.1。 请阅读下文了解更多详情!


Electron 团队很高兴发布了 Electron 16.0.0.0! 您可以通过 npm install electron@later 进行安装,或者从我们的 发布网站 下载它。 继续阅读有关此版本的详细信息,并请分享您的任何反馈!

重要变化

Electron 发布时间变更

从 Electron 15 开始,Electron 将每 8 周发布一个新的主要稳定版本。 您可以在此处阅读 完整详细信息

此外,Electron 将会改变支持的版本,从最新的三个版本改为最新的四个版本,直到 2022 年 5 月。 关于 Electron 版本的更多详细信息,请看我们的 版本管理文档 2022 年 5 月以后,我们将回到支持最新的三个版本。

架构(Stack)更新

主要特性

  • Now supports the WebHID API. #30213
  • Add data parameter to app.requestSingleInstanceLock to share data between instances. #30891
  • Pass securityOrigin to media permissions request handler. #31357
  • Add commandLine.removeSwitch. #30933

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

重大更改

以下是 Electron 16 中引入的破坏性变更。 有关这些和未来变化的更多信息可在 计划的突破性变化 页面找到。

Building Native Modules

If your project uses node-gyp to build native modules, you may need to call it with --force-process-config depending on your project's setup and your Electron version. More information about this change can be found at #2497.

行为改变:crashReporter 实现切换到 Linux 上的 Crashpad

The underlying implementation of the crashReporter API on Linux has changed from Breakpad to Crashpad, bringing it in line with Windows and Mac. As a result of this, child processes are now automatically monitored, and calling process.crashReporter.start in Node child processes is no longer needed (and is not advisable, as it will start a second instance of the Crashpad reporter).

There are also some subtle changes to how annotations will be reported on Linux, including that long values will no longer be split between annotations appended with __1, __2 and so on, and instead will be truncated at the (new, longer) annotation value limit.

API 更改

There were no API changes in Electron 16.

Removed/Deprecated Changes

  • Usage of the desktopCapturer.getSources API in the renderer has been deprecated and will be removed. This change improves the default security of Electron apps. See here for details on how to replace this API in your app.

终止对 12.x.y 的支持

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

从 Electron 15 开始,我们已经将支持的版本从最新的三个版本改为最新的四个版本,直到 2022 年 5 月的 Electron 19。 在 Electron 19 之后,我们将回归到支持最新的三个版本。 此版本支持变化是我们新的节奏变化的一部分。 请参阅 我们的博客文章 ,了解的完整详细信息。

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

接下来

在短期内,您可以期待团队继续专注于跟上构成 Electron 的主要组件的开发,包括 Chromium、Node 和 V8。 虽然我们谨慎地不对发布日期做出承诺,但我们的计划是大约每2个月发布一次带有新版本组件的主要版本的 Electron。

您可以在此处找到 Electron的公开时间表

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