Commit graph

11 commits

Author SHA1 Message Date
Darshan Sen
7493062555
test: add tests for valid electron module names (#35931)
* test: add tests for valid electron module names

https://github.com/electron/electron/pull/35915 landed without any
tests, so this change adds some. This also documents why these
variations exist.

Signed-off-by: Darshan Sen <raisinten@gmail.com>

* fixup! doc: rephrase comment

Signed-off-by: Darshan Sen <raisinten@gmail.com>

* fixup! test: remove "Uncaught Error:" from error regex

Signed-off-by: Darshan Sen <raisinten@gmail.com>

Signed-off-by: Darshan Sen <raisinten@gmail.com>
2022-10-11 15:59:23 +09:00
Samuel Attard
e31c96a564
fix: only override valid electron module names (#35915)
Fixes #33014
2022-10-06 19:14:03 +09:00
Cheng Zhao
959b657903
chore: remove Node.js patch on Module.globalPaths (#31275)
* chore: remove Node.js patch on Module.globalPaths

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2021-10-06 09:20:05 +09:00
Shelley Vohr
e89abed924
fix: disable use of the vm module in the renderer (#26087) 2020-10-23 11:49:52 -07:00
Matt Kane
dfbb88c5f6
fix: pass module resolution paths to wrapped function (#25891) 2020-10-14 10:13:45 -07:00
Samuel Attard
0d2e967960
feat: expose electron/{process} typed modules (#22937)
* feat: expose electron/{process} typed modules

* chore: update imports for common modules

* chore: update typescript generator

* chore: remap electron/* to the internal packages
2020-04-06 17:04:09 -07:00
Samuel Attard
5d657dece4
build: enable JS semicolons (#22783) 2020-03-20 13:28:31 -07:00
Samuel Attard
b87b501161
build: update eslint + eslint plugins (#22777)
* build: run eslint --fix

* chore: manually fix all hasOwnProperty errors

* chore: manually fix all void 0 vs undefined errors

* chore: manually fix all async-in-promise errors

* chore: manually fix lexical declaration in case block
2020-03-20 11:12:18 -04:00
Samuel Attard
24b3d66767
refactor: remove electron.asar and embed JS in binary (#18577)
* refactor: remove electron.asar and embed JS in binary

* chore: update DEPS to merged node sha

* chore: remove unneeded eslint ignore
2019-06-03 17:03:59 -07:00
Samuel Attard
bc527f6b51
refactor: bundle the browser and renderer process electron code (#18553)
* refactor: bundle the browser and renderer process electron code

* Bundles browser/init and renderer/init
  * Improves load performance of main process by ~40%
  * Improves load performance of renderer process by ~30%
* Prevents users from importing our "requiring" our internal logic such
as ipc-main-internal.  This makes those message buses safer as they are
less accessible, there is still some more work to be done though to lock
down those buses completely.
* The electron.asar file now only contains 2 files, as a future
improvement maybe we can use atom_natives to ship these two files
embedded in the binary
* This also removes our dependency on browserify which had some strange
edge cases that caused us to have to hack around require-order and
stopped us using certain ES6/7 features we should have been able to use
(async / await in some files in the sandboxed renderer init script)

TLDR: Things are faster and better :)

* fix: I really do not want to talk about it

* chore: add performance improvements from debugging

* fix: resolve the provided path so webpack thinks it is absolute

* chore: fixup per PR review

* fix: use webpacks ProvidePlugin to keep global, process and Buffer alive after deletion from global scope for use in internal code

* fix: bundle worker/init as well to make node-in-workers work

* chore: update wording as per feedback

* chore: make the timers hack work when yarn is not used
2019-06-02 13:03:03 -07:00
Samuel Attard
01c442de64 refactor: convert more files to typescript (#16820) 2019-02-12 04:22:33 -10:00
Renamed from lib/common/reset-search-paths.js (Browse further)