Skip to main content

Electron 7.0.0

· 7 min read

Electron 7.0.0 已发布!此更新包含对 Chromium 78、V8 7.8 和 Node.js 12.8.1 的升级。我们添加了基于 Arm 64 的 Window 版本、更快的 IPC 方法、新的 nativeTheme API 等等!

¥Electron 7.0.0 has been released! It includes upgrades to Chromium 78, V8 7.8, and Node.js 12.8.1. We've added a Window on Arm 64 release, faster IPC methods, a new nativeTheme API, and much more!


Electron 团队非常高兴地宣布 Electron 7.0.0 正式发布!你可以通过 npm install electron@latest 使用 npm 安装它,也可以从我们的 发布网站。此版本包含升级、修复和新功能。我们迫不及待地想看看你使用它们构建的内容!继续阅读以了解有关此版本的详细信息,并请分享你的任何反馈!

¥The Electron team is excited to announce the release of Electron 7.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. 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 Upgrades:

    StackElectron 6 版本Electron 7 版本新功能
    Chromium76.0.3809.14678.0.3905.17778
    V87.67.87.77.8
    Node.js12.4.012.8.112.5, 12.6, 12.7, 12.8, 12.8.1
  • 添加了 Windows on Arm(64 位)版本。#18591#20112

    ¥Added Windows on Arm (64 bit) release. #18591, #20112

  • 添加了 ipcRenderer.invoke()ipcMain.handle(),用于异步请求/响应式 IPC。强烈建议使用这些注解,而不是 remote 模块。更多信息请参阅这篇“Electron 的“远程”模块被认为有害”博客文章。#18449

    ¥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

  • 添加了 nativeTheme API,用于读取并响应操作系统主题和配色方案的变化。#19758#20486

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

  • 已切换到新的 TypeScript 定义 generator。最终的定义更加精确;因此,如果你的 TypeScript 构建失败,这可能是原因。#18103

    ¥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

请参阅 7.0.0 发行说明 获取更长的变更列表。

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

重大变化

¥Breaking Changes

有关这些变更和未来变更的更多信息,请参阅 计划中的突发事件变更 页面。

¥More information about these and future changes can be found on the Planned Breaking Changes page.

  • 移除已弃用的 API:

    ¥Removed deprecated APIs:

    • 基于回调的函数版本,现在使用 Promises。#17907

      ¥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() 不再允许过滤已清除的缓存条目。#17970

    ¥Session.clearAuthCache() no longer allows filtering the cleared cache entries. #17970

  • macOS 上的原生界面(菜单、对话框等)现在会自动匹配用户设备上的暗黑模式设置。#19226

    ¥Native interfaces on macOS (menus, dialogs, etc.) now automatically match the dark mode setting on the user's machine. #19226

  • 更新了 electron 模块以使用 @electron/get。现在支持的最低 Node 版本是 Node 8。#18413

    ¥Updated the electron module to use @electron/get. The minimum supported node version is now Node 8. #18413

  • 文件 electron.asar 已不存在。任何依赖于此的打包脚本都应进行更新。#18577

    ¥The file electron.asar no longer exists. Any packaging scripts that depend on its existence should be updated. #18577

4.x.y 停止支持

¥End of Support for 4.x.y

根据项目的 支持政策,Electron 4.x.y 已终止支持。建议开发者和应用升级到较新版本的 Electron。

¥Electron 4.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.

应用反馈计划

¥App Feedback Program

我们继续使用我们的 应用反馈计划 进行测试。参与此计划的项目在其应用上测试 Electron 测试版;作为回报,他们发现的新 bug 将优先发布到稳定版本。如果你想参与或了解更多信息,请联系 查看我们关于该程序的博客文章

¥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.

下一步计划

¥What's Next

短期内,你可以预期团队将继续专注于跟上构成 Electron 的主要组件(包括 Chromium、Node 和 V8)的开发。虽然我们谨慎地不对发布日期做出承诺,但我们计划大约每季度发布一次 Electron 的新主要版本及其组件的新版本。暂定 8.0.0 计划 模块列出了 Electron 8 开发生命周期中的关键日期。此外,查看我们的版本控制文档 提供了有关 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 8.0.0 schedule maps out key dates in the Electron 8 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.