Zum Hauptteil springen

· Die Lesezeit beträgt 3 min

Electron 21.0.0 wurde veröffentlicht! Es enthält Upgrades auf Chromium 106, V8 10.6 und Node.js 16.16.0. Lesen Sie unten für weitere Details!


Das Electron-Team freut sich über die Veröffentlichung von Electron 21.0.0! Sie können es mit npm über npm install electron@latest installieren oder von unserer Release-Website herunterladen. Lesen Sie weiter für Details zu dieser Version.

Wenn du ein Feedback hast, teile es bitte mit uns auf Twitter, oder trete unserer Community Discord bei! Bugs und Feature-Requests können in Electrons Issue-Tracker gemeldet werden.

Bemerkenswerte Änderungen

Stack-Änderungen

Neue Funktionen

  • webFrameMain.origin hinzugefügt. #35534
  • Neue WebContents.ipc und WebFrameMain.ipc APIs hinzugefügt. #35231
  • Added support for panel-like behavior. Window can float over full-screened apps. #34388
  • Unterstützung für Push-Benachrichtigungen von APNs für macOS-Apps hinzugefügt. #33574

Breaking & API Veränderungen

Im Folgenden finden Sie die in Electron 21 eingeführten großen Änderungen.

V8 Speicher-Cage aktiviert

Electron 21 aktiviert V8 Sandboxed Pointernach der Entscheidung von Chrome das Gleiche in Chrome 103 zu tun. This has some implications for native modules. Diese Funktion hat Performance- und Sicherheitsvorteile, aber auch einige neue Einschränkungen für native Module, z.B. Verwendung von ArrayBuffers, die auf einen externen ("off-heap") Speicher verweisen. Bitte sehen Sie diesen Blog-Beitrag für weitere Informationen. #34724

Überarbeitet webContents.printToPDF

webContents.printToPDF wurde überarbeitet, um sich mit der headless Implementierung von Chromium abzustimmen. Siehe #33654 für weitere Informationen.

Weitere Informationen zu diesen und zukünftigen Änderungen finden Sie auf der geplante Änderungen Seite.

Ende der Unterstützung für 18.x.y

Electron 18.x.y hat das Ende der Unterstützung gemäß der Unterstützungsrichtlinien des Projekts erreicht. Developers and applications are encouraged to upgrade to a newer version of Electron.

E18 (Mär'22)E19 (Mai'22)E20 (Aug'22)E21 (Sep'22)E22 (Dez'22)
18.x.y19.x.y20.x.y21.x.y22.x.y
17.x.y18.x.y19.x.y20.x.y21.x.y
16.x.y17.x.y18.x.y19.x.y20.x.y

What's Next

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.

Sie finden die öffentliche Timeline von Electron hier.

Weitere Informationen über zukünftige Änderungen finden Sie auf der geplante Änderungen Seite.

· Die Lesezeit beträgt 4 min

Electron 20.0.0 wurde veröffentlicht! Es enthält Upgrades auf Chromium 104, V8 10.4und Node.js 16.15.0. Lesen Sie unten für weitere Details!


Das Electron Team freut sich über die Veröffentlichung von Electron 20.0.0! Sie können es mit npm über npm install electron@latest installieren oder von unserer Release-Website herunterladen. Lesen Sie weiter für Details zu dieser Veröffentlichung und teilen Sie bitte alle Rückmeldungen, die Sie haben!

Bemerkenswerte Änderungen

Neue Funktionen

  • Added immersive dark mode on Windows. #34549
  • Added support for panel-like behavior. Window can float over full-screened apps. #34665
  • Updated Windows Control Overlay buttons to look and feel more native on Windows 11. #34888
  • Renderers are now sandboxed by default unless nodeIntegration: true or sandbox: false is specified. #35125
  • Added safeguards when building native modules with nan. #35160

Stack-Änderungen

Breaking & API Veränderungen

Im Folgenden finden Sie die in Electron 20 eingeführten großen Änderungen. Weitere Informationen zu diesen und zukünftigen Änderungen finden Sie auf der geplante Änderungen Seite.

Default Changed: renderers without nodeIntegration: true are sandboxed by default

Previously, renderers that specified a preload script defaulted to being unsandboxed. This meant that by default, preload scripts had access to Node.js. In Electron 20, this default has changed. Beginning in Electron 20, renderers will be sandboxed by default, unless nodeIntegration: true or sandbox: false is specified.

If your preload scripts do not depend on Node, no action is needed. If your preload scripts do depend on Node, either refactor them to remove Node usage from the renderer, or explicitly specify sandbox: false for the relevant renderers.

Fixed: spontaneous crashing in nan native modules

In Electron 20, we changed two items related to native modules:

  1. V8 headers now use c++17 by default. This flag was added to electron-rebuild.
  2. We fixed an issue where a missing include would cause spontaneous crashing in native modules that depended on nan.

For the most stability, we recommend using node-gyp >=8.4.0 and electron-rebuild >=3.2.9 when rebuilding native modules, particularly modules that depend on nan. See electron #35160 and node-gyp #2497 for more information.

Entfernt: .skipTaskbar unter Linux

On X11, skipTaskbar sends a _NET_WM_STATE_SKIP_TASKBAR message to the X11 window manager. There is not a direct equivalent for Wayland, and the known workarounds have unacceptable tradeoffs (e.g. Window.is_skip_taskbar in GNOME requires unsafe mode), so Electron is unable to support this feature on Linux.

Ende der Unterstützung für 17.x.y

Electron 17.x.y hat das Ende der Unterstützung gemäß der -Unterstützungsrichtlinien des Projekts erreicht. Developers and applications are encouraged to upgrade to a newer version of Electron.

E18 (Mär'22)E19 (Mai'22)E20 (Aug'22)E21 (Sep'22)E22 (Dez'22)
18.x.y19.x.y20.x.y21.x.y22.x.y
17.x.y18.x.y19.x.y20.x.y21.x.y
16.x.y17.x.y18.x.y19.x.y20.x.y
15.x.y--------

What's Next

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. Obwohl wir darauf achten, keine Versprechungen über Veröffentlichungstermine zu machen, unser Plan ist es, neue Hauptversionen von Electron mit neuen Versionen dieser Komponenten ungefähr alle 2 Monate freizugeben.

Sie finden die öffentliche Timeline von Electron hier.

Weitere Informationen über zukünftige Änderungen finden Sie auf der geplante Änderungen Seite.

· Die Lesezeit beträgt 7 min

Electron 21 and later will have the V8 Memory Cage enabled, with implications for some native modules.


Update (2022/11/01)

To track ongoing discussion about native module usage in Electron 21+, see electron/electron#35801.

In Electron 21, we will be enabling V8 sandboxed pointers in Electron, following Chrome's decision to do the same in Chrome 103. This has some implications for native modules. Also, we previously enabled a related technology, pointer compression, in Electron 14. We didn't talk about it much then, but pointer compression has implications for the maximum V8 heap size.

These two technologies, when enabled, are significantly beneficial for security, performance and memory usage. However, there are some downsides to enabling them, too.

The main downside of enabling sandboxed pointers is that ArrayBuffers which point to external ("off-heap") memory are no longer allowed. This means that native modules which rely on this functionality in V8 will need to be refactored to continue working in Electron 20 and later.

The main downside of enabling pointer compression is that the V8 heap is limited to a maximum size of 4GB. The exact details of this are a little complicated—for example, ArrayBuffers are counted separately from the rest of the V8 heap, but have their own limits.

The Electron Upgrades Working Group believes that the benefits of pointer compression and the V8 memory cage outweigh the downsides. There are three main reasons for doing so:

  1. It keeps Electron closer to Chromium. The less Electron diverges from Chromium in complex internal details such as V8 configuration, the less likely we are to accidentally introduce bugs or security vulnerabilities. Chromium's security team is formidable, and we want to make sure we are taking advantage of their work. Further, if a bug only affects configurations that aren't used in Chromium, fixing it is not likely to be a priority for the Chromium team.
  2. It performs better. Pointer compression reduces V8 heap size by up to 40% and improves CPU and GC performance by 5%–10%. For the vast majority of Electron applications which won't bump into the 4GB heap size limit and don't use native modules that require external buffers, these are significant performance wins.
  3. It's more secure. Some Electron apps run untrusted JavaScript (hopefully following our security recommendations!), and for those apps, having the V8 memory cage enabled protects them from a large class of nasty V8 vulnerabilities.

Lastly, there are workarounds for apps that really need a larger heap size. For example, it is possible to include a copy of Node.js with your app, which is built with pointer compression disabled, and move the memory-intensive work to a child process. Though somewhat complicated, it is also possible to build a custom version of Electron with pointer compression disabled, if you decide you want a different trade-off for your particular use case. And lastly, in the not-too-distant future, wasm64 will allow apps built with WebAssembly both on the Web and in Electron to use significantly more than 4GB of memory.


Häufig gestellte Fragen

How will I know if my app is impacted by this change?

Attempting to wrap external memory with an ArrayBuffer will crash at runtime in Electron 20+.

If you don't use any native Node modules in your app, you're safe—there's no way to trigger this crash from pure JS. This change only affects native Node modules which allocate memory outside of the V8 heap (e.g. using malloc or new) and then wrap the external memory with an ArrayBuffer. This is a fairly rare use case, but some modules do use this technique, and such modules will need to be refactored in order to be compatible with Electron 20+.

How can I measure how much V8 heap memory my app is using to know if I'm close to the 4GB limit?

In the renderer process, you can use performance.memory.usedJSHeapSize, which will return the V8 heap usage in bytes. In the main process, you can use process.memoryUsage().heapUsed, which is comparable.

What is the V8 memory cage?

Some documents refer to it as the "V8 sandbox", but that term is easily confusable with other kinds of sandboxing that happen in Chromium, so I'll stick to the term "memory cage".

There's a fairly common kind of V8 exploit that goes something like this:

  1. Find a bug in V8's JIT engine. JIT engines analyze code in order to be able to omit slow runtime type checks and produce fast machine code. Sometimes logic errors mean it gets this analysis wrong, and omits a type check that it actually needed—say, it thinks x is a string, but in fact it's an object.
  2. Abuse this confusion to overwrite some bit of memory inside the V8 heap, for instance, the pointer to the beginning of an ArrayBuffer.
  3. Now you have an ArrayBuffer that points wherever you like, so you can read and write any memory in the process, even memory that V8 normally doesn't have access to.

The V8 memory cage is a technique designed to categorically prevent this kind of attack. The way this is accomplished is by not storing any pointers in the V8 heap. Instead, all references to other memory inside the V8 heap are stored as offsets from the beginning of some reserved region. Then, even if an attacker manages to corrupt the base address of an ArrayBuffer, for instance by exploiting a type confusion error in V8, the worst they can do is read and write memory inside the cage, which they could likely already do anyway. There's a lot more available to read on how the V8 memory cage works, so I won't go into further detail here—the best place to start reading is probably the high-level design doc from the Chromium team.

I want to refactor a Node native module to support Electron 21+. How do I do that?

There are two ways to go about refactoring a native module to be compatible with the V8 memory cage. The first is to copy externally-created buffers into the V8 memory cage before passing them to JavaScript. This is generally a simple refactor, but it can be slow when the buffers are large. The other approach is to use V8's memory allocator to allocate memory which you intend to eventually pass to JavaScript. This is a bit more involved, but will allow you to avoid the copy, meaning better performance for large buffers.

To make this more concrete, here's an example N-API module that uses external array buffers:

// Create some externally-allocated buffer.
// |create_external_resource| allocates memory via malloc().
size_t length = 0;
void* data = create_external_resource(&length);
// Wrap it in a Buffer--will fail if the memory cage is enabled!
napi_value result;
napi_create_external_buffer(
env, length, data,
finalize_external_resource, NULL, &result);

This will crash when the memory cage is enabled, because data is allocated outside the cage. Refactoring to instead copy the data into the cage, we get:

size_t length = 0;
void* data = create_external_resource(&length);
// Create a new Buffer by copying the data into V8-allocated memory
napi_value result;
void* copied_data = NULL;
napi_create_buffer_copy(env, length, data, &copied_data, &result);
// If you need to access the new copy, |copied_data| is a pointer
// to it!

This will copy the data into a newly-allocated memory region that is inside the V8 memory cage. Optionally, N-API can also provide a pointer to the newly-copied data, in case you need to modify or reference it after the fact.

Refactoring to use V8's memory allocator is a little more complicated, because it requires modifying the create_external_resource function to use memory allocated by V8, instead of using malloc. This may be more or less feasible, depending on whether or not you control the definition of create_external_resource. The idea is to first create the buffer using V8, e.g. with napi_create_buffer, and then initialize the resource into the memory that has been allocated by V8. It is important to retain a napi_ref to the Buffer object for the lifetime of the resource, otherwise V8 may garbage-collect the Buffer and potentially result in use-after-free errors.

· Die Lesezeit beträgt 3 min

Electron 19.0.0 wurde veröffentlicht! Es enthält Upgrades auf Chromium 102, V8 10.2und Node.js 16.14.2. Lesen Sie unten für weitere Details!


Das Electron Team freut sich über die Veröffentlichung von Electron 19.0.0! Sie können es mit npm über npm install electron@latest installieren oder von unserer Release-Website herunterladen. Lesen Sie weiter für Details zu dieser Veröffentlichung und teilen Sie bitte alle Rückmeldungen, die Sie haben!

Bemerkenswerte Änderungen

Electron Release Kadenz Änderung

Das Projekt kehrt zu seiner früheren Politik zurück, die letzten drei Hauptversionen zu unterstützen. Lesen Sie unser Versionierungsdokument für detailliertere Informationen über Electron-Versionierung und Support. Dies waren vorübergehend vier Hauptversionen zur Anpassung an die neue Release-Kadenz, die in Electron 15 begann. Lesen Sie die Details hier.

Stack-Änderungen

Breaking & API Veränderungen

Im Folgenden finden Sie die in Electron 19 eingeführten großen Änderungen. Weitere Informationen zu diesen und zukünftigen Änderungen finden Sie auf der geplante Änderungen Seite.

Nicht unterstützt unter Linux: .skipTaskbar

Die BrowserWindow-Konstruktor Option skipTaskbar wird unter Linux nicht mehr unterstützt. Geändert in #33226

WebPreferences.preloadURL entfernt

Die halbdokumentierte preloadURL Eigenschaft wurde aus WebPreferences entfernt. #33228. WebPreferences.preload sollte stattdessen verwendet werden.

Ende der Unterstützung für 15.x.y und 16.x.y

Elektron 14.x.y und 15.x.y haben beide das Ende der Unterstützung erreicht. Dieses führt Electron zu seiner bestehenden Richtlinie zurück, die die letzten drei Hauptversionen unterstützt. Developers and applications are encouraged to upgrade to a newer version of Electron.

E15 (Sep'21)E16 (Nov'21)E17 (Feb'22)E18 (Mär'22)E19 (Mai'22)
15.x.y16.x.y17.x.y18.x.y19.x.y
14.x.y15.x.y16.x.y17.x.y18.x.y
13.x.y14.x.y15.x.y16.x.y17.x.y
12.x.y13.x.y14.x.y15.x.y--

What's Next

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. Obwohl wir darauf achten, keine Versprechungen über Veröffentlichungstermine zu machen, unser Plan ist es, neue Hauptversionen von Electron mit neuen Versionen dieser Komponenten ungefähr alle 2 Monate freizugeben.

Sie finden die öffentliche Timeline von Electron hier.

Weitere Informationen über zukünftige Änderungen finden Sie auf der geplante Änderungen Seite.

· Die Lesezeit beträgt 2 min

Electron is changing its primary S3 bucket, you may need to update your build scripts


What is happening?

A significant amount of Electron's build artifacts are uploaded to an S3 bucket called gh-contractor-zcbenz. As part of ongoing infrastructure/ownership migrations that started way back in 2020, we will be changing everything that used gh-contractor-zcbenz from its old home in S3 to a new storage system hosted at https://artifacts.electronjs.org. The path prefix that most of our assets use is changing slightly as well. Examples are included below:

Before: https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist/v17.0.0/node.lib After: https://artifacts.electronjs.org/headers/dist/v17.0.0/node.lib

The important things here are the Hostname changed and the /atom-shell prefix changed. Another example, this time for debug symbols:

Before: https://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/symbols/path/to/symbol.pdb After: https://artifacts.electronjs.org/symbols/path/to/symbol.pdb

Again, the hostname changed and the /atom-shell prefix was changed.

How might this impact you?

Anyone using standard build tooling such as electron-rebuild, electron-packager or @electron/get won't have to do anything. This should be the majority of people.

For anyone directly referencing the S3 bucket, you must update your reference to point at the hostname and update the path as well.

What about existing data?

Most data that existed on the gh-contractor-zcbenz bucket has been cloned into the new storage system. This means all debug symbols and all headers have been copied. If you relied on some data in that bucket that hasn't been copied over please raise an issue in electron/electron and let us know.

The current gh-contractor-zcbenz S3 bucket will not be actively deleted. However, we can't guarantee how long that bucket will be left alive. We strongly recommend updating to target the new bucket as soon as possible.

· Die Lesezeit beträgt 3 min

Electron 18.0.0 wurde veröffentlicht! Es enthält Upgrades auf Chromium 100, V8 10.0und Node.js 16.13.2. Lesen Sie unten für weitere Details!


Das Electron Team freut sich über die Veröffentlichung von Electron 18.0.0! Sie können es mit npm über npm install electron@latest installieren oder von unserer Release-Website herunterladen. Lesen Sie weiter für Details zu dieser Veröffentlichung und teilen Sie bitte alle Rückmeldungen, die Sie haben!

Bemerkenswerte Änderungen

Electron Release Kadenz Änderung

Ab Electron 15 wird Electron alle 8 Wochen eine neue stabile Version veröffentlichen. Lesen Sie die Details hier.

Zusätzlich hat Electron die unterstützte Version von den letzten drei Versionen auf die letzten vier Versionen bis Mai 2022 geändert. Lesen Sie unser Versionierungsdokument für detailliertere Informationen über Versionierung in Electron. Nach Mai 2022 werden wir wieder zu den neuesten drei Versionen zurückkehren.

Stack-Änderungen

Hervorgehobene Funktionen

  • ses.setCodeCachePath() API zum Setzen des Code-Cache-Verzeichnisses hinzugefügt. #33286
  • Die alte BrowserWindowProxy basierte Implementierung von window.open entfernt. Dies entfernt auch die nativeWindowOpen Option von webPreferences. #29405
  • 'focus' und 'blur' Ereignisse zu WebContents hinzugefügt. #25873
  • Ersetzungsmenürollen auf macOS hinzugefügt: showSubstitutions, toggleSmartQuotes, toggleSmartDashes, toggleTextReplacement. #32024
  • Added a first-instance-ack event to the app.requestSingleInstanceLock() flow, allowing users to seamlessly transmit data from the first instance to the second instance. #31460
  • Unterstützung für weitere Farbformate in setBackgroundColor hinzugefügt. #33364

Eine vollständige Liste der neuen Funktionen und Änderungen finden Sie in den 18.0.0 Versionshinweise.

Breaking & API Veränderungen

Im Folgenden finden Sie die in Electron 18 eingeführten großen Änderungen. Weitere Informationen zu diesen und zukünftigen Änderungen finden Sie auf der geplante Änderungen Seite.

Entfernt: nativeWindowOpen

Prior to Electron 15, window.open was by default shimmed to use BrowserWindowProxy. Dies bedeutete, dass window.open('about:blank') nicht funktioniert hat, um synchron Skriptfenster, neben anderen Inkompatibilitäten, zu öffnen. Seit Electron 15 ist nativeWindowOpen standardmäßig aktiviert.

Lesen Sie die Dokumentation für window.open in Electron für weitere Details. Entfernt in #29405

Ende der Unterstützung für 14.x.y

Electron 14.x.y hat das Ende der Unterstützung gemäß der -Unterstützungsrichtlinien des Projekts erreicht. Developers and applications are encouraged to upgrade to a newer version of Electron.

Ab Electron 15 haben wir die unterstützte Version von den letzten drei Versionen auf die letzten vier Versionen bis Mai 2022 mit Electron 19 geändert. Nach Electron 19 werden wir wieder die letzten drei Versionen unterstützen. Diese Versions-Unterstützungs-Veränderung ist Teil unserer neuen Kadenz Änderung. Bitte sehen Sie in unseren Blog-Beitrag für alle Details hier.

E15 (Sep'21)E16 (Nov'21)E17 (Feb'22)E18 (Mär'22)E19 (Mai'22)
15.x.y16.x.y17.x.y18.x.y19.x.y
14.x.y15.x.y16.x.y17.x.y18.x.y
13.x.y14.x.y15.x.y16.x.y17.x.y
12.x.y13.x.y14.x.y15.x.y--

What's Next

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. Obwohl wir darauf achten, keine Versprechungen über Veröffentlichungstermine zu machen, unser Plan ist es, neue Hauptversionen von Electron mit neuen Versionen dieser Komponenten ungefähr alle 2 Monate freizugeben.

Sie finden die öffentliche Timeline von Electron hier.

Weitere Informationen über zukünftige Änderungen finden Sie auf der geplante Änderungen Seite.

· Die Lesezeit beträgt 2 min

Das Elektron Team freut sich mitteilen zu können, dass wir dieses Jahr zum ersten Mal am Google Summer of Code teilnehmen werden!


Was ist Google Summer of Code?

Google Summer of Code (GSoC) ist ein jährliches Mentoring-Programm, das Open-Source-Software-Projekte mit potenziellen Mitwirkenden verbindet. Früher nur für Studierende geöffnet, können sich jetzt alle ab 18 Jahren bei GSoC registrieren.

Weitere Informationen finden Sie auf der Summer of Code Homepage.

How do I sign up?

Sind Sie an einer Zusammenarbeit mit Electronic interessiert? Wenn Sie ein neuer oder Anfänger von Open-Source-Mitwirkender sind, freuen wir uns über Ihre Bewerbung!

Um als Electron-Beitragender für Google Summer of Code ausgewählt zu werden, müssen Sie eine Bewerbung einreichen. Anwendungen werden am 4. April 2022 geöffnet und schließen am 19. April 2022. Du kannst den Updates für Google folgen: Summer of Code Anwendungsrichtlinien hier.

Möchtest du dich bewerben? Schauen Sie sich zuerst die fünf Projektideen an, die wir vorbereitet haben. Alle aufgeführten Ideen sind derzeit offen für Vorschläge. Wir sind auch bereit, neue Ideen zu akzeptieren, die nicht auf der vorgeschlagenen Projektliste stehen.

Ihre Bewerbung sollte beinhalten:

  • Ihr Vorschlag, das ist ein schriftliches Dokument, das genau beschreibt, was Sie im Laufe des Sommers zu erreichen gedenken.
  • Dein Hintergrund als Entwickler. Wenn Sie einen Lebenslauf haben, geben Sie bitte ein Exemplar an, sonst teilen Sie uns Ihre Erfahrungen mit einem Schwerpunkt auf relevante technische Erfahrung mit.

Hier finden Sie eine detaillierte Anleitung zum Einreichen im Rahmen Ihrer Electron-Anwendung.

Sie können auch den -offiziellen GSoC-Studenten/Mitwirkenden Leitfaden für wichtige Tipps zur Vorbereitung Ihres Vorschlags lesen.

Wenn du über Projektvorschläge diskutieren oder Fragen haben möchtest, schaue in unserem #gsoc-General Discord Channel aus!

References

· Die Lesezeit beträgt 3 min

Electron 17.0.0 wurde veröffentlicht! Es enthält Upgrades auf Chromium 98, V8 9.8 und Node.js 16.13.0. Lesen Sie unten für weitere Details!


Das Electron Team freut sich über die Veröffentlichung von Electron 17.0.0! Sie können es mit npm über npm install electron@latest installieren oder von unserer Release-Website herunterladen. Lesen Sie weiter für Details zu dieser Veröffentlichung und teilen Sie bitte alle Rückmeldungen, die Sie haben!

Bemerkenswerte Änderungen

Electron Release Kadenz Änderung

Ab Electron 15 wird Electron alle 8 Wochen eine neue stabile Version veröffentlichen. Lesen Sie die Details hier.

Zusätzlich hat Electron die unterstützte Version von den letzten drei Versionen auf die letzten vier Versionen bis Mai 2022 geändert. Lesen Sie unser Versionierungsdokument für detailliertere Informationen über Versionierung in Electron. Nach Mai 2022 werden wir wieder zu den neuesten drei Versionen zurückkehren.

Stack-Änderungen

Hervorgehobene Funktionen

  • webContents.getMediaSourceId()hinzugefügt, kann mit getUserMedia verwendet werden, um einen Stream für einen WebContents zu erhalten. #31204
  • Veraltet webContents.getPrinters() und führt webContents.getPrintersAsync() ein. #31023
  • desktopCapturer.getSources ist jetzt nur im Hauptprozess verfügbar. #30720

Eine vollständige Liste der neuen Funktionen und Änderungen finden Sie in den 17.0.0 Versionshinweisen.

Breaking Changes

Im Folgenden finden Sie die in Electron 17 eingeführten großen Änderungen. Weitere Informationen zu diesen und zukünftigen Änderungen finden Sie auf der geplante Änderungen Seite.

desktopCapturer.getSources im Renderer

Die desktopCapturer.getSources API ist jetzt nur im Hauptprozess verfügbar. Dies wurde geändert, um die Standardsicherheit von Electron-Apps zu verbessern.

API-Änderungen

Es gab keine API-Änderungen in Electron 17.

Entfernte/Veraltete Änderungen

  • Die Verwendung der desktopCapturer.getSources API im Renderer wurde entfernt. Siehe hier für Details, wie Sie diese API in Ihrer App ersetzen können.

Ende der Unterstützung für 13.x.y

Electron 13.x.y hat das Ende der Unterstützung gemäß der Unterstützungsrichtlinien des Projekts erreicht. Developers and applications are encouraged to upgrade to a newer version of Electron.

Ab Electron 15 haben wir die unterstützte Version von den letzten drei Versionen auf die letzten vier Versionen bis Mai 2022 mit Electron 19 geändert. Nach Electron 19 werden wir wieder die letzten drei Versionen unterstützen. Diese Versions-Unterstützungs-Veränderung ist Teil unserer neuen Kadenz Änderung. Bitte sehen Sie in unseren Blog-Beitrag für alle Details hier.

E15 (Sep'21)E16 (Nov'21)E17 (Feb'22)E18 (Mär'22)E19 (Mai'22)
15.x.y16.x.y17.x.y18.x.y19.x.y
14.x.y15.x.y16.x.y17.x.y18.x.y
13.x.y14.x.y15.x.y16.x.y17.x.y
12.x.y13.x.y14.x.y15.x.y--

What's Next

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. Obwohl wir darauf achten, keine Versprechungen über Veröffentlichungstermine zu machen, unser Plan ist es, neue Hauptversionen von Electron mit neuen Versionen dieser Komponenten ungefähr alle 2 Monate freizugeben.

Sie finden die öffentliche Timeline von Electron hier.

Weitere Informationen über zukünftige Änderungen finden Sie auf der geplante Änderungen Seite.

· Die Lesezeit beträgt 2 min

Spectron will be deprecated on February 1st, 2022.


Beginning in February 2022, Spectron will be officially deprecated by the Electron team.

Why Deprecate Spectron?

While Spectron has consistently put out new releases for each new version of Electron, the project has had very little maintenance and improvements for well over a year, and currently has no full-time maintainers. With the remote module moving outside of Electron core and into an external module in Electron 14, Spectron will require a major rewrite to continue working reliably.

After reviewing several available options for Spectron's continued maintenance, the Electron team has decided to deprecate Spectron in 2022.

Deprecation Timeline

The following is our planned deprecation timeline:

  • November 2021 - January 2022: The Electron team will continue to accept pull requests from the community.
  • January 2022: A final version of announcement warning about Spectron's deprecation will be released.
  • February 1, 2022: Spectron's repo will be marked as "archived". No more pull requests will be accepted.

Following February 1st, 2022, Electron will continue to leave the Spectron repo up indefinitely, so that others are welcome to fork or use the existing code for their projects. We hope this will help provide a longer transition to any projects that may still depend on Spectron.

Alternatives to Spectron

If you're currently using Spectron in your project and would like to migrate to an alternative testing solution, you can read our guide for automated testing here.

We currently have several other recommended alternatives to Spectron, including Playwright and WebDriverIO. Official tutorials for each option can be found in our Automated Testing documentation.

What's Next

We here on the Electron team appreciate you using Spectron and Electron. We understand that many of you depend on Spectron for testing your apps, and we want to make this transition as painless for you as possible. Thank you for choosing Electron!

· Die Lesezeit beträgt 4 min

Electron 16.0.0 wurde veröffentlicht! Es enthält Upgrades auf Chromium 96, V8 9.6und Node.js 16.9.1. Lesen Sie unten für weitere Details!


Das Electron Team freut sich über die Veröffentlichung von Electron 16.0.0! Sie können es mit npm über npm install electron@latest installieren oder von unserer Release-Website herunterladen. Lesen Sie weiter für Details zu dieser Veröffentlichung und teilen Sie bitte alle Rückmeldungen, die Sie haben!

Bemerkenswerte Änderungen

Electron Release Kadenz Änderung

Ab Electron 15 wird Electron alle 8 Wochen eine neue stabile Version veröffentlichen. Lesen Sie die Details hier.

Zusätzlich hat Electron die unterstützte Version von den letzten drei Versionen auf die letzten vier Versionen bis Mai 2022 geändert. Lesen Sie unser Versionierungsdokument für detailliertere Informationen über Versionierung in Electron. Nach Mai 2022 werden wir wieder zu den neuesten drei Versionen zurückkehren.

Stack-Änderungen

Hervorgehobene Funktionen

  • Unterstützt nun die WebHID API. #30213
  • Datenparameter zu app.requestSingleInstanceLock hinzufügen, um Daten zwischen Instanzen zu teilen. #30891
  • Übergeben Sie securityOrigin an Medienberechtigungen Request-Handler. #31357
  • commandLine.removeSwitch hinzugefügt. #30933

Eine vollständige Liste der neuen Funktionen und Änderungen finden Sie in den 16.0.0 Versionshinweisen.

Breaking Changes

Im Folgenden finden Sie die in Electron 16 eingeführten großen Änderungen. Weitere Informationen zu diesen und zukünftigen Änderungen finden Sie auf der geplante Änderungen Seite.

Erstelle Native Module

Wenn Ihr Projekt node-gyp verwendet, um native Module zu erstellen, müssen Sie es möglicherweise mit --force-process-config aufrufen, abhängig von der Konfiguration Ihres Projekts und Ihrer Electron-Version. Weitere Informationen zu dieser Änderung finden Sie unter #2497.

Behavior Changed: crashReporter implementation switched to Crashpad on Linux

The underlying implementation of the crashReporter API on Linux has changed from Breakpad to Crashpad, bringing it in line with Windows and Mac. As a result of this, child processes are now automatically monitored, and calling process.crashReporter.start in Node child processes is no longer needed (and is not advisable, as it will start a second instance of the Crashpad reporter).

There are also some subtle changes to how annotations will be reported on Linux, including that long values will no longer be split between annotations appended with __1, __2 and so on, and instead will be truncated at the (new, longer) annotation value limit.

API-Änderungen

Es gab keine API-Änderungen in Electron 16.

Entfernte/Veraltete Änderungen

  • Die Verwendung der desktopCapturer.getSources API im Renderer ist veraltet und wird entfernt. Diese Änderung verbessert die Standardsicherheit von Electron-Apps. Siehe hier für Details, wie Sie diese API in Ihrer App ersetzen können.

Ende der Unterstützung für 12.x.y

Electron 12.x.y hat das Ende der Unterstützung gemäß der -Unterstützungsrichtlinie des Projekts erreicht. Developers and applications are encouraged to upgrade to a newer version of Electron.

Ab Electron 15 haben wir die unterstützte Version von den letzten drei Versionen auf die letzten vier Versionen bis Mai 2022 mit Electron 19 geändert. Nach Electron 19 werden wir wieder die letzten drei Versionen unterstützen. Diese Versions-Unterstützungs-Veränderung ist Teil unserer neuen Kadenz Änderung. Bitte sehen Sie in unseren Blog-Beitrag für alle Details hier.

E15 (Sep'21)E16 (Nov'21)E17 (Feb'22)E18 (Mär'22)E19 (Mai'22)
15.x.y16.x.y17.x.y18.x.y19.x.y
14.x.y15.x.y16.x.y17.x.y18.x.y
13.x.y14.x.y15.x.y16.x.y17.x.y
12.x.y13.x.y14.x.y15.x.y--

What's Next

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. Obwohl wir darauf achten, keine Versprechungen über Veröffentlichungstermine zu machen, unser Plan ist es, neue Hauptversionen von Electron mit neuen Versionen dieser Komponenten ungefähr alle 2 Monate freizugeben.

Sie finden die öffentliche Timeline von Electron hier.

Weitere Informationen über zukünftige Änderungen finden Sie auf der geplante Änderungen Seite.