Compare commits

...

255 Commits

Author SHA1 Message Date
trop[bot]
87badb84f8 test: remove split dependency (#49555)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2026-01-28 15:38:05 +01:00
trop[bot]
2f3a1ca461 fix: chrome://accessibility drift (#49559)
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:39 +01:00
trop[bot]
81ae20905c ci: reapply patches if PR base branch updates them (#49533)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2026-01-27 17:40:35 -05:00
trop[bot]
da4a808af7 docs: correct type for process.noDeprecation (#49545)
* 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:32 +01:00
trop[bot]
71579e4749 fix: second argument to shell.writeShortcutLink is optional (#49502)
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-23 14:31:09 -05:00
trop[bot]
06fdee87b3 fix: return early from platform_util::Beep() on Linux if there is no default GDK display (#49484)
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-23 11:07:47 +01:00
trop[bot]
6ce52ad792 fix: potential devtools crash on empty (#49489)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-01-22 11:59:57 -05:00
electron-roller[bot]
7784d25821 chore: bump node to v22.22.0 (39-x-y) (#49389)
* chore: bump node in DEPS to v22.22.0

* chore: update patches

* chore: fixup sandboxed pointers patch

(cherry picked from commit f52fbdbe51)

* chore: fixup v8 sandbox pointers node patch

* tls: route callback exceptions through error handlers

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

* chore:remove zero-fill sandbox patch component

xref https://github.com/electron/electron/pull/49452

* fixup! chore:remove zero-fill sandbox patch component

* test: correct conditional secure heap flags test

xref:  https://github.com/nodejs/node/pull/60385

---------

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: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2026-01-22 09:53:44 -05:00
trop[bot]
126a32c5d2 docs: document that shell.trashItem requires backslashes (#49479)
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:52:13 -05:00
trop[bot]
811b1d6326 revert: use deprecated setAllowedFileTypes in macOS dialogs (#49472)
* 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 17:57:35 +01:00
trop[bot]
50fc493ae6 ci: detect patch needs update error with problem matcher (#49412)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2026-01-21 12:32:04 +01:00
trop[bot]
9453e8bfe1 build: roll build-image to a82b87d (#49450)
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:42 +01:00
trop[bot]
a4eb213a04 fix: restore AXDocument accessibility attribute for representedFilename on macOS (#49418)
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-19 15:02:51 +01:00
trop[bot]
81c08e80f6 docs: fix webContents.hostWebContents types (#49445)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2026-01-19 10:58:28 +01:00
trop[bot]
5f630c7de7 fix: try clearing InspectableWebContents delegate earlier (#49423)
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 09:52:20 +01:00
trop[bot]
2dc82ea1f3 fix: make toplevel icon Wayland protocol work (#49415)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Alex Schwartz <alexschwartz01@gmail.com>
2026-01-16 11:04:40 -05:00
Shelley Vohr
f57d6f92b6 feat: support WebSocket authentication handling (#49065)
* feat: support WebSocket authentication handling

* chore: make linter happy

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2026-01-13 08:52:14 -05:00
Robo
744142fe54 fix: reduce stack memory consumption in BytecodeGenerator (#49360)
Reduce stack memory consumption in BytecodeGenerator

Backports

1) https://chromium-review.googlesource.com/c/v8/v8/+/7180480
2) https://chromium-review.googlesource.com/c/v8/v8/+/7160576
3) https://chromium-review.googlesource.com/c/v8/v8/+/7062734

2 and 3 are needed to cleanly land 1. However, most of the code
changes are noop since v8_flags.proto_assign_seq_opt is experimental
and disabled by default for feature. The reason why stack memory
consumption is improved for all scenarios can be found in
https://github.com/microsoft/vscode/issues/283403#issuecomment-3737968271
2026-01-13 19:04:51 +09:00
trop[bot]
b200b8d6c0 build: roll build-tools SHA to 4430e4a (#49367)
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:44:02 -05:00
electron-roller[bot]
cdaf0e96b6 chore: bump chromium to 142.0.7444.265 (39-x-y) (#49322)
chore: bump chromium in DEPS to 142.0.7444.265

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2026-01-12 11:29:53 +01:00
trop[bot]
981df181c1 chore: improvements to script/run-clang-tidy.ts (#49341)
* 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:00 -06:00
John Kleinschmidt
218300e57f build: use @electron-ci/dev-root for package.json default (#49319)
* build: use @electron-ci/dev-root for package.json default (#49154)

(cherry picked from commit bab6bd3dae)

* fxiup
2026-01-07 09:48:08 -05:00
Charles Kerr
6ccee512e4 chore: remove patches/v8/cherry-pick-e0052e7af9c9 (#49309)
chore: remove patches/v8/cherry-pick-e0052e7af9c9.patch

included in latest roll of upstream w/v8 14.2.231.22
2026-01-06 12:43:37 -06:00
trop[bot]
b6e4f514d8 docs: update roundedCorners documentation (#49310)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2026-01-06 11:00:23 -05:00
trop[bot]
ade4c00984 fix: webRequest.onBeforeSendHeaders not being able to modify reserved headers (#49242)
* 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-05 16:30:50 -05:00
trop[bot]
d8687cfc9d build: fixup release notes generation (#49304)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
2026-01-05 15:56:30 -05:00
electron-roller[bot]
2ab4489447 chore: bump chromium to 142.0.7444.243 (39-x-y) (#49228)
chore: bump chromium in DEPS to 142.0.7444.243

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2026-01-02 13:49:22 +09:00
Keeley Hammond
ab9b156113 chore: cherry-pick e0052e7af9c9 from v8 (#49287)
* chore: cherry-pick e0052e7af9c9 from v8

* chore: update patches
2025-12-31 17:02:33 +13:00
trop[bot]
35a531953b build: drop dugite as a dependency (#49205)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
2025-12-15 16:39:41 -05:00
trop[bot]
4d18062d0f ci: disallow non-maintainer changes to Yarn files (#49192)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-12-11 17:14:14 -05:00
electron-roller[bot]
832ffb2330 chore: bump chromium to 142.0.7444.235 (39-x-y) (#49190)
chore: bump chromium in DEPS to 142.0.7444.235

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2025-12-11 15:25:12 -05:00
trop[bot]
03121eeaef build: upgrade yarn to 4.12.0 (#49179)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
2025-12-10 19:20:43 -08:00
trop[bot]
8282c07a0f build: upgrade github-app-auth to 3.2.0 (#49177)
build: upgrade github-app-auth to 3.2.0 (#49152)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-12-10 14:20:43 -05:00
Niklas Wenzel
f2d1cb21b0 fix: visual artifacts while resizing on Windows (#49138)
Manual backports of:

- crrev.com/c/7129658
- crrev.com/c/7210913
- crrev.com/c/7115438
2025-12-04 16:42:24 -08:00
electron-roller[bot]
ef9b4162af chore: bump chromium to 142.0.7444.226 (39-x-y) (#49137)
* chore: bump chromium in DEPS to 142.0.7444.226

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-12-03 15:50:16 -05:00
trop[bot]
6e97bca80d fix: run toast creation on background thread (#49130)
* 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:24 -08:00
trop[bot]
c511fc5c3f chore: reclaim macOS disk space (#49121)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-12-01 15:30:07 -08:00
trop[bot]
22dfbb0822 ci: use clang problem matcher with nan spec runner (#49099)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-12-01 09:45:35 -05:00
trop[bot]
85913a38da fix: ensure menu-did-close is emitted for application menus (#49093)
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:13 -06:00
trop[bot]
a327629ca2 ci: don't build yarn modules for linux arm (#49088)
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:30 -05:00
Niklas Wenzel
7deed2b980 fix: reduce visual artifacts while resizing on Windows (#49076) 2025-11-26 10:23:52 +01:00
trop[bot]
65fc06a9f7 chore: backport 744f40f from devtools-frontend (#49044)
* chore: backport 744f40f from devtools-frontend

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

* chore: update patch

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-11-25 12:07:04 -06:00
John Kleinschmidt
245e70aedd test: fixup test failures on linux (#49059)
* test: fixup spec runner to properly fail on linux when tests fail

* test: fixup dbus tests

* test: disable context menu spellcheck tests on linux

https://github.com/electron/electron/pull/48657 broke those tests
(cherry picked from commit cc3c999148)

* test:rebuild native modules

(cherry picked from commit bb8e2a924b)

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

(cherry picked from commit 6fd2575cbc)

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

(cherry picked from commit ea830139af)

---------

Co-authored-by: Alice Zhao <alicelovescake@anthropic.com>
2025-11-24 17:02:14 -05:00
trop[bot]
2a8164f499 fix: exception when reading system certificates via nodejs (#49042)
* fix: exception when reading system certificates via nodejs

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

* fixup! fix: exception when reading system certificates via nodejs

chore: fix trop patch shear

* chore: update patches

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-11-24 14:47:53 -06:00
trop[bot]
2f7024dbcc docs: update linux build instructions (#49060)
* 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:33 -06:00
trop[bot]
d53d3bb99e docs: explain how to create transparent window using BaseWindow (#49051)
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:48 +01:00
trop[bot]
c2c1d40294 fix: only call popup closecallback for top-level menu (#49045)
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:47 +01:00
electron-roller[bot]
0e9decd459 chore: bump chromium to 142.0.7444.177 (39-x-y) (#49037)
chore: bump chromium in DEPS to 142.0.7444.177

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2025-11-21 10:21:05 -05:00
John Kleinschmidt
b2e73d28e2 build: update to yarn v4 (#48994)
* build: update to yarn v4

(cherry picked from commit 6adec744f3)

* chore: fixup types after yarn v4 migration

* chore: update nan yarn.lock patch

* build: automatically install git for dugite
2025-11-19 17:32:30 -05:00
trop[bot]
aeb5af803f fix: abort more descriptively for beforeunload (#49011)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-11-19 17:00:51 -05:00
trop[bot]
53819a8a2a fix: revert the parent window remained interactive after the modal window was opened (#49019)
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 16:56:33 -05:00
electron-roller[bot]
14565211f7 chore: bump chromium to 142.0.7444.175 (39-x-y) (#49003)
* chore: bump chromium in DEPS to 142.0.7444.175

* 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-18 11:25:22 -08:00
trop[bot]
00646c9db6 fix: handle empty event scenario in ipc callbacks (#48992)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-11-18 09:17:20 -05:00
trop[bot]
d9c33a951a build: add header for SetStackDumpFirstChanceCallback in renderer client (#48980)
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:28 -08:00
trop[bot]
8b02e33187 build: limit workflow gh token permissions (#48969)
* 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-15 11:32:21 +01:00
trop[bot]
eecca2cb19 fix: revert enabling WASM trap handlers in all Node.js processes (#48975)
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:56:50 -08:00
trop[bot]
08b5ef556c test: add view.getBounds|setBounds tests (#48961)
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 12:12:22 -05:00
Shelley Vohr
ab85f2c2f7 chore: cherry-pick 4cf9311 from v8 (#48951) 2025-11-13 14:50:46 -08:00
Fedor Indutny
1936243ce1 fix: crash on windows when UTF-8 is in path (#48944)
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.
2025-11-13 13:56:30 -08:00
trop[bot]
e7e052f5b1 docs: fix docs for app.isHardwareAccelerationEnabled() (#48945)
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:43 -05:00
trop[bot]
349a9b6398 docs: explain how to load SF Symbols with nativeImage (#48939)
* 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:19:21 -05:00
trop[bot]
b5f19ce974 feat: add bypassCustomProtocolHandlers option to net.request (#48882)
* 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:35:06 -05:00
trop[bot]
bb930b887b feat: add app.isHardwareAccelerationEnabled() (#48680)
* feat: add app.isHardwareAccelerationEnabled()

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

* chore: address review feedback

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-13 10:32:14 -05:00
trop[bot]
e962bc3743 docs: clarify meaning of string value for menu item icon (#48938)
* 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:01 -05:00
trop[bot]
895cf006e7 fix: Windows: Calling window.setFocusable(true) will no longer cause a window to lose focus (#48928)
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:52:58 +01:00
trop[bot]
bc1ca72dc7 docs: fix v40 stable release date (#48920)
* 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:22 +01:00
electron-roller[bot]
a9a4c77353 chore: bump chromium to 142.0.7444.162 (39-x-y) (#48899)
* chore: bump chromium in DEPS to 142.0.7444.162

* 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-12 11:24:14 +01:00
trop[bot]
0f613246d9 fix: restore window's canHide property on macOS (#48901)
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-12 09:42:37 +01:00
trop[bot]
a77b92adf2 ci: exclude top-level docs files from full CI (#48895)
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:06:23 +01:00
trop[bot]
d62c324567 fix: enable wasm trap handlers in all Node.js processes (#48837)
* 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>

* build: add missing header for SetStackDumpFirstChanceCallback

* fix: pdf spec

delay load pdfjs-dist which compiles wasm on load, trap handlers
will be initialized once the user script starts but before app#ready.

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-11-11 18:45:57 +09:00
trop[bot]
108a26a0f9 docs: remove electronegativity (#48887)
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:08 +01:00
Shelley Vohr
331f8cca47 feat: enable resetting accent color (#48852) 2025-11-10 16:44:20 -05:00
trop[bot]
215128715a feat: Focus DevTools when breakpoint is triggered (#48702)
`bringToFront` DevTools message is sent when breakpoint is triggered
or inspect is called and Chromium upon this message activates DevTools
via `DevToolsUIBindings::Delegate::ActivateWindow`:
```
void DevToolsWindow::ActivateWindow() {
  if (life_stage_ != kLoadCompleted)
    return;
\#if BUILDFLAG(IS_ANDROID)
  NOTIMPLEMENTED();
\#else
  if (is_docked_ && GetInspectedBrowserWindow())
    main_web_contents_->Focus();
  else if (!is_docked_ && browser_ && !browser_->window()->IsActive())
    browser_->window()->Activate();
\#endif
}
```
which implements: `DevToolsUIBindings::Delegate::ActivateWindow`.

Electron also implements this interface in:
`electron::InspectableWebContents`. However it was only setting
a zoom level, therefore this commit extends it with activation
of the DevTools.

Only supported for DevTools manged by `electron::InspectableWebContents`.

Closes: #37388

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Michał Pichliński <michal.pichlinski@here.io>
2025-11-10 16:42:40 -05:00
trop[bot]
efcab52714 feat: add SF Symbol support to NativeImage::CreateFromNamedImage (#48773)
* 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:45 +01:00
Fedor Indutny
3495a3da69 fix: ESM-from-CJS import when CJK is in path (#48873)
Upstream fix: https://github.com/nodejs/node/pull/60575
2025-11-10 14:59:58 -05:00
trop[bot]
364f3ed265 refactor: remove spellcheck::kWinDelaySpellcheckServiceInit patch (#48857)
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 11:54:00 -05:00
trop[bot]
52f0b08bbb docs: update macOS version support in README (#48870)
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:52:05 -05:00
trop[bot]
8453434b7e fix: the parent window remained interactive after the modal window was opened (#48865)
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:25 +01:00
trop[bot]
8d2ad379a6 fix: CSD window frame tiles properly on Wayland (#48834)
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:50:05 +01:00
trop[bot]
b847900ad2 docs: Update 404 devtools extension documentation link (#48842)
* 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:14 +01:00
electron-roller[bot]
97a339250a chore: bump chromium to 142.0.7444.134 (39-x-y) (#48818)
* chore: bump chromium in DEPS to 142.0.7444.134

* 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 11:23:43 +01:00
trop[bot]
3fb81955bb fix(reland): allow disabling all NSMenuItems (#48830)
* 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 10:36:49 +01:00
trop[bot]
862129506f fix: oom crash in v8 when optimizing wasm (#48815)
* fix: oom crash in v8 when optimizing wasm

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

* chore: update patches

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-11-07 14:35:07 +09:00
trop[bot]
6972fbfea3 build: use --keep-non-patch flag with git am (#48808)
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:02 +01:00
trop[bot]
81332eaf65 fix: revert allow disabling all NSMenuItems, fix menu crash (#48800)
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:27:43 -08:00
trop[bot]
a06d00df6c fix: draw smoothing round rect corner (#48781)
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 18:26:06 -05:00
trop[bot]
cc785842ca fix: release mouse buttons on focus loss on Wayland (#48758)
* fix: release mouse buttons on focus loss on Wayland

Co-authored-by: Mitchell Cohen <mitch.cohen@me.com>

* chore: update .patches file after trop

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Mitchell Cohen <mitch.cohen@me.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-11-03 22:09:14 -05:00
Calvin
2e9f754701 docs: add release timeline for Electron 40 (#48751)
Backport of c761a7529e
2025-11-03 11:15:36 +01:00
trop[bot]
1d300adc6f docs: clarify BrowserWindow and App API support status on Wayland (#48746)
* docs: clarify BrowserWindow API support in Wayland

Co-authored-by: Mitchell Cohen <mitch.cohen@me.com>

* typo fix

Co-authored-by: Mitchell Cohen <mitch.cohen@me.com>

* updated docs

Co-authored-by: Mitchell Cohen <mitch.cohen@me.com>

* wrapping

Co-authored-by: Mitchell Cohen <mitch.cohen@me.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Mitchell Cohen <mitch.cohen@me.com>
2025-10-31 16:55:21 -05:00
trop[bot]
f404955dc8 refactor: remove redundant map lookups in browser/api/menu.ts (#48731)
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:01 -04:00
electron-roller[bot]
0c0376637c chore: bump node to v22.21.1 (39-x-y) (#48616)
* chore: bump node in DEPS to v22.21.0

* chore: bump node in DEPS to v22.21.1

* chore: update patches

* fixup patches/node/api_remove_deprecated_getisolate.patch

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

https://github.com/nodejs/node/pull/59082
(cherry picked from commit 851df7ede67192efd3db4847eeb7b254ba62a3ea)

---------

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-10-30 09:37:51 -04:00
electron-roller[bot]
6938c90ffe chore: bump chromium to 142.0.7444.59 (39-x-y) (#48723)
chore: bump chromium in DEPS to 142.0.7444.59

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2025-10-29 10:12:51 -04:00
trop[bot]
32f97529fc docs: use relative link for OffscreenSharedTexture (#48719)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
2025-10-28 15:41:56 -07:00
trop[bot]
429b5376cb docs: add caveats for Electron PipeWire implementation (#48713)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: byquanton <32410361+byquanton@users.noreply.github.com>
2025-10-28 15:03:14 -05:00
trop[bot]
f4dede919a fix: use correct signal variable in nan-spec-runner install check (#48709)
The install process spawn was not capturing its own signal variable,
causing the error check to incorrectly reference the build signal
instead. This could lead to:
- Install termination by signal going undetected
- False positive errors when build was killed but install succeeded

This commit ensures the install signal is properly captured and
checked, matching the pattern used for the build process.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: KinshukSS2 <kinshuk380@gmail.com>
2025-10-28 19:58:31 +01:00
trop[bot]
eb0f7e6dbf fix: allow disabling all NSMenuItems (#48711)
fix: allow disabling all NSMenuItems

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-10-28 13:20:17 -05:00
trop[bot]
487e36d22c ci: use <sup> in release notes generator (#48697)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2025-10-28 10:56:18 -04:00
trop[bot]
d954b1c619 ci: add more fields to Slack payload for backport requested message (#48689)
* ci: add more fields to Slack payload for backport requested message

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

* chore: wrap values with toJSON

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>
2025-10-27 17:03:15 -07:00
trop[bot]
14faa15732 docs: add net.isOnline() to online/offline detection tutorial (#48685)
* docs: add net.isOnline() to online/offline detection tutorial

Co-authored-by: CuzImSlymi <fridolinojustin@gmail.com>

* chore: make linter happy

docs/tutorial/online-offline-events.md:12:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk]
docs/tutorial/online-offline-events.md:13:1 MD004/ul-style Unordered list style [Expected: dash; Actual: asterisk]

Co-authored-by: Charles Kerr <charles@charleskerr.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: CuzImSlymi <fridolinojustin@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-10-27 15:20:37 -05:00
trop[bot]
0abda746ea docs: modify the thickFrame doc (#48677)
* doc: modify the thickFrame doc

Co-authored-by: zoy <zoy-l@outlook.com>

* chore: update description

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

Co-authored-by: zoy <zoy-l@outlook.com>

* update format

Co-authored-by: zoy <zoy-l@outlook.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: zoy <zoy-l@outlook.com>
2025-10-27 12:58:27 -05:00
trop[bot]
4e8a55296f fix: logical bug in install.js env var handling (#48673)
If either `npm_config_electron_use_remote_checksums` or
`electron_use_remote_checksums` are set as environment variables, then
force Electron to verify with remote checksums instead of embedded ones.

Fixes #48594.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-10-27 13:35:56 +01:00
trop[bot]
d83383b9dc docs: fix Ubuntu version used to build Electron (#48643)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-10-27 11:23:58 +01:00
electron-roller[bot]
496db94fdb chore: bump chromium to 142.0.7444.52 (39-x-y) (#48641)
* chore: bump chromium in DEPS to 142.0.7444.52

* 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-10-27 11:23:50 +01:00
trop[bot]
00627c6d04 fix: crash on empty dialog extensions array on Windows (#48658)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-10-27 09:23:13 +01:00
trop[bot]
7319e5c18b docs: security.md mark 'Enable process sandboxing' as active by defau… (#48647)
* docs: security.md mark 'Enable process sandboxing' as active by default since electron 20

Co-authored-by: LeUser111 <florian.wiedenmann@grob.de>

* Adjusted according to feedback

Co-authored-by: LeUser111 <florian.wiedenmann@grob.de>

* Updated according to feedback - adjusted sandbox.md

Co-authored-by: LeUser111 <florian.wiedenmann@grob.de>

* formatting

Co-authored-by: LeUser111 <florian.wiedenmann@grob.de>

* Fixed broken markup

Co-authored-by: LeUser111 <florian.wiedenmann@grob.de>

* Implemented docs linting suggestions

Co-authored-by: LeUser111 <florian.wiedenmann@grob.de>

* docs: docs/tutorial/sandbox.md - fixed typo

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

Co-authored-by: Teaveloper <49181620+LeUser111@users.noreply.github.com>

* docs: web-preferences.md - sandbox: mention default value and relation to nodeIntegration

Co-authored-by: LeUser111 <florian.wiedenmann@grob.de>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: LeUser111 <florian.wiedenmann@grob.de>
Co-authored-by: Teaveloper <49181620+LeUser111@users.noreply.github.com>
2025-10-24 11:16:15 +02:00
trop[bot]
1056280b0a feat: enable more granular a11y feature management (#48625)
* feat: enable more granular a11y feature management

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

* Update docs/api/app.md

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

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-10-23 12:22:17 -04:00
trop[bot]
4fda94be9b feat: Add getAccentColor on Linux (#48628)
* feat: Implement `getAccentColor` on Linux

Co-authored-by: Tau Gärtli <git@tau.garden>

* doc: Update OS support for accent color APIs

Co-authored-by: Tau Gärtli <git@tau.garden>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Tau Gärtli <git@tau.garden>
2025-10-23 16:07:40 +02:00
trop[bot]
e3715b0538 fix: systemPreferences.getAccentColor inverted color (#48624)
fix: systemPreferences.getAccentColor inverted color

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-10-22 14:51:16 +02:00
trop[bot]
90674e0b7b fix: icon in Windows toast notification (#48629)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-10-22 13:55:36 +02:00
trop[bot]
d22f7a15e6 fix: devtools crashing on Linux in detach mode (#48623)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-10-21 19:31:15 +02:00
trop[bot]
3f23e8c93a fix: trafficLightPosition incorrect with customButtonsOnHover (#48621)
fix: trafficLightPosition incorrect with customButtonsOnHover

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-10-21 19:30:49 +02:00
trop[bot]
fc369d5e5f fix: background hover contrast for WCO buttons (#48597)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-10-21 10:48:32 +02:00
trop[bot]
d59685a3bf feat: dynamic ESM import in preload without context isolation (#48488)
Dynamic ESM import in non-context-isolated preload

Extend `HostImportModuleWithPhaseDynamically`'s routing to support
Node.js import resolution in non-context-isolated preloads through
`v8_host_defined_options` length check. The length of host defined
options is distinct between Blink and Node.js and we can use it to
determine which resolver to use.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Fedor Indutny <indutny@signal.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-10-21 07:28:06 +02:00
electron-roller[bot]
4cea40fcb7 chore: bump chromium to 142.0.7444.34 (39-x-y) (#48571)
* chore: bump chromium in DEPS to 142.0.7444.34

* 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-10-21 07:27:49 +02:00
trop[bot]
b4b5f9b836 build: use one build target (#48604)
This reverts commit Optimizes our builds for use with siso/avoids file contention on Windows

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-10-21 07:26:18 +02:00
trop[bot]
d801ecbdd7 fix: position window titlebar buttons correctly in Ubuntu on Wayland (#48603)
fix: position window titlebar buttons correctly in Ubuntu on Wayland (#48490)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Mitchell Cohen <mitch.cohen@me.com>
2025-10-21 07:25:47 +02:00
trop[bot]
6e61de6878 ci: fix publish for macOS < 26.0 (#48577)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-10-17 12:57:27 -04:00
trop[bot]
312935ca3f feat: offscreen rendering support rgbaf16 hdr output format. (#48504)
feat: offscreen rendering support rgbaf16 hdr output format. (#48265)

* feat: offscreen rendering support rgbaf16

* docs: update doc

* docs: update doc.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: reito <reito@chromium.org>
2025-10-16 14:50:05 +02:00
trop[bot]
4edcb323ec build: run on macOS 15 (#48564) 2025-10-15 15:24:32 +02:00
trop[bot]
318dbe7200 fix: enable shader-f16 on windows (#48557)
* fix: Enable shader-f16 on Windows

Co-authored-by: creeper-0910 <56744841+creeper-0910@users.noreply.github.com>

* fix: include dxil.dll and dxcompiler.dll for windows x64 and arm64

Co-authored-by: creeper-0910 <56744841+creeper-0910@users.noreply.github.com>

* fix: modified to follow the chromium dawn build configuration

Co-authored-by: creeper-0910 <56744841+creeper-0910@users.noreply.github.com>

* fix: include dxil.dll and dxcompiler.dll for windows x86

Co-authored-by: creeper-0910 <56744841+creeper-0910@users.noreply.github.com>

* fix: Modified to avoid explicitly specifying dawn_use_built_dxc

Co-authored-by: creeper-0910 <56744841+creeper-0910@users.noreply.github.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: creeper-0910 <56744841+creeper-0910@users.noreply.github.com>
2025-10-14 23:45:41 -07:00
trop[bot]
2243a25192 fix: fixed white flash on call to BrowserWindow.show (#48559)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Cezary Kulakowski <cezary@openfin.co>
2025-10-14 21:27:13 +02:00
electron-roller[bot]
3e12da8ed1 chore: bump chromium to 142.0.7444.23 (39-x-y) (#48307)
* chore: bump chromium in DEPS to 142.0.7432.2

* chore: bump chromium in DEPS to 142.0.7434.1

* chore: bump chromium in DEPS to 142.0.7436.1

* chore: bump chromium in DEPS to 142.0.7438.1

* chore: bump chromium in DEPS to 142.0.7440.1

* chore: bump chromium in DEPS to 142.0.7442.1

* chore: bump chromium in DEPS to 142.0.7444.1

* chore: bump chromium in DEPS to 142.0.7444.6

* chore: bump chromium in DEPS to 142.0.7444.3

* 6973697: Use type tags for data stored in V8 internal fields

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

* chore: update patches

* chore: update filenames.libcxx.gni

* fix: parse macOS SDK version across line break
https://chromium-review.googlesource.com/c/chromium/src/+/6980166

(cherry picked from commit 2bcbb33de0)

* fix: replace v8::Object::SetPrototype() usage
https://chromium-review.googlesource.com/c/v8/v8/+/6983465
https://github.com/nodejs/node/pull/55453

(cherry picked from commit c31b9ed5ac)

* fix: replace additional usages of SetPrototype
https://chromium-review.googlesource.com/c/v8/v8/+/6983465

(cherry picked from commit bf151e9d28520c7dd74cba62240acbcaaab5433d)

* fixup! fix: replace additional usages of SetPrototype https://chromium-review.googlesource.com/c/v8/v8/+/6983465

(cherry picked from commit f4434755b82b098e4d83d42bab26f183b6824f99)

* build: use macos 15 minimum
https://chromium-review.googlesource.com/c/chromium/src/+/6980166

(cherry picked from commit 4d2b5d7b2cf9a1786cdb1a77bf73e4ad0d3e45d1)

* fixup! build: use macos 15 minimum https://chromium-review.googlesource.com/c/chromium/src/+/6980166

(cherry picked from commit 94bb41a66330dcaf6b92c80cfefd72759405793d)

* ci: ignore missing dir for strip_universal_deep

(cherry picked from commit 634963f171bc5f6050151f76973e7ffbab0e00cf)

* chore: update patches

* chore: update patches

* chore: bump chromium in DEPS to 142.0.7444.23

* fix: disable C++ modules in electron_lib builds
https://chromium-review.googlesource.com/c/chromium/src/+/6950738

(cherry picked from commit 6207c79aec)

* Revert "build: use macos 15 minimum"

This reverts commit 2fc12d6acc.

Initially this change was made to test if it fixes libcxx
compilation issues. As that's now resolved by disabling libcxx
modules, this can be reverted.

(cherry picked from commit ad52007d5b)

* fix: js2c compilation failure

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

See patch description explaining MacOS 26 SDK headers incompatibility.

(cherry picked from commit 39e2470875)

* fix: disable C++ modules in libnode builds

(cherry picked from commit fd0a7b61a1)

* fixup! fix: replace v8::Object::SetPrototype() usage https://chromium-review.googlesource.com/c/v8/v8/+/6983465 https://github.com/nodejs/node/pull/55453

(cherry picked from commit 2f52159b71)

* build: switch to macos-15 runner

build/mac/find_sdk.py now requires macOS 15 SDK as a minimum version. The
macos 15 runners default to an Xcode using the 15 SDK and removes older
versions.

(cherry picked from commit e368703f24)

* chore: update patches

* fix: partially revert is_headless_mode removal
https://chromium-review.googlesource.com/c/chromium/src/+/6955633

This patch should likely be reworked. For now, this partially reverts the
removal of a required class property to restore behavior.

(cherry picked from commit aff3bf9a24)

* 6938086: Rename native_widget_types.h -> native_ui_types.h | https://chromium-review.googlesource.com/c/chromium/src/+/6938086

(cherry picked from commit c95ac7bf2b)

* 6973697: Use type tags for data stored in V8 internal fields

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

* fixup! fix: check new forced colors enum value https://chromium-review.googlesource.com/c/chromium/src/+/6944403

(cherry picked from commit 0829c74b2f)

* fix: check new forced colors enum value
https://chromium-review.googlesource.com/c/chromium/src/+/6944403

(cherry picked from commit d585879807)

* feat: add new memory-eviction exit reason
https://chromium-review.googlesource.com/c/chromium/src/+/6991933

(cherry picked from commit 6e63197a22)

* fix: views::NonClientFrameView -> views::FrameView
https://chromium-review.googlesource.com/c/chromium/src/+/7005027
https://chromium-review.googlesource.com/c/chromium/src/+/6966937

(cherry picked from commit 1e86b6ddfb)

* fix: migrate NetworkConditions -> MatchedNetworkConditions
https://chromium-review.googlesource.com/c/chromium/src/+/6827307

(cherry picked from commit 97100ac168)

* fix: provide DeviceEmulationCacheBehavior param
https://chromium-review.googlesource.com/c/chromium/src/+/6965238

(cherry picked from commit f9a08c5384)

* fix: add missing image_skia include
https://chromium-review.googlesource.com/c/chromium/src/+/6986762

(cherry picked from commit dd5eaf03fd)

* fixup! fix: add missing image_skia include https://chromium-review.googlesource.com/c/chromium/src/+/6986762

(cherry picked from commit 249c4d4de1)

* 6948286: [wasm-imported-strings] Drop feature flag

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

* fix: disable protocol handler DCHECK

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

Ignore the extension custom protocol handler registry DCHECK until
we invest in supporting it. Replacing this DCHECK seems harmless
and will unblock the roll.

(cherry picked from commit 019d3f0b09)

* 6986762: Remove some includes of //ui/gfx/image/image_skia.h

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

* fixup! fix: migrate NetworkConditions -> MatchedNetworkConditions https://chromium-review.googlesource.com/c/chromium/src/+/6827307

(cherry picked from commit a8f67f1ac3)

* fixup: 6986762: Remove some includes of //ui/gfx/image/image_skia.h

s

* fix: replace deprecated usage of SetPrototype
https://chromium-review.googlesource.com/c/v8/v8/+/6983465

(cherry picked from commit 5435d87b40)

* chore: restore electron embedder data tag patch

Co-Authored-By: Sam Maddock <sam@samuelmaddock.com>

* 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>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
Co-authored-by: Alice Zhao <alicelovescake@anthropic.com>
Co-authored-by: Sam Maddock <sam@samuelmaddock.com>
2025-10-14 11:25:30 -04:00
trop[bot]
64fe2aef9a build: fail publish when upload fatal errors (#48546)
We logged a fatal error but didn't exit with code 1 so the publish kept going. This was caught by a sanity check later down the release process but would have been quicker to fail out here.

Also adds some code to maybe workaround the underlying auth error

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <sam@electronjs.org>
2025-10-13 15:53:38 +02:00
trop[bot]
b09c887302 fix: auth required websocket crash (#48541)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-10-13 12:45:37 +02:00
trop[bot]
e533887749 fix: unexpected openExternal dialog on macOS Tahoe (#48518)
fix: unexpected openExternal dialog on macOS Tahoe

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-10-13 10:15:36 +02:00
trop[bot]
29e7189c66 fix: crash when inspector evaluates on provisional frames (#48515)
* fix: crash when inspector evaluates on provisional frames

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

* chore: update .patches

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-10-11 10:03:55 +02:00
trop[bot]
3fcfad1c10 ci: upload build effective cache hit rate stats to Datadog (#48532)
* ci: upload build effective cache hit rate stats to Datadog

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

* ci: fix release branch name in build stats script

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-10-11 10:02:59 +02:00
trop[bot]
18d21bd8cb fix: dialog.showMessageBox defaultid on Windows (#48521)
* fix: dialog.showMessageBox defaultid on Windows

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

* Update shell/browser/ui/message_box_win.cc

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

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-10-11 09:46:41 +02:00
trop[bot]
483870eff3 docs: unmark asar integrity as experimental and clean docs (#48526)
* docs: unmark asar integrity as experimental and clean docs

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

* zzz

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

* zzzz

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

* unlink blog post

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
2025-10-10 19:56:49 -07:00
trop[bot]
7d446abe91 docs: update Azure Trusted Signing availability (#48524)
* docs: update Azure Trusted Signing availability

Source: https://github.com/Azure/trusted-signing-action/issues/93#issuecomment-3383517386

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

* docs: remove unused link

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-10-10 12:44:09 -04:00
trop[bot]
db72ce78f5 fix: broken transparent window styles on resizable change (#48501)
* fix: wrong api call

Co-authored-by: zoy <zoy-l@outlook.com>

* fix: consistency of the resize state

Co-authored-by: zoy <zoy-l@outlook.com>

* fix: edge cases

Co-authored-by: zoy <zoy-l@outlook.com>

* chore: add detailed comments

Co-authored-by: zoy <zoy-l@outlook.com>

* fix: lint

Co-authored-by: zoy <zoy-l@outlook.com>

* chore: only windows

Co-authored-by: zoy <zoy-l@outlook.com>

* chore: use transparent

Co-authored-by: zoy <zoy-l@outlook.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: zoy <zoy-l@outlook.com>
2025-10-10 11:36:22 -04:00
trop[bot]
238022c5cd docs: add note for node_modules for Yarn and pnpm (#48495)
* Add instructions on using node_modules with Yarn

* update text for pnpm

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
2025-10-09 10:31:24 +02:00
trop[bot]
f0a130a70c docs: clarify postinstall requirements (#48498)
postinstall

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
2025-10-09 10:29:37 +02:00
trop[bot]
f95094c7fd build: bump version in .nvmrc to 22 (#48491)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
2025-10-08 17:02:34 -04:00
electron-roller[bot]
e630f7b4ba chore: bump node to v22.20.0 (39-x-y) (#48382)
* chore: bump node in DEPS to v22.20.0

* chore: fixup patches

---------

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-08 11:53:55 -04:00
trop[bot]
00035f8435 feat: add fileSystem to ses.setPermissionCheckHandler (#48326)
feat: add fileSystem to ses.setPermissionCheckHandler

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-10-08 10:44:46 +02:00
trop[bot]
ec92fbcd67 fix: set ozone platform for wayland (#48310)
* fix: set ozone platform for wayland

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

* whoops, includes. thx charles

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>
2025-10-07 11:27:45 +02:00
trop[bot]
addd12717c build: fixup chromedriver and mksnapshot (#48479)
* build: update build tools to get proper exit codes from e build

xref: https://github.com/electron/build-tools/pull/759

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

* build: target zips directly

mksnapshot and chromedriver have issues with siso trying to run a separate build and zip step, so just target the zip target

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

* build: don't unzip chromedriver and mksnapshot in tests

The contents of these files are not used in testing, so we shouldn't unzip them.

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-10-07 11:08:17 +02:00
trop[bot]
3c6b66c0fb build: handle Metal toolchain being unbundled from Xcode 26 (#48472)
* chore: add metal patch dir

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

* chore: cherry-pick 2f564f1ca07b from angle (#48465)

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

* chore: update patch

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

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Keeley Hammond <vertedinde@electronjs.org>
2025-10-06 14:32:28 -07:00
trop[bot]
d122cd6e09 perf: avoid a little extra work in InvokeIpcCallback() (#48466)
perf: two minor perf refactors in InvokeIpcCallback()

1. Allocate the CallbackScope on the stack instead of the heap
2. Skip a redundant call to  node::Environment::GetCurrent()

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-10-06 12:10:08 -05:00
trop[bot]
fbc5ff26e2 docs: recommend calling renderer process modules from preload script (#48461)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-10-04 17:23:34 -05:00
trop[bot]
9310c5261c docs: clarify optional args in webFrame.executeJavaScript() (#48458)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-10-04 18:44:42 +02:00
trop[bot]
0a476e8fc5 docs: mention that webUtils should be used via preload script (#48453)
docs: mention that webUtils should be used via preload script (#45861)

* docs: mention that webUtils should be used via preload script

* docs: suppress lint errors

* docs: clarify webUtils usage scope

* docs: exclude potentially dangerous alert() in the example code

* docs: minor change

* docs: minor change

* docs: minor change

* docs: minor change

* docs: minor change

* docs: minor change

* docs: minor change

* docs: minor change

* docs: minor change

* docs: minor change

* docs: make linter happy

* docs: apply suggestion



* docs: apply suggestion



* docs: apply suggestion



* docs: minor change

* docs: minor change

* docs: remove preload line

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Kaiichiro Ota <kigh.ota@gmail.com>
2025-10-03 15:47:40 -05:00
trop[bot]
81c17ef684 fix: accentColor set distinguishes the frame (#48450)
* fix: accentColor set distinguishes the frame

Co-authored-by: zoy <zoy-l@outlook.com>

* chore: invalid change

Co-authored-by: zoy <zoy-l@outlook.com>

* fix: lint

Co-authored-by: zoy <zoy-l@outlook.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: zoy <zoy-l@outlook.com>
2025-10-03 15:31:36 -05:00
trop[bot]
49aa969139 fix: initialze featurelist before parsing features (#48442)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2025-10-02 20:58:57 -05:00
trop[bot]
845adc3ea7 docs: update allowed window.open options (#48443)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-10-02 20:58:25 -05:00
trop[bot]
9d97988c05 fix: snapped window restoring to correct position (#48438)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-10-03 00:11:53 +02:00
trop[bot]
29d60d9b50 fix: runtime JS error that crashes GetPackageJSON (#48425)
We overriden the `GetPackageJSON` in Node.js to let us read files
straight from the ASAR file instead of disk. The override works by
providing a JS method with the limitation that it should not throw a
runtime error. However, this invariant was accidentally violated by
`asar.splitPath` that sometimes contrary to its' TypeScript definition
returned `false`.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Fedor Indutny <indutny@signal.org>
2025-10-02 18:16:28 +02:00
trop[bot]
797e534385 docs: fix formatting in asar integrity (#48432)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Erick Zhao <ezhao@slack-corp.com>
2025-10-01 23:41:03 -07:00
trop[bot]
d79810af33 build: add missing copied tarball to cloudstore paths (#48417)
It's guarunteed that `iojs-*` and `node-*` were the same origin file (we azcopy them) but this was missing in logs and it annoyed me

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <sam@electronjs.org>
2025-09-30 18:35:33 +02:00
trop[bot]
918a08f1e4 fix: add missed enum SaveRequestType to PdfViewerPrivate function (#48404)
fix: add missed SaveRequestType enum to PdfViewerPrivate function

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Bill Shen <15865969+cucbin@users.noreply.github.com>
2025-09-29 20:08:42 +02:00
trop[bot]
c15d8a4a37 fix: MacOS 26 Tahoe - stop overriding private cornerMask API to fix WindowServer GPU load (#48399)
fix: MacOS 26 Tahoe - stop overriding private cornerMask API to fix WindowServer GPU load (#48376)

fix: macOS stop overriding private cornerMask API to fix WindowServer GPU load spike

Electron fetched a custom `_cornerMask` for `ElectronNSWindow` to smooth
vibrancy corners. On macOS 15 (Tahoe) that private hook forces the window
shadow to be rendered from a fully transparent surface, causing the
WindowServer GPU load regression. Remove the `cornerMask` property and
the `_cornerMask` override so we stay on Apple’s default shadow path.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: avarayr <7735415+avarayr@users.noreply.github.com>
2025-09-27 10:30:18 -07:00
trop[bot]
aeb4733501 fix: disable NSAutoFillHeuristicController on macOS 26 (#48393)
fix: disable NSAutoFillHeuristicController on macOS 26 (#48379)

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Robo <hop2deep@gmail.com>
2025-09-27 03:54:01 +09:00
John Kleinschmidt
a59beb5570 test: rerun failed tests individually (#48386)
test: rerun failed tests individually (#48205)

* test: rerun failed tests individually

* ci: use screencapture-nag-remover

Needed to bypass the popup message "bash" is requesting to bypass the system private window picker and directly access your screen and audio.

* Revert "chore: test with 1st quadrant of the window"

No longer needed because of the addition of the
screencapture-nag-remover script.

This reverts commit f4a7e04c0b.

* test: fixup navigationHistory flake

* rerun test up to 3 times
2025-09-26 11:43:31 -04:00
trop[bot]
f5617bbc6a chore: bump chromium to 142.0.7417.0 (39-x-y) (#48363)
* chore: bump chromium in DEPS to 142.0.7401.0

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

* 6911185: Reland "Send touch moves async immediately after scroll starts."

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

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

* 6906887: mac: click through content area in main window

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

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

* 6916667: Expose helper to eliminate duplicate recipes.

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

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

* 6909842: Switch LegacyRenderWidgetHostHWND from atlcrack.h to msg_util.h.

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

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

* 6884056: Remove the SecKeychain implementation for the Keychain interface

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

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

* 6904906: Remove `WTF::` in renderer/core/[p-x].*/

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

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

* 6556585: [persistent_cache]: PersistentCache for CodeCache

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

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

* 6904864: Layout: Support abort on the text placeholder layout

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

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

* chore: fixup patch indices

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

* chore: bump chromium in DEPS to 142.0.7402.0

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

* fixup! 6556585: [persistent_cache]: PersistentCache for CodeCache

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

* chore: fixup patch indices

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

* 6905244: [api] Remove deprecated `GetIsolate`

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

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

* 6897694: Remove NativeTheme::UserHasContrastPreference().

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

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

* 6897477: Remove GetPlatformHighContrastColorScheme() and enum.

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

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

* 6918198: Reland "Rename display::Screen::GetScreen() to display::Screen::Get()"

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

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

* 6907147: [LNA] add use counter for websocket mixed-content issues

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

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

* 6914538: Replace WTF::String with blink::String

https://chromium-review.googlesource.com/c/website/+/6914538

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

* 6892538: [video pip] Allow touchscreen users to toggle live caption

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

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

* chore: fix patch

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

* chore: bump chromium in DEPS to 142.0.7403.0

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

* build: remove ninja logs

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

* chore: fixup patch indices

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

* 6920670: [PDF] Change pdf_extension_util to return dictionaries

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

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

* 6917864: Devirtualize and inline various NativeTheme getters.

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

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

* 6920873: [PDF] Simplify PDFDocumentHelperClient::OnSaveURL()

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

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

* build: don't kill blink/web_tests

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

* 6923655: Roll libc++ from 954086abf121 to b87b2bb112f8 (4 revisions)

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

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

* 6905242: Reland "[CSP] Clarify report-only console messages."

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

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

* fixup! 6897694: Remove NativeTheme::UserHasContrastPreference().

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

* chore: bump chromium in DEPS to 142.0.7405.0

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

* 6910012: [LNA] Enable LNA enforcement by default

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

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

* 6929444: Combine GetInstanceForXXX() implementations.

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

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

* 6927873: Rename native_widget_types.h -> native_ui_types.h

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

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

* 6853978: Init perfetto really early in WebView

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

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

* 6874886: Use only one picker observer to avoid getting duplicate notifications

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

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

* chore: fixup patch indices

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

* fix: Protocol complex inline dtor

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

* chore: bump chromium in DEPS to 142.0.7407.0

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

* chore: bump chromium in DEPS to 142.0.7409.0

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

* chore: bump chromium in DEPS to 142.0.7411.0

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

* chore: bump chromium in DEPS to 142.0.7413.0

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

* fixup! 6905242: Reland "[CSP] Clarify report-only console messages."

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

* 6927233: Remove NativeTheme "use dark colors" bit.

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

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

* chore: fixup patch indices

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

* 6899206: [PermissionOptions] Multi-state permission subscriptions & setting changes

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

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

* chore: bump chromium in DEPS to 142.0.7415.0

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

* 6936895: [headless] Remove headless flag from views::Widget class

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

We should probably followup on this to see if there is a way to do this without reverting this CL.

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

* 6937023: Reland "Use new DBus type system in dbus_xdg::Request"

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

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

* chore: update patches

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

* 6944749: Add GN visibility list to //components/os_crypt/sync

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

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

* Further replace sub_capture_target_version with CaptureVersion

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

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

* fixup for lint

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

* chore: update filenames.libcxx.gni

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

* chore: bump chromium in DEPS to 142.0.7417.0

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

* 6944136: Reorder NativeTheme headers/.cc files.

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

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

* 6939701: [DSSC][4] Make FSVCI objects aware of their capture-version-source

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

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

* 6944404: Remove extraneous callback call

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

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

* 6936124: [FPF-CI]: Introduce blink::NoiseToken for fingerprinting protection

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

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

* chore: update patches

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

* fixup! 6927233: Remove NativeTheme "use dark colors" bit.

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

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

* fixup! 6917864: Devirtualize and inline various NativeTheme getters.

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

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

* 6937588: Add initial OsSettingsProvider object, supplying caret blink interval.

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

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

* fixup! 6905242: Reland "[CSP] Clarify report-only console messages."

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

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

* 6907515: Replace SingletonHwndObserver with a CallbackList on SingletonHwnd.

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

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

* 6910482: [Save to Drive] Implement retry functionality

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

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

* fixup! 6927233: Remove NativeTheme "use dark colors" bit.

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

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

* Revert "build: remove ninja logs"

This reverts commit 72874740fd.

Co-authored-by: Alice Zhao <alicelovescake@anthropic.com>

* test: fix flakey test picked from PR 48205

Co-authored-by: Alice Zhao <alicelovescake@anthropic.com>

* 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: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Alice Zhao <alicelovescake@anthropic.com>
2025-09-24 11:56:54 -04:00
trop[bot]
12ca994b50 docs: mention setContentProtection macOS limitations (#48366)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Niklas Wenzel <dev@nikwen.de>
2025-09-23 17:03:50 -05:00
trop[bot]
b3069de952 build: update build tools to get siso for forks fix (#48346)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-09-18 09:33:20 -04:00
Robo
40fb7621a9 fix: remove unneeded handlescope from JS callbacks (#48344)
fix: remove unneeded handlescope from JS callbacks (#48318)

fix: remove handlescope from JS callbacks
2025-09-18 08:47:26 +09:00
Keeley Hammond
93ef8abd99 chore: cherry-pick ec6c18478382 from v8 (#48336)
* chore: cherry-pick ec6c18478382 from v8

* chore: update patches
2025-09-16 19:09:16 -07:00
trop[bot]
d28e24a6c6 ci: Use Local Execution, Remote Caching (LERC) for fork PRS (#48325)
cleanup

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-09-16 09:54:28 -04:00
trop[bot]
b7139831fe refactor: avoid unused inheritance in ServiceWorkerMain (#48292)
ServiceWorkerMain does not need to inherit from EventEmitterMixin

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-09-10 21:35:28 -05:00
trop[bot]
60826e6c7b chore: bump chromium to 141.0.7390.7 (39-x-y) (#48276)
* chore: bump chromium in DEPS to 141.0.7381.3

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

* chore: update patches

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

* chore: bump chromium in DEPS to 141.0.7382.0

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

* chore: update patches

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

* chore: bump chromium in DEPS to 141.0.7384.0

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

* chore: bump chromium in DEPS to 141.0.7386.0

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

* Move devtools_page and chrome_url_overrides handlers

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

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

* Reland "[api] Advance deprecation of GetIsolate"

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

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

* Move "system integrated UI" concept out of NativeTheme.

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

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

* chore: update patches

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

* Reland "[PermissionOptions] Return PermissionResult in callback for requests"

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

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

* Reland "[exit-time-destructors] Enable by default"

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

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

* chore: update patches

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

* Revoke Read access after removing file via FileSystemAccess API

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

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

* chore: IWYU

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

* Accept an object for `dispatchHttpRequest` params

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

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

* chore: IWYU

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

* Pass navigation UI parameters on EnterFullscreen in EAM

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

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

* chore: rm band-aid_over_an_issue_with_using_deprecated_nsopenpanel_api.patch

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

* Remove unused PreHandleMouseEvent

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

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

* 6878583: siso: update to version 1.4.1

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

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

* Fold native_theme_browser into native_theme.

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

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

* fixup: Reland "[exit-time-destructors] Enable by default

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

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

* chore: update filenames.libcxx.gni

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

* chore: IWYU

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

* fixup: chore: IWYU

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

* fixup: Reland "[exit-time-destructors] Enable by default

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

* fixup: Reland "[exit-time-destructors] Enable by default

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

* Remove common_theme.*; place its method in NativeTheme instead.

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

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

* fixup: Reland "[exit-time-destructors] Enable by default

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

* Better track when WebPreferences need updates for color-related changes.

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

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

* chore: bump chromium in DEPS to 141.0.7390.7

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

* 6904664: Reland "Make BrowserContext::GetPath() const"

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

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

* Restore read access after certain file modification operations

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

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

* fixup: Move "system integrated UI" concept out of NativeTheme.

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

* fixup: Reland "[exit-time-destructors] Enable by default

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

* chore: update patches

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

* 6906096: Remove GetSysSkColor().

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

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

* Inline implementation of SysColorChangeListener into the lone user.

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

Also 6906096: Remove GetSysSkColor(). | https://chromium-review.googlesource.com/c/chromium/src/+/6906096

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

* fixup: 6906096: Remove GetSysSkColor()

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: deepak1556 <hop2deep@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-09-08 17:08:42 -04:00
electron-roller[bot]
2da16d779e chore: bump node to v22.19.0 (39-x-y) (#48255)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
2025-09-08 09:48:49 +02:00
trop[bot]
c6eec20a7c build: update spec deps for clean audit (#48250)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2025-09-03 13:50:49 -07:00
Calvin
fed73040e2 docs: move some planned breaking changes to 39 (#48236) 2025-09-01 14:55:11 -07:00
Shelley Vohr
828fd59a72 fix: file-only picker incorrectly allowing some directories (#48198) 2025-08-29 13:14:45 -04:00
Shelley Vohr
e892840975 fix: ensure dragging works again after emitting contextmenu event (#48199) 2025-08-29 10:37:37 -04:00
Shelley Vohr
7373173e44 fix: showMessageDialog should center dialog to parent (#48181) 2025-08-29 09:56:51 +02:00
electron-roller[bot]
5d5e672f17 chore: bump chromium to 141.0.7361.0 (main) (#48054)
* chore: bump chromium in DEPS to 141.0.7352.0

* chore: update patches

* 6830573: Revert 'Migrate WrappableWithNamedPropertyInterceptor to gin::Wrappable' | https://chromium-review.googlesource.com/c/chromium/src/+/6830573

* chore: bump chromium in DEPS to 141.0.7354.0

* chore: bump chromium in DEPS to 141.0.7356.0

* chore: bump chromium in DEPS to 141.0.7357.0

* chore: bump chromium in DEPS to 141.0.7359.0

* chore: bump chromium in DEPS to 141.0.7361.0

* 6838518: [Mac] Correctly deallocate sandbox error buffers and prevent crash resulting from nullptr assignment | https://chromium-review.googlesource.com/c/chromium/src/+/6838518

* 6850973: Reland "Use base::ByteCount in base::SysInfo." | https://chromium-review.googlesource.com/c/chromium/src/+/6850973

* 6506565: [FPF-CI] Create initial NoiseHash in the browser. | https://chromium-review.googlesource.com/c/chromium/src/+/6506565

* chore: update patches

* fixup! 6850973: Reland "Use base::ByteCount in base::SysInfo." | https://chromium-review.googlesource.com/c/chromium/src/+/6850973

* fixup! 6506565: [FPF-CI] Create initial NoiseHash in the browser. | https://chromium-review.googlesource.com/c/chromium/src/+/6506565

* fix: unsafe buffer warning in fix_properly_honor_printing_page_ranges.patch

* fix: FTBFS in src_remove_dependency_on_wrapper-descriptor-based_cppheap.patch

This change should be upstreamed.

Fixes this error:

../../third_party/electron_node/src/env.cc:606:3: error: no matching function for call to 'Wrap'
  606 |   v8::Object::Wrap<v8::CppHeapPointerTag::kDefaultTag>(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../v8/include/v8-object.h:1076:14: note: candidate function template not viable: cannot convert argument of incomplete type 'void *' to 'v8::Object::Wrappable *' for 3rd argument
 1076 | void Object::Wrap(v8::Isolate* isolate, const v8::Local<v8::Object>& wrapper,
      |              ^
 1077 |                   v8::Object::Wrappable* wrappable) {
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../v8/include/v8-object.h:1084:14: note: candidate function template not viable: no known conversion from 'Local<Object>' to 'const PersistentBase<Object>' for 2nd argument
 1084 | void Object::Wrap(v8::Isolate* isolate, const PersistentBase<Object>& wrapper,
      |              ^                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../v8/include/v8-object.h:1093:14: note: candidate function template not viable: no known conversion from 'Local<Object>' to 'const BasicTracedReference<Object>' for 2nd argument
 1093 | void Object::Wrap(v8::Isolate* isolate,
      |              ^
 1094 |                   const BasicTracedReference<Object>& wrapper,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

* [v8-init] Access crash key only from main thread | https://chromium-review.googlesource.com/c/chromium/src/+/6827167

* chore: e patches all

* chore: remove chore_restore_some_deprecated_wrapper_utility_in_gin.patch from patches

this remove line got re-added when rebasing roller/chromium/main

* chore: e patches all

* fix: include base/time/time.h when using base::Time

* chore: update patches

* Make --host-rules an alias for --host-resolver-rules.

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

* ci: update BUILD_TOOLS_SHA

Refs https://github.com/electron/build-tools/pull/746

* [Fontations] Remove Fontations suffix from font names

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

* temp: debug macOS addon build failure

* Revert "temp: debug macOS addon build failure"

This reverts commit 40bc8abab65dc83e17c4ab97cb6e7522a193fb44.

* test: run tests with Xcode 16.4

* ci: fix tccdb update for macOS 15

* spec: disable opening external application for loadURL

on macOS opening unknown external application will bring
up dialog to choose apps from application store which will
break our other test suites that want to capture screen
for pixel matching.

The loadURL spec that tests bad-scheme://foo is sufficient
that we hit the permission handler for openExternal since
at that point we already know the runtime gave up on handling
the scheme.

* chore: rebase patches

* chore: disable codesiging tests

* ci: update ScreenCaptureApprovals.plist for /bin/bash

* ci: try updating tcc permissions

* ci: update TCC permissions

Refs https://www.rainforestqa.com/blog/macos-tcc-db-deep-dive

* chore: test with 1st quadrant of the window

* chore: adjust for macOS 15 menubar height

---------

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: Keeley Hammond <vertedinde@electronjs.org>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-08-29 12:31:47 +09:00
LZL
e39943bf45 fix: BrowserWindow add the same BrowserView (#48053)
fix: BrowserWindow add the same BrowserView (#48057)
2025-08-28 10:31:41 +02:00
David Sanders
f331606e07 build: bump NMV to 140 (#48196) 2025-08-27 18:57:00 -07:00
David Sanders
cca55117e4 build: refactor Linux binary stripping to align with upstream (#47932) 2025-08-27 18:56:31 -07:00
Erick Zhao
bf29d2f0bd docs: fix some module headings (#48177) 2025-08-27 14:52:26 -07:00
John Kleinschmidt
fea1a2a987 ci: use free GH arm runners (#47872) 2025-08-27 10:01:36 -04:00
dependabot[bot]
a51c56aca9 build(deps): bump amannn/action-semantic-pull-request from 6.0.1 to 6.1.1 (#48175)
build(deps): bump amannn/action-semantic-pull-request

Bumps [amannn/action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request) from 6.0.1 to 6.1.1.
- [Release notes](https://github.com/amannn/action-semantic-pull-request/releases)
- [Changelog](https://github.com/amannn/action-semantic-pull-request/blob/main/CHANGELOG.md)
- [Commits](fdd4d3ddf6...48f256284b)

---
updated-dependencies:
- dependency-name: amannn/action-semantic-pull-request
  dependency-version: 6.1.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-27 13:52:36 +02:00
dependabot[bot]
89f25e6af3 build(deps): bump github/codeql-action from 3.29.10 to 3.29.11 (#48174)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.10 to 3.29.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](96f518a34f...3c3833e0f8)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.11
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-27 13:49:43 +02:00
Robo
e0db4046b2 refactor: allocate gin_helper::internal::Event on cpp heap (#48161) 2025-08-27 09:30:50 +09:00
Calvin
3b9130d815 docs: add release timeline for Electron 39 (#48167) 2025-08-26 14:19:56 -07:00
Shelley Vohr
52ed4646d9 chore: remove upstream OSR temp fix (#48162) 2025-08-26 16:22:45 -04:00
John Kleinschmidt
68098c317f build: remove no longer needed arg for siso (#48164)
* build: remove no longer needed arg for siso

* chore: test ffmpeg zip

* build: fix ffmpeg build with siso

* Revert "chore: test ffmpeg zip"

This reverts commit 2bbcc86039.
2025-08-25 16:46:36 -04:00
dependabot[bot]
52e0307cc1 build(deps): bump github/codeql-action from 3.29.7 to 3.29.10 (#48113)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.7 to 3.29.10.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](51f77329af...96f518a34f)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-25 13:23:15 +02:00
dependabot[bot]
7fffe77909 build(deps-dev): bump stream-json and @types/stream-json (#48114)
Bumps [stream-json](https://github.com/uhop/stream-json) and [@types/stream-json](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/stream-json). These dependencies needed to be updated together.

Updates `stream-json` from 1.8.0 to 1.9.1
- [Commits](https://github.com/uhop/stream-json/compare/1.8.0...1.9.1)

Updates `@types/stream-json` from 1.7.7 to 1.7.8
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/stream-json)

---
updated-dependencies:
- dependency-name: stream-json
  dependency-version: 1.9.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
- dependency-name: "@types/stream-json"
  dependency-version: 1.7.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-25 12:58:38 +02:00
Robo
3ccb1bc0a8 refactor: allocate api::Session on cpp heap (#48141) 2025-08-25 18:52:06 +09:00
Shelley Vohr
0917ed5f6f fix: snapped restoration after minimization (#48142) 2025-08-22 14:37:45 -04:00
Samuel Attard
a67aad0f50 build: use siso instead of reclient (#47534) 2025-08-22 14:17:02 -04:00
reito
ceb6d28fd3 fix: webContent.fromId should be number instead of string (#48059) 2025-08-22 11:40:10 -04:00
Shelley Vohr
e12ab6708e chore: improve failed notification error messages on Windows (#48131) 2025-08-22 11:35:39 -04:00
Shelley Vohr
6101025368 fix: net.isOnline always true in utility processes (#48111)
* fix: net.isOnline always true in utilityProcesses

* Update shell/services/node/node_service.cc

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

---------

Co-authored-by: Robo <hop2deep@gmail.com>
2025-08-22 14:30:41 +02:00
dependabot[bot]
97b0280ad4 build(deps): bump amannn/action-semantic-pull-request from 5.5.3 to 6.0.1 (#48115)
build(deps): bump amannn/action-semantic-pull-request

Bumps [amannn/action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request) from 5.5.3 to 6.0.1.
- [Release notes](https://github.com/amannn/action-semantic-pull-request/releases)
- [Changelog](https://github.com/amannn/action-semantic-pull-request/blob/main/CHANGELOG.md)
- [Commits](0723387faa...fdd4d3ddf6)

---
updated-dependencies:
- dependency-name: amannn/action-semantic-pull-request
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-21 10:44:27 +02:00
John Kleinschmidt
1044fe675d build: use new 7z command line switch (#48136)
-snld20 replaces -snld
2025-08-20 17:05:25 -04:00
John Kleinschmidt
42af60cc7e docs: update 38.0 breaking changes (#48117) 2025-08-20 14:15:01 -04:00
John Kleinschmidt
cadba11088 build: fixup docs only condition (#48128) 2025-08-20 12:58:54 -04:00
Shelley Vohr
8aeee3f714 refactor: use XmlWriter for Windows toasts (#48065)
refactor: use XmlWriter for Windows toasts
2025-08-20 16:06:51 +02:00
Robo
dd54e84a58 refactor: allocate api::App on cpp heap (#48118) 2025-08-20 20:35:08 +09:00
John Kleinschmidt
d4b7d9e9cf build: get source cache for docs only pipeline (#48120) 2025-08-20 11:07:00 +02:00
BILL SHEN
83a5ba1e2c feat: add fileBacked and purgeable fields to process.getSystemMemoryInfo() for macOS (#47628)
* fix: Optimize the value of memory.free in the return data of getSystemMemoryInfo().

* fix: Improve the value of memory in the return data of getSystemMemoryInfo().

* fix: complete API doc.

* Update docs/api/process.md

Co-authored-by: Will Anderson <will@itsananderson.com>

* fix: update name to fileBacked.

* fix: fix with code conflict

---------

Co-authored-by: Will Anderson <will@itsananderson.com>
2025-08-20 09:49:41 +02:00
Shelley Vohr
13d955a73e fix: system accent color parsing hex order (#48085)
fix: system accent color parsing
2025-08-19 10:01:41 +02:00
Samuel Attard
fdf29ce838 fix: ensure snapshot is valid (#48101) 2025-08-18 14:35:58 -07:00
Samuel Attard
3770bb31a7 fix: avoid deprecated login item methods (#48090) 2025-08-17 22:00:52 -07:00
dependabot[bot]
ed4a99ba5b build(deps-dev): bump @azure/storage-blob from 12.25.0 to 12.28.0 (#48055)
Bumps [@azure/storage-blob](https://github.com/Azure/azure-sdk-for-js) from 12.25.0 to 12.28.0.
- [Release notes](https://github.com/Azure/azure-sdk-for-js/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/Changelog-for-next-generation.md)
- [Commits](https://github.com/Azure/azure-sdk-for-js/compare/@azure/storage-blob_12.25.0...@azure/storage-blob_12.28.0)

---
updated-dependencies:
- dependency-name: "@azure/storage-blob"
  dependency-version: 12.28.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-16 09:39:46 +02:00
Shelley Vohr
0e6c26096f fix: shell.openPath should be non-blocking (#48079)
fix: shell.openPath should be non-blocking
2025-08-15 13:55:31 -07:00
Keeley Hammond
7792ed1efa build: revert bump @octokit/rest from 20.1.2 to 22.0.0 (#48082)
Revert "build(deps-dev): bump @octokit/rest from 20.1.2 to 22.0.0 (#48014)"

This reverts commit 13ed526ca7.
2025-08-14 20:50:09 -07:00
Robo
c75c390ccf chore: add uma results in macOS keychain patch (#48080) 2025-08-15 11:10:37 +09:00
Shelley Vohr
4c3c3049e1 build: disallow non-maintainer changes to GitHub Actions workflows (#48038) 2025-08-14 13:54:05 -07:00
Shelley Vohr
68e7b38c05 build: use quick tunnels for ssh debugging (#47938)
* build: use dynamic local tunnels for ssh debugging

* weeee

* that'll do

* chore: pretty output

* build: allow ssh input

---------

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2025-08-14 07:41:07 -04:00
dependabot[bot]
a051c7c274 build(deps): bump actions/download-artifact from 4.3.0 to 5.0.0 (#48052)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.3.0 to 5.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](d3f86a106a...634f93cb29)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-13 14:33:48 +02:00
Shelley Vohr
53003d7af9 fix: app.accessibilitySupportEnabled (#48041)
fix: app.accessibilitySupportEnabled on macOS
2025-08-12 16:51:27 -04:00
David Sanders
63d7f609cd ci: manually fetch author_association in workflow automations (#48013) 2025-08-12 10:30:41 -07:00
electron-roller[bot]
01291623af chore: bump chromium to 141.0.7350.0 (main) (#48032)
* chore: bump chromium in DEPS to 141.0.7349.0

* chore: bump chromium in DEPS to 141.0.7350.0

* 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>
2025-08-12 11:31:17 +02:00
dependabot[bot]
13ed526ca7 build(deps-dev): bump @octokit/rest from 20.1.2 to 22.0.0 (#48014)
Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 20.1.2 to 22.0.0.
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v20.1.2...v22.0.0)

---
updated-dependencies:
- dependency-name: "@octokit/rest"
  dependency-version: 22.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-12 11:18:08 +02:00
Shelley Vohr
afb0ee418c fix: re-entrancy issues in webContents.loadURL() (#48004)
fix: re-entrancy issues in webContents.loadURL()
2025-08-11 11:20:35 -04:00
electron-roller[bot]
55d8b71d72 chore: bump chromium to 141.0.7346.0 (main) (#47983)
* chore: bump chromium in DEPS to 141.0.7341.0

* chore: bump chromium in DEPS to 141.0.7342.0

* chore: update patches

manually resolved conflict in `osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch` due to https://crrev.com/c/6681354

* 6819541: WebShare: Improve mac share behavior when sharing a URL
https://chromium-review.googlesource.com/c/chromium/src/+/6819541

* Add missing include for SkBitmap

Couldn't quickly find where we lost the full definition in this file's includes. 🤷

* 6771055: [SxS] Move devtools to ContentsContainerView supporting side-by-side.
https://chromium-review.googlesource.com/c/chromium/src/+/6771055

There may be some simplification possible here (set_x, Rect position, ...), but this change is satisfactory to maintain the current behavior.

* 6813689: Switch SystemMemoryInfoKB to use ByteCount
https://chromium-review.googlesource.com/c/chromium/src/+/6813689

* 6818486: Track DevTools feature usage in new badge tracker
https://chromium-review.googlesource.com/c/chromium/src/+/6818486

* chore: bump chromium in DEPS to 141.0.7344.0

* Remove ELECTRON_OZONE_PLATFORM_HINT env var

6819616: Remove OzonePlatformHint | https://chromium-review.googlesource.com/c/chromium/src/+/6819616

See: https://github.com/electron/electron/issues/48001

* chore: update patches

* Add missing include for `base::NumberToString`

* Remove `DESKTOP_STARTUP_ID` code

This was removed upstream in https://chromium-review.googlesource.com/c/chromium/src/+/6819616 and I confirmed with the author that it was an intentional change. Going to mirror upstream and remove it here too.

* chore: bump chromium in DEPS to 141.0.7346.0

* chore: update patches

* 6828465: Reland "Remove BluezDBusThreadManager"
https://chromium-review.googlesource.com/c/chromium/src/+/6828465

* Patch change to Node.js test output

V8 enhanced the stack trace of "thenable" async tasks. A couple of Node.js tests needed to have their snapshots updates to accomodate the extra stack trace frames in the output.

This patch should be upstreamed to Node.js.

See:
6826001: fix thenable async stack trace
https://chromium-review.googlesource.com/c/v8/v8/+/6826001

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
2025-08-11 12:57:31 +09:00
Calvin
b9ceaabb85 docs: deprecate ELECTRON_OZONE_PLATFORM_HINT env var (#48002) 2025-08-10 21:49:23 +02:00
David Sanders
d6c0691a63 fix: importing from electron/utility in ESM (#47998) 2025-08-09 09:47:47 +02:00
David Sanders
a201d6c541 build: drop @types/webpack-env in favor of webpack/module types (#47798)
* build: drop @types/webpack-env in favor of webpack/module types

* chore: improve type when assigning to global.require
2025-08-08 18:09:23 -07:00
John Kleinschmidt
51add3e847 ci: cleanup use new arc cluster (#47916) 2025-08-08 09:26:10 -04:00
reito
9dcdec5015 feat: paint event move texture data to handle, add colorSpace (#47315)
* feat: paint event move shared texture to handle, add color space

* feat: add breaking change

* fix: properties.

* fix: remove utf8 bom
2025-08-08 10:13:56 +02:00
reito
095e622a6a feat: context bridge support VideoFrame (#47316)
* feat: context bridge support VideoFrame

* docs: add VideoFrame to docs
2025-08-07 16:41:49 -04:00
Shelley Vohr
a0d983e4b5 feat: allow macOS tray to maintain position (#47838)
* feat: allow macOS tray to maintain position

* refactor: just use guid

* test: fixup tests

* docs: clarify UUID format
2025-08-07 19:25:50 +02:00
wujinli
f49a645c06 fix: compilation error when disabling extensions and pdf_viewer (#47964) 2025-08-07 11:18:32 -04:00
John Kleinschmidt
8ab5ac9069 ci: fixup mac runner hang (#47982) 2025-08-07 10:52:26 +02:00
Will Anderson
27a8cc531b chore: Remove redundant IS_WIN check inside electron_main_win.cc (#47967) 2025-08-07 09:54:13 +02:00
David Sanders
26ffc8505c fix: allow importing from electron/utility at runtime (#47968) 2025-08-07 09:53:42 +02:00
electron-roller[bot]
3b0f35a7e8 chore: bump chromium to 140.0.7339.2 (main) (#47929)
* chore: bump chromium in DEPS to 140.0.7330.0

* chore: bump chromium in DEPS to 140.0.7331.0

* chore: update patches

* fix: gn check failing on crashpad.h
Not yet sure what caused this

* fix: predictors::PreconnectManager -> content::PreconnectManager
CL: https://chromium-review.googlesource.com/c/chromium/src/+/6788473

* chore: bump chromium in DEPS to 140.0.7333.0

* chore: bump chromium in DEPS to 140.0.7335.0

* chore: bump chromium in DEPS to 140.0.7337.0

* chore: update patches

* chore: restore some gin utility

* 6804057: [Extensions] Validate nodoc is specified as a boolean in schemas
https://chromium-review.googlesource.com/c/chromium/src/+/6804057

* fixup! chore: restore some gin utility

* fixup! fix: predictors::PreconnectManager -> content::PreconnectManager CL: https://chromium-review.googlesource.com/c/chromium/src/+/6788473

* 6772346: Reset MouseWheelPhaseHandler state when trackpoint scroll is detected
https://chromium-review.googlesource.com/c/chromium/src/+/6772346

Not certain about what the "correct" argument to pass here is. A quick dive into the CL suggests that passing `false` is safe to keep things working. The blast radius if this assumption is wrong is that "fling" scroll gestures may not work as expected with the OSR.

* 6789383: Uninstall SODA language pack after 30 days of inactivity
https://chromium-review.googlesource.com/c/chromium/src/+/6789383

* chore: update libcxx filenames

* chore: bump chromium in DEPS to 140.0.7339.0

* chore: update patches

* fixup! 6772346: Reset MouseWheelPhaseHandler state when trackpoint scroll is detected https://chromium-review.googlesource.com/c/chromium/src/+/6772346

* chore: bump chromium in DEPS to 140.0.7339.2

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: clavin <clavin@electronjs.org>
2025-08-06 20:14:23 -04:00
David Sanders
8769d5ba9e build: check zip manifest for chromedriver.zip (#47972) 2025-08-06 20:04:19 -04:00
dependabot[bot]
7f8b7c3873 build(deps-dev): bump @electron/lint-roller from 3.1.1 to 3.1.2 (#47963)
Bumps [@electron/lint-roller](https://github.com/electron/lint-roller) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/electron/lint-roller/releases)
- [Changelog](https://github.com/electron/lint-roller/blob/main/.releaserc.json)
- [Commits](https://github.com/electron/lint-roller/compare/v3.1.1...v3.1.2)

---
updated-dependencies:
- dependency-name: "@electron/lint-roller"
  dependency-version: 3.1.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-06 11:21:55 +02:00
David Sanders
8bf4260e3e test: add TS smoke test for electron/utility (#47969) 2025-08-06 10:30:39 +02:00
Charles Kerr
7a13c6f175 refactor: avoid deprecated v8::Context::GetIsolate() pt 4 (#47961)
* refactor: remove GetIsolate() calls from SetPrivate()

* refactor: remove excess GetIsolate() calls in PassValueToOtherContextInner()

* refactor: remove GetIsolate() calls from GetPrivate()

* refactor: add a v8::Isolate* local to ProxyFunctionWrapper()

* refactor: remove error_context->GetIsolate() call from PassValueToOtherContextInner()

* refactor: remove GetIsolate() call from ProxyFunctionWrapper()

* refactor: pass source and destination isolate as arg to CreateProxyForAPI()
2025-08-05 20:08:04 -05:00
Keeley Hammond
678fb400fd fix: video scrubbing on playback (#47703)
* fix: fix video scrubbing on playback

* chore: address review feedback

---------

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-08-05 18:48:52 +02:00
Shelley Vohr
8806499904 fix: offscreen mode under window.open creation (#47868)
fix: offscreen mode under new window creation
2025-08-05 14:56:33 +02:00
dependabot[bot]
637a504e28 build(deps): bump github/codeql-action from 3.29.4 to 3.29.5 (#47962)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.4 to 3.29.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](4e828ff8d4...51f77329af)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-05 14:41:57 +02:00
electron-roller[bot]
40cdfdb1d1 chore: bump node to v22.18.0 (main) (#47937)
* chore: bump node in DEPS to v22.18.0

* crypto: fix inclusion of OPENSSL_IS_BORINGSSL define

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

* crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4

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

* permission: propagate permission model flags on spawn

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

* esm: syncify default path of ModuleLoader\.load

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

* src: remove fast API for InternalModuleStat

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

* src: simplify adding fast APIs to ExternalReferenceRegistry

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

* chore: fixup patch indices

* src: fix internalModuleStat v8 fast path

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

* test: add tests to ensure that node.1 is kept in sync with cli.md

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

* crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4

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

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2025-08-04 14:40:36 -04:00
Robo
4ca10a1056 chore: move gin::Handle to gin_helper (#47959)
* chore: move gin::Handle to gin_helper

* chore: fix lint
2025-08-05 02:03:06 +09:00
Robo
9d05454dc7 chore: move gin::DeprecatedWrappable to gin_helper (#47958)
* chore: move gin::DeprecatedWrappable to gin_helper

This is in preparation for migrating to gin::Wrappable
based on cppgc #47922
The upstream class will be deleted soon via roller PR but
the cppgc migration should happen outside the roll, this
change retains the current functionality by copying the
implementation into //electron/shell/common/gin_helper.
The class can be deleted once the cppgc migration is complete.

* chore: fix lint:cpp
2025-08-04 23:28:01 +09:00
dependabot[bot]
0e862bba61 build(deps-dev): bump remark-preset-lint-markdown-style-guide from 4.0.0 to 6.0.1 (#47940)
build(deps-dev): bump remark-preset-lint-markdown-style-guide

Bumps [remark-preset-lint-markdown-style-guide](https://github.com/remarkjs/remark-lint) from 4.0.0 to 6.0.1.
- [Release notes](https://github.com/remarkjs/remark-lint/releases)
- [Changelog](https://github.com/remarkjs/remark-lint/blob/main/changelog.md)
- [Commits](https://github.com/remarkjs/remark-lint/commits)

---
updated-dependencies:
- dependency-name: remark-preset-lint-markdown-style-guide
  dependency-version: 6.0.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-04 14:29:36 +02:00
Shelley Vohr
4232ed2814 fix: crash on window.close() with webContents on blur (#47933)
fix: crash on window.close with WebContentsView on blur
2025-08-04 10:35:29 +02:00
Will Anderson
e7683bdd25 feat: Use DIR_ASSETS path to locate resource bundles (#47439)
* feat: Use DIR_ASSETS path to locate resource bundles

* Use DIR_ASSETS for calculating ASAR relative paths

* Add test to verify 'assets' matches parent dir of 'exe'

* Add Mac-specific test for assets path (but it is failing)

* test: Update app.getPath('assets') to expect an exception on Mac

* docs: Update docs for 'assets' path to indicate that it's only available on Windows + Linux

* fix: Don't define 'assets' mapping on macOS
2025-08-04 12:34:08 +09:00
Sam Maddock
bdaf3b9a2b refactor: replace webFrame.routingId with sync IPC (#47717)
* refactor: replace webFrame.routingId with sync IPC

* fix: GetConstructor missing isolate

* fix: missing isolate
2025-08-02 11:00:42 -04:00
Shelley Vohr
5c98e3609f feat: add {get|set}AccentColor on Windows (#47741)
* feat: add setAccentColor on Windows

* refactor: unify GetSystemAccentColor

* refactor: remove redundant parsing

* chore: fixup documentation

* Update docs/api/browser-window.md

Co-authored-by: Will Anderson <andersonw@dropbox.com>

* Update docs/api/base-window.md

Co-authored-by: Will Anderson <andersonw@dropbox.com>

---------

Co-authored-by: Will Anderson <andersonw@dropbox.com>
2025-08-01 22:29:02 +02:00
dependabot[bot]
2cfccac074 build(deps-dev): bump folder-hash from 2.1.2 to 4.1.1 (#47931)
Bumps [folder-hash](https://github.com/marc136/node-folder-hash) from 2.1.2 to 4.1.1.
- [Release notes](https://github.com/marc136/node-folder-hash/releases)
- [Changelog](https://github.com/marc136/node-folder-hash/blob/main/CHANGELOG.md)
- [Commits](https://github.com/marc136/node-folder-hash/compare/v2.1.2...v4.1.1)

---
updated-dependencies:
- dependency-name: folder-hash
  dependency-version: 4.1.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-01 19:16:43 +02:00
electron-roller[bot]
03aad28412 chore: bump chromium to 140.0.7327.0 (main) (#47902)
* chore: bump chromium in DEPS to 140.0.7324.0

* chore: bump chromium in DEPS to 140.0.7325.0

* chore: remove @dsanders11's unused include patch
CL: https://chromium-review.googlesource.com/c/chromium/src/+/6782507

* fix: apply keychain patch to new apple subdir
CL: https://chromium-review.googlesource.com/c/chromium/src/+/6736212

* chore: update chromium patches

* chore: update other patches

* chore: bump chromium in DEPS to 140.0.7327.0

* fix: mistake in reapplied patch

* fixup! fix: apply keychain patch to new apple subdir CL: https://chromium-review.googlesource.com/c/chromium/src/+/6736212

* chore: update patches

* fix: remove OnPrivateNetworkAccessPermissionRequired override
CL: https://chromium-review.googlesource.com/c/chromium/src/+/6769208

* fix: update colorSpace property to use new unified value
CL: https://chromium-review.googlesource.com/c/chromium/src/+/6795085

* fix: include OverlayWindowLiveCaptionButton
CL: https://chromium-review.googlesource.com/c/chromium/src/+/6787420

* fixup! fix: apply keychain patch to new apple subdir CL: https://chromium-review.googlesource.com/c/chromium/src/+/6736212

* fix: format chromium_src/BUILD.gn
CL: https://chromium-review.googlesource.com/c/chromium/src/+/6787427

* fix: format BUILD.gn
CL: https://chromium-review.googlesource.com/c/chromium/src/+/6787427

* chore: include script/ in logged path

* fix: update filenames.libcxx.gni
CL: https://chromium-review.googlesource.com/c/chromium/src/+/6787279

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
2025-07-31 18:11:00 -04:00
Sam Maddock
25e2459f31 feat: webFrameMain.fromFrameToken (#47850)
* feat: webFrameMain.fromFrameToken

* refactor: return null instead of undefined

* docs: mention renderer webFrame property

* chore: undo null->undefined in wfm.fromId api
this will be updated in another pr
2025-07-31 16:41:44 -04:00
Shelley Vohr
18af498cf1 build: roll build-images to 933c7d6 (#47880) 2025-07-31 12:08:45 -04:00
John Kleinschmidt
9f43503b3e chore: revert "ci: fixup mac runners" (#47917)
This reverts commit 06d7a51a58.
2025-07-31 11:08:43 -04:00
Shelley Vohr
ecb1eb0b5d feat: add app.getRecentDocuments() (#45839)
feat: add app.getRecentDocuments()
2025-07-31 16:15:33 +02:00
dependabot[bot]
2c916cfa33 build(deps-dev): bump @octokit/rest from 20.1.1 to 20.1.2 (#47818)
* build(deps-dev): bump @octokit/rest from 20.1.1 to 22.0.0

Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 20.1.1 to 22.0.0.
- [Release notes](https://github.com/octokit/rest.js/releases)
- [Commits](https://github.com/octokit/rest.js/compare/v20.1.1...v22.0.0)

---
updated-dependencies:
- dependency-name: "@octokit/rest"
  dependency-version: 22.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: bump octokit/rest to 20.1.2

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2025-07-31 14:30:45 +02:00
Shelley Vohr
4c9ab8765b fix: dark mode on Linux default themeing (#47869) 2025-07-31 10:54:55 +02:00
dependabot[bot]
051f78dd1d build(deps): bump actions-cool/issues-helper from 3.6.0 to 3.6.2 (#47905)
Bumps [actions-cool/issues-helper](https://github.com/actions-cool/issues-helper) from 3.6.0 to 3.6.2.
- [Release notes](https://github.com/actions-cool/issues-helper/releases)
- [Changelog](https://github.com/actions-cool/issues-helper/blob/main/CHANGELOG.md)
- [Commits](a610082f8a...50068f49b7)

---
updated-dependencies:
- dependency-name: actions-cool/issues-helper
  dependency-version: 3.6.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-31 10:54:25 +02:00
dependabot[bot]
c796a74467 build(deps): bump github/codeql-action from 3.29.2 to 3.29.4 (#47904)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.2 to 3.29.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](181d5eefc2...4e828ff8d4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-31 10:54:03 +02:00
John Kleinschmidt
0d0cbaf7b4 ci: use new arc cluster (#47897) 2025-07-30 13:45:24 -04:00
Charles Kerr
63c452dcc7 refactor: avoid deprecated v8::Context::GetIsolate() calls pt 3 context get isolate pt 3 (#47901)
* refactor: add a v8::Isolate* arg to RendererClientBase::IsWebViewFrame()

Needed for creating gin dictionaries

refactor: add a v8::Isolate* arg to ShouldLoadPreload()

Needed for calling IsWebViewFrame()

* refactor: add a v8::Isolate* arg to electron::util::CompileAndCall()

* refactor: add a v8::Isolate* arg to OnCreatePreloadableV8Context()

* refactor: add a v8::Isolate* arg to InvokeEmitProcessEvent()

* refactor: add a v8::Isolate* arg to ServiceWorkerData's constructor

* refactor: add a v8::Isolate* arg to RendererClientBase::SetupMainWorldOverrides()

* refactor: add a v8::Isolate* arg to RendererClientBase::WilLReleaseScriptContext()

* docs: update docs to avoid v8::Context::GetIsolate()

* refactor: add a v8::Isolate* arg to ElectronSandboxedRendererClient::InitializeBindings()

* refactor: avoid v8::Context::GetIsolate() call in PromiseBase::SettleScope::~SettleScope()
2025-07-30 09:14:38 -05:00
electron-roller[bot]
f6407b4949 chore: bump chromium to 140.0.7314.0 (main) (#47882)
* chore: bump chromium in DEPS to 140.0.7314.0

* 6769821: Delegate checking whether preconnect is enabled.

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

* 6632993: PDF Searchify IPH: Use embedder WebContents for GuestView PDF

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

* 6769214: [ios blink] Set IOSurface shared memory region on all GMB handles

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

* chore: update patches

* 6769572: [soft navs]: Move AsyncSameDocumentNavigationStarted to TaskAttributionTracker

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

* chore: node gen-libc++-filenames.js

* 6765740: [SxS] Implement support for split view in extensions API

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

* 6769821: Delegate checking whether preconnect is enabled.

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

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2025-07-28 15:31:54 -07:00
John Kleinschmidt
06d7a51a58 ci: fixup mac runners (#47877)
ci: make sure camera and bluetooth are available on macos

ci: turn off spotlight indexing
2025-07-28 13:37:05 -04:00
Charles Kerr
2255bb620a refactor: avoid deprecated v8::Context::GetIsolate() calls (pt 2) (#47879)
* refactor: add a v8::Isolate* arg to Constructible::GetConstructor()

* refactor: add a v8::Isolate* arg to NodeBindings::Initialize()

This is needed for the GetConstructor() call

* refactor: avoid v8::Context::GetIsolate() call in GetIpcObject() by taking it as an arg

* refactor: avoid v8::Context::GetIsolate() call in ipc_native::EmitIPCEvent() by taking it as an arg
2025-07-28 10:22:27 -05:00
Charles Kerr
084c6ef549 refactor: prefer GetCreationContextChecked(v8::Isolate*) over GetCreationContextChecked() (#47878)
* refactor: pass an isolate when calling GetCreationContextChecked() in V8FunctionInvoker

* refactor: pass an isolate when calling GetCreationContextChecked() in RendererClientBase

* refactor: pass an isolate when calling GetCreationContextChecked() in ScriptExecutionCallback::Completed()

* refactor: pass an isolate when calling GetCreationContextChecked() in ScriptExecutionCallback::CopyResultToCallingContextAndFinalize()

* refactor: pass an isolate when calling GetCreationContextChecked() in electron::GetRenderFrame()

* refactor: pass an isolate when calling GetCreationContextChecked() in gin_helper::internal::CallMethodWithArgs()

* refactor: pass an isolate when calling GetCreationContextChecked() in OverrideGlobalPropertyFromIsolatedWorld()

* refactor: pass an isolate when calling GetCreationContextChecked() in OverrideGlobalValueFromIsolatedWorld()

* refactor: pass an isolate when calling GetCreationContextChecked() in ProxyFunctionWrapper()

* refactor: pass an isolate when calling GetCreationContextChecked() in PassValueToOtherContextInner()

* fixup! refactor: pass an isolate when calling GetCreationContextChecked() in electron::GetRenderFrame()
2025-07-25 09:06:57 -05:00
719 changed files with 33699 additions and 17073 deletions

View File

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

View File

@@ -17,9 +17,6 @@ inputs:
is-release:
description: 'Is release build'
required: true
strip-binaries:
description: 'Strip binaries (Linux only)'
required: false
generate-symbols:
description: 'Generate symbols'
required: true
@@ -63,22 +60,24 @@ runs:
sudo launchctl limit maxfiles 65536 200000
fi
NINJA_SUMMARIZE_BUILD=1 e build -j $NUMBER_OF_NINJA_PROCESSES
if [ "${{ inputs.is-release }}" = "true" ]; then
NINJA_SUMMARIZE_BUILD=1 e build --target electron:release_build
else
NINJA_SUMMARIZE_BUILD=1 e build --target electron:testing_build
fi
cp out/Default/.ninja_log out/electron_ninja_log
node electron/script/check-symlinks.js
- name: Strip Electron Binaries ${{ inputs.step-suffix }}
shell: bash
if: ${{ inputs.strip-binaries == 'true' }}
run: |
cd src
electron/script/copy-debug-symbols.py --target-cpu="${{ inputs.target-arch }}" --out-dir=out/Default/debug --compress
electron/script/strip-binaries.py --target-cpu="${{ inputs.target-arch }}" --verbose
electron/script/add-debug-link.py --target-cpu="${{ inputs.target-arch }}" --debug-dir=out/Default/debug
- name: Build Electron dist.zip ${{ inputs.step-suffix }}
# Upload build stats to Datadog
if ! [ -z $DD_API_KEY ]; then
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: Verify dist.zip ${{ inputs.step-suffix }}
shell: bash
run: |
cd src
e build --target electron:electron_dist_zip -j $NUMBER_OF_NINJA_PROCESSES -d explain
cd src
if [ "${{ inputs.is-asan }}" != "true" ]; then
target_os=${{ inputs.target-platform == 'macos' && 'mac' || inputs.target-platform }}
if [ "${{ inputs.artifact-platform }}" = "mas" ]; then
@@ -86,11 +85,10 @@ runs:
fi
electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.$target_os.${{ inputs.target-arch }}.manifest
fi
- name: Build Mksnapshot ${{ inputs.step-suffix }}
- name: Fixup Mksnapshot ${{ inputs.step-suffix }}
shell: bash
run: |
cd src
e build --target electron:electron_mksnapshot -j $NUMBER_OF_NINJA_PROCESSES
ELECTRON_DEPOT_TOOLS_DISABLE_LOG=1 e d gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
# Remove unused args from mksnapshot_args
SEDOPTION="-i"
@@ -100,20 +98,6 @@ runs:
sed $SEDOPTION '/.*builtins-pgo/d' out/Default/mksnapshot_args
sed $SEDOPTION '/--turbo-profiling-input/d' out/Default/mksnapshot_args
if [ "${{ inputs.target-platform }}" = "linux" ]; then
if [ "${{ inputs.target-arch }}" = "arm" ]; then
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/mksnapshot
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/v8_context_snapshot_generator
elif [ "${{ inputs.target-arch }}" = "arm64" ]; then
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x64_v8_arm64/mksnapshot
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x64_v8_arm64/v8_context_snapshot_generator
else
electron/script/strip-binaries.py --file $PWD/out/Default/mksnapshot
electron/script/strip-binaries.py --file $PWD/out/Default/v8_context_snapshot_generator
fi
fi
e build --target electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES
if [ "${{ inputs.target-platform }}" = "win" ]; then
cd out/Default
powershell Compress-Archive -update mksnapshot_args mksnapshot.zip
@@ -147,13 +131,15 @@ runs:
shell: bash
run: |
cd src
e build --target electron:electron_chromedriver -j $NUMBER_OF_NINJA_PROCESSES
e build --target electron:electron_chromedriver_zip
- name: Build Node.js headers ${{ inputs.step-suffix }}
shell: bash
run: |
cd src
e build --target electron:node_headers
if [ "${{ inputs.is-asan }}" != "true" ]; then
target_os=${{ inputs.target-platform == 'macos' && 'mac' || inputs.target-platform }}
if [ "${{ inputs.artifact-platform }}" = "mas" ]; then
target_os="${target_os}_mas"
fi
electron/script/zip_manifests/check-zip-manifest.py out/Default/chromedriver.zip electron/script/zip_manifests/chromedriver_zip.$target_os.${{ inputs.target-arch }}.manifest
fi
- name: Create installed_software.json ${{ inputs.step-suffix }}
shell: powershell
if: ${{ inputs.is-release == 'true' && inputs.target-platform == 'win' }}
@@ -173,41 +159,23 @@ runs:
# Needed for msdia140.dll on 64-bit windows
cd src
export PATH="$PATH:$(pwd)/third_party/llvm-build/Release+Asserts/bin"
- name: Generate & Zip Symbols ${{ inputs.step-suffix }}
- name: Zip Symbols ${{ inputs.step-suffix }}
shell: bash
run: |
# Generate breakpad symbols on release builds
if [ "${{ inputs.generate-symbols }}" = "true" ]; then
e build --target electron:electron_symbols
fi
cd src
export BUILD_PATH="$(pwd)/out/Default"
e build --target electron:licenses
e build --target electron:electron_version_file
if [ "${{ inputs.is-release }}" = "true" ]; then
DELETE_DSYMS_AFTER_ZIP=1 electron/script/zip-symbols.py -b $BUILD_PATH
else
electron/script/zip-symbols.py -b $BUILD_PATH
fi
- name: Generate FFMpeg ${{ inputs.step-suffix }}
if: ${{ inputs.is-release == 'true' }}
shell: bash
if: ${{ inputs.is-release == 'true' }}
run: |
cd src
gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true $GN_EXTRA_ARGS"
e build --target electron:electron_ffmpeg_zip -C ../../out/ffmpeg -j $NUMBER_OF_NINJA_PROCESSES
- name: Generate Hunspell Dictionaries ${{ inputs.step-suffix }}
shell: bash
if: ${{ inputs.is-release == 'true' && inputs.target-platform == 'linux' }}
run: |
e build --target electron:hunspell_dictionaries_zip -j $NUMBER_OF_NINJA_PROCESSES
- name: Generate Libcxx ${{ inputs.step-suffix }}
shell: bash
if: ${{ inputs.is-release == 'true' && inputs.target-platform == 'linux' }}
run: |
e build --target electron:libcxx_headers_zip -j $NUMBER_OF_NINJA_PROCESSES
e build --target electron:libcxxabi_headers_zip -j $NUMBER_OF_NINJA_PROCESSES
e build --target electron:libcxx_objects_zip -j $NUMBER_OF_NINJA_PROCESSES
gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true use_siso=true $GN_EXTRA_ARGS"
e build --target electron:electron_ffmpeg_zip -C ../../out/ffmpeg
- name: Remove Clang problem matcher
shell: bash
run: echo "::remove-matcher owner=clang::"
@@ -216,7 +184,7 @@ 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
@@ -230,7 +198,29 @@ runs:
echo 'Uploading Electron release distribution to GitHub releases'
script/release/uploaders/upload.py --verbose
fi
- name: Generate siso report
if: ${{ inputs.target-platform != 'win' && !cancelled() }}
shell: bash
run: |
cd src
e d siso report -C out/Default > siso_report.txt
SISO_REPORT_PATH=$(grep -o '/.*siso-report-[^ ]*' siso_report.txt)
echo "SISO_REPORT_PATH=$SISO_REPORT_PATH" >> $GITHUB_ENV
cat siso_report.txt
echo "SISO REPORT AT $SISO_REPORT_PATH"
- name: Generate siso report (Windows)
if: ${{ inputs.target-platform == 'win' && !cancelled() }}
shell: powershell
run: |
cd src
e d siso report -C out\Default > siso_report.txt
$SISO_REPORT_PATH = Get-Content "siso_report.txt" | Select-String "report file:\s*(.+)" | ForEach-Object {
$_.Matches.Groups[1].Value.Trim()
}
echo "SISO_REPORT_PATH=$SISO_REPORT_PATH"
echo "SISO_REPORT_PATH=$SISO_REPORT_PATH" >> $env:GITHUB_ENV
- name: Generate Artifact Key
if: always() && !cancelled()
shell: bash
run: |
if [ "${{ inputs.is-asan }}" = "true" ]; then
@@ -242,9 +232,11 @@ runs:
# The current generated_artifacts_<< artifact.key >> name was taken from CircleCI
# to ensure we don't break anything, but we may be able to improve that.
- name: Move all Generated Artifacts to Upload Folder ${{ inputs.step-suffix }}
if: always() && !cancelled()
shell: bash
run: ./src/electron/script/actions/move-artifacts.sh
- name: Upload Generated Artifacts ${{ inputs.step-suffix }}
if: always() && !cancelled()
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
with:
name: generated_artifacts_${{ env.ARTIFACT_KEY }}

View File

@@ -40,7 +40,7 @@ runs:
if: ${{ inputs.generate-sas-token == 'true' }}
shell: bash
run: |
curl --unix-socket /var/run/sas/sas.sock --fail "http://foo/$CACHE_FILE?platform=${{ inputs.target-platform }}" > sas-token
curl --unix-socket /var/run/sas/sas.sock --fail "http://foo/$CACHE_FILE?platform=${{ inputs.target-platform }}&getAccountName=true" > sas-token
- name: Save SAS Key
if: ${{ inputs.generate-sas-token == 'true' }}
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
@@ -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
@@ -172,7 +173,6 @@ runs:
run: |
rm -rf src/android_webview
rm -rf src/ios/chrome
rm -rf src/third_party/blink/web_tests
rm -rf src/third_party/blink/perf_tests
rm -rf src/chrome/test/data/xr/webvr_info
rm -rf src/third_party/angle/third_party/VK-GL-CTS/src

View File

@@ -14,6 +14,9 @@ inputs:
description: 'Target platform, should be linux, win, macos'
package:
description: 'Package to install'
dependency-version:
description: 'Version of the dependency to install'
default: ''
runs:
using: "composite"
steps:
@@ -22,15 +25,23 @@ runs:
run : |
rm -rf ${{ inputs.cipd-root-prefix-path }}${{ inputs.installation-dir }}
- name: Create ensure file for ${{ inputs.dependency }}
if: ${{ inputs.dependency-version == '' }}
shell: bash
run: |
echo '${{ inputs.package }}' `e d gclient getdep --deps-file=${{ inputs.deps-file }} -r '${{ inputs.installation-dir }}:${{ inputs.package }}'` > ${{ inputs.dependency }}_ensure_file
cat ${{ inputs.dependency }}_ensure_file
- name: CIPD installation of ${{ inputs.dependency }} (macOS)
if: ${{ inputs.target-platform == 'macos' }}
- name: Create ensure file for ${{ inputs.dependency }} from dependency-version
if: ${{ inputs.dependency-version != '' }}
shell: bash
run: |
echo "ensuring ${{ inputs.dependency }} on macOS"
echo '${{ inputs.package }} ${{ inputs.dependency-version }}' > ${{ inputs.dependency }}_ensure_file
cat ${{ inputs.dependency }}_ensure_file
- name: CIPD installation of ${{ inputs.dependency }} (macOS)
if: ${{ inputs.target-platform != 'win' }}
shell: bash
run: |
echo "ensuring ${{ inputs.dependency }}"
e d cipd ensure --root ${{ inputs.cipd-root-prefix-path }}${{ inputs.installation-dir }} -ensure-file ${{ inputs.dependency }}_ensure_file
- name: CIPD installation of ${{ inputs.dependency }} (Windows)
if: ${{ inputs.target-platform == 'win' }}

View File

@@ -20,6 +20,7 @@ runs:
using: "composite"
steps:
- name: Fix llvm toolchain
if: ${{ inputs.target-platform != 'linux' }}
shell: bash
run : |
rm -rf src/third_party/llvm-build
@@ -27,6 +28,7 @@ runs:
# Refs https://chromium-review.googlesource.com/c/chromium/src/+/6667681
python3 src/tools/clang/scripts/update.py --package objdump
- name: Fix esbuild
if: ${{ inputs.target-platform != 'linux' }}
uses: ./src/electron/.github/actions/cipd-install
with:
cipd-root-prefix-path: src/third_party/devtools-frontend/src/
@@ -36,6 +38,7 @@ runs:
target-platform: ${{ inputs.target-platform }}
package: infra/3pp/tools/esbuild/${platform}
- name: Fix rustc
if: ${{ inputs.target-platform != 'linux' }}
shell: bash
run : |
rm -rf src/third_party/rust-toolchain
@@ -59,6 +62,7 @@ runs:
target-platform: ${{ inputs.target-platform }}
package: gn/gn/windows-amd64
- name: Fix reclient
if: ${{ inputs.target-platform != 'linux' }}
uses: ./src/electron/.github/actions/cipd-install
with:
dependency: reclient
@@ -67,6 +71,7 @@ runs:
target-platform: ${{ inputs.target-platform }}
package: infra/rbe/client/${platform}
- name: Configure reclient configs
if: ${{ inputs.target-platform != 'linux' }}
shell: bash
run : |
python3 src/buildtools/reclient_cfgs/configure_reclient_cfgs.py --rbe_instance "projects/rbe-chrome-untrusted/instances/default_instance" --reproxy_cfg_template reproxy.cfg.template --rewrapper_cfg_project "" --skip_remoteexec_cfg_fetch
@@ -84,6 +89,7 @@ runs:
python3 src/third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-browser-clang -s $DSYM_SHA_FILE -o src/tools/clang/dsymutil/bin/dsymutil
fi
- name: Fix ninja
if: ${{ inputs.target-platform != 'linux' }}
uses: ./src/electron/.github/actions/cipd-install
with:
dependency: ninja
@@ -92,10 +98,20 @@ runs:
target-platform: ${{ inputs.target-platform }}
package: infra/3pp/tools/ninja/${platform}
- name: Set ninja in path
if: ${{ inputs.target-platform != 'linux' }}
shell: bash
run : |
echo "$(pwd)/src/third_party/ninja" >> $GITHUB_PATH
- name: Fix siso
uses: ./src/electron/.github/actions/cipd-install
with:
dependency: siso
deps-file: src/DEPS
installation-dir: src/third_party/siso/cipd
target-platform: ${{ inputs.target-platform }}
package: build/siso/${platform}
- name: Fixup angle git
if: ${{ inputs.target-platform != 'linux' }}
shell: bash
run : |
cd src/third_party/angle

View File

@@ -6,6 +6,8 @@ runs:
- name: Free Space on MacOS
shell: bash
run: |
echo "Disk usage before cleanup:"
df -h
sudo mkdir -p $TMPDIR/del-target
tmpify() {
@@ -15,28 +17,30 @@ runs:
}
strip_universal_deep() {
opwd=$(pwd)
cd $1
f=$(find . -perm +111 -type f)
for fp in $f
do
if [[ $(file "$fp") == *"universal binary"* ]]; then
if [ "`arch`" == "arm64" ]; then
if [[ $(file "$fp") == *"x86_64"* ]]; then
sudo lipo -remove x86_64 "$fp" -o "$fp" || true
fi
else
if [[ $(file "$fp") == *"arm64e)"* ]]; then
sudo lipo -remove arm64e "$fp" -o "$fp" || true
fi
if [[ $(file "$fp") == *"arm64)"* ]]; then
sudo lipo -remove arm64 "$fp" -o "$fp" || true
if [ -d "$1" ]; then
opwd=$(pwd)
cd $1
f=$(find . -perm +111 -type f)
for fp in $f
do
if [[ $(file "$fp") == *"universal binary"* ]]; then
if [ "`arch`" == "arm64" ]; then
if [[ $(file "$fp") == *"x86_64"* ]]; then
sudo lipo -remove x86_64 "$fp" -o "$fp" || true
fi
else
if [[ $(file "$fp") == *"arm64e)"* ]]; then
sudo lipo -remove arm64e "$fp" -o "$fp" || true
fi
if [[ $(file "$fp") == *"arm64)"* ]]; then
sudo lipo -remove arm64 "$fp" -o "$fp" || true
fi
fi
fi
fi
done
done
cd $opwd
cd $opwd
fi
}
tmpify /Library/Developer/CoreSimulator
@@ -58,19 +62,28 @@ runs:
sudo rm -rf /Applications/Safari.app
sudo rm -rf /Applications/Xcode_16.1.app
sudo rm -rf /Applications/Xcode_16.3.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/Xcode_16.4.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
# strip_arm_deep /System/Volumes/Data/Library/Developer/CommandLineTools/usr
# strip_arm_deep /System/Volumes/Data/Library/Developer/CommandLineTools/usr
sudo mdutil -a -i off

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

@@ -13,8 +13,9 @@ runs:
git config --global core.fscache true
git config --global core.longpaths true
git config --global core.preloadindex true
git config --global core.longpaths true
fi
export BUILD_TOOLS_SHA=274cba0474f0d1e4e6adbb66c1da48556cb0add5
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

@@ -36,18 +36,19 @@ runs:
echo "SAS Token not found; exiting src cache download early..."
exit 1
else
sas_token=$(jq -r '.sasToken' sas-token)
account_name=$(jq -r '.accountName' sas-token)
if [ "${{ inputs.target-platform }}" = "win" ]; then
azcopy copy --log-level=ERROR \
"https://${{ env.AZURE_AKS_CACHE_STORAGE_ACCOUNT }}.file.core.windows.net/${{ env.AZURE_AKS_WIN_CACHE_SHARE_NAME }}/${{ env.CACHE_PATH }}?$sas_token" $DEPSHASH.tar
"https://$account_name.file.core.windows.net/${{ env.AZURE_AKS_WIN_CACHE_SHARE_NAME }}/${{ env.CACHE_PATH }}?$sas_token" $DEPSHASH.tar
else
azcopy copy --log-level=ERROR \
"https://${{ env.AZURE_AKS_CACHE_STORAGE_ACCOUNT }}.file.core.windows.net/${{ env.AZURE_AKS_CACHE_SHARE_NAME }}/${{ env.CACHE_PATH }}?$sas_token" $DEPSHASH.tar
"https://$account_name.file.core.windows.net/${{ env.AZURE_AKS_CACHE_SHARE_NAME }}/${{ env.CACHE_PATH }}?$sas_token" $DEPSHASH.tar
fi
fi
env:
AZURE_AKS_CACHE_STORAGE_ACCOUNT: f723719aa87a34622b5f7f3
AZURE_AKS_CACHE_SHARE_NAME: pvc-f6a4089f-b082-4bee-a3f9-c3e1c0c02d8f
AZURE_AKS_WIN_CACHE_SHARE_NAME: pvc-71dec4f2-0d44-4fd1-a2c3-add049d70bdf
AZURE_AKS_CACHE_SHARE_NAME: linux-cache
AZURE_AKS_WIN_CACHE_SHARE_NAME: windows-cache
- name: Clean SAS Key
shell: bash
run: rm -f sas-token
@@ -96,7 +97,7 @@ runs:
$TEMP_DIR=New-Item -ItemType Directory -Path temp-cache
$TEMP_DIR_PATH = $TEMP_DIR.FullName
C:\ProgramData\Chocolatey\bin\7z.exe -y -snld x $src_cache -o"$TEMP_DIR_PATH"
C:\ProgramData\Chocolatey\bin\7z.exe -y -snld20 x $src_cache -o"$TEMP_DIR_PATH"
- name: Move Src Cache (Windows)
if: ${{ inputs.target-platform == 'win' }}

View File

@@ -6,10 +6,10 @@ inputs:
required: true
default: 'false'
timeout:
description: 'SSH session timeout in minutes'
description: 'SSH session timeout in seconds'
required: false
type: number
default: 60
default: 3600
runs:
using: composite
steps:

View File

@@ -1,44 +1,20 @@
#!/bin/bash -e
get_authorized_keys() {
if [ -z "$AUTHORIZED_USERS" ] || ! echo "$AUTHORIZED_USERS" | grep -q "\b$GITHUB_ACTOR\b"; then
return 1
fi
api_response=$(curl -s "https://api.github.com/users/$GITHUB_ACTOR/keys")
if echo "$api_response" | jq -e 'type == "object" and has("message")' >/dev/null; then
error_msg=$(echo "$api_response" | jq -r '.message')
echo "Error: $error_msg"
return 1
else
echo "$api_response" | jq -r '.[].key'
fi
}
authorized_keys=$(get_authorized_keys "$GITHUB_ACTOR")
if [ -n "$authorized_keys" ]; then
echo "Configured SSH key(s) for user: $GITHUB_ACTOR"
else
echo "Error: User '$GITHUB_ACTOR' is not authorized to access this debug session."
echo "Authorized users: $AUTHORIZED_USERS"
exit 1
fi
if [ "$TUNNEL" != "true" ]; then
if [ "${TUNNEL}" != "true" ]; then
echo "SSH tunneling is disabled. Set enable-tunnel: true to enable remote access."
echo "Local SSH server would be available on localhost:2222 if this were a local environment."
exit 0
fi
echo ::group::Configuring Tunnel
echo "SSH tunneling enabled. Setting up remote access..."
EXTERNAL_DEPS="curl jq ssh-keygen"
for dep in $EXTERNAL_DEPS; do
if ! command -v "$dep" > /dev/null 2>&1; then
echo "Command $dep not installed on the system!" >&2
if ! command -v "${dep}" > /dev/null 2>&1; then
echo "Command ${dep} not installed on the system!" >&2
exit 1
fi
done
@@ -48,22 +24,21 @@ cd "$GITHUB_ACTION_PATH"
bashrc_path=$(pwd)/bashrc
# Source `bashrc` to auto start tmux on SSH login.
if ! grep -q "$bashrc_path" ~/.bash_profile; then
if ! grep -q "${bashrc_path}" ~/.bash_profile; then
echo >> ~/.bash_profile # On macOS runner there's no newline at the end of the file
echo "source \"$bashrc_path\"" >> ~/.bash_profile
echo "source \"${bashrc_path}\"" >> ~/.bash_profile
fi
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m)
if [ "$ARCH" = "x86_64" ]; then
if [ "${ARCH}" = "x86_64" ]; then
ARCH="amd64"
elif [ "$ARCH" = "aarch64" ]; then
elif [ "${ARCH}" = "aarch64" ]; then
ARCH="arm64"
fi
# Install tmux on macOS runners if not present.
if [ "$OS" = "darwin" ] && ! command -v tmux > /dev/null 2>&1; then
if [ "${OS}" = "darwin" ] && ! command -v tmux > /dev/null 2>&1; then
echo "Installing tmux..."
brew install tmux
fi
@@ -71,47 +46,80 @@ fi
if [ "$OS" = "darwin" ]; then
cloudflared_url="https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-${OS}-${ARCH}.tgz"
echo "Downloading \`cloudflared\` from <$cloudflared_url>..."
curl --location --silent --output cloudflared.tgz "$cloudflared_url"
curl --location --silent --output cloudflared.tgz "${cloudflared_url}"
tar xf cloudflared.tgz
rm cloudflared.tgz
else
cloudflared_url="https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-${OS}-${ARCH}"
echo "Downloading \`cloudflared\` from <$cloudflared_url>..."
curl --location --silent --output cloudflared "$cloudflared_url"
fi
chmod +x cloudflared
echo "Setting up SSH key for authorized user: $GITHUB_ACTOR"
echo "$authorized_keys" > authorized_keys
echo 'Creating SSH server key...'
ssh-keygen -q -f ssh_host_rsa_key -N ''
echo 'Creating SSH server config...'
sed "s,\$PWD,$PWD,;s,\$USER,$USER," sshd_config.template > sshd_config
sed "s,\$PWD,${PWD},;s,\$USER,${USER}," sshd_config.template > sshd_config
echo 'Starting SSH server...'
/usr/sbin/sshd -f sshd_config -D &
sudo /usr/sbin/sshd -f sshd_config -D &
sshd_pid=$!
echo 'Starting tmux session...'
(cd "$GITHUB_WORKSPACE" && tmux new-session -d -s debug)
echo "SSH server started successfully (PID: ${sshd_pid})"
#if no cloudflare tunnel token is provided, exit
if [ -z "$CLOUDFLARE_TUNNEL_TOKEN" ]; then
echo "Error: required CLOUDFLARE_TUNNEL_TOKEN not found"
echo 'Starting tmux session...'
(cd "${GITHUB_WORKSPACE}" && tmux new-session -d -s debug)
mkdir ~/.cloudflared
CLEAN_TUNNEL_CERT=$(printf '%s\n' "${CLOUDFLARE_TUNNEL_CERT}" | tr -d '\r' | sed '/^[[:space:]]*$/d')
echo "${CLEAN_TUNNEL_CERT}" > ~/.cloudflared/cert.pem
CLEAN_USER_CA_CERT=$(printf '%s\n' "${CLOUDFLARE_USER_CA_CERT}" | tr -d '\r' | sed '/^[[:space:]]*$/d')
echo "${CLEAN_USER_CA_CERT}" | sudo tee /etc/ssh/ca.pub > /dev/null
sudo chmod 644 /etc/ssh/ca.pub
random_suffix=$(openssl rand -hex 5 | cut -c1-10)
tunnel_name="${GITHUB_SHA}-${GITHUB_RUN_ID}-${random_suffix}"
tunnel_url="${tunnel_name}.${CLOUDFLARE_TUNNEL_HOSTNAME}"
if ./cloudflared tunnel list | grep -q "${tunnel_name}"; then
echo "Deleting existing tunnel: ${tunnel_name}"
./cloudflared tunnel delete ${tunnel_name}
fi
echo "Creating new cloudflare tunnel: ${tunnel_name}"
./cloudflared tunnel create ${tunnel_name}
credentials_file=$(find ~/.cloudflared -name "*.json" | head -n 1)
if [ -z "${credentials_file}" ]; then
echo "Error: Could not find tunnel credentials file"
exit 1
fi
echo 'Starting Cloudflare tunnel...'
echo "Found credentials file: ${credentials_file}"
./cloudflared tunnel --no-autoupdate run --token "$CLOUDFLARE_TUNNEL_TOKEN" 2>&1 | tee cloudflared.log | sed -u 's/^/cloudflared: /' &
echo 'Creating tunnel configuration...'
cat > tunnel_config.yml << EOF
tunnel: ${tunnel_name}
credentials-file: ${credentials_file}
ingress:
- hostname: ${tunnel_url}
service: ssh://localhost:2222
- service: http_status:404
EOF
echo 'Setting up DNS routing for tunnel...'
./cloudflared tunnel route dns ${tunnel_name} ${tunnel_url}
echo 'Running cloudflare tunnel...'
./cloudflared tunnel --no-autoupdate --config tunnel_config.yml run 2>&1 | tee cloudflared.log | sed -u 's/^/cloudflared: /' &
cloudflared_pid=$!
url="$TUNNEL_HOSTNAME"
echo ::endgroup::
echo ::notice title=SSH Debug Session Ready::ssh ${tunnel_url}
public_key=$(cut -d' ' -f1,2 < ssh_host_rsa_key.pub)
(
echo ' '
@@ -119,22 +127,20 @@ public_key=$(cut -d' ' -f1,2 < ssh_host_rsa_key.pub)
echo '🔗 SSH Debug Session Ready!'
echo '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'
echo ' '
echo '📋 Copy and run this command to connect:'
echo '📋 Infra WG can copy and run this command to connect:'
echo ' '
if [ -n "$TUNNEL_HOSTNAME" ]; then
echo "ssh-keygen -R action-ssh-debug && echo 'action-ssh-debug $public_key' >> ~/.ssh/known_hosts && ssh -o ProxyCommand='cloudflared access tcp --hostname $url' runner@action-ssh-debug"
else
echo "ssh-keygen -R action-ssh-debug && echo 'action-ssh-debug $public_key' >> ~/.ssh/known_hosts && ssh -o ProxyCommand='cloudflared access tcp --hostname $url' runner@action-ssh-debug"
fi
echo "ssh ${tunnel_url}"
echo ' '
echo "⏰ Session expires automatically in $TIMEOUT minutes"
echo "⏰ Session expires automatically in ${TIMEOUT} seconds"
echo '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'
echo ' '
echo ' '
) | cat
echo ::group::Starting Background Session
echo 'Starting SSH session in background...'
./ssh-session.sh "$sshd_pid" "$cloudflared_pid" $TIMEOUT &
./ssh-session.sh "${sshd_pid}" "${cloudflared_pid}" "${TIMEOUT}" "${tunnel_name}" &
echo 'SSH session is running in background. GitHub Action will continue.'
echo 'Session will auto-cleanup after timeout or when processes end.'
echo ::endgroup::

View File

@@ -2,20 +2,51 @@
SSHD_PID=$1
CLOUDFLARED_PID=$2
SESSION_TIMEOUT=${3:-3600}
SESSION_TIMEOUT=${3:-10000}
TUNNEL_NAME=$4
cleanup() {
# Kill processes.
for pid in "$SLEEP_PID" "$SSHD_PID" "$CLOUDFLARED_PID"; do
if [ -n "$pid" ] && kill -0 "$pid" 2>/dev/null; then
kill "$pid" 2>/dev/null || true
fi
done
# Clean up tunnel.
if [ -n "$TUNNEL_NAME" ]; then
cd "$GITHUB_ACTION_PATH"
./cloudflared tunnel delete "$TUNNEL_NAME" 2>/dev/null || {
echo "Failed to delete tunnel"
}
fi
echo "Session ended at $(date)"
exit 0
}
# Trap signals to ensure cleanup.
trap cleanup SIGTERM SIGINT SIGQUIT SIGHUP EXIT
# Wait for timeout or until processes die.
sleep "$SESSION_TIMEOUT" &
SLEEP_PID=$!
# Monitor if SSH or cloudflared dies early.
while kill -0 "$SSHD_PID" 2>/dev/null && kill -0 "$CLOUDFLARED_PID" 2>/dev/null && kill -0 "$SLEEP_PID" 2>/dev/null; do
sleep 10
# Monitor processes
while kill -0 "$SLEEP_PID" 2>/dev/null; do
# Check SSH daemon.
if ! kill -0 "$SSHD_PID" 2>/dev/null; then
echo "SSH daemon died at $(date)"
break
fi
# Check cloudflared,
if ! kill -0 "$CLOUDFLARED_PID" 2>/dev/null; then
echo "Cloudflared died at $(date)"
break
fi
sleep 10
done
# Cleanup.
kill "$SLEEP_PID" 2>/dev/null || true
kill "$SSHD_PID" 2>/dev/null || true
kill "$CLOUDFLARED_PID" 2>/dev/null || true
echo "SSH session ended"
cleanup

View File

@@ -2,8 +2,24 @@ Port 2222
HostKey $PWD/ssh_host_rsa_key
PidFile $PWD/sshd.pid
# Only allow single user
AllowUsers $USER
# Connection settings
ClientAliveInterval 30
ClientAliveCountMax 10
MaxStartups 10
LoginGraceTime 120
# Only allow those keys
AuthorizedKeysFile $PWD/authorized_keys
# Allow TCP forwarding for tunneling
AllowTcpForwarding yes
# Try to prevent timeouts
TCPKeepAlive yes
# Security
TrustedUserCAKeys /etc/ssh/ca.pub
PubkeyAuthentication yes
PasswordAuthentication no
AuthorizedPrincipalsCommand /bin/bash -c "echo '%t %k' | ssh-keygen -L -f - | grep -A1 Principals"
AuthorizedPrincipalsCommandUser nobody
PubkeyAcceptedKeyTypes ssh-rsa,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com

View File

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

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@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.0.2

View File

@@ -6,11 +6,15 @@ on:
schedule:
- cron: "0 0 * * *"
permissions: {}
jobs:
build-git-cache-linux:
runs-on: electron-arc-linux-amd64-32core
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
@@ -29,9 +33,11 @@ jobs:
target-platform: linux
build-git-cache-windows:
runs-on: electron-arc-linux-amd64-32core
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
@@ -51,11 +57,13 @@ jobs:
target-platform: win
build-git-cache-macos:
runs-on: electron-arc-linux-amd64-32core
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: '424eedbf277ad9749ffa9219068aa72ed4a5e373'
default: 'a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb'
required: true
skip-macos:
type: boolean
@@ -28,6 +28,11 @@ on:
description: 'Skip lint check'
default: false
required: false
enable-ssh:
description: 'Enable SSH debugging'
required: false
type: boolean
default: false
push:
branches:
- main
@@ -38,16 +43,20 @@ defaults:
run:
shell: bash
permissions: {}
jobs:
setup:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
docs: ${{ steps.filter.outputs.docs }}
src: ${{ steps.filter.outputs.src }}
build-image-sha: ${{ steps.set-output.outputs.build-image-sha }}
docs-only: ${{ steps.set-output.outputs.docs-only }}
has-patches: ${{ steps.filter.outputs.patches }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.0.2
with:
@@ -58,13 +67,20 @@ jobs:
filters: |
docs:
- 'docs/**'
- README.md
- SECURITY.md
- CONTRIBUTING.md
- CODE_OF_CONDUCT.md
src:
- '!docs/**'
patches:
- DEPS
- 'patches/**'
- name: Set Outputs for Build Image SHA & Docs Only
id: set-output
run: |
if [ -z "${{ inputs.build-image-sha }}" ]; then
echo "build-image-sha=424eedbf277ad9749ffa9219068aa72ed4a5e373" >> "$GITHUB_OUTPUT"
echo "build-image-sha=a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb" >> "$GITHUB_OUTPUT"
else
echo "build-image-sha=${{ inputs.build-image-sha }}" >> "$GITHUB_OUTPUT"
fi
@@ -75,24 +91,65 @@ 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
# Docs Only Jobs
docs-only:
needs: setup
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.setup.outputs.build-image-sha }}","options":"--user root"}'
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
# Apply Patches Job
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:${{ needs.setup.outputs.build-image-sha }}
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@8e8c483db84b4bee98b60c0593521ed34d9990e8
with:
path: src/electron
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Rebase onto Base Branch
working-directory: src/electron
run: |
git config user.email "electron@github.com"
git config user.name "Electron Bot"
git fetch origin ${{ github.event.pull_request.base.ref }}
git rebase origin/${{ github.event.pull_request.base.ref }}
- name: Checkout & Sync & Save
uses: ./src/electron/.github/actions/checkout
with:
target-platform: linux
# Checkout Jobs
checkout-macos:
needs: setup
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-macos}}
runs-on: electron-arc-linux-amd64-32core
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
@@ -119,8 +176,10 @@ jobs:
checkout-linux:
needs: setup
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-linux}}
runs-on: electron-arc-linux-amd64-32core
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
@@ -149,7 +208,9 @@ jobs:
checkout-windows:
needs: setup
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
runs-on: electron-arc-linux-amd64-32core
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
@@ -180,32 +241,39 @@ 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
target-archs: x64 arm64
check-runs-on: macos-14
check-runs-on: macos-15
gn-build-type: testing
secrets: inherit
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:
target-platform: linux
target-archs: x64 arm arm64
check-runs-on: electron-arc-linux-amd64-8core
check-runs-on: electron-arc-centralus-linux-amd64-8core
check-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"]}'
gn-build-type: testing
secrets: inherit
windows-gn-check:
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
permissions:
contents: read
needs: checkout-windows
with:
target-platform: win
target-archs: x64 x86 arm64
check-runs-on: electron-arc-linux-amd64-8core
check-runs-on: electron-arc-centralus-linux-amd64-8core
check-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-windows.outputs.build-image-sha }}","options":"--user root --device /dev/fuse --cap-add SYS_ADMIN","volumes":["/mnt/win-cache:/mnt/win-cache"]}'
gn-build-type: testing
secrets: inherit
@@ -219,14 +287,15 @@ jobs:
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
needs: checkout-macos
with:
build-runs-on: macos-14-xlarge
test-runs-on: macos-13
build-runs-on: macos-15-xlarge
test-runs-on: macos-15-large
target-platform: macos
target-arch: x64
is-release: false
gn-build-type: testing
generate-symbols: false
upload-to-storage: '0'
enable-ssh: ${{ inputs.enable-ssh || false }}
secrets: inherit
macos-arm64:
@@ -237,14 +306,15 @@ jobs:
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
needs: checkout-macos
with:
build-runs-on: macos-14-xlarge
test-runs-on: macos-14
build-runs-on: macos-15-xlarge
test-runs-on: macos-15
target-platform: macos
target-arch: arm64
is-release: false
gn-build-type: testing
generate-symbols: false
upload-to-storage: '0'
enable-ssh: ${{ inputs.enable-ssh || false }}
secrets: inherit
linux-x64:
@@ -254,9 +324,10 @@ jobs:
pull-requests: read
uses: ./.github/workflows/pipeline-electron-build-and-test-and-nan.yml
needs: checkout-linux
if: ${{ needs.setup.outputs.src == 'true' }}
with:
build-runs-on: electron-arc-linux-amd64-32core
test-runs-on: electron-arc-linux-amd64-4core
build-runs-on: electron-arc-centralus-linux-amd64-32core
test-runs-on: electron-arc-centralus-linux-amd64-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/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
target-platform: linux
@@ -274,9 +345,10 @@ jobs:
pull-requests: read
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
needs: checkout-linux
if: ${{ needs.setup.outputs.src == 'true' }}
with:
build-runs-on: electron-arc-linux-amd64-32core
test-runs-on: electron-arc-linux-amd64-4core
build-runs-on: electron-arc-centralus-linux-amd64-32core
test-runs-on: electron-arc-centralus-linux-amd64-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/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
target-platform: linux
@@ -295,11 +367,12 @@ jobs:
pull-requests: read
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
needs: checkout-linux
if: ${{ needs.setup.outputs.src == 'true' }}
with:
build-runs-on: electron-arc-linux-amd64-32core
test-runs-on: electron-arc-linux-arm64-4core
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
@@ -315,9 +388,10 @@ jobs:
pull-requests: read
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
needs: checkout-linux
if: ${{ needs.setup.outputs.src == 'true' }}
with:
build-runs-on: electron-arc-linux-amd64-32core
test-runs-on: electron-arc-linux-arm64-4core
build-runs-on: electron-arc-centralus-linux-amd64-32core
test-runs-on: ubuntu-22.04-arm
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:arm64v8-${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
target-platform: linux
@@ -337,7 +411,7 @@ jobs:
needs: checkout-windows
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
with:
build-runs-on: electron-arc-windows-amd64-16core
build-runs-on: electron-arc-centralus-windows-amd64-16core
test-runs-on: windows-latest
target-platform: win
target-arch: x64
@@ -356,7 +430,7 @@ jobs:
needs: checkout-windows
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
with:
build-runs-on: electron-arc-windows-amd64-16core
build-runs-on: electron-arc-centralus-windows-amd64-16core
test-runs-on: windows-latest
target-platform: win
target-arch: x86
@@ -375,8 +449,8 @@ jobs:
needs: checkout-windows
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
with:
build-runs-on: electron-arc-windows-amd64-16core
test-runs-on: electron-hosted-windows-arm64-4core
build-runs-on: electron-arc-centralus-windows-amd64-16core
test-runs-on: windows-11-arm
target-platform: win
target-arch: arm64
is-release: false
@@ -388,6 +462,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-linux-amd64-32core
runs-on: electron-arc-centralus-linux-amd64-32core
permissions:
contents: read
container:
image: ghcr.io/electron/build:bc2f48b2415a670de18d13605b1cf0eb5fdbaae1
options: --user root

View File

@@ -10,15 +10,24 @@ permissions: {}
jobs:
issue-commented:
name: Remove blocked/{need-info,need-repro} on comment
if: ${{ (contains(github.event.issue.labels.*.name, 'blocked/need-repro') || contains(github.event.issue.labels.*.name, 'blocked/need-info ❌')) && !contains(fromJSON('["MEMBER", "OWNER", "COLLABORATOR"]'), github.event.comment.author_association) && github.event.comment.user.type != 'Bot' }}
if: ${{ (contains(github.event.issue.labels.*.name, 'blocked/need-repro') || contains(github.event.issue.labels.*.name, 'blocked/need-info ❌')) && github.event.comment.user.type != 'Bot' }}
runs-on: ubuntu-latest
steps:
- name: Get author association
id: get-author-association
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
AUTHOR_ASSOCIATION=$(gh api /repos/electron/electron/issues/comments/${{ github.event.comment.id }} --jq '.author_association')
echo "author_association=$AUTHOR_ASSOCIATION" >> "$GITHUB_OUTPUT"
- name: Generate GitHub App token
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
if: ${{ !contains(fromJSON('["MEMBER", "OWNER", "COLLABORATOR"]'), steps.get-author-association.outputs.author_association) }}
id: generate-token
with:
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
- name: Remove label
if: ${{ !contains(fromJSON('["MEMBER", "OWNER", "COLLABORATOR"]'), steps.get-author-association.outputs.author_association) }}
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
ISSUE_URL: ${{ github.event.issue.html_url }}

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
@@ -72,7 +75,7 @@ jobs:
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
- name: Create comment
if: ${{ steps.check-for-comment.outputs.SHOULD_COMMENT }}
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
uses: actions-cool/issues-helper@50068f49b7b2b3857270ead65e2d02e4459b022c # v3.6.2
with:
actions: 'create-comment'
token: ${{ steps.generate-token.outputs.token }}

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
@@ -134,7 +136,7 @@ jobs:
}
- name: Create unsupported major comment
if: ${{ steps.add-labels.outputs.unsupportedMajor }}
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
uses: actions-cool/issues-helper@50068f49b7b2b3857270ead65e2d02e4459b022c # v3.6.2
with:
actions: 'create-comment'
token: ${{ steps.generate-token.outputs.token }}

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: '424eedbf277ad9749ffa9219068aa72ed4a5e373'
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-linux-amd64-32core
runs-on: electron-arc-centralus-linux-amd64-32core
permissions:
contents: read
container:
image: ghcr.io/electron/build:${{ inputs.build-image-sha }}
options: --user root
@@ -40,48 +44,51 @@ jobs:
publish-x64:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
permissions:
contents: read
needs: checkout-linux
with:
environment: production-release
build-runs-on: electron-arc-linux-amd64-32core
build-runs-on: electron-arc-centralus-linux-amd64-32core
build-container: '{"image":"ghcr.io/electron/build:${{ inputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
target-platform: linux
target-arch: x64
is-release: true
gn-build-type: release
generate-symbols: true
strip-binaries: true
upload-to-storage: ${{ inputs.upload-to-storage }}
secrets: inherit
publish-arm:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
permissions:
contents: read
needs: checkout-linux
with:
environment: production-release
build-runs-on: electron-arc-linux-amd64-32core
build-runs-on: electron-arc-centralus-linux-amd64-32core
build-container: '{"image":"ghcr.io/electron/build:${{ inputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
target-platform: linux
target-arch: arm
is-release: true
gn-build-type: release
generate-symbols: true
strip-binaries: true
upload-to-storage: ${{ inputs.upload-to-storage }}
secrets: inherit
publish-arm64:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
permissions:
contents: read
needs: checkout-linux
with:
environment: production-release
build-runs-on: electron-arc-linux-amd64-32core
build-runs-on: electron-arc-centralus-linux-amd64-32core
build-container: '{"image":"ghcr.io/electron/build:${{ inputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
target-platform: linux
target-arch: arm64
is-release: true
gn-build-type: release
generate-symbols: true
strip-binaries: true
upload-to-storage: ${{ inputs.upload-to-storage }}
secrets: inherit

View File

@@ -6,7 +6,7 @@ on:
build-image-sha:
type: string
description: 'SHA for electron/build image'
default: '424eedbf277ad9749ffa9219068aa72ed4a5e373'
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-linux-amd64-32core
runs-on: electron-arc-centralus-linux-amd64-32core
permissions:
contents: read
container:
image: ghcr.io/electron/build:${{ inputs.build-image-sha }}
options: --user root
@@ -44,10 +48,12 @@ jobs:
publish-x64-darwin:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
permissions:
contents: read
needs: checkout-macos
with:
environment: production-release
build-runs-on: macos-14-xlarge
build-runs-on: macos-15-xlarge
target-platform: macos
target-arch: x64
target-variant: darwin
@@ -59,10 +65,12 @@ jobs:
publish-x64-mas:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
permissions:
contents: read
needs: checkout-macos
with:
environment: production-release
build-runs-on: macos-14-xlarge
build-runs-on: macos-15-xlarge
target-platform: macos
target-arch: x64
target-variant: mas
@@ -74,10 +82,12 @@ jobs:
publish-arm64-darwin:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
permissions:
contents: read
needs: checkout-macos
with:
environment: production-release
build-runs-on: macos-14-xlarge
build-runs-on: macos-15-xlarge
target-platform: macos
target-arch: arm64
target-variant: darwin
@@ -89,10 +99,12 @@ jobs:
publish-arm64-mas:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
permissions:
contents: read
needs: checkout-macos
with:
environment: production-release
build-runs-on: macos-14-xlarge
build-runs-on: macos-15-xlarge
target-platform: macos
target-arch: arm64
target-variant: mas

View File

@@ -1,30 +1,42 @@
name: Check for Non-Maintainer Dependency Change
name: Check for Disallowed Non-Maintainer Change
on:
pull_request_target:
paths:
- 'yarn.lock'
- 'spec/yarn.lock'
- '.github/workflows/**'
- '.github/actions/**'
- '.yarn/**'
- '.yarnrc.yml'
permissions: {}
jobs:
check-for-non-maintainer-dependency-change:
name: Check for non-maintainer dependency change
if: ${{ !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.pull_request.author_association) && github.event.pull_request.user.type != 'Bot' && !github.event.pull_request.draft }}
name: Check for disallowed non-maintainer change
if: ${{ github.event.pull_request.user.type != 'Bot' && !github.event.pull_request.draft }}
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Get author association
id: get-author-association
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
AUTHOR_ASSOCIATION=$(gh api /repos/electron/electron/pulls/${{ github.event.pull_request.number }} --jq '.author_association')
echo "author_association=$AUTHOR_ASSOCIATION" >> "$GITHUB_OUTPUT"
- name: Check for existing review
id: check-for-review
if: ${{ !contains(fromJSON('["MEMBER", "OWNER"]'), steps.get-author-association.outputs.author_association) }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}
run: |
set -eo pipefail
REVIEW_COUNT=$(gh pr view $PR_URL --json reviews | jq '[ .reviews[] | select(.author.login == "github-actions") | select(.body | startswith("<!-- no-dependency-change -->")) ] | length')
REVIEW_COUNT=$(gh pr view $PR_URL --json reviews | jq '[ .reviews[] | select(.author.login == "github-actions") | select(.body | startswith("<!-- disallowed-non-maintainer-change -->")) ] | length')
if [[ $REVIEW_COUNT -eq 0 ]]; then
echo "SHOULD_REVIEW=1" >> "$GITHUB_OUTPUT"
fi
@@ -34,4 +46,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}
run: |
printf "<!-- no-dependency-change -->\n\nHello @${{ github.event.pull_request.user.login }}! It looks like this pull request touches one of our dependency files, and per [our contribution policy](https://github.com/electron/electron/blob/main/CONTRIBUTING.md#dependencies-upgrades-policy) we do not accept these types of changes in PRs." | gh pr review $PR_URL -r --body-file=-
printf "<!-- disallowed-non-maintainer-change -->\n\nHello @${{ github.event.pull_request.user.login }}! It looks like this pull request touches one of our dependency or CI files, and per [our contribution policy](https://github.com/electron/electron/blob/main/CONTRIBUTING.md#dependencies-upgrades-policy) we do not accept these types of changes in PRs." | gh pr review $PR_URL -r --body-file=-

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

@@ -54,19 +54,23 @@ on:
required: false
type: boolean
default: false
enable-ssh:
description: 'Enable SSH debugging'
required: false
type: boolean
default: false
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 }}
@@ -76,15 +80,21 @@ jobs:
gn-build-type: ${{ inputs.gn-build-type }}
generate-symbols: ${{ inputs.generate-symbols }}
upload-to-storage: ${{ inputs.upload-to-storage }}
is-asan: ${{ inputs.is-asan}}
is-asan: ${{ inputs.is-asan }}
enable-ssh: ${{ inputs.enable-ssh }}
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 }}
target-platform: ${{ inputs.target-platform }}
test-runs-on: ${{ inputs.test-runs-on }}
test-container: ${{ inputs.test-container }}
is-asan: ${{ inputs.is-asan}}
is-asan: ${{ inputs.is-asan }}
enable-ssh: ${{ inputs.enable-ssh }}
secrets: inherit

View File

@@ -8,17 +8,40 @@ 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
env:
GCLIENT_EXTRA_ARGS: --custom-var=checkout_arm=True --custom-var=checkout_arm64=True
jobs:
docs-only:
name: Docs Only Compile
runs-on: electron-arc-linux-amd64-4core
runs-on: electron-arc-centralus-linux-amd64-4core
permissions:
contents: read
timeout-minutes: 20
container: ${{ fromJSON(inputs.container) }}
steps:
- name: Checkout Electron
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
path: src/electron
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- 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 AKS
uses: ./src/electron/.github/actions/restore-cache-aks
with:
target-platform: linux
- name: Checkout Electron
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
@@ -31,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 }}
@@ -18,7 +20,9 @@ env:
jobs:
lint:
name: Lint
runs-on: electron-arc-linux-amd64-4core
runs-on: electron-arc-centralus-linux-amd64-4core
permissions:
contents: read
timeout-minutes: 20
container: ${{ fromJSON(inputs.container) }}
steps:
@@ -74,11 +78,11 @@ 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

View File

@@ -48,17 +48,18 @@ on:
required: true
type: string
default: '0'
strip-binaries:
description: 'Strip the binaries before release (Linux only)'
required: false
type: boolean
default: false
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 }}
@@ -67,6 +68,7 @@ concurrency:
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 }}
@@ -81,10 +83,13 @@ jobs:
run:
shell: bash
runs-on: ${{ inputs.build-runs-on }}
permissions:
contents: read
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: |
@@ -96,14 +101,16 @@ jobs:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup SSH Debugging
if: ${{ inputs.target-platform == 'macos' && env.ACTIONS_STEP_DEBUG == 'true' }}
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_TOKEN: ${{ secrets.CLOUDFLARE_TUNNEL_TOKEN }}
TUNNEL_HOSTNAME: ${{ secrets.CLOUDFLARED_SSH_HOSTNAME }}
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
@@ -170,7 +177,7 @@ jobs:
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 }}
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}]"
@@ -180,9 +187,6 @@ jobs:
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: Setup Number of Ninja Processes
run: |
echo "NUMBER_OF_NINJA_PROCESSES=${{ inputs.target-platform != 'macos' && '300' || '200' }}" >> $GITHUB_ENV
- name: Free up space (macOS)
if: ${{ inputs.target-platform == 'macos' }}
uses: ./src/electron/.github/actions/free-space-macos
@@ -195,7 +199,6 @@ jobs:
artifact-platform: ${{ inputs.target-platform == 'macos' && 'darwin' || inputs.target-platform }}
is-release: '${{ inputs.is-release }}'
generate-symbols: '${{ inputs.generate-symbols }}'
strip-binaries: '${{ inputs.strip-binaries }}'
upload-to-storage: '${{ inputs.upload-to-storage }}'
is-asan: '${{ inputs.is-asan }}'
- name: Set GN_EXTRA_ARGS for MAS Build

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

@@ -25,15 +25,17 @@ on:
required: false
type: boolean
default: false
enable-ssh:
description: 'Enable SSH debugging'
required: false
type: boolean
default: false
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 }}
@@ -48,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
@@ -63,21 +69,6 @@ jobs:
if: ${{ inputs.target-arch == 'arm' && inputs.target-platform == 'linux' }}
run: |
cp $(which node) /mnt/runner-externals/node20/bin/
- name: Install Git on Windows arm64 runners
if: ${{ inputs.target-arch == 'arm64' && inputs.target-platform == 'win' }}
shell: powershell
run: |
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco install -y --no-progress git.install --params "'/GitAndUnixToolsOnPath'"
choco install -y --no-progress git
choco install -y --no-progress python --version 3.11.9
choco install -y --no-progress visualstudio2022-workload-vctools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.ARM64"
echo "C:\Program Files\Git\cmd" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "C:\Program Files\Git\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "C:\Python311" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
cp "C:\Python311\python.exe" "C:\Python311\python3.exe"
- name: Setup Node.js/npm
if: ${{ inputs.target-platform == 'win' }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
@@ -86,6 +77,7 @@ jobs:
- name: Add TCC permissions on macOS
if: ${{ inputs.target-platform == 'macos' }}
run: |
epochdate=$(($(date +'%s * 1000 + %-N / 1000000')))
configure_user_tccdb () {
local values=$1
local dbPath="$HOME/Library/Application Support/com.apple.TCC/TCC.db"
@@ -104,11 +96,14 @@ jobs:
"'kTCCServiceCamera','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
"'kTCCServiceBluetoothAlways','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
"'kTCCServiceAppleEvents','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
"'kTCCServiceCamera','/opt/hca/hosted-compute-agent',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
"'kTCCServiceBluetoothAlways','/opt/hca/hosted-compute-agent',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
"'kTCCServiceScreenCapture','/bin/bash',1,2,3,1,NULL,NULL,NULL,'UNUSED',NULL,0,$epochdate"
)
for values in "${userValuesArray[@]}"; do
# Sonoma and higher have a few extra values
# Ref: https://github.com/actions/runner-images/blob/main/images/macos/scripts/build/configure-tccdb-macos.sh
if [ "$OSTYPE" = "darwin23" ]; then
if [ "$OSTYPE" = "darwin23" ] || [ "$OSTYPE" = "darwin24" ]; then
configure_user_tccdb "$values,NULL,NULL,'UNUSED',${values##*,}"
configure_sys_tccdb "$values,NULL,NULL,'UNUSED',${values##*,}"
else
@@ -119,21 +114,32 @@ jobs:
- name: Turn off the unexpectedly quit dialog on macOS
if: ${{ inputs.target-platform == 'macos' }}
run: defaults write com.apple.CrashReporter DialogType server
- name: Set xcode to 16.4
if: ${{ inputs.target-platform == 'macos' }}
run: sudo xcode-select --switch /Applications/Xcode_16.4.app
- name: Checkout Electron
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
path: src/electron
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Turn off screenshot nag on macOS
if: ${{ inputs.target-platform == 'macos' }}
run: |
defaults write ~/Library/Group\ Containers/group.com.apple.replayd/ScreenCaptureApprovals.plist "/bin/bash" -date "3024-09-23 12:00:00 +0000"
src/electron/script/actions/screencapture-nag-remover.sh -a $(which bash)
src/electron/script/actions/screencapture-nag-remover.sh -a /opt/hca/hosted-compute-agent
- name: Setup SSH Debugging
if: ${{ inputs.target-platform == 'macos' && env.ACTIONS_STEP_DEBUG == 'true' }}
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_TOKEN: ${{ secrets.CLOUDFLARE_TUNNEL_TOKEN }}
TUNNEL_HOSTNAME: ${{ secrets.CLOUDFLARED_SSH_HOSTNAME }}
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: Install Dependencies
uses: ./src/electron/.github/actions/install-dependencies
- name: Set Chromium Git Cookie
@@ -147,6 +153,7 @@ jobs:
git config --global core.fscache true
git config --global core.longpaths true
git config --global core.preloadindex true
git config --global core.longpaths true
git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
# Ensure depot_tools does not update.
test -d depot_tools && cd depot_tools
@@ -160,43 +167,36 @@ jobs:
echo "DISABLE_CRASH_REPORTER_TESTS=true" >> $GITHUB_ENV
echo "IS_ASAN=true" >> $GITHUB_ENV
- name: Download Generated Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
with:
name: generated_artifacts_${{ env.ARTIFACT_KEY }}
path: ./generated_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}
- name: Download Src Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
with:
name: src_artifacts_${{ env.ARTIFACT_KEY }}
path: ./src_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}
- name: Restore Generated Artifacts
run: ./src/electron/script/actions/restore-artifacts.sh
- name: Unzip Dist, Mksnapshot & Chromedriver (win)
- name: Unzip Dist (win)
if: ${{ inputs.target-platform == 'win' }}
shell: powershell
run: |
Set-ExecutionPolicy Bypass -Scope Process -Force
cd src/out/Default
Expand-Archive -Force dist.zip -DestinationPath ./
Expand-Archive -Force chromedriver.zip -DestinationPath ./
Expand-Archive -Force mksnapshot.zip -DestinationPath ./
- name: Unzip Dist, Mksnapshot & Chromedriver (unix)
- name: Unzip Dist (unix)
if: ${{ inputs.target-platform != 'win' }}
run: |
cd src/out/Default
unzip -:o dist.zip
unzip -:o chromedriver.zip
unzip -:o mksnapshot.zip
- name: Import & Trust Self-Signed Codesigning Cert on MacOS
if: ${{ inputs.target-platform == 'macos' && inputs.target-arch == 'x64' }}
run: |
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: Import & Trust Self-Signed Codesigning Cert on MacOS
# if: ${{ inputs.target-platform == 'macos' && inputs.target-arch == 'x64' }}
# run: |
# sudo security authorizationdb write com.apple.trust-settings.admin allow
# cd src/electron
# ./script/codesign/generate-identity.sh
- name: Run Electron Tests
shell: bash
env:
@@ -222,7 +222,7 @@ jobs:
export ELECTRON_FORCE_TEST_SUITE_EXIT="true"
fi
fi
node script/yarn test --runners=main --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 .
@@ -239,9 +239,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
@@ -253,9 +258,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 }}
@@ -38,7 +40,9 @@ env:
jobs:
node-tests:
name: Run Node.js Tests
runs-on: electron-arc-linux-amd64-8core
runs-on: electron-arc-centralus-linux-amd64-8core
permissions:
contents: read
timeout-minutes: 30
env:
TARGET_ARCH: ${{ inputs.target-arch }}
@@ -61,12 +65,12 @@ jobs:
- name: Install Dependencies
uses: ./src/electron/.github/actions/install-dependencies
- name: Download Generated Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
with:
name: generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
path: ./generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
- name: Download Src Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
with:
name: src_artifacts_linux_${{ env.TARGET_ARCH }}
path: ./src_artifacts_linux_${{ env.TARGET_ARCH }}
@@ -92,7 +96,9 @@ jobs:
done
nan-tests:
name: Run Nan Tests
runs-on: electron-arc-linux-amd64-4core
runs-on: electron-arc-centralus-linux-amd64-4core
permissions:
contents: read
timeout-minutes: 30
env:
TARGET_ARCH: ${{ inputs.target-arch }}
@@ -115,12 +121,12 @@ jobs:
- name: Install Dependencies
uses: ./src/electron/.github/actions/install-dependencies
- name: Download Generated Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
with:
name: generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
path: ./generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
- name: Download Src Artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0
with:
name: src_artifacts_linux_${{ env.TARGET_ARCH }}
path: ./src_artifacts_linux_${{ env.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
@@ -19,12 +20,16 @@ jobs:
webhook-type: webhook-trigger
payload: |
{
"url": "${{ github.event.pull_request.html_url }}"
"base_ref": ${{ toJSON(github.event.pull_request.base.ref) }},
"title": ${{ toJSON(github.event.pull_request.title) }},
"url": ${{ toJSON(github.event.pull_request.html_url) }},
"user": ${{ toJSON(github.event.pull_request.user.login) }}
}
pull-request-labeled-deprecation-review-complete:
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,69 @@
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:
contents: read
actions: write
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 job check for this PR
CHECK=$(gh pr checks "$PR_NUMBER" --json link,name,state,workflow --jq '[.[] | select(.workflow == "Build" and .name == "apply-patches")] | first')
if [ -z "$CHECK" ] || [ "$CHECK" = "null" ]; then
echo " No apply-patches job found for PR #${PR_NUMBER}"
continue
fi
STATE=$(echo "$CHECK" | jq -r '.state')
if [ "$STATE" = "SKIPPED" ]; then
echo " apply-patches job was skipped for PR #${PR_NUMBER} (no patches)"
continue
fi
LINK=$(echo "$CHECK" | jq -r '.link')
# 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
# Get the job database ID for the apply-patches job
JOB_ID=$(gh run view "$RUN_ID" --json jobs --jq '.jobs[] | select(.name == "apply-patches") | .databaseId')
if [ -z "$JOB_ID" ]; then
echo " Could not find apply-patches job ID for run: ${RUN_ID}"
continue
fi
gh run rerun "$RUN_ID" --job "$JOB_ID"
done

View File

@@ -50,6 +50,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
uses: github/codeql-action/upload-sarif@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.5
with:
sarif_file: results.sarif

View File

@@ -7,8 +7,7 @@ on:
- edited
- synchronize
permissions:
contents: read
permissions: {}
jobs:
main:
@@ -19,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: semantic-pull-request
uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3
uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:

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

@@ -6,7 +6,7 @@ on:
build-image-sha:
type: string
description: 'SHA for electron/build image'
default: '424eedbf277ad9749ffa9219068aa72ed4a5e373'
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-linux-amd64-32core
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
@@ -48,10 +52,12 @@ jobs:
publish-x64-win:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
permissions:
contents: read
needs: checkout-windows
with:
environment: production-release
build-runs-on: electron-arc-windows-amd64-16core
build-runs-on: electron-arc-centralus-windows-amd64-16core
target-platform: win
target-arch: x64
is-release: true
@@ -62,10 +68,12 @@ jobs:
publish-arm64-win:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
permissions:
contents: read
needs: checkout-windows
with:
environment: production-release
build-runs-on: electron-arc-windows-amd64-16core
build-runs-on: electron-arc-centralus-windows-amd64-16core
target-platform: win
target-arch: arm64
is-release: true
@@ -76,10 +84,12 @@ jobs:
publish-x86-win:
uses: ./.github/workflows/pipeline-segment-electron-build.yml
permissions:
contents: read
needs: checkout-windows
with:
environment: production-release
build-runs-on: electron-arc-windows-amd64-16core
build-runs-on: electron-arc-centralus-windows-amd64-16core
target-platform: win
target-arch: x86
is-release: true

2
.gitignore vendored
View File

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

2
.nvmrc
View File

@@ -1 +1 @@
20
22

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

155
BUILD.gn
View File

@@ -44,6 +44,7 @@ if (is_mac) {
if (is_linux) {
import("//build/config/linux/pkg_config.gni")
import("//electron/build/linux/strip_binary.gni")
import("//tools/generate_stubs/rules.gni")
pkg_config("gio_unix") {
@@ -452,7 +453,7 @@ source_set("electron_lib") {
"//components/certificate_transparency",
"//components/compose:buildflags",
"//components/embedder_support:user_agent",
"//components/input:input",
"//components/input",
"//components/language/core/browser",
"//components/net_log",
"//components/network_hints/browser",
@@ -485,7 +486,7 @@ source_set("electron_lib") {
"//net:extras",
"//net:net_resources",
"//printing/buildflags",
"//services/device/public/cpp/bluetooth:bluetooth",
"//services/device/public/cpp/bluetooth",
"//services/device/public/cpp/geolocation",
"//services/device/public/cpp/hid",
"//services/device/public/mojom",
@@ -518,6 +519,10 @@ source_set("electron_lib") {
"//v8:v8_libplatform",
]
if (v8_use_external_startup_data && use_v8_context_snapshot) {
deps += [ ":mksnapshot_checksum_gen" ]
}
public_deps = [
"//base",
"//base:i18n",
@@ -581,6 +586,11 @@ source_set("electron_lib") {
}
if (is_mac) {
# Disable C++ modules to resolve linking error when including MacOS SDK
# headers from third_party/electron_node/deps/uv/include/uv/darwin.h
# TODO(samuelmaddock): consider revisiting this in the future
use_libcxx_modules = false
deps += [
"//components/remote_cocoa/app_shim",
"//components/remote_cocoa/browser",
@@ -650,6 +660,7 @@ source_set("electron_lib") {
"//ui/events/devices/x11",
"//ui/events/platform/x11",
"//ui/gtk:gtk_config",
"//ui/linux:display_server_utils",
"//ui/linux:linux_ui",
"//ui/linux:linux_ui_factory",
"//ui/wm",
@@ -682,7 +693,7 @@ source_set("electron_lib") {
deps += [
"//components/app_launch_prefetch",
"//components/crash/core/app:crash_export_thunks",
"//ui/native_theme:native_theme_browser",
"//third_party/libxml:xml_writer",
"//ui/wm",
"//ui/wm/public",
]
@@ -727,7 +738,7 @@ source_set("electron_lib") {
"shell/common/extensions/api:extensions_features",
"//chrome/browser/resources:component_extension_resources",
"//components/guest_view/common:mojom",
"//components/update_client:update_client",
"//components/update_client",
"//components/zoom",
"//extensions/browser",
"//extensions/browser/api:api_provider",
@@ -772,6 +783,18 @@ source_set("electron_lib") {
}
}
action("mksnapshot_checksum_gen") {
script = "build/checksum_header.py"
outputs = [ "$target_gen_dir/snapshot_checksum.h" ]
inputs = [ "$root_out_dir/$v8_context_snapshot_filename" ]
args = rebase_path(inputs)
args += rebase_path(outputs)
deps = [ "//tools/v8_context_snapshot" ]
}
electron_paks("packed_resources") {
if (is_mac) {
output_dir = "$root_gen_dir/electron_repack"
@@ -815,7 +838,7 @@ if (is_mac) {
sources = []
public_deps = []
sources += [ "$root_out_dir/libffmpeg.dylib" ]
public_deps += [ "//third_party/ffmpeg:ffmpeg" ]
public_deps += [ "//third_party/ffmpeg" ]
outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}" ]
}
} else {
@@ -1230,7 +1253,7 @@ if (is_mac) {
}
if (use_v8_context_snapshot) {
public_deps = [ "//tools/v8_context_snapshot:v8_context_snapshot" ]
public_deps = [ "//tools/v8_context_snapshot" ]
}
if (is_linux) {
@@ -1409,6 +1432,18 @@ dist_zip("electron_dist_zip") {
":licenses",
]
if (is_linux) {
if (is_official_build) {
data_deps += [
":strip_chrome_crashpad_handler",
":strip_chrome_sandbox",
":strip_electron_binary",
":strip_libEGL_shlib",
":strip_libGLESv2_shlib",
":strip_libffmpeg_shlib",
":strip_libvk_swiftshader_shlib",
]
}
data_deps += [ "//sandbox/linux:chrome_sandbox" ]
}
deps = data_deps
@@ -1454,6 +1489,16 @@ group("electron_mksnapshot") {
dist_zip("electron_mksnapshot_zip") {
data_deps = mksnapshot_deps
if (is_linux && is_official_build) {
data_deps += [
":strip_libEGL_shlib",
":strip_libGLESv2_shlib",
":strip_libffmpeg_shlib",
":strip_libvk_swiftshader_shlib",
":strip_mksnapshot_binary",
":strip_v8_context_snapshot_generator_binary",
]
}
deps = data_deps
outputs = [ "$root_build_dir/mksnapshot.zip" ]
}
@@ -1578,3 +1623,101 @@ group("copy_node_headers") {
group("node_headers") {
public_deps = [ ":tar_node_headers" ]
}
group("testing_build") {
public_deps = [
":electron_dist_zip",
":electron_mksnapshot_zip",
":node_headers",
]
}
group("release_build") {
public_deps = [ ":testing_build" ]
if (is_official_build) {
public_deps += [ ":electron_symbols" ]
}
if (is_linux) {
public_deps += [
":hunspell_dictionaries_zip",
":libcxx_headers_zip",
":libcxx_objects_zip",
":libcxxabi_headers_zip",
]
}
}
if (is_linux && is_official_build) {
strip_binary("strip_electron_binary") {
binary_input = "$root_out_dir/$electron_project_name"
symbol_output = "$root_out_dir/debug/$electron_project_name.debug"
compress_debug_sections = true
deps = [ ":electron_app" ]
}
strip_binary("strip_chrome_crashpad_handler") {
binary_input = "$root_out_dir/chrome_crashpad_handler"
symbol_output = "$root_out_dir/debug/chrome_crashpad_handler.debug"
compress_debug_sections = true
deps = [ "//components/crash/core/app:chrome_crashpad_handler" ]
}
strip_binary("strip_chrome_sandbox") {
binary_input = "$root_out_dir/chrome_sandbox"
symbol_output = "$root_out_dir/debug/chrome-sandbox.debug"
compress_debug_sections = true
deps = [ "//sandbox/linux:chrome_sandbox" ]
}
strip_binary("strip_libEGL_shlib") {
binary_input = "$root_out_dir/libEGL.so"
symbol_output = "$root_out_dir/debug/libEGL.so.debug"
compress_debug_sections = true
deps = [ "//third_party/angle:libEGL" ]
}
strip_binary("strip_libGLESv2_shlib") {
binary_input = "$root_out_dir/libGLESv2.so"
symbol_output = "$root_out_dir/debug/libGLESv2.so.debug"
compress_debug_sections = true
deps = [ "//third_party/angle:libGLESv2" ]
}
strip_binary("strip_libffmpeg_shlib") {
binary_input = "$root_out_dir/libffmpeg.so"
symbol_output = "$root_out_dir/debug/libffmpeg.so.debug"
compress_debug_sections = true
deps = [ "//third_party/ffmpeg" ]
}
strip_binary("strip_libvk_swiftshader_shlib") {
binary_input = "$root_out_dir/libvk_swiftshader.so"
symbol_output = "$root_out_dir/debug/libvk_swiftshader.so.debug"
compress_debug_sections = true
deps = [ "//third_party/swiftshader/src/Vulkan:swiftshader_libvulkan" ]
}
strip_binary("strip_mksnapshot_binary") {
_binary_path = rebase_path(
get_label_info(
":v8_context_snapshot_generator($v8_snapshot_toolchain)",
"root_out_dir") + "/mksnapshot",
root_build_dir)
binary_input = "$root_out_dir/$_binary_path"
symbol_output = "$root_out_dir/debug/${_binary_path}.debug"
compress_debug_sections = true
deps = mksnapshot_deps
}
strip_binary("strip_v8_context_snapshot_generator_binary") {
_binary_path = rebase_path(
get_label_info(
":v8_context_snapshot_generator($v8_snapshot_toolchain)",
"root_out_dir") + "/v8_context_snapshot_generator",
root_build_dir)
binary_input = "$root_out_dir/$_binary_path"
symbol_output = "$root_out_dir/debug/${_binary_path}.debug"
compress_debug_sections = true
deps = mksnapshot_deps
}
}

9
DEPS
View File

@@ -2,9 +2,9 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'140.0.7312.0',
'142.0.7444.265',
'node_version':
'v22.17.1',
'v22.22.0',
'nan_version':
'e14bdcd1f72d62bca1d541b66da43130384ec213',
'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,9 +37,9 @@ 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 20.04. They have also been verified to work on:
* 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
* Fedora 32 and newer
* Debian 10 and newer

View File

@@ -2,7 +2,7 @@ is_electron_build = true
root_extra_deps = [ "//electron" ]
# Registry of NMVs --> https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json
node_module_version = 139
node_module_version = 140
v8_promise_internal_field_count = 1
v8_embedder_string = "-electron.0"
@@ -19,15 +19,15 @@ proprietary_codecs = true
enable_printing = true
# Refs https://chromium-review.googlesource.com/c/chromium/src/+/6986517
# CI is using MacOS 15.5 which doesn't have the required modulemaps.
use_clang_modules = false
# Removes DLLs from the build, which are only meant to be used for Chromium development.
# See https://github.com/electron/electron/pull/17985
angle_enable_vulkan_validation_layers = false
dawn_enable_vulkan_validation_layers = false
# Removes dxc dll's that are only used experimentally.
# See https://bugs.chromium.org/p/chromium/issues/detail?id=1474897
dawn_use_built_dxc = false
# These are disabled because they cause the zip manifest to differ between
# testing and release builds.
# See https://chromium-review.googlesource.com/c/chromium/src/+/2774898.
@@ -70,6 +70,8 @@ v8_expose_public_symbols = true
# sensitive content by enterprise users.
enterprise_cloud_content_analysis = false
# Disable siso until we are ready to use it.
# https://chromium-review.googlesource.com/c/chromium/src/+/6638830
use_siso = false
# We don't use anything from here, and it causes target collisions
enable_linux_installer = false
# Disable "Save to Drive" feature in PDF viewer
enable_pdf_save_to_drive = false

37
build/checksum_header.py Normal file
View File

@@ -0,0 +1,37 @@
#!/usr/bin/env python3
import os
import sys
import hashlib
dir_path = os.path.dirname(os.path.realpath(__file__))
TEMPLATE_H = """
#ifndef ELECTRON_SNAPSHOT_CHECKSUM_H_
#define ELECTRON_SNAPSHOT_CHECKSUM_H_
namespace electron::snapshot_checksum {
inline constexpr std::string_view kChecksum = "{checksum}";
} // namespace electron::snapshot_checksum
#endif // ELECTRON_SNAPSHOT_CHECKSUM_H_
"""
def calculate_sha256(filepath):
sha256_hash = hashlib.sha256()
with open(filepath, "rb") as f:
for byte_block in iter(lambda: f.read(4096), b""):
sha256_hash.update(byte_block)
return sha256_hash.hexdigest()
input_file = sys.argv[1]
output_file = sys.argv[2]
checksum = calculate_sha256(input_file)
checksum_h = TEMPLATE_H.replace("{checksum}", checksum)
with open(output_file, 'w') as f:
f.write(checksum_h)

View File

@@ -0,0 +1,70 @@
# Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This has been adapted from https://source.chromium.org/chromium/chromium/src/+/main:build/linux/strip_binary.gni;drc=c220a41e0422d45f1657c28146d32e99cc53640b
# The notable difference is it has an option to compress the debug sections
import("//build/config/clang/clang.gni")
import("//build/toolchain/toolchain.gni")
# Extracts symbols from a binary into a symbol file.
#
# Args:
# binary_input: Path to the binary containing symbols to extract, e.g.:
# "$root_out_dir/chrome"
# symbol_output: Desired output file for symbols, e.g.:
# "$root_out_dir/chrome.debug"
# stripped_binary_output: Desired output file for stripped file, e.g.:
# "$root_out_dir/chrome.stripped"
# compress_debug_sections: If true, compress the extracted debug sections
template("strip_binary") {
forward_variables_from(invoker,
[
"deps",
"testonly",
])
action("${target_name}") {
llvm_strip_binary = "${clang_base_path}/bin/llvm-strip"
llvm_objcopy_binary = "${clang_base_path}/bin/llvm-objcopy"
script = "//electron/build/linux/strip_binary.py"
if (defined(invoker.stripped_binary_output)) {
stripped_binary_output = invoker.stripped_binary_output
} else {
stripped_binary_output = invoker.binary_input + ".stripped"
}
if (defined(invoker.symbol_output)) {
symbol_output = invoker.symbol_output
} else {
symbol_output = invoker.binary_input + ".debug"
}
inputs = [
invoker.binary_input,
llvm_strip_binary,
llvm_objcopy_binary,
]
outputs = [
symbol_output,
stripped_binary_output,
]
args = [
"--llvm-strip-binary-path",
rebase_path(llvm_strip_binary, root_build_dir),
"--llvm-objcopy-binary-path",
rebase_path(llvm_objcopy_binary, root_build_dir),
"--symbol-output",
rebase_path(symbol_output, root_build_dir),
"--stripped-binary-output",
rebase_path(stripped_binary_output, root_build_dir),
"--binary-input",
rebase_path(invoker.binary_input, root_build_dir),
]
if (defined(invoker.compress_debug_sections) &&
invoker.compress_debug_sections) {
args += [ "--compress-debug-sections" ]
}
}
}

View File

@@ -0,0 +1,63 @@
#!/usr/bin/env python3
#
# Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# This has been adapted from https://source.chromium.org/chromium/chromium/src/+/main:build/linux/strip_binary.py;drc=c220a41e0422d45f1657c28146d32e99cc53640b
# The notable difference is it has an option to compress the debug sections
import argparse
import subprocess
import sys
def main() -> int:
parser = argparse.ArgumentParser(description="Strip binary using LLVM tools.")
parser.add_argument("--llvm-strip-binary-path",
help="Path to llvm-strip executable.")
parser.add_argument("--llvm-objcopy-binary-path",
required=True,
help="Path to llvm-objcopy executable.")
parser.add_argument("--binary-input", help="Input ELF binary.")
parser.add_argument("--symbol-output",
help="File to write extracted debug info (.debug).")
parser.add_argument("--compress-debug-sections",
action="store_true",
help="Compress extracted debug info.")
parser.add_argument("--stripped-binary-output",
help="File to write stripped binary.")
args = parser.parse_args()
# Replicate the behavior of:
# eu-strip <binary_input> -o <stripped_binary_output> -f <symbol_output>
objcopy_args = [
"--only-keep-debug",
args.binary_input,
args.symbol_output,
]
if args.compress_debug_sections:
objcopy_args.insert(0, "--compress-debug-sections")
subprocess.check_output([args.llvm_objcopy_binary_path] + objcopy_args)
subprocess.check_output([
args.llvm_strip_binary_path,
"--strip-debug",
"--strip-unneeded",
"-o",
args.stripped_binary_output,
args.binary_input,
])
subprocess.check_output([
args.llvm_objcopy_binary_path,
f"--add-gnu-debuglink={args.symbol_output}",
args.stripped_binary_output,
])
return 0
if __name__ == "__main__":
sys.exit(main())

View File

@@ -3,7 +3,7 @@
load("@builtin//struct.star", "module")
def __platform_properties(ctx):
container_image = "docker://gcr.io/chops-public-images-prod/rbe/siso-chromium/linux@sha256:ef35d347f4a4a2d32b76fd908e66e96f59bf8ba7379fd5626548244c45343b2b"
container_image = "docker://gcr.io/chops-public-images-prod/rbe/siso-chromium/linux@sha256:d7cb1ab14a0f20aa669c23f22c15a9dead761dcac19f43985bf9dd5f41fbef3a"
return {
"default": {
"OSFamily": "Linux",

66
build/siso/main.star Normal file
View File

@@ -0,0 +1,66 @@
load("@builtin//encoding.star", "json")
load("@builtin//path.star", "path")
load("@builtin//runtime.star", "runtime")
load("@builtin//struct.star", "module")
load("@config//main.star", upstream_init = "init")
load("@config//win_sdk.star", "win_sdk")
load("@config//gn_logs.star", "gn_logs")
def init(ctx):
mod = upstream_init(ctx)
step_config = json.decode(mod.step_config)
# Buildbarn doesn't support input_root_absolute_path so disable that
for rule in step_config["rules"]:
input_root_absolute_path = rule.get("input_root_absolute_path", False)
if input_root_absolute_path:
rule.pop("input_root_absolute_path", None)
# Only wrap clang rules with a remote wrapper if not on Linux. These are currently only
# needed for X-Compile builds, which run on Windows and Mac.
if runtime.os != "linux":
for rule in step_config["rules"]:
if rule["name"].startswith("clang/") or rule["name"].startswith("clang-cl/"):
rule["remote_wrapper"] = "../../buildtools/reclient_cfgs/chromium-browser-clang/clang_remote_wrapper"
if "inputs" not in rule:
rule["inputs"] = []
rule["inputs"].append("buildtools/reclient_cfgs/chromium-browser-clang/clang_remote_wrapper")
rule["inputs"].append("third_party/llvm-build/Release+Asserts_linux/bin/clang")
if "executables" not in step_config:
step_config["executables"] = []
step_config["executables"].append("buildtools/reclient_cfgs/chromium-browser-clang/clang_remote_wrapper")
step_config["executables"].append("third_party/llvm-build/Release+Asserts_linux/bin/clang")
if runtime.os == "darwin":
# Update platforms to match our default siso config instead of reclient configs.
step_config["platforms"].update({
"clang": step_config["platforms"]["default"],
"clang_large": step_config["platforms"]["default"],
})
if runtime.os == "windows":
# Add additional Windows SDK headers needed by Electron
win_toolchain_dir = win_sdk.toolchain_dir(ctx)
if win_toolchain_dir:
sdk_version = gn_logs.read(ctx).get("windows_sdk_version")
step_config["input_deps"][win_toolchain_dir + ":headers"].extend([
# third_party/electron_node/deps/uv/include/uv/win.h includes mswsock.h
path.join(win_toolchain_dir, "Windows Kits/10/Include", sdk_version, "um/mswsock.h"),
# third_party/electron_node/src/debug_utils.cc includes lm.h
path.join(win_toolchain_dir, "Windows Kits/10/Include", sdk_version, "um/Lm.h"),
])
# Update platforms to match our default siso config instead of reclient configs.
step_config["platforms"].update({
"clang-cl": step_config["platforms"]["default"],
"clang-cl_large": step_config["platforms"]["default"],
"lld-link": step_config["platforms"]["default"],
})
return module(
"config",
step_config = json.encode(step_config),
filegroups = mod.filegroups,
handlers = mod.handlers,
)

View File

@@ -121,6 +121,7 @@ if ((globalThis.process || binding.process).argv.includes("--profile-electron-in
'electron/main$': electronAPIFile,
'electron/renderer$': electronAPIFile,
'electron/common$': electronAPIFile,
'electron/utility$': electronAPIFile,
// Force timers to resolve to our dependency that doesn't use window.postMessage
timers: path.resolve(electronRoot, 'node_modules', 'timers-browserify', 'main.js')
},
@@ -143,7 +144,9 @@ if ((globalThis.process || binding.process).argv.includes("--profile-electron-in
transpileOnly: onlyPrintingGraph,
ignoreDiagnostics: [
// File '{0}' is not under 'rootDir' '{1}'.
6059
6059,
// Private field '{0}' must be declared in an enclosing class.
1111
]
}
}]

View File

@@ -41,6 +41,8 @@ PATHS_TO_SKIP = [
'resources/inspector',
'gen/third_party/devtools-frontend/src',
'gen/ui/webui',
# Skip because these get zipped separately in script/zip-symbols.py
'debug',
]
def skip_path(dep, dist_zip, target_cpu):
@@ -80,6 +82,11 @@ def main(argv):
dep = dep.strip()
if not skip_path(dep, dist_zip, target_cpu):
dist_files.add(dep)
# On Linux, filter out any files which have a .stripped companion
if sys.platform == 'linux':
dist_files = {
dep for dep in dist_files if f"{dep.removeprefix('./')}.stripped" not in dist_files
}
if sys.platform == 'darwin' and not should_flatten:
execute(['zip', '-r', '-y', dist_zip] + list(dist_files))
else:
@@ -96,10 +103,13 @@ def main(argv):
dirname = os.path.dirname(dep)
arcname = (
os.path.join(dirname, 'chrome-sandbox')
if basename == 'chrome_sandbox'
if basename.removesuffix('.stripped') == 'chrome_sandbox'
else dep
)
name_to_write = arcname
# On Linux, strip the .stripped suffix from the name before zipping
if sys.platform == 'linux':
name_to_write = name_to_write.removesuffix('.stripped')
if should_flatten:
if flatten_relative_to:
if name_to_write.startswith(flatten_relative_to):

View File

@@ -23,6 +23,8 @@ static_library("chrome") {
"//chrome/browser/browser_process.h",
"//chrome/browser/devtools/devtools_contents_resizing_strategy.cc",
"//chrome/browser/devtools/devtools_contents_resizing_strategy.h",
"//chrome/browser/devtools/devtools_dispatch_http_request_params.cc",
"//chrome/browser/devtools/devtools_dispatch_http_request_params.h",
"//chrome/browser/devtools/devtools_embedder_message_dispatcher.cc",
"//chrome/browser/devtools/devtools_embedder_message_dispatcher.h",
"//chrome/browser/devtools/devtools_eye_dropper.cc",
@@ -76,16 +78,8 @@ static_library("chrome") {
"//chrome/browser/picture_in_picture/scoped_picture_in_picture_occlusion_observation.h",
"//chrome/browser/platform_util.cc",
"//chrome/browser/platform_util.h",
"//chrome/browser/predictors/preconnect_manager.cc",
"//chrome/browser/predictors/preconnect_manager.h",
"//chrome/browser/predictors/preconnect_manager_impl.cc",
"//chrome/browser/predictors/preconnect_manager_impl.h",
"//chrome/browser/predictors/predictors_features.cc",
"//chrome/browser/predictors/predictors_features.h",
"//chrome/browser/predictors/proxy_lookup_client_impl.cc",
"//chrome/browser/predictors/proxy_lookup_client_impl.h",
"//chrome/browser/predictors/resolve_host_client_impl.cc",
"//chrome/browser/predictors/resolve_host_client_impl.h",
"//chrome/browser/process_singleton.h",
"//chrome/browser/process_singleton_internal.cc",
"//chrome/browser/process_singleton_internal.h",
@@ -136,6 +130,8 @@ static_library("chrome") {
"//chrome/browser/ui/views/overlay/overlay_controls_fade_animation.h",
"//chrome/browser/ui/views/overlay/overlay_window_image_button.cc",
"//chrome/browser/ui/views/overlay/overlay_window_image_button.h",
"//chrome/browser/ui/views/overlay/overlay_window_live_caption_button.cc",
"//chrome/browser/ui/views/overlay/overlay_window_live_caption_button.h",
"//chrome/browser/ui/views/overlay/playback_image_button.cc",
"//chrome/browser/ui/views/overlay/playback_image_button.h",
"//chrome/browser/ui/views/overlay/resize_handle_button.cc",
@@ -217,7 +213,7 @@ static_library("chrome") {
"//components/enterprise/common/proto:connectors_proto",
"//components/enterprise/obfuscation/core:enterprise_obfuscation",
"//components/safe_browsing/core/browser/db:safebrowsing_proto",
"//components/vector_icons:vector_icons",
"//components/vector_icons",
"//ui/base/accelerators/global_accelerator_listener",
"//ui/snapshot",
"//ui/views/controls/webview",

View File

@@ -421,6 +421,7 @@ Returns:
* `oom` - Process ran out of memory
* `launch-failed` - Process never successfully launched
* `integrity-failure` - Windows code integrity checks failed
* `memory-eviction` - Process proactively terminated to prevent a future out-of-memory (OOM) situation
* `exitCode` number - The exit code for the process
(e.g. status from waitpid if on POSIX, from GetExitCodeProcess on Windows).
* `serviceName` string (optional) - The non-localized name of the process.
@@ -564,8 +565,9 @@ and subscribing to the `ready` event if the app is not ready yet.
* `steal` boolean _macOS_ - Make the receiver the active app even if another app is
currently active.
On Linux, focuses on the first visible window. On macOS, makes the application
the active app. On Windows, focuses on the application's first window.
On macOS, makes the application the active app. On Windows, focuses on the application's
first window. On Linux, either focuses on the first visible window (X11) or requests
focus but may instead show a notification or flash the app icon (Wayland).
You should seek to use the `steal` option as sparingly as possible.
@@ -602,6 +604,7 @@ Returns `string` - The current application directory.
* `%APPDATA%` on Windows
* `$XDG_CONFIG_HOME` or `~/.config` on Linux
* `~/Library/Application Support` on macOS
* `assets` The directory where app assets such as `resources.pak` are stored. By default this is the same as the folder containing the `exe` path. Available on Windows and Linux only.
* `userData` The directory for storing your app's configuration files, which
by default is the `appData` directory appended with your app's name. By
convention files storing user data should be written to this directory, and
@@ -616,7 +619,7 @@ Returns `string` - The current application directory.
directory.
* `temp` Temporary directory.
* `exe` The current executable file.
* `module` The `libchromiumcontent` library.
* `module` The location of the Chromium module. By default this is synonymous with `exe`.
* `desktop` The current user's Desktop directory.
* `documents` Directory for a user's "My Documents".
* `downloads` Directory for a user's downloads.
@@ -776,6 +779,22 @@ bar, and on macOS, you can visit it from dock menu.
Clears the recent documents list.
### `app.getRecentDocuments()` _macOS_ _Windows_
Returns `string[]` - An array containing documents in the most recent documents list.
```js
const { app } = require('electron')
const path = require('node:path')
const file = path.join(app.getPath('desktop'), 'foo.txt')
app.addRecentDocument(file)
const recents = app.getRecentDocuments()
console.log(recents) // ['/path/to/desktop/foo.txt'}
```
### `app.setAsDefaultProtocolClient(protocol[, path, args])`
* `protocol` string - The name of your protocol, without `://`. For example,
@@ -1197,6 +1216,13 @@ Disables hardware acceleration for current app.
This method can only be called before app is ready.
### `app.isHardwareAccelerationEnabled()`
Returns `boolean` - whether hardware acceleration is currently enabled.
> [!NOTE]
> This information is only usable after the `gpu-info-update` event is emitted.
### `app.disableDomainBlockingFor3DAPIs()`
By default, Chromium disables 3D APIs (e.g. WebGL) until restart on a per
@@ -1380,7 +1406,75 @@ details. Disabled by default.
This API must be called after the `ready` event is emitted.
> [!NOTE]
> Rendering accessibility tree can significantly affect the performance of your app. It should not be enabled by default.
> Rendering accessibility tree can significantly affect the performance of your app. It should not be enabled by default. Calling this method will enable the following accessibility support features: `nativeAPIs`, `webContents`, `inlineTextBoxes`, and `extendedProperties`.
### `app.getAccessibilitySupportFeatures()` _macOS_ _Windows_
Returns `string[]` - Array of strings naming currently enabled accessibility support components. Possible values:
* `nativeAPIs` - Native OS accessibility APIs integration enabled.
* `webContents` - Web contents accessibility tree exposure enabled.
* `inlineTextBoxes` - Inline text boxes (character bounding boxes) enabled.
* `extendedProperties` - Extended accessibility properties enabled.
* `screenReader` - Screen reader specific mode enabled.
* `html` - HTML accessibility tree construction enabled.
* `labelImages` - Accessibility support for automatic image annotations.
* `pdfPrinting` - Accessibility support for PDF printing enabled.
Notes:
* The array may be empty if no accessibility modes are active.
* Use `app.isAccessibilitySupportEnabled()` for the legacy boolean check;
prefer this method for granular diagnostics or telemetry.
Example:
```js
const { app } = require('electron')
app.whenReady().then(() => {
if (app.getAccessibilitySupportFeatures().includes('screenReader')) {
// Change some app UI to better work with Screen Readers.
}
})
```
### `app.setAccessibilitySupportFeatures(features)` _macOS_ _Windows_
* `features` string[] - An array of the accessibility features to enable.
Possible values are:
* `nativeAPIs` - Native OS accessibility APIs integration enabled.
* `webContents` - Web contents accessibility tree exposure enabled.
* `inlineTextBoxes` - Inline text boxes (character bounding boxes) enabled.
* `extendedProperties` - Extended accessibility properties enabled.
* `screenReader` - Screen reader specific mode enabled.
* `html` - HTML accessibility tree construction enabled.
* `labelImages` - Accessibility support for automatic image annotations.
* `pdfPrinting` - Accessibility support for PDF printing enabled.
To disable all supported features, pass an empty array `[]`.
Example:
```js
const { app } = require('electron')
app.whenReady().then(() => {
// Enable a subset of features:
app.setAccessibilitySupportFeatures([
'screenReader',
'pdfPrinting',
'webContents'
])
// Other logic
// Some time later, disable all features:
app.setAccessibilitySupportFeatures([])
})
```
### `app.showAboutPanel()`

View File

@@ -1260,6 +1260,47 @@ Sets the properties for the window's taskbar button.
> `relaunchCommand` and `relaunchDisplayName` must always be set
> together. If one of those properties is not set, then neither will be used.
#### `win.setAccentColor(accentColor)` _Windows_
* `accentColor` boolean | string | null - The accent color for the window. By default, follows user preference in System Settings. To reset to system default, pass `null`.
Sets the system accent color and highlighting of active window border.
The `accentColor` parameter accepts the following values:
* **Color string** - Like `true`, but sets a custom accent color using standard CSS color formats (Hex, RGB, RGBA, HSL, HSLA, or named colors). Alpha values in RGBA/HSLA formats are ignored and the color is treated as fully opaque.
* **`true`** - Enable accent color highlighting for the window with the system accent color regardless of whether accent colors are enabled for windows in System `Settings.`
* **`false`** - Disable accent color highlighting for the window regardless of whether accent colors are currently enabled for windows in System Settings.
* **`null`** - Reset window accent color behavior to follow behavior set in System Settings.
Examples:
```js
const win = new BrowserWindow({ frame: false })
// Set red accent color.
win.setAccentColor('#ff0000')
// RGB format (alpha ignored if present).
win.setAccentColor('rgba(255,0,0,0.5)')
// Enable accent color, using the color specified in System Settings.
win.setAccentColor(true)
// Disable accent color.
win.setAccentColor(false)
// Reset window accent color behavior to follow behavior set in System Settings.
win.setAccentColor(null)
```
#### `win.getAccentColor()` _Windows_
Returns `string | boolean` - the system accent color and highlighting of active window border in Hex RGB format.
If a color has been set for the window that differs from the system accent color, the window accent color will
be returned. Otherwise, a boolean will be returned, with `true` indicating that the window uses the global system accent color, and `false` indicating that accent color highlighting is disabled for this window.
#### `win.setIcon(icon)` _Windows_ _Linux_
* `icon` [NativeImage](native-image.md) | string

View File

@@ -140,6 +140,10 @@ state is `hidden` in order to minimize power consumption.
move.
* On Linux the type of modal windows will be changed to `dialog`.
* On Linux many desktop environments do not support hiding a modal window.
* On Wayland (Linux) it is generally not possible to programmatically resize windows
after creation, or to position, move, focus, or blur windows without user input.
If your app needs these capabilities, run it in Xwayland by appending the flag
`--ozone-platform=x11`.
## Class: BrowserWindow extends `BaseWindow`
@@ -656,10 +660,15 @@ the [close event](#event-close).
Focuses on the window.
On Wayland (Linux), the desktop environment may show a notification or flash
the app icon if the window or app is not already focused.
#### `win.blur()`
Removes focus from the window.
Not supported on Wayland (Linux).
#### `win.isFocused()`
Returns `boolean` - Whether the window is focused.
@@ -676,6 +685,8 @@ Shows and gives focus to the window.
Shows the window but doesn't focus on it.
Not supported on Wayland (Linux).
#### `win.hide()`
Hides the window.
@@ -824,6 +835,8 @@ Closes the currently open [Quick Look][quick-look] panel.
Resizes and moves the window to the supplied bounds. Any properties that are not supplied will default to their current values.
On Wayland (Linux), has the same limitations as `setSize` and `setPosition`.
```js
const { BrowserWindow } = require('electron')
@@ -866,6 +879,8 @@ See [Setting `backgroundColor`](#setting-the-backgroundcolor-property).
Resizes and moves the window's client area (e.g. the web page) to
the supplied bounds.
On Wayland (Linux), has the same limitations as `setContentSize` and `setPosition`.
#### `win.getContentBounds()`
Returns [`Rectangle`](structures/rectangle.md) - The `bounds` of the window's client area as `Object`.
@@ -895,6 +910,8 @@ Returns `boolean` - whether the window is enabled.
Resizes the window to `width` and `height`. If `width` or `height` are below any set minimum size constraints the window will snap to its minimum size.
On Wayland (Linux), may not work as some window managers restrict programmatic window resizing.
#### `win.getSize()`
Returns `Integer[]` - Contains the window's width and height.
@@ -907,6 +924,8 @@ Returns `Integer[]` - Contains the window's width and height.
Resizes the window's client area (e.g. the web page) to `width` and `height`.
On Wayland (Linux), may not work as some window managers restrict programmatic window resizing.
#### `win.getContentSize()`
Returns `Integer[]` - Contains the window's client area's width and height.
@@ -1044,12 +1063,16 @@ this method throws an error.
#### `win.moveTop()`
Moves window to top(z-order) regardless of focus
Moves window to top(z-order) regardless of focus.
Not supported on Wayland (Linux).
#### `win.center()`
Moves window to the center of the screen.
Not supported on Wayland (Linux).
#### `win.setPosition(x, y[, animate])`
* `x` Integer
@@ -1058,6 +1081,8 @@ Moves window to the center of the screen.
Moves window to `x` and `y`.
Not supported on Wayland (Linux).
#### `win.getPosition()`
Returns `Integer[]` - Contains the window's current position.
@@ -1227,7 +1252,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).
@@ -1440,6 +1466,47 @@ Sets the properties for the window's taskbar button.
> `relaunchCommand` and `relaunchDisplayName` must always be set
> together. If one of those properties is not set, then neither will be used.
#### `win.setAccentColor(accentColor)` _Windows_
* `accentColor` boolean | string | null - The accent color for the window. By default, follows user preference in System Settings. To reset to system default, pass `null`.
Sets the system accent color and highlighting of active window border.
The `accentColor` parameter accepts the following values:
* **Color string** - Like `true`, but sets a custom accent color using standard CSS color formats (Hex, RGB, RGBA, HSL, HSLA, or named colors). Alpha values in RGBA/HSLA formats are ignored and the color is treated as fully opaque.
* **`true`** - Enable accent color highlighting for the window with the system accent color regardless of whether accent colors are enabled for windows in System `Settings.`
* **`false`** - Disable accent color highlighting for the window regardless of whether accent colors are currently enabled for windows in System Settings.
* **`null`** - Reset window accent color behavior to follow behavior set in System Settings.
Examples:
```js
const win = new BrowserWindow({ frame: false })
// Set red accent color.
win.setAccentColor('#ff0000')
// RGB format (alpha ignored if present).
win.setAccentColor('rgba(255,0,0,0.5)')
// Enable accent color, using the color specified in System Settings.
win.setAccentColor(true)
// Disable accent color.
win.setAccentColor(false)
// Reset window accent color behavior to follow behavior set in System Settings.
win.setAccentColor(null)
```
#### `win.getAccentColor()` _Windows_
Returns `string | boolean` - the system accent color and highlighting of active window border in Hex RGB format.
If a color has been set for the window that differs from the system accent color, the window accent color will
be returned. Otherwise, a boolean will be returned, with `true` indicating that the window uses the global system accent color, and `false` indicating that accent color highlighting is disabled for this window.
#### `win.showDefinitionForSelection()` _macOS_
Same as `webContents.showDefinitionForSelection()`.
@@ -1533,11 +1600,18 @@ events.
Prevents the window contents from being captured by other apps.
On macOS it sets the NSWindow's [`sharingType`](https://developer.apple.com/documentation/appkit/nswindow/sharingtype-swift.property?language=objc) to [`NSWindowSharingNone`](https://developer.apple.com/documentation/appkit/nswindow/sharingtype-swift.enum/none?language=objc).
On Windows it calls [`SetWindowDisplayAffinity`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowdisplayaffinity) with `WDA_EXCLUDEFROMCAPTURE`.
On Windows, it calls [`SetWindowDisplayAffinity`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowdisplayaffinity) with `WDA_EXCLUDEFROMCAPTURE`.
For Windows 10 version 2004 and up the window will be removed from capture entirely,
older Windows versions behave as if `WDA_MONITOR` is applied capturing a black window.
On macOS, it sets the `NSWindow`'s
[`sharingType`](https://developer.apple.com/documentation/appkit/nswindow/sharingtype-swift.property?language=objc)
to
[`NSWindowSharingNone`](https://developer.apple.com/documentation/appkit/nswindow/sharingtype-swift.enum/none?language=objc).
Unfortunately, due to an intentional change in macOS, newer Mac applications that use
`ScreenCaptureKit` will capture your window despite `win.setContentProtection(true)`.
See [here](https://github.com/electron/electron/issues/48258#issuecomment-3269893618).
#### `win.isContentProtected()` _macOS_ _Windows_
Returns `boolean` - whether or not content protection is currently enabled.

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

View File

@@ -4,6 +4,12 @@
Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process) (non-sandboxed only)
> [!IMPORTANT]
> If you want to call this API from a renderer process with context isolation enabled,
> 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.
On Linux, there is also a `selection` clipboard. To manipulate it
you need to pass `selection` to each method:

View File

@@ -86,7 +86,7 @@ Field trials to be forcefully enabled or disabled.
For example: `WebRTC-Audio-Red-For-Opus/Enabled/`
### --host-rules=`rules`
### --host-rules=`rules` _Deprecated_
A comma-separated list of `rules` that control how hostnames are mapped.
@@ -104,9 +104,23 @@ These mappings apply to the endpoint host in a net request (the TCP connect
and host resolver in a direct connection, and the `CONNECT` in an HTTP proxy
connection, and the endpoint host in a `SOCKS` proxy connection).
**Deprecated:** Use the `--host-resolver-rules` switch instead.
### --host-resolver-rules=`rules`
Like `--host-rules` but these `rules` only apply to the host resolver.
A comma-separated list of `rules` that control how hostnames are mapped.
For example:
* `MAP * 127.0.0.1` Forces all hostnames to be mapped to 127.0.0.1
* `MAP *.google.com proxy` Forces all google.com subdomains to be resolved to
"proxy".
* `MAP test.com [::1]:77` Forces "test.com" to resolve to IPv6 loopback. Will
also force the port of the resulting socket address to be 77.
* `MAP * baz, EXCLUDE www.google.com` Remaps everything to "baz", except for
"www.google.com".
These `rules` only apply to the host resolver.
### --ignore-certificate-errors

View File

@@ -157,6 +157,7 @@ has been included below for completeness:
| [Cloneable Types](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm) | Simple | ✅ | ✅ | See the linked document on cloneable types |
| `Element` | Complex | ✅ | ✅ | Prototype modifications are dropped. Sending custom elements will not work. |
| `Blob` | Complex | ✅ | ✅ | N/A |
| `VideoFrame` | Complex | ✅ | ✅ | N/A |
| `Symbol` | N/A | ❌ | ❌ | Symbols cannot be copied across contexts so they are dropped |
If the type you care about is not in the above table, it is probably not supported.

View File

@@ -4,6 +4,12 @@
Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process)
> [!IMPORTANT]
> If you want to call this API from a renderer process with context isolation enabled,
> 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.
The following is an example of setting up Electron to automatically submit
crash reports to a remote server:

View File

@@ -102,6 +102,10 @@ Returns `Promise<DesktopCapturerSource[]>` - Resolves with an array of [`Desktop
## Caveats
`desktopCapturer.getSources(options)` only returns a single source on Linux when using Pipewire.
PipeWire supports a single capture for both screens and windows. If you request the window and screen type, the selected source will be returned as a window capture.
`navigator.mediaDevices.getUserMedia` does not work on macOS for audio capture due to a fundamental limitation whereby apps that want to access the system's audio require a [signed kernel extension](https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/KernelExtensions/KernelExtensions.html). Chromium, and by extension Electron, does not provide this.
It is possible to circumvent this limitation by capturing system audio with another macOS app like Soundflower and passing it through a virtual audio input device. This virtual device can then be queried with `navigator.mediaDevices.getUserMedia`.

View File

@@ -125,16 +125,6 @@ Options:
* `kioclient5`
* `kioclient`
### `ELECTRON_OZONE_PLATFORM_HINT` _Linux_
Selects the preferred platform backend used on Linux. The default one is `x11`. `auto` selects Wayland if possible, X11 otherwise.
Options:
* `auto`
* `wayland`
* `x11`
## Development Variables
The following environment variables are intended primarily for development and
@@ -196,14 +186,3 @@ the one downloaded by `npm install`. Usage:
```sh
export ELECTRON_OVERRIDE_DIST_PATH=/Users/username/projects/electron/out/Testing
```
## Set By Electron
Electron sets some variables in your environment at runtime.
### `ORIGINAL_XDG_CURRENT_DESKTOP`
This variable is set to the value of `XDG_CURRENT_DESKTOP` that your application
originally launched with. Electron sometimes modifies the value of `XDG_CURRENT_DESKTOP`
to affect other logic within Chromium so if you want access to the _original_ value
you should look up this environment variable instead.

View File

@@ -20,6 +20,12 @@ changes:
Process: [Renderer](../glossary.md#renderer-process)
> [!IMPORTANT]
> If you want to call this API from a renderer process with context isolation enabled,
> 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.
The `ipcRenderer` module is an [EventEmitter][event-emitter]. It provides a few
methods so you can send synchronous and asynchronous messages from the render
process (web page) to the main process. You can also receive replies from the

View File

@@ -1,3 +1,5 @@
# MenuItem
## Class: MenuItem
> Add items to native application menus and context menus.
@@ -32,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.

View File

@@ -4,6 +4,12 @@
Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process)
> [!IMPORTANT]
> If you want to call this API from a renderer process with context isolation enabled,
> 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.
The `nativeImage` module provides a unified interface for manipulating
system images. These can be handy if you want to provide multiple scaled
versions of the same icon or take advantage of macOS [template images][template-image].
@@ -196,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:
@@ -225,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

@@ -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.
@@ -211,6 +211,10 @@ Returns `Object`:
system.
* `free` Integer - The total amount of memory not being used by applications or disk
cache.
* `fileBacked` Integer _macOS_ - The amount of memory that currently has been paged out to storage.
Includes memory for file caches, network buffers, and other system services.
* `purgeable` Integer _macOS_ - The amount of memory that is marked as "purgeable". The system can reclaim it
if memory pressure increases.
* `swapTotal` Integer _Windows_ _Linux_ - The total amount of swap memory in Kilobytes available to the
system.
* `swapFree` Integer _Windows_ _Linux_ - The free amount of swap memory in Kilobytes available to the

View File

@@ -1,11 +1,7 @@
# ServiceWorkerMain
## Class: ServiceWorkerMain
> An instance of a Service Worker representing a version of a script for a given scope.
Process: [Main](../glossary.md#main-process)
## Class: ServiceWorkerMain
Process: [Main](../glossary.md#main-process)<br />
_This class is not exported from the `'electron'` module. It is only available as a return value of other methods in the Electron API._

View File

@@ -939,14 +939,18 @@ session.fromPartition('some-partition').setPermissionRequestHandler((webContents
* `top-level-storage-access` - Allow top-level sites to request third-party cookie access on behalf of embedded content originating from another site in the same related website set using the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).
* `usb` - Expose non-standard Universal Serial Bus (USB) compatible devices services to the web with the [WebUSB API](https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API).
* `deprecated-sync-clipboard-read` _Deprecated_ - Request access to run `document.execCommand("paste")`
* `fileSystem` - Access to read, write, and file management capabilities using the [File System API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API).
* `requestingOrigin` string - The origin URL of the permission check
* `details` Object - Some properties are only available on certain permission types.
* `embeddingOrigin` string (optional) - The origin of the frame embedding the frame that made the permission check. Only set for cross-origin sub frames making permission checks.
* `securityOrigin` string (optional) - The security origin of the `media` check.
* `mediaType` string (optional) - The type of media access being requested, can be `video`,
`audio` or `unknown`
`audio` or `unknown`.
* `requestingUrl` string (optional) - The last URL the requesting frame loaded. This is not provided for cross-origin sub frames making permission checks.
* `isMainFrame` boolean - Whether the frame making the request is the main frame
* `isMainFrame` boolean - Whether the frame making the request is the main frame.
* `filePath` string (optional) - The path of a `fileSystem` request.
* `isDirectory` boolean (optional) - Whether a `fileSystem` request is a directory.
* `fileAccessType` string (optional) - The access type of a `fileSystem` request. Can be `writable` or `readable`.
Sets the handler which can be used to respond to permission checks for the `session`.
Returning `true` will allow the permission and `false` will reject it. Please note that
@@ -968,6 +972,9 @@ session.fromPartition('some-partition').setPermissionCheckHandler((webContents,
})
```
> [!NOTE]
> `isMainFrame` will always be `false` for a `fileSystem` request as a result of Chromium limitations.
#### `ses.setDisplayMediaRequestHandler(handler[, opts])`
* `handler` Function | null

View File

@@ -58,6 +58,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,12 +102,13 @@
* `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.
* `thickFrame` boolean (optional) - Use `WS_THICKFRAME` style for frameless windows on
Windows, which adds standard window frame. Setting it to `false` will remove
window shadow and window animations. Default is `true`.
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
resizing via dragging the window edges. Default is `true`.
* `vibrancy` string (optional) _macOS_ - Add a type of vibrancy effect to
the window, only on macOS. Can be `appearance-based`, `titlebar`, `selection`,
`menu`, `popover`, `sidebar`, `header`, `sheet`, `window`, `hud`, `fullscreen-ui`,

View File

@@ -2,9 +2,13 @@
* `textureInfo` Object - The shared texture info.
* `widgetType` string - The widget type of the texture. Can be `popup` or `frame`.
* `pixelFormat` string - The pixel format of the texture. Can be `rgba` or `bgra`.
* `pixelFormat` string - The pixel format of the texture.
* `rgba` - The texture format is 8-bit unorm RGBA.
* `bgra` - The texture format is 8-bit unorm BGRA.
* `rgbaf16` - The texture format is 16-bit float RGBA.
* `codedSize` [Size](size.md) - The full dimensions of the video frame.
* `visibleRect` [Rectangle](rectangle.md) - A subsection of [0, 0, codedSize.width(), codedSize.height()]. In OSR case, it is expected to have the full section area.
* `colorSpace` [ColorSpace](color-space.md) - The color space of the video frame.
* `visibleRect` [Rectangle](rectangle.md) - A subsection of [0, 0, codedSize.width, codedSize.height]. In OSR case, it is expected to have the full section area.
* `contentRect` [Rectangle](rectangle.md) - The region of the video frame that capturer would like to populate. In OSR case, it is the same with `dirtyRect` that needs to be painted.
* `timestamp` number - The time in microseconds since the capture start.
* `metadata` Object - Extra metadata. See comments in src\media\base\video_frame_metadata.h for accurate details.
@@ -12,13 +16,6 @@
* `regionCaptureRect` [Rectangle](rectangle.md) (optional) - May reflect the frame's contents origin if region capture is used internally.
* `sourceSize` [Rectangle](rectangle.md) (optional) - Full size of the source frame.
* `frameCount` number (optional) - The increasing count of captured frame. May contain gaps if frames are dropped between two consecutively received frames.
* `sharedTextureHandle` Buffer _Windows_ _macOS_ - The handle to the shared texture.
* `planes` Object[] _Linux_ - Each plane's info of the shared texture.
* `stride` number - The strides and offsets in bytes to be used when accessing the buffers via a memory mapping. One per plane per entry.
* `offset` number - The strides and offsets in bytes to be used when accessing the buffers via a memory mapping. One per plane per entry.
* `size` number - Size in bytes of the plane. This is necessary to map the buffers.
* `fd` number - File descriptor for the underlying memory object (usually dmabuf).
* `modifier` string _Linux_ - The modifier is retrieved from GBM library and passed to EGL driver.
* `handle` [SharedTextureHandle](shared-texture-handle.md) - The shared texture handle data.
* `release` Function - Release the resources. The `texture` cannot be directly passed to another process, users need to maintain texture lifecycles in
main process, but it is safe to pass the `textureInfo` to another process. Only a limited number of textures can exist at the same time, so it's important
that you call `texture.release()` as soon as you're done with the texture.
main process, but it is safe to pass the `textureInfo` to another process. Only a limited number of textures can exist at the same time, so it's important that you call `texture.release()` as soon as you're done with the texture.

View File

@@ -8,6 +8,7 @@
* `oom` - Process ran out of memory
* `launch-failed` - Process never successfully launched
* `integrity-failure` - Windows code integrity checks failed
* `memory-eviction` - Process proactively terminated to prevent a future out-of-memory (OOM) situation
* `exitCode` Integer - The exit code of the process, unless `reason` is
`launch-failed`, in which case `exitCode` will be a platform-specific
launch failure error code.

View File

@@ -0,0 +1,12 @@
# SharedTextureHandle Object
* `ntHandle` Buffer (optional) _Windows_ - NT HANDLE holds the shared texture. Note that this NT HANDLE is local to current process.
* `ioSurface` Buffer (optional) _macOS_ - IOSurfaceRef holds the shared texture. Note that this IOSurface is local to current process (not global).
* `nativePixmap` Object (optional) _Linux_ - Structure contains planes of shared texture.
* `planes` Object[] _Linux_ - Each plane's info of the shared texture.
* `stride` number - The strides and offsets in bytes to be used when accessing the buffers via a memory mapping. One per plane per entry.
* `offset` number - The strides and offsets in bytes to be used when accessing the buffers via a memory mapping. One per plane per entry.
* `size` number - Size in bytes of the plane. This is necessary to map the buffers.
* `fd` number - File descriptor for the underlying memory object (usually dmabuf).
* `modifier` string _Linux_ - The modifier is retrieved from GBM library and passed to EGL driver.
* `supportsZeroCopyWebGpuImport` boolean _Linux_ - Indicates whether supports zero copy import to WebGPU.

View File

@@ -21,7 +21,9 @@
associated with the window, making it compatible with the Chromium
OS-level sandbox and disabling the Node.js engine. This is not the same as
the `nodeIntegration` option and the APIs available to the preload script
are more limited. Read more about the option [here](../../tutorial/sandbox.md).
are more limited. Default is `true` since Electron 20. The sandbox will
automatically be disabled when `nodeIntegration` is set to `true`.
Read more about the option [here](../../tutorial/sandbox.md).
* `session` [Session](../session.md#class-session) (optional) - Sets the session used by the
page. Instead of passing the Session object directly, you can also choose to
use the `partition` option instead, which accepts a partition string. When
@@ -87,6 +89,11 @@
paint event. Defaults to `false`. See the
[offscreen rendering tutorial](../../tutorial/offscreen-rendering.md) for
more details.
* `sharedTexturePixelFormat` string (optional) _Experimental_ - The requested output format of the shared texture. Defaults to `argb`.
The name is originated from Chromium [`media::VideoPixelFormat`](https://source.chromium.org/chromium/chromium/src/+/main:media/base/video_types.h) enum suffix and only subset of them are supported.
The actual output pixel format and color space of the texture should refer to [`OffscreenSharedTexture`](../structures/offscreen-shared-texture.md) object in the `paint` event.
* `argb` - The requested output texture format is 8-bit unorm RGBA, with SRGB SDR color space.
* `rgbaf16` - The requested output texture format is 16-bit float RGBA, with scRGB HDR color space.
* `contextIsolation` boolean (optional) - Whether to run Electron APIs and
the specified `preload` script in a separate JavaScript context. Defaults
to `true`. The context that the `preload` script runs in will only have

View File

@@ -14,7 +14,7 @@ console.log(systemPreferences.getEffectiveAppearance())
The `systemPreferences` object emits the following events:
### Event: 'accent-color-changed' _Windows_
### Event: 'accent-color-changed' _Windows_ _Linux_
Returns:
@@ -182,7 +182,7 @@ Some popular `key` and `type`s are:
Removes the `key` in `NSUserDefaults`. This can be used to restore the default
or global value of a `key` previously set with `setUserDefault`.
### `systemPreferences.getAccentColor()` _Windows_ _macOS_
### `systemPreferences.getAccentColor()`
Returns `string` - The users current system wide accent color preference in RGBA
hexadecimal form.

View File

@@ -79,7 +79,15 @@ app.whenReady().then(() => {
### `new Tray(image, [guid])`
* `image` ([NativeImage](native-image.md) | string)
* `guid` string (optional) _Windows_ - Assigns a GUID to the tray icon. If the executable is signed and the signature contains an organization in the subject line then the GUID is permanently associated with that signature. OS level settings like the position of the tray icon in the system tray will persist even if the path to the executable changes. If the executable is not code-signed then the GUID is permanently associated with the path to the executable. Changing the path to the executable will break the creation of the tray icon and a new GUID must be used. However, it is highly recommended to use the GUID parameter only in conjunction with code-signed executable. If an App defines multiple tray icons then each icon must use a separate GUID.
* `guid` string (optional) _Windows_ _macOS_ - A unique string used to identify the tray icon. Must adhere to [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format.
**Windows**
On Windows, if the executable is signed and the signature contains an organization in the subject line then the GUID is permanently associated with that signature. OS level settings like the position of the tray icon in the system tray will persist even if the path to the executable changes. If the executable is not code-signed then the GUID is permanently associated with the path to the executable. Changing the path to the executable will break the creation of the tray icon and a new GUID must be used. However, it is highly recommended to use the GUID parameter only in conjunction with code-signed executable. If an App defines multiple tray icons then each icon must use a separate GUID.
**MacOS**
On macOS, the `guid` is a string used to uniquely identify the tray icon and allow it to retain its position between relaunches. Using the same string for a new tray item will create it in the same position as the previous tray item to use the string.
Creates a new tray icon associated with the `image`.
@@ -327,6 +335,10 @@ Returns [`Rectangle`](structures/rectangle.md)
The `bounds` of this tray icon as `Object`.
#### `tray.getGUID()` _macOS_ _Windows_
Returns `string | null` - The GUID used to uniquely identify the tray icon and allow it to retain its position between relaunches, or null if none is set.
#### `tray.isDestroyed()`
Returns `boolean` - Whether the tray icon is destroyed.

View File

@@ -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
@@ -2410,7 +2410,8 @@ 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_

View File

@@ -66,6 +66,16 @@ These methods can be accessed from the `webFrameMain` module:
Returns `WebFrameMain | undefined` - A frame with the given process and routing IDs,
or `undefined` if there is no WebFrameMain associated with the given IDs.
### `webFrameMain.fromFrameToken(processId, frameToken)`
* `processId` Integer - An `Integer` representing the internal ID of the process which owns the frame.
* `frameToken` string - A `string` token identifying the unique frame. Can also
be retrieved in the renderer process via
[`webFrame.frameToken`](web-frame.md#webframeframetoken-readonly).
Returns `WebFrameMain | null` - A frame with the given process and frame token,
or `null` if there is no WebFrameMain associated with the given IDs.
## Class: WebFrameMain
Process: [Main](../glossary.md#main-process)<br />

View File

@@ -4,6 +4,12 @@
Process: [Renderer](../glossary.md#renderer-process)
> [!IMPORTANT]
> If you want to call this API from a renderer process with context isolation enabled,
> 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.
`webFrame` export of the Electron module is an instance of the `WebFrame`
class representing the current frame. Sub-frames can be retrieved by
certain properties and methods (e.g. `webFrame.firstChild`).
@@ -139,7 +145,7 @@ by its key, which is returned from `webFrame.insertCSS(css)`.
Inserts `text` to the focused element.
### `webFrame.executeJavaScript(code[, userGesture, callback])`
### `webFrame.executeJavaScript(code[, userGesture][, callback])`
* `code` string
* `userGesture` boolean (optional) - Default is `false`.
@@ -160,7 +166,7 @@ In the browser window some HTML APIs like `requestFullScreen` can only be
invoked by a gesture from the user. Setting `userGesture` to `true` will remove
this limitation.
### `webFrame.executeJavaScriptInIsolatedWorld(worldId, scripts[, userGesture, callback])`
### `webFrame.executeJavaScriptInIsolatedWorld(worldId, scripts[, userGesture][, callback])`
* `worldId` Integer - The ID of the world to run the javascript
in, `0` is the default main world (where content runs), `999` is the
@@ -253,7 +259,7 @@ and intend to stay there).
* `selector` string - CSS selector for a frame element.
Returns `WebFrame` - The frame element in `webFrame's` document selected by
Returns `WebFrame | null` - The frame element in `webFrame's` document selected by
`selector`, `null` would be returned if `selector` does not select a frame or
if the frame is not in the current renderer process.
@@ -261,7 +267,7 @@ if the frame is not in the current renderer process.
* `name` string
Returns `WebFrame` - A child of `webFrame` with the supplied `name`, `null`
Returns `WebFrame | null` - A child of `webFrame` with the supplied `name`, `null`
would be returned if there's no such frame or if the frame is not in the current
renderer process.
@@ -272,7 +278,9 @@ renderer process.
instances (`webFrame.routingId`) and are also passed by frame
specific `WebContents` navigation events (e.g. `did-frame-navigate`)
Returns `WebFrame` - that has the supplied `routingId`, `null` if not found.
Returns `WebFrame | null` - that has the supplied `routingId`, `null` if not found.
**Deprecated:** Use the new `webFrame.findFrameByToken` API.
### `webFrame.findFrameByToken(frameToken)`
@@ -281,7 +289,7 @@ Returns `WebFrame` - that has the supplied `routingId`, `null` if not found.
instances (`webFrame.frameToken`) and can also be retrieved from
`WebFrameMain` instances using `webFrameMain.frameToken`.
Returns `WebFrame` - that has the supplied `frameToken`, `null` if not found.
Returns `WebFrame | null` - that has the supplied `frameToken`, `null` if not found.
### `webFrame.isWordMisspelled(word)`
@@ -333,6 +341,8 @@ An `Integer` representing the unique frame id in the current renderer process.
Distinct WebFrame instances that refer to the same underlying frame will have
the same `routingId`.
**Deprecated:** Use the new `webFrame.frameToken` API.
### `webFrame.frameToken` _Readonly_
A `string` representing the unique frame token in the current renderer process.

View File

@@ -4,6 +4,12 @@
Process: [Renderer](../glossary.md#renderer-process)
> [!IMPORTANT]
> If you want to call this API from a renderer process with context isolation enabled,
> 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.
## Methods
The `webUtils` module has the following methods:
@@ -17,11 +23,27 @@ Returns `string` - The file system path that this `File` object points to. In th
This method superseded the previous augmentation to the `File` object with the `path` property. An example is included below.
```js @ts-nocheck
// Before
const oldPath = document.querySelector('input').files[0].path
// After
const { webUtils } = require('electron')
const newPath = webUtils.getPathForFile(document.querySelector('input').files[0])
// Before (renderer)
const oldPath = document.querySelector('input[type=file]').files[0].path
```
```js @ts-nocheck
// After
// Renderer:
const file = document.querySelector('input[type=file]').files[0]
electronApi.doSomethingWithFile(file)
// Preload script:
const { contextBridge, webUtils } = require('electron')
contextBridge.exposeInMainWorld('electronApi', {
doSomethingWithFile (file) {
const path = webUtils.getPathForFile(file)
// Do something with the path, e.g., send it over IPC to the main process.
// It's best not to expose the full file path to the web content if possible.
}
})
```

View File

@@ -39,8 +39,8 @@ consider using `webContents.setWindowOpenHandler` to customize the
BrowserWindow creation.
A subset of [`WebPreferences`](structures/web-preferences.md) can be set directly,
unnested, from the features string: `zoomFactor`, `nodeIntegration`, `preload`,
`javascript`, `contextIsolation`, and `webviewTag`.
unnested, from the features string: `zoomFactor`, `nodeIntegration`, `javascript`,
`contextIsolation`, and `webviewTag`.
For example:

View File

@@ -12,8 +12,51 @@ 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 (39.0)
### Deprecated: `--host-rules` command line switch
Chromium is deprecating the `--host-rules` switch.
You should use `--host-resolver-rules` instead.
### Behavior Changed: window.open popups are always resizable
Per current [WHATWG spec](https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-open-dev), the `window.open` API will now always create a resizable popup window.
To restore previous behavior:
```js
webContents.setWindowOpenHandler((details) => {
return {
action: 'allow',
overrideBrowserWindowOptions: {
resizable: details.features.includes('resizable=yes')
}
}
})
```
### Behavior Changed: shared texture OSR `paint` event data structure
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 the [OffscreenSharedTexture](./api/structures/offscreen-shared-texture.md) API structure for more details.
## Planned Breaking API Changes (38.0)
### Removed: `ELECTRON_OZONE_PLATFORM_HINT` environment variable
The default value of the `--ozone-platform` flag [changed to `auto`](https://chromium-review.googlesource.com/c/chromium/src/+/6775426).
Electron now defaults to running as a native Wayland app when launched in a Wayland session (when `XDG_SESSION_TYPE=wayland`).
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.
### Removed: macOS 11 support
macOS 11 (Big Sur) is no longer supported by [Chromium](https://chromium-review.googlesource.com/c/chromium/src/+/6594615).
@@ -37,23 +80,6 @@ The `webFrame.findFrameByRoutingId(routingId)` function will be removed.
You should use `webFrame.findFrameByToken(frameToken)` instead.
### Behavior Changed: window.open popups are always resizable
Per current [WHATWG spec](https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-open-dev), the `window.open` API will now always create a resizable popup window.
To restore previous behavior:
```js
webContents.setWindowOpenHandler((details) => {
return {
action: 'allow',
overrideBrowserWindowOptions: {
resizable: details.features.includes('resizable=yes')
}
}
})
```
## Planned Breaking API Changes (37.0)
### Utility Process unhandled rejection behavior change

View File

@@ -191,12 +191,6 @@ $ ./out/Testing/electron
### Packaging
On linux, first strip the debugging and symbol information:
```sh
$ electron/script/strip-binaries.py -d out/Release
```
To package the electron build as a distributable zip file:
```sh

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

@@ -117,7 +117,7 @@ void Initialize(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused,
v8::Local<v8::Context> context,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
v8::Isolate* const isolate = v8::Isolate::GetCurrent();
gin_helper::Dictionary dict(isolate, exports);
dict.Set("apiName", electron::api::ApiName::Create(isolate));
}

View File

@@ -12,19 +12,28 @@ network problems. The best resolution is to try switching networks, or
wait a bit and try installing again.
You can also attempt to download Electron directly from
[electron/electron/releases](https://github.com/electron/electron/releases)
[GitHub Releases](https://github.com/electron/electron/releases)
if installing via `npm` is failing.
## When will Electron upgrade to latest Chrome?
If you need to install Electron through a custom mirror or proxy, see
the [Advanced Installation](./tutorial/installation.md) documentation for more details.
The Chrome version of Electron is usually bumped within one or two weeks after
a new stable Chrome version gets released. This estimate is not guaranteed and
depends on the amount of work involved with upgrading.
## How are Electron binaries downloaded?
Only the stable channel of Chrome is used. If an important fix is in beta or dev
channel, we will back-port it.
When you run `npm install electron`, the Electron binary for the corresponding version is downloaded
into your project's `node_modules` folder via npm's `postinstall` lifecycle script.
For more information, please see the [security introduction](tutorial/security.md).
This logic is handled by the [`@electron/get`](https://github.com/electron/get) utility package
under the hood.
## When will Electron upgrade to latest Chromium?
Every new major version of Electron releases with a Chromium major version upgrade. By releasing every
8 weeks, Electron is able to pull in every other major Chromium release on the very same day that it
releases upstream. Security fixes will be backported to stable release channels ahead of time.
See the [Electron Releases](./tutorial/electron-timelines.md) documentation for more details or
[releases.electronjs.org](https://releases.electronjs.org) to see our Release Status dashboard.
## When will Electron upgrade to latest Node.js?

View File

@@ -12,6 +12,15 @@ The ASAR format was created primarily to improve performance on Windows when
reading large quantities of small files (e.g. when loading your app's JavaScript
dependency tree from `node_modules`).
### ASAR integrity
ASAR integrity is an 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.
See the [ASAR Integrity](./tutorial/asar-integrity.md) guide for more details.
### code signing
Code signing is a process where an app developer digitally signs their code to

View File

@@ -5,7 +5,7 @@ slug: asar-integrity
hide_title: false
---
ASAR integrity is an experimental 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](./asar-archives.md) at runtime.
## Version support
@@ -64,13 +64,10 @@ flipFuses(
)
```
:::tip Fuses in Electron Forge
With Electron Forge, you can configure your app's fuses with
[@electron-forge/plugin-fuses](https://www.electronforge.io/config/plugins/fuses)
in your Forge configuration file.
:::
> [!TIP]
> With Electron Forge, you can configure your app's fuses with
> [@electron-forge/plugin-fuses](https://www.electronforge.io/config/plugins/fuses)
> in your Forge configuration file.
## Providing the header hash
@@ -80,7 +77,7 @@ on package time. The process of providing this packaged hash is different for ma
### Using Electron tooling
Electron Forge and Electron Packager do this setup automatically for you with no additional
configuration. The minimum required versions for ASAR integrity are:
configuration whenever `asar` is enabled. The minimum required versions for ASAR integrity are:
* `@electron/packager@18.3.1`
* `@electron/forge@7.4.0`
@@ -109,7 +106,7 @@ Valid `algorithm` values are currently `SHA256` only. The `hash` is a hash of th
The `@electron/asar` package exposes a `getRawHeader` method whose result can then be hashed to generate this value
(e.g. using the [`node:crypto`](https://nodejs.org/api/crypto.html) module).
### Windows
#### Windows
When packaging for Windows, you must populate a valid [resource](https://learn.microsoft.com/en-us/windows/win32/menurc/resources)
entry of type `Integrity` and name `ElectronAsar`. The value of this resource should be a JSON encoded dictionary
@@ -125,9 +122,6 @@ in the form included below:
]
```
:::info
For an implementation example, see [`src/resedit.ts`](https://github.com/electron/packager/blob/main/src/resedit.ts)
in the Electron Packager code.
:::
> [!NOTE]
> For an implementation example, see [`src/resedit.ts`](https://github.com/electron/packager/blob/main/src/resedit.ts)
> in the Electron Packager code.

View File

@@ -233,10 +233,10 @@ can find [its documentation here](https://www.electron.build/code-signing).
[Azure Trusted Signing][] is Microsoft's modern cloud-based alternative to EV certificates.
It is the cheapest option for code signing on Windows, and it gets rid of SmartScreen warnings.
As of May 2025, Azure Trusted Signing is [available][trusted-signing-availability] to US and
Canada-based organizations with 3+ years of verifiable business history. 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.
As of October 2025, Azure Trusted Signing is available to US and Canada-based organizations
with 3+ years of verifiable business history and to individual developers in the US and Canada.
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 Electron Forge
@@ -267,6 +267,5 @@ See the [Windows Store Guide][].
[maker-squirrel]: https://www.electronforge.io/config/makers/squirrel.windows
[maker-msi]: https://www.electronforge.io/config/makers/wix-msi
[azure trusted signing]: https://azure.microsoft.com/en-us/products/trusted-signing
[trusted-signing-availability]: https://techcommunity.microsoft.com/blog/microsoft-security-blog/trusted-signing-public-preview-update/4399713
[forge-trusted-signing]: https://www.electronforge.io/guides/code-signing/code-signing-windows#using-azure-trusted-signing
[builder-trusted-signing]: https://www.electron.build/code-signing-win#using-azure-trusted-signing-beta

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,10 +9,12 @@ check out our [Electron Versioning](./electron-versioning.md) doc.
| Electron | Alpha | Beta | Stable | EOL | Chrome | Node | Supported |
| ------- | ----- | ------- | ------ | ------ | ---- | ---- | ---- |
| 38.0.0 | 2025-Jun-26 | 2025-Aug-06 | 2025-Sep-02 | 2026-Mar-10 | M140 | 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 | ✅ |
| 36.0.0 | 2025-Mar-06 | 2025-Apr-02 | 2025-Apr-29 | 2025-Oct-28 | M136 | v22.14 | |
| 35.0.0 | 2025-Jan-16 | 2025-Feb-05 | 2025-Mar-04 | 2025-Sep-02 | M134 | v22.14 | |
| 36.0.0 | 2025-Mar-06 | 2025-Apr-02 | 2025-Apr-29 | 2025-Oct-28 | M136 | v22.14 | 🚫 |
| 35.0.0 | 2025-Jan-16 | 2025-Feb-05 | 2025-Mar-04 | 2025-Sep-02 | M134 | v22.14 | 🚫 |
| 34.0.0 | 2024-Oct-17 | 2024-Nov-13 | 2025-Jan-14 | 2025-Jun-24 | M132 | v20.18 | 🚫 |
| 33.0.0 | 2024-Aug-22 | 2024-Sep-18 | 2024-Oct-15 | 2025-Apr-29 | M130 | v20.18 | 🚫 |
| 32.0.0 | 2024-Jun-14 | 2024-Jul-24 | 2024-Aug-20 | 2025-Mar-04 | M128 | v20.16 | 🚫 |

View File

@@ -32,7 +32,7 @@ This table gives a general overview of where ESM is supported and which ESM load
| Main | Node.js | N/A | <ul><li> [You must use `await` generously before the app's `ready` event](#you-must-use-await-generously-before-the-apps-ready-event) </li></ul> |
| Renderer (Sandboxed) | Chromium | Unsupported | <ul><li> [Sandboxed preload scripts can't use ESM imports](#sandboxed-preload-scripts-cant-use-esm-imports) </li></ul> |
| Renderer (Unsandboxed & Context Isolated) | Chromium | Node.js | <ul><li> [Unsandboxed ESM preload scripts will run after page load on pages with no content](#unsandboxed-esm-preload-scripts-will-run-after-page-load-on-pages-with-no-content) </li> <li>[ESM Preload Scripts must have the `.mjs` extension](#esm-preload-scripts-must-have-the-mjs-extension)</li></ul> |
| Renderer (Unsandboxed & Non Context Isolated) | Chromium | Node.js | <ul><li>[Unsandboxed ESM preload scripts will run after page load on pages with no content](#unsandboxed-esm-preload-scripts-will-run-after-page-load-on-pages-with-no-content)</li><li>[ESM Preload Scripts must have the `.mjs` extension](#esm-preload-scripts-must-have-the-mjs-extension)</li><li>[ESM preload scripts must be context isolated to use dynamic Node.js ESM imports](#esm-preload-scripts-must-be-context-isolated-to-use-dynamic-nodejs-esm-imports)</li></ul> |
| Renderer (Unsandboxed & Non Context Isolated) | Chromium | Node.js | <ul><li>[Unsandboxed ESM preload scripts will run after page load on pages with no content](#unsandboxed-esm-preload-scripts-will-run-after-page-load-on-pages-with-no-content)</li><li>[ESM Preload Scripts must have the `.mjs` extension](#esm-preload-scripts-must-have-the-mjs-extension)</li></ul> |
## Main process

View File

@@ -4,11 +4,24 @@
## What are fuses?
For a subset of Electron functionality it makes sense to disable certain features for an entire application. For example, 99% of apps don't make use of `ELECTRON_RUN_AS_NODE`, these applications want to be able to ship a binary that is incapable of using that feature. We also don't want Electron consumers building Electron from source as that is both a massive technical challenge and has a high cost of both time and money.
From a security perspective, it makes sense to disable certain unused Electron features
that are powerful but may make your app's security posture weaker. For example, any app that doesn't
use the `ELECTRON_RUN_AS_NODE` environment variable would want to disable the feature to prevent a
subset of "living off the land" attacks.
Fuses are the solution to this problem, at a high level they are "magic bits" in the Electron binary that can be flipped when packaging your Electron app to enable / disable certain features / restrictions. Because they are flipped at package time before you code sign your app the OS becomes responsible for ensuring those bits aren't flipped back via OS level code signing validation (Gatekeeper / App Locker).
We also don't want Electron consumers forking to achieve this goal, as building from source and
maintaining a fork is a massive technical challenge and costs a lot of time and money.
## Current Fuses
Fuses are the solution to this problem. At a high level, they are "magic bits" in the Electron binary
that can be flipped when packaging your Electron app to enable or disable certain features/restrictions.
Because they are flipped at package time before you code sign your app, the OS becomes responsible
for ensuring those bits aren't flipped back via OS-level code signing validation
(e.g. [Gatekeeper](https://support.apple.com/en-ca/guide/security/sec5599b66df/web) on macOS or
[AppLocker](https://learn.microsoft.com/en-us/windows/security/application-security/application-control/app-control-for-business/applocker/applocker-overview)
on Windows).
## Current fuses
### `runAsNode`
@@ -16,7 +29,11 @@ Fuses are the solution to this problem, at a high level they are "magic bits" in
**@electron/fuses:** `FuseV1Options.RunAsNode`
The runAsNode fuse toggles whether the `ELECTRON_RUN_AS_NODE` environment variable is respected or not. Please note that if this fuse is disabled then `process.fork` in the main process will not function as expected as it depends on this environment variable to function. Instead, we recommend that you use [Utility Processes](../api/utility-process.md), which work for many use cases where you need a standalone Node.js process (like a Sqlite server process or similar scenarios).
The `runAsNode` fuse toggles whether the [`ELECTRON_RUN_AS_NODE`](../api/environment-variables.md)
environment variable is respected or not. With this fuse disabled, [`child_process.fork`](https://nodejs.org/api/child_process.html#child_processforkmodulepath-args-options) in the main process will not function
as expected, as it depends on this environment variable to function. Instead, we recommend that you
use [Utility Processes](../api/utility-process.md), which work for many use cases where you need a
standalone Node.js process (e.g. a SQLite server process).
### `cookieEncryption`
@@ -24,7 +41,12 @@ The runAsNode fuse toggles whether the `ELECTRON_RUN_AS_NODE` environment variab
**@electron/fuses:** `FuseV1Options.EnableCookieEncryption`
The cookieEncryption fuse toggles whether the cookie store on disk is encrypted using OS level cryptography keys. By default the sqlite database that Chromium uses to store cookies stores the values in plaintext. If you wish to ensure your apps cookies are encrypted in the same way Chrome does then you should enable this fuse. Please note it is a one-way transition, if you enable this fuse existing unencrypted cookies will be encrypted-on-write but if you then disable the fuse again your cookie store will effectively be corrupt and useless. Most apps can safely enable this fuse.
The `cookieEncryption` fuse toggles whether the cookie store on disk is encrypted using OS level
cryptography keys. By default, the SQLite database that Chromium uses to store cookies stores the
values in plaintext. If you wish to ensure your app's cookies are encrypted in the same way Chrome
does, then you should enable this fuse. Please note it is a one-way transition—if you enable this
fuse, existing unencrypted cookies will be encrypted-on-write, but subsequently disabling the fuse
later will make your cookie store corrupt and useless. Most apps can safely enable this fuse.
### `nodeOptions`
@@ -32,7 +54,11 @@ The cookieEncryption fuse toggles whether the cookie store on disk is encrypted
**@electron/fuses:** `FuseV1Options.EnableNodeOptionsEnvironmentVariable`
The nodeOptions fuse toggles whether the [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#node_optionsoptions) and [`NODE_EXTRA_CA_CERTS`](https://github.com/nodejs/node/blob/main/doc/api/cli.md#node_extra_ca_certsfile) environment variables are respected. The `NODE_OPTIONS` environment variable can be used to pass all kinds of custom options to the Node.js runtime and isn't typically used by apps in production. Most apps can safely disable this fuse.
The `nodeOptions` fuse toggles whether the [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#node_optionsoptions)
and [`NODE_EXTRA_CA_CERTS`](https://github.com/nodejs/node/blob/main/doc/api/cli.md#node_extra_ca_certsfile)
environment variables are respected. The `NODE_OPTIONS` environment variable can be used to pass all
kinds of custom options to the Node.js runtime and isn't typically used by apps in production.
Most apps can safely disable this fuse.
### `nodeCliInspect`
@@ -40,7 +66,9 @@ The nodeOptions fuse toggles whether the [`NODE_OPTIONS`](https://nodejs.org/api
**@electron/fuses:** `FuseV1Options.EnableNodeCliInspectArguments`
The nodeCliInspect fuse toggles whether the `--inspect`, `--inspect-brk`, etc. flags are respected or not. When disabled it also ensures that `SIGUSR1` signal does not initialize the main process inspector. Most apps can safely disable this fuse.
The `nodeCliInspect` fuse toggles whether the `--inspect`, `--inspect-brk`, etc. flags are respected
or not. When disabled, it also ensures that `SIGUSR1` signal does not initialize the main process
inspector. Most apps can safely disable this fuse.
### `embeddedAsarIntegrityValidation`
@@ -48,9 +76,12 @@ The nodeCliInspect fuse toggles whether the `--inspect`, `--inspect-brk`, etc. f
**@electron/fuses:** `FuseV1Options.EnableEmbeddedAsarIntegrityValidation`
The embeddedAsarIntegrityValidation fuse toggles an experimental feature on macOS and Windows that validates the content of the `app.asar` file when it is loaded. This feature is designed to have a minimal performance impact but may marginally slow down file reads from inside the `app.asar` archive.
The `embeddedAsarIntegrityValidation` fuse toggles a feature on macOS and Windows that validates the
content of the `app.asar` file when it is loaded. This feature is designed to have a minimal
performance impact but may marginally slow down file reads from inside the `app.asar` archive.
Most apps can safely enable this fuse.
For more information on how to use asar integrity validation please read the [Asar Integrity](asar-integrity.md) documentation.
For more information on how to use ASAR integrity validation, please read the [Asar Integrity](asar-integrity.md) documentation.
### `onlyLoadAppFromAsar`
@@ -58,7 +89,15 @@ For more information on how to use asar integrity validation please read the [As
**@electron/fuses:** `FuseV1Options.OnlyLoadAppFromAsar`
The onlyLoadAppFromAsar fuse changes the search system that Electron uses to locate your app code. By default Electron will search in the following order `app.asar` -> `app` -> `default_app.asar`. When this fuse is enabled the search order becomes a single entry `app.asar` thus ensuring that when combined with the `embeddedAsarIntegrityValidation` fuse it is impossible to load non-validated code.
The `onlyLoadAppFromAsar` fuse changes the search system that Electron uses to locate your app code.
By default, Electron will search for this code in the following order:
1. `app.asar`
1. `app`
1. `default_app.asar`
When this fuse is enabled, Electron will _only_ search for `app.asar`. When combined with the [`embeddedAsarIntegrityValidation`](#embeddedasarintegrityvalidation) fuse, this fuse ensures that
it is impossible to load non-validated code.
### `loadBrowserProcessSpecificV8Snapshot`
@@ -66,11 +105,17 @@ The onlyLoadAppFromAsar fuse changes the search system that Electron uses to loc
**@electron/fuses:** `FuseV1Options.LoadBrowserProcessSpecificV8Snapshot`
The loadBrowserProcessSpecificV8Snapshot fuse changes which V8 snapshot file is used for the browser process. By default Electron's processes will all use the same V8 snapshot file. When this fuse is enabled the browser process uses the file called `browser_v8_context_snapshot.bin` for its V8 snapshot. The other processes will use the V8 snapshot file that they normally do.
V8 snapshots can be useful to improve app startup performance. V8 lets you take snapshots of
initialized heaps and then load them back in to avoid the cost of initializing the heap.
V8 snapshots can be useful to improve app startup performance. V8 lets you take snapshots of initialized heaps and then load them back in to avoid the cost of initializing the heap.
The `loadBrowserProcessSpecificV8Snapshot` fuse changes which V8 snapshot file is used for the browser
process. By default, Electron's processes will all use the same V8 snapshot file. When this fuse is
enabled, the main process uses the file called `browser_v8_context_snapshot.bin` for its V8 snapshot.
Other processes will use the V8 snapshot file that they normally do.
Using separate snapshots for renderer processes and the main process can improve security, especially to make sure that the renderer doesn't use a snapshot with `nodeIntegration` enabled. See [#35170](https://github.com/electron/electron/issues/35170) for details.
Using separate snapshots for renderer processes and the main process can improve security, especially
to make sure that the renderer doesn't use a snapshot with `nodeIntegration` enabled.
See [electron/electron#35170](https://github.com/electron/electron/issues/35170) for details.
### `grantFileProtocolExtraPrivileges`
@@ -78,19 +123,25 @@ Using separate snapshots for renderer processes and the main process can improve
**@electron/fuses:** `FuseV1Options.GrantFileProtocolExtraPrivileges`
The grantFileProtocolExtraPrivileges fuse changes whether pages loaded from the `file://` protocol are given privileges beyond what they would receive in a traditional web browser. This behavior was core to Electron apps in original versions of Electron but is no longer required as apps should be [serving local files from custom protocols](./security.md#18-avoid-usage-of-the-file-protocol-and-prefer-usage-of-custom-protocols) now instead. If you aren't serving pages from `file://` you should disable this fuse.
The `grantFileProtocolExtraPrivileges` fuse changes whether pages loaded from the `file://` protocol
are given privileges beyond what they would receive in a traditional web browser. This behavior was
core to Electron apps in original versions of Electron, but is no longer required as apps should be
[serving local files from custom protocols](./security.md#18-avoid-usage-of-the-file-protocol-and-prefer-usage-of-custom-protocols) now instead.
If you aren't serving pages from `file://`, you should disable this fuse.
The extra privileges granted to the `file://` protocol by this fuse are incompletely documented below:
* `file://` protocol pages can use `fetch` to load other assets over `file://`
* `file://` protocol pages can use service workers
* `file://` protocol pages have universal access granted to child frames also running on `file://` protocols regardless of sandbox settings
* `file://` protocol pages have universal access granted to child frames also running on `file://`
protocols regardless of sandbox settings
## How do I flip the fuses?
## How do I flip fuses?
### The easy way
We've made a handy module, [`@electron/fuses`](https://npmjs.com/package/@electron/fuses), to make flipping these fuses easy. Check out the README of that module for more details on usage and potential error cases.
[`@electron/fuses`](https://npmjs.com/package/@electron/fuses) is a JavaScript utility designed to make flipping these fuses easy. Check out the README of that module for more details on usage and potential error cases.
```js @ts-nocheck
const { flipFuses, FuseVersion, FuseV1Options } = require('@electron/fuses')
@@ -106,29 +157,37 @@ flipFuses(
)
```
You can validate the fuses have been flipped or check the fuse status of an arbitrary Electron app using the fuses CLI.
You can validate the fuses that have been flipped or check the fuse status of an arbitrary Electron
app using the `@electron/fuses` CLI.
```bash
npx @electron/fuses read --app /Applications/Foo.app
```
>[!NOTE]
> If you are using Electron Forge to distribute your application, you can flip fuses using
> [`@electron-forge/plugin-fuses`](https://www.electronforge.io/config/plugins/fuses),
> which comes pre-installed with all templates.
### The hard way
#### Quick Glossary
> [!IMPORTANT]
> Glossary:
>
> * **Fuse Wire**: A sequence of bytes in the Electron binary used to control the fuses
> * **Sentinel**: A static known sequence of bytes you can use to locate the fuse wire
> * **Fuse Schema**: The format/allowed values for the fuse wire
* **Fuse Wire**: A sequence of bytes in the Electron binary used to control the fuses
* **Sentinel**: A static known sequence of bytes you can use to locate the fuse wire
* **Fuse Schema**: The format / allowed values for the fuse wire
Manually flipping fuses requires editing the Electron binary and modifying the fuse wire to be the
sequence of bytes that represent the state of the fuses you want.
Manually flipping fuses requires editing the Electron binary and modifying the fuse wire to be the sequence of bytes that represent the state of the fuses you want.
Somewhere in the Electron binary there will be a sequence of bytes that look like this:
Somewhere in the Electron binary, there will be a sequence of bytes that look like this:
```text
| ...binary | sentinel_bytes | fuse_version | fuse_wire_length | fuse_wire | ...binary |
```
* `sentinel_bytes` is always this exact string `dL7pKGdnNz796PbbjQWNKmHXBZaB9tsX`
* `sentinel_bytes` is always this exact string: `dL7pKGdnNz796PbbjQWNKmHXBZaB9tsX`
* `fuse_version` is a single byte whose unsigned integer value represents the version of the fuse schema
* `fuse_wire_length` is a single byte whose unsigned integer value represents the number of fuses in the following fuse wire
* `fuse_wire` is a sequence of N bytes, each byte represents a single fuse and its state.
@@ -136,6 +195,6 @@ Somewhere in the Electron binary there will be a sequence of bytes that look lik
* "1" (0x31) indicates the fuse is enabled
* "r" (0x72) indicates the fuse has been removed and changing the byte to either 1 or 0 will have no effect.
To flip a fuse you find its position in the fuse wire and change it to "0" or "1" depending on the state you'd like.
To flip a fuse, you find its position in the fuse wire and change it to "0" or "1" depending on the state you'd like.
You can view the current schema [here](https://github.com/electron/electron/blob/main/build/fuses/fuses.json5).

View File

@@ -26,12 +26,12 @@ any dependencies in your app will not be installed.
## Customization
If you want to change the architecture that is downloaded (e.g., `ia32` on an
`x64` machine), you can use the `--arch` flag with npm install or set the
If you want to change the architecture that is downloaded (e.g., `x64` on an
`arm64` machine), you can use the `--arch` flag with npm install or set the
`npm_config_arch` environment variable:
```shell
npm install --arch=ia32 electron
npm install --arch=x64 electron
```
In addition to changing the architecture, you can also specify the platform
@@ -60,7 +60,7 @@ where `$VERSION` is the exact version of Electron).
If you are unable to access GitHub or you need to provide a custom build, you
can do so by either providing a mirror or an existing cache directory.
#### Mirror
### Mirror
You can use environment variables to override the base URL, the path at which to
look for Electron binaries, and the binary filename. The URL used by `@electron/get`
@@ -95,7 +95,7 @@ Electron release you may have to set `electron_use_remote_checksums=1` directly,
or configure it in a `.npmrc` file, to force Electron to use the remote `SHASUMS256.txt`
file to verify the checksum instead of the embedded checksums.
#### Cache
### Cache
Alternatively, you can override the local cache. `@electron/get` will cache
downloaded binaries in a local directory to not stress your network. You can use
@@ -120,7 +120,7 @@ The cache contains the version's official zip file as well as a checksum, and is
│ └── electron-v15.3.1-darwin-x64.zip
```
## Skip binary download
## Postinstall script
Under the hood, Electron's JavaScript API binds to a binary that contains its
implementations. Because this binary is crucial to the function of any Electron app,

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