Skip to main content

Electron 成为 OpenJS 基金会的影响力项目

· 3 min read

在今天早上的 OpenJS World 上,我们宣布 Electron 已正式从 OpenJS Foundation 的孵化计划毕业,现在成为了 OpenJS Foundation 的影响力项目。

🌐 At OpenJS World this morning, we announced that Electron has officially graduated from the OpenJS Foundation's incubation program, and is now an OpenJS Foundation Impact Project.

Electron 于 2019 年 12 月进入孵化阶段,在蒙特利尔举行的最后一次 OpenJS Foundation 全球大会上。作为一个影响力项目,我们很高兴在 JavaScript 社区中发挥更大的作用,并继续与 OpenJS Foundation 合作。

🌐 Electron entered incubation in December of 2019, at the last OpenJS Foundation global conference in Montreal. We're excited to take a larger role in the JavaScript community as an Impact Project, and continue our partnership with the OpenJS Foundation.


了解更多

🌐 Learning more

你可以在 OpenJSF 网站 上了解该基金会、其使命以及成员情况。OpenJS 基金会是多个开源 JavaScript 项目的主办方,包括 jQuery、Node.js 和 webpack。它得到了 30 个企业和终端用户成员的支持,包括 GoDaddy、Google、IBM、Intel、Joyent 和 Microsoft。

🌐 You can read up on the foundation, its mission, and its members on the OpenJSF website. The OpenJS Foundation is host to a number of open source JavaScript projects including jQuery, Node.js, and webpack. It's supported by 30 corporate and end-user members, including GoDaddy, Google, IBM, Intel, Joyent, and Microsoft.

Electron 是一个使用网页技术构建跨平台桌面应用的开源框架。想了解更多关于 Electron 背后的人以及他们如何协作的信息,请查看我们的治理页面

🌐 Electron is an open–source framework for building cross-platform desktop applications with web technologies. To learn more about the humans behind Electron and how they work together, take a look at our Governance page.

要开始使用 Electron 本身,请查看我们的文档

🌐 To get started with Electron itself, take a peek at our documentation.

Electron 9.0.0

· 8 min read

Electron 9.0.0 已经发布!它包括对 Chromium 83、V8 8.3 和 Node.js 12.14 的升级。我们为拼写检查器功能添加了几个新的 API 集成,启用了 PDF 查看器功能,还有更多更新!

🌐 Electron 9.0.0 has been released! It includes upgrades to Chromium 83, V8 8.3, and Node.js 12.14. We've added several new API integrations for our spellchecker feature, enabled PDF viewer, and much more!


Electron 团队很高兴地宣布 Electron 9.0.0 正式发布!你可以通过 npm 使用 npm install electron@latest 安装,或从我们的发布网站下载。本次发布包含了大量升级、修复和新功能。我们迫不及待想看看你会用它们创造出什么作品!继续阅读以了解本次发布的详细信息,并请分享你的任何反馈!

🌐 The Electron team is excited to announce the release of Electron 9.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

  • 拼写检查功能的多项改进。更多详情请参见 #22128#22368
  • 提高了 Linux 上窗口事件处理器的效率。#23260
  • 启用 PDF 查看器。 #22131

请查看 9.0.0 版本说明 以获取完整的新功能和更改列表。

🌐 See the 9.0.0 release notes for a full list of new features and changes.

即将发布的 Electron 版本

· 2 min read

Electron 暂时停止主要版本发布

🌐 Electron is temporarily pausing major releases


发生了什么?

🌐 What's Happening?

我们的主要版本发布节奏计划与 Chromium 的节奏保持同步,而 Chromium 项目最近决定由于工作计划调整而暂停其发布。这意味着在 Chromium 调整节奏的期间,Electron 也将暂时暂停新的主要版本发布。

🌐 Our major release cadence schedule moves in lockstep with that of Chromium, and the Chromium project has made the recent decision to pause its releases due to adjusted work schedules. This means that for the duration of Chromium's altered cadence, Electron will also temporarily pause new major releases.

我们认为我们的最佳选择是追随 Chromium 的脚步,因此在此期间,Electron 团队将转而全职致力于错误修复、安全性、性能和稳定性。

🌐 We feel that our best choice is to follow in Chromium's footsteps, and so in the interim the Electron team will shift to full-time work on bugfixes, security, performance, and stability.

我们希望确保维护人员和用户的福祉在此期间得到优先考虑,因此我们欢迎你的反馈,并期待恢复正常的发布计划。

🌐 We want to ensure that both our maintainers and our consumers' wellbeing is prioritized during this time, so we welcome your feedback and look forward to returning to our regular release schedule.

欲获取更多更新,请关注我们的推特账号

🌐 For more updates, please follow our Twitter account.

编辑(2020-03-30):Electron 9 稳定版将以 Chromium M83 为目标,并计划于 2020 年 5 月 19 日发布,以回应 Chromium 的公告 关于跳过 M82 稳定版日期并调整 M83 稳定版日期的通知。

🌐 Edit (2020-03-30): Electron 9 stable will target Chromium M83 and be released on May 19, 2020, in response to Chromium's announcement of skipping the M82 stable date and adjusting the M83 stable date.

Electron 8.0.0

· 10 min read

Electron 8.0.0 已经发布!它包括对 Chromium 80、V8 8.0 和 Node.js 12.13.0 的升级。我们还添加了 Chrome 内置的拼写检查功能,以及更多其他功能!

🌐 Electron 8.0.0 has been released! It includes upgrades to Chromium 80, V8 8.0, and Node.js 12.13.0. We've added Chrome's built-in spellchecker, and much more!


Electron 团队很高兴地宣布 Electron 8.0.0 正式发布!你可以通过 npm 使用 npm install electron@latest 安装,或从我们的发布网站下载。本次发布包含了大量升级、修复和新功能。我们迫不及待想看看你会用它们创造出什么作品!继续阅读以了解本次发布的详细信息,并请分享你的任何反馈!

🌐 The Electron team is excited to announce the release of Electron 8.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

  • 已实现使用 Chrome 内置拼写检查功能。更多详情请参见 #20692#21266
  • IPC 通信现在使用 v8 的结构化克隆算法。这比现有逻辑更快、功能更多且更少意外,对于大型缓冲区和复杂对象带来了约 2 倍的性能提升。小消息的延迟没有显著影响。更多详情请参见 #20214

请查看8.0.0版本说明以获取新功能和更改的完整列表。

🌐 See the 8.0.0 release notes for a full list of new features and changes.

Electron 加入 OpenJS 基金会

· 4 min read

在蒙特利尔举行的Node+JS Interactive大会上,OpenJS 基金会宣布已将 Electron 纳入基金会的孵化计划。基金会致力于通过提供一个中立的组织来托管和维持项目,以及共同资助有利于整个社区的活动,从而支持 JavaScript 生态系统和 web 技术的健康发展。

🌐 At Node+JS Interactive in Montreal, the OpenJS Foundation announced that it accepted Electron into the Foundation's incubation program. The Foundation is committed to supporting the healthy growth of the JavaScript ecosystem and web technologies by providing a neutral organization to host and sustain projects, as well as collaboratively fund activities for the benefit of the community at large.

OpenJS 基金会托管了多个开源 JavaScript 项目,包括 jQuery、Node.js 和 webpack。它由 30 个公司和终端用户成员支持,包括 GoDaddy、Google、IBM、Intel、Joyent 和 Microsoft。Electron 是一个开源框架,用于使用 Web 技术构建跨平台桌面应用。

🌐 The OpenJS Foundation is host to a number of open source JavaScript projects including jQuery, Node.js, and webpack. It's supported by 30 corporate and end-user members, including GoDaddy, Google, IBM, Intel, Joyent, and Microsoft. Electron is an open–source framework for building cross-platform desktop applications with web technologies.

这对 Electron 来说是一个激动人心的举措,我们将其视为我们作为开源项目发展的下一步。

🌐 This is an exciting move for Electron, and we see it as a next step in our evolution as an open-source project.


这对开发者意味着什么

🌐 What this means for developers

Electron 加入 OpenJS 基金会并不会改变 Electron 的制作、发布或使用方式——也不会直接影响使用 Electron 开发应用的开发者。尽管 Electron 最初是在 2013 年由 GitHub 创建的,但目前由许多组织和个人维护。2019 年,Electron 对其治理结构进行了规范,并大力投入于正式化涉及整个项目的决策制定进程。我们相信,有多家组织和开发者对 Electron 进行投资和协作会使项目更强大。

🌐 Electron joining the OpenJS Foundation does not change how Electron is made, released, or used — and does not directly affect developers building applications with Electron. Even though Electron was originally created at GitHub in 2013, it is currently maintained by a number of organizations and individuals. In 2019, Electron codified its governance structure and invested heavily into formalizing how decisions affecting the entire project are made. We believe that having multiple organizations and developers investing in and collaborating on Electron makes the project stronger.

随着我们开源项目日渐成熟,将 Electron 从单一企业实体所有提升到一个专注于支持 Web 和 JavaScript 生态系统的中立基金会是理所当然的下一步。

🌐 Lifting Electron up from being owned by a single corporate entity and moving it into a neutral foundation focused on supporting the web and JavaScript ecosystem is a natural next step as we mature as an open-source project.

了解更多

🌐 Learning more

你可以在 OpenJSF 网站 上了解基金会、其使命及成员。有关 Electron 被纳入 OpenJSF 孵化计划的更多信息和相关报道,请查看官方新闻稿。想了解更多关于 Electron 背后的人以及他们如何合作的信息,请访问我们的 治理页面

🌐 You can read up on the foundation, its mission, and its members on the OpenJSF website. For more information and quotes about the acceptance of Electron into the OpenJSF incubation program, check out the official press release. To learn more about the humans behind Electron and how they work together, take a look at our Governance page.

要开始使用 Electron 本身,请查看我们的文档

🌐 To get started with Electron itself, take a peek at our documentation.

Chromium WebAudio 漏洞修复 (CVE-2019-13720)

· 3 min read

Chrome 中发现了一个高危漏洞,该漏洞会影响所有基于 Chromium 的软件,包括 Electron。

🌐 A High severity vulnerability has been discovered in Chrome which affects all software based on Chromium, including Electron.

此漏洞已被分配编号 CVE-2019-13720。你可以在 Chrome 博客文章 中了解更多相关信息。

🌐 This vulnerability has been assigned CVE-2019-13720. You can read more about it in the Chrome Blog Post.

请注意,Chrome 已报告此漏洞正在被广泛利用,因此强烈建议你尽快升级 Electron。

🌐 Please note that Chrome has reports of this vulnerability being used in the wild so it is strongly recommended you upgrade Electron as soon as possible.


范围

🌐 Scope

这会影响任何可能运行第三方或不受信任的 JavaScript 的 Electron 应用。

🌐 This affects any Electron application that may run third-party or untrusted JavaScript.

缓解措施

🌐 Mitigation

受影响的应用应升级到 Electron 的修补版本。

🌐 Affected apps should upgrade to a patched version of Electron.

我们已发布 Electron 的新版本,其中包含针对此漏洞的修复:

🌐 We've published new versions of Electron which include fixes for this vulnerability:

Electron 7.0.1 在公告发布之前就自动包含了上游的修复。Electron 8 同样不受影响。Electron 5 中不存在该漏洞,因此该版本也不受影响。

🌐 Electron 7.0.1 automatically included the fix from upstream, before the announcement was made. Electron 8 is similarly unaffected. The vulnerability did not exist in Electron 5, so that version is also unaffected.

更多信息

🌐 Further Information

此漏洞由卡巴斯基实验室的安东·伊万诺夫和阿列克谢·库拉耶夫发现,并已向 Chrome 团队报告。Chrome 博客文章可以在 这里 找到。

🌐 This vulnerability was discovered by Anton Ivanov and Alexey Kulaev at Kaspersky Labs and reported to the Chrome team. The Chrome blog post can be found here.

要了解有关保持你的 Electron 应用安全的最佳做法的更多信息,请参阅我们的[安全教程]。

🌐 To learn more about best practices for keeping your Electron apps secure, see our security tutorial.

如果你希望报告 Electron 中的漏洞,请提交 [GitHub 安全咨询]。

🌐 Please file a GitHub Security Advisory if you wish to report a vulnerability in Electron.

Electron 7.0.0

· 6 min read

Electron 7.0.0 已发布!它包括对 Chromium 78、V8 7.8 和 Node.js 12.8.1 的升级。我们新增了适用于 Arm 64 的窗口版本、更快的 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 使用 npm install electron@latest 安装,或从我们的发布网站下载。本次发布包含了大量升级、修复和新功能。我们迫不及待想看看你会用它们构建什么作品!继续阅读以了解本次发布的详细信息,并请分享你的任何反馈!

🌐 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

  • 堆栈升级:

    StackVersion in Electron 6Version in Electron 7What's New
    Chromium76.0.3809.14678.0.3905.177, 78
    V87.67.87.7, 7.8
    Node.js12.4.012.8.112.5, 12.6, 12.7, 12.8, 12.8.1
  • 新增 Windows on Arm(64 位)版本发布。#18591#20112

  • 已添加 ipcRenderer.invoke()ipcMain.handle() 用于异步请求/响应式 IPC。强烈推荐使用它们,而不是 remote 模块。有关更多信息,请参阅这篇博客文章“Electron 的 ‘remote’ 模块被认为有害”。#18449

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

  • 已切换到新的 TypeScript 定义 生成器。生成的定义更加精确;因此,如果你的 TypeScript 构建失败,这很可能是原因。 #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:
    • 基于回调的函数版本,现在使用了 Promise。 #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
  • macOS 上的原生界面(菜单、对话框等)现在会自动匹配用户机器的夜间模式设置。#19226
  • 已更新 electron 模块以使用 @electron/get。现在支持的最低 Node 版本为 Node 8。#18413
  • 文件 electron.asar 不再存在。任何依赖其存在的打包脚本都应更新。 #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 测试版;作为回报,他们发现的新问题会被优先处理并纳入稳定版发布。如果你想参与或了解更多信息,请查看我们关于该计划的博客文章

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

Electron 6.0.0

· 10 min read

Electron 团队很高兴地宣布 Electron 6.0.0 正式发布!你可以通过 npm 使用 npm install electron@latest 安装,或从我们的发布网站下载。本次发布包含了大量升级、修复和新功能。我们迫不及待想看看你会用它们构建什么!继续阅读以了解本次发布的详细信息,并请分享你任何的反馈!

🌐 The Electron team is excited to announce the release of Electron 6.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!


新功能

🌐 What's New

今天对 Electron 项目来说是一个里程碑:这是我们第一次在与对应的 Chrome 稳定版本 同一天 发布稳定的 Electron 版本!🎉

🌐 Today marks a first for the Electron project: this is the first time we've made a stable Electron release on the same day as the corresponding Chrome stable release! 🎉

Electron 的大部分功能由 Chromium、Node.js 和 V8 的核心组件提供。Electron 会跟进这些项目的最新进展,为用户提供新的 JavaScript 功能、性能改进和安全修复。在 Electron 6 中,这些软件包中的每一个都有一次主要版本更新:

🌐 Much of Electron's functionality is provided by the core components of Chromium, Node.js, and V8. Electron keeps up-to-date with these projects to provide our users with new JavaScript features, performance improvements, and security fixes. Each of these packages has a major version bump in Electron 6:

此版本还包括对 Electron API 的改进。发行说明 提供了更完整的列表,但以下是主要亮点:

🌐 This release also includes improvements to Electron's APIs. The release notes have a more complete list, but here are the highlights:

Promisification

Electron 6.0 继续了在 5.0 中启动的现代化计划,以改进对Promise的支持。

🌐 Electron 6.0 continues the modernization initiative started in 5.0 to improve Promise support.

这些函数现在返回 Promises,并且仍然支持旧版基于回调的调用:

🌐 These functions now return Promises and still support older callback-based invocation:

  • contentTracing.getCategories() #16583
  • contentTracing.getCategories() #16583
  • contentTracing.getTraceBufferUsage() #16600
  • contents.executeJavaScript() #17312
  • cookies.flushStore() #16464
  • cookies.get() #16464
  • cookies.remove() #16464
  • cookies.set() #16464
  • dialog.showCertificateTrustDialog() #17181
  • inAppPurchase.getProducts() #17355
  • inAppPurchase.purchaseProduct()#17355
  • netLog.stopLogging() #16862
  • session.clearAuthCache() #17259
  • session.clearCache() #17185
  • session.clearHostResolverCache() #17229
  • session.clearStorageData() #17249
  • session.getBlobData() #17303
  • session.getCacheSize() #17185
  • session.resolveProxy() #17222
  • session.setProxy() #17222
  • webContents.hasServiceWorker() #16535
  • webContents.printToPDF() #16795
  • webContents.savePage() #16742
  • webFrame.executeJavaScript() #17312
  • webFrame.executeJavaScriptInIsolatedWorld() #17312
  • webviewTag.executeJavaScript() #17312

这些函数现在有两种形式:同步和基于 Promise 的异步:

🌐 These functions now have two forms, synchronous and Promise-based asynchronous:

  • dialog.showMessageBox()/dialog.showMessageBoxSync() #17298
  • dialog.showOpenDialog()/dialog.showOpenDialogSync() #16973
  • dialog.showSaveDialog()/dialog.showSaveDialogSync() #17054

这些函数现在返回 Promises:

🌐 These functions now return Promises:

Electron Helper (Renderer).appElectron Helper (GPU).appElectron Helper (Plugin).app

🌐 Electron Helper (Renderer).app, Electron Helper (GPU).app and Electron Helper (Plugin).app

为了启用hardened runtime,它会限制可写执行内存以及加载由不同团队 ID 签名的代码,需要向 Helper 授予特殊的代码签名权限。

🌐 In order to enable the hardened runtime, which restricts things like writable-executable memory and loading code signed by a different Team ID, special code signing entitlements needed to be granted to the Helper.

为了将这些权限限制在需要它们的进程类型范围内,Chromium 添加了 三种新的 Helper 应用变体:一种用于渲染器(Electron Helper (Renderer).app)、一种用于 GPU 进程(Electron Helper (GPU).app)以及一种用于插件(Electron Helper (Plugin).app)。

🌐 To keep these entitlements scoped to the process types that require them, Chromium added three new variants of the Helper app: one for renderers (Electron Helper (Renderer).app), one for the GPU process (Electron Helper (GPU).app) and one for plugins (Electron Helper (Plugin).app).

使用 electron-osx-sign 对 Electron 应用进行代码签名的用户不需要对构建逻辑进行任何更改。如果你使用自定义脚本为应用进行代码签名,应确保三个新的辅助应用已正确签名。

🌐 Folks using electron-osx-sign to codesign their Electron app shouldn't have to make any changes to their build logic. If you're codesigning your app with custom scripts, you should ensure that the three new Helper applications are correctly codesigned.

为了正确地使用这些新助手打包你的应用,你需要使用 electron-packager@14.0.4 或更高版本。如果你使用的是 electron-builder,你应该关注 这个问题 来跟踪对这些新助手的支持情况。

🌐 In order to package your application correctly with these new helpers you need to be using electron-packager@14.0.4 or higher. If you are using electron-builder you should follow this issue to track support for these new helpers.

重大变化

🌐 Breaking Changes

  • 此版本开始为未来对在渲染进程中加载的本地 Node 模块要求其必须是 N-APIContext Aware 打下基础。此更改的原因是提高性能、增强安全性以及减少维护工作量。完整细节及拟定时间表请查看 此问题。预计此更改将在 Electron v11 中完成。
  • net.IncomingMessage 头部已经略有更改,以更接近 Node.js 的行为,特别是 set-cookie 的值以及如何处理重复的头部。#17517
  • shell.showItemInFolder() 现在返回 void,并且是一个异步调用。#17121
  • 应用现在必须在使用 app.getPath('log') 之前,通过调用新函数 app.setAppLogPath() 明确设置日志路径。#17841

3.x.y 支持终止

🌐 End of Support for 3.x.y

根据我们的支持政策,3.x.y 已经达到生命周期终点。我们鼓励开发者和应用升级到更新版本的 Electron。

🌐 Per our support policy, 3.x.y has reached end of life. Developers and applications are encouraged to upgrade to a newer version of Electron.

应用反馈计划

🌐 App Feedback Program

我们继续使用我们的应用反馈计划进行测试。参与该计划的项目会在他们的应用上测试 Electron 测试版;作为回报,他们发现的新问题会被优先处理用于正式版本。如果你想参与或了解更多信息,请查看我们关于该计划的博客文章

🌐 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 主要版本。临时 7.0.0 时间表列出了 Electron 7 开发生命周期中的关键日期。此外,请参阅我们的版本控制文档以获取关于 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 7.0.0 schedule maps out key dates in the Electron 7 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.

新的 Electron 发布周期

· 6 min read
⚡️ 更新(2021-07-14):我们进展得更快了!

在2021年第三季度,Chrome团队将发布周期从每6周一次改为每4周一次。Electron的发布也随之调整。请阅读更新后的8周周期博客文章,获取更即时的信息!

🌐 In Q3 2021, the Chrome team increased their release cadence from every 6 weeks to every 4 weeks. Electron's releases have followed suit. Please read the updated 8 week cadence blog post for more up-to-date information!

🎉 Electron 将每 12 周发布一个新的主要稳定版本!🎉


⚡️ 哇,好快啊!可是为什么?

🌐 ⚡️ Wow that's quick! But why?

简而言之,Chromium 不会停止发布,因此 Electron 的速度也不会减慢。

🌐 Simply put, Chromium doesn't stop shipping so Electron is not going to slow down either.

Chromium 每六周都会按固定的时间表发布新版本。为了在 Electron 中提供最新版本的 Chromium,我们的时间表需要与其保持一致。有关 Chromium 发布周期的更多信息,可点击这里了解。

🌐 Chromium releases on a consistent 6-week schedule. To deliver the most up-to-date versions of Chromium in Electron, our schedule needs to track theirs. More information around Chromium's release cycle can be found here.

🚀 为什么每12周一次?

🌐 🚀 Why every 12 weeks?

每六周,Chromium 就会发布一个新版本,包含新功能、错误修复/安全修复以及 V8 的改进。Electron 的用户一直明确表示希望能够及时获得这些更新,因此我们已调整了稳定版的发布时间,以与 Chromium 的每隔一个稳定版本同步。首先,Electron v6.0.0 将包含 M76,并计划于 2019 年 7 月 30 日 正式发布,这与 Chromium M76 的发布日相同。

🌐 Every 6 weeks, a new Chromium release comes out with new features, bug fixes / security fixes, and V8 improvements. Electron's users have been loud and clear about wanting these changes in a timely manner, so we've adjusted our stable release dates to match every other Chromium stable release. Up first, Electron v6.0.0 will include M76 and is scheduled for stable release on July 30, 2019, the same release day as Chromium M76.

🚧 这对我和我的 Electron 应用意味着什么?

🌐 🚧 What does this mean for me and my Electron app?

你将比以前更早接触到新的 Chromium 和 V8 功能及修复。重要的是,你还将知道这些新变化何时到来,这样你就能够比以前更好地进行计划。

🌐 You'll have access to new Chromium and V8 features and fixes sooner than before. Importantly, you'll also know when those new changes are coming, so you'll be able to plan with better information than before.

Electron 团队将继续支持最新的三个主要版本。例如,当v6.0.0 在 2019 年 7 月 30 日稳定发布时,我们将支持 v6.x、v5.x 和 v4.x,而 v3.x 将进入生命周期结束阶段。

🌐 The Electron team will continue to support the latest three major versions. For example, when v6.0.0 goes stable on July 30, 2019, we will support v6.x, v5.x, and v4.x, while v3.x will reach End-Of-Life.

💬 应用反馈计划

🌐 💬 App Feedback Program

请考虑加入我们的应用反馈计划,帮助我们测试测试版发布和稳定性。参与该计划的项目会在其应用上测试 Electron 测试版;作为回报,他们发现的新问题会在稳定版本发布时优先处理。

🌐 Please consider joining our App Feedback Program to help us with testing our beta releases and stabilization. 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.

📝 Electron 发布简史

🌐 📝 A brief history of Electron releases

在 v3.0.0 之前,关于稳定版本的决策并没有遵循固定的时间表。我们在 v3.0.0 和 v4.0.0 时为项目添加了内部时间表。今年早些时候,我们决定首次公开 Electron v5.0.0 的稳定发布日期。宣布我们的稳定发布日期整体上得到了积极的反馈,我们也很高兴在未来的发行版本中继续这样做。

🌐 The decisions around stable releases before v3.0.0 did not follow a schedule. We added internal schedules to the project with v3.0.0 and v4.0.0. Earlier this year, we decided to publicize our stable release date for the first time for Electron v5.0.0. Announcing our stable release dates was positively received overall and we're excited to continue doing that for future releases.

为了更好地优化这些与升级相关的工作,我们在治理系统中创建了升级发布工作小组。这些小组使我们能够更好地确定优先级和分配工作,我们希望随着每一次后续发布,这一点会变得更加明显。

🌐 In order to better streamline these upgrade-related efforts, our Upgrades and Releases Working Groups were created within our Governance system. They have allowed us to better prioritize and delegate this work, which we hope will become more apparent with each subsequent release.

这是我们的新节奏与 Chromium 节奏相比的位置:

line graph comparing Electron versus Chromium versions

📨 如果你有任何问题,请发送邮件至 info@electronjs.org

Electron 5.0.0

· 9 min read

Electron 团队很高兴地宣布 Electron 5.0.0 的发布!你可以通过 npm 使用 npm install electron@latest 安装,或从我们的发布页面下载压缩包。本次发布包含了大量升级、修复和新功能。我们迫不及待地想看看你们会用这些功能创造出什么!继续阅读以了解本次发布的详细信息,并请分享你们的任何反馈!

🌐 The Electron team is excited to announce the release of Electron 5.0.0! You can install it with npm via npm install electron@latest or download the tarballs from our releases page. 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!


有什么新功能?

🌐 What's New?

Electron 的大部分功能由 Chromium、Node.js 和 V8 的核心组件提供。Electron 会跟进这些项目的最新进展,为用户提供新的 JavaScript 功能、性能改进和安全修复。在 Electron 5 中,这些软件包中的每一个都有一次主要版本更新:

🌐 Much of Electron's functionality is provided by the core components of Chromium, Node.js, and V8. Electron keeps up-to-date with these projects to provide our users with new JavaScript features, performance improvements, and security fixes. Each of these packages has a major version bump in Electron 5:

Electron 5 还包括对 Electron 特定 API 的改进。主要更改总结如下;有关完整的更改列表,请查看 Electron v5.0.0 发布说明

🌐 Electron 5 also includes improvements to Electron-specific APIs. A summary of the major changes is below; for the full list of changes, check out the Electron v5.0.0 release notes.

Promisification

Electron 5 继续推进 Promisification initiative 计划,将 Electron 的基于回调的 API 转换为使用 Promise。这些 API 已在 Electron 5 中被转换:

🌐 Electron 5 continues Promisification initiative initiative to convert Electron's callback-based API to use Promises. These APIs were converted for Electron 5:

  • app.getFileIcon
  • contentTracing.getCategories
  • contentTracing.startRecording
  • contentTracing.stopRecording
  • debugger.sendCommand
  • Cookies API
  • shell.openExternal
  • webContents.loadFile
  • webContents.loadURL
  • webContents.zoomLevel
  • webContents.zoomFactor
  • win.capturePage

macOS 的系统颜色访问

🌐 System colors access for macOS

这些函数已被更改或添加到 systemPreferences 中,以访问 macOS 系统的颜色:

🌐 These functions were changed or added to systemPreferences to access macOS systems' colors:

  • systemPreferences.getAccentColor
  • systemPreferences.getColor
  • systemPreferences.getSystemColor

进程内存信息

🌐 Process memory information

已添加函数 process.getProcessMemoryInfo 来获取当前进程的内存使用情况统计。

🌐 The function process.getProcessMemoryInfo has been added to get memory usage statistics about the current process.

远程 API 的额外筛选功能

🌐 Additional filtering for remote APIs

为了提高 remote API 的安全性,已添加了新的远程事件,以便可以对 remote.getBuiltinremote.getCurrentWindowremote.getCurrentWebContents<webview>.getWebContents 进行过滤

🌐 To improve security in the remote API, new remote events have been added so that remote.getBuiltin, remote.getCurrentWindow, remote.getCurrentWebContents and <webview>.getWebContents can be filtered.

浏览器窗口上的多个浏览器视图

🌐 Multiple BrowserViews on BrowserWindow

BrowserWindow 现在支持在同一个 BrowserWindow 中管理多个 BrowserView。

🌐 BrowserWindow now supports managing multiple BrowserViews within the same BrowserWindow.

重大变化

🌐 Breaking Changes

打包应用的默认值

🌐 Defaults for packaged apps

打包的应用现在将与默认应用表现相同:除非应用已有菜单,否则将创建默认应用菜单;除非应用自行处理事件,否则 window-all-closed 事件将被自动处理。

🌐 Packaged apps will now behave the same as the default app: a default application menu will be created unless the app has one and the window-all-closed event will be automatically handled unless the app handles the event.

混合沙盒

🌐 Mixed sandbox

混合沙箱模式现在默认启用。使用 sandbox: true 启动的渲染器现在将真正处于沙箱环境中,而之前只有在也启用了混合沙箱模式时,它们才会被沙箱化。

🌐 Mixed sandbox mode is now enabled by default. Renderers launched with sandbox: true will now be actually sandboxed, where previously they would only be sandboxed if mixed-sandbox mode was also enabled.

安全性改进

🌐 Security improvements

nodeIntegrationwebviewTag 的默认值现在为 false,以提高安全性。

🌐 The default values of nodeIntegration and webviewTag are now false to improve security.

拼写检查器现在异步

🌐 Spellchecker now asynchronous

SpellCheck API 已经更改为提供异步结果

🌐 The SpellCheck API has been changed to provide asynchronous results.

弃用

🌐 Deprecations

以下 API 在 Electron 5.0.0 中被弃用,并计划在 6.0.0 中删除:

🌐 The following APIs are newly deprecated in Electron 5.0.0 and planned for removal in 6.0.0:

适用于 arm 和 arm64 的 Mksnapshot 二进制文件

🌐 Mksnapshot binaries for arm and arm64

mksnapshot 的 ARM 和 ARM64 原生二进制文件已被弃用,并将在 6.0.0 中移除。可以使用 x64 二进制文件为 ARM 和 ARM64 创建快照。

🌐 Native binaries of mksnapshot for arm and arm64 are deprecated and will be removed in 6.0.0. Snapshots can be created for arm and arm64 using the x64 binaries.

WebContents 上的 ServiceWorker API

🌐 ServiceWorker APIs on WebContents

已弃用 WebContents 上的 ServiceWorker API,准备将其移除。

🌐 Deprecated ServiceWorker APIs on WebContents in preparation for their removal.

  • webContents.hasServiceWorker
  • webContents.unregisterServiceWorker

带有沙盒 webContents 的自动模块

🌐 Automatic modules with sandboxed webContents

为了提高安全性,以下模块将不再通过 require 直接使用,而需要通过 remote.require 在沙盒化的 webcontents 中引入:

🌐 In order to improve security, the following modules are being deprecated for use directly via require and will instead need to be included via remote.require in a sandboxed webcontents:

  • electron.screen
  • child_process
  • fs
  • os
  • path

webFrame 隔离世界 API

🌐 webFrame Isolated World APIs

webFrame.setIsolatedWorldContentSecurityPolicywebFrame.setIsolatedWorldHumanReadableNamewebFrame.setIsolatedWorldSecurityOrigin 已被弃用,建议使用 webFrame.setIsolatedWorldInfo

混合沙盒

🌐 Mixed sandbox

enableMixedSandbox--enable-mixed-sandbox 命令行开关仍然存在以保持兼容性,但已不推荐使用且不起作用。

2.0.x 停止支持

🌐 End of support for 2.0.x

根据我们的支持版本政策,2.0.x 已经终止支持。

🌐 Per our supported versions policy, 2.0.x has reached end of life.

应用反馈计划

🌐 App Feedback Program

我们继续使用我们的应用反馈计划进行测试。参与该计划的项目会在他们的应用上测试 Electron 测试版;作为回报,他们发现的新问题会被优先处理用于正式版本。如果你想参与或了解更多信息,请查看我们关于该计划的博客文章

🌐 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 主要版本。暂定的 6.0.0 计划 列出了 Electron 6 开发生命周期中的关键日期。此外,请参阅我们的版本说明文档 以获取关于 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 6.0.0 schedule maps out key dates in the Electron 6 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.