Compare commits

...

155 Commits

Author SHA1 Message Date
Keeley Hammond
201be32e0f chore: cherry-pick e045399a1ecb from chromium (#49790)
* chore: cherry-pick e045399a1ecb from chromium

* chore: update patch
2026-02-12 18:06:08 -08:00
trop[bot]
11f60f3520 ci: add markdownlint problem matcher (#49764)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2026-02-12 10:56:13 -05:00
electron-roller[bot]
530c16aab5 chore: bump chromium to 144.0.7559.173 (40-x-y) (#49766)
chore: bump chromium in DEPS to 144.0.7559.173

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2026-02-12 10:15:09 -05:00
trop[bot]
e0a61a58ef build: generate artifact attestions for released assets (#49767)
* build: generate artifact attestions for released assets

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

* chore: address review feedback

Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>

* build: fixup attestation for release assets (#49732)

* build: fixup attestation for release assets

* Generate artifact attestation for generated artifacts

* set id-token for attestation

* Add artifact-metadata permission for attestation

* add permissions for testing attestations

* Revert "add permissions for testing attestations"

This reverts commit 0284bed175.

* Revert "set id-token for attestation"

This reverts commit 69a1b13a18.

* Revert "Generate artifact attestation for generated artifacts"

This reverts commit ee0536eceb.

* chore: update publish workflow

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2026-02-11 15:34:26 -05:00
Keeley Hammond
fdd31a7aa4 feat: add support for disclaiming utility processes (#49695)
feat: add support for disclaiming utility processes (#49128)

* feat: add support for disclaiming utility processes

* chore: update patches

---------
2026-02-11 16:51:03 +01:00
trop[bot]
cb0727f88c docs: fix typos across documentation (#49758)
Fix 40 typos across 25 documentation files including misspellings,
missing words, doubled words, wrong words, and grammatical errors.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: ron <ronald_eddy@yahoo.com>
2026-02-11 16:48:48 +01:00
electron-roller[bot]
21c6e4e8a0 chore: bump node to v24.13.0 (40-x-y) (#49188)
* chore: bump node in DEPS to v24.12.0

* chore: bump node in DEPS to v24.13.0

* src: use CP_UTF8 for wide file names on win32

https://github.com/nodejs/node/pull/60575

* test,crypto: handle a few more BoringSSL tests

https://github.com/nodejs/node/pull/59030

* chore: re-add accidentally removed sslv23 test

* test: make buffer sizes 32bit-aware in test-internal-util-construct-sab

https://github.com/nodejs/node/pull/61026

* chore: fixup patch indices

* chore: fixup crypto patch rebase

(cherry picked from commit 0b3baf0167)

* chore: fixup sandboxed pointers patch

(cherry picked from commit f52fbdbe51)

* build: try removing zero-fill sandbox patch component (#49452)

(cherry picked from commit 73377af79e)

* tls: route callback exceptions through error handlers

https://github.com/nodejs-private/node-private/pull/782
(cherry picked from commit 87bc8ebd34)

* src: add internal binding for constructing SharedArrayBuffers

https://github.com/nodejs/node/pull/60497
(cherry picked from commit ae90076267)

* chore: fixup after rebase

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
2026-02-10 15:29:51 +01:00
trop[bot]
bf4746c7c9 fix: default accelerator for role-based menu items (#49669)
fix: apply default accelerator for role-based menu items

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-02-09 10:09:18 -05:00
trop[bot]
091c5db763 docs: fix framerate limit when osr with shared texture (#49729)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: reito <reito@chromium.org>
2026-02-09 15:37:31 +01:00
electron-roller[bot]
ee64692287 chore: bump chromium to 144.0.7559.134 (40-x-y) (#49656)
* chore: bump chromium in DEPS to 144.0.7559.133

* chore: update patches

* chore: bump chromium in DEPS to 144.0.7559.134

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
2026-02-09 09:17:14 -05:00
trop[bot]
0bc0553af7 fix: restore macos 12 support in Node 24 (#49702)
* fix: restore macos 12 support in Node 24

Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>

* chore: fix rebased patch list

* chore: fixup patches

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2026-02-07 07:59:25 -08:00
trop[bot]
51beb04c10 ci: fix patches changes detected in apply patches workflow (#49710)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2026-02-06 21:29:52 -08:00
Keeley Hammond
45a6bfbae9 chore: cherry-pick 4508b5dfb26e from v8 (#49699)
* chore: cherry-pick 4508b5dfb26e from v8

* chore: update patch
2026-02-06 07:49:31 -08:00
trop[bot]
53982a2c3a refactor: use ComPtr pattern for MSIX to avoid exception handling (#49687)
* Revert "fix: fix Windows MSIX release build errors (#49613)"

This reverts commit 4b5d5f9dd5.

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* refactor: use WRL ComPtr pattern for MSIX to avoid exception handling

The MSIX auto-updater code was using C++/WinRT (winrt::* namespace), which requires exception handling (/EHsc). Mixing exception and non-exception handling code in the same binary is problematic at runtime. This commit refactors electron_api_msix_updater.cc to use an upstream Chromium pattern and eliminates the need for special exception handling build flags

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* build: import correct packages

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* build: consolidate IPackage declarations

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* refactor: use IPackageManager/IPackageManager5/IPackageManager9 and IPackage/IPackage2/IPackage4/IPackage6 interfaces as needed for different API methods.

Also consolidates duplicate completion handler logic, fixes a bug in
RegisterRestartOnUpdate where the command line string could go out of
scope, and removes unused includes.

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2026-02-05 13:48:23 -08:00
trop[bot]
713b24db80 refactor: don't log error just for unsigned code (#49677)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Noah Gregory <noahmgregory@gmail.com>
2026-02-05 22:01:09 +01:00
trop[bot]
f63f875ee0 ci: use squash merge for apply patches workflow (#49672)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2026-02-04 18:49:57 -08:00
trop[bot]
8cd558f439 feat: import shared texture supports nv12. (#49040)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: reito <reito@chromium.org>
2026-02-04 14:30:54 -05:00
trop[bot]
94b18a54d0 fix: remove menu observer before destroying menu_controller_ (#49657)
* fix: remove menu observer before destroying menu_controller_

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* fix: resolves private inheritance conflict

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2026-02-04 10:06:19 -08:00
trop[bot]
394d4cf60c fix(squirrel.mac): clean up old staged updates before downloading new update (#49638)
fix: clean up old staged updates before downloading new update

When checkForUpdates() is called while an update is already staged,
Squirrel creates a new temporary directory for the download without
cleaning up the old one. This can lead to disk usage growth when
new versions are released while the app hasn't restarted.

This adds a force parameter to pruneUpdateDirectories that bypasses
the AwaitingRelaunch state check. This is called before creating a
new temp directory, ensuring old staged updates are cleaned up.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Andy Locascio <loc@anthropic.com>
2026-02-04 18:54:03 +01:00
trop[bot]
96db5b9734 ci: handle PRs with no checks in rerun apply patches (#49662)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2026-02-04 09:46:02 -08:00
trop[bot]
75e4f83f87 docs: add Wayland note to win.getPosition() and win.getBounds() (#49661)
docs: add Wayland note to win.getPosition()

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-02-04 11:48:12 -05:00
trop[bot]
4e124f2b22 fix: menu state in macOS dock menus (#49624)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-02-03 15:10:48 -05:00
trop[bot]
04f4bcdb78 fix: alt-space should route through 'system-context-menu' (#49640)
fix: alt-space should route through system-context-menu

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-02-03 20:26:39 +01:00
trop[bot]
d5eed2bca6 fix: possible crash in FileSystem API (#49635)
Refs https://chromium-review.googlesource.com/6880247

Fixes a crash that can arise in the File System Access API in the
following scenario:

1. Create fileHandle1 at path1.
2. Call fileHandle1.remove() or user manually delete the file.
3. Create fileHandle2 at path2.
4. fileHandle2.move(path1).

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-02-03 11:57:53 -05:00
trop[bot]
0e901ca04c build(dev-deps): bump @electron/lint-roller to 3.2.0 (#49575)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2026-02-02 14:40:33 +01:00
trop[bot]
af272ec773 feat: msix auto-updater (#49587) 2026-02-02 14:22:04 +01:00
trop[bot]
f6df2854ff fix: duplicate fullscreen macOS menu item (#49595) 2026-02-02 14:20:51 +01:00
trop[bot]
f5dbe3212b docs: app.getGPUInfo() may reject (#49617)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
2026-02-02 11:18:27 +01:00
trop[bot]
ef048c48f9 refactor: address PathProvider TODO (#49601)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-02-02 09:39:20 +01:00
trop[bot]
f8c5bb541f docs: add jsign instructions for Azure Trusted Signing on Linux/macOS (#49602)
* docs: add jsign instructions for Azure Trusted Signing on Linux/macOS

Co-authored-by: Prachi Maskar <prachimaskar184@gmail.com>

* docs: add clickable jsign link for Azure Trusted Signing

Co-authored-by: Prachi Maskar <prachimaskar184@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Prachi Maskar <prachimaskar184@gmail.com>
2026-02-02 09:38:29 +01:00
Robo
3d4ce3d39b fix: handle out of order recording errors in skia graphite (#49609)
Refs https://issues.chromium.org/issues/458722690
2026-02-01 22:33:05 -08:00
David Sanders
ed8493c5b1 ci: rework reapply patches (#49582)
ci: rework reapply patches (#49552)
2026-01-30 13:21:02 -05:00
trop[bot]
457598a261 fix: macOS menu item accelerators when item disabled (#49592)
fix: macOS menu item acceerators when item disabled

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-01-30 13:18:36 -05:00
electron-roller[bot]
c18096cdf1 chore: bump chromium to 144.0.7559.111 (40-x-y) (#49562)
* chore: bump chromium in DEPS to 144.0.7559.109

* chore: bump chromium in DEPS to 144.0.7559.111

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2026-01-29 16:20:54 +01:00
trop[bot]
04901ad77e ci: trigger website docs update on release published (#49569)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2026-01-28 20:54:54 -08:00
trop[bot]
cd00dcbafd test: remove split dependency (#49557)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2026-01-28 22:11:08 +01:00
trop[bot]
d0661e765b fix: chrome://accessibility drift (#49560)
https://chromium-review.googlesource.com/c/chromium/src/+/6870052

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-01-28 15:37:29 +01:00
trop[bot]
3c9d1dcb1a ci: reapply patches if PR base branch updates them (#49532)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2026-01-27 13:16:35 -05:00
trop[bot]
d942351bad docs: correct type for process.noDeprecation (#49544)
* docs: correct type for process.noDeprecation

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* docs: mark `noDeprecation` as optional instead

Co-authored-by: René <contact.9a5d6388@renegade334.me.uk>

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2026-01-27 11:37:19 +01:00
trop[bot]
ac4efed3d1 fix: second argument to shell.writeShortcutLink is optional (#49501)
fix: second argument to shell.writeShortcutLink is optional

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-01-26 14:29:56 +01:00
trop[bot]
db6b22a8e5 docs: add type reference links in Menu and MenuItem API documentation (#49525)
* docs: add type reference links in Menu and MenuItem API documentation

Co-authored-by: Sourav Bera <sbera987654321@gmail.com>

* docs: revert type links in Menu return types to fix parser

Co-authored-by: Sourav Bera <sbera987654321@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Sourav Bera <sbera987654321@gmail.com>
2026-01-26 14:28:04 +01:00
John Kleinschmidt
1b7073ad6a chore: update patches for 40-x-y (#49513) 2026-01-23 15:56:25 -08:00
electron-roller[bot]
cd0b34dfc4 chore: bump chromium to 144.0.7559.96 (40-x-y) (#49474)
* chore: bump chromium in DEPS to 144.0.7559.96

* chore: fixup patch indices

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-01-23 11:18:48 -05:00
Keeley Hammond
c37daa736b chore: cherry-pick dba49550b12d from v8 (#49487)
* chore: cherry-pick dba49550b12d from v8

* chore: update patch
2026-01-22 17:04:41 -06:00
trop[bot]
e555e520d3 fix: return early from platform_util::Beep() on Linux if there is no default GDK display (#49482)
fix: return early from beep on linux if there is no default gdk display

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Noah Gregory <noahmgregory@gmail.com>
2026-01-22 19:32:47 +01:00
trop[bot]
a2949e5217 fix: potential devtools crash on empty (#49490)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-01-22 10:50:59 -05:00
trop[bot]
f476b29459 docs: document that shell.trashItem requires backslashes (#49480)
docs: Update shell.md: Document that shell.trashItem requires backslashes

In Windows many functions relating to files (e.g. shell.openItem, the Node fs functions, as well as native Win32 APIs) will accept either type of slash / or \ as a folder separator.

shell.trashItem does not work with / as folder separator in Windows. This documentation change explains that.

See also:
https://github.com/electron/electron/issues/28831

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: sam marshall <s.marshall@open.ac.uk>
2026-01-21 14:51:39 -05:00
trop[bot]
412ea766bb docs: add a few API history fragments (#49477)
* docs: add a few API history fragments

Co-authored-by: Erick Zhao <erick@hotmail.ca>

* manual fixes

Co-authored-by: Erick Zhao <erick@hotmail.ca>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2026-01-21 14:50:37 -05:00
trop[bot]
03ada83421 revert: use deprecated setAllowedFileTypes in macOS dialogs (#49473)
* revert: use deprectated setAllowedFileTypes in macOS dialogs

Closes https://github.com/electron/electron/issues/48191

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: remove stray import

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-01-21 10:39:40 -05:00
trop[bot]
3138ac5fd2 feat: suppress devtools console logging (#49359)
* feat: suppress devtools console logging

Co-authored-by: clavin <clavin@electronjs.org>

* Emit messages as-is in testing builds

Co-authored-by: clavin <clavin@electronjs.org>

* Promote `DCHECK_IS_ON()` to preprocessor check

Co-authored-by: clavin <clavin@electronjs.org>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
2026-01-20 10:06:35 +01:00
trop[bot]
d4a52baa2f build: roll build-image to a82b87d (#49449)
build: roll build-image to a82b87d

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-01-19 19:01:37 +01:00
trop[bot]
cab791e2b1 fix: MAS rejection for private APIs (#49431)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-01-19 15:00:30 +01:00
trop[bot]
5e91ab8c50 docs: fix webContents.hostWebContents types (#49446)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2026-01-19 12:02:05 +01:00
trop[bot]
03d6462edf fix: try clearing InspectableWebContents delegate earlier (#49422)
fix: try clearing InspectableWebContents delegate earlier

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-01-18 15:54:26 +01:00
trop[bot]
1c2b4e0583 fix: make toplevel icon Wayland protocol work (#49414)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Alex Schwartz <alexschwartz01@gmail.com>
2026-01-16 11:05:20 -05:00
trop[bot]
370965819e fix: restore AXDocument accessibility attribute for representedFilename on macOS (#49417)
Starting from Chromium 134.0.6989.0 (Electron 35.0.0-beta.5), the
NativeWidgetMacNSWindow class overrides accessibilityDocument to return
the web content URL from the accessibility tree, but doesn't fall back
to NSWindow's default behavior when that URL is empty.

This broke Electron's setRepresentedFilename() API - the file path was
still set on the NSWindow, but no longer exposed via the AXDocument
accessibility attribute that screen readers use.

This fix adds an accessibilityDocument override in ElectronNSWindow that
checks representedFilename first, falling back to Chromium's behavior
for web content URLs.

Fixes: https://github.com/electron/electron/issues/XXXXX

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Daniel Gräfe <Daniel.Alm@ForumD.net>
2026-01-16 14:29:49 +01:00
trop[bot]
3d1c5ea4fa ci: detect patch needs update error with problem matcher (#49411)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2026-01-16 09:54:25 +01:00
Calvin
35b8855913 chore: empty commit to release stable 40.0.0 (#49404) 2026-01-15 13:39:20 -05:00
trop[bot]
7872c33b10 fix: revert os_crypt async cookie provider implementation (#49384)
* Revert "fix: provide explicit cookie encryption provider for cookie encryption (#49348)"

This reverts commit 95f097a392.

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* Revert "fix: fix cookie encryption provider loading on Windows and Linux (#49371)"

This reverts commit 0e4ee9f03a.

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* revert: 6996667: Reland "Port net::CookieCryptoDelegate to os_crypt async" | https://chromium-review.googlesource.com/c/chromium/src/+/6996667

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* chore: update patch for 40-x-y

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
2026-01-14 19:24:45 +01:00
trop[bot]
9c753c344a docs: remove stale example and standardize DevTools capitalization (#49387)
* docs: remove stale example and standardize `DevTools` capitalization

Co-authored-by: Erick Zhao <ezhao@slack-corp.com>

* Update docs/api/web-contents.md

Co-authored-by: Kilian Valkhof <kilian@kilianvalkhof.com>

Co-authored-by: Erick Zhao <erick@hotmail.ca>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2026-01-14 14:51:07 +01:00
trop[bot]
8b2a99183f docs: improve build-tools instructions (#49385)
* docs: improve build-tools instructions

Co-authored-by: Erick Zhao <ezhao@slack-corp.com>

* address comments

Co-authored-by: Erick Zhao <ezhao@slack-corp.com>

* update directory structure

Co-authored-by: Erick Zhao <ezhao@slack-corp.com>

* update

Co-authored-by: Erick Zhao <ezhao@slack-corp.com>

* nits

Co-authored-by: Erick Zhao <ezhao@slack-corp.com>

* node -> electron_node

Co-authored-by: Erick Zhao <erick@hotmail.ca>

* update macos build version

Co-authored-by: Erick Zhao <erick@hotmail.ca>

* Update docs/development/build-instructions-gn.md

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

Co-authored-by: Erick Zhao <erick@hotmail.ca>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2026-01-14 10:29:24 +01:00
trop[bot]
c897602202 refactor: add static ReplyChannel::SendError() helper (#49372)
refactor: add static `ReplyChannel::SendError()` helper (#49338)

* refactor: add static void ReplyChannel::SendError()

* refactor: use static SendError() instead of instantiating a temporary

* refactor: remove non-static version of SendError()

* refactor: remove redundant callback-is-non-null checks

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2026-01-14 09:34:28 +01:00
electron-roller[bot]
8cc201e02c chore: bump chromium to 144.0.7559.60 (40-x-y) (#49380)
chore: bump chromium in DEPS to 144.0.7559.60

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2026-01-14 09:34:08 +01:00
electron-roller[bot]
ba26a5d4d3 chore: bump chromium to 144.0.7559.59 (40-x-y) (#49330)
* chore: bump chromium in DEPS to 144.0.7559.59

* chore: update patches

* [InputVizard] Fix missing touch cancel in InputTransferHandlerAndroid
using InputEventSource

Refs https://chromium-review.googlesource.com/c/chromium/src/+/7302368

(cherry picked from commit f31f9e06db)

* 7264893: update postMessage tests for file: origin serialization change

Cherry-picked from 4ef78d3ee7

Chromium now serializes file: origins as 'null' in MessageEvent per spec. This is a security improvement aligning with the HTML spec behavior.  Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7264893

Co-Authored-By: Alice Zhao <66543449+alicelovescake@users.noreply.github.com>

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Alice Zhao <66543449+alicelovescake@users.noreply.github.com>
2026-01-13 19:09:12 -05:00
trop[bot]
df4d0bef21 fix: fix cookie encryption provider loading on Windows and Linux (#49375)
* fix: support cookie encryption provider cross-platform

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* fix: add async macos key provider

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2026-01-12 21:02:05 -08:00
trop[bot]
9c4e03fd8a build: roll build-tools SHA to 4430e4a (#49366)
build: roll build-tools SHA to 4430e4a

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-01-12 15:52:11 -05:00
Shelley Vohr
05b4b57151 feat: support WebSocket authentication handling (#49064)
* feat: support WebSocket authentication handling

* chore: make linter happy

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2026-01-12 11:23:31 -05:00
trop[bot]
d5087faff7 fix: provide explicit cookie encryption provider for cookie encryption (#49350)
fix: provide explicit cookie encryption provider

Fixes 6996667: Reland "Port net::CookieCryptoDelegate to os_crypt async" | https://chromium-review.googlesource.com/c/chromium/src/+/6996667

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2026-01-09 17:44:47 -08:00
trop[bot]
3039ced4f3 chore: improvements to script/run-clang-tidy.ts (#49343)
* chore: disable color output for clang-tidy in CI

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* chore: small QoL improvements to run-clang-tidy.ts

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* chore: add --fix option to script/run-clang-tidy.ts

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2026-01-09 14:43:18 -06:00
trop[bot]
4152b44bf8 docs: document ELECTRON_SKIP_BINARY_DOWNLOAD (#49332)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
2026-01-08 10:10:08 -06:00
John Kleinschmidt
95cd5641dd build: use @electron-ci/dev-root for package.json default
(cherry picked from commit bab6bd3dae)
2026-01-06 14:28:47 -05:00
electron-roller[bot]
9e7ef66ecb chore: bump chromium to 144.0.7559.31 (40-x-y) (#48958)
* chore: bump chromium in DEPS to 144.0.7527.1

* chore: bump chromium in DEPS to 144.0.7529.1

* chore: bump chromium in DEPS to 144.0.7529.3

* chore: bump chromium in DEPS to 144.0.7529.5

* chore: bump chromium in DEPS to 144.0.7531.1

* chore: bump chromium in DEPS to 144.0.7531.0

* chore: bump chromium in DEPS to 144.0.7532.1

* chore: bump chromium in DEPS to 144.0.7535.1

* chore: bump chromium in DEPS to 144.0.7537.1

* chore: bump chromium in DEPS to 144.0.7539.1

* chore: bump chromium in DEPS to 144.0.7541.1

* chore: bump chromium in DEPS to 144.0.7543.1

* chore: bump chromium in DEPS to 144.0.7545.1

* chore: bump chromium in DEPS to 144.0.7547.1

* chore: bump chromium in DEPS to 144.0.7549.1

* chore: bump chromium in DEPS to 144.0.7551.0

* chore: bump chromium in DEPS to 144.0.7553.0

* chore: bump chromium in DEPS to 144.0.7555.1

* chore: bump chromium in DEPS to 144.0.7557.1

* chore: bump chromium in DEPS to 144.0.7559.1

* chore: bump chromium in DEPS to 144.0.7559.5

* chore: bump chromium in DEPS to 144.0.7559.3

* chore: bump chromium in DEPS to 144.0.7559.12

* chore: bump chromium in DEPS to 144.0.7559.20

* fix(patch-conflict): update code cache patch for PersistentCache refactor

Upstream refactored code cache to use PersistentCache with new class-based
implementation (NoopCodeCacheHost, LocalCodeCacheHost, CodeCacheWithPersistentCacheHost).
Updated patch to integrate custom scheme support into the new structure while
preserving ProcessLockURLIsCodeCacheScheme checks for embedder-registered schemes.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7044986

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
(cherry picked from commit 2b9d256e78)

* fix(patch-conflict): update dialog patch for RequestXdgDesktopPortal API

Upstream changed from SetSystemdScopeUnitNameForXdgPortal to RequestXdgDesktopPortal
API pattern. Updated OnServiceStarted signature and kept OnSystemdUnitStarted callback
that calls Electron's file_dialog::StartPortalAvailabilityTestInBackground().

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7204285

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
(cherry picked from commit 2cd3911d92)

* chore: update patches

* fix(build): update VideoPixelFormat API for SharedImageFormat

Upstream CL https://chromium-review.googlesource.com/c/chromium/src/+/7207153
removed VideoPixelFormatToGfxBufferFormat as part of migration to
SharedImageFormat. Update to use VideoPixelFormatToSharedImageFormat
which directly returns the SharedImageFormat.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
(cherry picked from commit ff9d072b4b)

* fix(build): extend profile methods patch for ShouldEnableXfaForms

The ShouldEnableXfaForms function uses Profile::FromBrowserContext()
which is not available in Electron. Wrap the profile-dependent code
in #if 0 to fall through to the feature flag default.

Co-Authored-By: Claude <noreply@anthropic.com>
(cherry picked from commit 3edec8ee30)

* fix(build): add missing include

`components/dbus/xdg/systemd.h` for `void OnSystemdUnitStarted(dbus_xdg::SystemdUnitStatus)` in the same patch.

(cherry picked from commit 6929589c0d)

* fixup! fix(build): add missing include

(cherry picked from commit 39cd8f15c1)

* chore: update libc++ filenames

(cherry picked from commit 6aa1ecc71d)

* fix(build): adapt to string-view-ification change in windows jump_list.cc

7186922: Fix unsafe buffer usage in base/win/win_util.cc
https://chromium-review.googlesource.com/c/chromium/src/+/7186922
(cherry picked from commit 85ce0d45a3)

* chore: bump chromium in DEPS to 144.0.7559.31

* Fix Crash in FullscreenController::EnterFullscreenModeInternal

https://chromium-review.googlesource.com/c/chromium/src/+/7260934

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: clavin <clavin@electronjs.org>
2026-01-06 14:22:31 -05:00
trop[bot]
96018acfc2 docs: update roundedCorners documentation (#49311)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2026-01-06 10:32:37 -05:00
Calvin
ff23784246 fix: drag regions in child windows (manual backport 40-x-y) (#49312)
fix: drag regions in child windows
2026-01-06 10:32:12 -05:00
trop[bot]
c4bfc1491a fix: webRequest.onBeforeSendHeaders not being able to modify reserved headers (#49241)
* fix: `webRequest.onBeforeSendHeaders` not being able to modify reserved headers

Co-authored-by: Samuel Attard <sattard@anthropic.com>

* chore: add unit test for reserved header

Co-authored-by: Samuel Attard <sattard@anthropic.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <sattard@anthropic.com>
2026-01-06 10:31:09 -05:00
Niklas Wenzel
8fd775faca fix: visual artifacts while resizing on Windows (#49191) 2026-01-05 16:32:21 -05:00
trop[bot]
a7652f68e9 build: fixup release notes generation (#49305)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
2026-01-05 12:23:42 -05:00
trop[bot]
525917302a build: add logging to notes generator (#49301)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
2026-01-05 09:55:16 -05:00
Keeley Hammond
a3e69b0f9e chore: cherry-pick e0052e7af9c9 from v8 (#49286)
* chore: cherry-pick e0052e7af9c9 from v8

* chore: update patches
2025-12-31 17:02:36 +13:00
trop[bot]
ce0850e4f6 ci: disallow non-maintainer changes to Yarn files (#49193)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-12-15 14:01:00 -08:00
trop[bot]
9dce2015f7 build: drop dugite as a dependency (#49204)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
2025-12-15 14:40:56 -05:00
Keeley Hammond
b0ba443ff3 chore: cherry-pick 95a32cb37edb from angle (#49201)
* build: add angle patch dir

* chore: cherry-pick 95a32cb37edb from angle

* chore: update patches
2025-12-12 06:12:18 -08:00
trop[bot]
1c85668558 build: upgrade yarn to 4.12.0 (#49181)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
2025-12-10 19:21:46 -08:00
John Kleinschmidt
5db7fd8fca build: upgrade github-app-auth to 3.2.0 (#49161)
build: upgrade github-app-auth to 3.2.0 (#49152)
2025-12-10 10:50:41 -05:00
trop[bot]
46919aaa1b build: use powershell for Electron build step (#49153)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
2025-12-09 11:15:38 -05:00
trop[bot]
e3cabb6119 chore: bump chromium to 144.0.7547.0 (40-x-y) (#49146)
* chore: bump chromium in DEPS to 144.0.7543.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* Pass PipScreenCaptureCoordinatorProxy to ScreenCaptureKitDeviceMac

https://chromium-review.googlesource.com/c/chromium/src/+/7157590

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* chore: update patches

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* chore: update filenames.libcxx.gni

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* 7142359: Spanification of process_singleton_posix.cc

https: //chromium-review.googlesource.com/c/chromium/src/+/7142359
Co-Authored-By: Charles Kerr <70381+ckerr@users.noreply.github.com>

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Move logging::LoggingSettings to base/logging/logging_settings.h

https://chromium-review.googlesource.com/c/chromium/src/+/7173024

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* chore: bump chromium in DEPS to 144.0.7545.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* 7159368: update PluginService API for sync GetPlugins

Upstream removed async PluginService APIs:
- GetPluginsAsync() removed, use synchronous GetPlugins()
- RegisterInternalPlugin() now takes single argument (remove add_at_beginning)
- RefreshPlugins() removed entirely

Updated ElectronPluginInfoHostImpl to use synchronous plugin loading and
simplified ElectronBrowserMainParts internal plugin registration.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7159368
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7159328
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7159056
(cherry picked from commit 88cdf50b0a)

Co-authored-by: Samuel Attard <sattard@anthropic.com>

* 7159184: add missing base/files/file_path.h include

Add explicit include for base/files/file_path.h in electron_browser_context.h.
After removal of superfluous Mojo includes from content headers, base::FilePath
is no longer transitively included via content/public/browser/browser_context.h.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7159184
(cherry picked from commit 6ca8ea03ec)

Co-authored-by: Samuel Attard <sattard@anthropic.com>

* 7126479: add ShouldForceRefreshTextCheckService parameter to SpellCheckClient

Upstream added a force-refresh parameter to WebTextCheckClient::RequestCheckingOfText
to bypass spell check cache. Add the new ShouldForceRefreshTextCheckService
parameter to SpellCheckClient's override (currently unused in Electron).

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7126479
(cherry picked from commit 879c0401c4)

Co-authored-by: Samuel Attard <sattard@anthropic.com>

* 7083663: remove fingerprinting_protection_ruleset_service override

Upstream deleted external references to Fingerprinting Protection Filter (FPF)
component. Remove the fingerprinting_protection_ruleset_service() override
from BrowserProcessImpl as the method no longer exists in the base class.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7083663
(cherry picked from commit 8350d152f9)

Co-authored-by: Samuel Attard <sattard@anthropic.com>

* 7155287: implement WebContentsView::GetSize and Resize

Upstream delegated WebContents::GetSize() and Resize() to WebContentsView,
making them pure virtual. Add const qualifier to GetSize() and implement
the Resize() override in OffScreenWebContentsView (no-op for offscreen).

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7155287
(cherry picked from commit 084eaa568e)

Co-authored-by: Samuel Attard <sattard@anthropic.com>

* 7184238: add OnUnconfirmedTapConvertedToTap override

Upstream added OnUnconfirmedTapConvertedToTap as a pure virtual method
to RenderWidgetHostViewBase to inform root view when child frame converts
an unconfirmed tap. Add empty override for offscreen rendering.

Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7184238
(cherry picked from commit ef03400d9a)

Co-authored-by: Samuel Attard <sattard@anthropic.com>

* 7143586: add widget parameter to OnCommandsChanged

GlobalAcceleratorListener::OnCommandsChanged gained a gfx::AcceleratedWidget
parameter for window association in the GlobalShortcutListenerLinux
implementation. Pass gfx::kNullAcceleratedWidget for Electron's usage.

Ref: : Pass parent handle to GlobalAcceleratorListenerLinux::BindShortcuts | https://chromium-review.googlesource.com/c/chromium/src/+/7143586
(cherry picked from commit 38306e2bfc)
Co-Authored-By: Samuel Attard <MarshallOfSound@users.noreply.github.com>

Co-authored-by: Samuel Attard <sattard@anthropic.com>

* chore: update patches

Co-Authored-By: Samuel Attard <MarshallOfSound@users.noreply.github.com>

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* chore: bump chromium in DEPS to 144.0.7547.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* 7189232: Add support for UnownedUserData in GlobalFeatures

https: //chromium-review.googlesource.com/c/chromium/src/+/7189232

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Refactor: Use std::u16string for extension load error messages

https://chromium-review.googlesource.com/c/chromium/src/+/7185844

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* fixup Add support for UnownedUserData in GlobalFeatures

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* 7165650: Remove ResourceContext

https://chromium-review.googlesource.com/c/chromium/src/+/7165650

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* fixup BUILD.gn for lint

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* 7202164: Reland "Reland "Remove GenericScopedHandle:IsValid""

https://chromium-review.googlesource.com/c/chromium/src/+/7202164

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* advance deprecation of v8::ReturnValue<void>::Set(Local<S>).

7168624: [runtime][api] Relax requirements for setter/definer/deleter callbacks | https://chromium-review.googlesource.com/c/v8/v8/+/7168624

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* fixup advance deprecation of v8::ReturnValue<void>::Set(Local<S>)

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* chore: skip setting LPAC ACLs

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Revert "chore: skip setting LPAC ACLs"

This reverts commit e187aec488.

Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>

* chore: revert Convert to UNSAFE_TODO in sandbox

revert https://chromium-review.googlesource.com/c/chromium/src/+/7131661 to see if it fixes the Windows sandbox issue.

Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>

* Revert "chore: revert Convert to UNSAFE_TODO in sandbox"

This reverts commit 57afbfefe5.

Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>

* chore: Revert "Enable network sandbox by default on Windows"

see if this fixes the Windows sandbox issue

Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>

* Enable network sandbox by default on Windows

https://chromium-review.googlesource.com/c/chromium/src/+/7204292

Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>

* Revert "chore: Revert "Enable network sandbox by default on Windows""

This reverts commit 530ab6af82.

Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>

* fixup! Enable network sandbox by default on Windows | https://chromium-review.googlesource.com/c/chromium/src/+/7204292

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* fixup!: Correct flag name, add kLocalNetworkAccessChecks to all platforms

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* chore: remove patch that hasn't been backported

See https://github.com/electron/electron/pull/48675

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Samuel Attard <sattard@anthropic.com>
Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-12-05 12:18:13 -05:00
trop[bot]
0656e76c25 fix: run toast creation on background thread (#49129)
* fix: run toast creation on background thread

notes: attempts to fix app freeze when triggering notifications and the COM server in WindowsShellExperienceHost hangs

Co-authored-by: Jan Hannemann <jan.hannemann@outlook.com>

* fix: comments

Co-authored-by: Jan Hannemann <jan.hannemann@outlook.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Jan Hannemann <jan.hannemann@outlook.com>
2025-12-02 20:41:03 -08:00
trop[bot]
fa9489c8ac chore: reclaim macOS disk space (#49122)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-12-01 15:29:32 -08:00
trop[bot]
8b6d9e1fa6 fix: crash when attempting to resolve modules during process exit (#49104)
* fix: crash when attempting to resolve modules during process exit

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* chore: fix build

Co-authored-by: deepak1556 <hop2deep@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-11-28 02:12:32 +09:00
trop[bot]
5b7e37c8dc ci: use clang problem matcher with nan spec runner (#49098)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-11-27 11:14:10 +01:00
trop[bot]
d2ae9ed69f fix: ensure menu-did-close is emitted for application menus (#49092)
fix: ensure menu-did-close is emitted for application menus

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-11-26 11:47:36 -06:00
trop[bot]
7eb6ff95e4 ci: don't build yarn modules for linux arm (#49086)
This should fix the oom errors

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-11-26 10:32:06 -05:00
trop[bot]
9ec95c0c02 chore: bump chromium to 144.0.7527.0 (40-x-y) (#49057)
chore: bump chromium to 144.0.7527.0 40-x-y

* chore: bump chromium in DEPS to 144.0.7527.0

* 7106405: [video pip] Fix gesture handling issues

https://chromium-review.googlesource.com/c/chromium/src/+/7106405

* 7130938: Reland "Remove some dependencies from the custom_handlers component"

https://chromium-review.googlesource.com/c/chromium/src/+/7130938

* 7139361: Rename PluginService's GetPlugins methods

https://chromium-review.googlesource.com/c/chromium/src/+/7139361

* chore: fixup patch indices

* test: fix macos webgl test | 7128438: Reland "Flip SwiftShader deprecation to launched." | https://chromium-review.googlesource.com/c/chromium/src/+/7128438

* test: update webgl test to skip on fallback adapters

* Fixup spec runner to properly fail on linux when tests fail

* test: fixup dbus tests

* test: convert shared-texture-spec from old done callback to async

Fixes Error: done() called multiple times in test <sharedTexture module import shared texture produced by osr successfully imported and rendered with subtle api> of file /__w/electron/electron/src/electron/spec/api-shared-texture-spec.ts

* test: fixup shared texture spec

* Revert "test: fixup dbus tests"

This reverts commit 3e2e720003.

* test: fixup dbus tests

* test: disable context menu spellcheck tests on linux

https://github.com/electron/electron/pull/48657 broke those tests

* disable sharedTexture tests on platforms other than macOS arm64

They were not working on other platforms previously but now they error out.

Also removed extraneous debugging.

* fix: use github.sha for yarn cache key to avoid hashFiles() composite action bug

* Use --immutable-cache to allow native module builds

* fix: wait for devtools blur event in focus test to avoid race condition

* fix: wait for devtools blur event in focus test to avoid race condition

* fix allow native module builds in spec workspace

* test:rebuild native modules

* Revert "fix allow native module builds in spec workspace"

This reverts commit ffda3be98c.

* Revert "Use --immutable-cache to allow native module builds"

This reverts commit 2e6eea4348.

* Revert "fix: use github.sha for yarn cache key to avoid hashFiles() composite action bug"

This reverts commit 33560ba0de.

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2025-11-24 16:59:42 -05:00
trop[bot]
718bddb407 docs: update linux build instructions (#49063)
* docs: update linux build instructions

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Update docs/development/build-instructions-linux.md

Co-authored-by: Erick Zhao <ezhao@slack-corp.com>

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Update docs/development/build-instructions-linux.md

Co-authored-by: Erick Zhao <ezhao@slack-corp.com>

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-11-24 13:50:48 -06:00
trop[bot]
488b96b18a docs: explain how to create transparent window using BaseWindow (#49052)
docs: clarify how to create transparent BaseWindow

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: teoyuqi <83915879+teoyuqi@users.noreply.github.com>
2025-11-24 09:41:08 +01:00
trop[bot]
0812f7ee86 fix: exception when reading system certificates via nodejs (#49041)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-11-24 14:48:42 +09:00
trop[bot]
cf7a19805e chore: backport 744f40f from devtools-frontend (#49043)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-11-23 21:37:11 +01:00
trop[bot]
23ef7bc703 fix: only call popup closecallback for top-level menu (#49046)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-11-23 21:35:25 +01:00
trop[bot]
8dbc6c14e5 build: automatically install git for dugite (#49029)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-11-21 11:01:25 -05:00
trop[bot]
3209d817ca fix: revert the parent window remained interactive after the modal window was opened (#49021)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: bill.shen <15865969+cucbin@users.noreply.github.com>
2025-11-19 17:08:23 -05:00
trop[bot]
f8d3e0f3cd fix: abort more descriptively for beforeunload (#49010)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-11-19 15:41:59 -05:00
electron-roller[bot]
d9446924dc chore: bump node to v24.11.1 (40-x-y) (#48916)
* chore: bump node in DEPS to v24.11.1

* chore: bump node to v24.11.1 (main) (#48917)

* chore: bump node in DEPS to v24.11.1

* src: add a default branch for module phase

https://github.com/nodejs/node/pull/60261

* src: conditionally disable source phase imports by default

https://github.com/nodejs/node/pull/60364

* chore: update patches

* src: update locks to use DictionaryTemplate and other minor cleanups

https://github.com/nodejs/node/pull/60061

* deps: update simdjson to 4.0.7

https://github.com/nodejs/node/pull/59883

* test: move sea tests into test/sea

https://github.com/nodejs/node/pull/60250

* fixup deps: update simdjson to 4.0.7a

* src: conditionally disable source phase imports by default

https://github.com/nodejs/node/pull/60364

* module: handle null source from async loader hooks in sync hooks

https://github.com/nodejs/node/pull/59929

* Revert "src: conditionally disable source phase imports by default"

This reverts commit 5f85b84262.

* src: allow disabling JS source phase imports

https://github.com/nodejs/node/pull/60364

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-11-18 17:07:34 -05:00
trop[bot]
d1d6befcf1 fix: handle empty event scenario in ipc callbacks (#48991)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-11-18 09:17:51 -05:00
John Kleinschmidt
fe32528c50 build: update to yarn v4 (#48993) 2025-11-17 16:04:51 -08:00
trop[bot]
ef8fad7d8e build: limit workflow gh token permissions (#48966)
* build: limit workflow gh token permissions

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

* feedback

Co-authored-by: Samuel Attard <sattard@anthropic.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: Samuel Attard <sattard@anthropic.com>
2025-11-17 09:44:48 +01:00
trop[bot]
bb9c867f23 build: add header for SetStackDumpFirstChanceCallback in renderer client (#48981)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
2025-11-15 10:04:57 -08:00
trop[bot]
e8e41a28dd fix: revert enabling WASM trap handlers in all Node.js processes (#48976)
Revert "fix: enable wasm trap handlers in all Node.js processes (#48788)"

This reverts commit ca0b46b413.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2025-11-14 18:57:05 -08:00
trop[bot]
fd1db6a8b6 test: add view.getBounds|setBounds tests (#48962)
test: add view.getBounds|setBounds tests

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-11-14 10:57:24 -05:00
trop[bot]
fb62a5873a build: correct uploader copy for tar files (#48954)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
2025-11-14 10:54:37 -05:00
Shelley Vohr
b62a97805a build: fix unnecessary patch (#48957) 2025-11-14 15:05:26 +01:00
electron-roller[bot]
135f127db8 chore: bump chromium to 144.0.7526.0 (40-x-y) (#48913)
* chore: bump chromium in DEPS to 144.0.7524.0

* chore: bump chromium in DEPS to 144.0.7524.1

* chore: bump chromium in DEPS to 144.0.7526.0

* chore: bump chromium in DEPS to 144.0.7526.1

* chore: bump chromium to 144.0.7522.0 (main) (#48892)

* chore: bump chromium in DEPS to 144.0.7522.0

* 7131867: Remove GenericScopedHandle::IsValid in favor of is_valid

https://chromium-review.googlesource.com/c/chromium/src/+/7131867

* 7078879: [video pip] Remove old controls

https://chromium-review.googlesource.com/c/chromium/src/+/7078879

* chore: fixup patch indices

* 7128138: Add a pref to enable Secure DNS 'automatic mode with DoH fallback'.

https://chromium-review.googlesource.com/c/chromium/src/+/7128138

* chore: fixup indices

* fix: pip patch

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
(cherry picked from commit 10b07deb97)

* chore: bump chromium to 144.0.7526.0 (main) (#48932)

* chore: bump chromium in DEPS to 144.0.7526.0

* 7138583: [Partitioned Popins Removal] IPC

https://chromium-review.googlesource.com/c/chromium/src/+/7138583

* chore: fixup patch indices

* 7139794: Partially remove check for global handlers in plugin mime_type code

https://chromium-review.googlesource.com/c/chromium/src/+/7139794

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
(cherry picked from commit 8ecd064d2c)

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-11-13 18:04:34 -05:00
Shelley Vohr
6b797a84a8 chore: cherry-pick 4cf9311 from v8 (#48948) 2025-11-13 14:57:18 -08:00
trop[bot]
57bbcd5233 fix: crash on windows when UTF-8 is in path (#48942)
In 6399527761 we changed the path strings
that `node_modules.cc` operates on from single-byte to wide strings.
Unfortunately this means that `generic_path()` that the
"fix: ensure TraverseParent bails on resource path exit" patch was
calling was no longer a safe method to call on Windows if the underlying
string has unicode characters in it.

Here we fix it by using `ConvertGenericPathToUTF8` from the Node.js
internal utilities.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Fedor Indutny <indutny@signal.org>
2025-11-13 13:53:24 -08:00
trop[bot]
4c042506fe fix: handle tar.xz files in uploaders, add to breaking changes (#48952)
* fix: handle tar.xz files in uploaders, add to breaking changes

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

* docs: add additional file extension info

Co-authored-by: Keeley Hammond <khammond@slack-corp.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2025-11-13 13:21:43 -08:00
trop[bot]
ebd173afea docs: fix docs for app.isHardwareAccelerationEnabled() (#48946)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-11-13 14:59:13 -05:00
trop[bot]
58328779f7 docs: explain how to load SF Symbols with nativeImage (#48940)
* docs: explain how to load SF Symbols with `nativeImage`

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* fix: use single quotes

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* fix: use single quotes

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-11-13 11:18:59 -05:00
trop[bot]
7a5e34e6ca feat: add bypassCustomProtocolHandlers option to net.request (#48883)
* feat: add bypassCustomProtocolHandlers option to net.request

Co-authored-by: Kai <udbmnm@163.com>

* style: fix lint errors in api-protocol-spec

Co-authored-by: Kai <udbmnm@163.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Kai <udbmnm@163.com>
2025-11-13 10:36:25 -05:00
trop[bot]
0c4f0cf729 docs: clarify meaning of string value for menu item icon (#48937)
* docs: clarify meaning of string value for menu item icon

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* fix: format

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

* fix: wording

Co-authored-by: Niklas Wenzel <dev@nikwen.de>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-11-13 10:28:46 -05:00
trop[bot]
e2606bbe48 build: apply additional compression to dsym on upload (#48934)
build: use tar.xz compression

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2025-11-13 13:32:13 +01:00
trop[bot]
543f1670fe fix: Windows: Calling window.setFocusable(true) will no longer cause a window to lose focus (#48927)
Make setFocusable only deactivate a window if focusable is false. Do not deactivate a window when setting focusable to true.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: vulture <isu@vulture.fm>
2025-11-13 09:53:02 +01:00
trop[bot]
fa764f7328 docs: deprecate clipboard API access from renderer processes (#48923)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-11-12 15:16:37 -05:00
trop[bot]
ac7992b801 docs: fix v40 stable release date (#48914)
* docs(timelines): Correct v40.0.0 stable release date

On the Electron Timelines tutorial page (/docs/latest/tutorial/electron-timelines), there is a clear typo in the release schedule for v40.0.0.

The table currently lists the dates as:
* Alpha: 2025-Oct-30
* Beta: 2025-Dec-03
* **Stable: 2025-Oct-28**

This is logically incorrect, as the 'Stable' release date (Oct 28) is listed *before* both the 'Alpha' (Oct 30) and 'Beta' (Dec 03) dates for the same version.

This appears to be a copy-paste error, as the 'Stable' date (2025-Oct-28) is identical to the 'Stable' date for the v39.0.0 release in the preceding row.

This commit updates the 'Stable' date for v40.0.0 to its correct value, ensuring the timeline is accurate and logical.

Co-authored-by: 정승규 <43807509+jsk41755@users.noreply.github.com>

* docs: Update v40.0.0 stable date to 2026-Jan-13 based on Chromium schedule

Co-authored-by: 정승규 <43807509+jsk41755@users.noreply.github.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: 정승규 <43807509+jsk41755@users.noreply.github.com>
2025-11-12 15:44:26 +01:00
trop[bot]
499bb039a4 ci: exclude top-level docs files from full CI (#48896)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-11-11 21:05:54 +01:00
trop[bot]
b0041fdb60 chore: bump chromium to 144.0.7521.0 (40-x-y) (#48894)
* chore: bump chromium in DEPS to 144.0.7521.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: fixup patch indices

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-11-11 21:04:34 +01:00
trop[bot]
c229e274a0 feat: add sharedTexture module to import shared texture (#48831)
feat: add `sharedTexture` module.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: reito <reito@chromium.org>
2025-11-11 11:55:54 -05:00
trop[bot]
16f4655981 build: remove track SSL_ERROR_ZERO_RETURN explicitly patch (#48893)
build: remove track SSL_ERROR_ZERO_RETURN explicitly patch

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-11-11 09:27:32 -06:00
trop[bot]
9e6546da7c chore: delay load pdfjs-dist for pdf spec (#48890)
trap handlers will be initialized once the user script starts
but before app#ready. Wasm compilation before that phase will
break trap handler registeration due to the check in
v8::internal::wasm::UpdateComputedInformation. For some reason
this issue was only visible in <= 39-x-y when pdf-reader.mjs
was being loaded, maybe some module loading logic changed in >= 40-x-y
which are based on Node.js v24.x. In either case, it is best to
align the loading of wasm module required for the tests in light
of changes to how we are registering the trap handlers for the
main process.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-11-11 16:02:34 +01:00
trop[bot]
c05b5e98c4 docs: remove electronegativity (#48886)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
2025-11-11 09:59:20 +01:00
trop[bot]
8bb0f146ea fix: ESM-from-CJS import when CJK is in path (#48862)
Upstream fix: https://github.com/nodejs/node/pull/60575

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Fedor Indutny <indutny@signal.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-11-11 09:47:03 +01:00
trop[bot]
45cc8dd600 chore: bump chromium to 144.0.7520.0 (40-x-y) (#48874)
* chore: bump chromium in DEPS to 144.0.7520.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: fixup patch indices

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-11-10 16:32:54 -05:00
trop[bot]
fe396ef002 feat: add SF Symbol support to NativeImage::CreateFromNamedImage (#48772)
* feat: add SF Symbol support to NativeImage::CreateFromNamedImage

Co-authored-by: TheCommieAxolotl <87679354+TheCommieAxolotl@users.noreply.github.com>

* use obj-c name in NSImage constructor

Co-authored-by: TheCommieAxolotl <87679354+TheCommieAxolotl@users.noreply.github.com>

* add test for named symbol image

Co-authored-by: TheCommieAxolotl <87679354+TheCommieAxolotl@users.noreply.github.com>

* apply suggested simplification

Co-authored-by: TheCommieAxolotl <87679354+TheCommieAxolotl@users.noreply.github.com>

* fix: support NX cocoa prefix

Co-authored-by: TheCommieAxolotl <87679354+TheCommieAxolotl@users.noreply.github.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: TheCommieAxolotl <87679354+TheCommieAxolotl@users.noreply.github.com>
2025-11-10 21:18:00 +01:00
trop[bot]
6876eb2fe9 chore: bump chromium to 144.0.7514.0 (40-x-y) (#48868)
* chore: bump chromium in DEPS to 144.0.7514.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* 7119882: Reorganize //ui/gfx GN build target

https://chromium-review.googlesource.com/c/chromium/src/+/7119882

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Replace includes with forward declares in rect_conversions.h

https://chromium-review.googlesource.com/c/chromium/src/+/7127098

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Add ssl info to TrustedHeaderClient

https://chromium-review.googlesource.com/c/chromium/src/+/7106780

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Replace ContentPluginInfo with WebPluginInfo

https://chromium-review.googlesource.com/c/chromium/src/+/7127893

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Reland "[temporal] Unflag Temporal"

https://chromium-review.googlesource.com/c/v8/v8/+/7123876

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* chore: update .patches after trop

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-11-10 18:32:34 +01:00
trop[bot]
ec84ba6b6c docs: update macOS version support in README (#48871)
Update macOS version support in README

Support for macOS 11 (BigSur) was removed from v38: https://www.electronjs.org/blog/electron-38-0#removed-macos-11-support

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Foad Lind <20255390+foadlind@users.noreply.github.com>
2025-11-10 09:51:26 -05:00
trop[bot]
2e7fdde0fc fix: the parent window remained interactive after the modal window was opened (#48864)
fix: fix the issue where the parent window remained interactive after the modal window was opened in somecases.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Bill Shen <15865969+cucbin@users.noreply.github.com>
2025-11-10 13:55:46 +01:00
trop[bot]
018876adde build: add missing header for SetStackDumpFirstChanceCallback (#48863)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-11-10 12:06:42 +01:00
trop[bot]
59b0747676 refactor: remove spellcheck::kWinDelaySpellcheckServiceInit patch (#48856)
refactor: remove spellcheck::kWinDelaySpellcheckServiceInit patch

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-11-10 09:51:18 +01:00
trop[bot]
d4d89cdd48 fix: CSD window frame tiles properly on Wayland (#48835)
fix: CSD window frame tiles properly on Linux

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Mitchell Cohen <mitch.cohen@me.com>
2025-11-08 10:49:29 +01:00
electron-roller[bot]
1b3ce5d74a chore: bump chromium to 144.0.7512.1 (40-x-y) (#48786)
* chore: bump chromium in DEPS to 144.0.7510.1

* chore: bump chromium in DEPS to 144.0.7512.2

* chore: bump chromium in DEPS to 144.0.7514.0

* chore: bump chromium in DEPS to 144.0.7514.1

* chore: bump chromium to 144.0.7512.1 (main) (#48768)

* chore: bump chromium in DEPS to 144.0.7507.0

* chore: bump chromium in DEPS to 144.0.7508.0

* chore: update patches

* 7101838: [pathbuilder] Enforce immutable SkPath APIs globally

https://chromium-review.googlesource.com/c/chromium/src/+/7101838

* chore: update filenames.libcxx.gni

* [pathbuilder] Enforce immutable SkPath APIs globally

https://chromium-review.googlesource.com/c/chromium/src/+/7101838

* Reduce service_worker_info.h includes in headers

https://chromium-review.googlesource.com/c/chromium/src/+/7108401

* chore: bump chromium in DEPS to 144.0.7510.0

* chore: update patches

* Use internal popup menus for tabs in actor-controlled states

https://chromium-review.googlesource.com/c/chromium/src/+/7074751

* [api] Delete deprecated fields on v8::Isolate

https://chromium-review.googlesource.com/c/v8/v8/+/7081397
xref: 98d243aea0

* Fixup Reduce service_worker_info.h includes in headers

* Promote deprecation of v8::Context and v8::Object API methods

https://chromium-review.googlesource.com/c/v8/v8/+/7087956

* fixup Promote deprecation of v8::Context and v8::Object API methods

* chore: bump chromium in DEPS to 144.0.7512.1

* chore: update patches

* fixup [pathbuilder] Enforce immutable SkPath APIs global

* chore: update filenames.hunspell.gni

* fix deprecation of v8::Context and v8::Object API methods for nan

https://chromium-review.googlesource.com/c/v8/v8/+/7087956

* [PDF] Implement PdfHelpBubbleHandlerFactory

https://chromium-review.googlesource.com/c/chromium/src/+/7056325

also: [PDF Ink Signatures] Hook up IPH
https://chromium-review.googlesource.com/c/chromium/src/+/7056207

* Remove base/hash/md5.h

https://chromium-review.googlesource.com/c/chromium/src/+/7113738

* fixup for lint

* Remove deprecated interceptor callback types and AccessControl enum

https://chromium-review.googlesource.com/c/v8/v8/+/7112747

* fixup for lint

* fixup [PDF] Implement PdfHelpBubbleHandlerFactory

* use base::SHA1HashString instead of std::hash

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-11-07 17:40:25 -05:00
trop[bot]
2ce7bd99c4 docs: Update 404 devtools extension documentation link (#48841)
* docs: Update 404 devtools extension documentation link

https://developer.chrome.com/extensions/devtools

↑Current link is not exists.

So update to most relevant developer.chrome.com page.

https://developer.chrome.com/docs/extensions/how-to/devtools/extend-devtools#creating

Co-authored-by: Ryota Murakami <dojce1048@gmail.com>

* docs: remove unnecessary anchor link

Co-authored-by: Erick Zhao <erick@hotmail.ca>

Co-authored-by: Ryota Murakami <dojce1048@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Ryota Murakami <dojce1048@gmail.com>
2025-11-07 18:42:11 +01:00
trop[bot]
bb52517054 fix: enable wasm trap handlers in all Node.js processes (#48839)
* fix: enable wasm trap handlers in all Node.js processes

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* fix: separate registrations to account for featurelist init

Co-authored-by: deepak1556 <hop2deep@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-11-07 23:49:40 +09:00
trop[bot]
c4d9d9645a fix(reland): allow disabling all NSMenuItems (#48828)
* fix: allow disabling all `NSMenuItems` (#48598)

fix: allow disabling all NSMenuItems

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fix: add guard for type

Co-authored-by: George Xu <george.xu@slack-corp.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: George Xu <george.xu@slack-corp.com>
2025-11-07 11:23:11 +01:00
trop[bot]
6396c12401 fix: oom crash in v8 when optimizing wasm (#48816)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-11-06 10:21:11 -05:00
trop[bot]
3397626653 build: use --keep-non-patch flag with git am (#48807)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-11-06 12:00:07 +01:00
trop[bot]
dd662db5d6 fix: revert allow disabling all NSMenuItems, fix menu crash (#48799)
Revert "fix: allow disabling all `NSMenuItems` (#48598)"

This reverts commit 0cb4fdd0f2.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2025-11-05 20:28:36 -08:00
trop[bot]
11191f23b1 refactor: remove base::AdaptCallbackForRepeating patch (#48790)
refactor: remove base::AdaptCallbackForRepeating patch

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-11-05 18:25:01 -05:00
trop[bot]
e1dadaa6a0 chore: bump chromium to 144.0.7506.0 (40-x-y) (#48767)
* chore: bump chromium in DEPS to 144.0.7504.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: bump chromium in DEPS to 144.0.7506.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: update patches

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* Revert "build: explicitly disable reclient"

This reverts commit e08c6adb08.

No longer needed after https://crrev.com/c/7099239

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* 7097498: Remove MSG_ROUTING_* constants from ipc_message.h

https://chromium-review.googlesource.com/c/chromium/src/+/7097498

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* 7090671: [//gpu] Remove unneeded GpuInfo methods

https://chromium-review.googlesource.com/c/chromium/src/+/7090671

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* 7103701: Remove IPC::PlatformFileForTransit.

https://chromium-review.googlesource.com/c/chromium/src/+/7103701

(This should have been removed with https://github.com/electron/electron/pull/17406).

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* chore: update filenames.libcxx.gni

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* chore: update patches

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-11-05 09:23:03 -05:00
trop[bot]
887294ab5c fix: draw smoothing round rect corner (#48782)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Bill Shen <15865969+cucbin@users.noreply.github.com>
2025-11-05 14:24:05 +01:00
trop[bot]
1265eccf43 build: apply additional compression on upload (#48777)
build: apply additional compression on upload for large files

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <khammond@slack-corp.com>
2025-11-04 20:04:28 +01:00
electron-roller[bot]
23792bc7ed chore: bump node to v24.11.0 (40-x-y) (#48775)
chore: bump node in DEPS to v24.11.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2025-11-04 12:36:51 -05:00
trop[bot]
4138dfeb19 chore: upgrade Node.js to v24.10.0 (#48739)
* chore: upgrade Node.js to v24.10.0

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: fixup crypto patch

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: fixup crypto test patch

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src: prepare for v8 sandboxing

https://github.com/nodejs/node/pull/58376

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* esm: fix module.exports export on CJS modules

https://github.com/nodejs/node/pull/57366

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: fixup lazyload fs patch

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* esm: Source Phase Imports for WebAssembly

https://github.com/nodejs/node/pull/56919

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* module: remove --experimental-default-type

https://github.com/nodejs/node/pull/56092

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* lib,src: refactor assert to load error source from memory

https://github.com/nodejs/node/pull/59751

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src: add source location to v8::TaskRunner

https://github.com/nodejs/node/pull/54077

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src: remove dependency on wrapper-descriptor-based CppHeap

https://github.com/nodejs/node/pull/54077

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src: do not use soon-to-be-deprecated V8 API

https://github.com/nodejs/node/pull/53174

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src: stop using deprecated fields of v8::FastApiCallbackOptions

https://github.com/nodejs/node/pull/54077

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* test: update v8-stats test for V8 12.6

https://github.com/nodejs/node/pull/54077

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* esm: unflag --experimental-wasm-modules

https://github.com/nodejs/node/pull/57038

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* test: adapt assert tests to stack trace changes

https://github.com/nodejs/node/pull/58070

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src,test: unregister the isolate after disposal and before freeing

https://github.com/nodejs/node/pull/58070

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src: use cppgc to manage ContextifyContext

https://github.com/nodejs/node/pull/56522

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src: replace uses of FastApiTypedArray

https://github.com/nodejs/node/pull/58070

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* module: integrate TypeScript into compile cache

https://github.com/nodejs/node/pull/56629

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* deps: update ada to 3.2.7

https://github.com/nodejs/node/pull/59336

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src: make minor cleanups in encoding_binding.cc

https://github.com/nodejs/node/pull/57448

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src: switch from `Get/SetPrototype` to `Get/SetPrototypeV2`

https://github.com/nodejs/node/pull/55453

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src: use non-deprecated Get/SetPrototype methods

https://github.com/nodejs/node/pull/59671

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src: simplify string_bytes with views

https://github.com/nodejs/node/pull/54876

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src: improve utf8 string generation performance

https://github.com/nodejs/node/pull/54873

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src: use non-deprecated Utf8LengthV2() method

https://github.com/nodejs/node/pull/58070

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src: use non-deprecated WriteUtf8V2() method

https://github.com/nodejs/node/pull/58070

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src: refactor WriteUCS2 and remove flags argument

https://github.com/nodejs/node/pull/58163

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src: use String::WriteV2() in TwoByteValue

https://github.com/nodejs/node/pull/58164

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* node-api: use WriteV2 in napi_get_value_string_utf16

https://github.com/nodejs/node/pull/58165

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* node-api: use WriteOneByteV2 in napi_get_value_string_latin1

https://github.com/nodejs/node/pull/58325

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src: migrate WriteOneByte to WriteOneByteV2

https://github.com/nodejs/node/pull/59634

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fs: introduce dirent\.parentPath

https://github.com/nodejs/node/pull/50976

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src: avoid copy by using std::views::keys

https://github.com/nodejs/node/pull/56080

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: fixup patch indices

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fix: errant use of context->GetIsolate()

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fix: tweak BoringSSL compat patch for new changes

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fix: add back missing isolate dtor declaration

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fixup! esm: fix module.exports export on CJS modules

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* cli: remove --no-experimental-fetch flag

https://github.com/nodejs/node/pull/52611/files

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* esm: Source Phase Imports for WebAssembly

https://github.com/nodejs/node/pull/56919

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fixup! src: prepare for v8 sandboxing

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: bump @types/node to v24

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: fix const assignment in crypto test

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fix: sandbox pointer patch issues

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: rework source phase import patch

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src: add percentage support to --max-old-space-size

https://github.com/nodejs/node/pull/59082

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: fixup crypto tests

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: HostImportModuleWithPhaseDynamically todo

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fix: cjs esm failures

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fix: v8::Object::Wrappable issues

- b72a615754
- 490bac2496
- 4896a0dd69

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: remove deleted specs

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* src: use v8::ExternalMemoryAccounter

https://github.com/nodejs/node/pull/58070

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fs: port SonicBoom module to fs module as FastUtf8Stream

https://github.com/nodejs/node/pull/58897

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: tweak sandboxed pr patch

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* test: disable parallel/test-os-checked-function

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* test: use WHATWG URL instead of url.parse

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fix: OPENSSL_secure_zalloc doesn't work in BoringSSL

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* chore: fix accidental extra line

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 7017517: [defer-import-eval] Parse import defer syntax

https://chromium-review.googlesource.com/c/v8/v8/+/7017517

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-11-04 09:52:30 +01:00
trop[bot]
709a9f5f20 fix: release mouse buttons on focus loss on Wayland (#48759)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Mitchell Cohen <mitch.cohen@me.com>
2025-11-03 11:20:43 -05:00
trop[bot]
a2bb5069a5 chore: bump chromium to 144.0.7500.0 (40-x-y) (#48745)
* chore: bump chromium in DEPS to 144.0.7500.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* chore: fixup patch indices

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* 7088768: Reland "download reclient only for chromeos by default"

https://chromium-review.googlesource.com/c/chromium/src/+/7088768

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* Revert "7088768: Reland "download reclient only for chromeos by default""

This reverts commit 149d9fc92e.

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* build: explicitly disable reclient

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>

* 7013355: [api] Remove deprecated PropertyCallbackInfo::Holder()

https://chromium-review.googlesource.com/c/v8/v8/+/7013355

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* Enable video picture-in-picture controls update

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6701399

Co-authored-by: deepak1556 <hop2deep@gmail.com>

* fixup! [api] Remove deprecated PropertyCallbackInfo::Holder()

Co-authored-by: deepak1556 <hop2deep@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-11-03 13:18:33 +01:00
trop[bot]
2b99c7645d refactor: remove redundant map lookups in browser/api/menu.ts (#48732)
perf: avoid double map lookup in Menu.prototype._shouldCommandIdWorkWhenHidden

perf: avoid double map lookup in Menu.prototype._isCommandIdVisible

perf: avoid double map lookup in Menu.prototype._shouldRegisterAcceleratorForCommandId

perf: avoid double map lookup in Menu.prototype._getSharingItemForCommandId

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-10-30 09:43:25 -04:00
trop[bot]
3c8714a940 chore: bump chromium to 143.0.7499.0 (40-x-y) (#48729)
* chore: bump chromium in DEPS to 143.0.7499.0

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>

* 7079895: Allow full screen reentry when full screen parameters changed

https://chromium-review.googlesource.com/c/chromium/src/+/7079895

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-10-29 15:40:58 -04:00
trop[bot]
a01b4becfa docs: use relative link for OffscreenSharedTexture (#48720)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
2025-10-29 00:01:22 -07:00
497 changed files with 30166 additions and 18388 deletions

View File

@@ -2,7 +2,7 @@ version: '3'
services:
buildtools:
image: ghcr.io/electron/devcontainer:933c7d6ff6802706875270bec2e3c891cf8add3f
image: ghcr.io/electron/devcontainer:a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb
volumes:
- ..:/workspaces/gclient/src/electron:cached

View File

@@ -45,6 +45,7 @@ runs:
shell: bash
run: echo "::add-matcher::src/electron/.github/problem-matchers/clang.json"
- name: Build Electron ${{ inputs.step-suffix }}
if: ${{ inputs.target-platform != 'win' }}
shell: bash
run: |
rm -rf "src/out/Default/Electron Framework.framework"
@@ -70,14 +71,37 @@ runs:
# Upload build stats to Datadog
if ! [ -z $DD_API_KEY ]; then
if [ "$TARGET_PLATFORM" = "win" ]; then
npx node electron/script/build-stats.mjs out/Default/siso.exe.INFO --upload-stats || true
else
npx node electron/script/build-stats.mjs out/Default/siso.INFO --upload-stats || true
fi
npx node electron/script/build-stats.mjs out/Default/siso.INFO --upload-stats || true
else
echo "Skipping build-stats.mjs upload because DD_API_KEY is not set"
fi
- name: Build Electron (Windows) ${{ inputs.step-suffix }}
if: ${{ inputs.target-platform == 'win' }}
shell: powershell
run: |
cd src\electron
git pack-refs
cd ..
$env:NINJA_SUMMARIZE_BUILD = 1
if ("${{ inputs.is-release }}" -eq "true") {
e build --target electron:release_build
} else {
e build --target electron:testing_build
}
Copy-Item out\Default\.ninja_log out\electron_ninja_log
node electron\script\check-symlinks.js
# Upload build stats to Datadog
if ($env:DD_API_KEY) {
try {
npx node electron\script\build-stats.mjs out\Default\siso.exe.INFO --upload-stats
} catch {
Write-Host "Build stats upload failed, continuing..."
}
} else {
Write-Host "Skipping build-stats.mjs upload because DD_API_KEY is not set"
}
- name: Verify dist.zip ${{ inputs.step-suffix }}
shell: bash
run: |
@@ -188,10 +212,11 @@ runs:
shell: bash
run: |
cd src/electron
node script/yarn create-typescript-definitions
node script/yarn.js create-typescript-definitions
- name: Publish Electron Dist ${{ inputs.step-suffix }}
if: ${{ inputs.is-release == 'true' }}
shell: bash
id: github-upload
run: |
rm -rf src/out/Default/obj
cd src/electron
@@ -202,6 +227,11 @@ runs:
echo 'Uploading Electron release distribution to GitHub releases'
script/release/uploaders/upload.py --verbose
fi
- name: Generate artifact attestation
if: ${{ inputs.is-release == 'true' }}
uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0
with:
subject-path: ${{ steps.github-upload.outputs.UPLOADED_PATHS }}
- name: Generate siso report
if: ${{ inputs.target-platform != 'win' && !cancelled() }}
shell: bash

View File

@@ -143,16 +143,17 @@ runs:
echo "No changes to patches detected"
fi
fi
- name: Remove patch conflict problem matcher
- name: Remove patch conflict problem matchers
shell: bash
run: |
echo "::remove-matcher owner=merge-conflict::"
echo "::remove-matcher owner=patch-conflict::"
echo "::remove-matcher owner=patch-needs-update::"
- name: Upload patches stats
if: ${{ inputs.target-platform == 'linux' && github.ref == 'refs/heads/main' }}
shell: bash
run: |
npx node src/electron/script/patches-stats.mjs --upload-stats || true
node src/electron/script/patches-stats.mjs --upload-stats || true
# delete all .git directories under src/ except for
# third_party/angle/ and third_party/dawn/ because of build time generation of files
# gen/angle/commit.h depends on third_party/angle/.git/HEAD

View File

@@ -64,15 +64,24 @@ runs:
sudo rm -rf /Applications/Xcode_16.1.app
sudo rm -rf /Applications/Xcode_16.2.app
sudo rm -rf /Applications/Xcode_16.3.app
sudo rm -rf /Applications/Xcode_26*
sudo rm -rf /Applications/Google Chrome.app
sudo rm -rf /Applications/Google Chrome for Testing.app
sudo rm -rf /Applications/Firefox.app
sudo rm -rf /Applications/Firefox.app
sudo rm -rf /Applications/Microsoft Edge.app
sudo rm -rf ~/project/src/third_party/catapult/tracing/test_data
sudo rm -rf ~/project/src/third_party/angle/third_party/VK-GL-CTS
sudo rm -rf /Users/runner/Library/Android
sudo rm -rf $JAVA_HOME_11_arm64
sudo rm -rf $JAVA_HOME_17_arm64
sudo rm -rf $JAVA_HOME_21_arm64
sudo rm -rf $JAVA_HOME_25_arm64
sudo rm -rf /Users/runner/.dotnet/
sudo rm -rf /Users/runner/.rustup
# remove homebrew packages we don't need
brew uninstall -f --zap aws-sam-cli session-manager-plugin gcc gcc@13 gcc@14 llvm@18 gradle maven ant azure-cli
brew autoremove
# lipo off some huge binaries arm64 versions to save space
strip_universal_deep $(xcode-select -p)/../SharedFrameworks

View File

@@ -13,12 +13,16 @@ runs:
- name: Generating Types for SHA in ${{ inputs.sha-file }}
shell: bash
run: |
git checkout $(cat ${{ inputs.sha-file }})
rm -rf node_modules
yarn install --frozen-lockfile --ignore-scripts
export ELECTRON_DIR=$(pwd)
if [ "${{ inputs.sha-file }}" == ".dig-old" ]; then
cd /tmp
git clone https://github.com/electron/electron.git
cd electron
fi
git checkout $(cat $ELECTRON_DIR/${{ inputs.sha-file }})
node script/yarn.js install --immutable
echo "#!/usr/bin/env node\nglobal.x=1" > node_modules/typescript/bin/tsc
node node_modules/.bin/electron-docs-parser --dir=./ --outDir=./ --moduleVersion=0.0.0-development
node node_modules/.bin/electron-typescript-definitions --api=electron-api.json --outDir=artifacts
mv artifacts/electron.d.ts artifacts/${{ inputs.filename }}
git checkout .
mv artifacts/electron.d.ts $ELECTRON_DIR/artifacts/${{ inputs.filename }}
working-directory: ./electron

View File

@@ -15,7 +15,7 @@ runs:
git config --global core.preloadindex true
git config --global core.longpaths true
fi
export BUILD_TOOLS_SHA=a5d9f9052dcc36ee88bef5c8b13acbefd87b7d8d
export BUILD_TOOLS_SHA=4430e4a505e0f4fa2a41b707a10a36f780bbdd26
npm i -g @electron/build-tools
# Update depot_tools to ensure python
e d update_depot_tools

View File

@@ -6,7 +6,7 @@ runs:
- name: Get yarn cache directory path
shell: bash
id: yarn-cache-dir-path
run: echo "dir=$(node src/electron/script/yarn cache dir)" >> $GITHUB_OUTPUT
run: echo "dir=$(node src/electron/script/yarn.js config get cacheFolder)" >> $GITHUB_OUTPUT
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
id: yarn-cache
with:
@@ -18,4 +18,14 @@ runs:
shell: bash
run: |
cd src/electron
node script/yarn install --frozen-lockfile --prefer-offline
if [ "$TARGET_ARCH" = "x86" ]; then
export npm_config_arch="ia32"
fi
# if running on linux arm skip yarn Builds
ARCH=$(uname -m)
if [ "$ARCH" = "armv7l" ]; then
echo "Skipping yarn build on linux arm"
node script/yarn.js install --immutable --mode=skip-build
else
node script/yarn.js install --immutable
fi

View File

@@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "markdownlint",
"pattern": [
{
"regexp": "^(.+):(\\d+):(\\d+)\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"message": 4
}
]
}
]
}

View File

@@ -19,6 +19,16 @@
"line": 3
}
]
},
{
"owner": "patch-needs-update",
"pattern": [
{
"regexp": "^((patches\/.*): needs update)$",
"message": 1,
"file": 2
}
]
}
]
}

73
.github/workflows/apply-patches.yml vendored Normal file
View File

@@ -0,0 +1,73 @@
name: Apply Patches
on:
pull_request:
permissions: {}
concurrency:
group: apply-patches-${{ github.ref }}
cancel-in-progress: true
jobs:
setup:
if: github.repository == 'electron/electron'
runs-on: ubuntu-slim
permissions:
contents: read
pull-requests: read
outputs:
has-patches: ${{ steps.filter.outputs.patches }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}
# Use dorny/paths-filter instead of the path filter under the on: pull_request: block
# so that the output can be used to conditionally run the apply-patches job, which lets
# the job be marked as a required status check (conditional skip counts as a success).
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
patches:
- DEPS
- 'patches/**'
apply-patches:
needs: setup
if: ${{ needs.setup.outputs.has-patches == 'true' }}
runs-on: electron-arc-centralus-linux-amd64-32core
permissions:
contents: read
container:
image: ghcr.io/electron/build:a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb
options: --user root
volumes:
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
- /var/run/sas:/var/run/sas
env:
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
steps:
- name: Checkout Electron
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
path: src/electron
fetch-depth: 0
persist-credentials: false
ref: ${{ github.event.pull_request.base.ref }}
- name: Merge PR HEAD
working-directory: src/electron
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
git config user.email "electron@github.com"
git config user.name "Electron Bot"
git fetch origin refs/pull/${PR_NUMBER}/head
git merge --squash FETCH_HEAD
git commit -n -m "Squashed commits"
- name: Checkout & Sync & Save
uses: ./src/electron/.github/actions/checkout
with:
target-platform: linux

View File

@@ -3,10 +3,14 @@ name: Archaeologist
on:
pull_request:
permissions: {}
jobs:
archaeologist-dig:
name: Archaeologist Dig
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout Electron
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8

View File

@@ -6,11 +6,15 @@ on:
schedule:
- cron: "0 0 * * *"
permissions: {}
jobs:
build-git-cache-linux:
runs-on: electron-arc-centralus-linux-amd64-32core
permissions:
contents: read
container:
image: ghcr.io/electron/build:bc2f48b2415a670de18d13605b1cf0eb5fdbaae1
image: ghcr.io/electron/build:a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb
options: --user root
volumes:
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
@@ -30,8 +34,10 @@ jobs:
build-git-cache-windows:
runs-on: electron-arc-centralus-linux-amd64-32core
permissions:
contents: read
container:
image: ghcr.io/electron/build:bc2f48b2415a670de18d13605b1cf0eb5fdbaae1
image: ghcr.io/electron/build:a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb
options: --user root --device /dev/fuse --cap-add SYS_ADMIN
volumes:
- /mnt/win-cache:/mnt/win-cache
@@ -52,10 +58,12 @@ jobs:
build-git-cache-macos:
runs-on: electron-arc-centralus-linux-amd64-32core
permissions:
contents: read
# This job updates the same git cache as linux, so it needs to run after the linux one.
needs: build-git-cache-linux
container:
image: ghcr.io/electron/build:bc2f48b2415a670de18d13605b1cf0eb5fdbaae1
image: ghcr.io/electron/build:a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb
options: --user root
volumes:
- /mnt/cross-instance-cache:/mnt/cross-instance-cache

View File

@@ -6,7 +6,7 @@ on:
build-image-sha:
type: string
description: 'SHA for electron/build image'
default: '933c7d6ff6802706875270bec2e3c891cf8add3f'
default: 'a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb'
required: true
skip-macos:
type: boolean
@@ -43,10 +43,13 @@ defaults:
run:
shell: bash
permissions: {}
jobs:
setup:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
docs: ${{ steps.filter.outputs.docs }}
@@ -63,13 +66,17 @@ jobs:
filters: |
docs:
- 'docs/**'
- README.md
- SECURITY.md
- CONTRIBUTING.md
- CODE_OF_CONDUCT.md
src:
- '!docs/**'
- name: Set Outputs for Build Image SHA & Docs Only
id: set-output
run: |
if [ -z "${{ inputs.build-image-sha }}" ]; then
echo "build-image-sha=933c7d6ff6802706875270bec2e3c891cf8add3f" >> "$GITHUB_OUTPUT"
echo "build-image-sha=a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb" >> "$GITHUB_OUTPUT"
else
echo "build-image-sha=${{ inputs.build-image-sha }}" >> "$GITHUB_OUTPUT"
fi
@@ -80,6 +87,8 @@ jobs:
needs: setup
if: ${{ !inputs.skip-lint }}
uses: ./.github/workflows/pipeline-electron-lint.yml
permissions:
contents: read
with:
container: '{"image":"ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}","options":"--user root"}'
secrets: inherit
@@ -89,6 +98,8 @@ jobs:
needs: [setup, checkout-linux]
if: ${{ needs.setup.outputs.docs-only == 'true' }}
uses: ./.github/workflows/pipeline-electron-docs-only.yml
permissions:
contents: read
with:
container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
secrets: inherit
@@ -98,6 +109,8 @@ jobs:
needs: setup
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-macos}}
runs-on: electron-arc-centralus-linux-amd64-32core
permissions:
contents: read
container:
image: ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}
options: --user root
@@ -126,6 +139,8 @@ jobs:
needs: setup
if: ${{ !inputs.skip-linux}}
runs-on: electron-arc-centralus-linux-amd64-32core
permissions:
contents: read
container:
image: ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}
options: --user root
@@ -155,6 +170,8 @@ jobs:
needs: setup
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
runs-on: electron-arc-centralus-linux-amd64-32core
permissions:
contents: read
container:
image: ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}
options: --user root --device /dev/fuse --cap-add SYS_ADMIN
@@ -185,6 +202,8 @@ jobs:
# GN Check Jobs
macos-gn-check:
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
permissions:
contents: read
needs: checkout-macos
with:
target-platform: macos
@@ -195,6 +214,8 @@ jobs:
linux-gn-check:
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
permissions:
contents: read
needs: checkout-linux
if: ${{ needs.setup.outputs.src == 'true' }}
with:
@@ -207,6 +228,8 @@ jobs:
windows-gn-check:
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
permissions:
contents: read
needs: checkout-windows
with:
target-platform: win
@@ -310,7 +333,7 @@ jobs:
build-runs-on: electron-arc-centralus-linux-amd64-32core
test-runs-on: electron-arc-centralus-linux-arm64-4core
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
test-container: '{"image":"ghcr.io/electron/test:arm32v7-${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init","volumes":["/home/runner/externals:/mnt/runner-externals"]}'
test-container: '{"image":"ghcr.io/electron/test:arm32v7-${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init --memory=12g","volumes":["/home/runner/externals:/mnt/runner-externals"]}'
target-platform: linux
target-arch: arm
is-release: false
@@ -400,6 +423,8 @@ jobs:
gha-done:
name: GitHub Actions Completed
runs-on: ubuntu-latest
permissions:
contents: read
needs: [docs-only, macos-x64, macos-arm64, linux-x64, linux-x64-asan, linux-arm, linux-arm64, windows-x64, windows-x86, windows-arm64]
if: always() && !contains(needs.*.result, 'failure')
steps:

View File

@@ -1,16 +1,20 @@
name: Clean Source Cache
description: |
This workflow cleans up the source cache on the cross-instance cache volume
to free up space. It runs daily at midnight and clears files older than 15 days.
# Description:
# This workflow cleans up the source cache on the cross-instance cache volume
# to free up space. It runs daily at midnight and clears files older than 15 days.
on:
schedule:
- cron: "0 0 * * *"
permissions: {}
jobs:
clean-src-cache:
runs-on: electron-arc-centralus-linux-amd64-32core
permissions:
contents: read
container:
image: ghcr.io/electron/build:bc2f48b2415a670de18d13605b1cf0eb5fdbaae1
options: --user root

View File

@@ -4,14 +4,15 @@ on:
issues:
types: [labeled]
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
permissions: {}
jobs:
issue-labeled-with-status:
name: status/{confirmed,reviewed} label added
if: github.event.label.name == 'status/confirmed' || github.event.label.name == 'status/reviewed'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Generate GitHub App token
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
@@ -31,6 +32,8 @@ jobs:
name: blocked/* label added
if: startsWith(github.event.label.name, 'blocked/')
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Generate GitHub App token
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1

View File

@@ -11,6 +11,7 @@ jobs:
add-to-issue-triage:
if: ${{ contains(github.event.issue.labels.*.name, 'bug :beetle:') }}
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Generate GitHub App token
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
@@ -28,6 +29,7 @@ jobs:
set-labels:
if: ${{ contains(github.event.issue.labels.*.name, 'bug :beetle:') }}
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Generate GitHub App token
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1

View File

@@ -10,6 +10,7 @@ jobs:
issue-transferred:
name: Issue Transferred
runs-on: ubuntu-latest
permissions: {}
if: ${{ !github.event.changes.new_repository.private }}
steps:
- name: Generate GitHub App token

View File

@@ -4,14 +4,15 @@ on:
issues:
types: [unlabeled]
permissions:
contents: read
permissions: {}
jobs:
issue-unlabeled-blocked:
name: All blocked/* labels removed
if: startsWith(github.event.label.name, 'blocked/') && github.event.issue.state == 'open'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Check for any blocked labels
id: check-for-blocked-labels

View File

@@ -6,7 +6,7 @@ on:
build-image-sha:
type: string
description: 'SHA for electron/build image'
default: '933c7d6ff6802706875270bec2e3c891cf8add3f'
default: 'a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb'
upload-to-storage:
description: 'Uploads to Azure storage'
required: false
@@ -17,9 +17,13 @@ on:
type: boolean
default: false
permissions: {}
jobs:
checkout-linux:
runs-on: electron-arc-centralus-linux-amd64-32core
permissions:
contents: read
container:
image: ghcr.io/electron/build:${{ inputs.build-image-sha }}
options: --user root
@@ -39,7 +43,12 @@ jobs:
uses: ./src/electron/.github/actions/checkout
publish-x64:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write
needs: checkout-linux
with:
environment: production-release
@@ -54,7 +63,12 @@ jobs:
secrets: inherit
publish-arm:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write
needs: checkout-linux
with:
environment: production-release
@@ -69,7 +83,12 @@ jobs:
secrets: inherit
publish-arm64:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write
needs: checkout-linux
with:
environment: production-release

View File

@@ -6,7 +6,7 @@ on:
build-image-sha:
type: string
description: 'SHA for electron/build image'
default: '933c7d6ff6802706875270bec2e3c891cf8add3f'
default: 'a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb'
required: true
upload-to-storage:
description: 'Uploads to Azure storage'
@@ -18,9 +18,13 @@ on:
type: boolean
default: false
permissions: {}
jobs:
checkout-macos:
runs-on: electron-arc-centralus-linux-amd64-32core
permissions:
contents: read
container:
image: ghcr.io/electron/build:${{ inputs.build-image-sha }}
options: --user root
@@ -43,7 +47,12 @@ jobs:
target-platform: macos
publish-x64-darwin:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write
needs: checkout-macos
with:
environment: production-release
@@ -58,7 +67,12 @@ jobs:
secrets: inherit
publish-x64-mas:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write
needs: checkout-macos
with:
environment: production-release
@@ -73,7 +87,12 @@ jobs:
secrets: inherit
publish-arm64-darwin:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write
needs: checkout-macos
with:
environment: production-release
@@ -88,7 +107,12 @@ jobs:
secrets: inherit
publish-arm64-mas:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write
needs: checkout-macos
with:
environment: production-release

View File

@@ -7,6 +7,8 @@ on:
- 'spec/yarn.lock'
- '.github/workflows/**'
- '.github/actions/**'
- '.yarn/**'
- '.yarnrc.yml'
permissions: {}

View File

@@ -55,6 +55,8 @@ on:
type: boolean
default: false
permissions: {}
concurrency:
group: electron-build-and-test-and-nan-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ github.ref_protected == true && github.run_id || github.ref }}
cancel-in-progress: ${{ github.ref_protected != true }}
@@ -62,6 +64,8 @@ concurrency:
jobs:
build:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
permissions:
contents: read
with:
build-runs-on: ${{ inputs.build-runs-on }}
build-container: ${{ inputs.build-container }}
@@ -74,6 +78,10 @@ jobs:
secrets: inherit
test:
uses: ./.github/workflows/pipeline-segment-electron-test.yml
permissions:
contents: read
issues: read
pull-requests: read
needs: build
with:
target-arch: ${{ inputs.target-arch }}
@@ -83,6 +91,8 @@ jobs:
secrets: inherit
nn-test:
uses: ./.github/workflows/pipeline-segment-node-nan-test.yml
permissions:
contents: read
needs: build
with:
target-arch: ${{ inputs.target-arch }}

View File

@@ -64,14 +64,13 @@ concurrency:
group: electron-build-and-test-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ github.ref_protected == true && github.run_id || github.ref }}
cancel-in-progress: ${{ github.ref_protected != true }}
permissions:
contents: read
issues: read
pull-requests: read
permissions: {}
jobs:
build:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
permissions:
contents: read
with:
build-runs-on: ${{ inputs.build-runs-on }}
build-container: ${{ inputs.build-container }}
@@ -86,6 +85,10 @@ jobs:
secrets: inherit
test:
uses: ./.github/workflows/pipeline-segment-electron-test.yml
permissions:
contents: read
issues: read
pull-requests: read
needs: build
with:
target-arch: ${{ inputs.target-arch }}

View File

@@ -8,6 +8,8 @@ on:
description: 'Container to run the docs-only ts compile in'
type: string
permissions: {}
concurrency:
group: electron-docs-only-${{ github.ref }}
cancel-in-progress: true
@@ -19,6 +21,8 @@ jobs:
docs-only:
name: Docs Only Compile
runs-on: electron-arc-centralus-linux-amd64-4core
permissions:
contents: read
timeout-minutes: 20
container: ${{ fromJSON(inputs.container) }}
steps:
@@ -50,12 +54,12 @@ jobs:
shell: bash
run: |
cd src/electron
node script/yarn create-typescript-definitions
node script/yarn tsc -p tsconfig.default_app.json --noEmit
node script/yarn.js create-typescript-definitions
node script/yarn.js tsc -p tsconfig.default_app.json --noEmit
for f in build/webpack/*.js
do
out="${f:29}"
if [ "$out" != "base.js" ]; then
node script/yarn webpack --config $f --output-filename=$out --output-path=./.tmp --env mode=development
node script/yarn.js webpack --config $f --output-filename=$out --output-path=./.tmp --env mode=development
fi
done

View File

@@ -8,6 +8,8 @@ on:
description: 'Container to run lint in'
type: string
permissions: {}
concurrency:
group: electron-lint-${{ github.ref_protected == true && github.run_id || github.ref }}
cancel-in-progress: ${{ github.ref_protected != true }}
@@ -19,6 +21,8 @@ jobs:
lint:
name: Lint
runs-on: electron-arc-centralus-linux-amd64-4core
permissions:
contents: read
timeout-minutes: 20
container: ${{ fromJSON(inputs.container) }}
steps:
@@ -61,9 +65,11 @@ jobs:
curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/buildtools/DEPS?format=TEXT" | base64 -d > src/buildtools/DEPS
gclient sync --spec="solutions=[{'name':'src/buildtools','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':True},'managed':False}]"
- name: Add ESLint problem matcher
- name: Add problem matchers
shell: bash
run: echo "::add-matcher::src/electron/.github/problem-matchers/eslint-stylish.json"
run: |
echo "::add-matcher::src/electron/.github/problem-matchers/eslint-stylish.json"
echo "::add-matcher::src/electron/.github/problem-matchers/markdownlint.json"
- name: Run Lint
shell: bash
run: |
@@ -74,11 +80,15 @@ jobs:
# but then we would lint its contents (at least gn format), and it doesn't pass it.
cd src/electron
node script/yarn install --frozen-lockfile
node script/yarn lint
node script/yarn.js install --immutable
node script/yarn.js lint
- name: Run Script Typechecker
shell: bash
run: |
cd src/electron
node script/yarn tsc -p tsconfig.script.json
node script/yarn.js tsc -p tsconfig.script.json
- name: Check GHA Workflows
shell: bash
run: |
cd src/electron
node script/copy-pipeline-segment-publish.js --check

View File

@@ -59,6 +59,8 @@ on:
type: boolean
default: false
permissions: {}
concurrency:
group: electron-build-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ inputs.target-variant }}-${{ inputs.is-asan }}-${{ github.ref_protected == true && github.run_id || github.ref }}
cancel-in-progress: ${{ github.ref_protected != true }}
@@ -81,6 +83,8 @@ jobs:
run:
shell: bash
runs-on: ${{ inputs.build-runs-on }}
permissions:
contents: read
container: ${{ fromJSON(inputs.build-container) }}
environment: ${{ inputs.environment }}
env:

View File

@@ -26,6 +26,8 @@ on:
type: string
default: testing
permissions: {}
concurrency:
group: electron-gn-check-${{ inputs.target-platform }}-${{ github.ref }}
cancel-in-progress: true
@@ -41,6 +43,8 @@ jobs:
run:
shell: bash
runs-on: ${{ inputs.check-runs-on }}
permissions:
contents: read
container: ${{ fromJSON(inputs.check-container) }}
steps:
- name: Checkout Electron

View File

@@ -0,0 +1,237 @@
# AUTOGENERATED FILE - DO NOT EDIT MANUALLY
# ONLY EDIT .github/workflows/pipeline-segment-electron-build.yml
name: Pipeline Segment - Electron Build
on:
workflow_call:
inputs:
environment:
description: using the production or testing environment
required: false
type: string
target-platform:
type: string
description: Platform to run on, can be macos, win or linux
required: true
target-arch:
type: string
description: Arch to build for, can be x64, arm64, ia32 or arm
required: true
target-variant:
type: string
description: Variant to build for, no effect on non-macOS target platforms. Can
be darwin, mas or all.
default: all
build-runs-on:
type: string
description: What host to run the build
required: true
build-container:
type: string
description: JSON container information for aks runs-on
required: false
default: '{"image":null}'
is-release:
description: Whether this build job is a release job
required: true
type: boolean
default: false
gn-build-type:
description: The gn build type - testing or release
required: true
type: string
default: testing
generate-symbols:
description: Whether or not to generate symbols
required: true
type: boolean
default: false
upload-to-storage:
description: Whether or not to upload build artifacts to external storage
required: true
type: string
default: "0"
is-asan:
description: Building the Address Sanitizer (ASan) Linux build
required: false
type: boolean
default: false
enable-ssh:
description: Enable SSH debugging
required: false
type: boolean
default: false
permissions: {}
concurrency:
group: electron-build-${{ inputs.target-platform }}-${{ inputs.target-arch
}}-${{ inputs.target-variant }}-${{ inputs.is-asan }}-${{
github.ref_protected == true && github.run_id || github.ref }}
cancel-in-progress: ${{ github.ref_protected != true }}
env:
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
CHROMIUM_GIT_COOKIE_WINDOWS_STRING: ${{ secrets.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}
DD_API_KEY: ${{ secrets.DD_API_KEY }}
ELECTRON_ARTIFACTS_BLOB_STORAGE: ${{ secrets.ELECTRON_ARTIFACTS_BLOB_STORAGE }}
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
SUDOWOODO_EXCHANGE_URL: ${{ secrets.SUDOWOODO_EXCHANGE_URL }}
SUDOWOODO_EXCHANGE_TOKEN: ${{ secrets.SUDOWOODO_EXCHANGE_TOKEN }}
GCLIENT_EXTRA_ARGS: ${{ inputs.target-platform == 'macos' &&
'--custom-var=checkout_mac=True --custom-var=host_os=mac' ||
inputs.target-platform == 'win' && '--custom-var=checkout_win=True' ||
'--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' }}
ELECTRON_OUT_DIR: Default
ACTIONS_STEP_DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG }}
jobs:
build:
defaults:
run:
shell: bash
runs-on: ${{ inputs.build-runs-on }}
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write
container: ${{ fromJSON(inputs.build-container) }}
environment: ${{ inputs.environment }}
env:
TARGET_ARCH: ${{ inputs.target-arch }}
TARGET_PLATFORM: ${{ inputs.target-platform }}
steps:
- name: Create src dir
run: |
mkdir src
- name: Checkout Electron
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
path: src/electron
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup SSH Debugging
if: ${{ inputs.target-platform == 'macos' && (inputs.enable-ssh ||
env.ACTIONS_STEP_DEBUG == 'true') }}
uses: ./src/electron/.github/actions/ssh-debug
with:
tunnel: "true"
env:
CLOUDFLARE_TUNNEL_CERT: ${{ secrets.CLOUDFLARE_TUNNEL_CERT }}
CLOUDFLARE_TUNNEL_HOSTNAME: ${{ vars.CLOUDFLARE_TUNNEL_HOSTNAME }}
CLOUDFLARE_USER_CA_CERT: ${{ secrets.CLOUDFLARE_USER_CA_CERT }}
AUTHORIZED_USERS: ${{ secrets.SSH_DEBUG_AUTHORIZED_USERS }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Free up space (macOS)
if: ${{ inputs.target-platform == 'macos' }}
uses: ./src/electron/.github/actions/free-space-macos
- name: Check disk space after freeing up space
if: ${{ inputs.target-platform == 'macos' }}
run: df -h
- name: Setup Node.js/npm
if: ${{ inputs.target-platform == 'macos' }}
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
with:
node-version: 20.19.x
cache: yarn
cache-dependency-path: src/electron/yarn.lock
- name: Install Dependencies
uses: ./src/electron/.github/actions/install-dependencies
- name: Install AZCopy
if: ${{ inputs.target-platform == 'macos' }}
run: brew install azcopy
- name: Set GN_EXTRA_ARGS for Linux
if: ${{ inputs.target-platform == 'linux' }}
run: >
if [ "${{ inputs.target-arch }}" = "arm" ]; then
if [ "${{ inputs.is-release }}" = true ]; then
GN_EXTRA_ARGS='target_cpu="arm" build_tflite_with_xnnpack=false symbol_level=1'
else
GN_EXTRA_ARGS='target_cpu="arm" build_tflite_with_xnnpack=false'
fi
elif [ "${{ inputs.target-arch }}" = "arm64" ]; then
GN_EXTRA_ARGS='target_cpu="arm64" fatal_linker_warnings=false enable_linux_installer=false'
elif [ "${{ inputs.is-asan }}" = true ]; then
GN_EXTRA_ARGS='is_asan=true'
fi
echo "GN_EXTRA_ARGS=$GN_EXTRA_ARGS" >> $GITHUB_ENV
- name: Set Chromium Git Cookie
uses: ./src/electron/.github/actions/set-chromium-cookie
- name: Install Build Tools
uses: ./src/electron/.github/actions/install-build-tools
- name: Generate DEPS Hash
run: |
node src/electron/script/generate-deps-hash.js
DEPSHASH=v1-src-cache-$(cat src/electron/.depshash)
echo "DEPSHASH=$DEPSHASH" >> $GITHUB_ENV
echo "CACHE_PATH=$DEPSHASH.tar" >> $GITHUB_ENV
- name: Restore src cache via AZCopy
if: ${{ inputs.target-platform != 'linux' }}
uses: ./src/electron/.github/actions/restore-cache-azcopy
with:
target-platform: ${{ inputs.target-platform }}
- name: Restore src cache via AKS
if: ${{ inputs.target-platform == 'linux' }}
uses: ./src/electron/.github/actions/restore-cache-aks
- name: Checkout Electron
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
path: src/electron
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Fix Sync
if: ${{ inputs.target-platform != 'linux' }}
uses: ./src/electron/.github/actions/fix-sync
with:
target-platform: ${{ inputs.target-platform }}
env:
ELECTRON_DEPOT_TOOLS_DISABLE_LOG: true
- name: Init Build Tools
run: >
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }}
--import ${{ inputs.gn-build-type }} --target-cpu ${{
inputs.target-arch }} --remote-build siso
- name: Run Electron Only Hooks
run: |
e d gclient runhooks --spec="solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]"
- name: Regenerate DEPS Hash
run: >
(cd src/electron && git checkout .) && node
src/electron/script/generate-deps-hash.js
echo "DEPSHASH=$(cat src/electron/.depshash)" >> $GITHUB_ENV
- name: Add CHROMIUM_BUILDTOOLS_PATH to env
run: echo "CHROMIUM_BUILDTOOLS_PATH=$(pwd)/src/buildtools" >> $GITHUB_ENV
- name: Free up space (macOS)
if: ${{ inputs.target-platform == 'macos' }}
uses: ./src/electron/.github/actions/free-space-macos
- name: Build Electron
if: ${{ inputs.target-platform != 'macos' || (inputs.target-variant == 'all' ||
inputs.target-variant == 'darwin') }}
uses: ./src/electron/.github/actions/build-electron
with:
target-arch: ${{ inputs.target-arch }}
target-platform: ${{ inputs.target-platform }}
artifact-platform: ${{ inputs.target-platform == 'macos' && 'darwin' ||
inputs.target-platform }}
is-release: ${{ inputs.is-release }}
generate-symbols: ${{ inputs.generate-symbols }}
upload-to-storage: ${{ inputs.upload-to-storage }}
is-asan: ${{ inputs.is-asan }}
- name: Set GN_EXTRA_ARGS for MAS Build
if: ${{ inputs.target-platform == 'macos' && (inputs.target-variant == 'all' ||
inputs.target-variant == 'mas') }}
run: |
echo "MAS_BUILD=true" >> $GITHUB_ENV
GN_EXTRA_ARGS='is_mas_build=true'
echo "GN_EXTRA_ARGS=$GN_EXTRA_ARGS" >> $GITHUB_ENV
- name: Build Electron (MAS)
if: ${{ inputs.target-platform == 'macos' && (inputs.target-variant == 'all' ||
inputs.target-variant == 'mas') }}
uses: ./src/electron/.github/actions/build-electron
with:
target-arch: ${{ inputs.target-arch }}
target-platform: ${{ inputs.target-platform }}
artifact-platform: mas
is-release: ${{ inputs.is-release }}
generate-symbols: ${{ inputs.generate-symbols }}
upload-to-storage: ${{ inputs.upload-to-storage }}
step-suffix: (mas)

View File

@@ -35,10 +35,7 @@ concurrency:
group: electron-test-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ inputs.is-asan }}-${{ github.ref_protected == true && github.run_id || github.ref }}
cancel-in-progress: ${{ github.ref_protected != true }}
permissions:
contents: read
issues: read
pull-requests: read
permissions: {}
env:
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
@@ -53,6 +50,10 @@ jobs:
run:
shell: bash
runs-on: ${{ inputs.test-runs-on }}
permissions:
contents: read
issues: read
pull-requests: read
container: ${{ fromJSON(inputs.test-container) }}
strategy:
fail-fast: false
@@ -196,10 +197,7 @@ jobs:
# sudo security authorizationdb write com.apple.trust-settings.admin allow
# cd src/electron
# ./script/codesign/generate-identity.sh
- name: Install Datadog CLI
run: |
cd src/electron
node script/yarn global add @datadog/datadog-ci
- name: Run Electron Tests
shell: bash
env:
@@ -225,7 +223,7 @@ jobs:
export ELECTRON_FORCE_TEST_SUITE_EXIT="true"
fi
fi
node script/yarn test --runners=main --enableRerun=3 --trace-uncaught --enable-logging --files $tests_files
node script/yarn.js test --runners=main --enableRerun=3 --trace-uncaught --enable-logging --files $tests_files
else
chown :builduser .. && chmod g+w ..
chown -R :builduser . && chmod -R g+w .
@@ -242,9 +240,14 @@ jobs:
export MOCHA_TIMEOUT=180000
echo "Piping output to ASAN_SYMBOLIZE ($ASAN_SYMBOLIZE)"
cd electron
runuser -u builduser -- xvfb-run script/actions/run-tests.sh script/yarn test --runners=main --trace-uncaught --enable-logging --files $tests_files | $ASAN_SYMBOLIZE
runuser -u builduser -- xvfb-run script/actions/run-tests.sh script/yarn.js test --runners=main --trace-uncaught --enable-logging --files $tests_files | $ASAN_SYMBOLIZE
else
runuser -u builduser -- xvfb-run script/actions/run-tests.sh script/yarn test --runners=main --trace-uncaught --enable-logging --files $tests_files
if [ "${{ inputs.target-arch }}" = "arm" ]; then
runuser -u builduser -- xvfb-run script/actions/run-tests.sh script/yarn.js test --skipYarnInstall --runners=main --enableRerun=3 --trace-uncaught --enable-logging --files $tests_files
else
runuser -u builduser -- xvfb-run script/actions/run-tests.sh script/yarn.js test --runners=main --enableRerun=3 --trace-uncaught --enable-logging --files $tests_files
fi
fi
fi
- name: Upload Test results to Datadog
@@ -256,9 +259,10 @@ jobs:
DD_TAGS: "os.architecture:${{ inputs.target-arch }},os.family:${{ inputs.target-platform }},os.platform:${{ inputs.target-platform }},asan:${{ inputs.is-asan }}"
run: |
if ! [ -z $DD_API_KEY ] && [ -f src/electron/junit/test-results-main.xml ]; then
export DATADOG_PATH=`node src/electron/script/yarn global bin`
$DATADOG_PATH/datadog-ci junit upload src/electron/junit/test-results-main.xml
fi
cd src/electron
export DATADOG_PATH=`node script/yarn.js bin datadog-ci`
$DATADOG_PATH junit upload junit/test-results-main.xml
fi
if: always() && !cancelled()
- name: Upload Test Artifacts
if: always() && !cancelled()

View File

@@ -26,6 +26,8 @@ on:
type: string
default: testing
permissions: {}
concurrency:
group: electron-node-nan-test-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ github.ref_protected == true && github.run_id || github.ref }}
cancel-in-progress: ${{ github.ref_protected != true }}
@@ -39,6 +41,8 @@ jobs:
node-tests:
name: Run Node.js Tests
runs-on: electron-arc-centralus-linux-amd64-8core
permissions:
contents: read
timeout-minutes: 30
env:
TARGET_ARCH: ${{ inputs.target-arch }}
@@ -93,6 +97,8 @@ jobs:
nan-tests:
name: Run Nan Tests
runs-on: electron-arc-centralus-linux-amd64-4core
permissions:
contents: read
timeout-minutes: 30
env:
TARGET_ARCH: ${{ inputs.target-arch }}
@@ -132,10 +138,16 @@ jobs:
unzip -:o dist.zip
- name: Setup Linux for Headless Testing
run: sh -e /etc/init.d/xvfb start
- name: Add Clang problem matcher
shell: bash
run: echo "::add-matcher::src/electron/.github/problem-matchers/clang.json"
- name: Run Nan Tests
run: |
cd src
node electron/script/nan-spec-runner.js
- name: Remove Clang problem matcher
shell: bash
run: echo "::remove-matcher owner=clang::"
- name: Wait for active SSH sessions
shell: bash
if: always() && !cancelled()

View File

@@ -11,6 +11,7 @@ jobs:
name: backport/requested label added
if: github.event.label.name == 'backport/requested 🗳'
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Trigger Slack workflow
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
@@ -28,6 +29,7 @@ jobs:
name: deprecation-review/complete label added
if: github.event.label.name == 'deprecation-review/complete ✅'
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Generate GitHub App token
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1

View File

@@ -0,0 +1,71 @@
name: Rerun PR Apply Patches
on:
push:
branches:
- main
- '[1-9][0-9]-x-y'
paths:
- 'DEPS'
- 'patches/**'
permissions: {}
jobs:
rerun-apply-patches:
runs-on: ubuntu-latest
permissions:
actions: write
checks: read
contents: read
pull-requests: read
steps:
- name: Find PRs and Rerun Apply Patches
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
run: |
BRANCH="${GITHUB_REF#refs/heads/}"
# Find all open PRs targeting this branch
PRS=$(gh pr list --base "$BRANCH" --state open --limit 250 --json number)
echo "$PRS" | jq -c '.[]' | while read -r pr; do
PR_NUMBER=$(echo "$pr" | jq -r '.number')
echo "Processing PR #${PR_NUMBER}"
# Find the Apply Patches workflow check for this PR
CHECK=$(gh pr view "$PR_NUMBER" --json statusCheckRollup --jq '[.statusCheckRollup[] | select(.workflowName == "Apply Patches" and .name == "apply-patches")] | first')
if [ -z "$CHECK" ] || [ "$CHECK" = "null" ]; then
echo " No Apply Patches workflow found for PR #${PR_NUMBER}"
continue
fi
CONCLUSION=$(echo "$CHECK" | jq -r '.conclusion')
if [ "$CONCLUSION" = "SKIPPED" ]; then
echo " apply-patches job was skipped for PR #${PR_NUMBER} (no patches)"
continue
fi
LINK=$(echo "$CHECK" | jq -r '.detailsUrl')
# Extract the run ID from the link (format: .../runs/RUN_ID/job/JOB_ID)
RUN_ID=$(echo "$LINK" | grep -oE 'runs/[0-9]+' | cut -d'/' -f2)
if [ -z "$RUN_ID" ]; then
echo " Could not extract run ID from link: ${LINK}"
continue
fi
# Check if the workflow is currently in progress
RUN_STATUS=$(gh run view "$RUN_ID" --json status --jq '.status')
if [ "$RUN_STATUS" = "in_progress" ] || [ "$RUN_STATUS" = "queued" ] || [ "$RUN_STATUS" = "waiting" ]; then
echo " Workflow run ${RUN_ID} is ${RUN_STATUS}, cancelling..."
gh run cancel "$RUN_ID" --force
gh run watch "$RUN_ID"
fi
gh run rerun "$RUN_ID"
done

View File

@@ -7,8 +7,7 @@ on:
- edited
- synchronize
permissions:
contents: read
permissions: {}
jobs:
main:

View File

@@ -11,6 +11,7 @@ jobs:
check-stable-prep-items:
name: Check Stable Prep Items
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Generate GitHub App token
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1

View File

@@ -10,6 +10,7 @@ permissions: {}
jobs:
stale:
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Generate GitHub App token
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
@@ -31,6 +32,7 @@ jobs:
only-pr-labels: not-a-real-label
pending-repro:
runs-on: ubuntu-latest
permissions: {}
if: ${{ always() }}
needs: stale
steps:

View File

@@ -0,0 +1,39 @@
name: Update Website Docs
on:
release:
types: [published]
permissions: {}
jobs:
update-website-docs:
name: Update Website Docs
runs-on: ubuntu-latest
environment: website-docs-updater
permissions:
contents: read
id-token: write # needed for secret-service-action
steps:
- name: Get GitHub App token
id: secret-service
uses: electron/secret-service-action@3476425e8b30555aac15b1b7096938e254b0e155 # v1.0.0
- name: Check if this release is the latest
id: check-if-latest-release
env:
GH_REPO: electron/electron
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
LATEST_RELEASE_TAG="$(gh release view --json tagName --jq '.tagName')"
if [ "$LATEST_RELEASE_TAG" = "${GITHUB_REF#refs/tags/}" ]; then
echo "isLatestRelease=true" >> $GITHUB_OUTPUT
else
echo "isLatestRelease=false" >> $GITHUB_OUTPUT
fi
- name: Trigger website docs update
if: ${{ steps.check-if-latest-release.outputs.isLatestRelease }}
env:
GH_REPO: electron/website
GH_TOKEN: ${{ fromJSON(steps.secret-service.outputs.secrets).WEBSITE_DOCS_UPDATER_APP_TOKEN }}
run: |
gh workflow run update-docs.yml -f sha=$GITHUB_SHA

View File

@@ -6,7 +6,7 @@ on:
build-image-sha:
type: string
description: 'SHA for electron/build image'
default: '933c7d6ff6802706875270bec2e3c891cf8add3f'
default: 'a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb'
required: true
upload-to-storage:
description: 'Uploads to Azure storage'
@@ -18,9 +18,13 @@ on:
type: boolean
default: false
permissions: {}
jobs:
checkout-windows:
runs-on: electron-arc-centralus-linux-amd64-32core
permissions:
contents: read
container:
image: ghcr.io/electron/build:${{ inputs.build-image-sha }}
options: --user root --device /dev/fuse --cap-add SYS_ADMIN
@@ -47,7 +51,12 @@ jobs:
target-platform: win
publish-x64-win:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write
needs: checkout-windows
with:
environment: production-release
@@ -61,7 +70,12 @@ jobs:
secrets: inherit
publish-arm64-win:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write
needs: checkout-windows
with:
environment: production-release
@@ -75,7 +89,12 @@ jobs:
secrets: inherit
publish-x86-win:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
permissions:
artifact-metadata: write
attestations: write
contents: read
id-token: write
needs: checkout-windows
with:
environment: production-release

2
.gitignore vendored
View File

@@ -53,3 +53,5 @@ ts-gen
patches/mtime-cache.json
spec/fixtures/logo.png
.yarn/install-state.gz

942
.yarn/releases/yarn-4.12.0.cjs vendored Executable file

File diff suppressed because one or more lines are too long

12
.yarnrc.yml Normal file
View File

@@ -0,0 +1,12 @@
enableScripts: false
nmHoistingLimits: workspaces
nodeLinker: node-modules
npmMinimalAgeGate: 10080
npmPreapprovedPackages:
- "@electron/*"
yarnPath: .yarn/releases/yarn-4.12.0.cjs

View File

@@ -480,6 +480,7 @@ source_set("electron_lib") {
"//device/bluetooth",
"//device/bluetooth/public/cpp",
"//gin",
"//gpu/ipc/client",
"//media/capture/mojom:video_capture",
"//media/mojo/mojom",
"//media/mojo/mojom:web_speech_recognition",
@@ -527,6 +528,7 @@ source_set("electron_lib") {
"//base",
"//base:i18n",
"//content/public/app",
"//ui/base/unowned_user_data",
]
include_dirs = [
@@ -761,11 +763,13 @@ source_set("electron_lib") {
if (enable_pdf_viewer) {
deps += [
"//chrome/browser/resources/pdf:resources",
"//chrome/browser/ui:browser_element_identifiers",
"//components/pdf/browser",
"//components/pdf/browser:interceptors",
"//components/pdf/common:constants",
"//components/pdf/common:util",
"//components/pdf/renderer",
"//components/user_education/webui",
"//pdf",
"//pdf:content_restriction",
]

9
DEPS
View File

@@ -2,9 +2,9 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'143.0.7497.0',
'144.0.7559.173',
'node_version':
'v22.20.0',
'v24.13.0',
'nan_version':
'675cefebca42410733da8a454c8d9391fcebfbc2',
'squirrel.mac_version':
@@ -30,9 +30,6 @@ vars = {
# The path of the sysroots.json file.
'sysroots_json_path': 'electron/script/sysroots.json',
# KEEP IN SYNC WITH utils.js FILE
'yarn_version': '1.22.22',
# To be able to build clean Chromium from sources.
'apply_patches': True,
@@ -155,7 +152,7 @@ hooks = [
'action': [
'python3',
'-c',
'import os, subprocess; os.chdir(os.path.join("src", "electron")); subprocess.check_call(["python3", "script/lib/npx.py", "yarn@' + (Var("yarn_version")) + '", "install", "--frozen-lockfile"]);',
'import os, subprocess; os.chdir(os.path.join("src", "electron")); subprocess.check_call(["node", ".yarn/releases/yarn-4.12.0.cjs", "install", "--immutable"]);',
],
},
{

View File

@@ -37,7 +37,7 @@ For more installation options and troubleshooting tips, see
Each Electron release provides binaries for macOS, Windows, and Linux.
* macOS (Big Sur and up): Electron provides 64-bit Intel and Apple Silicon / ARM binaries for macOS.
* macOS (Monterey and up): Electron provides 64-bit Intel and Apple Silicon / ARM binaries for macOS.
* Windows (Windows 10 and up): Electron provides `ia32` (`x86`), `x64` (`amd64`), and `arm64` binaries for Windows. Windows on ARM support was added in Electron 5.0.8. Support for Windows 7, 8 and 8.1 was [removed in Electron 23, in line with Chromium's Windows deprecation policy](https://www.electronjs.org/blog/windows-7-to-8-1-deprecation-notice).
* Linux: The prebuilt binaries of Electron are built on Ubuntu 22.04. They have also been verified to work on:
* Ubuntu 18.04 and newer

View File

@@ -383,6 +383,8 @@ static_library("chrome") {
"//chrome/browser/pdf/chrome_pdf_stream_delegate.h",
"//chrome/browser/pdf/pdf_extension_util.cc",
"//chrome/browser/pdf/pdf_extension_util.h",
"//chrome/browser/pdf/pdf_help_bubble_handler_factory.cc",
"//chrome/browser/pdf/pdf_help_bubble_handler_factory.h",
"//chrome/browser/pdf/pdf_viewer_stream_manager.cc",
"//chrome/browser/pdf/pdf_viewer_stream_manager.h",
"//chrome/browser/plugins/pdf_iframe_navigation_throttle.cc",
@@ -391,6 +393,8 @@ static_library("chrome") {
deps += [
"//components/pdf/browser",
"//components/pdf/renderer",
"//ui/base/interaction",
"//ui/webui/resources/cr_components/help_bubble:mojo_bindings",
]
}
} else {

View File

@@ -611,7 +611,7 @@ Returns `string` - The current application directory.
may backup this directory to cloud storage.
* `sessionData` The directory for storing data generated by `Session`, such
as localStorage, cookies, disk cache, downloaded dictionaries, network
state, devtools files. By default this points to `userData`. Chromium may
state, DevTools files. By default this points to `userData`. Chromium may
write very large disk cache here, so if your app does not rely on browser
storage like localStorage or cookies to save user data, it is recommended
to set this directory to other locations to avoid polluting the `userData`
@@ -632,7 +632,7 @@ Returns `string` - The current application directory.
Returns `string` - A path to a special directory or file associated with `name`. On
failure, an `Error` is thrown.
If `app.getPath('logs')` is called without called `app.setAppLogsPath()` being called first, a default log directory will be created equivalent to calling `app.setAppLogsPath()` without a `path` parameter.
If `app.getPath('logs')` is called without calling `app.setAppLogsPath()` being called first, a default log directory will be created equivalent to calling `app.setAppLogsPath()` without a `path` parameter.
### `app.getFileIcon(path[, options])`
@@ -647,7 +647,7 @@ Returns `Promise<NativeImage>` - fulfilled with the app's icon, which is a [Nati
Fetches a path's associated icon.
On _Windows_, there a 2 kinds of icons:
On _Windows_, there are 2 kinds of icons:
* Icons associated with certain file extensions, like `.mp3`, `.png`, etc.
* Icons inside the file itself, like `.exe`, `.dll`, `.ico`.
@@ -763,7 +763,7 @@ app.getPreferredSystemLanguages() // ['fr-CA', 'en-US', 'zh-Hans-FI', 'es-419']
Both the available languages and regions and the possible return values differ between the two operating systems.
As can be seen with the example above, on Windows, it is possible that a preferred system language has no country code, and that one of the preferred system languages corresponds with the language used for the regional format. On macOS, the region serves more as a default country code: the user doesn't need to have Finnish as a preferred language to use Finland as the region,and the country code `FI` is used as the country code for preferred system languages that do not have associated countries in the language name.
As can be seen with the example above, on Windows, it is possible that a preferred system language has no country code, and that one of the preferred system languages corresponds with the language used for the regional format. On macOS, the region serves more as a default country code: the user doesn't need to have Finnish as a preferred language to use Finland as the region, and the country code `FI` is used as the country code for preferred system languages that do not have associated countries in the language name.
### `app.addRecentDocument(path)` _macOS_ _Windows_
@@ -1217,7 +1217,7 @@ This method can only be called before app is ready.
### `app.isHardwareAccelerationEnabled()`
Returns `boolean` - whether hardware acceleration is currently disabled.
Returns `boolean` - whether hardware acceleration is currently enabled.
> [!NOTE]
> This information is only usable after the `gpu-info-update` event is emitted.
@@ -1225,7 +1225,7 @@ Returns `boolean` - whether hardware acceleration is currently disabled.
### `app.disableDomainBlockingFor3DAPIs()`
By default, Chromium disables 3D APIs (e.g. WebGL) until restart on a per
domain basis if the GPU processes crashes too frequently. This function
domain basis if the GPU process crashes too frequently. This function
disables that behavior.
This method can only be called before app is ready.
@@ -1284,6 +1284,8 @@ For `infoType` equal to `basic`:
Using `basic` should be preferred if only basic information like `vendorId` or `deviceId` is needed.
Promise is rejected if the GPU is completely disabled, i.e. no hardware and software implementations are available.
### `app.setBadgeCount([count])` _Linux_ _macOS_
* `count` Integer (optional) - If a value is provided, set the badge to the provided value otherwise, on macOS, display a plain white dot (e.g. unknown number of notifications). On Linux, if a value is not provided the badge will not display.

View File

@@ -32,9 +32,19 @@ update process. Apps that need to disable ATS can add the
### Windows
On Windows, you have to install your app into a user's machine before you can
use the `autoUpdater`, so it is recommended that you use
[electron-winstaller][installer-lib] or [Electron Forge's Squirrel.Windows maker][electron-forge-lib] to generate a Windows installer.
On Windows, the `autoUpdater` module automatically selects the appropriate update mechanism
based on how your app is packaged:
* **MSIX packages**: If your app is running as an MSIX package (created with [electron-windows-msix][msix-lib] and detected via [`process.windowsStore`](process.md#processwindowsstore-readonly)),
the module uses the MSIX updater, which supports direct MSIX file links and JSON update feeds.
* **Squirrel.Windows**: For apps installed via traditional installers (created with
[electron-winstaller][installer-lib] or [Electron Forge's Squirrel.Windows maker][electron-forge-lib]),
the module uses Squirrel.Windows for updates.
You don't need to configure which updater to use; Electron automatically detects the packaging
format and uses the appropriate one.
#### Squirrel.Windows
Apps built with Squirrel.Windows will trigger [custom launch events](https://github.com/Squirrel/Squirrel.Windows/blob/51f5e2cb01add79280a53d51e8d0cfa20f8c9f9f/docs/using/custom-squirrel-events-non-cs.md#application-startup-commands)
that must be handled by your Electron application to ensure proper setup and teardown.
@@ -55,6 +65,14 @@ The installer generated with Squirrel.Windows will create a shortcut icon with a
same ID for your app with `app.setAppUserModelId` API, otherwise Windows will
not be able to pin your app properly in task bar.
#### MSIX Packages
When your app is packaged as an MSIX, the `autoUpdater` module provides additional
functionality:
* Use the `allowAnyVersion` option in `setFeedURL()` to allow updates to older versions (downgrades)
* Support for direct MSIX file links or JSON update feeds (similar to Squirrel.Mac format)
## Events
The `autoUpdater` object emits the following events:
@@ -92,7 +110,7 @@ Returns:
Emitted when an update has been downloaded.
On Windows only `releaseName` is available.
With Squirrel.Windows only `releaseName` is available.
> [!NOTE]
> It is not strictly necessary to handle this event. A successfully
@@ -100,6 +118,13 @@ On Windows only `releaseName` is available.
### Event: 'before-quit-for-update'
<!--
```YAML history
added:
- pr-url: https://github.com/electron/electron/pull/12619
```
-->
This event is emitted after a user calls `quitAndInstall()`.
When this API is called, the `before-quit` event is not emitted before all windows are closed. As a result you should listen to this event if you wish to perform actions before the windows are closed while a process is quitting, as well as listening to `before-quit`.
@@ -110,11 +135,23 @@ The `autoUpdater` object has the following methods:
### `autoUpdater.setFeedURL(options)`
<!--
```YAML history
changes:
- pr-url: https://github.com/electron/electron/pull/5879
description: "Added `headers` as a second parameter."
- pr-url: https://github.com/electron/electron/pull/11925
description: "Changed API to accept a single `options` argument (contains `url`, `headers`, and `serverType` properties)."
```
-->
* `options` Object
* `url` string
* `url` string - The update server URL. For _Windows_ MSIX, this can be either a direct link to an MSIX file (e.g., `https://example.com/update.msix`) or a JSON endpoint that returns update information (see the [Squirrel.Mac][squirrel-mac] README for more information).
* `headers` Record\<string, string\> (optional) _macOS_ - HTTP request headers.
* `serverType` string (optional) _macOS_ - Can be `json` or `default`, see the [Squirrel.Mac][squirrel-mac]
README for more information.
* `allowAnyVersion` boolean (optional) _Windows_ - If `true`, allows downgrades to older versions for MSIX packages.
Defaults to `false`.
Sets the `url` and initialize the auto updater.
@@ -151,3 +188,4 @@ closed.
[electron-forge-lib]: https://www.electronforge.io/config/makers/squirrel.windows
[app-user-model-id]: https://learn.microsoft.com/en-us/windows/win32/shell/appids
[event-emitter]: https://nodejs.org/api/events.html#events_class_eventemitter
[msix-lib]: https://github.com/electron-userland/electron-windows-msix

View File

@@ -756,6 +756,9 @@ Returns [`Rectangle`](structures/rectangle.md) - The `bounds` of the window as `
> [!NOTE]
> On macOS, the y-coordinate value returned will be at minimum the [Tray](tray.md) height. For example, calling `win.setBounds({ x: 25, y: 20, width: 800, height: 600 })` with a tray height of 38 means that `win.getBounds()` will return `{ x: 25, y: 38, width: 800, height: 600 }`.
> [!NOTE]
> On Wayland, this method will return `{ x: 0, y: 0, ... }` as introspecting or programmatically changing the global window coordinates is prohibited.
#### `win.getBackgroundColor()`
Returns `string` - Gets the background color of the window in Hex (`#RRGGBB`) format.
@@ -969,6 +972,9 @@ Moves window to `x` and `y`.
Returns `Integer[]` - Contains the window's current position.
> [!NOTE]
> On Wayland, this method will return `[0, 0]` as introspecting or programmatically changing the global window coordinates is prohibited.
#### `win.setTitle(title)`
* `title` string
@@ -1043,7 +1049,7 @@ under this mode apps can choose to optimize their UI for tablets, such as
enlarging the titlebar and hiding titlebar buttons.
This API returns whether the window is in tablet mode, and the `resize` event
can be be used to listen to changes to tablet mode.
can be used to listen to changes to tablet mode.
#### `win.getMediaSourceId()`

View File

@@ -849,6 +849,9 @@ Returns [`Rectangle`](structures/rectangle.md) - The `bounds` of the window as `
> [!NOTE]
> On macOS, the y-coordinate value returned will be at minimum the [Tray](tray.md) height. For example, calling `win.setBounds({ x: 25, y: 20, width: 800, height: 600 })` with a tray height of 38 means that `win.getBounds()` will return `{ x: 25, y: 38, width: 800, height: 600 }`.
> [!NOTE]
> On Wayland, this method will return `{ x: 0, y: 0, ... }` as introspecting or programmatically changing the global window coordinates is prohibited.
#### `win.getBackgroundColor()`
Returns `string` - Gets the background color of the window in Hex (`#RRGGBB`) format.
@@ -1062,6 +1065,9 @@ Moves window to `x` and `y`.
Returns `Integer[]` - Contains the window's current position.
> [!NOTE]
> On Wayland, this method will return `[0, 0]` as introspecting or programmatically changing the global window coordinates is prohibited.
#### `win.setTitle(title)`
* `title` string
@@ -1134,7 +1140,7 @@ under this mode apps can choose to optimize their UI for tablets, such as
enlarging the titlebar and hiding titlebar buttons.
This API returns whether the window is in tablet mode, and the `resize` event
can be be used to listen to changes to tablet mode.
can be used to listen to changes to tablet mode.
#### `win.getMediaSourceId()`
@@ -1227,7 +1233,8 @@ Captures a snapshot of the page within `rect`. Omitting `rect` will capture the
Returns `Promise<void>` - the promise will resolve when the page has finished loading
(see [`did-finish-load`](web-contents.md#event-did-finish-load)), and rejects
if the page fails to load (see [`did-fail-load`](web-contents.md#event-did-fail-load)).
if the page fails to load (see
[`did-fail-load`](web-contents.md#event-did-fail-load)). A noop rejection handler is already attached, which avoids unhandled rejection errors. If the existing page has a beforeUnload handler, [`did-fail-load`](web-contents.md#event-did-fail-load) will be called unless [`will-prevent-unload`](web-contents.md#event-did-fail-load) is handled.
Same as [`webContents.loadURL(url[, options])`](web-contents.md#contentsloadurlurl-options).

View File

@@ -25,6 +25,11 @@ following properties:
with which the request is associated. Defaults to the empty string. The
`session` option supersedes `partition`. Thus if a `session` is explicitly
specified, `partition` is ignored.
* `bypassCustomProtocolHandlers` boolean (optional) - When set to `true`,
custom protocol handlers registered for the request's URL scheme will not be
called. This allows forwarding an intercepted request to the built-in
handler. [webRequest](web-request.md) handlers will still be triggered
when bypassing custom protocols. Defaults to `false`.
* `credentials` string (optional) - Can be `include`, `omit` or
`same-origin`. Whether to send
[credentials](https://fetch.spec.whatwg.org/#credentials) with this
@@ -259,7 +264,7 @@ will not be allowed. The `finish` event is emitted just after the end operation.
Cancels an ongoing HTTP transaction. If the request has already emitted the
`close` event, the abort operation will have no effect. Otherwise an ongoing
event will emit `abort` and `close` events. Additionally, if there is an ongoing
response object,it will emit the `aborted` event.
response object, it will emit the `aborted` event.
#### `request.followRedirect()`

View File

@@ -2,10 +2,13 @@
> Perform copy and paste operations on the system clipboard.
Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process) (non-sandboxed only)
Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process) _Deprecated_ (non-sandboxed only)
> [!NOTE]
> Using the `clipboard` API from the renderer process is deprecated.
> [!IMPORTANT]
> If you want to call this API from a renderer process with context isolation enabled,
> If you want to call this API from a renderer process,
> place the API call in your preload script and
> [expose](../tutorial/context-isolation.md#after-context-isolation-enabled) it using the
> [`contextBridge`](context-bridge.md) API.

View File

@@ -168,7 +168,7 @@ Enables net log events to be saved and writes them to `path`.
Sets the verbosity of logging when used together with `--enable-logging`.
`N` should be one of [Chrome's LogSeverities][severities].
Note that two complimentary logging mechanisms in Chromium -- `LOG()`
Note that two complementary logging mechanisms in Chromium -- `LOG()`
and `VLOG()` -- are controlled by different switches. `--log-level`
controls `LOG()` messages, while `--v` and `--vmodule` control `VLOG()`
messages. So you may want to use a combination of these three switches
@@ -313,7 +313,7 @@ By default inspector websocket url is available in stderr and under /json/list e
### `--experimental-network-inspection`
Enable support for devtools network inspector events, for visibility into requests made by the nodejs `http` and `https` modules.
Enable support for DevTools network inspector events, for visibility into requests made by the nodejs `http` and `https` modules.
### `--no-deprecation`

View File

@@ -49,7 +49,7 @@ Use the `system-ui` keyword to match the smoothness to the OS design language.
| Value: | `60%` | `0%` |
| Example: | ![A rectangle with round corners whose smoothness matches macOS](../images/corner-smoothing-example-60.svg) | ![A rectangle with round corners whose smoothness matches Windows and Linux](../images/corner-smoothing-example-0.svg) |
### Controlling availibility
### Controlling availability
This CSS rule can be disabled using the Blink feature flag `ElectronCSSCornerSmoothing`.

View File

@@ -44,7 +44,7 @@ Returns:
* `reason` string - Reason for detaching debugger.
Emitted when the debugging session is terminated. This happens either when
`webContents` is closed or devtools is invoked for the attached `webContents`.
`webContents` is closed or DevTools is invoked for the attached `webContents`.
#### Event: 'message'

View File

@@ -344,7 +344,7 @@ Displays a modal dialog that shows an error message.
This API can be called safely before the `ready` event the `app` module emits,
it is usually used to report errors in early stage of startup. If called
before the app `ready`event on Linux, the message will be emitted to stderr,
before the app `ready` event on Linux, the message will be emitted to stderr,
and no GUI dialog will appear.
### `dialog.showCertificateTrustDialog([window, ]options)` _macOS_ _Windows_

View File

@@ -159,6 +159,22 @@ Notification activated (com.github.Electron:notification:EAF7B87C-A113-43D7-8E76
Notification replied to (com.github.Electron:notification:EAF7B87C-A113-43D7-8E76-F88EC9D73D44)
```
### `ELECTRON_DEBUG_MSIX_UPDATER`
Adds extra logs to MSIX updater operations on Windows to aid in debugging. Extra logging will be displayed when MSIX update operations are initiated, including package updates, package registration, and restart registration. This helps diagnose issues with MSIX package updates and deployments.
Sample output:
```sh
UpdateMsix called with URI: https://example.com/app.msix
DoUpdateMsix: Starting
Calling AddPackageByUriAsync... URI: https://example.com/app.msix
Update options - deferRegistration: true, developerMode: false, forceShutdown: false, forceTargetShutdown: false, forceUpdateFromAnyVersion: false
Waiting for deployment...
Deployment finished.
MSIX Deployment completed.
```
### `ELECTRON_LOG_ASAR_READS`
When Electron reads from an ASAR file, log the read offset and file path to
@@ -186,3 +202,14 @@ the one downloaded by `npm install`. Usage:
```sh
export ELECTRON_OVERRIDE_DIST_PATH=/Users/username/projects/electron/out/Testing
```
### `ELECTRON_SKIP_BINARY_DOWNLOAD`
If you want to install your project's dependencies but don't need to use Electron functionality,
you can set the `ELECTRON_SKIP_BINARY_DOWNLOAD` environment variable to prevent the binary from being
downloaded. For instance, this feature can be useful in continuous integration environments when
running unit tests that mock out the `electron` module.
```sh
ELECTRON_SKIP_BINARY_DOWNLOAD=1 npm install
```

View File

@@ -57,7 +57,7 @@ The following methods are available on instances of `Extensions`:
* `options` Object (optional)
* `allowFileAccess` boolean - Whether to allow the extension to read local files over `file://`
protocol and inject content scripts into `file://` pages. This is required e.g. for loading
devtools extensions on `file://` URLs. Defaults to false.
DevTools extensions on `file://` URLs. Defaults to false.
Returns `Promise<Extension>` - resolves when the extension is loaded.
@@ -83,7 +83,7 @@ const path = require('node:path')
app.whenReady().then(async () => {
await session.defaultSession.extensions.loadExtension(
path.join(__dirname, 'react-devtools'),
// allowFileAccess is required to load the devtools extension on file:// URLs.
// allowFileAccess is required to load the DevTools extension on file:// URLs.
{ allowFileAccess: true }
)
// Note that in order to use the React DevTools extension, you'll need to

View File

@@ -34,7 +34,7 @@ Returns:
* `error` Error - Typically holds an error string identifying failure root cause.
Emitted when an error was encountered while streaming response data events. For
instance, if the server closes the underlying while the response is still
instance, if the server closes the underlying connection while the response is still
streaming, an `error` event will be emitted on the response object and a `close`
event will subsequently follow on the request object.

View File

@@ -17,7 +17,7 @@ See [`Menu`](menu.md) for examples.
* `options` Object
* `click` Function (optional) - Will be called with
`click(menuItem, window, event)` when the menu item is clicked.
* `menuItem` MenuItem
* `menuItem` [MenuItem](menu-item.md)
* `window` [BaseWindow](base-window.md) | undefined - This will not be defined if no window is open.
* `event` [KeyboardEvent](structures/keyboard-event.md)
* `role` string (optional) - Can be `undo`, `redo`, `cut`, `copy`, `paste`, `pasteAndMatchStyle`, `delete`, `selectAll`, `reload`, `forceReload`, `toggleDevTools`, `resetZoom`, `zoomIn`, `zoomOut`, `toggleSpellChecker`, `togglefullscreen`, `window`, `minimize`, `close`, `help`, `about`, `services`, `hide`, `hideOthers`, `unhide`, `quit`, `showSubstitutions`, `toggleSmartQuotes`, `toggleSmartDashes`, `toggleTextReplacement`, `startSpeaking`, `stopSpeaking`, `zoom`, `front`, `appMenu`, `fileMenu`, `editMenu`, `viewMenu`, `shareMenu`, `recentDocuments`, `toggleTabBar`, `selectNextTab`, `selectPreviousTab`, `showAllTabs`, `mergeAllWindows`, `clearRecentDocuments`, `moveTabToNewWindow` or `windowMenu` - Define the action of the menu item, when specified the
@@ -34,7 +34,8 @@ See [`Menu`](menu.md) for examples.
* `sublabel` string (optional) _macOS_ - Available in macOS >= 14.4
* `toolTip` string (optional) _macOS_ - Hover text for this menu item.
* `accelerator` string (optional) - An [Accelerator](../tutorial/keyboard-shortcuts.md#accelerators) string.
* `icon` ([NativeImage](native-image.md) | string) (optional)
* `icon` ([NativeImage](native-image.md) | string) (optional) - Can be a
[NativeImage](native-image.md) or the file path of an icon.
* `enabled` boolean (optional) - If false, the menu item will be greyed out and
unclickable.
* `acceleratorWorksWhenHidden` boolean (optional) _macOS_ - default is `true`, and when `false` will prevent the accelerator from triggering the item if the item is not visible.
@@ -90,7 +91,7 @@ It can be called with `menuItem.click(event, focusedWindow, focusedWebContents)`
#### `menuItem.submenu`
A `Menu` (optional) containing the menu
A [`Menu`](menu.md) (optional) containing the menu
item's submenu, if present.
#### `menuItem.type`
@@ -106,7 +107,7 @@ A `string` (optional) indicating the item's role, if set. Can be `undo`, `redo`,
#### `menuItem.accelerator`
An `Accelerator` (optional) indicating the item's accelerator, if set.
An `Accelerator | null` indicating the item's accelerator, if set.
#### `menuItem.userAccelerator` _Readonly_ _macOS_
@@ -170,4 +171,4 @@ A `number` indicating an item's sequential unique id.
#### `menuItem.menu`
A `Menu` that the item is a part of.
A [`Menu`](menu.md) that the item is a part of.

View File

@@ -23,7 +23,7 @@ The `Menu` class has the following static methods:
#### `Menu.setApplicationMenu(menu)`
- `menu` Menu | null
- `menu` [Menu](menu.md) | null
Sets `menu` as the application menu on macOS. On Windows and Linux, the
`menu` will be set as each window's top menu.
@@ -34,7 +34,7 @@ indicate which letter should get a generated accelerator. For example, using
opens the associated menu. The indicated character in the button label then gets an
underline, and the `&` character is not displayed on the button label.
In order to escape the `&` character in an item name, add a proceeding `&`. For example, `&&File` would result in `&File` displayed on the button label.
In order to escape the `&` character in an item name, add a preceding `&`. For example, `&&File` would result in `&File` displayed on the button label.
Passing `null` will suppress the default menu. On Windows and Linux,
this has the additional effect of removing the menu bar from the window.
@@ -65,9 +65,9 @@ for more information on macOS' native actions.
#### `Menu.buildFromTemplate(template)`
- `template` (MenuItemConstructorOptions | MenuItem)[]
- `template` (MenuItemConstructorOptions | [MenuItem](menu-item.md))[]
Returns `Menu`
Returns [`Menu`](menu.md)
Generally, the `template` is an array of `options` for constructing a
[MenuItem](menu-item.md). The usage can be referenced above.

View File

@@ -202,8 +202,7 @@ Creates a new `NativeImage` instance from `dataUrl`, a base 64 encoded [Data URL
Returns `NativeImage`
Creates a new `NativeImage` instance from the `NSImage` that maps to the
given image name. See Apple's [`NSImageName`](https://developer.apple.com/documentation/appkit/nsimagename#2901388)
documentation for a list of possible values.
given image name. See Apple's [`NSImageName`](https://developer.apple.com/documentation/appkit/nsimagename#2901388) documentation and [SF Symbols](https://developer.apple.com/sf-symbols/) for a list of possible values.
The `hslShift` is applied to the image with the following rules:
@@ -231,6 +230,15 @@ echo -e '#import <Cocoa/Cocoa.h>\nint main() { NSLog(@"%@", SYSTEM_IMAGE_NAME);
where `SYSTEM_IMAGE_NAME` should be replaced with any value from [this list](https://developer.apple.com/documentation/appkit/nsimagename?language=objc).
For SF Symbols, usage looks as follows:
```js
const image = nativeImage.createFromNamedImage('square.and.pencil')
```
where `'square.and.pencil'` is the symbol name from the
[SF Symbols app](https://developer.apple.com/sf-symbols/).
## Class: NativeImage
> Natively wrap images such as tray, dock, and application icons.

View File

@@ -36,7 +36,7 @@ everything will be reset to the OS default. By default `themeSource` is `system
Settings this property to `dark` will have the following effects:
* `nativeTheme.shouldUseDarkColors` will be `true` when accessed
* Any UI Electron renders on Linux and Windows including context menus, devtools, etc. will use the dark UI.
* Any UI Electron renders on Linux and Windows including context menus, DevTools, etc. will use the dark UI.
* Any UI the OS renders on macOS including menus, window frames, etc. will use the dark UI.
* The [`prefers-color-scheme`](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) CSS query will match `dark` mode.
* The `updated` event will be emitted
@@ -44,7 +44,7 @@ Settings this property to `dark` will have the following effects:
Settings this property to `light` will have the following effects:
* `nativeTheme.shouldUseDarkColors` will be `false` when accessed
* Any UI Electron renders on Linux and Windows including context menus, devtools, etc. will use the light UI.
* Any UI Electron renders on Linux and Windows including context menus, DevTools, etc. will use the light UI.
* Any UI the OS renders on macOS including menus, window frames, etc. will use the light UI.
* The [`prefers-color-scheme`](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) CSS query will match `light` mode.
* The `updated` event will be emitted
@@ -83,4 +83,4 @@ Currently, Windows high contrast is the only system setting that triggers forced
### `nativeTheme.prefersReducedTransparency` _Readonly_
A `boolean` that indicates the whether the user has chosen via system accessibility settings to reduce transparency at the OS level.
A `boolean` that indicates whether the user has chosen via system accessibility settings to reduce transparency at the OS level.

View File

@@ -71,7 +71,7 @@ will disable the support for `asar` archives in Node's built-in modules.
### `process.noDeprecation`
A `boolean` that controls whether or not deprecation warnings are printed to `stderr`.
A `boolean` (optional) that controls whether or not deprecation warnings are printed to `stderr`.
Setting this to `true` will silence deprecation warnings. This property is used
instead of the `--no-deprecation` command line flag.
@@ -99,13 +99,13 @@ property is used instead of the `--throw-deprecation` command line flag.
A `boolean` that controls whether or not deprecations printed to `stderr` include
their stack trace. Setting this to `true` will print stack traces for deprecations.
This property is instead of the `--trace-deprecation` command line flag.
This property is used instead of the `--trace-deprecation` command line flag.
### `process.traceProcessWarnings`
A `boolean` that controls whether or not process warnings printed to `stderr` include
their stack trace. Setting this to `true` will print stack traces for process warnings
(including deprecations). This property is instead of the `--trace-warnings` command
(including deprecations). This property is used instead of the `--trace-warnings` command
line flag.
### `process.type` _Readonly_
@@ -128,8 +128,8 @@ A `string` representing Electron's version string.
### `process.windowsStore` _Readonly_
A `boolean`. If the app is running as a Windows Store app (appx), this property is `true`,
for otherwise it is `undefined`.
A `boolean`. If the app is running as an MSIX package (including AppX for Windows Store),
this property is `true`, otherwise it is `undefined`.
### `process.contextId` _Readonly_

View File

@@ -1216,7 +1216,7 @@ function createWindow () {
mainWindow.webContents.session.setBluetoothPairingHandler((details, callback) => {
bluetoothPinCallback = callback
// Send a IPC message to the renderer to prompt the user to confirm the pairing.
// Send an IPC message to the renderer to prompt the user to confirm the pairing.
// Note that this will require logic in the renderer to handle this message and
// display a prompt to the user.
mainWindow.webContents.send('bluetooth-pairing-request', details)
@@ -1264,7 +1264,7 @@ session.defaultSession.allowNTLMCredentialsForDomains('*')
Overrides the `userAgent` and `acceptLanguages` for this session.
The `acceptLanguages` must a comma separated ordered list of language codes, for
The `acceptLanguages` must be a comma separated ordered list of language codes, for
example `"en-US,fr,de,ko,zh-CN,ja"`.
This doesn't affect existing `WebContents`, and each `WebContents` can use
@@ -1512,7 +1512,7 @@ will not work on non-persistent (in-memory) sessions.
* `options` Object (optional)
* `allowFileAccess` boolean - Whether to allow the extension to read local files over `file://`
protocol and inject content scripts into `file://` pages. This is required e.g. for loading
devtools extensions on `file://` URLs. Defaults to false.
DevTools extensions on `file://` URLs. Defaults to false.
Returns `Promise<Extension>` - resolves when the extension is loaded.
@@ -1538,7 +1538,7 @@ const path = require('node:path')
app.whenReady().then(async () => {
await session.defaultSession.loadExtension(
path.join(__dirname, 'react-devtools'),
// allowFileAccess is required to load the devtools extension on file:// URLs.
// allowFileAccess is required to load the DevTools extension on file:// URLs.
{ allowFileAccess: true }
)
// Note that in order to use the React DevTools extension, you'll need to

View File

@@ -9,6 +9,13 @@ For including the share menu as a submenu of other menus, please use the
## Class: ShareMenu
<!--
```YAML history
added:
- pr-url: https://github.com/electron/electron/pull/25629
```
-->
> Create share menu on macOS.
Process: [Main](../glossary.md#main-process)

View File

@@ -0,0 +1,58 @@
# sharedTexture
> Import shared textures into Electron and converts platform specific handles into [`VideoFrame`](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame). Supports all Web rendering systems, and can be transferred across Electron processes. Read [here](https://github.com/electron/electron/blob/main/shell/common/api/shared_texture/README.md) for more information.
Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process)
## Methods
The `sharedTexture` module has the following methods:
**Note:** Experimental APIs are marked as such and could be removed in the future.
### `sharedTexture.importSharedTexture(options)` _Experimental_
* `options` Object - Options for importing shared textures.
* `textureInfo` [SharedTextureImportTextureInfo](structures/shared-texture-import-texture-info.md) - The information of the shared texture to import.
* `allReferencesReleased` Function (optional) - Called when all references in all processes are released. You should keep the imported texture valid until this callback is called.
Imports the shared texture from the given options.
> [!NOTE]
> This method is only available in the main process.
Returns `SharedTextureImported` - The imported shared texture.
### `sharedTexture.sendSharedTexture(options, ...args)` _Experimental_
* `options` Object - Options for sending shared texture.
* `frame` [WebFrameMain](web-frame-main.md) - The target frame to transfer the shared texture to. For `WebContents`, you can pass `webContents.mainFrame`. If you provide a `webFrameMain` that is not a main frame, you'll need to enable `webPreferences.nodeIntegrationInSubFrames` for this, since this feature requires [IPC](https://www.electronjs.org/docs/latest/api/web-frame-main#frameipc-readonly) between main and the frame.
* `importedSharedTexture` [SharedTextureImported](structures/shared-texture-imported.md) - The imported shared texture.
* `...args` any[] - Additional arguments to pass to the renderer process.
Send the imported shared texture to a renderer process. You must register a receiver at renderer process before calling this method. This method has a 1000ms timeout. Ensure the receiver is set and the renderer process is alive before calling this method.
> [!NOTE]
> This method is only available in the main process.
Returns `Promise<void>` - Resolves when the transfer is complete.
### `sharedTexture.setSharedTextureReceiver(callback)` _Experimental_
* `callback` Function\<Promise\<void\>\> - The function to receive the imported shared texture.
* `receivedSharedTextureData` Object - The data received from the main process.
* `importedSharedTexture` [SharedTextureImported](structures/shared-texture-imported.md) - The imported shared texture.
* `...args` any[] - Additional arguments passed from the main process.
Set a callback to receive imported shared textures from the main process.
> [!NOTE]
> This method is only available in the renderer process.
## Properties
The `sharedTexture` module has the following properties:
### `sharedTexture.subtle` _Experimental_
A [`SharedTextureSubtle`](structures/shared-texture-subtle.md) property, provides subtle APIs for interacting with shared texture for advanced users.

View File

@@ -29,6 +29,14 @@ Show the given file in a file manager. If possible, select the file.
### `shell.openPath(path)`
<!--
```YAML history
added:
- pr-url: https://github.com/electron/electron/pull/20682
breaking-changes-header: api-changed-shellopenitem-is-now-shellopenpath
```
-->
* `path` string
Returns `Promise<string>` - Resolves with a string containing the error message corresponding to the failure if a failure occurred, otherwise "".
@@ -37,6 +45,18 @@ Open the given file in the desktop's default manner.
### `shell.openExternal(url[, options])`
<!--
```YAML history
changes:
- pr-url: https://github.com/electron/electron/pull/4508
description: "Added `activate` option."
- pr-url: https://github.com/electron/electron/pull/15065
description: "Added `workingDirectory` option."
- pr-url: https://github.com/electron/electron/pull/37139
description: "Added `logUsage` option."
```
-->
* `url` string - Max 2081 characters on Windows.
* `options` Object (optional)
* `activate` boolean (optional) _macOS_ - `true` to bring the opened application to the foreground. The default is `true`.
@@ -50,6 +70,14 @@ Open the given external protocol URL in the desktop's default manner. (For examp
### `shell.trashItem(path)`
<!--
```YAML history
added:
- pr-url: https://github.com/electron/electron/pull/25114
breaking-changes-header: deprecated-shellmoveitemtotrash
```
-->
* `path` string - path to the item to be moved to the trash.
Returns `Promise<void>` - Resolves when the operation has been completed.
@@ -58,6 +86,10 @@ Rejects if there was an error while deleting the requested item.
This moves a path to the OS-specific trash location (Trash on macOS, Recycle
Bin on Windows, and a desktop-environment-specific location on Linux).
The path must use the default path separator for the platform (backslash on
Windows). Use `path.resolve()` from the `node:path` module to ensure correct
handling on all filesystems.
### `shell.beep()`
Play the beep sound.

View File

@@ -72,6 +72,9 @@
some GTK+3 desktop environments. Default is `false`.
* `transparent` boolean (optional) - Makes the window [transparent](../../tutorial/custom-window-styles.md#transparent-windows).
Default is `false`. On Windows, does not work unless the window is frameless.
When you add a [`View`](../view.md) to a `BaseWindow`, you'll need to call
[`view.setBackgroundColor`](../view.md#viewsetbackgroundcolorcolor) with a transparent
background color on that view to make its background transparent as well.
* `type` string (optional) - The type of window, default is normal window. See more about
this below.
* `visualEffectState` string (optional) _macOS_ - Specify how the material
@@ -99,9 +102,9 @@
* `trafficLightPosition` [Point](point.md) (optional) _macOS_ -
Set a custom position for the traffic light buttons in frameless windows.
* `roundedCorners` boolean (optional) _macOS_ _Windows_ - Whether frameless window
should have rounded corners. Default is `true`. Setting this property
to `false` will prevent the window from being fullscreenable on macOS.
On Windows versions older than Windows 11 Build 22000 this property has no effect, and frameless windows will not have rounded corners.
should have rounded corners. Default is `true`. On Windows versions older than
Windows 11 Build 22000 this property has no effect, and frameless windows will
not have rounded corners.
* `thickFrame` boolean (optional) _Windows_ - Use `WS_THICKFRAME` style for
frameless windows on Windows, which adds the standard window frame. Setting it
to `false` will remove window shadow and window animations, and disable window

View File

@@ -7,7 +7,7 @@
* `depthPerComponent` number - The number of bits per color component.
* `detected` boolean - `true` if the display is detected by the system.
* `displayFrequency` number - The display refresh rate.
* `id` number - Unique identifier associated with the display. A value of of -1 means the display is invalid or the correct `id` is not yet known, and a value of -10 means the display is a virtual display assigned to a unified desktop.
* `id` number - Unique identifier associated with the display. A value of -1 means the display is invalid or the correct `id` is not yet known, and a value of -10 means the display is a virtual display assigned to a unified desktop.
* `internal` boolean - `true` for an internal display and `false` for an external display.
* `label` string - User-friendly label, determined by the platform.
* `maximumCursorSize` [Size](size.md) - Maximum cursor size in native pixels.

View File

@@ -15,6 +15,6 @@ In order for extra notification buttons to work on macOS your app must meet the
following criteria.
* App is signed
* App has it's `NSUserNotificationAlertStyle` set to `alert` in the `Info.plist`.
* App has its `NSUserNotificationAlertStyle` set to `alert` in the `Info.plist`.
If either of these requirements are not met the button won't appear.

View File

@@ -0,0 +1,12 @@
# SharedTextureImportTextureInfo Object
* `pixelFormat` string - The pixel format of the texture.
* `bgra` - 32bpp BGRA (byte-order), 1 plane.
* `rgba` - 32bpp RGBA (byte-order), 1 plane.
* `rgbaf16` - Half float RGBA, 1 plane.
* `nv12` - 12bpp with Y plane followed by a 2x2 interleaved UV plane.
* `colorSpace` [ColorSpace](color-space.md) (optional) - The color space of the texture.
* `codedSize` [Size](size.md) - The full dimensions of the shared texture.
* `visibleRect` [Rectangle](rectangle.md) (optional) - A subsection of [0, 0, codedSize.width, codedSize.height]. In common cases, it is the full section area.
* `timestamp` number (optional) - A timestamp in microseconds that will be reflected to `VideoFrame`.
* `handle` [SharedTextureHandle](shared-texture-handle.md) - The shared texture handle.

View File

@@ -0,0 +1,9 @@
# SharedTextureImportedSubtle Object
* `getVideoFrame` Function\<[VideoFrame](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame)\> - Create a `VideoFrame` that uses the imported shared texture in the current process. You can call `VideoFrame.close()` once you've finished using the object. The underlying resources will wait for GPU finish internally.
* `release` Function - Release the resources. If you transferred and get multiple `SharedTextureImported` objects, you have to `release` every one of them. The resource on the GPU process will be destroyed when the last one is released.
* `callback` Function (optional) - Callback when the GPU command buffer finishes using this shared texture. It provides a precise event to safely release dependent resources. For example, if this object is created by `finishTransferSharedTexture`, you can use this callback to safely release the original one that called `startTransferSharedTexture` in other processes. You can also release the source shared texture that was used to `importSharedTexture` safely.
* `startTransferSharedTexture` Function\<[SharedTextureTransfer](shared-texture-transfer.md)\> - Create a `SharedTextureTransfer` that can be serialized and transferred to other processes.
* `getFrameCreationSyncToken` Function\<[SharedTextureSyncToken](shared-texture-sync-token.md)\> - This method is for advanced users. If used, it is typically called after `finishTransferSharedTexture`, and should be passed to the object which was called `startTransferSharedTexture` to prevent the source object release the underlying resource before the target object actually acquire the reference at gpu process asyncly.
* `setReleaseSyncToken` Function - This method is for advanced users. If used, this object's underlying resource will not be released until the set sync token is fulfilled at gpu process. By using sync tokens, users are not required to use release callbacks for lifetime management.
* `syncToken` [SharedTextureSyncToken](shared-texture-sync-token.md) - The sync token to set.

View File

@@ -0,0 +1,6 @@
# SharedTextureImported Object
* `textureId` string - The unique identifier of the imported shared texture.
* `getVideoFrame` Function\<[VideoFrame](https://developer.mozilla.org/en-US/docs/Web/API/VideoFrame)\> - Create a `VideoFrame` that uses the imported shared texture in the current process. You can call `VideoFrame.close()` once you've finished using the object. The underlying resources will wait for GPU finish internally.
* `release` Function - Release this object's reference of the imported shared texture. The underlying resource will be alive until every reference is released.
* `subtle` [SharedTextureImportedSubtle](shared-texture-imported-subtle.md) - Provides subtle APIs to interact with the imported shared texture for advanced users.

View File

@@ -0,0 +1,6 @@
# SharedTextureSubtle Object
* `importSharedTexture` Function\<[SharedTextureImportedSubtle](shared-texture-imported-subtle.md)\> - Imports the shared texture from the given options. Returns the imported shared texture.
* `textureInfo` [SharedTextureImportTextureInfo](shared-texture-import-texture-info.md) - The information of shared texture to import.
* `finishTransferSharedTexture` Function\<[SharedTextureImportedSubtle](shared-texture-imported-subtle.md)\> - Finishes the transfer of the shared texture and gets the transferred shared texture. Returns the imported shared texture from the transfer object.
* `transfer` [SharedTextureTransfer](shared-texture-transfer.md) - The transfer object of the shared texture.

View File

@@ -0,0 +1,3 @@
# SharedTextureSyncToken Object
* `syncToken` string - The opaque data for sync token.

View File

@@ -0,0 +1,10 @@
# SharedTextureTransfer Object
* `transfer` string _Readonly_ - The opaque transfer data of the shared texture. This can be transferred across Electron processes.
* `syncToken` string _Readonly_ - The opaque sync token data for frame creation.
* `pixelFormat` string _Readonly_ - The pixel format of the transferring texture.
* `codedSize` [Size](size.md) _Readonly_ - The full dimensions of the shared texture.
* `visibleRect` [Rectangle](rectangle.md) _Readonly_ - A subsection of [0, 0, codedSize.width(), codedSize.height()]. In common cases, it is the full section area.
* `timestamp` number _Readonly_ - A timestamp in microseconds that will be reflected to `VideoFrame`.
Use `sharedTexture.subtle.finishTransferSharedTexture` to get [`SharedTextureImportedSubtle`](shared-texture-imported-subtle.md) back.

View File

@@ -40,7 +40,7 @@
* `javascript` boolean (optional) - Enables JavaScript support. Default is `true`.
* `webSecurity` boolean (optional) - When `false`, it will disable the
same-origin policy (usually using testing websites by people), and set
`allowRunningInsecureContent` to `true` if this options has not been set
`allowRunningInsecureContent` to `true` if this option has not been set
by user. Default is `true`.
* `allowRunningInsecureContent` boolean (optional) - Allow an https page to run
JavaScript, CSS or plugins from http URLs. Default is `false`.

View File

@@ -36,6 +36,12 @@ Process: [Main](../glossary.md#main-process)<br />
`com.apple.security.cs.allow-unsigned-executable-memory` entitlements. This will allow the utility process
to load unsigned libraries. Unless you specifically need this capability, it is best to leave this disabled.
Default is `false`.
* `disclaim` boolean (optional) _macOS_ - With this flag, the utility process will disclaim
responsibility for the child process. This causes the operating system to consider the child
process as a separate entity for purposes of security policies like Transparency, Consent, and
Control (TCC). When responsibility is disclaimed, the parent process will not be attributed
for any TCC requests initiated by the child process. This is useful when launching processes
that run third-party or otherwise untrusted code. Default is `false`.
* `respondToAuthRequestsFromMainProcess` boolean (optional) - With this flag, all HTTP 401 and 407 network
requests created via the [net module](net.md) will allow responding to them via the
[`app#login`](app.md#event-login) event in the main process instead of the default

View File

@@ -62,7 +62,7 @@ console.log(webContents)
### `webContents.getAllWebContents()`
Returns `WebContents[]` - An array of all `WebContents` instances. This will contain web contents
for all windows, webviews, opened devtools, and devtools extension background pages.
for all windows, webviews, opened DevTools, and DevTools extension background pages.
### `webContents.getFocusedWebContents()`
@@ -383,7 +383,7 @@ Emitted after a server side redirect occurs during navigation. For example a 30
redirect.
This event cannot be prevented, if you want to prevent redirects you should
checkout out the `will-redirect` event above.
check out the `will-redirect` event above.
#### Event: 'did-navigate'
@@ -958,7 +958,7 @@ win.loadURL('https://github.com')
#### Event: 'devtools-reload-page'
Emitted when the devtools window instructs the webContents to reload
Emitted when the DevTools window instructs the webContents to reload
#### Event: 'will-attach-webview'
@@ -1079,7 +1079,7 @@ Emitted when the [mainFrame](web-contents.md#contentsmainframe-readonly), an `<i
Returns `Promise<void>` - the promise will resolve when the page has finished loading
(see [`did-finish-load`](web-contents.md#event-did-finish-load)), and rejects
if the page fails to load (see
[`did-fail-load`](web-contents.md#event-did-fail-load)). A noop rejection handler is already attached, which avoids unhandled rejection errors.
[`did-fail-load`](web-contents.md#event-did-fail-load)). A noop rejection handler is already attached, which avoids unhandled rejection errors. If the existing page has a beforeUnload handler, [`did-fail-load`](web-contents.md#event-did-fail-load) will be called unless [`will-prevent-unload`](web-contents.md#event-did-fail-load) is handled.
Loads the `url` in the window. The `url` must contain the protocol prefix,
e.g. the `http://` or `file://`. If the load should bypass http cache then
@@ -1465,7 +1465,7 @@ Ignore application menu shortcuts while this web contents is focused.
without a recognized 'action' value will result in a console error and have
the same effect as returning `{action: 'deny'}`.
Called before creating a window a new window is requested by the renderer, e.g.
Called before creating a window when a new window is requested by the renderer, e.g.
by `window.open()`, a link with `target="_blank"`, shift+clicking on a link, or
submitting a form with `<form target="_blank">`. See
[`window.open()`](window-open.md) for more details and how to use this in
@@ -1865,66 +1865,20 @@ Removes the specified path from DevTools workspace.
* `devToolsWebContents` WebContents
Uses the `devToolsWebContents` as the target `WebContents` to show devtools.
Uses the `devToolsWebContents` as the target `WebContents` to show DevTools.
The `devToolsWebContents` must not have done any navigation, and it should not
be used for other purposes after the call.
By default Electron manages the devtools by creating an internal `WebContents`
By default, Electron manages the DevTools by creating an internal `WebContents`
with native view, which developers have very limited control of. With the
`setDevToolsWebContents` method, developers can use any `WebContents` to show
the devtools in it, including `BrowserWindow`, `BrowserView` and `<webview>`
tag.
the DevTools in it, such as [`BrowserWindow`](./browser-window.md) or [`WebContentsView`](./web-contents-view.md).
Note that closing the devtools does not destroy the `devToolsWebContents`, it
is caller's responsibility to destroy `devToolsWebContents`.
Note that closing the DevTools does not destroy the `devToolsWebContents`, it
is the caller's responsibility to destroy `devToolsWebContents` manually.
An example of showing devtools in a `<webview>` tag:
```html
<html>
<head>
<style type="text/css">
* { margin: 0; }
#browser { height: 70%; }
#devtools { height: 30%; }
</style>
</head>
<body>
<webview id="browser" src="https://github.com"></webview>
<webview id="devtools" src="about:blank"></webview>
<script>
const { ipcRenderer } = require('electron')
const emittedOnce = (element, eventName) => new Promise(resolve => {
element.addEventListener(eventName, event => resolve(event), { once: true })
})
const browserView = document.getElementById('browser')
const devtoolsView = document.getElementById('devtools')
const browserReady = emittedOnce(browserView, 'dom-ready')
const devtoolsReady = emittedOnce(devtoolsView, 'dom-ready')
Promise.all([browserReady, devtoolsReady]).then(() => {
const targetId = browserView.getWebContentsId()
const devtoolsId = devtoolsView.getWebContentsId()
ipcRenderer.send('open-devtools', targetId, devtoolsId)
})
</script>
</body>
</html>
```
```js
// Main process
const { ipcMain, webContents } = require('electron')
ipcMain.on('open-devtools', (event, targetContentsId, devtoolsContentsId) => {
const target = webContents.fromId(targetContentsId)
const devtools = webContents.fromId(devtoolsContentsId)
target.setDevToolsWebContents(devtools)
target.openDevTools()
})
```
An example of showing devtools in a `BrowserWindow`:
An example of showing DevTools in a `BrowserWindow`:
```js title='main.js'
const { app, BrowserWindow } = require('electron')
@@ -1944,31 +1898,31 @@ app.whenReady().then(() => {
#### `contents.openDevTools([options])`
* `options` Object (optional)
* `mode` string - Opens the devtools with specified dock state, can be
* `mode` string - Opens the DevTools with specified dock state, can be
`left`, `right`, `bottom`, `undocked`, `detach`. Defaults to last used dock state.
In `undocked` mode it's possible to dock back. In `detach` mode it's not.
* `activate` boolean (optional) - Whether to bring the opened devtools window
* `activate` boolean (optional) - Whether to bring the opened DevTools window
to the foreground. The default is `true`.
* `title` string (optional) - A title for the DevTools window (only in `undocked` or `detach` mode).
Opens the devtools.
Opens the DevTools.
When `contents` is a `<webview>` tag, the `mode` would be `detach` by default,
explicitly passing an empty `mode` can force using last used dock state.
On Windows, if Windows Control Overlay is enabled, Devtools will be opened with `mode: 'detach'`.
On Windows, if Windows Control Overlay is enabled, DevTools will be opened with `mode: 'detach'`.
#### `contents.closeDevTools()`
Closes the devtools.
Closes the DevTools view.
#### `contents.isDevToolsOpened()`
Returns `boolean` - Whether the devtools is opened.
Returns `boolean` - Whether the DevTools view is opened.
#### `contents.isDevToolsFocused()`
Returns `boolean` - Whether the devtools view is focused .
Returns `boolean` - Whether the DevTools view is focused .
#### `contents.getDevToolsTitle()`
@@ -2214,7 +2168,7 @@ Returns `boolean` - If _offscreen rendering_ is enabled returns whether it is cu
* `fps` Integer
If _offscreen rendering_ is enabled sets the frame rate to the specified number.
Only values between 1 and 240 are accepted.
When `webPreferences.offscreen.useSharedTexture` is `false` only values between 1 and 240 are accepted.
#### `contents.getFrameRate()`
@@ -2410,11 +2364,12 @@ A [`NavigationHistory`](navigation-history.md) used by this webContents.
#### `contents.hostWebContents` _Readonly_
A [`WebContents`](web-contents.md) instance that might own this `WebContents`.
A `WebContents | null` property that represents a [`WebContents`](web-contents.md)
instance that might own this `WebContents`.
#### `contents.devToolsWebContents` _Readonly_
A `WebContents | null` property that represents the of DevTools `WebContents` associated with a given `WebContents`.
A `WebContents | null` property that represents the DevTools `WebContents` associated with a given `WebContents`.
> [!NOTE]
> Users should never store this object because it may become `null`

View File

@@ -197,7 +197,7 @@ dispatch errors of isolated worlds to foreign worlds.
* `info` Object
* `securityOrigin` string (optional) - Security origin for the isolated world.
* `csp` string (optional) - Content Security Policy for the isolated world.
* `name` string (optional) - Name for isolated world. Useful in devtools.
* `name` string (optional) - Name for isolated world. Useful in DevTools.
Set the security origin, content security policy and name of the isolated world.

View File

@@ -12,6 +12,19 @@ This document uses the following convention to categorize breaking changes:
* **Deprecated:** An API was marked as deprecated. The API will continue to function, but will emit a deprecation warning, and will be removed in a future release.
* **Removed:** An API or feature was removed, and is no longer supported by Electron.
## Planned Breaking API Changes (40.0)
### Deprecated: `clipboard` API access from renderer processes
Using the `clipboard` API directly in the renderer process is deprecated.
If you want to call this API from a renderer process, place the API call in
your preload script and expose it using the [contextBridge](https://www.electronjs.org/docs/latest/api/context-bridge) API.
### Behavior Changed: MacOS dSYM files now compressed with tar.xz
Debug symbols for MacOS (dSYM) now use xz compression in order to handle larger file sizes. `dsym.zip` files are now
`dsym.tar.xz` files. End users using debug symbols may need to update their zip utilities.
## Planned Breaking API Changes (39.0)
### Deprecated: `--host-rules` command line switch
@@ -41,7 +54,7 @@ webContents.setWindowOpenHandler((details) => {
When using shared texture offscreen rendering feature, the `paint` event now emits a more structured object.
It moves the `sharedTextureHandle`, `planes`, `modifier` into a unified `handle` property.
See [here](https://www.electronjs.org/docs/latest/api/structures/offscreen-shared-texture) for more details.
See the [OffscreenSharedTexture](./api/structures/offscreen-shared-texture.md) API structure for more details.
## Planned Breaking API Changes (38.0)
@@ -55,7 +68,7 @@ Users can force XWayland by passing `--ozone-platform=x11`.
### Removed: `ORIGINAL_XDG_CURRENT_DESKTOP` environment variable
Previously, Electron changed the value of `XDG_CURRENT_DESKTOP` internally to `Unity`, and stored the original name of the desktop session
in a separate variable. `XDG_CURRENT_DESKTOP` is no longer overriden and now reflects the actual desktop environment.
in a separate variable. `XDG_CURRENT_DESKTOP` is no longer overridden and now reflects the actual desktop environment.
### Removed: macOS 11 support
@@ -136,7 +149,7 @@ window is not currently visible.
`app.commandLine` was only meant to handle chromium switches (which aren't case-sensitive) and switches passed via `app.commandLine` will not be passed down to any of the child processes.
If you were using `app.commandLine` to control the behavior of the main process, you should do this via `process.argv`.
If you were using `app.commandLine` to control the behavior of the main process, you should do this via `process.argv`.
### Deprecated: `NativeImage.getBitmap()`
@@ -166,7 +179,7 @@ from upstream Chromium.
### Deprecated: `null` value for `session` property in `ProtocolResponse`
Previously, setting the ProtocolResponse.session property to `null`
Would create a random independent session. This is no longer supported.
would create a random independent session. This is no longer supported.
Using single-purpose sessions here is discouraged due to overhead costs;
however, old code that needs to preserve this behavior can emulate it by
@@ -177,7 +190,7 @@ and then using it in `ProtocolResponse.session`.
When calling `Session.clearStorageData(options)`, the `options.quota`
property is deprecated. Since the `syncable` type was removed, there
is only type left -- `'temporary'` -- so specifying it is unnecessary.
is only one type left -- `'temporary'` -- so specifying it is unnecessary.
### Deprecated: Extension methods and events on `session`
@@ -506,7 +519,7 @@ more information.
### Removed: The `--disable-color-correct-rendering` switch
This switch was never formally documented but it's removal is being noted here regardless. Chromium itself now has better support for color spaces so this flag should not be needed.
This switch was never formally documented but its removal is being noted here regardless. Chromium itself now has better support for color spaces so this flag should not be needed.
### Behavior Changed: `BrowserView.setAutoResize` behavior on macOS
@@ -1197,7 +1210,7 @@ more details.
### API Changed: `webContents.printToPDF()`
`webContents.printToPDF()` has been modified to conform to [`Page.printToPDF`](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF) in the Chrome DevTools Protocol. This has been changes in order to
`webContents.printToPDF()` has been modified to conform to [`Page.printToPDF`](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF) in the Chrome DevTools Protocol. This has been changed in order to
address changes upstream that made our previous implementation untenable and rife with bugs.
**Arguments Changed**
@@ -2664,6 +2677,18 @@ Replace with: https://atom.io/download/electron
The following list includes the breaking API changes made in Electron 2.0.
### `autoUpdater`
```js
// Deprecated
autoUpdater.setFeedURL(url, headers)
// Replace with
autoUpdater.setFeedURL({
url,
headers
})
```
### `BrowserWindow`
```js

View File

@@ -6,30 +6,104 @@ Follow the guidelines below for building **Electron itself**, for the purposes o
## Platform prerequisites
Check the build prerequisites for your platform before proceeding
Check the build prerequisites for your platform before proceeding:
* [macOS](build-instructions-macos.md#prerequisites)
* [Linux](build-instructions-linux.md#prerequisites)
* [Windows](build-instructions-windows.md#prerequisites)
## Build Tools
## Setting up `@electron/build-tools` (recommended)
[Electron's Build Tools](https://github.com/electron/build-tools) automate much of the setup for compiling Electron from source with different configurations and build targets. If you wish to set up the environment manually, the instructions are listed below.
[Electron Build Tools](https://github.com/electron/build-tools) automate much of the setup for
compiling Electron from source with different configurations and build targets.
Most of the [manual setup](#manual-setup-advanced) instructions can be replaced by simpler Build Tools commands.
> [!TIP]
> Build Tools also gives you access to [remote execution and caching of build actions](./reclient.md),
> which will dramatically improve build times.
Electron Build Tools can be installed globally from npm:
```sh
npm install -g @electron/build-tools
```
Once installed, the `e` command should be globally available in your command line. The `e init`
command bootstraps a local checkout of Electron:
```sh
# The 'Hello, World!' of build-tools: get and build `main`
# Choose the directory where Electron's source and build files will reside.
# You can specify any path you like; this command defaults to `$PWD/electron`.
# If you're going to use multiple branches, you may want something like:
# `--root=~/electron/branch` (e.g. `~/electron-gn/main`)
e init --root=~/electron --bootstrap testing
```
The `--bootstrap` flag also runs `e sync` (synchronizes source code branches from
[`DEPS`](https://github.com/electron/electron/blob/main/DEPS) using
[`gclient`](https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/HEAD/README.gclient.md))
and `e build` (compiles the Electron binary into the `${root}/src/out` folder).
> [!IMPORTANT]
>
> Sometime after the initial `e sync` phase, you will be asked to run `e d rbe login` to auth into
> remote build execution and proceed into the build. This may take about 20-30 minutes!
Once the build is done compiling, you can test it by running `e start` (or by loading it into
[Electron Fiddle](http://electronjs.org/fiddle)).
### Navigating the project
Some quick tips on building once your checkout is set up:
* **Directory structure:** Within the project, Chromium code is synced to `${root}/src/` while Electron's code (i.e. code in
https://github.com/electron/electron) lives in `${root}/src/electron/`. Note that both directories
have their own git repositories.
* **Updating your checkout:** Run git commands such as `git checkout <branch>` and `git pull` from `${root}/src/electron`.
Whenever you update your commit `HEAD`, make sure to `e sync` before `e build` to sync dependencies
such as Chromium and Node.js. This is especially relevant because the Chromium version in
[`DEPS`](https://github.com/electron/electron/blob/main/DEPS) changes frequently.
* **Rebuilding:** When making changes to code in `${root}/src/electron/` in a local branch, you only need to re-run `e build`.
* **Adding patches:** When contributing changes in `${root}/src/` outside of `${root}/src/electron/`, you need to do so
via Electron's [patch system](./patches.md). The `e patches` command can export all relevant patches to
`${root}/src/electron/patches/` once your code change is ready.
> [!IMPORTANT]
> Unless you're applying upstream patches, you should treat `${root}/src/` as a read-only folder and
> spend most of your development time in `${root}/src/electron/`. You should not need to make any
> changes or run `git` commands in `${root}/src/`.
> [!TIP]
> Detailed documentation for all available `e` commands can be found in the
> repository's [README.md](https://github.com/electron/build-tools/blob/main/README.md). You can
> also run `e --help` to list all commands and use the `--help` flag on any command to get more
> usage info.
> [!TIP]
> For more information on project structure, see the [Source Code Directory Structure](./source-code-directory-structure.md)
> guide.
<details>
<!-- markdownlint-disable-next-line MD033 -->
<summary><strong>Manual setup (advanced)</strong></summary>
## Manual setup (advanced)
Electron uses [GN](https://gn.googlesource.com/gn) for project generation and
[ninja](https://ninja-build.org/) for building. Project configurations can
be found in the `.gn` and `.gni` files.
[siso](https://chromium.googlesource.com/build/+/refs/heads/main/siso/README.md) for building.
Project configurations can be found in the `.gn` and `.gni` files in the `electron/electron` repo.
## GN Files
### GN files
The following `gn` files contain the main rules for building Electron:
* `BUILD.gn` defines how Electron itself is built and
includes the default configurations for linking with Chromium.
* `build/args/{testing,release,all}.gn` contain the default build arguments for
building Electron.
* [`BUILD.gn`](https://github.com/electron/electron/blob/main/BUILD.gn) defines how Electron itself
is built and includes the default configurations for linking with Chromium.
* [`build/args/{testing,release,all}.gn`](https://github.com/electron/electron/tree/main/build/args)
contain the default build arguments for building Electron.
## GN prerequisites
### GN prerequisites
You'll need to install [`depot_tools`][depot-tools], the toolset
used for fetching Chromium and its dependencies.
@@ -56,7 +130,7 @@ $ mkdir -p "${GIT_CACHE_PATH}"
# This will use about 16G.
```
## Getting the code
### Getting the code
```sh
$ mkdir electron && cd electron
@@ -68,7 +142,7 @@ $ gclient sync --with_branch_heads --with_tags
> Instead of `https://github.com/electron/electron`, you can use your own fork
> here (something like `https://github.com/<username>/electron`).
### A note on pulling/pushing
#### A note on pulling/pushing
If you intend to `git pull` or `git push` from the official `electron`
repository in the future, you now need to update the respective folder's
@@ -83,12 +157,13 @@ $ git branch --set-upstream-to=origin/main
$ cd -
```
:memo: `gclient` works by checking a file called `DEPS` inside the
`src/electron` folder for dependencies (like Chromium or Node.js).
> [!TIP]
> `gclient` works by checking a file called `DEPS` inside the
`${root}/src/electron` folder for dependencies (like Chromium or Node.js).
Running `gclient sync -f` ensures that all dependencies required
to build Electron match that file.
So, in order to pull, you'd run the following commands:
In order to pull, you'd run the following commands:
```sh
$ cd src/electron
@@ -96,7 +171,7 @@ $ git pull
$ gclient sync -f
```
## Building
### Building
**Set the environment variable for chromium build tools**
@@ -156,7 +231,7 @@ $ gn gen out/Release --args="import(\`"//electron/build/args/release.gn\`")"
```
> [!NOTE]
> This will generate a `out/Testing` or `out/Release` build directory under `src/` with the testing or release build depending upon the configuration passed above. You can replace `Testing|Release` with another names, but it should be a subdirectory of `out`.
> This will generate a `out/Testing` or `out/Release` build directory under `${root}/src/` with the testing or release build depending upon the configuration passed above. You can replace `Testing|Release` with another names, but it should be a subdirectory of `out`.
Also you shouldn't have to run `gn gen` again—if you want to change the build arguments, you can run `gn args out/Testing` to bring up an editor. To see the list of available build configuration options, run `gn args out/Testing --list`.
@@ -189,7 +264,7 @@ $ ./out/Testing/electron.exe
$ ./out/Testing/electron
```
### Packaging
#### Packaging
To package the electron build as a distributable zip file:
@@ -197,7 +272,7 @@ To package the electron build as a distributable zip file:
$ ninja -C out/Release electron:electron_dist_zip
```
### Cross-compiling
#### Cross-compiling
To compile for a platform that isn't the same as the one you're building on,
set the `target_cpu` and `target_os` GN arguments. For example, to compile an
@@ -223,7 +298,7 @@ and [`target_cpu`][target_cpu values].
[target_os values]: https://gn.googlesource.com/gn/+/main/docs/reference.md#built_in-predefined-variables-target_os_the-desired-operating-system-for-the-build-possible-values
[target_cpu values]: https://gn.googlesource.com/gn/+/main/docs/reference.md#built_in-predefined-variables-target_cpu_the-desired-cpu-architecture-for-the-build-possible-values
#### Windows on Arm (experimental)
#### Windows on Arm
To cross-compile for Windows on Arm, [follow Chromium's guide](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/windows_build_instructions.md#Visual-Studio) to get the necessary dependencies, SDK and libraries, then build with `ELECTRON_BUILDING_WOA=1` in your environment before running `gclient sync`.
@@ -241,12 +316,12 @@ gclient sync -f --with_branch_heads --with_tags
Next, run `gn gen` as above with `target_cpu="arm64"`.
## Tests
### Tests
To run the tests, you'll first need to build the test modules against the
same version of Node.js that was built as part of the build process. To
generate build headers for the modules to compile against, run the following
under `src/` directory.
under `${root}/src/` directory.
```sh
$ ninja -C out/Testing electron:node_headers
@@ -262,7 +337,7 @@ $ npm run test -- \
--enable-logging -g 'BrowserWindow module'
```
## Sharing the git cache between multiple machines
### Sharing the git cache between multiple machines
It is possible to share the gclient git cache with other machines by exporting it as
SMB share on linux, but only one process/machine can be using the cache at a
@@ -284,11 +359,14 @@ This can be set quickly in powershell (ran as administrator):
New-ItemProperty -Path "HKLM:\System\CurrentControlSet\Services\Lanmanworkstation\Parameters" -Name DirectoryCacheLifetime -Value 0 -PropertyType DWORD -Force
```
</details>
## Troubleshooting
### gclient sync complains about rebase
### `sync` complains about rebase
If `gclient sync` is interrupted the git tree may be left in a bad state, leading to a cryptic message when running `gclient sync` in the future:
If `e sync` (or `gclient sync`) is interrupted, the git tree may be left in a bad state, leading to
a cryptic message when running `sync` in the future:
```plaintext
2> Conflict while rebasing this branch.
@@ -296,17 +374,19 @@ If `gclient sync` is interrupted the git tree may be left in a bad state, leadin
2> See man git-rebase for details.
```
If there are no git conflicts or rebases in `src/electron`, you may need to abort a `git am` in `src`:
If there are no git conflicts or rebases in `${root}/src/electron`, you may need to abort a `git am`
in `${root}/src`:
```sh
$ cd ../
$ git am --abort
$ cd electron
$ gclient sync -f
$ e sync -f
```
This may also happen if you have checked out a branch (as opposed to having a detached head) in `electron/src/`
or some other dependencys repository. If that is the case, a `git checkout --detach HEAD` in the appropriate repository should do the trick.
This may also happen if you have checked out a branch (as opposed to having a detached head) in `${root}/src/`
or some other dependencys repository. If that is the case, a `git checkout --detach HEAD` in the
appropriate repository should do the trick.
### I'm being asked for a username/password for chromium-internal.googlesource.com
@@ -315,16 +395,6 @@ If you see a prompt for `Username for 'https://chrome-internal.googlesource.com'
your locally installed version of Visual Studio (by default, `depot_tools` will
try to download a Google-internal version that only Googlers have access to).
### `e` Module not found
If `e` is not recognized despite running `npm i -g @electron/build-tools`, ie:
```sh
Error: Cannot find module '/Users/<user>/.electron_build_tools/src/e'
```
We recommend installing Node through [nvm](https://github.com/nvm-sh/nvm). This allows for easier Node version management, and is often a fix for missing `e` modules.
### RBE authentication randomly fails with "Token not valid"
This could be caused by the local clock time on the machine being off by a small amount. Use [time.is](https://time.is/) to check.

View File

@@ -6,77 +6,17 @@ Follow the guidelines below for building **Electron itself** on Linux, for the p
## Prerequisites
* At least 25GB disk space and 8GB RAM.
* Python >= 3.9.
* [Node.js](https://nodejs.org/download/) >= 22.12.0
* [clang](https://clang.llvm.org/get_started.html) 3.4 or later.
* Development headers of GTK 3 and libnotify.
Due to Electron's dependency on Chromium, prerequisites and dependencies for Electron change over time. [Chromium's documentation on building on Linux](https://chromium.googlesource.com/chromium/src/+/HEAD/docs/linux/build_instructions.md) has up to date information for building Chromium on Linux. This documentation can generally
be followed for building Electron on Linux as well.
On Ubuntu >= 20.04, install the following libraries:
```sh
$ sudo apt-get install build-essential clang libdbus-1-dev libgtk-3-dev \
libnotify-dev libasound2-dev libcap-dev \
libcups2-dev libxtst-dev \
libxss1 libnss3-dev gcc-multilib g++-multilib curl \
gperf bison python3-dbusmock openjdk-8-jre
```
On Ubuntu < 20.04, install the following libraries:
```sh
$ sudo apt-get install build-essential clang libdbus-1-dev libgtk-3-dev \
libnotify-dev libgnome-keyring-dev \
libasound2-dev libcap-dev libcups2-dev libxtst-dev \
libxss1 libnss3-dev gcc-multilib g++-multilib curl \
gperf bison python-dbusmock openjdk-8-jre
```
On RHEL / CentOS, install the following libraries:
```sh
$ sudo yum install clang dbus-devel gtk3-devel libnotify-devel \
libgnome-keyring-devel xorg-x11-server-utils libcap-devel \
cups-devel libXtst-devel alsa-lib-devel libXrandr-devel \
nss-devel python-dbusmock openjdk-8-jre
```
On Fedora, install the following libraries:
```sh
$ sudo dnf install clang dbus-devel gperf gtk3-devel \
libnotify-devel libgnome-keyring-devel libcap-devel \
cups-devel libXtst-devel alsa-lib-devel libXrandr-devel \
nss-devel python-dbusmock
```
On Arch Linux / Manjaro, install the following libraries:
```sh
$ sudo pacman -Syu base-devel clang libdbus gtk2 libnotify \
libgnome-keyring alsa-lib libcap libcups libxtst \
libxss nss gcc-multilib curl gperf bison \
python2 python-dbusmock jdk8-openjdk
```
Other distributions may offer similar packages for installation via package
managers such as pacman. Or one can compile from source code.
Additionally, Electron's [Linux dependency installer](https://github.com/electron/build-images/blob/main/tools/install-deps.sh) can be referenced to get the current dependencies that Electron requires in addition to what Chromium installs via [build/install-deps.sh](https://chromium.googlesource.com/chromium/src/+/HEAD/build/install-build-deps.sh).
### Cross compilation
If you want to build for an `arm` target you should also install the following
dependencies:
If you want to build for an `arm` target, you can use Electron's [Linux dependency installer](https://github.com/electron/build-images/blob/main/tools/install-deps.sh) to install the additional dependencies by passing the `--arm argument`:
```sh
$ sudo apt-get install libc6-dev-armhf-cross linux-libc-dev-armhf-cross \
g++-arm-linux-gnueabihf
```
Similarly for `arm64`, install the following:
```sh
$ sudo apt-get install libc6-dev-arm64-cross linux-libc-dev-arm64-cross \
g++-aarch64-linux-gnu
$ sudo install-deps.sh --arm
```
And to cross-compile for `arm` or targets, you should pass the

View File

@@ -6,7 +6,7 @@ Follow the guidelines below for building **Electron itself** on macOS, for the p
## Prerequisites
* macOS >= 11.6.0
* macOS >= 12
* [Xcode](https://developer.apple.com/technologies/tools/). The exact version
needed depends on what branch you are building, but the latest version of
Xcode is generally a good bet for building `main`.
@@ -40,7 +40,7 @@ If you are on arm64 architecture, the build script may be pointing to the wrong
### Certificates fail to verify
installing [`certifi`](https://pypi.org/project/certifi/) will fix the following error:
Installing [`certifi`](https://pypi.org/project/certifi/) will fix the following error:
```sh
________ running 'python3 src/tools/clang/scripts/update.py' in '/Users/<user>/electron'

View File

@@ -28,7 +28,7 @@ with breakpoints inside Electron's source code.
format.
* **ProcMon**: The [free SysInternals tool][sys-internals] allows you to inspect
a processes parameters, file handles, and registry operations.
a process's parameters, file handles, and registry operations.
## Attaching to and Debugging Electron

View File

@@ -4,12 +4,40 @@ The source code of Electron is separated into a few parts, mostly
following Chromium on the separation conventions.
You may need to become familiar with
[Chromium's multi-process architecture](https://dev.chromium.org/developers/design-documents/multi-process-architecture)
[Chromium's multi-process architecture](https://www.chromium.org/developers/design-documents/multi-process-architecture/)
to understand the source code better.
## Structure of Source Code
## Project structure
```diff
Electron is a complex project containing multiple upstream dependencies, which are tracked in source
control via the [`DEPS`](https://github.com/electron/electron/blob/main/DEPS) file. When
[initializing a local Electron checkout](./build-instructions-gn.md), Electron's source code is just one
of many nested folders within the project root.
The project contains a single `src` folder that corresponds to a specific git checkout of
[Chromium's `src` folder](https://source.chromium.org/chromium/chromium/src). In addition, Electron's
repository code is contained in `src/electron` (with its own nested git repository), and other
Electron-specific third-party dependencies (e.g. [nan](https://github.com/nodejs/nan) or
[node](https://github.com/nodejs/node)) are located in `src/third_party` (along with all other
Chromium third-party dependencies, such as WebRTC or ANGLE).
For all code outside of `src/electron`, Electron-specific code changes are maintained via git patches.
See the [Patches](./patches.md) development guide for more information.
```plaintext
Project Root
└── src
├── electron
├── third_party
│   ├── nan
│   ├── electron_node
│   └── ...other third party deps
└── ...other folders
```
## Structure of Electron source code
```plaintext
Electron
├── build/ - Build configuration files needed to build with GN.
├── buildflags/ - Determines the set of features that can be conditionally built.
@@ -25,24 +53,23 @@ Electron
├── lib/ - JavaScript/TypeScript source code.
| ├── browser/ - Main process initialization code.
| | ├── api/ - API implementation for main process modules.
| | └── remote/ - Code related to the remote module as it is
| | used in the main process.
| ├── common/ - Relating to logic needed by both main and renderer processes.
| | └── api/ - API implementation for modules that can be used in
| | both the main and renderer processes
| ├── isolated_renderer/ - Handles creation of isolated renderer processes when
| | contextIsolation is enabled.
| ├── node/ - Initialization code for Node.js in the main process.
│   ├── preload_realm/ - Initialization code for sandboxed renderer preload scripts.
│   │   └── api/ - API implementation for preload scripts.
| ├── renderer/ - Renderer process initialization code.
| | ├── api/ - API implementation for renderer process modules.
| | ├── extension/ - Code related to use of Chrome Extensions
| | | in Electron's renderer process.
| | ├── remote/ - Logic that handles use of the remote module in
| | | the main process.
| | └── web-view/ - Logic that handles the use of webviews in the
| | renderer process.
| ├── sandboxed_renderer/ - Logic that handles creation of sandboxed renderer
| | | processes.
| | └── api/ - API implementation for sandboxed renderer processes.
│   ├── utility/ - Utility process initialization code.
│   │   └── api/ - API implementation for utility process modules.
| └── worker/ - Logic that handles proper functionality of Node.js
| environments in Web Workers.
├── patches/ - Patches applied on top of Electron's core dependencies
@@ -67,27 +94,30 @@ Electron
| | └── resources/ - Icons, platform-dependent files, etc.
| ├── renderer/ - Code that runs in renderer process.
| | └── api/ - The implementation of renderer process APIs.
| ── common/ - Code that used by both the main and renderer processes,
| | including some utility functions and code to integrate node's
| | message loop into Chromium's message loop.
| └── api/ - The implementation of common APIs, and foundations of
| Electron's built-in modules.
| ── common/ - Code that used by both the main and renderer processes,
| | | including some helper functions and code to integrate node's
| | | message loop into Chromium's message loop.
| | └── api/ - The implementation of common APIs, and foundations of
| | Electron's built-in modules.
│   ├── services/node/ - Provides a Node.js runtime to utility processes.
│   └── utility - Code that runs in the utility process.
├── spec/ - Components of Electron's test suite run in the main process.
├── typings/ - Internal TypeScript types that aren't exported in electron.d.ts.
└── BUILD.gn - Building rules of Electron.
```
## Structure of Other Directories
## Structure of other Electron directories
* **.github** - GitHub-specific config files including issues templates, CI with GitHub Actions and CODEOWNERS.
* **dist** - Temporary directory created by `script/create-dist.py` script
when creating a distribution.
* **node_modules** - Third party node modules used for building.
* **npm** - Logic for installation of Electron via npm.
* **out** - Temporary output directory of `ninja`.
* **out** - Temporary output directory for `siso`.
* **script** - Scripts used for development purpose like building, packaging,
testing, etc.
```diff
```plaintext
script/ - The set of all scripts Electron runs for a variety of purposes.
├── codesign/ - Fakes codesigning for Electron apps; used for testing.
├── lib/ - Miscellaneous python utility scripts.

View File

@@ -99,7 +99,7 @@ Using `autoUpdater` as an example:
## Methods
### `autoUpdater.setFeedURL(url[, requestHeaders])`
### `autoUpdater.setFeedURL(options)`
```
### Classes

View File

@@ -17,7 +17,7 @@ style, run `npm run lint`, which will run a variety of linting checks
against your changes depending on which areas of the code they touch.
Many of these checks are included as precommit hooks, so it's likely
you error would be caught at commit time.
your error would be caught at commit time.
## Unit Tests

View File

@@ -14,7 +14,7 @@ dependency tree from `node_modules`).
### ASAR integrity
ASAR integrity is an security feature that validates the contents of your app's
ASAR integrity is a security feature that validates the contents of your app's
ASAR archives at runtime. When enabled, your Electron app will verify the
header hash of its ASAR archive on runtime. If no hash is present or if there is a mismatch in the
hashes, the app will forcefully terminate.
@@ -137,9 +137,9 @@ See also: [code signing](#code-signing)
### OSR
OSR (offscreen rendering) can be used for loading heavy page in
OSR (offscreen rendering) can be used for loading a heavy page in
background and then displaying it after (it will be much faster).
It allows you to render page without showing it on screen.
It allows you to render a page without showing it on screen.
For more information, read the [Offscreen Rendering][] tutorial.

View File

@@ -210,7 +210,7 @@ const msiCreator = new MSICreator({
const supportBinaries = await msiCreator.create()
// 🆕 Step 2a: optionally sign support binaries if you
// sign you binaries as part of of your packaging script
// sign your binaries as part of your packaging script
for (const binary of supportBinaries) {
// Binaries are the new stub executable and optionally
// the Squirrel auto updater.
@@ -238,6 +238,20 @@ with 3+ years of verifiable business history and to individual developers in the
Microsoft is looking to make the program more widely available. If you're reading this at a
later point, it could make sense to check if the eligibility criteria have changed.
#### Using `jsign` for Azure Trusted Signing
For developers on Linux or macOS, [`jsign`](https://ebourg.github.io/jsign/) can be used to sign Windows apps via Azure Trusted Signing. Example usage:
```bash
jsign --storetype TRUSTEDSIGNING \
--keystore https://eus.codesigning.azure.net/ \
--storepass $AZURE_ACCESS_TOKEN \
--alias trusted-sign-acct/AppName \
--tsaurl http://timestamp.acs.microsoft.com/ \
--tsmode RFC3161 \
--replace <file>
```
#### Using Electron Forge
Electron Forge is the recommended way to sign your app as well as your `Squirrel.Windows`

View File

@@ -94,7 +94,7 @@ If the extension works on Chrome but not on Electron, file a bug in Electron's
[issue tracker][issue-tracker] and describe which part
of the extension is not working as expected.
[devtools-extension]: https://developer.chrome.com/extensions/devtools
[devtools-extension]: https://developer.chrome.com/docs/extensions/how-to/devtools/extend-devtools
[session]: ../api/session.md
[react-devtools]: https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi
[load-extension]: ../api/extensions-api.md#extensionsloadextensionpath-options

View File

@@ -9,7 +9,7 @@ check out our [Electron Versioning](./electron-versioning.md) doc.
| Electron | Alpha | Beta | Stable | EOL | Chrome | Node | Supported |
| ------- | ----- | ------- | ------ | ------ | ---- | ---- | ---- |
| 40.0.0 | 2025-Oct-30 | 2025-Dec-03 | 2025-Oct-28 | 2026-Jun-30 | M144 | TBD | ✅ |
| 40.0.0 | 2025-Oct-30 | 2025-Dec-03 | 2026-Jan-13 | 2026-Jun-30 | M144 | TBD | ✅ |
| 39.0.0 | 2025-Sep-04 | 2025-Oct-01 | 2025-Oct-28 | 2026-May-05 | M142 | v22.20 | ✅ |
| 38.0.0 | 2025-Jun-26 | 2025-Aug-06 | 2025-Sep-02 | 2026-Mar-10 | M140 | v22.18 | ✅ |
| 37.0.0 | 2025-May-01 | 2025-May-28 | 2025-Jun-24 | 2026-Jan-13 | M138 | v22.16 | ✅ |

View File

@@ -14,7 +14,7 @@ _Notes_:
* There are two rendering modes that can be used (see the section below) and only
the dirty area is passed to the `paint` event to be more efficient.
* You can stop/continue the rendering as well as set the frame rate.
* When `webPreferences.offscreen.useSharedTexture` is not `true`, the maximum frame rate is 240 because greater values bring only performance
* When `webPreferences.offscreen.useSharedTexture` is `false`, the maximum frame rate is 240 because greater values bring only performance
losses with no benefits.
* When nothing is happening on a webpage, no frames are generated.
* An offscreen window is always created as a

View File

@@ -118,13 +118,6 @@ You should at least follow these steps to improve the security of your applicati
19. [Check which fuses you can change](#19-check-which-fuses-you-can-change)
20. [Do not expose Electron APIs to untrusted web content](#20-do-not-expose-electron-apis-to-untrusted-web-content)
To automate the detection of misconfigurations and insecure patterns, it is
possible to use
[Electronegativity](https://github.com/doyensec/electronegativity). For
additional details on potential weaknesses and implementation bugs when
developing applications using Electron, please refer to this
[guide for developers and auditors](https://doyensec.com/resources/us-17-Carettoni-Electronegativity-A-Study-Of-Electron-Security-wp.pdf).
### 1. Only load secure content
Any resources not included with your application should be loaded using a

View File

@@ -30,7 +30,7 @@ If you want to focus on building a great product without debugging a weird quirk
Whatever provider or customer data you need to interact with, they will have probably thought of an integration path with the web. Depending on your technology choice, embedding a YouTube video either takes 30 seconds or requires you to hire a team devoted to streaming and hardware-accelerated video decoding. In the case of YouTube, using anything other than the provided players is actually against their terms and conditions, so youll likely embed a browser frame before you implement your own video streaming decoder.
There will be virtually no platform where your app cannot run if you build it with web technologies. Virtually all devices with a display—be that an ATM, a car infotainment system, a smart TV, a fridge, or a Nintendo Switch—come with means to display web technologies. The web is safe bet if you want to be cross-platform.
There will be virtually no platform where your app cannot run if you build it with web technologies. Virtually all devices with a display—be that an ATM, a car infotainment system, a smart TV, a fridge, or a Nintendo Switch—come with means to display web technologies. The web is a safe bet if you want to be cross-platform.
### Ubiquity
@@ -59,7 +59,7 @@ What does all of that mean for you, a developer, in practice?
### Stability, security, performance
Electron delivers the best experience on all target platforms (macOS, Windows, Linux) by bundling the latest version of Chromium, V8, and Node.js directly with the application binary. When it comes to running and rendering web content with upmost stability, security, and performance, we currently believe that stack to be “best in class”.
Electron delivers the best experience on all target platforms (macOS, Windows, Linux) by bundling the latest version of Chromium, V8, and Node.js directly with the application binary. When it comes to running and rendering web content with utmost stability, security, and performance, we currently believe that stack to be “best in class”.
#### Why bundle anything at all

View File

@@ -52,6 +52,7 @@ auto_filenames = {
"docs/api/service-workers.md",
"docs/api/session.md",
"docs/api/share-menu.md",
"docs/api/shared-texture.md",
"docs/api/shell.md",
"docs/api/structures",
"docs/api/system-preferences.md",
@@ -145,6 +146,12 @@ auto_filenames = {
"docs/api/structures/shared-dictionary-info.md",
"docs/api/structures/shared-dictionary-usage-info.md",
"docs/api/structures/shared-texture-handle.md",
"docs/api/structures/shared-texture-import-texture-info.md",
"docs/api/structures/shared-texture-imported-subtle.md",
"docs/api/structures/shared-texture-imported.md",
"docs/api/structures/shared-texture-subtle.md",
"docs/api/structures/shared-texture-sync-token.md",
"docs/api/structures/shared-texture-transfer.md",
"docs/api/structures/shared-worker-info.md",
"docs/api/structures/sharing-item.md",
"docs/api/structures/shortcut-details.md",
@@ -176,6 +183,7 @@ auto_filenames = {
"lib/renderer/api/context-bridge.ts",
"lib/renderer/api/crash-reporter.ts",
"lib/renderer/api/ipc-renderer.ts",
"lib/renderer/api/shared-texture.ts",
"lib/renderer/api/web-frame.ts",
"lib/renderer/api/web-utils.ts",
"lib/renderer/common-init.ts",
@@ -222,8 +230,10 @@ auto_filenames = {
browser_bundle_deps = [
"lib/browser/api/app.ts",
"lib/browser/api/auto-updater.ts",
"lib/browser/api/auto-updater/auto-updater-msix.ts",
"lib/browser/api/auto-updater/auto-updater-native.ts",
"lib/browser/api/auto-updater/auto-updater-win.ts",
"lib/browser/api/auto-updater/msix-update-win.ts",
"lib/browser/api/auto-updater/squirrel-update-win.ts",
"lib/browser/api/base-window.ts",
"lib/browser/api/browser-view.ts",
@@ -257,6 +267,7 @@ auto_filenames = {
"lib/browser/api/service-worker-main.ts",
"lib/browser/api/session.ts",
"lib/browser/api/share-menu.ts",
"lib/browser/api/shared-texture.ts",
"lib/browser/api/system-preferences.ts",
"lib/browser/api/touch-bar.ts",
"lib/browser/api/tray.ts",
@@ -312,6 +323,7 @@ auto_filenames = {
"lib/renderer/api/exports/electron.ts",
"lib/renderer/api/ipc-renderer.ts",
"lib/renderer/api/module-list.ts",
"lib/renderer/api/shared-texture.ts",
"lib/renderer/api/web-frame.ts",
"lib/renderer/api/web-utils.ts",
"lib/renderer/common-init.ts",
@@ -352,6 +364,7 @@ auto_filenames = {
"lib/renderer/api/exports/electron.ts",
"lib/renderer/api/ipc-renderer.ts",
"lib/renderer/api/module-list.ts",
"lib/renderer/api/shared-texture.ts",
"lib/renderer/api/web-frame.ts",
"lib/renderer/api/web-utils.ts",
"lib/renderer/ipc-renderer-bindings.ts",

View File

@@ -277,6 +277,8 @@ filenames = {
"shell/browser/api/electron_api_in_app_purchase.h",
"shell/browser/api/electron_api_menu.cc",
"shell/browser/api/electron_api_menu.h",
"shell/browser/api/electron_api_msix_updater.cc",
"shell/browser/api/electron_api_msix_updater.h",
"shell/browser/api/electron_api_native_theme.cc",
"shell/browser/api/electron_api_native_theme.h",
"shell/browser/api/electron_api_net_log.cc",
@@ -564,6 +566,7 @@ filenames = {
"shell/common/api/electron_api_native_image.cc",
"shell/common/api/electron_api_native_image.h",
"shell/common/api/electron_api_net.cc",
"shell/common/api/electron_api_shared_texture.cc",
"shell/common/api/electron_api_shell.cc",
"shell/common/api/electron_api_testing.cc",
"shell/common/api/electron_api_url_loader.cc",
@@ -580,6 +583,7 @@ filenames = {
"shell/common/asar/asar_util.h",
"shell/common/asar/scoped_temporary_file.cc",
"shell/common/asar/scoped_temporary_file.h",
"shell/common/callback_util.h",
"shell/common/color_util.cc",
"shell/common/color_util.h",
"shell/common/crash_keys.cc",
@@ -587,6 +591,7 @@ filenames = {
"shell/common/electron_command_line.cc",
"shell/common/electron_command_line.h",
"shell/common/electron_constants.h",
"shell/common/electron_paths.cc",
"shell/common/electron_paths.h",
"shell/common/gin_converters/accelerator_converter.cc",
"shell/common/gin_converters/accelerator_converter.h",

View File

@@ -7,21 +7,17 @@ hunspell_dictionaries = [
"//third_party/hunspell_dictionaries/da-DK-3-0.bdic",
"//third_party/hunspell_dictionaries/de-DE-3-0.bdic",
"//third_party/hunspell_dictionaries/el-GR-3-0.bdic",
"//third_party/hunspell_dictionaries/en-AU-10-0.bdic",
"//third_party/hunspell_dictionaries/en-AU-10-1.bdic",
"//third_party/hunspell_dictionaries/en-CA-10-0.bdic",
"//third_party/hunspell_dictionaries/en-CA-10-1.bdic",
"//third_party/hunspell_dictionaries/en-GB-10-0.bdic",
"//third_party/hunspell_dictionaries/en-GB-10-1.bdic",
"//third_party/hunspell_dictionaries/en-GB-oxendict-10-0.bdic",
"//third_party/hunspell_dictionaries/en-GB-oxendict-10-1.bdic",
"//third_party/hunspell_dictionaries/en-US-10-0.bdic",
"//third_party/hunspell_dictionaries/en-US-10-1.bdic",
"//third_party/hunspell_dictionaries/es-ES-3-0.bdic",
"//third_party/hunspell_dictionaries/et-EE-3-0.bdic",
"//third_party/hunspell_dictionaries/fa-IR-9-0.bdic",
"//third_party/hunspell_dictionaries/fo-FO-3-0.bdic",
"//third_party/hunspell_dictionaries/fr-FR-3-0.bdic",
"//third_party/hunspell_dictionaries/gl-1-0.bdic",
"//third_party/hunspell_dictionaries/he-IL-3-0.bdic",
"//third_party/hunspell_dictionaries/hi-IN-3-0.bdic",
"//third_party/hunspell_dictionaries/hr-HR-3-0.bdic",
@@ -59,6 +55,7 @@ hunspell_dictionaries = [
hunspell_licenses = [
"//third_party/hunspell_dictionaries/COPYING",
"//third_party/hunspell_dictionaries/COPYING.Apache",
"//third_party/hunspell_dictionaries/COPYING.GPL3",
"//third_party/hunspell_dictionaries/COPYING.LESSER",
"//third_party/hunspell_dictionaries/COPYING.LGPL",
"//third_party/hunspell_dictionaries/COPYING.MIT",

View File

@@ -195,6 +195,7 @@ libcxx_headers = [
"//third_party/libc++/src/include/__algorithm/simd_utils.h",
"//third_party/libc++/src/include/__algorithm/sort.h",
"//third_party/libc++/src/include/__algorithm/sort_heap.h",
"//third_party/libc++/src/include/__algorithm/specialized_algorithms.h",
"//third_party/libc++/src/include/__algorithm/stable_partition.h",
"//third_party/libc++/src/include/__algorithm/stable_sort.h",
"//third_party/libc++/src/include/__algorithm/swap_ranges.h",
@@ -263,6 +264,7 @@ libcxx_headers = [
"//third_party/libc++/src/include/__chrono/gps_clock.h",
"//third_party/libc++/src/include/__chrono/hh_mm_ss.h",
"//third_party/libc++/src/include/__chrono/high_resolution_clock.h",
"//third_party/libc++/src/include/__chrono/is_clock.h",
"//third_party/libc++/src/include/__chrono/leap_second.h",
"//third_party/libc++/src/include/__chrono/literals.h",
"//third_party/libc++/src/include/__chrono/local_info.h",
@@ -329,6 +331,8 @@ libcxx_headers = [
"//third_party/libc++/src/include/__configuration/abi.h",
"//third_party/libc++/src/include/__configuration/availability.h",
"//third_party/libc++/src/include/__configuration/compiler.h",
"//third_party/libc++/src/include/__configuration/experimental.h",
"//third_party/libc++/src/include/__configuration/hardening.h",
"//third_party/libc++/src/include/__configuration/language.h",
"//third_party/libc++/src/include/__configuration/platform.h",
"//third_party/libc++/src/include/__coroutine/coroutine_handle.h",
@@ -1092,7 +1096,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__locale_dir/get_c_locale.h",
"//third_party/libc++/src/include/__locale_dir/locale_base_api/bsd_locale_fallbacks.h",
"//third_party/libc++/src/include/__locale_dir/locale_base_api/ibm.h",
"//third_party/libc++/src/include/__locale_dir/locale_base_api/musl.h",
"//third_party/libc++/src/include/__locale_dir/locale_base_api/openbsd.h",
"//third_party/libc++/src/include/__locale_dir/locale_base_api.h",
"//third_party/libc++/src/include/__locale_dir/messages.h",
@@ -1105,6 +1108,7 @@ libcxx_headers = [
"//third_party/libc++/src/include/__locale_dir/support/freebsd.h",
"//third_party/libc++/src/include/__locale_dir/support/fuchsia.h",
"//third_party/libc++/src/include/__locale_dir/support/linux.h",
"//third_party/libc++/src/include/__locale_dir/support/netbsd.h",
"//third_party/libc++/src/include/__locale_dir/support/no_locale/characters.h",
"//third_party/libc++/src/include/__locale_dir/support/no_locale/strtonum.h",
"//third_party/libc++/src/include/__locale_dir/support/windows.h",
@@ -1142,7 +1146,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__mdspan/mdspan.h",
"//third_party/libc++/src/include/__memory/addressof.h",
"//third_party/libc++/src/include/__memory/align.h",
"//third_party/libc++/src/include/__memory/aligned_alloc.h",
"//third_party/libc++/src/include/__memory/allocate_at_least.h",
"//third_party/libc++/src/include/__memory/allocation_guard.h",
"//third_party/libc++/src/include/__memory/allocator.h",
@@ -1360,7 +1363,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__tuple/tuple_like.h",
"//third_party/libc++/src/include/__tuple/tuple_like_no_subrange.h",
"//third_party/libc++/src/include/__tuple/tuple_size.h",
"//third_party/libc++/src/include/__tuple/tuple_types.h",
"//third_party/libc++/src/include/__type_traits/add_cv_quals.h",
"//third_party/libc++/src/include/__type_traits/add_pointer.h",
"//third_party/libc++/src/include/__type_traits/add_reference.h",
@@ -1395,7 +1397,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__type_traits/is_array.h",
"//third_party/libc++/src/include/__type_traits/is_assignable.h",
"//third_party/libc++/src/include/__type_traits/is_base_of.h",
"//third_party/libc++/src/include/__type_traits/is_bounded_array.h",
"//third_party/libc++/src/include/__type_traits/is_callable.h",
"//third_party/libc++/src/include/__type_traits/is_char_like_type.h",
"//third_party/libc++/src/include/__type_traits/is_class.h",
@@ -1432,7 +1433,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/__type_traits/is_reference.h",
"//third_party/libc++/src/include/__type_traits/is_reference_wrapper.h",
"//third_party/libc++/src/include/__type_traits/is_referenceable.h",
"//third_party/libc++/src/include/__type_traits/is_replaceable.h",
"//third_party/libc++/src/include/__type_traits/is_same.h",
"//third_party/libc++/src/include/__type_traits/is_scalar.h",
"//third_party/libc++/src/include/__type_traits/is_signed.h",
@@ -1446,13 +1446,13 @@ libcxx_headers = [
"//third_party/libc++/src/include/__type_traits/is_trivially_destructible.h",
"//third_party/libc++/src/include/__type_traits/is_trivially_lexicographically_comparable.h",
"//third_party/libc++/src/include/__type_traits/is_trivially_relocatable.h",
"//third_party/libc++/src/include/__type_traits/is_unbounded_array.h",
"//third_party/libc++/src/include/__type_traits/is_union.h",
"//third_party/libc++/src/include/__type_traits/is_unqualified.h",
"//third_party/libc++/src/include/__type_traits/is_unsigned.h",
"//third_party/libc++/src/include/__type_traits/is_valid_expansion.h",
"//third_party/libc++/src/include/__type_traits/is_void.h",
"//third_party/libc++/src/include/__type_traits/is_volatile.h",
"//third_party/libc++/src/include/__type_traits/is_within_lifetime.h",
"//third_party/libc++/src/include/__type_traits/lazy.h",
"//third_party/libc++/src/include/__type_traits/make_32_64_or_128_bit.h",
"//third_party/libc++/src/include/__type_traits/make_const_lvalue_ref.h",
@@ -1640,7 +1640,6 @@ libcxx_headers = [
"//third_party/libc++/src/include/sstream",
"//third_party/libc++/src/include/stack",
"//third_party/libc++/src/include/stdatomic.h",
"//third_party/libc++/src/include/stdbool.h",
"//third_party/libc++/src/include/stddef.h",
"//third_party/libc++/src/include/stdexcept",
"//third_party/libc++/src/include/stdio.h",

View File

@@ -1,5 +1,10 @@
if (process.platform === 'win32') {
module.exports = require('./auto-updater/auto-updater-win');
// windowsStore indicates whether the app is running as a packaged app (MSIX), even outside of the store
if (process.windowsStore) {
module.exports = require('./auto-updater/auto-updater-msix');
} else {
module.exports = require('./auto-updater/auto-updater-win');
}
} else {
module.exports = require('./auto-updater/auto-updater-native');
}

View File

@@ -0,0 +1,449 @@
import * as msixUpdate from '@electron/internal/browser/api/auto-updater/msix-update-win';
import { app, net } from 'electron/main';
import { EventEmitter } from 'events';
interface UpdateInfo {
ok: boolean; // False if error encountered
available?: boolean; // True if the update is available, false if not
updateUrl?: string; // The URL of the update
releaseNotes?: string; // The release notes of the update
releaseName?: string; // The release name of the update
releaseDate?: Date; // The release date of the update
}
interface MSIXPackageInfo {
id: string;
familyName: string;
developmentMode: boolean;
version: string;
signatureKind: 'developer' | 'enterprise' | 'none' | 'store' | 'system';
appInstallerUri?: string;
}
/**
* Options for updating an MSIX package.
* Used with `updateMsix()` to control how the package update behaves.
*
* These options correspond to the Windows.Management.Deployment.AddPackageOptions class properties.
*
* @see https://learn.microsoft.com/en-us/uwp/api/windows.management.deployment.addpackageoptions?view=winrt-26100
*/
export interface UpdateMsixOptions {
/**
* Gets or sets a value that indicates whether to delay registration of the main package
* or dependency packages if the packages are currently in use.
*
* Corresponds to `AddPackageOptions.DeferRegistrationWhenPackagesAreInUse`
*
* @default false
*/
deferRegistration?: boolean;
/**
* Gets or sets a value that indicates whether the app is installed in developer mode.
* When set, the app is installed in development mode which allows for a more rapid
* development cycle. The BlockMap.xml, [Content_Types].xml, and digital signature
* files are not required for app installation.
*
* Corresponds to `AddPackageOptions.DeveloperMode`
*
* @default false
*/
developerMode?: boolean;
/**
* Gets or sets a value that indicates whether the processes associated with the package
* will be shut down forcibly so that registration can continue if the package, or any
* package that depends on the package, is currently in use.
*
* Corresponds to `AddPackageOptions.ForceAppShutdown`
*
* @default false
*/
forceShutdown?: boolean;
/**
* Gets or sets a value that indicates whether the processes associated with the package
* will be shut down forcibly so that registration can continue if the package is
* currently in use.
*
* Corresponds to `AddPackageOptions.ForceTargetAppShutdown`
*
* @default false
*/
forceTargetShutdown?: boolean;
/**
* Gets or sets a value that indicates whether to force a specific version of a package
* to be added, regardless of if a higher version is already added.
*
* Corresponds to `AddPackageOptions.ForceUpdateFromAnyVersion`
*
* @default false
*/
forceUpdateFromAnyVersion?: boolean;
}
/**
* Options for registering an MSIX package.
* Used with `registerPackage()` to control how the package registration behaves.
*
* These options correspond to the Windows.Management.Deployment.DeploymentOptions enum.
*
* @see https://learn.microsoft.com/en-us/uwp/api/windows.management.deployment.deploymentoptions?view=winrt-26100
*/
interface RegisterPackageOptions {
/**
* Force shutdown of the application if it's currently running.
* If this package, or any package that depends on this package, is currently in use,
* the processes associated with the package are shut down forcibly so that registration can continue.
*
* Corresponds to `DeploymentOptions.ForceApplicationShutdown` (value: 1)
*
* @default false
*/
forceShutdown?: boolean;
/**
* Force shutdown of the target application if it's currently running.
* If this package is currently in use, the processes associated with the package
* are shut down forcibly so that registration can continue.
*
* Corresponds to `DeploymentOptions.ForceTargetApplicationShutdown` (value: 64)
*
* @default false
*/
forceTargetShutdown?: boolean;
/**
* Force a specific version of a package to be staged/registered, regardless of if
* a higher version is already staged/registered.
*
* Corresponds to `DeploymentOptions.ForceUpdateFromAnyVersion` (value: 262144)
*
* @default false
*/
forceUpdateFromAnyVersion?: boolean;
}
class AutoUpdater extends EventEmitter implements Electron.AutoUpdater {
updateAvailable: boolean = false;
updateURL: string | null = null;
updateHeaders: Record<string, string> | null = null;
allowAnyVersion: boolean = false;
// Private: Validate that the URL points to an MSIX file (following redirects)
private async validateMsixUrl (url: string): Promise<void> {
try {
// Make a HEAD request to follow redirects and get the final URL
const response = await net.fetch(url, {
method: 'HEAD',
headers: this.updateHeaders ? new Headers(this.updateHeaders) : undefined,
redirect: 'follow' // Follow redirects to get the final URL
});
// Get the final URL after redirects (response.url contains the final URL)
const finalUrl = response.url || url;
const urlObj = new URL(finalUrl);
const pathname = urlObj.pathname.toLowerCase();
// Check if final URL ends with .msix or .msixbundle extension
const hasMsixExtension = pathname.endsWith('.msix') || pathname.endsWith('.msixbundle');
if (!hasMsixExtension) {
throw new Error(`Update URL does not point to an MSIX file. Expected .msix or .msixbundle extension, got final URL: ${finalUrl}`);
}
} catch (error) {
if (error instanceof TypeError) {
throw new Error(`Invalid MSIX URL: ${url}`);
}
throw error;
}
}
// Private: Check if URL is a direct MSIX file (following redirects)
private async isDirectMsixUrl (url: string, emitError: boolean = false): Promise<boolean> {
try {
await this.validateMsixUrl(url);
return true;
} catch (error) {
if (emitError) {
this.emitError(error as Error);
}
return false;
}
}
// Supports both versioning (x.y.z) and Windows version format (x.y.z.a)
// Returns: 1 if v1 > v2, -1 if v1 < v2, 0 if v1 === v2
private compareVersions (v1: string, v2: string): number {
const parts1 = v1.split('.').map(part => {
const parsed = parseInt(part, 10);
return isNaN(parsed) ? 0 : parsed;
});
const parts2 = v2.split('.').map(part => {
const parsed = parseInt(part, 10);
return isNaN(parsed) ? 0 : parsed;
});
const maxLength = Math.max(parts1.length, parts2.length);
for (let i = 0; i < maxLength; i++) {
const part1 = parts1[i] ?? 0;
const part2 = parts2[i] ?? 0;
if (part1 > part2) return 1;
if (part1 < part2) return -1;
}
return 0;
}
// Private: Parse the static releases array format
// This is a static JSON file containing all releases
private parseStaticReleasFile (json: any, currentVersion: string): { ok: boolean; available: boolean; url?: string; name?: string; notes?: string; pub_date?: string } {
if (!Array.isArray(json.releases) || !json.currentRelease || typeof json.currentRelease !== 'string') {
this.emitError(new Error('Invalid releases format. Expected \'releases\' array and \'currentRelease\' string.'));
return { ok: false, available: false };
}
// Use currentRelease property to determine if update is available
const currentReleaseVersion = json.currentRelease;
// Compare current version with currentRelease
const versionComparison = this.compareVersions(currentReleaseVersion, currentVersion);
// If versions match, we're up to date
if (versionComparison === 0) {
return { ok: true, available: false };
}
// If currentRelease is older than current version, check allowAnyVersion
if (versionComparison < 0) {
// If allowAnyVersion is true, allow downgrades
if (this.allowAnyVersion) {
// Continue to find the release entry for downgrade
} else {
return { ok: true, available: false };
}
}
// currentRelease is newer, find the release entry
const releaseEntry = json.releases.find((r: any) => r.version === currentReleaseVersion);
if (!releaseEntry || !releaseEntry.updateTo) {
this.emitError(new Error(`Release entry for version '${currentReleaseVersion}' not found or missing 'updateTo' property.`));
return { ok: false, available: false };
}
const updateTo = releaseEntry.updateTo;
if (!updateTo.url) {
this.emitError(new Error(`Invalid release entry. 'updateTo.url' is missing for version ${currentReleaseVersion}.`));
return { ok: false, available: false };
}
return {
ok: true,
available: true,
url: updateTo.url,
name: updateTo.name,
notes: updateTo.notes,
pub_date: updateTo.pub_date
};
}
private parseDynamicReleasFile (json: any): { ok: boolean; available: boolean; url?: string; name?: string; notes?: string; pub_date?: string } {
if (!json.url) {
this.emitError(new Error('Invalid releases format. Expected \'url\' string property.'));
return { ok: false, available: false };
}
return { ok: true, available: true, url: json.url, name: json.name, notes: json.notes, pub_date: json.pub_date };
}
private async fetchSquirrelJson (url: string) {
const headers: Record<string, string> = {
...this.updateHeaders,
Accept: 'application/json' // Always set Accept header, overriding any user-provided Accept
};
const response = await net.fetch(url, {
headers
});
if (response.status === 204) {
return { ok: true, available: false };
} else if (response.status === 200) {
const updateJson = await response.json();
// Check if this is the static releases array format
if (Array.isArray(updateJson.releases)) {
// Get current package version
const packageInfo = msixUpdate.getPackageInfo();
const currentVersion = packageInfo.version;
if (!currentVersion) {
this.emitError(new Error('Cannot determine current package version.'));
return { ok: false, available: false };
}
return this.parseStaticReleasFile(updateJson, currentVersion);
} else {
// Dynamic format: server returns JSON with update info for current version
return this.parseDynamicReleasFile(updateJson);
}
} else {
this.emitError(new Error(`Unexpected response status: ${response.status}`));
return { ok: false, available: false };
}
}
private async getUpdateInfo (url: string): Promise<UpdateInfo> {
if (url && await this.isDirectMsixUrl(url)) {
return { ok: true, available: true, updateUrl: url, releaseDate: new Date() };
} else {
const updateJson = await this.fetchSquirrelJson(url);
if (!updateJson.ok) {
return { ok: false };
} else if (updateJson.ok && !updateJson.available) {
return { ok: true, available: false };
} else {
// updateJson.ok && updateJson.available must be true here
// Parse the publication date if present (ISO 8601 format)
let releaseDate: Date | null = null;
if (updateJson.pub_date) {
releaseDate = new Date(updateJson.pub_date);
}
const updateUrl = updateJson.url ?? '';
const releaseNotes = updateJson.notes ?? '';
const releaseName = updateJson.name ?? '';
releaseDate = releaseDate ?? new Date();
if (!await this.isDirectMsixUrl(updateUrl, true)) {
return { ok: false };
} else {
return {
ok: true,
available: true,
updateUrl,
releaseNotes,
releaseName,
releaseDate
};
}
}
}
}
getFeedURL () {
return this.updateURL ?? '';
}
setFeedURL (options: { url: string; headers?: Record<string, string>; allowAnyVersion?: boolean } | string) {
let updateURL: string;
let headers: Record<string, string> | undefined;
let allowAnyVersion: boolean | undefined;
if (typeof options === 'object') {
if (typeof options.url === 'string') {
updateURL = options.url;
headers = options.headers;
allowAnyVersion = options.allowAnyVersion;
} else {
throw new TypeError('Expected options object to contain a \'url\' string property in setFeedUrl call');
}
} else if (typeof options === 'string') {
updateURL = options;
} else {
throw new TypeError('Expected an options object with a \'url\' property to be provided');
}
this.updateURL = updateURL;
this.updateHeaders = headers ?? null;
this.allowAnyVersion = allowAnyVersion ?? false;
}
getPackageInfo (): MSIXPackageInfo {
return msixUpdate.getPackageInfo() as MSIXPackageInfo;
}
async checkForUpdates () {
const url = this.updateURL;
if (!url) {
return this.emitError(new Error('Update URL is not set'));
}
// Check if running in MSIX package
const packageInfo = msixUpdate.getPackageInfo();
if (!packageInfo.familyName) {
return this.emitError(new Error('MSIX updates are not supported'));
}
// If appInstallerUri is set, Windows App Installer manages updates automatically
// Prevent updates here to avoid conflicts
if (packageInfo.appInstallerUri) {
return this.emitError(new Error('Auto-updates are managed by Windows App Installer. Updates are not allowed when installed via Application Manifest.'));
}
this.emit('checking-for-update');
try {
const msixUrlInfo = await this.getUpdateInfo(url);
if (!msixUrlInfo.ok) {
return this.emitError(new Error('Invalid update or MSIX URL. See previous errors.'));
}
if (!msixUrlInfo.available) {
this.emit('update-not-available');
} else {
this.updateAvailable = true;
this.emit('update-available');
await msixUpdate.updateMsix(msixUrlInfo.updateUrl, {
deferRegistration: true,
developerMode: false,
forceShutdown: false,
forceTargetShutdown: false,
forceUpdateFromAnyVersion: this.allowAnyVersion
} as UpdateMsixOptions);
this.emit('update-downloaded', {}, msixUrlInfo.releaseNotes, msixUrlInfo.releaseName, msixUrlInfo.releaseDate, msixUrlInfo.updateUrl, () => {
this.quitAndInstall();
});
}
} catch (error) {
this.emitError(error as Error);
}
}
async quitAndInstall () {
if (!this.updateAvailable) {
this.emitError(new Error('No update available, can\'t quit and install'));
app.quit();
return;
}
try {
// Get package info to get family name
const packageInfo = msixUpdate.getPackageInfo();
if (!packageInfo.familyName) {
return this.emitError(new Error('MSIX updates are not supported'));
}
msixUpdate.registerRestartOnUpdate('');
this.emit('before-quit-for-update');
// force shutdown of the application and register the package to be installed on restart
await msixUpdate.registerPackage(packageInfo.familyName, {
forceShutdown: true
} as RegisterPackageOptions);
} catch (error) {
this.emitError(error as Error);
}
}
// Private: Emit both error object and message, this is to keep compatibility
// with Old APIs.
emitError (error: Error) {
this.emit('error', error, error.message);
}
}
export default new AutoUpdater();

Some files were not shown because too many files have changed in this diff Show More