From c5f4a6c44bd776d54c69403b51e4a37c687c61fe Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 12:13:12 +0100 Subject: [PATCH] chore: bump node to v20.18.3 (33-x-y) (#45299) * chore: bump node in DEPS to v20.18.2 * chore: bump node in DEPS to v20.18.3 * src: fix outdated js2c.cc references https://github.com/nodejs/node/pull/56133 * lib: remove startsWith/endsWith primordials for char checks https://github.com/nodejs/node/pull/55407 * test,crypto: make crypto tests work with BoringSSL https://github.com/nodejs/node/pull/55491 * fix: potential WIN32_LEAN_AND_MEAN redefinition https://github.com/c-ares/c-ares/pull/869 * deps: update c-ares to v1.34.1 https://github.com/nodejs/node/pull/55369 * chore fixup patch indices * chore: fix bssl test conditiojnal --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr --- DEPS | 2 +- patches/node/.patches | 1 - patches/node/build_add_gn_build_files.patch | 114 +++++++------- .../build_compile_with_c_20_support.patch | 2 +- ...d_don_t_redefine_win32_lean_and_mean.patch | 36 ----- ...compilation_fails_if_not_using_a_new.patch | 8 +- ...f_original-fs_and_custom_embedder_js.patch | 15 +- ...e_clang_as_default_compiler_on_macos.patch | 2 +- ...de_entrypoint_to_be_a_builtin_module.patch | 8 +- ..._values_for_variables_in_common_gypi.patch | 2 +- ...ssert_module_in_the_renderer_process.patch | 4 +- .../fix_crypto_tests_to_run_with_bssl.patch | 141 +----------------- ..._do_not_resolve_electron_entrypoints.patch | 2 +- ...n_electron_module_via_the_esm_loader.patch | 10 +- ...se_tracing_tracingcontroller_instead.patch | 2 +- ...ingssl_and_openssl_incompatibilities.patch | 2 +- ...in_esm_loaders_to_apply_asar_patches.patch | 10 +- ...g_c_calls_of_esm_legacy_main_resolve.patch | 2 +- ..._on_wrapper-descriptor-based_cppheap.patch | 4 +- .../node/support_v8_sandboxed_pointers.patch | 10 +- ...st_formally_mark_some_tests_as_flaky.patch | 4 +- 21 files changed, 114 insertions(+), 267 deletions(-) delete mode 100644 patches/node/build_don_t_redefine_win32_lean_and_mean.patch diff --git a/DEPS b/DEPS index c0e126ee7987..d976bd509b21 100644 --- a/DEPS +++ b/DEPS @@ -4,7 +4,7 @@ vars = { 'chromium_version': '130.0.6723.191', 'node_version': - 'v20.18.1', + 'v20.18.3', 'nan_version': 'e14bdcd1f72d62bca1d541b66da43130384ec213', 'squirrel.mac_version': diff --git a/patches/node/.patches b/patches/node/.patches index df4faf50099f..fd93c89bbb7c 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -48,7 +48,6 @@ test_update_v8-stats_test_for_v8_12_6.patch src_do_not_use_soon-to-be-deprecated_v8_api.patch fix_add_property_query_interceptors.patch src_stop_using_deprecated_fields_of_fastapicallbackoptions.patch -build_don_t_redefine_win32_lean_and_mean.patch src_use_supported_api_to_get_stalled_tla_messages.patch build_compile_with_c_20_support.patch add_v8_taskpirority_to_foreground_task_runner_signature.patch diff --git a/patches/node/build_add_gn_build_files.patch b/patches/node/build_add_gn_build_files.patch index 4eaca75434fb..641652056653 100644 --- a/patches/node/build_add_gn_build_files.patch +++ b/patches/node/build_add_gn_build_files.patch @@ -537,17 +537,21 @@ index 0e69d7383762f6b81c5b57698aa9d121d5a9c401..35bbeb37acc7ccb14b4b8a644ec3d4c7 cflags_c = [ "-mavx512vl", diff --git a/deps/cares/BUILD.gn b/deps/cares/BUILD.gn -index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..7f4885631a85a25692e8969991951be02e5d73f1 100644 +index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..ef745c19f2b1cd433cc43c834a18db7eaa8e5162 100644 --- a/deps/cares/BUILD.gn +++ b/deps/cares/BUILD.gn -@@ -1,14 +1,175 @@ +@@ -1,14 +1,188 @@ -############################################################################## -# # -# DO NOT EDIT THIS FILE! # -# # -############################################################################## +config("cares_config") { -+ include_dirs = [ "include", "src/lib" ] ++ include_dirs = [ ++ "include", ++ "src/lib", ++ "src/lib/include", ++ ] +} +static_library("cares") { + defines = [ "CARES_STATICLIB" ] @@ -563,20 +567,19 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..7f4885631a85a25692e8969991951be0 + + sources = [ + "include/ares.h", ++ "include/ares_build.h", + "include/ares_dns.h", + "include/ares_dns_record.h", + "include/ares_nameser.h", + "include/ares_version.h", -+ "src/lib/ares__addrinfo2hostent.c", -+ "src/lib/ares__addrinfo_localhost.c", -+ "src/lib/ares__close_sockets.c", -+ "src/lib/ares__hosts_file.c", -+ "src/lib/ares__parse_into_addrinfo.c", -+ "src/lib/ares__socket.c", -+ "src/lib/ares__sortaddrinfo.c", ++ "src/lib/ares_addrinfo2hostent.c", ++ "src/lib/ares_addrinfo_localhost.c", + "src/lib/ares_android.c", + "src/lib/ares_android.h", + "src/lib/ares_cancel.c", ++ "src/lib/ares_close_sockets.c", ++ "src/lib/ares_conn.c", ++ "src/lib/ares_conn.h", + "src/lib/ares_cookie.c", + "src/lib/ares_data.c", + "src/lib/ares_data.h", @@ -590,43 +593,43 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..7f4885631a85a25692e8969991951be0 + "src/lib/ares_gethostbyaddr.c", + "src/lib/ares_gethostbyname.c", + "src/lib/ares_getnameinfo.c", ++ "src/lib/ares_hosts_file.c", + "src/lib/ares_inet_net_pton.h", + "src/lib/ares_init.c", + "src/lib/ares_ipv6.h", + "src/lib/ares_library_init.c", + "src/lib/ares_metrics.c", + "src/lib/ares_options.c", -+ "src/lib/ares_platform.c", -+ "src/lib/ares_platform.h", ++ "src/lib/ares_parse_into_addrinfo.c", + "src/lib/ares_private.h", + "src/lib/ares_process.c", + "src/lib/ares_qcache.c", + "src/lib/ares_query.c", + "src/lib/ares_search.c", + "src/lib/ares_send.c", ++ "src/lib/ares_set_socket_functions.c", + "src/lib/ares_setup.h", ++ "src/lib/ares_socket.c", ++ "src/lib/ares_socket.h", ++ "src/lib/ares_sortaddrinfo.c", + "src/lib/ares_strerror.c", + "src/lib/ares_sysconfig.c", + "src/lib/ares_sysconfig_files.c", + "src/lib/ares_timeout.c", + "src/lib/ares_update_servers.c", + "src/lib/ares_version.c", -+ "src/lib/dsa/ares__array.c", -+ "src/lib/dsa/ares__array.h", -+ "src/lib/dsa/ares__htable.c", -+ "src/lib/dsa/ares__htable.h", -+ "src/lib/dsa/ares__htable_asvp.c", -+ "src/lib/dsa/ares__htable_asvp.h", -+ "src/lib/dsa/ares__htable_strvp.c", -+ "src/lib/dsa/ares__htable_strvp.h", -+ "src/lib/dsa/ares__htable_szvp.c", -+ "src/lib/dsa/ares__htable_szvp.h", -+ "src/lib/dsa/ares__htable_vpvp.c", -+ "src/lib/dsa/ares__htable_vpvp.h", -+ "src/lib/dsa/ares__llist.c", -+ "src/lib/dsa/ares__llist.h", -+ "src/lib/dsa/ares__slist.c", -+ "src/lib/dsa/ares__slist.h", ++ "src/lib/dsa/ares_array.c", ++ "src/lib/dsa/ares_htable.c", ++ "src/lib/dsa/ares_htable.h", ++ "src/lib/dsa/ares_htable_asvp.c", ++ "src/lib/dsa/ares_htable_dict.c", ++ "src/lib/dsa/ares_htable_strvp.c", ++ "src/lib/dsa/ares_htable_szvp.c", ++ "src/lib/dsa/ares_htable_vpstr.c", ++ "src/lib/dsa/ares_htable_vpvp.c", ++ "src/lib/dsa/ares_llist.c", ++ "src/lib/dsa/ares_slist.c", ++ "src/lib/dsa/ares_slist.h", + "src/lib/event/ares_event.h", + "src/lib/event/ares_event_configchg.c", + "src/lib/event/ares_event_epoll.c", @@ -637,6 +640,17 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..7f4885631a85a25692e8969991951be0 + "src/lib/event/ares_event_wake_pipe.c", + "src/lib/event/ares_event_win32.c", + "src/lib/event/ares_event_win32.h", ++ "src/lib/include/ares_array.h", ++ "src/lib/include/ares_buf.h", ++ "src/lib/include/ares_htable_asvp.h", ++ "src/lib/include/ares_htable_dict.h", ++ "src/lib/include/ares_htable_strvp.h", ++ "src/lib/include/ares_htable_szvp.h", ++ "src/lib/include/ares_htable_vpstr.h", ++ "src/lib/include/ares_htable_vpvp.h", ++ "src/lib/include/ares_llist.h", ++ "src/lib/include/ares_mem.h", ++ "src/lib/include/ares_str.h", + "src/lib/inet_net_pton.c", + "src/lib/inet_ntop.c", + "src/lib/legacy/ares_create_query.c", @@ -663,23 +677,22 @@ index ac19ac73ed1e24c61cb679f3851685b79cfc8b39..7f4885631a85a25692e8969991951be0 + "src/lib/record/ares_dns_private.h", + "src/lib/record/ares_dns_record.c", + "src/lib/record/ares_dns_write.c", -+ "src/lib/str/ares__buf.c", -+ "src/lib/str/ares__buf.h", ++ "src/lib/str/ares_buf.c", + "src/lib/str/ares_str.c", -+ "src/lib/str/ares_str.h", -+ "src/lib/str/ares_strcasecmp.c", -+ "src/lib/str/ares_strcasecmp.h", + "src/lib/str/ares_strsplit.c", + "src/lib/str/ares_strsplit.h", -+ "src/lib/util/ares__iface_ips.c", -+ "src/lib/util/ares__iface_ips.h", -+ "src/lib/util/ares__threads.c", -+ "src/lib/util/ares__threads.h", -+ "src/lib/util/ares__timeval.c", ++ "src/lib/util/ares_iface_ips.c", ++ "src/lib/util/ares_iface_ips.h", + "src/lib/util/ares_math.c", ++ "src/lib/util/ares_math.h", + "src/lib/util/ares_rand.c", -+ "src/tools/ares_getopt.c", -+ "src/tools/ares_getopt.h", ++ "src/lib/util/ares_rand.h", ++ "src/lib/util/ares_threads.c", ++ "src/lib/util/ares_threads.h", ++ "src/lib/util/ares_time.h", ++ "src/lib/util/ares_timeval.c", ++ "src/lib/util/ares_uri.c", ++ "src/lib/util/ares_uri.h", + ] + + if (!is_win) { @@ -2247,19 +2260,6 @@ index 706ea4f5cb90525c8ea56f794320a733c45a193f..c7ae7759595bfc7fdc31dab174a7514d } } // namespace builtins -diff --git a/src/node_builtins.h b/src/node_builtins.h -index 1cb85b9058d06555382e565dc32192a9fa48ed9f..cec9be01abd107e8612f70daf19b4834e118ffcf 100644 ---- a/src/node_builtins.h -+++ b/src/node_builtins.h -@@ -74,6 +74,8 @@ using BuiltinCodeCacheMap = - // Generated by tools/js2c.py as node_javascript.cc - void RegisterExternalReferencesForInternalizedBuiltinCode( - ExternalReferenceRegistry* registry); -+void EmbedderRegisterExternalReferencesForInternalizedBuiltinCode( -+ ExternalReferenceRegistry* registry); - - // Handles compilation and caching of built-in JavaScript modules and - // bootstrap scripts, whose source are bundled into the binary as static data. diff --git a/tools/generate_gn_filenames_json.py b/tools/generate_gn_filenames_json.py new file mode 100755 index 0000000000000000000000000000000000000000..37c16859003e61636fe2f1a4040b1e904c472d0b @@ -2409,10 +2409,10 @@ index 0000000000000000000000000000000000000000..9be3ac447f9a4dde23fefc26e0b922b4 + transformed_f.write(transformed_contents) + diff --git a/tools/install.py b/tools/install.py -index b132c7bf26c02886a7ab341a1973bf449744ba0f..757e3e60a7be01fac55c5fbb010dbbae00b1bfca 100755 +index 2dceb5c39ea4a11034ce93899fa26dc406e0b5d0..a425de8ad7833f4d39c842fd896539c1f77468bc 100755 --- a/tools/install.py +++ b/tools/install.py -@@ -264,6 +264,7 @@ def headers(options, action): +@@ -270,6 +270,7 @@ def headers(options, action): 'include/v8-forward.h', 'include/v8-function-callback.h', 'include/v8-function.h', @@ -2420,7 +2420,7 @@ index b132c7bf26c02886a7ab341a1973bf449744ba0f..757e3e60a7be01fac55c5fbb010dbbae 'include/v8-initialization.h', 'include/v8-internal.h', 'include/v8-isolate.h', -@@ -284,6 +285,8 @@ def headers(options, action): +@@ -290,6 +291,8 @@ def headers(options, action): 'include/v8-promise.h', 'include/v8-proxy.h', 'include/v8-regexp.h', @@ -2429,7 +2429,7 @@ index b132c7bf26c02886a7ab341a1973bf449744ba0f..757e3e60a7be01fac55c5fbb010dbbae 'include/v8-script.h', 'include/v8-snapshot.h', 'include/v8-statistics.h', -@@ -390,7 +393,7 @@ def parse_options(args): +@@ -396,7 +399,7 @@ def parse_options(args): parser.add_argument('--build-dir', help='the location of built binaries', default='out/Release') parser.add_argument('--v8-dir', help='the location of V8', diff --git a/patches/node/build_compile_with_c_20_support.patch b/patches/node/build_compile_with_c_20_support.patch index bef0bb28e97c..91f2df2f96f1 100644 --- a/patches/node/build_compile_with_c_20_support.patch +++ b/patches/node/build_compile_with_c_20_support.patch @@ -10,7 +10,7 @@ V8 requires C++20 support as of https://chromium-review.googlesource.com/c/v8/v8 This can be removed when Electron upgrades to a version of Node.js containing the required V8 version. diff --git a/common.gypi b/common.gypi -index bdf1a1f33f3ea09d933757c7fee87c563cc833ab..2eb62610db2f0ebf68fa9a55ffba98291ecfe451 100644 +index 690068f093f12b6831f8ccce41289d02d7047a7a..5a3df388773ad288553bf036be42dc1a0ba75c09 100644 --- a/common.gypi +++ b/common.gypi @@ -305,7 +305,7 @@ diff --git a/patches/node/build_don_t_redefine_win32_lean_and_mean.patch b/patches/node/build_don_t_redefine_win32_lean_and_mean.patch deleted file mode 100644 index 4fd6a0c6128f..000000000000 --- a/patches/node/build_don_t_redefine_win32_lean_and_mean.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shelley Vohr -Date: Fri, 23 Aug 2024 16:50:19 +0200 -Subject: build: don't redefine WIN32_LEAN_AND_MEAN - -https://github.com/nodejs/node/pull/53722 added a new define for WIN32_LEAN_AND_MEAN -without first checking to see if it was defined - other areas in c-ares do this so -we should here as well. Compilation errors occur otherwise: - -../../third_party/electron_node/deps/cares/include\ares_build.h(168,11): error: 'WIN32_LEAN_AND_MEAN' macro redefined [-Werror,-Wmacro-redefined] - 168 | # define WIN32_LEAN_AND_MEAN - | ^ -(25,9): note: previous definition is here - 25 | #define WIN32_LEAN_AND_MEAN 1 - | ^ -1 error generated. -[287 processes, 49437/51449 @ 48.5/s : 1018.562s] CC obj/third_party/electron_node/deps/cares/cares/ares__socket.obj -FAILED: obj/third_party/electron_node/deps/cares/cares/ares__socket.obj - -This should be upstreamed. - -diff --git a/deps/cares/include/ares_build.h b/deps/cares/include/ares_build.h -index 18a92606a817145302c73b5081b4c989799bc620..bafd26d9210d2347fec41f028e9e65088b83c48c 100644 ---- a/deps/cares/include/ares_build.h -+++ b/deps/cares/include/ares_build.h -@@ -165,7 +165,9 @@ - # define CARES_TYPEOF_ARES_SOCKLEN_T int - - #elif defined(_WIN32) --# define WIN32_LEAN_AND_MEAN -+# ifndef WIN32_LEAN_AND_MEAN -+# define WIN32_LEAN_AND_MEAN -+# endif - # define CARES_TYPEOF_ARES_SOCKLEN_T int - # define CARES_HAVE_WINDOWS_H 1 - # define CARES_HAVE_SYS_TYPES_H 1 diff --git a/patches/node/build_ensure_native_module_compilation_fails_if_not_using_a_new.patch b/patches/node/build_ensure_native_module_compilation_fails_if_not_using_a_new.patch index fcef56aa834d..324487aa385d 100644 --- a/patches/node/build_ensure_native_module_compilation_fails_if_not_using_a_new.patch +++ b/patches/node/build_ensure_native_module_compilation_fails_if_not_using_a_new.patch @@ -7,7 +7,7 @@ Subject: build: ensure native module compilation fails if not using a new This should not be upstreamed, it is a quality-of-life patch for downstream module builders. diff --git a/common.gypi b/common.gypi -index 697b8bba6a55358924d6986f2eb347a99ff73889..bdf1a1f33f3ea09d933757c7fee87c563cc833ab 100644 +index 776a6dcf3a729a65b367fb5b4c5685f841089eea..690068f093f12b6831f8ccce41289d02d7047a7a 100644 --- a/common.gypi +++ b/common.gypi @@ -86,6 +86,8 @@ @@ -40,10 +40,10 @@ index 697b8bba6a55358924d6986f2eb347a99ff73889..bdf1a1f33f3ea09d933757c7fee87c56 # list in v8/BUILD.gn. ['v8_enable_v8_checks == 1', { diff --git a/configure.py b/configure.py -index 0d089c35d1720e05c4c61d0226a2ebc276b65d6e..cf19b9d092698e1697508e8891926947bc2f7b12 100755 +index 0df90b176e9b5403efdb1393c0f2f37bb53dc6b2..ece665915ad4d6e02762ec3165cf7b987a87949d 100755 --- a/configure.py +++ b/configure.py -@@ -1585,6 +1585,7 @@ def configure_library(lib, output, pkgname=None): +@@ -1595,6 +1595,7 @@ def configure_library(lib, output, pkgname=None): def configure_v8(o): @@ -52,7 +52,7 @@ index 0d089c35d1720e05c4c61d0226a2ebc276b65d6e..cf19b9d092698e1697508e8891926947 o['variables']['v8_enable_javascript_promise_hooks'] = 1 o['variables']['v8_enable_lite_mode'] = 1 if options.v8_lite_mode else 0 diff --git a/src/node.h b/src/node.h -index 4f2eb9d0aab88b70c86339e750799080e980d7da..df3fb3372d6357b5d77b4f683e309b8483998128 100644 +index 7d9d9afd049237646f82c3e22f5e7a8af7314a84..a941d9987abcbb0f9db3072b8c896a5f328dd027 100644 --- a/src/node.h +++ b/src/node.h @@ -22,6 +22,12 @@ diff --git a/patches/node/build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch b/patches/node/build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch index 6c5aa0275398..9f3887336788 100644 --- a/patches/node/build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch +++ b/patches/node/build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch @@ -46,12 +46,21 @@ index c7ae7759595bfc7fdc31dab174a7514ddd8345e7..4bf80aa6cc6385dc376fd0a3538efc27 AddExternalizedBuiltin( "internal/deps/cjs-module-lexer/lexer", diff --git a/src/node_builtins.h b/src/node_builtins.h -index cec9be01abd107e8612f70daf19b4834e118ffcf..3d9c6b962423555257bad4ebaad9ebd821d00042 100644 +index a73de23a1debfdac66873e0baccf882e383bfc36..c3c987d535285be84026ad0c633650bd2067d22d 100644 --- a/src/node_builtins.h +++ b/src/node_builtins.h -@@ -138,6 +138,7 @@ class NODE_EXTERN_PRIVATE BuiltinLoader { +@@ -74,6 +74,8 @@ using BuiltinCodeCacheMap = + // Generated by tools/js2c.cc as node_javascript.cc + void RegisterExternalReferencesForInternalizedBuiltinCode( + ExternalReferenceRegistry* registry); ++void EmbedderRegisterExternalReferencesForInternalizedBuiltinCode( ++ ExternalReferenceRegistry* registry); - // Generated by tools/js2c.py as node_javascript.cc + // Handles compilation and caching of built-in JavaScript modules and + // bootstrap scripts, whose source are bundled into the binary as static data. +@@ -136,6 +138,7 @@ class NODE_EXTERN_PRIVATE BuiltinLoader { + + // Generated by tools/js2c.cc as node_javascript.cc void LoadJavaScriptSource(); // Loads data into source_ + void LoadEmbedderJavaScriptSource(); // Loads embedder data into source_ UnionBytes GetConfig(); // Return data for config.gypi diff --git a/patches/node/build_restore_clang_as_default_compiler_on_macos.patch b/patches/node/build_restore_clang_as_default_compiler_on_macos.patch index 0423182e8bbf..8f88cef97b2d 100644 --- a/patches/node/build_restore_clang_as_default_compiler_on_macos.patch +++ b/patches/node/build_restore_clang_as_default_compiler_on_macos.patch @@ -11,7 +11,7 @@ node-gyp will use the result of `process.config` that reflects the environment in which the binary got built. diff --git a/common.gypi b/common.gypi -index 2eb62610db2f0ebf68fa9a55ffba98291ecfe451..3ec08ee144b586d05c4e49c2251416734cbc02c5 100644 +index 5a3df388773ad288553bf036be42dc1a0ba75c09..9bbf1b277eb17d78ca385643c3177638fd75866a 100644 --- a/common.gypi +++ b/common.gypi @@ -125,6 +125,7 @@ diff --git a/patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch b/patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch index e898eeee2197..3f6d6b6f619a 100644 --- a/patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch +++ b/patches/node/chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch @@ -26,12 +26,12 @@ index 364469160af5e348f8890417de16a63c0d1dca67..75d5f58fe02fa8cfa7716ffaf761d567 try { resolvedArgv = Module._resolveFilename(process.argv[1], null, false); diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js -index a05d2846050c2f505eac16320f645e79182a27f6..348bb80ef7fae1e0e5f529b1313093eeadad9276 100644 +index 0bbabb80c26a1208860f6d32447c0ae53316f501..ba18bfa3cd17c2b8e977f53651ce2744b17a829f 100644 --- a/lib/internal/process/pre_execution.js +++ b/lib/internal/process/pre_execution.js -@@ -247,12 +247,14 @@ function patchProcessObject(expandArgv1) { - if (expandArgv1 && process.argv[1] && - !StringPrototypeStartsWith(process.argv[1], '-')) { +@@ -245,12 +245,14 @@ function patchProcessObject(expandArgv1) { + // the entry point. + if (expandArgv1 && process.argv[1] && process.argv[1][0] !== '-') { // Expand process.argv[1] into a full path. - const path = require('path'); - try { diff --git a/patches/node/fix_add_default_values_for_variables_in_common_gypi.patch b/patches/node/fix_add_default_values_for_variables_in_common_gypi.patch index 0c0aebff563b..a4488412edba 100644 --- a/patches/node/fix_add_default_values_for_variables_in_common_gypi.patch +++ b/patches/node/fix_add_default_values_for_variables_in_common_gypi.patch @@ -7,7 +7,7 @@ common.gypi is a file that's included in the node header bundle, despite the fact that we do not build node with gyp. diff --git a/common.gypi b/common.gypi -index 1ece4f5e494533ea0fa25e0d35143fe424dbf70b..697b8bba6a55358924d6986f2eb347a99ff73889 100644 +index 04852d81103ef83c5213464f543839dea6f0b181..776a6dcf3a729a65b367fb5b4c5685f841089eea 100644 --- a/common.gypi +++ b/common.gypi @@ -88,6 +88,23 @@ diff --git a/patches/node/fix_assert_module_in_the_renderer_process.patch b/patches/node/fix_assert_module_in_the_renderer_process.patch index 1bedd2aaeb3e..6cda5fa4b81c 100644 --- a/patches/node/fix_assert_module_in_the_renderer_process.patch +++ b/patches/node/fix_assert_module_in_the_renderer_process.patch @@ -58,10 +58,10 @@ index b9098d102b40adad7fafcc331ac62870617019b9..cb9269a31e073caf86164aa39c064037 } diff --git a/src/node_options.cc b/src/node_options.cc -index efbe48e10b8408642a6b5010b1a7a3749068188a..9b5f49ebb478a21acf8f0d6ed012ed6829a8a320 100644 +index b7ef44b018c7aec59d8311642a811d1280247689..e19b9d88a908154dbcfd0b0e3efbc7510609f810 100644 --- a/src/node_options.cc +++ b/src/node_options.cc -@@ -1405,14 +1405,16 @@ void GetEmbedderOptions(const FunctionCallbackInfo& args) { +@@ -1409,14 +1409,16 @@ void GetEmbedderOptions(const FunctionCallbackInfo& args) { } Isolate* isolate = args.GetIsolate(); diff --git a/patches/node/fix_crypto_tests_to_run_with_bssl.patch b/patches/node/fix_crypto_tests_to_run_with_bssl.patch index 83b02e0c3fcd..8602b180a635 100644 --- a/patches/node/fix_crypto_tests_to_run_with_bssl.patch +++ b/patches/node/fix_crypto_tests_to_run_with_bssl.patch @@ -347,7 +347,7 @@ index 81a469c226c261564dee1e0b06b6571b18a41f1f..58b66045dba4201b7ebedd78b129420f const availableCurves = new Set(crypto.getCurves()); diff --git a/test/parallel/test-crypto-dh-errors.js b/test/parallel/test-crypto-dh-errors.js -index fcf1922bcdba733af6c22f142db4f7b099947757..9f72ae4e41a113e752f40795103c2af514538780 100644 +index 476ca64b4425b5b8b0fa2dc8352ee6f03d563813..2250a8f24a875d6af198426891870b450078ee5f 100644 --- a/test/parallel/test-crypto-dh-errors.js +++ b/test/parallel/test-crypto-dh-errors.js @@ -32,9 +32,9 @@ for (const bits of [-1, 0, 1]) { @@ -362,24 +362,6 @@ index fcf1922bcdba733af6c22f142db4f7b099947757..9f72ae4e41a113e752f40795103c2af5 }); } } -@@ -43,7 +43,7 @@ for (const g of [-1, 1]) { - const ex = { - code: 'ERR_OSSL_DH_BAD_GENERATOR', - name: 'Error', -- message: /bad generator/, -+ message: /bad generator|BAD_GENERATOR/, - }; - assert.throws(() => crypto.createDiffieHellman('abcdef', g), ex); - assert.throws(() => crypto.createDiffieHellman('abcdef', 'hex', g), ex); -@@ -55,7 +55,7 @@ for (const g of [Buffer.from([]), - const ex = { - code: 'ERR_OSSL_DH_BAD_GENERATOR', - name: 'Error', -- message: /bad generator/, -+ message: /bad generator|BAD_GENERATOR/, - }; - assert.throws(() => crypto.createDiffieHellman('abcdef', g), ex); - assert.throws(() => crypto.createDiffieHellman('abcdef', 'hex', g), ex); diff --git a/test/parallel/test-crypto-dh.js b/test/parallel/test-crypto-dh.js index 8ae0a002fec0944737d2c6ae73fc8956e41beb50..5b37236a6c2f1ec1761d8143c8ea6a7e2a837a7a 100644 --- a/test/parallel/test-crypto-dh.js @@ -535,19 +517,6 @@ index f1f14b472997e76bb4100edb1c6cf4fc24d1074d..5057e3f9bc5bb78aceffa5e79530f8ce }); // No-pad encrypted string should return the same: -diff --git a/test/parallel/test-crypto-private-decrypt-gh32240.js b/test/parallel/test-crypto-private-decrypt-gh32240.js -index 1785f5eef3d202976666081d09850ed744d83446..e88227a215ba4f7fa196f7642ae694a57d55b3ca 100644 ---- a/test/parallel/test-crypto-private-decrypt-gh32240.js -+++ b/test/parallel/test-crypto-private-decrypt-gh32240.js -@@ -24,7 +24,7 @@ const pkeyEncrypted = - pair.privateKey.export({ - type: 'pkcs1', - format: 'pem', -- cipher: 'aes128', -+ cipher: 'aes-128-cbc', - passphrase: 'secret', - }); - diff --git a/test/parallel/test-crypto-rsa-dsa.js b/test/parallel/test-crypto-rsa-dsa.js index 5f4fafdfffbf726b7cb39c472baa3df25c9794cf..73bb53b0405b20f51b13326cc70e52755c674366 100644 --- a/test/parallel/test-crypto-rsa-dsa.js @@ -691,90 +660,23 @@ index 008ab129f0e019c659eecf5a76b7eb412c947fe3..6688f5d916f50e1e4fcfff1619c8634a cipher.end('Papaya!'); // Should not cause an unhandled exception. diff --git a/test/parallel/test-crypto-x509.js b/test/parallel/test-crypto-x509.js -index 89a7521544f7051edc1779138551bbad1972b3fb..91df6acc65d4003999f29f0fa5f639056b21ee3b 100644 +index ee4d96b476864ed5ecad7e8421f41a39bb2f9268..099e7812bfa700a42c2849f946fb819f691c85cf 100644 --- a/test/parallel/test-crypto-x509.js +++ b/test/parallel/test-crypto-x509.js -@@ -111,7 +111,7 @@ const der = Buffer.from( - '5A:42:63:E0:21:2F:D6:70:63:07:96:6F:27:A7:78:12:08:02:7A:8B' - ); - assert.strictEqual(x509.keyUsage, undefined); -- assert.strictEqual(x509.serialNumber, '147D36C1C2F74206DE9FAB5F2226D78ADB00A426'); -+ assert.match(x509.serialNumber, /147D36C1C2F74206DE9FAB5F2226D78ADB00A426/i); - - assert.deepStrictEqual(x509.raw, der); - -@@ -253,6 +253,16 @@ oans248kpal88CGqsN2so/wZKxVnpiXlPHMdiNL7hRSUqlHkUi07FrP2Htg8kjI= - }); - mc.port2.postMessage(x509); - -+ const modulusOSSL = 'D456320AFB20D3827093DC2C4284ED04DFBABD56E1DDAE529E28B790CD42' + -+ '56DB273349F3735FFD337C7A6363ECCA5A27B7F73DC7089A96C6D886DB0C' + -+ '62388F1CDD6A963AFCD599D5800E587A11F908960F84ED50BA25A28303EC' + -+ 'DA6E684FBE7BAEDC9CE8801327B1697AF25097CEE3F175E400984C0DB6A8' + -+ 'EB87BE03B4CF94774BA56FFFC8C63C68D6ADEB60ABBE69A7B14AB6A6B9E7' + -+ 'BAA89B5ADAB8EB07897C07F6D4FA3D660DFF574107D28E8F63467A788624' + -+ 'C574197693E959CEA1362FFAE1BBA10C8C0D88840ABFEF103631B2E8F5C3' + -+ '9B5548A7EA57E8A39F89291813F45A76C448033A2B7ED8403F4BAA147CF3' + -+ '5E2D2554AA65CE49695797095BF4DC6B'; -+ - // Verify that legacy encoding works - const legacyObjectCheck = { - subject: Object.assign({ __proto__: null }, { -@@ -277,15 +287,7 @@ oans248kpal88CGqsN2so/wZKxVnpiXlPHMdiNL7hRSUqlHkUi07FrP2Htg8kjI= - 'OCSP - URI': ['http://ocsp.nodejs.org/'], - 'CA Issuers - URI': ['http://ca.nodejs.org/ca.cert'] - }), -- modulus: 'D456320AFB20D3827093DC2C4284ED04DFBABD56E1DDAE529E28B790CD42' + -- '56DB273349F3735FFD337C7A6363ECCA5A27B7F73DC7089A96C6D886DB0C' + -- '62388F1CDD6A963AFCD599D5800E587A11F908960F84ED50BA25A28303EC' + -- 'DA6E684FBE7BAEDC9CE8801327B1697AF25097CEE3F175E400984C0DB6A8' + -- 'EB87BE03B4CF94774BA56FFFC8C63C68D6ADEB60ABBE69A7B14AB6A6B9E7' + -- 'BAA89B5ADAB8EB07897C07F6D4FA3D660DFF574107D28E8F63467A788624' + -- 'C574197693E959CEA1362FFAE1BBA10C8C0D88840ABFEF103631B2E8F5C3' + -- '9B5548A7EA57E8A39F89291813F45A76C448033A2B7ED8403F4BAA147CF3' + -- '5E2D2554AA65CE49695797095BF4DC6B', -+ modulusPattern: new RegExp(modulusOSSL, 'i'), - bits: 2048, - exponent: '0x10001', - valid_from: 'Sep 3 21:40:37 2022 GMT', -@@ -298,7 +300,7 @@ oans248kpal88CGqsN2so/wZKxVnpiXlPHMdiNL7hRSUqlHkUi07FrP2Htg8kjI= - '51:62:18:39:E2:E2:77:F5:86:11:E8:C0:CA:54:43:7C:76:83:19:05:D0:03:' + - '24:21:B8:EB:14:61:FB:24:16:EB:BD:51:1A:17:91:04:30:03:EB:68:5F:DC:' + - '86:E1:D1:7C:FB:AF:78:ED:63:5F:29:9C:32:AF:A1:8E:22:96:D1:02', -- serialNumber: '147D36C1C2F74206DE9FAB5F2226D78ADB00A426' -+ serialNumberPattern: /147D36C1C2F74206DE9FAB5F2226D78ADB00A426/i - }; - - const legacyObject = x509.toLegacyObject(); -@@ -307,7 +309,7 @@ oans248kpal88CGqsN2so/wZKxVnpiXlPHMdiNL7hRSUqlHkUi07FrP2Htg8kjI= - assert.deepStrictEqual(legacyObject.subject, legacyObjectCheck.subject); - assert.deepStrictEqual(legacyObject.issuer, legacyObjectCheck.issuer); - assert.deepStrictEqual(legacyObject.infoAccess, legacyObjectCheck.infoAccess); -- assert.strictEqual(legacyObject.modulus, legacyObjectCheck.modulus); -+ assert.match(legacyObject.modulus, legacyObjectCheck.modulusPattern); - assert.strictEqual(legacyObject.bits, legacyObjectCheck.bits); - assert.strictEqual(legacyObject.exponent, legacyObjectCheck.exponent); - assert.strictEqual(legacyObject.valid_from, legacyObjectCheck.valid_from); -@@ -316,11 +318,12 @@ oans248kpal88CGqsN2so/wZKxVnpiXlPHMdiNL7hRSUqlHkUi07FrP2Htg8kjI= - assert.strictEqual( - legacyObject.fingerprint256, - legacyObjectCheck.fingerprint256); -- assert.strictEqual( -+ assert.match( - legacyObject.serialNumber, -- legacyObjectCheck.serialNumber); -+ legacyObjectCheck.serialNumberPattern); +@@ -323,6 +323,7 @@ oans248kpal88CGqsN2so/wZKxVnpiXlPHMdiNL7hRSUqlHkUi07FrP2Htg8kjI= + legacyObjectCheck.serialNumberPattern); } +/* { // This X.509 Certificate can be parsed by OpenSSL because it contains a // structurally sound TBSCertificate structure. However, the SPKI field of the -@@ -359,3 +362,4 @@ UcXd/5qu2GhokrKU2cPttU+XAN2Om6a0 +@@ -361,3 +362,4 @@ UcXd/5qu2GhokrKU2cPttU+XAN2Om6a0 assert.strictEqual(cert.checkIssued(cert), false); } +*/ +\ No newline at end of file diff --git a/test/parallel/test-crypto.js b/test/parallel/test-crypto.js index a8ceb169de2b3de73f062083c42292babc673e73..8fb950d0814e5014faf5c1ef576b65795857da1b 100644 --- a/test/parallel/test-crypto.js @@ -888,7 +790,7 @@ index 543ee176fb6af38874fee9f14be76f3fdda11060..fef9f1bc2f9fc6c220cf47847e86e038 } diff --git a/test/parallel/test-https-agent-session-eviction.js b/test/parallel/test-https-agent-session-eviction.js -index da5600710560b22049eba1ef18bbb742d447a673..8917b96f666de916616af2fb3ce3a58d00af7438 100644 +index e0986e53c1103b63cf15002a7fa4ce8bc4844d90..33c8a2aa72c56dd4a98558aab2102f03fae2b3cf 100644 --- a/test/parallel/test-https-agent-session-eviction.js +++ b/test/parallel/test-https-agent-session-eviction.js @@ -14,7 +14,7 @@ const options = { @@ -900,35 +802,8 @@ index da5600710560b22049eba1ef18bbb742d447a673..8917b96f666de916616af2fb3ce3a58d }; // Create TLS1.2 server -diff --git a/test/parallel/test-tls-getcertificate-x509.js b/test/parallel/test-tls-getcertificate-x509.js -index aa685ca9e09cf0d17ff4d5480089e9977dd51f72..ccafa427433922155c1afd5d95ba69d8108825ef 100644 ---- a/test/parallel/test-tls-getcertificate-x509.js -+++ b/test/parallel/test-tls-getcertificate-x509.js -@@ -20,9 +20,7 @@ const server = tls.createServer(options, function(cleartext) { - server.once('secureConnection', common.mustCall(function(socket) { - const cert = socket.getX509Certificate(); - assert(cert instanceof X509Certificate); -- assert.strictEqual( -- cert.serialNumber, -- '5B75D77EDC7FB5B7FA9F1424DA4C64FB815DCBDE'); -+ assert.match(cert.serialNumber, /5B75D77EDC7FB5B7FA9F1424DA4C64FB815DCBDE/i) - })); - - server.listen(0, common.mustCall(function() { -@@ -33,10 +31,7 @@ server.listen(0, common.mustCall(function() { - const peerCert = socket.getPeerX509Certificate(); - assert(peerCert.issuerCertificate instanceof X509Certificate); - assert.strictEqual(peerCert.issuerCertificate.issuerCertificate, undefined); -- assert.strictEqual( -- peerCert.issuerCertificate.serialNumber, -- '147D36C1C2F74206DE9FAB5F2226D78ADB00A425' -- ); -+ assert.match(peerCert.issuerCertificate.serialNumber, /147D36C1C2F74206DE9FAB5F2226D78ADB00A425/i); - server.close(); - })); - socket.end('Hello'); diff --git a/test/parallel/test-tls-getprotocol.js b/test/parallel/test-tls-getprotocol.js -index 571f400cea574662bda6be8eecd22ceccaf75420..2296362dc625ee663df11927297ccf124233a19b 100644 +index a9c8775e2f112f2b5e1f4e80f22264f219bf6a9d..4550d28125379e6043962826b8e97b692d63804b 100644 --- a/test/parallel/test-tls-getprotocol.js +++ b/test/parallel/test-tls-getprotocol.js @@ -27,7 +27,7 @@ const clientConfigs = [ diff --git a/patches/node/fix_do_not_resolve_electron_entrypoints.patch b/patches/node/fix_do_not_resolve_electron_entrypoints.patch index 8f36e06c016d..5e9326f602a6 100644 --- a/patches/node/fix_do_not_resolve_electron_entrypoints.patch +++ b/patches/node/fix_do_not_resolve_electron_entrypoints.patch @@ -19,7 +19,7 @@ index 22248b753c14960122f1d6b9bfe6b89fdb8d2010..9d245a04fbcb98dcd1c61e60f7cfe528 context = { __proto__: context, source }; } diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js -index f3dfc69cd2cdec50bc3b3f7cb2d63349812d87dd..b6f2d7194cb75ecc8c47869761c63184707ade40 100644 +index 9c9b403774e51e2f7e1201ad53e60e98fc3b26e8..477a3b2cf61fcaa154f01ac77c8047ef548ac1f8 100644 --- a/lib/internal/modules/esm/translators.js +++ b/lib/internal/modules/esm/translators.js @@ -375,6 +375,9 @@ function cjsPreparseModuleExports(filename, source) { diff --git a/patches/node/fix_expose_the_built-in_electron_module_via_the_esm_loader.patch b/patches/node/fix_expose_the_built-in_electron_module_via_the_esm_loader.patch index ee7a6cf34aa6..0c2573f75c60 100644 --- a/patches/node/fix_expose_the_built-in_electron_module_via_the_esm_loader.patch +++ b/patches/node/fix_expose_the_built-in_electron_module_via_the_esm_loader.patch @@ -48,10 +48,10 @@ index 7b77af35a1dfebf6ad45ace521f1a55b5fa18293..ac24cf305bd5995ad13b37ee36f9e1fe ArrayPrototypePush(schemes, 'https', 'http'); } diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js -index e73a8ad60a13925d6773c32cead8d04ec9d96ee7..52cdb7d5e14a18ed7b1b65e429729cf47dce3f98 100644 +index 93c7a040fd47f050b10b949e4f619d85660110c8..77b85490b1a65b594bb140deb07b33f3accc9736 100644 --- a/lib/internal/modules/esm/resolve.js +++ b/lib/internal/modules/esm/resolve.js -@@ -741,6 +741,8 @@ function packageImportsResolve(name, base, conditions) { +@@ -760,6 +760,8 @@ function packageImportsResolve(name, base, conditions) { throw importNotDefined(name, packageJSONUrl, base); } @@ -60,7 +60,7 @@ index e73a8ad60a13925d6773c32cead8d04ec9d96ee7..52cdb7d5e14a18ed7b1b65e429729cf4 /** * Returns the package type for a given URL. * @param {URL} url - The URL to get the package type for. -@@ -801,6 +803,11 @@ function packageResolve(specifier, base, conditions) { +@@ -820,6 +822,11 @@ function packageResolve(specifier, base, conditions) { return new URL('node:' + specifier); } @@ -73,7 +73,7 @@ index e73a8ad60a13925d6773c32cead8d04ec9d96ee7..52cdb7d5e14a18ed7b1b65e429729cf4 parsePackageName(specifier, base); diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js -index 8f4b6b25d8889686d00613fd9821b0aa822a946a..89ca269294ee1afa7f5aeb0ac6b8958f7a8b49d0 100644 +index 044d820161a5f9809dd042be7e53b717de8678ab..5281d7c220c8adee0f3d7269a0116d082726ec91 100644 --- a/lib/internal/modules/esm/translators.js +++ b/lib/internal/modules/esm/translators.js @@ -272,7 +272,7 @@ function createCJSModuleWrap(url, source, isMain, loadCJS = loadCJSModule) { @@ -108,7 +108,7 @@ index 8f4b6b25d8889686d00613fd9821b0aa822a946a..89ca269294ee1afa7f5aeb0ac6b8958f // or as the initial entry point when the ESM loader handles a CommonJS entry. translators.set('commonjs', async function commonjsStrategy(url, source, diff --git a/lib/internal/url.js b/lib/internal/url.js -index e6ed5466b8807a52633d8406824058bdc8c2ce13..e055facddf086eb8fb456b865ce006cdb7602b0a 100644 +index 42debfc20005b0d293e5507546dcd8caec2b6a4e..4b6d07b14bd92ac527b7f4bd55ff7005967cee7d 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -1485,6 +1485,8 @@ function fileURLToPath(path, options = kEmptyObject) { diff --git a/patches/node/fix_expose_tracing_agent_and_use_tracing_tracingcontroller_instead.patch b/patches/node/fix_expose_tracing_agent_and_use_tracing_tracingcontroller_instead.patch index cf1dc866553c..3fc30952c664 100644 --- a/patches/node/fix_expose_tracing_agent_and_use_tracing_tracingcontroller_instead.patch +++ b/patches/node/fix_expose_tracing_agent_and_use_tracing_tracingcontroller_instead.patch @@ -22,7 +22,7 @@ index 46106fa94b3055648e4f01cd28860d427268a253..e0bf37f09dceb93af58990438ab577a9 int thread_pool_size, node::tracing::TracingController* tracing_controller) { diff --git a/src/node.h b/src/node.h -index 6373adacb628459a4c9d7237da2587aee318e2d8..4f2eb9d0aab88b70c86339e750799080e980d7da 100644 +index ec5f6d0d25731dfb5ceeae3cd8749630298a8ba0..7d9d9afd049237646f82c3e22f5e7a8af7314a84 100644 --- a/src/node.h +++ b/src/node.h @@ -133,6 +133,7 @@ struct SnapshotData; diff --git a/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch b/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch index 6539299a22d3..f72203f8ee92 100644 --- a/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch +++ b/patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch @@ -388,7 +388,7 @@ index cf051585e779e2b03bd7b95fe5008b89cc7f8162..9de49c6828468fdf846dcd4ad445390f #if NODE_OPENSSL_HAS_QUIC #include diff --git a/src/node_options.cc b/src/node_options.cc -index e325b082dec6ae891a737a4fa7775937e4d7b7f9..efbe48e10b8408642a6b5010b1a7a3749068188a 100644 +index f6ff810953b224b7e343d91e1065d95bc3e78d39..b7ef44b018c7aec59d8311642a811d1280247689 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -6,7 +6,7 @@ diff --git a/patches/node/fix_lazyload_fs_in_esm_loaders_to_apply_asar_patches.patch b/patches/node/fix_lazyload_fs_in_esm_loaders_to_apply_asar_patches.patch index 787043e5cca4..2f87d5732eaa 100644 --- a/patches/node/fix_lazyload_fs_in_esm_loaders_to_apply_asar_patches.patch +++ b/patches/node/fix_lazyload_fs_in_esm_loaders_to_apply_asar_patches.patch @@ -38,7 +38,7 @@ index ac24cf305bd5995ad13b37ee36f9e1fe3589c5d7..22248b753c14960122f1d6b9bfe6b89f const match = RegExpPrototypeExec(DATA_URL_PATTERN, url.pathname); if (!match) { diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js -index 52cdb7d5e14a18ed7b1b65e429729cf47dce3f98..69f73f829706deddc4f328b78af9d58434af647d 100644 +index 77b85490b1a65b594bb140deb07b33f3accc9736..da99cc2d4ca930222ca018ddf42ee2e5f898576a 100644 --- a/lib/internal/modules/esm/resolve.js +++ b/lib/internal/modules/esm/resolve.js @@ -24,7 +24,7 @@ const { @@ -50,7 +50,7 @@ index 52cdb7d5e14a18ed7b1b65e429729cf47dce3f98..69f73f829706deddc4f328b78af9d584 const { getOptionValue } = require('internal/options'); // Do not eagerly grab .manifest, it may be in TDZ const policy = getOptionValue('--experimental-policy') ? -@@ -251,7 +251,7 @@ function finalizeResolution(resolved, base, preserveSymlinks) { +@@ -257,7 +257,7 @@ function finalizeResolution(resolved, base, preserveSymlinks) { throw err; } @@ -59,7 +59,7 @@ index 52cdb7d5e14a18ed7b1b65e429729cf47dce3f98..69f73f829706deddc4f328b78af9d584 StringPrototypeSlice(path, -1) : path)); // Check for stats.isDirectory() -@@ -267,7 +267,7 @@ function finalizeResolution(resolved, base, preserveSymlinks) { +@@ -285,7 +285,7 @@ function finalizeResolution(resolved, base, preserveSymlinks) { } if (!preserveSymlinks) { @@ -68,7 +68,7 @@ index 52cdb7d5e14a18ed7b1b65e429729cf47dce3f98..69f73f829706deddc4f328b78af9d584 [internalFS.realpathCacheKey]: realpathCache, }); const { search, hash } = resolved; -@@ -826,7 +826,7 @@ function packageResolve(specifier, base, conditions) { +@@ -845,7 +845,7 @@ function packageResolve(specifier, base, conditions) { let packageJSONPath = fileURLToPath(packageJSONUrl); let lastPath; do { @@ -78,7 +78,7 @@ index 52cdb7d5e14a18ed7b1b65e429729cf47dce3f98..69f73f829706deddc4f328b78af9d584 // Check for !stat.isDirectory() if (stat !== 1) { diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js -index 89ca269294ee1afa7f5aeb0ac6b8958f7a8b49d0..f3dfc69cd2cdec50bc3b3f7cb2d63349812d87dd 100644 +index 5281d7c220c8adee0f3d7269a0116d082726ec91..9c9b403774e51e2f7e1201ad53e60e98fc3b26e8 100644 --- a/lib/internal/modules/esm/translators.js +++ b/lib/internal/modules/esm/translators.js @@ -36,7 +36,7 @@ const { diff --git a/patches/node/fix_revert_src_lb_reducing_c_calls_of_esm_legacy_main_resolve.patch b/patches/node/fix_revert_src_lb_reducing_c_calls_of_esm_legacy_main_resolve.patch index 831e237f29f4..49ba4a42f772 100644 --- a/patches/node/fix_revert_src_lb_reducing_c_calls_of_esm_legacy_main_resolve.patch +++ b/patches/node/fix_revert_src_lb_reducing_c_calls_of_esm_legacy_main_resolve.patch @@ -15,7 +15,7 @@ to recognize asar files. This reverts commit 9cf2e1f55b8446a7cde23699d00a3be73aa0c8f1. diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js -index 69f73f829706deddc4f328b78af9d58434af647d..1d53a2a47423150e822bb917b2725d3a6a794814 100644 +index da99cc2d4ca930222ca018ddf42ee2e5f898576a..34631a1f4ffea33ba520874e6571054d3d9c057e 100644 --- a/lib/internal/modules/esm/resolve.js +++ b/lib/internal/modules/esm/resolve.js @@ -36,10 +36,9 @@ const preserveSymlinksMain = getOptionValue('--preserve-symlinks-main'); diff --git a/patches/node/src_remove_dependency_on_wrapper-descriptor-based_cppheap.patch b/patches/node/src_remove_dependency_on_wrapper-descriptor-based_cppheap.patch index 4e5c40ce881d..fe793dc8bc47 100644 --- a/patches/node/src_remove_dependency_on_wrapper-descriptor-based_cppheap.patch +++ b/patches/node/src_remove_dependency_on_wrapper-descriptor-based_cppheap.patch @@ -161,10 +161,10 @@ index a30c25a3a61dfe73944731760404c555f2782d72..6137551bb8168d8fa9a3e6bc79c3d1e7 inline MultiIsolatePlatform* platform() const; inline const SnapshotData* snapshot_data() const; diff --git a/src/node.h b/src/node.h -index df3fb3372d6357b5d77b4f683e309b8483998128..01e8a4f2ed905bf5bbb803419012a014c204b460 100644 +index a941d9987abcbb0f9db3072b8c896a5f328dd027..1a95ac78f7ba6c361db43b1f03c684cbc172de0f 100644 --- a/src/node.h +++ b/src/node.h -@@ -1561,24 +1561,14 @@ void RegisterSignalHandler(int signal, +@@ -1555,24 +1555,14 @@ void RegisterSignalHandler(int signal, bool reset_handler = false); #endif // _WIN32 diff --git a/patches/node/support_v8_sandboxed_pointers.patch b/patches/node/support_v8_sandboxed_pointers.patch index e62ba0d78292..909b3953a343 100644 --- a/patches/node/support_v8_sandboxed_pointers.patch +++ b/patches/node/support_v8_sandboxed_pointers.patch @@ -118,10 +118,10 @@ index 4ba261014695cf1aa8eb53b21a2873f4c4ea8e43..b695d131bcdc331974f544924138bb5e v8::Local ToArrayBuffer(Environment* env); diff --git a/src/node_i18n.cc b/src/node_i18n.cc -index 2aa7cd98ecc179519a6bb1932dafa86a38bda4f5..79376bef2e674f05fd95380dd419e8778cb98623 100644 +index 1ddae30e97257be9f8145dcd419203dcf77aadac..bebe6fd7d139bcdd71e2be35831fd8a1d89ab15f 100644 --- a/src/node_i18n.cc +++ b/src/node_i18n.cc -@@ -106,7 +106,7 @@ namespace { +@@ -103,7 +103,7 @@ namespace { template MaybeLocal ToBufferEndian(Environment* env, MaybeStackBuffer* buf) { @@ -130,7 +130,7 @@ index 2aa7cd98ecc179519a6bb1932dafa86a38bda4f5..79376bef2e674f05fd95380dd419e877 if (ret.IsEmpty()) return ret; -@@ -183,7 +183,7 @@ MaybeLocal TranscodeLatin1ToUcs2(Environment* env, +@@ -180,7 +180,7 @@ MaybeLocal TranscodeLatin1ToUcs2(Environment* env, return {}; } @@ -139,7 +139,7 @@ index 2aa7cd98ecc179519a6bb1932dafa86a38bda4f5..79376bef2e674f05fd95380dd419e877 } MaybeLocal TranscodeFromUcs2(Environment* env, -@@ -228,7 +228,7 @@ MaybeLocal TranscodeUcs2FromUtf8(Environment* env, +@@ -225,7 +225,7 @@ MaybeLocal TranscodeUcs2FromUtf8(Environment* env, return {}; } @@ -148,7 +148,7 @@ index 2aa7cd98ecc179519a6bb1932dafa86a38bda4f5..79376bef2e674f05fd95380dd419e877 } MaybeLocal TranscodeUtf8FromUcs2(Environment* env, -@@ -252,7 +252,7 @@ MaybeLocal TranscodeUtf8FromUcs2(Environment* env, +@@ -249,7 +249,7 @@ MaybeLocal TranscodeUtf8FromUcs2(Environment* env, return {}; } diff --git a/patches/node/test_formally_mark_some_tests_as_flaky.patch b/patches/node/test_formally_mark_some_tests_as_flaky.patch index dd7a14d3f93a..27efe150e807 100644 --- a/patches/node/test_formally_mark_some_tests_as_flaky.patch +++ b/patches/node/test_formally_mark_some_tests_as_flaky.patch @@ -7,7 +7,7 @@ Instead of disabling the tests, flag them as flaky so they still run but don't cause CI failures on flakes. diff --git a/test/parallel/parallel.status b/test/parallel/parallel.status -index 79a953df7da64b7d7580e099a5cc5160e7842999..94616df356cab50c8ef4099e7863f5986deed377 100644 +index a7860449225092529e1a262aed3f30fb21212e9d..1a55ea53c602b3fede260fffc173dfabc0f594d4 100644 --- a/test/parallel/parallel.status +++ b/test/parallel/parallel.status @@ -5,6 +5,16 @@ prefix parallel @@ -28,7 +28,7 @@ index 79a953df7da64b7d7580e099a5cc5160e7842999..94616df356cab50c8ef4099e7863f598 test-net-write-fully-async-hex-string: PASS, FLAKY # https://github.com/nodejs/node/issues/52273 diff --git a/test/sequential/sequential.status b/test/sequential/sequential.status -index 073b29cce8dbca4c8d92ad666f9244ad511296db..338d20263f29a630febb96567f3cb708623bd09a 100644 +index dd2275ddc9540464d838476f998cea683d5ceccc..796e3c56174d9cd2b9d3969150d9605b32c46f0b 100644 --- a/test/sequential/sequential.status +++ b/test/sequential/sequential.status @@ -7,6 +7,18 @@ prefix sequential