electron/shell/common
Samuel Attard ac031bf8de
feat: I guess it's esm (#37535)
* fix: allow ESM loads from within ASAR files

* fix: ensure that ESM entry points finish loading before app ready

* fix: allow loading ESM entrypoints via default_app

* fix: allow ESM loading for renderer preloads

* docs: document current known limitations of esm

* chore: add patches to support blending esm handlers

* refactor: use SetDefersLoading instead of JoinAppCode in renderers

Blink has it's own event loop so pumping the uv loop in the renderer is not enough, luckily in blink we can suspend the loading of the frame while we do additional work.

* chore: add patch to expose SetDefersLoading

* fix: use fileURLToPath instead of pathname

* chore: update per PR feedback

* fix: fs.exists/existsSync should never throw

* fix: convert path to file url before importing

* fix: oops

* fix: oops

* Update docs/tutorial/esm-limitations.md

Co-authored-by: Jeremy Rose <jeremya@chromium.org>

* windows...

* windows...

* chore: update patches

* spec: fix tests and document empty body edge case

* Apply suggestions from code review

Co-authored-by: Daniel Scalzi <d_scalzi@yahoo.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>

* spec: add tests for esm

* spec: windows

* chore: update per PR feedback

* chore: update patches

* Update shell/common/node_bindings.h

Co-authored-by: Jeremy Rose <jeremya@chromium.org>

* chore: update patches

* rebase

* use cjs loader by default for preload scripts

* chore: fix lint

* chore: update patches

* chore: update patches

* chore: fix patches

* build: debug depshash

* ?

* Revert "build: debug depshash"

This reverts commit 0de82523fb93f475226356b37418ce4b69acdcdf.

* chore: allow electron as builtin protocol in esm loader

* Revert "Revert "build: debug depshash""

This reverts commit ff86b1243ca6d05c9b3b38e0a6d717fb380343a4.

* chore: fix esm doc

* chore: update node patches

---------

Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: electron-patch-conflict-fixer[bot] <83340002+electron-patch-conflict-fixer[bot]@users.noreply.github.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Daniel Scalzi <d_scalzi@yahoo.com>
2023-08-30 17:38:07 -07:00
..
api chore: remove deprecated ipcRenderer.sendTo() (#39087) 2023-08-28 10:29:27 -04:00
asar chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
extensions feat: support chrome.scripting extension APIs (#39395) 2023-08-28 10:39:28 -04:00
gin_converters chore: remove obsolete "simple" object annotations for the remote module (#39486) 2023-08-22 13:43:30 +09:00
gin_helper feat: I guess it's esm (#37535) 2023-08-30 17:38:07 -07:00
mac chore: cleanup arc migration helpers (#39606) 2023-08-23 09:54:21 -04:00
resources/mac fix: disable MallocNanoZone on mac (#33704) 2022-04-28 10:28:27 -04:00
application_info.cc fix: use correct userData path when unbundled (#30113) 2021-07-14 13:10:37 -07:00
application_info.h chore: bump chromium to 100.0.4857.0 (main) (#32419) 2022-02-09 18:58:52 -08:00
application_info_linux.cc fix: potential crash caused by dlopen different gtk libraries (#33650) 2022-04-18 13:24:32 +09:00
application_info_mac.mm chore: cleanup arc migration helpers (#39606) 2023-08-23 09:54:21 -04:00
application_info_win.cc chore: drop support for Windows 7 / 8 / 8.1 (#36427) 2022-11-30 17:13:29 -08:00
color_util.cc chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
color_util.h feat: support more color formats for backgroundColor (#31868) 2022-03-21 18:35:54 +01:00
crash_keys.cc chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
crash_keys.h chore: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00
electron_command_line.cc chore: bump chromium to 100.0.4857.0 (main) (#32419) 2022-02-09 18:58:52 -08:00
electron_command_line.h chore: bump chromium to 100.0.4857.0 (main) (#32419) 2022-02-09 18:58:52 -08:00
electron_constants.cc build: remove enable_run_as_node build flag (#38413) 2023-06-08 16:40:08 -04:00
electron_constants.h build: remove enable_run_as_node build flag (#38413) 2023-06-08 16:40:08 -04:00
electron_paths.h feat: allow customizing browser data location (#33554) 2022-05-09 10:26:57 -04:00
heap_snapshot.cc chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
heap_snapshot.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
key_weak_map.h refactor: prefer base::Contains() over find() + end() (#38443) 2023-05-30 10:28:43 +02:00
keyboard_util.cc refactor: more constexpr lookup tables (#38886) 2023-06-22 14:33:44 +02:00
keyboard_util.h refactor: more constexpr lookup tables (#38886) 2023-06-22 14:33:44 +02:00
language_util.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
language_util_linux.cc feat: add app.getPreferredSystemLanguages() API (#36035) 2022-11-09 10:50:43 -05:00
language_util_mac.mm fix: respect system language preferences on Win/macOS (#23247) 2020-05-04 10:49:29 -07:00
language_util_win.cc chore: bump chromium to 113.0.5636.0 (main) (#37130) 2023-03-10 10:07:42 -06:00
logging.cc fix: fail non-fatally when InitLogging fails (#35138) 2022-08-02 15:45:30 -04:00
logging.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
node_bindings.cc feat: I guess it's esm (#37535) 2023-08-30 17:38:07 -07:00
node_bindings.h feat: I guess it's esm (#37535) 2023-08-30 17:38:07 -07:00
node_bindings_linux.cc chore: remove redundant code in node integration (#33500) 2022-03-29 20:09:42 -07:00
node_bindings_linux.h chore: remove redundant code in node integration (#33500) 2022-03-29 20:09:42 -07:00
node_bindings_mac.cc chore: remove redundant code in node integration (#33500) 2022-03-29 20:09:42 -07:00
node_bindings_mac.h chore: remove redundant code in node integration (#33500) 2022-03-29 20:09:42 -07:00
node_bindings_win.cc chore: remove redundant code in node integration (#33500) 2022-03-29 20:09:42 -07:00
node_bindings_win.h chore: remove redundant code in node integration (#33500) 2022-03-29 20:09:42 -07:00
node_includes.h chore: rename built-in modules to bindings to match naming update in node (#37182) 2023-02-09 10:31:38 +09:00
node_util.cc chore: upgrade to Node.js v18 (#35999) 2022-11-10 22:31:20 +01:00
node_util.h chore: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00
options_switches.cc refactor: remove unused switches (#38497) 2023-05-31 15:55:21 -04:00
options_switches.h refactor: remove unused switches (#38497) 2023-05-31 15:55:21 -04:00
platform_util.cc chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
platform_util.h feat: add logUsage to shell.openExternal() options (#37139) 2023-02-14 17:53:18 +09:00
platform_util_internal.h chore: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00
platform_util_linux.cc chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
platform_util_mac.mm chore: bump chromium to 117.0.5923.0 (main) (#39304) 2023-08-04 10:47:29 +02:00
platform_util_win.cc chore: replace uses of ComPtr::GetAddressOf() with ComPtr::operator& (#37948) 2023-04-16 17:08:37 -07:00
plugin_info.cc chore: bump chromium to 109.0.5382.0 (main) (#36057) 2022-10-27 12:37:04 -04:00
plugin_info.h chore: bump chromium to 109.0.5382.0 (main) (#36057) 2022-10-27 12:37:04 -04:00
process_util.cc refactor: use process_util.h helpers (#38574) 2023-06-06 17:19:13 +09:00
process_util.h refactor: use process_util.h helpers (#38574) 2023-06-06 17:19:13 +09:00
skia_util.cc chore: bump chromium to 110.0.5415.0 (main) (#36186) 2022-11-17 14:59:23 -05:00
skia_util.h chore: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00
thread_restrictions.h chore: bump chromium to 110.0.5415.0 (main) (#36186) 2022-11-17 14:59:23 -05:00
v8_value_serializer.cc chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
v8_value_serializer.h chore: bump chromium to 102.0.4961.0 (main) (#33091) 2022-03-24 21:39:03 -04:00
world_ids.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00