* 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>
* build(deps): update @electron/lint-roller
* chore: type check JS in docs
* docs: add @ts-check and @ts-expect-error to code blocks
* chore: fix type check errors in docs
* chore: add ts-type to blocks
#### Description of Change
The first sentence within the documentation "[Important: signing your code](https://www.electronjs.org/docs/latest/tutorial/tutorial-packaging#important-signing-your-code)" is grammatically incorrect.
> In order to distribute desktop applications to end users, we highly recommended for you to code sign your Electron app.
I've adjusted the copy to switch "highly recommended" to "highly recommend". I've also switched out "for you to code sign" for "that you code sign" for clarity.
> In order to distribute desktop applications to end users, we _highly recommend_ that you **code sign** your Electron app.
docs: fix code highlighting in preload tutorial
The highlighted lines in the code snippets were unaligned,
which could cause a newcomer unneeded confusion on what
lines need to be changed.
Fix incorrect highlight in an example snippet
At the moment, the "Communicating between processes" `main.js` snippet highlights the line containing `})` when the relevant line is `ipcMain.handle('ping', () => 'pong')`.
* docs: fix broken links
* docs: change link to navigator.getUserMedia
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
* docs: fix link in examples.md
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>