electron/script
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
..
codesign refactor: use node scheme imports in scripts (#38846) 2023-06-22 16:21:42 +02:00
lib chore: cleanup unusued variables + enable linting (#38898) 2023-06-26 02:51:54 -07:00
release refactor: use TypeError instead of generic Error when appropriate (#39209) 2023-07-25 12:08:46 -04:00
zip_manifests chore: bump chromium to 113.0.5636.0 (main) (#37130) 2023-03-10 10:07:42 -06:00
.eslintrc.json refactor: use node scheme imports in scripts (#38846) 2023-06-22 16:21:42 +02:00
add-debug-link.py fix: strip branded binaries (#36641) 2022-12-13 17:01:20 -05:00
apply_all_patches.py chore: bump chromium to 106.0.5216.0 (main) (#34993) 2022-08-17 11:35:53 -07:00
check-patch-diff.ts refactor: use node scheme imports in scripts (#38846) 2023-06-22 16:21:42 +02:00
check-symlinks.js refactor: use node scheme imports in scripts (#38846) 2023-06-22 16:21:42 +02:00
copy-debug-symbols.py chore: strip trailing whitespace (#35969) 2023-02-01 12:59:16 +01:00
create-api-json.js refactor: use node scheme imports in scripts (#38846) 2023-06-22 16:21:42 +02:00
dbus_mock.py build: explicitly run scripts with python3 (#33720) 2022-04-12 13:21:55 +02:00
doc-only-change.js ci: clean up docs only change logic (#38456) 2023-05-30 12:38:41 -04:00
download-circleci-artifacts.js chore: cleanup unusued variables + enable linting (#38898) 2023-06-26 02:51:54 -07:00
export_all_patches.py build: fix missing patch config dir error (#35451) 2022-08-25 09:39:16 -07:00
gen-filenames.ts refactor: use node scheme imports in scripts (#38846) 2023-06-22 16:21:42 +02:00
gen-hunspell-filenames.js refactor: use node scheme imports in scripts (#38846) 2023-06-22 16:21:42 +02:00
gen-libc++-filenames.js chore: bump chromium to 117.0.5938.0 (main) (#39375) 2023-08-15 10:49:41 -05:00
generate-config-gypi.py feat: enable whole-program optimization native modules by default (#36937) 2023-01-25 13:06:05 -08:00
generate-deps-hash.js feat: I guess it's esm (#37535) 2023-08-30 17:38:07 -07:00
generate-version-json.js chore: cleanup unusued variables + enable linting (#38898) 2023-06-26 02:51:54 -07:00
generate-zip-manifest.py build: explicitly run scripts with python3 (#33720) 2022-04-12 13:21:55 +02:00
generate_node_version_header.py chore: move node headers generation to electron (#39589) 2023-08-22 11:13:49 +02:00
git-export-patches build: explicitly run scripts with python3 (#33720) 2022-04-12 13:21:55 +02:00
git-import-patches build: explicitly run scripts with python3 (#33720) 2022-04-12 13:21:55 +02:00
gn-asar-hash.js refactor: use node scheme imports in scripts (#38846) 2023-06-22 16:21:42 +02:00
gn-asar.js refactor: use node scheme imports in scripts (#38846) 2023-06-22 16:21:42 +02:00
gn-check.js refactor: use node scheme imports in scripts (#38846) 2023-06-22 16:21:42 +02:00
gn-plist-but-with-hashes.js refactor: use node scheme imports in scripts (#38846) 2023-06-22 16:21:42 +02:00
lint.js chore: cleanup unusued variables + enable linting (#38898) 2023-06-26 02:51:54 -07:00
nan-spec-runner.js chore: bump chromium to 117.0.5938.0 (main) (#39375) 2023-08-15 10:49:41 -05:00
native-test-targets.json chore: enable native unittesting (#20293) 2019-10-03 22:21:30 +02:00
native-tests.py build: explicitly run scripts with python3 (#33720) 2022-04-12 13:21:55 +02:00
node-disabled-tests.json test: enable parallel/test-debugger-random-port-with-inspect-port (#39533) 2023-08-17 12:16:14 -04:00
node-spec-runner.js refactor: use node scheme imports in scripts (#38846) 2023-06-22 16:21:42 +02:00
patches-mtime-cache.py build: explicitly run scripts with python3 (#33720) 2022-04-12 13:21:55 +02:00
prepare-appveyor.js refactor: use node scheme imports in scripts (#38846) 2023-06-22 16:21:42 +02:00
print-version.py build: determine electron version from tags not files (#36106) 2022-10-24 23:44:43 -07:00
push-patch.js refactor: use node scheme imports in scripts (#38846) 2023-06-22 16:21:42 +02:00
run-clang-format.py build: update clang-format script (#34286) 2022-06-08 21:26:41 +02:00
run-clang-tidy.ts refactor: use node scheme imports in scripts (#38846) 2023-06-22 16:21:42 +02:00
run-gn-format.py fix: use gn/clang-format from src (#19145) 2019-07-09 17:40:26 +09:00
run-if-exists.js refactor: use node scheme imports in scripts (#38846) 2023-06-22 16:21:42 +02:00
setup-win-for-dev.bat chore: bump chromium to 113.0.5636.0 (main) (#37130) 2023-03-10 10:07:42 -06:00
spec-runner.js chore: cleanup unusued variables + enable linting (#38898) 2023-06-26 02:51:54 -07:00
start-goma.ps1 ci: explicitly use python3 to start goma (#39650) 2023-08-24 21:43:24 -04:00
start.js refactor: use node scheme imports in scripts (#38846) 2023-06-22 16:21:42 +02:00
strip-binaries.py build: remove mips64el build config (#37093) 2023-02-02 20:53:54 +09:00
sysroots.json chore: bump chromium to 117.0.5938.0 (main) (#39375) 2023-08-15 10:49:41 -05:00
tar.py chore: move node headers generation to electron (#39589) 2023-08-22 11:13:49 +02:00
verify-chromedriver.py build: drop python2 from CI (#38259) 2023-05-15 02:06:12 -07:00
verify-ffmpeg.py build: explicitly run scripts with python3 (#33720) 2022-04-12 13:21:55 +02:00
verify-mksnapshot.py chore: bump chromium to 106.0.5216.0 (main) (#34993) 2022-08-17 11:35:53 -07:00
yarn.js refactor: use node scheme imports in scripts (#38846) 2023-06-22 16:21:42 +02:00
zip-symbols.py build: remove mips64el build config (#37093) 2023-02-02 20:53:54 +09:00