Saltar al contenido principal

Migración de S3 Bucket

· 2 lectura mínima

Electron está cambiando su S3 bucket principal, es posible que debas actualizar tus scripts de construcción


¿Qué está pasando?

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. Los ejemplos se incluyen a continuación:

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.

¿Cómo puede influir en ti?

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.

¿Qué pasa con los datos existentes?

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.

Electron 18.0.0

· 4 lectura mínima

¡Electron 18.0.0 ha sido liberado! Incluye actualizaciones a Chromium 100, V8 10.0y Node.js 16.13.2. ¡Lea a continuación para más detalles!


El equipo de Electron esta emocionado de anunciar el lanzamiento de Electron 18.0.0! You can install it with npm via npm install electron@latest or download it from our releases website. Continue reading for details about this release and please share any feedback you have!

Electron Release Cadence Change

As of Electron 15, Electron will release a new major stable version every 8 weeks. You can read the full details here.

Additionally, Electron has changed supported versions from latest three versions to latest four versions until May 2022. See our versioning document for more detailed information about versioning in Electron. After May 2022, we will return to supporting latest three versions.

Notable Changes

  • Added ses.setCodeCachePath() API for setting code cache directory. #33286
  • Removed the old BrowserWindowProxy-based implementation of window.open. This also removes the nativeWindowOpen option from webPreferences. #29405
  • Added 'focus' and 'blur' events to WebContents. #25873
  • Added Substitutions menu roles on macOS: 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
  • Added support for more color formats in setBackgroundColor. #33364

Vea la notas de lanzamiento 18.0.0 para la lista completa de nuevas características y cambios.

Verano del Código de Google 2022

· 2 lectura mínima

¡El equipo de Electrón está encantado de anunciarles que por primera vez en este año estaremos en el Google Summer of Code!


¿Qué es Google Summer of Code?

Google Summer of Code (GSoC) celebrado cada año, es un programa de mentorías que busca conectar proyectos de código abierto con futuros posibles colaborares. Anteriormente solo era abierto para estudiantes, ahora cualquier persona mayor de 18 años puede registrarse en Google Summer of Code.

Para obtener más información, consulte Summer of Code.

¿Cómo me registro?

¿Estás interesado en colaborar con Electrón? ¡Si eres un colaborador novato o principiante en el código abierto, le damos la bienvenida a su solicitud!

Para ser seleccionado como colaborador de Electron para Google Summer of Code, deberá enviar una solicitud. Las solicitudes se abrirán el 4 de abril de 2022 y se cerrarán el 19 de abril de 2022. Puedes seguir las actualizaciones de Google: las directrices de aplicación de verano de código aquí.

¿Quieres presentar tu candidatura? Primero, revisa los cinco borradores de ideas de proyecto que hemos preparado. Todas las ideas de la lista están actualmente abiertas a propuestas. También estamos abiertos a aceptar nuevas ideas que no estén en la lista de proyectos propuestos.

Su solicitud debe incluir:

  • Tu propuesta, que es un documento escrito que describe en detalle lo que planeas conseguir en el transcurso del verano.
  • Su experiencia como desarrollador. Si tiene un currículum vitae, incluya una copia; de lo contrario, háblenos de su experiencia anterior haciendo hincapié en la experiencia técnica relevante.

Aquí encontrará una guía detallada de lo que debe presentar como parte de su solicitud Electron.

También puedes leer la guía oficial de estudiantes/colaboradores de GSoC para obtener consejos importantes sobre cómo preparar tu propuesta.

Si quieres hablar sobre propuestas de proyectos o tienes alguna pregunta, ¡ven a nuestro canal de Discord #gsoc-general!

Referencias

Electron 17.0.0

· 4 lectura mínima

¡Electron 17.0.0 ha sido liberado! Incluye actualizaciones a Chromium 98, V8 9.8y Node.js 16.13.0. ¡Lea a continuación para más detalles!


El equipo de Electron esta emocionado de anunciar el lanzamiento de Electron 17.0.0! You can install it with npm via npm install electron@latest or download it from our releases website. Continue reading for details about this release and please share any feedback you have!

Electron Release Cadence Change

As of Electron 15, Electron will release a new major stable version every 8 weeks. You can read the full details here.

Additionally, Electron has changed supported versions from latest three versions to latest four versions until May 2022. See our versioning document for more detailed information about versioning in Electron. After May 2022, we will return to supporting latest three versions.

Notable Changes

  • Added webContents.getMediaSourceId(), can be used with getUserMedia to get a stream for a WebContents. #31204
  • Deprecates webContents.getPrinters() and introduces webContents.getPrintersAsync(). #31023
  • desktopCapturer.getSources is now only available in the main process. #30720

Vea la notas de lanzamiento 17.0.0 para la lista completa de nuevas características y cambios.

Spectron Deprecation Notice

· 2 lectura mínima

Spectron estará obsoleto el 1 de febrero de 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.

¿Y ahora, qué?

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!

Electron 16.0.0

· 4 lectura mínima

¡Electron 16.0.0 ha sido liberado! Incluye actualizaciones a Chromium 96, V8 9.6y Node.js 16.9.1. ¡Lea a continuación para más detalles!


El equipo de Electron esta emocionado de anunciar el lanzamiento de Electron 16.0.0! You can install it with npm via npm install electron@latest or download it from our releases website. Continue reading for details about this release and please share any feedback you have!

Electron Release Cadence Change

As of Electron 15, Electron will release a new major stable version every 8 weeks. You can read the full details here.

Additionally, Electron has changed supported versions from latest three versions to latest four versions until May 2022. See our versioning document for more detailed information about versioning in Electron. After May 2022, we will return to supporting latest three versions.

Notable Changes

  • Now supports the WebHID API. #30213
  • Add data parameter to app.requestSingleInstanceLock to share data between instances. #30891
  • Pass securityOrigin to media permissions request handler. #31357
  • Add commandLine.removeSwitch. #30933

Vea la notas de lanzamiento 16.0.0 para la lista completa de nuevas características y cambios.

Un lugar tranquilo (Dic'21)

· 2 lectura mínima

El proyecto de Electron realizará una pausa para el mes de diciembre de 2021, para después regresar a toda velocidad en enero de 2022.

vía GIPHY


Lo que será igual en diciembre

  1. Los lanzamientos de día cero y los lanzamientos principales relacionados con la seguridad se publicarán según sea necesario. Los incidentes de seguridad se deben reportar a través de SECURITY.md.
  2. Los reportes del Código de Conducta y moderación continuarán.

Lo que será diferente en diciembre

  1. No se publicarán versiones estables o de prueba en diciembre. No se publicarán las versiones anticipadas durante las últimas dos semanas de diciembre.
  2. Con algunas excepciones, no se realizará la revisión o fusión de pull requests.
  3. No se actualizará el rastreador de incidencias en ningún repositorio.
  4. No se ayudará con la depuración en Discord por parte de los encargados.
  5. No se publicarán actualizaciones de contenido en las redes sociales.

¿Por qué sucede esto?

En resumen, mientras los mantedores están felices y conectados con el proyecto, EL MUNDO ESTÁ CANSADO. Diciembre es un mes tranquilo para la mayoría de las compañías, por lo que queremos darle a los mantenedores una oportunidad de recargar. Animamos a otros proyectos a considerar medidas similares.

¿Debo preocuparme por el futuro de Electron?

No. Somos capaces de tomar este paso porque el proyecto se encuentra en buena forma. Todos esperan el 2022 y ¡esperamos que vengan buenas cosas!

Electron 15.0.0

· 5 lectura mínima

¡Electron 15.0.0 ha sido liberado! Incluye actualizaciones a Chromium 94, V8 9.4y Node.js 16.5.0. We've added API updates to window.open, bug fixes, and general improvements. ¡Lea a continuación para más detalles!


El equipo de Electron esta emocionado de anunciar el lanzamiento de Electron 15.0.0! You can install it with npm via npm install electron@latest or download it from our releases website. Continue reading for details about this release and please share any feedback you have!

Electron Release Cadence Change

Starting with Electron 15, Electron will release a new major stable version every 8 weeks. You can read the full details here.

Additionally, Electron will be changing supported versions from latest three versions to latest four versions until May 2022. See our versioning documentfor more detailed information about versioning in Electron.

Notable Changes

  • nativeWindowOpen: true is no longer experimental, and is now the default.
  • Added safeStorage string encryption API. #30430
  • Added 'frame-created' event to WebContents which emits when a frame is created in the page. #30801
  • Added resize edge info to BrowserWindow's will-resize event. #29199

Vea la notas de lanzamiento 15.0.0 para la lista completa de nuevas características y cambios.

Electron 14.0.0

· 8 lectura mínima

¡Electron 14.0.0 ha sido liberado! It includes upgrades to Chromium 93 and V8 9.3. We've added several API updates, bug fixes, and general improvements. ¡Lea a continuación para más detalles!


El equipo de Electron esta emocionado de anunciar el lanzamiento de Electron 14.0.0! You can install it with npm via npm install electron@latest or download it from our releases website. Continue reading for details about this release and please share any feedback you have!

Electron Release Cadence Change

Beginning in September 2021 with Electron 15, Electron will release a new major stable version every 8 weeks. You can read the full details here. Electron 15 comenzará la versión beta el 1 de septiembre de 2021 y la versión estable estará en 21 de septiembre de 2021. Puede encontrar Temporización lineal público de Electron aquí. Additionally, Electron will be changing supported versions from latest three versions to latest four versions until May 2022. See see our versioning document for more detailed information about versioning in Electron.

Notable Changes

  • Default Changed: nativeWindowOpen now defaults to true. (see docs)
  • Child windows no longer inherit BrowserWindow construction options from their parents. #28550
  • Added new session.storagePath API to get the path on disk for session-specific data. #28665
  • Added process.contextId used by @electron/remote. #28007
  • Added experimental cookie encryption support behind an Electron Fuse. #29492

Vea la notas de lanzamiento 14.0.0 para la lista completa de nuevas características y cambios.

WebView2 and Electron

· 6 lectura mínima

En las últimas semanas, hemos recibido varias preguntas sobre las diferencias entre el nuevo WebView2 y Electron.

Ambos equipos tienen el objetivo expreso de hacer que la tecnología web sea la mejor posible en el escritorio, y se está discutiendo una comparación exhaustiva compartida.

Electrón y WebView2 son proyectos en constante evolución. Hemos realizado un breve resumen de las similitudes y diferencias entre Electron y WebView2 tal y como existen en la actualidad.


Visión general de la Arquitectura

Electrón y WebView2 se desarrollan bajo la fuente de Chromium para renderizar contenido web. Estrictamente hablando, WebView2 se construye a partir de la fuente de Edge, pero Edge se construye utilizando una bifurcacion/fork de la fuente de Chromium. Electron no comparte ninguna DLL con Chrome. Los binarios de WebView2 se enlazan con Edge (canal estable a partir de Edge 90), por lo que comparten disco y algún conjunto de trabajo. Ver Modo de distribución Evergreen para más información.

Electron apps always bundle and distribute the exact version of Electron with which they were developed. WebView2 has two options in distribution. You can bundle the exact WebView2 library your application was developed with, or you can use a shared-runtime version that may already be present on the system. WebView2 provides tools for each approach, including a bootstrapping installer in case the shared runtime is missing. WebView2 is shipped inbox starting with Windows 11.

Applications that bundle their frameworks are responsible for updating those frameworks, including minor security releases. For apps using the shared WebView2 runtime, WebView2 has its own updater, similar to Chrome or Edge, that runs independent of your application. Updating the application's code or any of its other dependencies is still a responsibility for the developer, same as with Electron. Neither Electron nor WebView2 is managed by Windows Update.

Both Electron and WebView2 inherit Chromium’s multi-process architecture - namely, a single main process that communicates with one-or-more renderer processes. These processes are entirely separate from other applications running on the system. Every Electron application is a separate process tree, containing a root browser-process, some utility processes, and zero or more render processes. WebView2 apps that use the same user data folder (like a suite of apps would do), share non-renderer processes. WebView2 apps using different data folders do not share processes.

  • ElectronJS Process Model:

    ElectronJS Process Model Diagram

  • WebView2 Based Application Process Model:

    WebView2 Process Model Diagram

Read more about WebView2’s process model and Electron’s process model here.

Electron provides APIs for common desktop application needs such as menus, file system access, notifications, and more. WebView2 is a component meant to be integrated into an application framework such as WinForms, WPF, WinUI, or Win32. WebView2 does not provide operating system APIs outside the web standard via JavaScript.

Node.js is integrated into Electron. Electron applications may use any Node.js API, module, or node-native-addon from the renderer and main processes. A WebView2 application does not assume which language or framework the rest of your application is written in. Your JavaScript code must proxy any operating system access through the application-host process.

Electron strives to maintain compatibility with the web API, including APIs developed from the Fugu Project. We have a snapshot of Electron’s Fugu API compatibility. WebView2 maintains a similar list of API differences from Edge.

Electron has a configurable security model for web content, from full-access to full-sandbox. WebView2 content is always sandboxed. Electron has comprehensive security documentation on choosing your security model. WebView2 also has security best practices.

The Electron source is maintained and available on GitHub. Applications can modify can build their own brands of Electron. The WebView2 source is not available on GitHub.

Quick Summary:

ElectronWebView2
Build DependencyChromiumBorde
Source Available on GitHubNo
Shares Edge/Chrome DLLsNoYes (as of Edge 90)
Shared Runtime Between ApplicationsNoOpcional
Application APIsNo
Node.jsNo
SandboxOpcionalSiempre
Requires an Application FrameworkNo
Plataformas soportadasMac, Win, LinuxWin (Mac/Linux planned)
Process Sharing Between AppsNeverOpcional
Framework Updates Managed ByApplicationWebView2

Performance Discussion

When it comes to rendering your web content, we expect little performance difference between Electron, WebView2, and any other Chromium-based renderer. We created scaffolding for apps built using Electron, C++ + WebView2, and C# + WebView2 for those interested to investigate potential performance differences.

There are a few differences that come into play outside of rendering web content, and folks from Electron, WebView2, Edge, and others have expressed interest in working on a detailed comparison including PWAs.

Inter-Process Communication (IPC)

There is one difference we want to highlight immediately, as we believe it is often a performance consideration in Electron apps.

In Chromium, the browser process acts as an IPC broker between sandboxed renderers and the rest of the system. While Electron allows unsandboxed render processes, many apps choose to enable the sandbox for added security. WebView2 always has the sandbox enabled, so for most Electron and WebView2 apps IPC can impact overall performance.

Even though Electron and WebView2 have a similar process models, the underlying IPC differs. Communicating between JavaScript and C++ or C# requires marshalling, most commonly to a JSON string. JSON serialization/parsing is an expensive operation, and IPC-bottlenecks can negatively impact performance. Starting with Edge 93, WV2 will use CBOR for network events.

Electron supports direct IPC between any two processes via the MessagePorts API, which utilize the structured clone algorithm. Applications which leverage this can avoid paying the JSON-serialization tax when sending objects between processes.

Resumen

Electron and WebView2 have a number of differences, but don't expect much difference with respect to how they perform rendering web content. Ultimately, an app’s architecture and JavaScript libraries/frameworks have a larger impact on memory and performance than anything else because Chromium is Chromium regardless of where it is running.

Special thanks to the WebView2 team for reviewing this post, and ensuring we have an up-to-date view of the WebView2 architecture. They welcome any feedback on the project.