chore: bump node to v20.17.0 (main) (#43428)

* chore: bump node in DEPS to v20.17.0

* module: disallow CJS <-> ESM edges in a cycle from require(esm)

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

* src: expose LookupAndCompile with parameters

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

* src: fix -Wshadow warning

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

* lib: convert WeakMaps in cjs loader with symbol properties

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

* src: reduce unnecessary serialization of CLI options in C++

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

* build: ensure v8_pointer_compression_sandbox is enabled on 64bit

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

* lib: improve error message when index not found on cjs

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

* src,lib: expose getCategoryEnabledBuffer to use on node.http

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

* deps: update c-ares to v1.32.2

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

* chore: fixup patch indices

* deps: update V8 to 12.2

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

* stream: Expose DuplexPair API

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

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
electron-roller[bot] 2024-08-26 15:09:33 -04:00 committed by GitHub
parent 7cea992926
commit 38512efd25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
36 changed files with 270 additions and 363 deletions

View file

@ -6,7 +6,7 @@ Subject: fix: do not resolve electron entrypoints
This wastes fs cycles and can result in strange behavior if this path actually exists on disk
diff --git a/lib/internal/modules/esm/load.js b/lib/internal/modules/esm/load.js
index 449131b9af99744c08d62d73f8d124cef5c9cc71..3df06eff63106aece1009d88fd01df2abdf6d943 100644
index 22248b753c14960122f1d6b9bfe6b89fdb8d2010..9d245a04fbcb98dcd1c61e60f7cfe528bd1c8af0 100644
--- a/lib/internal/modules/esm/load.js
+++ b/lib/internal/modules/esm/load.js
@@ -132,7 +132,7 @@ async function defaultLoad(url, context = kEmptyObject) {
@ -19,19 +19,19 @@ index 449131b9af99744c08d62d73f8d124cef5c9cc71..3df06eff63106aece1009d88fd01df2a
context = { __proto__: context, source };
}
diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js
index 5e79fc2c04ffb6006229920cc1ab61b537fed4c0..d62565bf4fe51be41d9ce6ef3ffc04ed34d17e1a 100644
index f3dfc69cd2cdec50bc3b3f7cb2d63349812d87dd..b6f2d7194cb75ecc8c47869761c63184707ade40 100644
--- a/lib/internal/modules/esm/translators.js
+++ b/lib/internal/modules/esm/translators.js
@@ -379,6 +379,9 @@ function cjsPreparseModuleExports(filename, source) {
if (cached) {
return { module, exportNames: cached.exportNames };
}
+ if (filename === 'electron') {
+ return { module, exportNames: new SafeSet(['default', ...Object.keys(module.exports)]) };
+ }
@@ -375,6 +375,9 @@ function cjsPreparseModuleExports(filename, source) {
if (module && module[kModuleExportNames] !== undefined) {
return { module, exportNames: module[kModuleExportNames] };
}
+ if (filename === 'electron') {
+ return { module, exportNames: new SafeSet(['default', ...Object.keys(module.exports)]) };
+ }
const loaded = Boolean(module);
if (!loaded) {
module = new CJSModule(filename);
diff --git a/lib/internal/modules/run_main.js b/lib/internal/modules/run_main.js
index ca401044c0178c46db9b439b27c440a5d7924c84..dc1a682f0a3cf1ba1095c60bf6a6ca992d6043b3 100644
--- a/lib/internal/modules/run_main.js