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 使用 npm install electron@latest 安装,或从我们的 发布网站 下载。此次发布包含了大量升级、修复和新功能。
🌐 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
- 添加了
contents.getBackgroundThrottling()方法和contents.backgroundThrottling属性。 [#21036] - 在主进程中暴露了
desktopCapturer模块。#23548 - 现在可以通过调用
ses.isPersistent()API 来检查给定的session是否是持久的。 #22622 - 解决由于网络 IP 地址更改和 ICE 导致 RTC 通话无法连接的网络问题。(Chromium 问题 1113227)。#24998
请查看 10.0.0 版本说明 以获取完整的新功能和更改列表。
🌐 See the 10.0.0 release notes for a full list of new features and changes.
技术栈变更
🌐 Stack Changes
- Chromium
85.0.4183.84 - Node.js
12.16.3 - V8
8.5
重大变化
🌐 Breaking Changes
- 将
enableRemoteModule的默认值更改为false。#22091- 这是我们计划弃用
remote模块并将其迁移到用户空间的一部分。你可以阅读并关注 这个问题,其中详细说明了我们的原因,并包含了弃用的拟议时间表。
- 这是我们计划弃用
- 将
app.allowRendererProcessReuse的默认值更改为true。#22336(在 Electron 9 中也同样适用)- 这将防止在渲染器进程中加载不感知上下文的原生模块。
- 你可以阅读并关注此问题,其中详细说明了我们的原因,并包括拟议的弃用时间表。
- 修复了在 macOS 系统语言设置为从右到左语言(如阿拉伯语或希伯来语)时窗口按钮的位置。无边框窗口应用在对窗口进行样式设计时可能需要考虑此更改。#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 - 内容:新增
contents.getBackgroundThrottling()方法和contents.backgroundThrottling属性。#21036
已弃用的 API
🌐 Deprecated APIs
以下 API 现已弃用或删除:
🌐 The following APIs are now deprecated or removed:
- 移除了
netLog的已弃用属性currentlyLoggingPath。此外,netLog.stopLogging不再返回已记录日志的路径。#22732 - 在
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.