Zum Hauptteil springen

Electron 24.0.0

· Die Lesezeit beträgt 4 min

Electron 24.0.0 wurde veröffentlicht! Dieses Update enthält Erweiterungen zu Chromium 112.0.5615.49, V8 11.2, und Node.js 18.14.0. Lesen Sie unten für weitere Details!


Das Electron-Team freut sich über die Veröffentlichung von Electron 24.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

Breaking Changes

API geändert: nativeImage.createThumbnailFromPath(path, size)

The maxSize parameter has been changed to size to reflect that the size passed in will be the size the thumbnail created. Previously, Windows would not scale the image up if it were smaller than maxSize, and macOS would always set the size to maxSize. Behavior is now the same across platforms.

// a 128x128 image.
const imagePath = path.join('path', 'to', 'capybara.png');

// Scaling up a smaller image.
const upSize = { width: 256, height: 256 };
nativeImage.createThumbnailFromPath(imagePath, upSize).then((result) => {
console.log(result.getSize()); // { width: 256, height: 256 }
});

// Scaling down a larger image.
const downSize = { width: 64, height: 64 };
nativeImage.createThumbnailFromPath(imagePath, downSize).then((result) => {
console.log(result.getSize()); // { width: 64, height: 64 }
});

Neue Funktionen

  • Added the ability to filter HttpOnly cookies with cookies.get(). #37365
  • Added logUsage to shell.openExternal() options, which allows passing the SEE_MASK_FLAG_LOG_USAGE flag to ShellExecuteEx on Windows. The SEE_MASK_FLAG_LOG_USAGE flag indicates a user initiated launch that enables tracking of frequently used programs and other behaviors. #37291
  • Added types to the webRequest filter, adding the ability to filter the requests you listen to.#37427
  • Added a new devtools-open-url event to webContents to allow developers to open new windows with them. #36774
  • Added several standard page size options to webContents.print(). #37265
  • Added the enableLocalEcho flag to the session handler ses.setDisplayMediaRequestHandler() callback for allowing remote audio input to be echoed in the local output stream when audio is a WebFrameMain. #37528
  • Allow an application-specific username to be passed to inAppPurchase.purchaseProduct(). #35902
  • Exposed window.invalidateShadow() to clear residual visual artifacts on macOS. #32452
  • Whole-program optimization is now enabled by default in electron node headers config file, allowing the compiler to perform opimizations with information from all modules in a program as opposed to a per-module (compiland) basis. #36937
  • SystemPreferences::CanPromptTouchID (macOS) now supports Apple Watch. #36935

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

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

As noted in Farewell, Windows 7/8/8.1, Electron 22's (Chromium 108) planned end of life date will be extended from May 30, 2023 to October 10, 2023. The Electron team will continue to backport any security fixes that are part of this program to Electron 22 until October 10, 2023.

E24 (Apr'23)E25 (Mai'23)E26 (Aug'23)
24.x.y25.x.y26.x.y
23.x.y24.x.y25.x.y
22.x.y23.x.y24.x.y
--22.x.y22.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.

10 Jahre Electron 🎉

· Die Lesezeit beträgt 10 min

Der erste Commit in das electron/electron Repository war am 13. März 20131.

Erster Commit auf electron/electron von @aroben

10 Jahre und 27.147 weitere Commits von 1192 individuellen Mitwirkenden später, Electron ist heute zu einem der beliebtesten Frameworks für das Erstellen von Desktop-Anwendungen geworden. Dieser Meilenstein ist die perfekte Gelegenheit, um unsere bisherige Reise zu feiern und zu reflektieren, und mitzuteilen, was wir auf dem Weg gelernt haben.

Wir wären heute nicht hier ohne alle, die ihre Zeit und Mühe geopfert haben, um das Projekt zu unterstützen. Obwohl Quellcode-Commits immer die sichtbarsten Beiträge sind, müssen wir auch die Anstrengungen der Leute anerkennen, die Fehler melden, userland-Module warten, Dokumentation und Übersetzungen bereitstellen und an der Electron Community im gesamten Cyberspace teilnehmen. Jeder Beitrag ist für uns als Betreiber von unschätzbarem Wert.

Bevor wir mit dem Rest des Blog-Beitrags fortfahren: Vielen Dank. ❤️

Wie sind wir zu diesem Punkt gekommen?

Atom Shell wurde als Gerüst für GitHubs Atom-Editorgebaut, der im April 2014 in die öffentliche Beta startete. Es wurde von Grund auf als Alternative zu den webbasierten Desktop-Frameworks gebaut, die zu dieser Zeit verfügbar waren (node-webkit und Chromium Embedded Framework). Es hatte eine Killer-Funktion: Einbetten von Node.js und Chromium, um eine leistungsfähige Desktop-Laufzeit für Web- Technologien zu bieten.

Innerhalb eines Jahres begann Atom Shell ein immenses Wachstum der Fähigkeiten und Popularität zu sehen. Große Firmen, Startups und einzelne Entwickler hatten gleichermaßen damit begonnen, Apps damit zu bauen (einige frühe Anwender waren Slack, GitKraken, und WebTorrent), und das Projekt wurde treffend in Electron umbenannt.

Von da an startete Electron voll durch und hielt nie auf. Hier ist ein Blick auf unsere wöchentliche Download-Anzahl über die Zeit, dank npmtrends.com:

Electrons wöchentlicher Downloads-Graph im Laufe der Zeit

Electron v1 wurde 2016 veröffentlicht und versprach eine höhere API-Stabilität und bessere Dokumentation und Werkzeuge. Electron v2 wurde 2018 veröffentlicht und führte semantische Versionierung ein, was es den Entwicklern von Electron einfacher macht, den Release-Zyklus zu verfolgen.

Mit Electron v6 haben wir auf eine reguläre 12-wöchige große Release-Kadenz umgeschaltet, um der Chromium-Kadenz zu folgen. Diese Entscheidung war ein Mentalitätswandel für das Projekt und hat "die aktuellste Chromium-Version zu haben" von einem Nice-to-have zu einer Priorität gemacht. Dies hat die Menge an technischer Schulden zwischen den Upgrades reduziert und macht es uns einfacher, Electron aktualisiert und sicher zu halten.

Seitdem sind wir eine gut geölte Maschine und veröffentlichen eine neue Elektro-Version am selben Tag wie jede stabile Version von Chromium. Als Chromium 2021 seinen Veröffentlichungszyklus auf 4 Wochen beschleunigte, konnten wir entspannt darauf reagieren und unseren Veröffentlichungsrhythmus entsprechend auf 8 Wochen erhöhen.

Wir sind nun bei Electron v23 (und es geht weiter) und sind weiterhin bestrebt, die beste Laufzeitumgebung für die Erstellung plattformübergreifender Desktop-Anwendungen zu entwickeln. Trotz des Booms von JavaScript-Entwicklerwerkzeugen in den letzten Jahren ist Electron ein stabiler und erprobter Eckpfeiler im Bereich der Desktop-Anwendungs-Frameworks geblieben. Heutzutage sind Electron-Apps allgegenwärtig: Du kannst mit Visual Studio Code programmieren, mit Figma designen, mit Slack kommunizieren und mit Notion Notizen machen (unter vielen anderen Anwendungsfällen). Wir sind unglaublich stolz auf diese Leistung und dankbar für alle, die dies möglich gemacht haben.

Was haben wir auf dem Weg gelernt?

Der Weg zur Dekaden-Marke war lang und gewunden. Hier sind ein Paar der Kernelemente, die uns geholfen haben, ein solch großes Open-Source Projekt am Leben zu erhalten.

Skalierung verteilter Entscheidungsfindung mit einem Governance-Modell

Eine Herausforderung, die wir bewältigen mussten, war, die langfristige Richtung des Projekts zu bewältigen, nachdem Electron zum ersten Mal in der Popularität explodierte. Wie gehen wir damit um, ein Team von ein paar Dutzend Ingenieuren zu sein, die über Firmen, Länder und Zeitzonen verteilt arbeiten?

In den Anfangstagen verließ sich die Gruppe der Electron-Maintainer auf informelle Koordination, die für kleinere Projekte schnell und unkompliziert ist, aber nicht auf breitere Zusammenarbeit skaliert. 2019 wechselten wir zu einem Governance-Modell, bei dem verschiedene Arbeitsgruppen formelle Verantwortungsbereiche haben. Dies war entscheidend, um Prozesse zu optimieren und Projektanteile spezifischen Maintainers zuzuweisen. Wofür ist jede Arbeitsgruppe (WG) heutzutage verantwortlich?

  • Electron-Versionen herausbringen (Releases WG)
  • Upgrade von Chromium und Node.js (Upgrades WG)
  • Überwachung des öffentlichen API-Designs (API WG)
  • Electron sicher halten (Sicherheit WG)
  • Die Webseite am Laufen halten, Dokumentation und Bereitstellung von Werkzeugen (Ecosystem WG)
  • Community und Firmenreichweite (Outreach WG)
  • Community-Moderation (Community & Safety WG)
  • Wartung unserer Build-Infrastruktur, Maintainer-Tools und Cloud-Services (Infrastructure WG)

Etwa zur gleichen Zeit, als wir zum Governance-Modell wechselten, übertrugen wir auch das Eigentum von Electron von GitHub zur OpenJS Foundation. Obwohl das ursprüngliche Kernteam heute noch bei Microsoft arbeitet, sind sie nur ein Teil einer größeren Gruppe von Mitwirkenden, die die Electron-Governance bilden.2

Obwohl dieses Modell nicht perfekt ist, hat es uns gut durch eine globale Pandemie und anhaltende makroökonomische Gegenwinde gebracht. Für die Zukunft planen wir, die Governance-Charta zu überarbeiten, um uns durch das zweite Jahrzehnt von Electron zu führen.

info

Wenn du mehr erfahren möchtest, schau dir das electron/governance Repository an!

Community

Der Community-Teil von Open Source ist schwierig, besonders wenn dein Outreach-Team aus einem Dutzend Ingenieuren in einem Trenchcoat besteht, auf dem "Community Manager" steht. Das bedeutet jedoch, dass wir als großes Open-Source-Projekt viele Nutzer haben, und ihre Energie für Electron zu nutzen, um ein Userland-Ökosystem aufzubauen, ist ein entscheidender Teil, um die Gesundheit des Projekts zu erhalten.

Was haben wir unternommen, um unsere Präsenz in der Community zu entwickeln?

Virtuelle Community aufbauen

  • Im Jahr 2020 starteten wir unseren Community-Discord-Server. Zuvor hatten wir einen Bereich im Forum von Atom, aber wir entschieden uns für eine informellere Messaging-Plattform, um einen Raum für Diskussionen zwischen Maintainern und Electron-Entwicklern sowie für allgemeine Debugging-Hilfe zu schaffen.
  • This group has been instrumental in Electron growth in users from China’s booming tech scene, providing a space for them to collaborate on ideas and discuss Electron outside of our English-language spaces. We’d also like to thank cnpm for their work in supporting Electron’s nightly releases in their Chinese mirror for npm.

Participating in high-visibility open source programs

  • We have been celebrating Hacktoberfest every year since 2019. Hacktoberfest is yearly celebration of open source organized by DigitalOcean, and we get dozens of enthusiastic contributors every year looking to make their mark on open source software.
  • In 2020, we participated in the initial iteration of Google Season of Docs, where we worked with @bandantonio to rework Electron’s new user tutorial flow.
  • In 2022, we mentored a Google Summer of Code student for the first time. @aryanshridhar did some awesome work to refactor Electron Fiddle's core version loading logic and migrate its bundler to webpack.

Automatisieren Sie all die Dinge!

Today, Electron governance has about 30 active maintainers. Less than half of us are full-time contributors, which means that there’s a lot of work to go around. What’s our trick to keeping everything running smoothly? Our motto is that computers are cheap, and human time is expensive. In typical engineer fashion, we’ve developed a suite of automated support tooling to make our lives easier.

Nicht Goma

The core Electron codebase is a behemoth of C++ code, and build times have always been a limiting factor in how fast we can ship bug fixes and new features. In 2020, we deployed Not Goma, a custom Electron-specific backend for Google’s Goma distributed compiler service. Not Goma processes compilation requests from authorized user’s machines and distributes the process across hundreds of cores in the backend. It also caches the compilation result so that someone else compiling the same files will only need to download the pre-compiled result.

Since launching Not Goma, compilation times for maintainers have decreased from the scale of hours to minutes. A stable internet connection became the minimum requirement for contributors to compile Electron!

info

If you’re an open source contributor, you can also try Not Goma’s read-only cache, which is available by default with Electron Build Tools.

Kontinuierliche Faktor-Authentifizierung

Continuous Factor Authentication (CFA) is a layer of automation around npm’s two-factor authentication (2FA) system that we combine with semantic-release to manage secure and automated releases of our various @electron/ npm packages.

While semantic-release already automates the npm package publishing process, it requires turning off two-factor authentication or passing in a secret token that bypasses this restriction.

We built CFA to deliver a time-based one-time password (TOTP) for npm 2FA to arbitrary CI jobs, allowing us to harness the automation of semantic-release while keeping the additional security of two-factor authentication.

We use CFA with a Slack integration front-end, allowing maintainers to validate package publishing from any device they have Slack on, as long as they have their TOTP generator handy.

info

If you want to try CFA out in your own projects, check out the GitHub repository or the docs! If you use CircleCI as your CI provider, we also have a handy orb to quickly scaffold a project with CFA.

Sheriff

Sheriff ist ein Open-Source-Werkzeug, das wir geschrieben haben, um die Verwaltung von Berechtigungen in GitHub, Slack und Google Workspace zu automatisieren.

Sheriff’s key value proposition is that permission management should be a transparent process. It uses a single YAML config file that designates permissions across all the above listed services. With Sheriff, getting collaborator status on a repo or creating a new mailing list is as easy as getting a PR approved and merged.

Sheriff also has an audit log that posts to Slack, warning admins when suspicious activity occurs anywhere in the Electron organization.

…und alle unsere GitHub Bots

GitHub is a platform with rich API extensibility and a first-party bot application framework called Probot. To help us focus on the more creative parts of our job, we built out a suite of smaller bots that help do the dirty work for us. Here are a few examples:

  • Sudowoodo automates the Electron release process from start to finish, from kicking off builds to uploading the release assets to GitHub and npm.
  • Trop automates the backporting process for Electron by attempting to cherry-pick patches to previous release branches based on GitHub PR labels.
  • Roller automates rolling upgrades of Electron’s Chromium and Node.js dependencies.
  • Cation ist unser Statusprüfbot für electron/electron PRs.

Insgesamt hat uns unsere kleine Bot-Familie einen enormen Schub in der Entwicklungsproduktivität gebracht!

Was kommt als Nächstes?

Wenn wir in unser zweites Jahrzehnt als ein Projekt kommen, könnten Sie fragen: Was ist das nächste für Electron?

We’re going to stay in sync with Chromium's release cadence, releasing new major versions of Electron every 8 weeks, keeping the framework updated with the latest and greatest from the web platform and Node.js while maintaining stability and security for enterprise-grade applications.

We generally announce news on upcoming initiatives when they become concrete. If you want to keep up with future releases, features, and general project updates, you can read our blog and follow our social media profiles (Twitter and Mastodon)!

Footnotes

  1. This is actually the first commit from the electron-archive/brightray project, which got absorbed into Electron in 2017 and had its git history merged. But who’s counting? It’s our birthday, so we get to make the rules!

  2. Contrary to popular belief, Electron is no longer owned by GitHub or Microsoft, and is part of the OpenJS Foundation nowadays.

Electron 23.0.0

· Die Lesezeit beträgt 3 min

Electron 23.0.0 wurde veröffentlicht! Es enthält Upgrades auf Chromium 110, V8 11.0 und Node.js 18.12.1. Zusätzlich wurde die Unterstützung für Windows 7/8/8.1 eingestellt. Lesen Sie unten für weitere Details!


Das Electron-Team freut sich über die Veröffentlichung von Electron 23.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

  • label Eigenschaft zu Display Objekten hinzugefügt. #36933
  • Die app.getPreferredSystemLanguages() API wurde hinzugefügt, um die Systemsprachen des Benutzers zurückzugeben. #36035
  • Unterstützung für die WebUSB API hinzugefügt. #36289
  • Added support for SerialPort.forget() as well as a new event serial-port-revoked emitted on Session objects when a given origin is revoked. #35310
  • Neue win.setHiddenInMissionControl API hinzugefügt, um es Entwicklern zu ermöglichen, sich von Mission Control auf macOS abzumelden. #36092

Windows 7/8/8.1 Unterstützung beendet

Electron 23 unterstützt Windows 7/8/8.1 nicht mehr. Electron follows the planned Chromium deprecation policy, which will deprecate Windows 7/8/8.1 , as well as Windows Server 2012 and 2012 R2 support in Chromium 109 (read more here).

Breaking API Veränderungen

Im Folgenden finden Sie die in Electron 23 eingeführten großen Änderungen. Lesen Sie mehr über diese Änderungen und zukünftige Änderungen auf der geplante Änderungen-Seite.

Removed: BrowserWindow scroll-touch-* events

Die veralteten Events scroll-touch-begin, scroll-touch-end und scroll-touch-edge im BrowserWindow wurden entfernt. Verwenden Sie stattdessen das neu verfügbare input-event Event auf WebContents.

// Entfernt in Electron 23.0
-win.on('scroll-touch-begin', scrollTouchBegin)
-win.on('scroll-touch-edge', scrollTouchEdge)
-win.on('scroll-touch-end', scrollTouchEnd)

// Ersetzt mit
+win.webContents.on('input-event', (_, event) => {
+ if (event.type === 'gestureScrollBegin') {
+ scrollTouchBegin()
+ } else if (event.type === 'gestureScrollUpdate') +{
+ scrollTouchEdge()
+ } else if (event.type === 'gestureScrollEnd') {
+ scrollTouchEnd()
+ }
+})

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

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

E22 (Nov'22)E23 (Feb'23)E24 (Apr'23)E25 (Mai'23)E26 (Aug'23)
22.x.y23.x.y24.x.y25.x.y26.x.y
21.x.y22.x.y23.x.y24.x.y25.x.y
20.x.y21.x.y22.x.y23.x.y24.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.

Electron 22.0.0

· Die Lesezeit beträgt 5 min

Electron 22.0.0 wurde veröffentlicht! Es enthält eine neue Utility-Prozess-API, Updates für Windows 7/8/8.1 Support und Upgrades auf Chromium 108, V8 10.8 und Node.js 16.17.1. Lesen Sie unten für weitere Details!


Das Electron-Team freut sich die Veröffentlichung von Electron 22.0.0 bekannt zu geben! 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

Hervorgehobene Funktionen

UtilityProcess API #36089

Das neue UtilityProcess Hauptprozessmodul ermöglicht die Erstellung eines leichten Chrom-Kindprozesses mit nur Node.js Integration, während auch die Kommunikation mit einem Sandbox-Renderer mit MessageChannel erlaubt. The API was designed based on Node.js child_process.fork to allow for easier transition, with one primary difference being that the entry point modulePath must be from within the packaged application to allow only for trusted scripts to be loaded. Additionally the module prevents establishing communication channels with renderers by default, upholding the contract in which the main process is the only trusted process in the application.

Lesen Sie mehr über die neue UtilityProcess API in unserer Dokumentation hier.

Windows 7/8/8.1 Support Update

info

2023/02/16: Ein Update auf Windows Server 2012 Unterstützung

Last month, Google announced that Chrome 109 would continue to receive critical security fixes for Windows Server 2012 and Windows Server 2012 R2 until October 10, 2023. In accordance, Electron 22's (Chromium 108) planned end of life date will be extended from May 30, 2023 to October 10, 2023. The Electron team will continue to backport any security fixes that are part of this program to Electron 22 until October 10, 2023.

Beachten Sie, dass wir keine zusätzlichen Sicherheitskorrekturen für Windows 7/8/8.1 vornehmen werden. Außerdem wird Electron 23 (Chromium 110) nur unter Windows 10 und höher funktionieren, wie zuvor schon angekündigt.

Electron 22 wird die letzte Electron-Hauptversion sein, die Windows 7/8/8.1 unterstützt. Electron follows the planned Chromium deprecation policy, which will deprecate Windows 7/8/8.1 support in Chromium 109 (read more here).

Windows 7/8/8.1 will not be supported in Electron 23 and later major releases.

Weitere hervorgehobene Änderungen

  • Unterstützung für Web-Bluetooth-Pairing unter Linux und Windows. #35416
  • Added LoadBrowserProcessSpecificV8Snapshot as a new fuse that will let the main/browser process load its v8 snapshot from a file at browser_v8_context_snapshot.bin. Jeder andere Prozess verwendet den gleichen Pfad, den er heute verwendet. #35266
  • WebContents.opener wurde hinzugefügt, um auf den Fensteröffner und webContents.fromFrame(frame) zuzugreifen, um den WebInhalt einer WebFrameMain-Instanz zu erhalten. #35140
  • Unterstützung für navigator.mediaDevices.getDisplayMedia über einen neuen Session-Handler ses.setDisplayMediaRequestHandler hinzugefügt. #30702

Breaking API Veränderungen

Im Folgenden finden Sie die in Electron 22 eingeführten Änderungen. Lesen Sie mehr über diese Änderungen und zukünftige Änderungen auf der geplante Änderungen-Seite.

Veraltet: webContents.incrementCapturerCount(stayHidden, stayAwake)

webContents.incrementCapturerCount(stayHidden, stayAwake) ist veraltet. Es wird nun automatisch von webContents.capturePage bearbeitet, wenn eine Seitenerfassung abgeschlossen ist.

const w = new BrowserWindow({ show: false })

- w.webContents.incrementCapturerCount()
- w.capturePage().then(image => {
- console.log(image.toDataURL())
- w.webContents.decrementCapturerCount()
- })

+ w.capturePage().then(image => {
+ console.log(image.toDataURL())
+ })

Veraltet: webContents.decrementCapturerCount(stayHidden, stayAwake)

webContents.decrementCapturerCount(stayHidden, stayAwake) ist veraltet. Es wird nun automatisch von webContents.capturePage bearbeitet, wenn eine Seitenerfassung abgeschlossen ist.

const w = new BrowserWindow({ show: false })

- w.webContents.incrementCapturerCount()
- w.capturePage().then(image => {
- console.log(image.toDataURL())
- w.webContents.decrementCapturerCount()
- })

+ w.capturePage().then(image => {
+ console.log(image.toDataURL())
+ })

Removed: WebContents new-window event

The new-window event of WebContents has been removed. Es wird durch webContents.setWindowOpenHandler() ersetzt.

- webContents.on('new-window', (event) => {
- event.preventDefault()
- })

+ webContents.setWindowOpenHandler((details) => {
+ return { action: 'deny' }
+ })

Deprecated: BrowserWindow scroll-touch-* events

The scroll-touch-begin, scroll-touch-end and scroll-touch-edge events on BrowserWindow are deprecated. Instead, use the newly available input-event event on WebContents.

// Veraltet
- win.on('scroll-touch-begin', scrollTouchBegin)
- win.on('scroll-touch-edge', scrollTouchEdge)
- win.on('scroll-touch-end', scrollTouchEnd)

// Ersetzt mit
+ win.webContents.on('input-event', (_, event) => {
+ if (event.type === 'gestureScrollBegin') {
+ scrollTouchBegin()
+ } else if (event.type === 'gestureScrollUpdate') {
+ scrollTouchEdge()
+ } else if (event.type === 'gestureScrollEnd') {
+ scrollTouchEnd()
+ }
+ })

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

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

E19 (Mai'22)E20 (Aug'22)E21 (Sep'22)E22 (Nov'22)E23 (Jan'23)
19.x.y20.x.y21.x.y22.x.y23.x.y
18.x.y19.x.y20.x.y21.x.y22.x.y
17.x.y18.x.y19.x.y20.x.y21.x.y

What's Next

Das Electron-Projekt wird für den Monat Dezember 2022 pausieren und im Januar 2023 zurückkehren. Weitere Informationen finden Sie im Dezember Shutdown Blog-Beitrag.

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.

Farewell, Windows 7/8/8.1

· Die Lesezeit beträgt 3 min

Electron will end support of Windows 7, Windows 8 and Windows 8.1 beginning in Electron 23.


In line with Chromium’s deprecation policy, Electron will end support of Windows 7, Windows 8 and Windows 8.1 beginning in Electron 23. This matches Microsoft's end of support for Windows 7 ESU and Windows 8.1 extended on January 10th, 2023.

Electron 22 will be the last Electron major version to support Windows versions older than 10. Windows 7/8/8.1 will not be supported in Electron 23 and later major releases. Older versions of Electron will continue to function on Windows 7, and we will continue to release patches for Electron the 22.x series until May 30 2023, when Electron will end support for 22.x (according to our support timeline).

Why deprecate?

Electron follows the planned Chromium deprecation policy, which will deprecate support in Chromium 109 (read more about Chromium's timeline here). Electron 23 will contain Chromium 110, which won’t support older versions of Windows.

Electron 22, which contains Chromium 108, will thus be the last supported version.

Deprecation timeline

The following is our planned deprecation timeline:

  • December 2022: The Electron team is entering a quiet period for the holidays
  • January 2023: Windows 7 & 8 related issues are accepted for all supported release branches.
  • February 7 2023: Electron 23 is released.
  • February 8 2023 - May 29 2023: Electron will continue to accept fixes for supported lines older than Electron 23.
  • May 30 2023: Electron 22 reaches the end of its support cycle.

What this means for developers:

  • The Electron team will accept issues and fixes related to Windows 7/8/8.1 for stable supported lines, until each line reaches the end of its support cycle.
    • This specifically applies to Electron 22, Electron 21 and Electron 20.
  • New issues related to Windows 7/8/8.1 will be accepted for Electron versions older than Electron 23.
    • New issues will not be accepted for any newer release lines.
  • Once Electron 22 has reached the end of its support cycle, all existing issues related to Windows 7/8/8.1 will be closed.
info

2023/02/16: Ein Update auf Windows Server 2012 Unterstützung

Last month, Google announced that Chrome 109 would continue to receive critical security fixes for Windows Server 2012 and Windows Server 2012 R2 until October 10, 2023. In accordance, Electron 22's (Chromium 108) planned end of life date will be extended from May 30, 2023 to October 10, 2023. The Electron team will continue to backport any security fixes that are part of this program to Electron 22 until October 10, 2023.

Beachten Sie, dass wir keine zusätzlichen Sicherheitskorrekturen für Windows 7/8/8.1 vornehmen werden. Außerdem wird Electron 23 (Chromium 110) nur unter Windows 10 und höher funktionieren, wie zuvor schon angekündigt.

What's next

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.

Ein ruhiger Ort Teil II (Dez'22)

· Eine Minute Lesezeit

Das Electron-Projekt wird für den Monat Dezember 2022 pausieren und dann im Januar 2023 in voller Geschwindigkeit zurückkehren.

über GIPHY


Was im Dezember gleich sein wird

  1. Bei Bedarf werden Tages- und andere wichtige sicherheitsrelevante Veröffentlichungen veröffentlicht. Sicherheitsvorfälle sollten über SECURITY.md gemeldet werden.
  2. Code of Conduct Berichte und Moderation werden fortgesetzt.

Was wird im Dezember anders sein

  1. Keine neuen Stable-Releases im Dezember. No Nightly and Alpha releases for the last two weeks of December.
  2. Mit wenigen Ausnahmen, keine Pull-Request Reviews oder Merges.
  3. Keine Updates für Issue-Tracker auf Repositories.
  4. Keine Discord Debugging-Hilfe von Betreuern.
  5. Keine Updates für Inhalte der sozialen Medien.

Warum passiert das?

With the success of December Quiet Month 2021, we wanted to bring it back for 2022. December continues to be a quiet month for most companies, so we want to give our maintainers a chance to recharge. Alle freuen sich auf 2023, und wir erwarten gute Dinge! Wir ermutigen andere Projekte, ähnliche Maßnahmen in Erwägung zu ziehen.

Einführung von Electron Forge 6

· Die Lesezeit beträgt 6 min

Wir freuen uns bekanntgeben zu können, dass Electron Forge v6.0.0 jetzt verfügbar ist! This release marks the first major release of Forge since 2018 and moves the project from electron-userland into the main electron organization on Github.

Keep on reading to see what's new and how your app can adopt Electron Forge!

Was ist Electron Forge?

Electron Forge ist ein Werkzeug zum Verpacken und Verteilen von Electron-Anwendungen. It unifies Electron's build tooling ecosystem into a single extensible interface so that anyone can jump right into making Electron apps.

Highlight features include:

  • 📦 Application packaging and code signing
  • 🚚 Customizable installers on Windows, macOS, and Linux (DMG, deb, MSI, PKG, AppX, etc.)
  • ☁️ Automated publishing flow for cloud providers (GitHub, S3, Bitbucket, etc.)
  • ⚡️ Easy-to-use boilerplate templates for webpack and TypeScript
  • ⚙️ Native Node.js module support
  • 🔌 Extensible JavaScript plugin API
Further reading

Visit the Why Electron Forge explainer document to learn more about Forge's philosophy and architecture.

Was ist neu in v6?

Komplett neu geschrieben

From v1 to v5, Electron Forge was based on the now-discontinued electron-compile project. Forge 6 is a complete rewrite of the project with a new modular architecture that can be extended to meet any Electron application's needs.

In the past few years, Forge v6.0.0-beta has achieved feature parity with v5 and code churn has slowed down dramatically, making the tool ready for general adoption.

Don't install the wrong package

For versions 5 and below, Electron Forge was published to the electron-forge package on npm. Starting with the v6 rewrite, Forge is instead structured as a monorepo project with many smaller projects.

Officially supported

Historically, Electron maintainers have been unopinionated about build tooling, leaving the task to various community packages. However, with Electron maturing as a project, it has become harder for new Electron developers to understand which tools they need to build and distribute their apps.

To help guide Electron developers in the distribution process, we have have decided to make Forge the official batteries-included build pipeline for Electron.

Over the past year, we have been slowly integrating Forge into the official Electron documentation, and we have recently moved Forge over from its old home in electron-userland/electron-forge to the electron/forge repo. Now, we are finally ready to release Electron Forge to a general audience!

Erste Schritte

Initializing a new Forge project

Scaffolding a new Electron Forge project can be done using the create-electron-app CLI script.

yarn create electron-app my-app --template=webpack
cd my-app
yarn start

The script will create an Electron project in the my-app folder with completely JavaScript bundling and a preconfigured build pipeline.

For more info, see the Getting Started guide in the Forge docs.

First-class webpack support

The above snippet uses Forge's Webpack Template, which we recommend as a starting point for new Electron projects. This template is built around the @electron-forge/plugin-webpack plugin, which integrates webpack with Electron Forge in a few ways, including:

  • enhancing local dev flow with webpack-dev-server, including support for HMR in the renderer;
  • handling build logic for webpack bundles before application packaging; and
  • adding support for Native Node modules in the webpack bundling process.

If you need TypeScript support, consider using the Webpack + TypeScript Template instead.

Importieren eines bestehendes Projekts

The Electron Forge CLI also contains an import command for existing Electron projects.

cd my-app
yarn add --dev @electron-forge/cli
yarn electron-forge import

When you use the import command, Electron Forge will add a few core dependencies and create a new forge.config.js configuration. If you have any existing build tooling (e.g. Electron Packager, Electron Builder, or Forge 5), it will try to migrate as many settings as possible. Some of your existing configuration may need to be migrated manually.

Manual migration details can be found in the Forge import documentation. If you need help, please stop by our Discord server!

Why switch to Forge?

If you already have tooling for packaging and publishing your Electron app, the benefits associated with adopting Electron Forge can still outweigh the initial switching cost.

We believe there are two main benefits to using Forge:

  1. Forge receives new features for application building as soon as they are supported in Electron. In this case, you won't need to wire in new tooling support yourself, or wait for that support to be eventually implemented by other packages before upgrading. For recent examples, see macOS universal binaries and ASAR integrity checking.

  2. Forge's multi-package architecture makes it easy to understand and extend. Since Forge is made up of many smaller packages with clear responsibilities, it is easier to follow code flow. In addition, Forge's extensible API design means that you can write your own additional build logic separate from the provided configuration options for advanced use cases. For more details on writing custom Forge plugins, makers, and publishers, see the Extending Electron Forge section of the docs.

Wichtige Änderungen

Forge 6 has spent a long time in the beta phase, and its release cadence has gradually slowed down. However, we have accelerated development in the second half of 2022 and used the last few releases to push some final breaking changes before the v6.0.0 stable release.

If you are an Electron Forge 6 beta user, see the v6.0.0 GitHub release notes for a list of breaking changes made in recent betas (>=6.0.0-beta.65).

A complete list of changes and commits can be found in the repo's CHANGELOG.md.

Submit your feedback!

Tell us what you need! The Electron Forge team is always looking to build the project to better suit its users.

You can help us improve Electron Forge by submitting feature requests, posting issues, or just letting us know your feedback! You can also join us in the official Electron Discord server, where there is a dedicated channel for Electron Forge discussion.

If you want to give any feedback on the Forge docs at https://electronforge.io, we have a GitBook instance synced to the electron-forge/electron-forge-docs repo.

Maintainer Summit 2022 Recap

· Die Lesezeit beträgt 5 min

Last month, Electron’s maintainer group met up in Vancouver, Canada to discuss the direction of the project for 2023 and beyond. Over four days in a conference room, core maintainers and invited collaborators discussed new initiatives, maintenance pain points, and general project health.

Gruppenfoto! Von @ groundwater aufgenommen.

Going forward, the team will still be fully dedicated to releasing regular and rapid Chromium upgrades, fixing bugs, and making Electron more secure and performant for everyone. We also have a few exciting projects in the works we would love to share with the community!

Transformative new APIs

Major API proposals in the Electron project that require consensus go through a Request for Comments (RFC) process, which gets reviewed by members of our API Working Group.

This year, we have driven forward two major proposals that have the potential to unlock a new dimension of capabilities for Electron apps. These proposals are highly experimental, but here’s a sneak peek of what to expect!

New native addon enhancements (C APIs)

This proposal outlines a new layer of Electron C APIs that will allow app developers to write their own Native Node Addons that interface with Electron’s internal resources, similar to Node’s own Node-API. More information about the proposed new API can be found here.

Example: Supercharging apps with Chromium resources

Many Electron apps maintain their own forks to interact directly with Chromium internals that would otherwise be inaccessible with vanilla (unmodified) Electron. By exposing these resources in the C API layer, this code can instead live as a native module alongside Electron, potentially reducing app developer maintenance burden.

Exposing Chromium’s UI layer (Views API)

Under the hood, the non-website parts of Chrome’s user interface (UI), such as toolbars, tabs, or buttons, are built with a framework called Views. The Views API proposal introduces parts of this framework as JavaScript classes in Electron, with the eventual goal of allowing developers to create non-web UI elements to their Electron applications. This will prevent apps from having to hack together web contents.

The groundwork to make this new set of APIs possible is currently in progress. Here are a few of the first things you can expect in the near future.

Example: Refactoring the window model with WebContentsView

Our first planned change is to expose Chrome’s WebContentsView to Electron’s API surface, which will be the successor to our existing BrowserView API (which, despite the name, is Electron-specific code unrelated to Chromium Views). With WebContentsView exposed, we will have a reusable View object that can display web contents, opening the door to making the BrowserWindow class pure JavaScript and eliminating even more code complexity.

Although this change doesn’t provide a lot of new functionality to app developers, it is a large refactor that eliminates a lot of code under the hood, simplifying Chromium upgrades and reducing the risk of new bugs appearing between major versions.

If you’re an Electron developer using BrowserViews in your app: don’t worry, we haven’t forgotten about you! We plan on making the existing BrowserView class a shim for WebContentsView to provide a buffer as you transition to the newer APIs.

Siehe: electron/electron#35658

Example: Scrollable web contents with ScrollView

Our friends at Stack have been driving an initiative to expose the Chromium ScrollView component to Electron’s API. With this new API, any child View component can be made scrollable horizontally or vertically.

Although this new API fulfills a single smaller functionality, the team’s eventual goal is to build a set of utility View components that can be used as a toolkit to build more complex non-HTML interfaces.

Beteiligt werden

Are you an Electron app developer interested in either of these API proposals? Although we’re not quite ready to receive additional RFCs, please stay tuned for more details in the future!

Electron Forge v6 stable release

Since the framework’s inception, Electron’s build tooling ecosystem has been largely community-driven and has consisted of many small single-purpose packages (e.g. electron-winstaller, electron-packager, electron-notarize, electron-osx-sign). Although these tools work well, it’s intimidating for users to piece together a working build pipeline.

To help build a friendlier experience for Electron developers, we built Electron Forge, an all-in-one solution that combines all this existing tooling into a single interface. Although Forge has been in development since 2017, the project has lain dormant for the last few years. However, given community feedback on the state of build tooling in Electron, we have been hard at work on releasing the next-gen stable major version of Forge.

Electron Forge 6 comes with first-class TypeScript and Webpack support, as well as an extensible API that allows developers to create their own plugins and installers.

Bleib dran: Ankündigung kommt bald

If you’re interested in building a project with Forge or building templates or plugins with Forge’s extensible third-party APIs, stay tuned for our official announcement on the Forge v6 stable release sometime this month!

Was kommt als Nächstes?

Aside from the above, the team is always thinking of a bunch of exploratory projects to make the Electron experience better for app developers and end users. Updater tooling, API review processes, and enhanced documentation are other things we are experimenting with. We hope to have more news to share in the near future!

Electron 21.0.0

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

Electron 20.0.0

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