跳转到主内容

Electron 13.0.0

· 阅读时间:约 4 分钟

Electron 13.0.0 已发布! 它包括了到 Chromium 91 和 V8 9.1 的更新。 我们添加了多个 API 更新、错误修复和一般改进。 请阅读下文了解更多详情!


Electron 团队很高兴发布了 Electron 13.0.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!

重要变化

  • Added process.contextIsolated property that indicates whether the current renderer context has contextIsolation enabled. #28252
  • Added new session.storagePath API to get the path on disk for session-specific data. #28866
  • Deprecated the new-window event of WebContents. 它被替换为 webContents.setWindowOpenHandler()
  • Added process.contextId used by @electron/remote. #28251

有关新功能和变更的完整列表,请参阅 13.0.0 发布通知

Electron 12.0.0

· 阅读时间:约 7 分钟

Electron 12.0.0 已发布! It includes upgrades to Chromium 89, V8 8.9 and Node.js 14.16. We've added changes to the remote module, new defaults for contextIsolation, a new webFrameMain API, and general improvements. 请阅读下文了解更多详情!


Electron 团队很高兴发布了 Electron 12.0.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!

Electron 11.0.0

· 阅读时间:约 4 分钟

Electron 11.0.0 已发布! 它包括升级到 Chromium 87, V8 8.7, 和 Node.js 12.18.3。 我们已经添加了对Apple silicon和一般改进的支持。 请阅读下文了解更多详情!


Electron 团队很高兴发布了 Electron 11.0.0.0! You can install it with npm via npm install electron@latest or download it from our releases website. 新版本包括内容更新及问题修复,提供对Apple M1的硬件支持。

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!

重要变化

有关新功能和变更的完整列表,请参阅 11.0.0 发布通知

Apple Silicon 芯片支持

· 阅读时间:约 3 分钟

随着苹果芯片将于今年晚些时候发布,您如何让Electron应用程序在新硬件上运行?


随着Electron 11.0.0-beta.1的发布,Electron团队现在正在编写在苹果计划于今年晚些时候发货的新苹果芯片上运行的Electron版本。 You can grab the latest beta with npm install electron@beta or download it directly from our releases website.

它是如何工作的?

从Electron 11开始,我们将为Intel Mac和Apple Silicon Mac发布不同的Electron版本。 在这个变化之前,我们已经发布了两个版本, darwin-x64mas-x64,后者是用于Mac App Store 兼容性的使用。 我们现在已发布另外两个版本 darwin-arm64mas-arm64,为上述版本的 Apple Silicon 版本。

我需要做什么?

您将需要发布两个版本的应用:一个版本用于 x64(Intel Mac),另一个版本用于arm64(Apple Silicon)。 好消息是 electron-packager, electron-rebuildelectron-forge 已经为 arm64 架构做好了支持。 只要您正在运行这些软件包的最新版本,您的应用就应该在将目标架构更新到 arm64 后正常工作。

将来, 我们将发布一个软件包,允许您将您的 arm64x64 应用“合并”到一个单一的通用二进制软件包, 但值得注意的是,这个二进制文件可能会 非常巨大 并且可能不适合给用户发布。

更新:此软件包现在可在 @electron/universal 上使用。 您可以使用它将两个以打包的 x64 和 arm64 应用程序合并为一个二进制程序。

潜在问题

原生模块

当您正在针对一个新的架构时,您需要更新几个依赖关系,这可能会导致构建问题。 下面包含某些依赖关系的最低版本以供您参考。

依赖项版本要求
Xcode>=12.2
node-gyp>=7.1
electron-rebuild>=1.12
electron-packager>=15.1

由于这些依赖版本要求,您可能不得不修复/更新某些原生模块。 值得注意的是,Xcode 升级将引入新版本的 macOS SDK。 这可能会导致您的原生模块构建失败。

如何测试它

目前,Apple Silicon 应用程序只在 Apple Silicon 硬件上运行,在撰写这篇博文时暂没有商业用途。 如果您有一个开发者过渡套件,您可以在那里测试您的应用程序。 否则,您将不得不等待Apple Silicon硬件的生产发布,以测试您的应用是否正常。

Rosetta 2怎么样?

Rosetta 2 是苹果最近一次对他们的 Rosetta 技术的迭代。 允许您在新的 arm64 Apple Silicon 硬件上运行 x64 Intel 应用。 虽然我们相信x64 Electron应用程序将在Rosetta 2下运行,但有一些重要的事情需要注意(以及您应该发布原生arm64二进制文件的原因)。

  • 您的应用的性能将明显下降。 Electron / V8 为 JavaScript 使用 JIT 编译,因为 Rosetta 工作的原理。 您实际上将运行两次JIT (一次在 V8 中,一次在 Rosetta)。
  • 您失去了如内存页面大小的增加这样的 Apple Silicon 新技术的好处。
  • 我们是否提到性能将显著 降级?

Community Discord Server and Hacktoberfest

· 阅读时间:约 3 分钟

Join us for community bonding and a month-long celebration of open-source.


Hacktoberfest and Discord banner

Electron Community Discord Launch

Electron’s Outreach Working Group is excited to announce the launch of our official community Discord server!

Why a new Discord server?

In its early days as the backbone of the Atom text editor, community discussion on the Electron framework occurred in a single channel in Atom’s Slack workspace. As time passed and the two projects were increasingly decoupled, the relevance of the Atom workspace to the Electron project decreased, and maintainer participation in the Slack channel declined in the same manner.

Up until now, we had still been redirecting our broader community to the Atom Slack workspace, even though we’ve had many reports from folks who have had trouble receiving invitations, and few of our core maintainers were frequenting the channel.

We’re setting up this shiny new server to be a central discussion hub for the community where you can get the latest news on all things Electron.

Get in here!

So far, the server’s membership consists of a few maintainers who have been working together to set it up, but we’re so excited to chat with you all! Come ask for help, keep up to date with Electron releases, or just hang out with other developers. We’ve got a handy invite for you that’ll give you access to the server!

Hacktoberfest 2020

作为一个大型和长期运行的开源项目,Electron如果没有其社区的所有 贡献就不会像现在这样成功。 从提交代码到错误报告到文档更改,还有更多。 That’s why we believe in the importance of participating in Hacktoberfest to usher in a wider community of developers of all skill levels into the project.

Odds and ends

This year, we don’t have a wider project to give you all to work on, but we’d like to focus on opportunities to contribute across the Electron JavaScript ecosystem.

Look out for issues tagged hacktoberfest across our various repositories, including the main electron/electron repository, the electron/electronjs.org website, electron/fiddle, and electron-userland/electron-forge!

P.S. If you're feeling particularly adventurous, we also have a backlog of issues marked with help wanted tags if you're looking for more of a challenge.

Stuck? Come chat with us!

Moreover, it’s also no coincidence that the grand opening of our Discord server coincides with the largest celebration of open-source software of the year. Check out the #hacktoberfest channel to ask for help on your Hacktoberfest PR. In case you missed it, here's the invite link again!

Electron 10.0.0

· 阅读时间:约 5 分钟

Electron 10.0.0 已发布! 它包括升级到 Chromium 85, V8 8.5, 和 Node.js 12.16。 我们添加了几个新的 API 集成和改进。 请阅读下文了解更多详情!


Electron 团队很高兴发布了 Electron 10.0.0.0! You can install it with npm via npm install electron@latest or download it from our releases website. 这次发布包含升级、修复和新功能。

在 Electron 10 发布版中,我们还修改了我们的版本说明。 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!

重要变化

  • Added contents.getBackgroundThrottling() method and contents.backgroundThrottling property. [#21036]
  • Exposed the desktopCapturer module in the main process. #23548
  • Can now check if a given session is persistent by calling the ses.isPersistent() API. #22622
  • 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 发布通知

Electron becomes an OpenJS Foundation Impact Project

· 阅读时间:约 1 分钟

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

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

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

Google 文档之季

· 阅读时间:约 3 分钟

Electron is proud to be participating in the second edition of Google's Season of Docs initiative, which pairs mentors from open source organizations with technical writers to improve project documentation.


什么是文档之季?

文档之季标志

文档之季是一个为促进技术作者与开源社区间合作而生的计划。 开源软件维护者利用作家们的技术写作专家知识来改进其文档的结构和内容。同时,技术作家在导师指导下被介绍给开源社区。 在Google的 文档之季网站 上了解更多信息。

这是我们第一次参加这项计划,我们将会指导一位将与生态项目组合作的技术作家,以大规模重塑我们的记录文档。 您可以在这里了解更多关于整个工程的时间线

我该如何参加?

您是否有兴趣作为技术撰稿人与我们合作? 首先,请了解谷歌今年的技术写作指南 。并查看我们编写的两个 项目构想草案

为了被选为 Electron 的 Season of Docs 技术撰稿人,参与者需要在 6 月 8 日至 7 月 9 日的技术撰稿人申请阶段在 Google Season of Docs 网站上申请。

您的申请应包括一份提案,这是一份书面文件,详细描述了您计划在3个月内在Electron文档上实现的目标。 该提案可以在我们的 “项目构想” (Project Idea) 文档中提到的起点之一上进行开发,也可以是全新的东西。 不知道从哪里开始? 您可以查看去年已接受的提案列表,以获取灵感。

除了提案之外,我们还将研究您作为技术作家的背景。 请附上您的简历副本,重点是相关的写作经验,以及技术写作样本(这些样本可能是现有的文档,教程,博客文章等)。

如果您想讨论项目提案,请在 season-of-docs@electronjs.org 上给我们发送电子邮件,我们可以从那里聊天!

引用

Electron 9.0.0

· 阅读时间:约 5 分钟

Electron 9.0.0 已发布! 它包括升级到 Chromium 83, V8 8.3, 和 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.0! You can install it with npm via npm install electron@latest or download it from our releases website. 这次发布包含升级、修复和新功能。 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!

重要变化

  • Multiple improvements to the spellchecker feature. See more details in #22128 and #22368.
  • Improved window events handler efficiency on Linux. #23260.
  • Enable PDF viewer. #22131.

有关新功能和变更的完整列表,请参阅 9.0.0 发布通知

即将发布的 Electron 版本

· 阅读时间:约 1 分钟

Electron 正在暂停更新大型版本


发生了什么?

我们的 大型更新时间表 与Chromium 同步更新,Chromium项目最近由于调整工作时间表已决定 暂停更新。 这意味着,在Chromium经过改变的更新节奏期间,Electron也会暂时性地暂停重大更新。

我们认为,我们的最佳选择是沿着Chromium的脚步走下去, 因此,在过渡时期,Electron团队将转为全天候处理错误、安全、性能和稳定性问题。

我们希望确保我们的维护者和消费者的福利在这个时候都得到优先考虑。 因此,我们欢迎你们的反馈,并期待着恢复我们的正常发布时间表。

欲了解更多更新信息,请关注我们的 Twitter

编辑(2020-03-30):Election 9 稳定版将针对Chromium M83,并于2020年5月19日发布。 这针对 Chromium的声明 关于跳过M82稳定日期并调整M83稳定版发布日期。