Electron 16.0.0
Electron 16.0.0 已发布!它包含对 Chromium 96
、V8 9.6
和 Node.js 16.9.1
的升级。请阅读下文了解更多详情!
¥Electron 16.0.0 has been released! It includes upgrades to Chromium 96
, V8 9.6
, and Node.js 16.9.1
. Read below for more details!
Electron 团队非常高兴地宣布 Electron 16.0.0 正式发布!你可以通过 npm install electron@latest
使用 npm 安装它,也可以从我们的 发布网站。继续阅读以了解有关此版本的详细信息,并请分享你的任何反馈!
¥The Electron team is excited to announce the release of Electron 16.0.0! 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 and please share any feedback you have!
显著变化
¥Notable Changes
Electron 发布节奏变更
¥Electron Release Cadence Change
从 Electron 15 开始,Electron 将每 8 周发布一个新的主要稳定版本。你可以阅读 完整详情请见此处。
¥As of Electron 15, Electron will release a new major stable version every 8 weeks. You can read the full details here.
此外,Electron 的支持版本已从最新三个版本更改为最新四个版本,有效期至 2022 年 5 月。查看我们的版本控制文档 了解 Electron 版本控制的更多详细信息。2022 年 5 月后,我们将恢复对最新三个版本的支持。
¥Additionally, Electron has changed supported versions from latest three versions to latest four versions until May 2022. See our versioning document for more detailed information about versioning in Electron. After May 2022, we will return to supporting latest three versions.
技术栈变更
¥Stack Changes
-
Chromium
96
-
Node.js
16.9.1
-
V8
9.6
亮点功能
¥Highlighted Features
-
为
app.requestSingleInstanceLock
添加数据参数,以便在实例之间共享数据。#30891¥Add data parameter to
app.requestSingleInstanceLock
to share data between instances. #30891 -
将 securityOrigin 传递给媒体权限请求处理程序。#31357
¥Pass securityOrigin to media permissions request handler. #31357
-
添加
commandLine.removeSwitch
。#30933¥Add
commandLine.removeSwitch
. #30933
请参阅 16.0.0 发行说明 获取新功能和变更的完整列表。
¥See the 16.0.0 release notes for a full list of new features and changes.
重大变化
¥Breaking Changes
以下是 Electron 16 中引入的重大变更。有关这些变更和未来变更的更多信息,请参阅 计划中的突发事件变更 页面。
¥Below are breaking changes introduced in Electron 16. More information about these and future changes can be found on the Planned Breaking Changes page.
构建原生模块
¥Building Native Modules
如果你的项目使用 node-gyp 构建原生模块,则可能需要根据项目的设置和 Electron 版本使用 --force-process-config
调用它。有关此变更的更多信息,请参阅 #2497。
¥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.
行为改变:Linux 上的 crashReporter
实现切换到 Crashpad
¥Behavior Changed: crashReporter
implementation switched to Crashpad on Linux
Linux 上 crashReporter
API 的底层实现已从 Breakpad 更改为 Crashpad,使其与 Windows 和 Mac 保持一致。因此,现在会自动监视子进程,并且不再需要在 Node 子进程中调用 process.crashReporter.start
(并且不建议这样做,因为它将启动 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).
Linux 上注释的报告方式也有一些细微的变化,包括长值将不再在附加 __1
、__2
等的注释之间分割,而是会在(新的、更长的)注释值限制处被截断 。
¥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 变更
¥API Changes
Electron 16 中没有 API 变更。
¥There were no API changes in Electron 16.
移除/弃用的变更
¥Removed/Deprecated Changes
-
渲染器中使用
desktopCapturer.getSources
API 已被弃用并将被删除。此更改提高了 Electron 应用的默认安全性。有关如何在应用中替换此 API 的详细信息,请参阅 此处。¥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 终止支持
¥End of Support for 12.x.y
根据项目的 支持政策 规定,Electron 12.x.y 已终止支持。建议开发者和应用升级到较新版本的 Electron。
¥Electron 12.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.
从 Electron 15 开始,我们已将支持的版本从最新的三个版本更改为最新的四个版本,直至 2022 年 5 月 Electron 19 的发布。Electron 19 发布后,我们将恢复对最新三个版本的支持。此版本支持更改是我们新节奏更改的一部分。请参阅 我们的博客文章,详情请点击此处。
¥As of Electron 15, we have changed supported versions from latest three versions to latest four versions until May 2022 with Electron 19. After Electron 19, we will return to supporting the latest three versions. This version support change is part of our new cadence change. Please see our blog post for full details here.
E15 (2021 年 9 月) | E16 (2021 年 11 月) | E17 (2022 年 2 月) | E18 (2022 年 3 月) | E19 (2022 年 5 月) |
---|---|---|---|---|
15.x.y | 16.x.y | 17.x.y | 18.x.y | 19.x.y |
14.x.y | 15.x.y | 16.x.y | 17.x.y | 18.x.y |
13.x.y | 14.x.y | 15.x.y | 16.x.y | 17.x.y |
12.x.y | 13.x.y | 14.x.y | 15.x.y | -- |
下一步计划
¥What's Next
短期内,你可以预期团队将继续专注于跟上构成 Electron 的主要组件(包括 Chromium、Node 和 V8)的开发。虽然我们谨慎地不对发布日期做出承诺,但我们计划大约每两个月发布一次 Electron 的新主要版本及其组件的新版本。
¥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. 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 every 2 months.
你可以找到 Electron 公开时间线。
¥You can find Electron's public timeline here.
有关未来变更的更多信息,请参阅 计划中的突发事件变更 页面。
¥More information about future changes can be found on the Planned Breaking Changes page.