Skip to content

Commit 38512ef

Browse files
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) nodejs/node#52264 * src: expose LookupAndCompile with parameters nodejs/node#53886 * src: fix -Wshadow warning nodejs/node#53885 * lib: convert WeakMaps in cjs loader with symbol properties nodejs/node#52095 * src: reduce unnecessary serialization of CLI options in C++ nodejs/node#52451 * build: ensure v8_pointer_compression_sandbox is enabled on 64bit nodejs/node#53884 * lib: improve error message when index not found on cjs nodejs/node#53859 * src,lib: expose getCategoryEnabledBuffer to use on node.http nodejs/node#53602 * deps: update c-ares to v1.32.2 nodejs/node#53865 * chore: fixup patch indices * deps: update V8 to 12.2 nodejs/node#51362 * stream: Expose DuplexPair API nodejs/node#34111 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
1 parent 7cea992 commit 38512ef

File tree

36 files changed

+270
-363
lines changed

36 files changed

+270
-363
lines changed

DEPS

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ vars = {
44
'chromium_version':
55
'130.0.6672.0',
66
'node_version':
7-
'v20.16.0',
7+
'v20.17.0',
88
'nan_version':
99
'e14bdcd1f72d62bca1d541b66da43130384ec213',
1010
'squirrel.mac_version':

patches/chromium/can_create_window.patch

+5-5
Original file line numberDiff line numberDiff line change
@@ -210,15 +210,15 @@ index c576ace24e81cc877aa2595d40e0a13a7af9f6a2..210fb97d44c19c29af424cc7b9cb3169
210210

211211
} // namespace blink
212212
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
213-
index 96d7ba915e3d4248ad801237b0b43ff0b55be1a2..24cf1a2aa6f821c4d5597d98f3bf98a10bd30555 100644
213+
index 96d7ba915e3d4248ad801237b0b43ff0b55be1a2..8da4acbde65e933740a53de1dc45e7c779a688fb 100644
214214
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
215215
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
216-
@@ -2245,6 +2245,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
217-
216+
@@ -2246,6 +2246,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
218217
WebWindowFeatures window_features =
219218
GetWindowFeaturesFromString(features, entered_window);
220-
+
221-
+ window_features.raw_features = features;
222219

220+
+ window_features.raw_features = features;
221+
+
223222
if (window_features.is_partitioned_popin &&
224223
!IsFeatureEnabled(
224+
mojom::blink::PermissionsPolicyFeature::kPartitionedPopins,

patches/node/.patches

+2-5
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,13 @@ feat_add_uv_loop_interrupt_on_io_change_option_to_uv_loop_configure.patch
1717
support_v8_sandboxed_pointers.patch
1818
build_ensure_native_module_compilation_fails_if_not_using_a_new.patch
1919
fix_expose_the_built-in_electron_module_via_the_esm_loader.patch
20-
fix_expose_lookupandcompile_with_parameters.patch
2120
enable_crashpad_linux_node_processes.patch
2221
fix_lazyload_fs_in_esm_loaders_to_apply_asar_patches.patch
2322
chore_expose_importmoduledynamically_and.patch
2423
test_formally_mark_some_tests_as_flaky.patch
2524
fix_adapt_debugger_tests_for_upstream_v8_changes.patch
2625
chore_remove_--no-harmony-atomics_related_code.patch
2726
fix_account_for_createexternalizablestring_v8_global.patch
28-
fix_-wshadow_warning.patch
2927
fix_do_not_resolve_electron_entrypoints.patch
3028
ci_ensure_node_tests_set_electron_run_as_node.patch
3129
fix_assert_module_in_the_renderer_process.patch
@@ -37,7 +35,6 @@ fix_capture_embedder_exceptions_before_entering_v8.patch
3735
spec_add_iterator_to_global_intrinsics.patch
3836
test_make_test-node-output-v8-warning_generic.patch
3937
test_match_wpt_streams_transferable_transform-stream-members_any_js.patch
40-
build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch
4138
fix_revert_src_lb_reducing_c_calls_of_esm_legacy_main_resolve.patch
4239
deprecate_vector_v8_local_in_v8.patch
4340
fix_remove_deprecated_errno_constants.patch
@@ -52,6 +49,6 @@ chore_remove_calls_to_v8_functioncallbackinfo_holder.patch
5249
src_do_not_use_soon-to-be-deprecated_v8_api.patch
5350
fix_add_property_query_interceptors.patch
5451
src_account_for_openssl_unexpected_version.patch
55-
windows_32bit_config_change_callback_needs_to_be_stdcall.patch
56-
fix_building_with_unicode.patch
5752
src_stop_using_deprecated_fields_of_fastapicallbackoptions.patch
53+
src_use_supported_api_to_get_stalled_tla_messages.patch
54+
build_don_t_redefine_win32_lean_and_mean.patch

patches/node/build_add_gn_build_files.patch

+12-9
Original file line numberDiff line numberDiff line change
@@ -537,10 +537,10 @@ index 0e69d7383762f6b81c5b57698aa9d121d5a9c401..35bbeb37acc7ccb14b4b8a644ec3d4c7
537537
cflags_c = [
538538
"-mavx512vl",
539539
diff --git a/deps/cares/BUILD.gn b/deps/cares/BUILD.gn
540-
index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..087e27424f3997575e4e089a57955d04b8802321 100644
540+
index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..d083aea4cb895d8425041879f1b22a6ee43a0b60 100644
541541
--- a/deps/cares/BUILD.gn
542542
+++ b/deps/cares/BUILD.gn
543-
@@ -1,14 +1,170 @@
543+
@@ -1,14 +1,172 @@
544544
-##############################################################################
545545
-# #
546546
-# DO NOT EDIT THIS FILE! #
@@ -566,7 +566,6 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..087e27424f3997575e4e089a57955d04
566566
+ "include/ares_dns.h",
567567
+ "include/ares_dns_record.h",
568568
+ "include/ares_nameser.h",
569-
+ "include/ares_rules.h",
570569
+ "include/ares_version.h",
571570
+ "src/lib/ares__addrinfo2hostent.c",
572571
+ "src/lib/ares__addrinfo_localhost.c",
@@ -604,6 +603,8 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..087e27424f3997575e4e089a57955d04
604603
+ "src/lib/ares_data.h",
605604
+ "src/lib/ares_destroy.c",
606605
+ "src/lib/ares_dns_mapping.c",
606+
+ "src/lib/ares_dns_multistring.c",
607+
+ "src/lib/ares_dns_multistring.h",
607608
+ "src/lib/ares_dns_name.c",
608609
+ "src/lib/ares_dns_parse.c",
609610
+ "src/lib/ares_dns_record.c",
@@ -637,6 +638,7 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..087e27424f3997575e4e089a57955d04
637638
+ "src/lib/ares_library_init.c",
638639
+ "src/lib/ares_ipv6.h",
639640
+ "src/lib/ares_math.c",
641+
+ "src/lib/ares_metrics.c",
640642
+ "src/lib/ares_options.c",
641643
+ "src/lib/ares_parse_a_reply.c",
642644
+ "src/lib/ares_parse_aaaa_reply.c",
@@ -673,7 +675,6 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..087e27424f3997575e4e089a57955d04
673675
+ "src/lib/ares_version.c",
674676
+ "src/lib/inet_net_pton.c",
675677
+ "src/lib/inet_ntop.c",
676-
+ "src/lib/setup_once.h",
677678
+ "src/tools/ares_getopt.c",
678679
+ "src/tools/ares_getopt.h",
679680
+ ]
@@ -694,6 +695,7 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..087e27424f3997575e4e089a57955d04
694695
+ defines += [ "CARES_PULL_WS2TCPIP_H=1" ]
695696
+ include_dirs += [ "config/win32" ]
696697
+ sources += [
698+
+ "src/lib/ares_sysconfig_win.c",
697699
+ "src/lib/config-win32.h",
698700
+ "src/lib/windows_port.c",
699701
+ ]
@@ -1263,10 +1265,10 @@ index 0000000000000000000000000000000000000000..af9cbada10203b387fb9732b346583b1
12631265
+}
12641266
diff --git a/filenames.json b/filenames.json
12651267
new file mode 100644
1266-
index 0000000000000000000000000000000000000000..679329d847fbfe303792cab5881287890c9961f4
1268+
index 0000000000000000000000000000000000000000..646df853a2b985f14fd66cae6af854977c074706
12671269
--- /dev/null
12681270
+++ b/filenames.json
1269-
@@ -0,0 +1,736 @@
1271+
@@ -0,0 +1,737 @@
12701272
+// This file is automatically generated by generate_gn_filenames_json.py
12711273
+// DO NOT EDIT
12721274
+{
@@ -1636,6 +1638,7 @@ index 0000000000000000000000000000000000000000..679329d847fbfe303792cab588128789
16361638
+ "lib/internal/streams/destroy.js",
16371639
+ "lib/internal/streams/duplex.js",
16381640
+ "lib/internal/streams/duplexify.js",
1641+
+ "lib/internal/streams/duplexpair.js",
16391642
+ "lib/internal/streams/end-of-stream.js",
16401643
+ "lib/internal/streams/from.js",
16411644
+ "lib/internal/streams/lazy_transform.js",
@@ -2221,10 +2224,10 @@ index 909fd14345fcd988c381e640280f4b33f2e0c351..800431e6659f95f0495cb90b8fa2cccb
22212224
+ args = rebase_path(inputs + outputs, root_build_dir)
22222225
}
22232226
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
2224-
index bbb63df7899d4b9bf80e13eee78453352dd5c75b..804296db12f7864f72648f5f36834a924503e4a6 100644
2227+
index 706ea4f5cb90525c8ea56f794320a733c45a193f..c7ae7759595bfc7fdc31dab174a7514ddd8345e7 100644
22252228
--- a/src/node_builtins.cc
22262229
+++ b/src/node_builtins.cc
2227-
@@ -765,6 +765,7 @@ void BuiltinLoader::RegisterExternalReferences(
2230+
@@ -773,6 +773,7 @@ void BuiltinLoader::RegisterExternalReferences(
22282231
registry->Register(GetNatives);
22292232

22302233
RegisterExternalReferencesForInternalizedBuiltinCode(registry);
@@ -2233,7 +2236,7 @@ index bbb63df7899d4b9bf80e13eee78453352dd5c75b..804296db12f7864f72648f5f36834a92
22332236

22342237
} // namespace builtins
22352238
diff --git a/src/node_builtins.h b/src/node_builtins.h
2236-
index 75a7f3dd89e096d13ad7d70ed29d301cd56315b5..9a20a275fbe5df9f384b7b1d1d26806e7cd05384 100644
2239+
index 1cb85b9058d06555382e565dc32192a9fa48ed9f..cec9be01abd107e8612f70daf19b4834e118ffcf 100644
22372240
--- a/src/node_builtins.h
22382241
+++ b/src/node_builtins.h
22392242
@@ -74,6 +74,8 @@ using BuiltinCodeCacheMap =
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: Shelley Vohr <shelley.vohr@gmail.com>
3+
Date: Fri, 23 Aug 2024 16:50:19 +0200
4+
Subject: build: don't redefine WIN32_LEAN_AND_MEAN
5+
6+
https://github.com/nodejs/node/pull/53722 added a new define for WIN32_LEAN_AND_MEAN
7+
without first checking to see if it was defined - other areas in c-ares do this so
8+
we should here as well. Compilation errors occur otherwise:
9+
10+
../../third_party/electron_node/deps/cares/include\ares_build.h(168,11): error: 'WIN32_LEAN_AND_MEAN' macro redefined [-Werror,-Wmacro-redefined]
11+
168 | # define WIN32_LEAN_AND_MEAN
12+
| ^
13+
<command line>(25,9): note: previous definition is here
14+
25 | #define WIN32_LEAN_AND_MEAN 1
15+
| ^
16+
1 error generated.
17+
[287 processes, 49437/51449 @ 48.5/s : 1018.562s] CC obj/third_party/electron_node/deps/cares/cares/ares__socket.obj
18+
FAILED: obj/third_party/electron_node/deps/cares/cares/ares__socket.obj
19+
20+
This should be upstreamed.
21+
22+
diff --git a/deps/cares/include/ares_build.h b/deps/cares/include/ares_build.h
23+
index 18a92606a817145302c73b5081b4c989799bc620..bafd26d9210d2347fec41f028e9e65088b83c48c 100644
24+
--- a/deps/cares/include/ares_build.h
25+
+++ b/deps/cares/include/ares_build.h
26+
@@ -165,7 +165,9 @@
27+
# define CARES_TYPEOF_ARES_SOCKLEN_T int
28+
29+
#elif defined(_WIN32)
30+
-# define WIN32_LEAN_AND_MEAN
31+
+# ifndef WIN32_LEAN_AND_MEAN
32+
+# define WIN32_LEAN_AND_MEAN
33+
+# endif
34+
# define CARES_TYPEOF_ARES_SOCKLEN_T int
35+
# define CARES_HAVE_WINDOWS_H 1
36+
# define CARES_HAVE_SYS_TYPES_H 1

patches/node/build_enable_perfetto.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ index 8d7204f6cb48f783adc4d1c1eb2de0c83b7fffe2..a154559a56bf383d3c26af523c9bb07b
3333

3434
// Non-alphabetic chars.
3535
diff --git a/lib/internal/http.js b/lib/internal/http.js
36-
index b20b3cd229efcd9701791309361b7d106f315900..6b2820c9dcce5e658b694f53e75d93707c4320d7 100644
36+
index c26c322aafc64ed9ca2a7c1fd703555a251db9de..f94bc5824d6c83fd1feca31c572dcfd3ac130bda 100644
3737
--- a/lib/internal/http.js
3838
+++ b/lib/internal/http.js
3939
@@ -10,8 +10,8 @@ const {
4040
const { setUnrefTimeout } = require('internal/timers');
41-
const { trace, isTraceCategoryEnabled } = internalBinding('trace_events');
41+
const { getCategoryEnabledBuffer, trace } = internalBinding('trace_events');
4242
const {
4343
- CHAR_LOWERCASE_B,
4444
- CHAR_LOWERCASE_E,
@@ -47,7 +47,7 @@ index b20b3cd229efcd9701791309361b7d106f315900..6b2820c9dcce5e658b694f53e75d9370
4747
} = require('internal/constants');
4848

4949
let utcCache;
50-
@@ -44,11 +44,13 @@ function isTraceHTTPEnabled() {
50+
@@ -46,11 +46,13 @@ function isTraceHTTPEnabled() {
5151
const traceEventCategory = 'node,node.http';
5252

5353
function traceBegin(...args) {

patches/node/build_ensure_native_module_compilation_fails_if_not_using_a_new.patch

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Subject: build: ensure native module compilation fails if not using a new
77
This should not be upstreamed, it is a quality-of-life patch for downstream module builders.
88

99
diff --git a/common.gypi b/common.gypi
10-
index 9a27610992612b59eadcc8e481683cf1e6a5dbb6..1fad20645d059ad5f3efaa9279f582f99cb1006b 100644
10+
index 689e7fb2339253d0f2be3ccf33ecd76660ccf176..8736ad12eec294070a5160a64248044cd16347c9 100644
1111
--- a/common.gypi
1212
+++ b/common.gypi
1313
@@ -87,6 +87,8 @@
@@ -19,15 +19,15 @@ index 9a27610992612b59eadcc8e481683cf1e6a5dbb6..1fad20645d059ad5f3efaa9279f582f9
1919
##### end V8 defaults #####
2020

2121
# When building native modules using 'npm install' with the system npm,
22-
@@ -286,6 +288,7 @@
22+
@@ -287,6 +289,7 @@
2323
# Defines these mostly for node-gyp to pickup.
2424
'defines': [
2525
'_GLIBCXX_USE_CXX11_ABI=1',
2626
+ 'ELECTRON_ENSURE_CONFIG_GYPI',
2727
],
2828

2929
# Forcibly disable -Werror. We support a wide range of compilers, it's
30-
@@ -415,6 +418,11 @@
30+
@@ -416,6 +419,11 @@
3131
}],
3232
],
3333
}],
@@ -40,7 +40,7 @@ index 9a27610992612b59eadcc8e481683cf1e6a5dbb6..1fad20645d059ad5f3efaa9279f582f9
4040
# list in v8/BUILD.gn.
4141
['v8_enable_v8_checks == 1', {
4242
diff --git a/configure.py b/configure.py
43-
index f189ba2bf09fc248b3c1ce3c3535b939a4160ad2..2c24db93618f88f5f07e95a3edf63fb7942ac009 100755
43+
index 3084cc964cbe6d02f98d08cd6f847ea7f4a3d0db..5b6a3b62082985debf6ebc4bc09a7d056f58514a 100755
4444
--- a/configure.py
4545
+++ b/configure.py
4646
@@ -1559,6 +1559,7 @@ def configure_library(lib, output, pkgname=None):
@@ -52,7 +52,7 @@ index f189ba2bf09fc248b3c1ce3c3535b939a4160ad2..2c24db93618f88f5f07e95a3edf63fb7
5252
o['variables']['v8_enable_javascript_promise_hooks'] = 1
5353
o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0
5454
diff --git a/src/node.h b/src/node.h
55-
index c267ed1eeaa2d8b6ecd5a1563a4e9440bf0cca00..e55256996f2c85b0ae3854cbd1b83ca88a3e22cb 100644
55+
index 4f2eb9d0aab88b70c86339e750799080e980d7da..df3fb3372d6357b5d77b4f683e309b8483998128 100644
5656
--- a/src/node.h
5757
+++ b/src/node.h
5858
@@ -22,6 +22,12 @@

patches/node/build_ensure_v8_pointer_compression_sandbox_is_enabled_on_64bit.patch

-35
This file was deleted.

patches/node/build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ index f5ecc15159f457cd0b8069c0427b7c758c916c4e..c9ce67391f321989b0af48159b4da3ab
3434
let kResistStopPropagation;
3535

3636
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
37-
index 804296db12f7864f72648f5f36834a924503e4a6..2cac503e92640a4683a4be6969f1ed40e42785a0 100644
37+
index c7ae7759595bfc7fdc31dab174a7514ddd8345e7..4bf80aa6cc6385dc376fd0a3538efc27fe5bd0a2 100644
3838
--- a/src/node_builtins.cc
3939
+++ b/src/node_builtins.cc
4040
@@ -35,6 +35,7 @@ using v8::Value;
@@ -46,10 +46,10 @@ index 804296db12f7864f72648f5f36834a924503e4a6..2cac503e92640a4683a4be6969f1ed40
4646
AddExternalizedBuiltin(
4747
"internal/deps/cjs-module-lexer/lexer",
4848
diff --git a/src/node_builtins.h b/src/node_builtins.h
49-
index 9a20a275fbe5df9f384b7b1d1d26806e7cd05384..a1a9fe7d592f0d57b70dcee8c865b99d71248bf2 100644
49+
index cec9be01abd107e8612f70daf19b4834e118ffcf..3d9c6b962423555257bad4ebaad9ebd821d00042 100644
5050
--- a/src/node_builtins.h
5151
+++ b/src/node_builtins.h
52-
@@ -132,6 +132,7 @@ class NODE_EXTERN_PRIVATE BuiltinLoader {
52+
@@ -138,6 +138,7 @@ class NODE_EXTERN_PRIVATE BuiltinLoader {
5353

5454
// Generated by tools/js2c.py as node_javascript.cc
5555
void LoadJavaScriptSource(); // Loads data into source_

patches/node/cherry-pick_src_remove_calls_to_recently_deprecated_v8_apis.patch

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ This patch is expected to be deleted once we catch up with a Node.js
1515
upgrade that includes the original Node.js commit above.
1616

1717
diff --git a/src/module_wrap.cc b/src/module_wrap.cc
18-
index 9ad67e0993da4c3e3f8a14681edbf941cf14e2e6..29ed378d32d452518dc929e60e6038ba4ca38a5c 100644
18+
index ff658ec88e5161cd66536ee6e95dba675b16eccc..9bbb8ab908d8d992abb43254860d51f57f56387b 100644
1919
--- a/src/module_wrap.cc
2020
+++ b/src/module_wrap.cc
21-
@@ -186,8 +186,7 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) {
21+
@@ -202,8 +202,7 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) {
2222
}
2323

2424
Local<String> source_text = args[2].As<String>();
@@ -28,7 +28,7 @@ index 9ad67e0993da4c3e3f8a14681edbf941cf14e2e6..29ed378d32d452518dc929e60e6038ba
2828
line_offset,
2929
column_offset,
3030
true, // is cross origin
31-
@@ -394,7 +393,6 @@ void ModuleWrap::Evaluate(const FunctionCallbackInfo<Value>& args) {
31+
@@ -464,7 +463,6 @@ void ModuleWrap::Evaluate(const FunctionCallbackInfo<Value>& args) {
3232

3333
ShouldNotAbortOnUncaughtScope no_abort_scope(realm->env());
3434
TryCatchScope try_catch(realm->env());
@@ -37,7 +37,7 @@ index 9ad67e0993da4c3e3f8a14681edbf941cf14e2e6..29ed378d32d452518dc929e60e6038ba
3737
bool timed_out = false;
3838
bool received_signal = false;
3939
diff --git a/src/node_builtins.cc b/src/node_builtins.cc
40-
index f9a090f5c3e04403602ba383032e7f3230669a92..3f82db324d406e342abee23ab0d7f7c9807ff652 100644
40+
index 4bf80aa6cc6385dc376fd0a3538efc27fe5bd0a2..3e37aa8b0c9696cceb3f3cfab9721f38c74a2fba 100644
4141
--- a/src/node_builtins.cc
4242
+++ b/src/node_builtins.cc
4343
@@ -267,7 +267,7 @@ MaybeLocal<Function> BuiltinLoader::LookupAndCompileInternal(

patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ they use themselves as the entry point. We should try to upstream some form
88
of this.
99

1010
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
11-
index 155485dbab0d46bb225fa40e99f555d805659c4f..8183cffe9d7060571c08f696abb7c090e6df3be8 100644
11+
index 364469160af5e348f8890417de16a63c0d1dca67..75d5f58fe02fa8cfa7716ffaf761d567ab403a2c 100644
1212
--- a/lib/internal/modules/cjs/loader.js
1313
+++ b/lib/internal/modules/cjs/loader.js
14-
@@ -1331,6 +1331,13 @@ Module.prototype._compile = function(content, filename) {
14+
@@ -1441,6 +1441,13 @@ Module.prototype._compile = function(content, filename, loadAsESM = false) {
1515
if (getOptionValue('--inspect-brk') && process._eval == null) {
1616
if (!resolvedArgv) {
1717
// We enter the repl if we're not given a filename argument.
@@ -26,10 +26,10 @@ index 155485dbab0d46bb225fa40e99f555d805659c4f..8183cffe9d7060571c08f696abb7c090
2626
try {
2727
resolvedArgv = Module._resolveFilename(process.argv[1], null, false);
2828
diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js
29-
index 8fad2fe617e4f8d2364b8c9d3cfb27c265f08b5b..710af646aaf97f88ac2ee003d8f83388ccf9a84f 100644
29+
index 59308ab817fb864a7b84ecf349c9e08d1c710342..8398657065b28a4451b8fe3996e63838a1645314 100644
3030
--- a/lib/internal/process/pre_execution.js
3131
+++ b/lib/internal/process/pre_execution.js
32-
@@ -244,12 +244,14 @@ function patchProcessObject(expandArgv1) {
32+
@@ -245,12 +245,14 @@ function patchProcessObject(expandArgv1) {
3333
if (expandArgv1 && process.argv[1] &&
3434
!StringPrototypeStartsWith(process.argv[1], '-')) {
3535
// Expand process.argv[1] into a full path.

0 commit comments

Comments
 (0)