Electron 10.0.0
Electron 10.0.0 已发布!它包含对 Chromium 85
、V8 8.5
和 Node.js 12.16
的升级。我们添加了几个新的 API 集成和改进。请阅读下文了解更多详情!
¥Electron 10.0.0 has been released! It includes upgrades to Chromium 85
, V8 8.5
, and Node.js 12.16
. We've added several new API integrations and improvements. Read below for more details!
Electron 团队非常高兴地宣布 Electron 10.0.0 正式发布!你可以通过 npm install electron@latest
使用 npm 安装它,也可以从我们的 发布网站。此版本包含升级、修复和新功能。
¥The Electron team is excited to announce the release of Electron 10.0.0! You can install it with npm via npm install electron@latest
or download it from our releases website. The release is packed with upgrades, fixes, and new features.
在 Electron 10 版本中,我们还对发行说明进行了更改。为了更容易地了解 Electron 10 中的新功能以及 Electron 10 与过去版本之间可能发生的变化,我们现在还包含了 Electron 10 中引入但已反向移植到以前版本的更改。我们希望这能让应用在升级 Electron 时更容易找到新功能和错误修复。
¥In the Electron 10 release, we also made a change to our release notes. 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!
显著变化
¥Notable Changes
技术栈变更
¥Stack Changes
-
Chromium
85.0.4183.84
-
Node.js
12.16.3
-
V8
8.5
亮点功能
¥Highlight Features
-
添加了
contents.getBackgroundThrottling()
方法和contents.backgroundThrottling
属性。[#21036]¥Added
contents.getBackgroundThrottling()
method andcontents.backgroundThrottling
property. [#21036] -
在主进程中暴露
desktopCapturer
模块。#23548¥Exposed the
desktopCapturer
module in the main process. #23548 -
现在可以通过调用
ses.isPersistent()
API 检查给定的session
是否持久化。#22622¥Can now check if a given
session
is persistent by calling theses.isPersistent()
API. #22622 -
解决由于网络 IP 地址更改和 ICE 导致 RTC 调用无法连接的网络问题。(Chromium 问题 1113227)。#24998
¥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 发行说明 获取新功能和变更的完整列表。
¥See the 10.0.0 release notes for a full list of new features and changes.
重大变化
¥Breaking Changes
-
将
enableRemoteModule
的默认值更改为false
。#22091¥Changed the default value of
enableRemoteModule
tofalse
. #22091-
这是我们弃用
remote
模块并将其移至用户态的计划的一部分。你可以阅读并关注 这个问题,其中详细说明了我们这样做的原因,并包含建议的弃用时间表。¥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.
-
-
将
app.allowRendererProcessReuse
的默认值更改为true
。#22336(Electron 9 中也包含)¥Changed the default value of
app.allowRendererProcessReuse
totrue
. #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.
-
-
修复了当 macOS 系统语言环境设置为 RTL 语言(例如阿拉伯语或希伯来语)时,窗口按钮的位置问题。无框架窗口应用在设置窗口样式时可能需要考虑到这一变化。#22016
¥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
有关这些变更和未来变更的更多信息,请参阅 计划中的突发事件变更 页面。
¥More information about these and future changes can be found on the Planned Breaking Changes page.
API 变更
¥API Changes
-
会话:现在可以通过调用
ses.isPersistent()
API 检查给定的session
是否持久化。#22622¥Session: Can now check if a given
session
is persistent by calling theses.isPersistent()
API. #22622 -
内容:添加了
contents.getBackgroundThrottling()
方法和contents.backgroundThrottling
属性。#21036¥Contents: Added
contents.getBackgroundThrottling()
method andcontents.backgroundThrottling
property. #21036
已弃用的 API
¥Deprecated APIs
以下 API 现已弃用或删除:
¥The following APIs are now deprecated or removed:
-
移除了
netLog
中已弃用的currentlyLoggingPath
属性。此外,netLog.stopLogging
不再返回已记录日志的路径。#22732¥Removed the deprecated
currentlyLoggingPath
property ofnetLog
. Additionally,netLog.stopLogging
no longer returns the path to the recorded log. #22732 -
已弃用
crashReporter
中的未压缩崩溃上传。#23598¥Deprecated uncompressed crash uploads in
crashReporter
. #23598
7.x.y 停止支持
¥End of Support for 7.x.y
根据项目的 支持政策,Electron 7.x.y 已达到支持终止状态。建议开发者和应用升级到较新版本的 Electron。
¥Electron 7.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.
下一步计划
¥What's Next
短期内,你可以预期团队将继续专注于跟上构成 Electron 的主要组件(包括 Chromium、Node 和 V8)的开发。虽然我们谨慎地不对发布日期做出承诺,但我们计划大约每季度发布一次 Electron 的新主要版本及其组件的新版本。暂定 11.0.0 计划 列出了 Electron 11.0 开发生命周期中的关键日期。此外,查看我们的版本控制文档 提供了有关 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 release new major versions of Electron with new versions of those components approximately quarterly. The tentative 11.0.0 schedule maps out key dates in the Electron 11.0 development life cycle. Also, see our versioning document for more detailed information about versioning in Electron.
有关即将推出的 Electron 版本 查看我们的“计划重大变更”文档 中计划的重大变更的信息。
¥For information on planned breaking changes in upcoming versions of Electron, see our Planned Breaking Changes doc.
继续弃用 remote
模块(在 Electron 11 中)
¥Continued Work for Deprecation of remote
Module (in Electron 11)
我们开始着手移除 Electron 9 中的远程模块,并且我们仍在继续移除 remote
模块的计划。在 Electron 11 中,我们计划继续进行重构工作以实现 WeakRef,就像我们在 Electron 10 中所做的那样。请阅读并遵循 这个问题 以获取完整的弃用计划和详细信息。
¥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.
要求原生 Node 模块具备上下文感知或 N-API 的最后一步(在 Electron 12 中)
¥Final Step for Requiring Native Node Modules to be Context Aware or N-API (in Electron 12)
编辑:最初,这篇博文表示我们将在 Electron 11 中禁用渲染器进程重用。禁用渲染器进程重用现已推送至 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.
从 Electron 6 开始,我们一直在努力确保在渲染器进程中加载的 原生 Node 模块 必须是 N-API 或 上下文感知。强制执行此更改可以提高安全性、加快性能并减少维护工作量。该计划的最后一步是移除 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.