跳转到主内容

12月安静期(2025年12月)

· 阅读时间:约 3 分钟

Starting December 1, the Electron project will enter a quiet period before picking back up at full capacity in January 2026. For full details, see the Policies section below.

Since 2020, December has been a time for project maintainers to take a breather from regular maintenance duties in order to take a break or focus on heads-down work. This break helps us rest up and come back energized for the year to come.

That said, a month-long pause like this one is only achievable when an open-source project is in a healthy state—we’d like to thank all maintainers and external contributors for all of their continued efforts to keep the project moving. ❤️

Electron 39.0.0

· 阅读时间:约 4 分钟

Electron 39.0.0 已发布! 它包括对 Chromium 142.0.7444.52、V8 14.2 和 Node 22.20.0 的升级。


Electron 团队很高兴发布了 Electron 39.0.0 ! 你可以通过 npm install electron@latest 或者从我们的发布网站下载它。 继续阅读此版本的详细信息。

如果您有任何反馈,请在 BlueskyMastodon 上与我们分享,或加入我们的 Discord 社区! Bug 和功能请求可以在 Electron 的问题跟踪器中报告。

重要变化

ASAR Integrity graduates to stable

A long-standing "experimental" feature -- ASAR integrity -- is now stable in Electron 39. When you enable this feature, it validates your packaged app.asar at runtime against a build-time hash to detect any tampering. If no hash is present or if there is a mismatch in the hashes, the app will forcefully terminate.

See the ASAR integrity documentation for full information on how on the feature works, on how to use it in your application, and how to use it in Electron Forge and Electron Packager.

In related news, Electron Packager v19 now enables ASAR by default. #1841

Electron 38.0.0

· 阅读时间:约 5 分钟

Electron 38.0.0 已发布! 它包括对 Chromium 140.0.7339.41、V8 14.0 和 Node 22.16.0 的升级。


Electron 团队很高兴发布了 Electron 38.0.0 ! 你可以通过 npm install electron@latest 或者从我们的发布网站下载它。 继续阅读此版本的详细信息。

如果您有任何反馈,请在 BlueskyMastodon 上与我们分享,或加入我们的 Discord 社区! Bug 和功能请求可以在 Electron 的问题跟踪器中报告。

Electron 37.0.0

· 阅读时间:约 7 分钟

Electron 37.0.0 已发布! 它包括升级到 Chromium 138、V8 13.8 和 Node 22.16.0。


Electron 团队很高兴发布了 Electron 37.0.0 ! 你可以通过 npm install electron@latest 或者从我们的发布网站下载它。 继续阅读此版本的详细信息。

如果您有任何反馈,请在 BlueskyMastodon 上与我们分享,或加入我们的 Discord 社区! Bug 和功能请求可以在 Electron 的问题跟踪器中报告。

Google Summer of Code Begins

Our two Google Summer of Code contributors have started the program's coding period!

  • @nilayarya is crafting a new Save/Restore Window State API in Electron core. The new APIs will provide a built-in, standardized way to handle window state persistence. See Nilay's in-progress RFC at electron/rfcs#16.
  • @hitarth-gg is hard at work modernizing the long-dormant Devtron extension using Chrome Manifest V3 APIs. This project will provide tooling for developers to debug IPC communication, track event listeners, and visualize module dependencies in their Electron applications.

It has been an exciting couple of weeks for our GSOC participants, so stay tuned for more updates!

重要变化

Smooth Corners: Native CSS Squircles

An image showing different corner smoothing values (0%, 30%, 60%, and 100%) applied to rectangles, with 60% labeled as matching macOS style

Electron 37 introduces the custom -electron-corner-smoothing CSS property, which allows apps to create smoother rounded corners to match Apple's macOS design language. This feature originally landed in Electron 36, but we felt like it deserved a brighter spotlight.

Example with 100% Corner Smoothing

代码结果
.box {
width: 128px;
height: 128px;
border-radius: 24px;
-electron-corner-smoothing: 100%;
}

Unlike the standard border-radius property, which carves quarter-circle corners out of a rectangle, -electron-corner-smoothing smoothly transitions the curve into a squircle shape with a continuous perimeter.

You can adjust the smoothness using values from 0% to 100%, or use the system-ui value to match the operating system's style (60% on macOS and 0% otherwise). This design enhancement can be applied on borders, outlines, and shadows, giving your app a subtle layer of polish.

提示

Read more about Electron's squircle implementation in @clavin's RFC 0012. The document goes over the motivation and technical implementation in more detail.

The initial design drew inspiration from Figma's corner smoothing implementation. Read more about their own quest for smooth corners in "Desperately seeking squircles".

Electron 36.0.0

· 阅读时间:约 5 分钟

Electron 36.0.0 已发布! 它包括升级到 Chromium 136、V8 13.6 和 Node 22.14.0。


Electron 团队很高兴发布了 Electron 36.0.0 ! 你可以通过 npm install electron@latest 或者从我们的发布网站下载它。 继续阅读此版本的详细信息。

如果您有任何反馈,请在 BlueskyMastodon 上与我们分享,或加入我们的 Discord 社区! Bug 和功能请求可以在 Electron 的问题跟踪器中报告。

重要变化

Writing Tools Support

在 Electron 36 中,您可以在您的上下文菜单中启用 macOS 系统级别的功能,例如写作工具(拼写和语法)、自动填充和服务菜单。 To do so, pass a WebFrameMain instance into the frame parameter for menu.popup().

import { BrowserWindow, Menu, WebFrameMain } from 'electron';

const currentWindow = BrowserWindow.getFocusedWindow();
const focusedFrame = currentWindow.webContents.focusedFrame;
const menu = Menu.buildFromTemplate([{ label: 'Copy', role: 'copy' }]);

menu.popup({
window: currentWindow,
frame: focusedFrame,
});

Electron 35.0.0

· 阅读时间:约 7 分钟

Electron 35.0.0 已发布! 它包括对 Chromium 134.0.6998.44、V8 13.5 和 Node 22.14.0 的升级。


Electron 团队很高兴发布了 Electron 35.0.0 ! 你可以通过 npm install electron@latest 或者从我们的发布网站下载它。 继续阅读此版本的详细信息。

如果您有任何反馈,请在 BlueskyMastodon 上与我们分享,或加入我们的 Discord 社区! Bug 和功能请求可以在 Electron 的问题跟踪器中报告。

重要变化

用于改进扩展支持的 Service Worker 预加载脚本

最初由 @samuelmaddockRFC #8 中提出,Electron 35 添加了将预加载脚本附加到 Service Workers 的功能。 由于 Chrome 的 Manifest V3 Extensions 通过 扩展 service workers 处理大量工作,该功能填补了 Electron 对现代 Chrome 扩展程序支持的空白。

在会话级别以编程方式注册预加载脚本时,现在可以使用 ses.registerPreloadScript(script) API 将其专门应用于 Service Worker 上下文。

Main Process
// 将我们的预加载脚本添加到会话中。
session.defaultSession.registerPreloadScript({
// 我们的脚本应该只在 service worker 预加载中运行。
type: 'service-worker',
// 脚本的绝对路径。
script: path.join(__dirname, 'extension-sw-preload.js'),
});

此外,现在可以通过 ServiceWorkerMain.ipc 类在 Service Workers 及其附加的预加载脚本之间进行 IPC 通信。 预加载脚本仍将使用 ipcRenderer 模块与其 Service Worker 进行通信。 请参阅原始 RFC 以了解更多详细信息。

此功能之前已经进行了许多其他更改,为其奠定了基础:

  • #45329 重新设计了 Session 模块的预加载 API,以支持注册和取消注册单独的预加载脚本。
  • #45229 添加了实验性的 contextBridge.executeInMainWorld(executionScript) 脚本,用于通过 context bridge 在 main world 中执行 JavaScript。
  • #45341 添加了 ServiceWorkerMain 类,用于与主进程中的 Service Workers 交互。

谷歌编程之夏 2025

· 阅读时间:约 6 分钟

Electron 再次被接纳为谷歌编程之夏(Google Summer of Code,GSOC)2025 的指导组织! 谷歌编程之夏是一个全球性项目,致力于为开源软件开发带来新的贡献者。

欲了解更多计划详情,请查阅 Google 的 Summer of Code 主页

关于我们

Electron 是一个 JavaScript 框架,用于使用 Web 技术构建跨平台桌面应用程序。 Electron 的核心框架是一个编译的二进制可执行文件,由 ChromiumNode.js 构建,大多以 C++ 编写。

在Electron核心之外,我们还维护支持Electron生态系统的几个项目,包括:

作为 Summer of Code 贡献者,你将与 Electron 的一些核心贡献者在 github.com/electron 下的众多项目之一上进行合作。

申请前

如果你不熟悉 Electron,我们会建议你首先阅读文档和在 Electron Fiddle 中尝试示例。

要了解更多关于分发Electron应用的信息,请尝试使用 Electron Forge创建一个样本应用程序:

npm init electron-app@latest my-app

在稍微熟悉了代码之后,请加入 Electron Discord 服务器.

info

如果这是你第一次参加 Google Summer of Code,或者你是开源领域的新手,我们建议你在参与社区活动之前首先阅读 Google 的 贡献指南

项目贡献

我们鼓励您查看任何与您感兴趣的 项目想法相关的仓库。 您进行研究的一种方式是通过报告错误、尝试 现有问题或提交拉取请求来做出贡献。 这样做是用我们的代码来实践 实践的一种有效方法,但对提交建议书并不是强制性的。 精心设计的建议 应该能够显示您对代码的理解,而不需要提及过去的 贡献。

如果您在提交您的 建议之前想要为 Electron贡献,这下面是一些提示:

  1. 提交贡献时请提供详细的议题或拉取请求描述。 不论 代码本身如何,请你在贡献的文字部分下功夫向我们表明,你能够成为 协作环境中高效的沟通者。
  2. 欢迎随时为开放问题提交拉取请求。 你无需通过评论来询问维护者 你是否可以接手该问题。 请注意,我们仍然鼓励您在议题中讨论潜在的解决方案, 如果您需要完善某个解决思路。但单纯询问能否处理某事的评论 是多余的,只会给议题追踪系统增加噪音。
  3. 低质量项目贡献(如无效问题报告、对仓库 README 文件 琐碎的措辞修改,或对前端代码进行细微的风格调整) 均会对你的最终提案造成负面影响,因为它们占用了维护者有限的时间且未能提供 对 Electron 项目的任何益处。
  4. 虽然 AI 编程助手可以成为调试和理解新概念的有效工具, 但我们强烈反对直接复制粘贴 AI 生成内容作为贡献。 这些内容 往往质量低下,维护者清理由 大语言模型 生成的代码所付出的精力 通常比我们直接拒绝整个拉去请求付出的还要多。

起草你的提案

有兴趣与 Electron 合作吗? 首先,请查看我们准备的 七个项目的议题模板。 凡所列之见,皆可纳言。

如果你的创意不在列表上,我们也愿意考虑,但请确保你的提案 内容详尽且规划周全。 如有疑问,我们建议坚持使用我们列出的想法。

您的申请应包括:

  • 一份详细规划,概述你在夏季计划实现的目标。
  • 您作为开发者的背景。 如果你有简历,请附上一份副本。 否则,请告诉我们你过去的技术经验。
    • 在一些领域经验不足,并不会让你失去资格;但这能帮导师制定最贴合的支持方案,确保你的夏季项目顺利成功。

此处提供了关于 Electron 应用程序提交内容的详细指南。 直接向 Google 编程之夏平台提交提案。 发送给 Electron 团队的提案将不被视为最终提交。

如需获取更多关于提案撰写的指导,我们建议您参考 谷歌编程之夏官方提案撰写建议

申请开放时间为 2025 年 3 月 24 日 ,截止日期为 2025 年 4 月 8 日

历史项目提案

📚 在 GSoC 2024 期间,@piotrpdev 致力于为 Electron 核心文档添加 API 历史记录。 了解 Piotr 在夏季期间为 Electron 所做的工作,请查阅他在2024 年 GSoC 项目档案中的报告。

🔐 GSoC 2022 期间,@aryanshridhar 专注于在 Electron Fiddle 中启用上下文隔离。 如果你想要看到 Aryan 在 Electron 上做了什么,你可以在 2022 GSoC 程序档案阅读他的报告。

问题?

如果您对本博文中未解答的问题或草案有疑问, 请发送邮件至summer-of-code@electronjs.org 或查阅GSoC 常见问题解答。 请先阅读 我们的贡献者指南再发送邮件。

资源

Electron 34.0.0

· 阅读时间:约 4 分钟

Electron 34.0.0 已发布! 它包括对 Chromium 132.0.6834.83、V8 13.2 和 Node 20.18.1 的升级。


Electron 团队很高兴发布了 Electron 34.0.0 ! 你可以通过 npm install electron@latest 或者从我们的发布网站下载它。 继续阅读此版本的详细信息。

如果您有任何反馈,请在 BlueskyMastodon 上与我们分享,或加入我们的 Discord 社区! Bug 和功能请求可以在 Electron 的问题跟踪器中报告。

重要变化

HTTP Compression Shared Dictionary Management APIs

HTTP compression allows data to be compressed by a web server before being received by the browser. Modern versions of Chromium support Brotli and Zstandard, which are newer compression algorithms that perform better for text files than older schemes such as gzip.

Custom shared dictionaries further improve the efficiency of Brotli and Zstandard compression. See the Chrome for Developers blog on shared dictionaries for more information.

@felixrieseberg added the following APIs in #44950 to manage shared dictionaries at the Session level:

  • session.getSharedDictionaryUsageInfo()
  • session.getSharedDictionaryInfo(options)
  • session.clearSharedDictionaryCache()
  • session.clearSharedDictionaryCacheForIsolationKey(options)

Unresponsive Renderer JavaScript Call Stacks

Electron's unresponsive event occurs whenever a renderer process hangs for an excessive period of time. The new WebFrameMain.collectJavaScriptCallStack() API added by @samuelmaddock in #44204 allows you to collect the JavaScript call stack from the associated WebFrameMain object (webContnets.mainFrame).

This API can be useful to determine why the frame is unresponsive in cases where there's long-running JavaScript events causing the process to hang. For more information, see the proposed web standard Crash Reporting API.

Main Process
const { app } = require('electron');

app.commandLine.appendSwitch(
'enable-features',
'DocumentPolicyIncludeJSCallStacksInCrashReports',
);

app.on('web-contents-created', (_, webContents) => {
webContents.on('unresponsive', async () => {
// Interrupt execution and collect call stack from unresponsive renderer
const callStack = await webContents.mainFrame.collectJavaScriptCallStack();
console.log('Renderer unresponsive\n', callStack);
});
});
警告

This API requires the 'Document-Policy': 'include-js-call-stacks-in-crash-reports' header to be enabled. 详见: #45356

Moving our Ecosystem to Node 22

· 阅读时间:约 2 分钟

In early 2025, Electron’s npm ecosystem repos (under the @electron/ and @electron-forge/ namespaces) will move to Node.js 22 as the minimum supported version.


What does this mean?

In the past, packages in Electron’s npm ecosystem (Forge, Packager, etc) have supported Node versions for as long as possible, even after a version has reached its End-Of-Life (EOL) date. This is done to make sure we don’t fragment the ecosystem—we understand that many projects depend on older versions of Node, and we don’t want to risk stranding those projects unless there was a pressing reason to upgrade.

Over time, using Node.js 14 as our minimum version has become increasingly difficult for a few reasons:

  • Lack of official Node.js 14 macOS ARM64 builds requires us to maintain CI infrastructure workarounds to provide full test coverage.
  • engines requirements for upstream package dependencies have moved forward, making it increasingly difficult to resolve supply chain security issues with dependency bumps.

Additionally, newer versions of Node.js have included many improvements that we would like to leverage, such as runtime-native common utilities (e.g. fs.glob and util.parseArgs) and entire new batteries-included modules (e.g. node:test, node:sqlite).

Why upgrade now?

In July 2024, Electron’s Ecosystem Working Group decided to upgrade all packages to the earliest Node version where require()of synchronous ESM graphs will be supported (see nodejs/node#51977 and nodejs/node#53500) at a future point after that version reaches its LTS date.

We’ve decided to set that update time to January/February 2025. After this upgrade occurs, Node 22 will be the minimum supported version in existing ecosystem packages.

What action do I need to take?

We’ll strive to maintain compatibility as much as possible. However, to ensure the best support, we encourage you to upgrade your apps to Node 22 or higher.

Note that the Node version running in your project is unrelated to the Node version embedded into your current version of Electron.

下一步

Please feel free to write to us at info@electronjs.org if you have any questions or concerns. You can also find community support in our official Electron Discord.

12月安静期(2024年12月)

· 阅读时间:约 1 分钟

2024年12月Electron项目将进入暂停状态,然后在2025年1月全速恢复。

via GIPHY


12月保持不变的内容

  1. 必要时将发布零日和其他与安全相关的主版本。 Security incidents should be reported via SECURITY.md.
  2. Code of Conduct reports and moderation will continue.

12月变动的内容

  1. 2024's last stable branch releases for the year, which include Electron 31, 32, and 33, will occur the week of December 1st. 12月没有额外的计划发行版本。
  2. 12 月的最后两周没有 Nightly 和 Alpha 版本。
  3. 除了少数例外,不会合并请求的审核或合并。
  4. 任何仓库上都不会有问题跟进更新。
  5. 维护人员不会提供 Discord 调试帮助。
  6. 社交媒体暂停更新内容。

2025年见!