diff --git a/DEPS b/DEPS index dcd76cb89565..8005704d244e 100644 --- a/DEPS +++ b/DEPS @@ -4,7 +4,7 @@ vars = { 'chromium_version': '140.0.7314.0', 'node_version': - 'v22.17.1', + 'v22.18.0', 'nan_version': 'e14bdcd1f72d62bca1d541b66da43130384ec213', 'squirrel.mac_version': diff --git a/lib/node/asar-fs-wrapper.ts b/lib/node/asar-fs-wrapper.ts index 90d256342a06..2457fb0f2dd1 100644 --- a/lib/node/asar-fs-wrapper.ts +++ b/lib/node/asar-fs-wrapper.ts @@ -742,7 +742,7 @@ export const wrapFsWithAsar = (fs: Record) => { } const dirent = getDirent(currentPath, result[0][i], type); - const stat = internalBinding('fs').internalModuleStat(binding, resultPath); + const stat = internalBinding('fs').internalModuleStat(resultPath); context.readdirResults.push(dirent); if (dirent.isDirectory() || stat === 1) { @@ -755,7 +755,7 @@ export const wrapFsWithAsar = (fs: Record) => { for (let i = 0; i < result.length; i++) { const resultPath = path.join(currentPath, result[i]); const relativeResultPath = path.relative(context.basePath, resultPath); - const stat = internalBinding('fs').internalModuleStat(binding, resultPath); + const stat = internalBinding('fs').internalModuleStat(resultPath); context.readdirResults.push(relativeResultPath); if (stat === 1) { @@ -825,7 +825,7 @@ export const wrapFsWithAsar = (fs: Record) => { if (context.withFileTypes) { readdirResult = [ [...readdirResult], readdirResult.map((p: string) => { - return internalBinding('fs').internalModuleStat(binding, path.join(pathArg, p)); + return internalBinding('fs').internalModuleStat(path.join(pathArg, p)); }) ]; } @@ -1010,9 +1010,9 @@ export const wrapFsWithAsar = (fs: Record) => { }); const { internalModuleStat } = binding; - internalBinding('fs').internalModuleStat = (receiver: unknown, pathArgument: string) => { + internalBinding('fs').internalModuleStat = (pathArgument: string) => { const pathInfo = splitPath(pathArgument); - if (!pathInfo.isAsar) return internalModuleStat(receiver, pathArgument); + if (!pathInfo.isAsar) return internalModuleStat(pathArgument); const { asarPath, filePath } = pathInfo; // -ENOENT @@ -1047,7 +1047,7 @@ export const wrapFsWithAsar = (fs: Record) => { if (withFileTypes) { initialItem = [ [...initialItem], initialItem.map((p: string) => { - return internalBinding('fs').internalModuleStat(binding, path.join(originalPath, p)); + return internalBinding('fs').internalModuleStat(path.join(originalPath, p)); }) ]; } @@ -1080,7 +1080,7 @@ export const wrapFsWithAsar = (fs: Record) => { readdirResult = [ [...files], files.map((p: string) => { - return internalBinding('fs').internalModuleStat(binding, path.join(direntPath, p)); + return internalBinding('fs').internalModuleStat(path.join(direntPath, p)); }) ]; } else { @@ -1101,7 +1101,7 @@ export const wrapFsWithAsar = (fs: Record) => { const { 0: pathArg, 1: readDir } = queue.pop(); for (const ent of readDir) { const direntPath = path.join(pathArg, ent); - const stat = internalBinding('fs').internalModuleStat(binding, direntPath); + const stat = internalBinding('fs').internalModuleStat(direntPath); result.push(path.relative(originalPath, direntPath)); if (stat === 1) { @@ -1155,7 +1155,7 @@ export const wrapFsWithAsar = (fs: Record) => { if (context.withFileTypes) { readdirResult = [ [...readdirResult], readdirResult.map((p: string) => { - return internalBinding('fs').internalModuleStat(binding, path.join(pathArg, p)); + return internalBinding('fs').internalModuleStat(path.join(pathArg, p)); }) ]; } diff --git a/patches/node/.patches b/patches/node/.patches index 7c9640f5fd03..9a0ffe4378fa 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -37,7 +37,6 @@ test_use_static_method_names_in_call_stacks.patch fix_remove_fastapitypedarray_usage.patch test_handle_explicit_resource_management_globals.patch build_change_crdtp_protocoltypetraits_signatures_to_avoid_conflict.patch -build_option_to_use_custom_inspector_protocol_path.patch fix_adjust_wpt_and_webidl_tests_for_enabled_float16array.patch chore_add_createexternalizabletwobytestring_to_globals.patch refactor_attach_cppgc_heap_on_v8_isolate_creation.patch @@ -46,7 +45,5 @@ cli_move_--trace-atomics-wait_to_eol.patch fix_cppgc_initializing_twice.patch fix_task_starvation_in_inspector_context_test.patch fix_expose_readfilesync_override_for_modules.patch -chore_remove_protocol_maybe_from_node_string.patch -fix_-wmismatched-new-delete_in_debug_utils_cc.patch fix_array_out-of-bounds_read_in_boyer-moore_search.patch chore_add_missing_include_of_iterator.patch diff --git a/patches/node/build_add_gn_build_files.patch b/patches/node/build_add_gn_build_files.patch index 86ea0937ab05..5e0111ef8ca4 100644 --- a/patches/node/build_add_gn_build_files.patch +++ b/patches/node/build_add_gn_build_files.patch @@ -11,7 +11,7 @@ really in 20/21. We have to wait until 22 is released to be able to build with upstream GN files. diff --git a/configure.py b/configure.py -index 4560bac7b8e3c707ecea5a425f642efb9de9ed36..e9c2a4391f4058a21a259cacaac4fde5d199288e 100755 +index 2415940835036226799a7ea14c6687cc0d56c523..0feb07afbccad97a92cee00954443407eb20ac67 100755 --- a/configure.py +++ b/configure.py @@ -1722,7 +1722,7 @@ def configure_v8(o, configs): @@ -24,7 +24,7 @@ index 4560bac7b8e3c707ecea5a425f642efb9de9ed36..e9c2a4391f4058a21a259cacaac4fde5 o['variables']['v8_enable_external_code_space'] = 1 if options.enable_pointer_compression else 0 o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0 diff --git a/node.gni b/node.gni -index 35ccd0487f20cece033d58827ecb7ed016908ee4..62cd49c6a87074912a1cb6792576c8d4f239b669 100644 +index b049f0692980c3e26771c3209c3bdd2e9a4d637b..e2407027ab05e59b2f0f1c213b98ea469db7a91b 100644 --- a/node.gni +++ b/node.gni @@ -5,10 +5,10 @@ @@ -40,7 +40,7 @@ index 35ccd0487f20cece033d58827ecb7ed016908ee4..62cd49c6a87074912a1cb6792576c8d4 # The location of OpenSSL - use the one from node's deps by default. node_openssl_path = "$node_path/deps/openssl" -@@ -39,12 +39,15 @@ declare_args() { +@@ -42,12 +42,15 @@ declare_args() { # The variable is called "openssl" for parity with node's GYP build. node_use_openssl = true @@ -57,7 +57,7 @@ index 35ccd0487f20cece033d58827ecb7ed016908ee4..62cd49c6a87074912a1cb6792576c8d4 # Custom build tag. node_tag = "" -@@ -64,10 +67,16 @@ declare_args() { +@@ -67,10 +70,16 @@ declare_args() { # TODO(zcbenz): There are few broken things for now: # 1. cross-os compilation is not supported. # 2. node_mksnapshot crashes when cross-compiling for x64 from arm64. @@ -76,10 +76,10 @@ index 35ccd0487f20cece033d58827ecb7ed016908ee4..62cd49c6a87074912a1cb6792576c8d4 assert(!node_enable_inspector || node_use_openssl, diff --git a/src/node_builtins.cc b/src/node_builtins.cc -index 092341dbfbabe15b15ed43057d399f754505f6fd..f14b45850e42585f5686b7201e2b8281ed8c24e1 100644 +index abf1583cdac9f139056cf4809f14e28e62f6d24c..8b104e175ccf8de90c138337f83f8f6ce1348ac7 100644 --- a/src/node_builtins.cc +++ b/src/node_builtins.cc -@@ -788,6 +788,7 @@ void BuiltinLoader::RegisterExternalReferences( +@@ -789,6 +789,7 @@ void BuiltinLoader::RegisterExternalReferences( registry->Register(GetNatives); RegisterExternalReferencesForInternalizedBuiltinCode(registry); @@ -279,7 +279,7 @@ index 856878c33681a73d41016729dabe48b0a6a80589..91a11852d206b65485fe90fd037a0bd1 if sys.platform == 'win32': files = [ x.replace('\\', '/') for x in files ] diff --git a/unofficial.gni b/unofficial.gni -index 44641b92678ab2f28e6f5de75a92878f9f3d322d..a6cfd45b109c7b38fcf1529468ff64d3c1c8bd1b 100644 +index da565473f1ae96b4d009935f7733e6ab15ea9de2..26ebc811272ef2990f8d090c54e7f5294aab9d37 100644 --- a/unofficial.gni +++ b/unofficial.gni @@ -22,6 +22,11 @@ template("node_gn_build") { @@ -354,8 +354,8 @@ index 44641b92678ab2f28e6f5de75a92878f9f3d322d..a6cfd45b109c7b38fcf1529468ff64d3 + } if (node_enable_inspector) { deps += [ - "src/inspector:crdtp", -@@ -214,6 +232,10 @@ template("node_gn_build") { + "$node_inspector_protocol_path:crdtp", +@@ -215,6 +233,10 @@ template("node_gn_build") { } } @@ -366,7 +366,7 @@ index 44641b92678ab2f28e6f5de75a92878f9f3d322d..a6cfd45b109c7b38fcf1529468ff64d3 executable(target_name) { forward_variables_from(invoker, "*") -@@ -288,6 +310,7 @@ template("node_gn_build") { +@@ -289,6 +311,7 @@ template("node_gn_build") { } executable("node_js2c") { @@ -374,7 +374,7 @@ index 44641b92678ab2f28e6f5de75a92878f9f3d322d..a6cfd45b109c7b38fcf1529468ff64d3 deps = [ "deps/uv", "$node_simdutf_path", -@@ -298,26 +321,75 @@ template("node_gn_build") { +@@ -299,26 +322,75 @@ template("node_gn_build") { "src/embedded_data.cc", "src/embedded_data.h", ] @@ -460,7 +460,7 @@ index 44641b92678ab2f28e6f5de75a92878f9f3d322d..a6cfd45b109c7b38fcf1529468ff64d3 outputs = [ "$target_gen_dir/node_javascript.cc" ] # Get the path to node_js2c executable of the host toolchain. -@@ -331,11 +403,11 @@ template("node_gn_build") { +@@ -332,11 +404,11 @@ template("node_gn_build") { get_label_info(":node_js2c($host_toolchain)", "name") + host_executable_suffix diff --git a/patches/node/build_allow_unbundling_of_node_js_dependencies.patch b/patches/node/build_allow_unbundling_of_node_js_dependencies.patch index d93e9bef3bc2..48d4362fb679 100644 --- a/patches/node/build_allow_unbundling_of_node_js_dependencies.patch +++ b/patches/node/build_allow_unbundling_of_node_js_dependencies.patch @@ -14,7 +14,7 @@ We don't need to do this for zlib, as the existing gn workflow uses the same Upstreamed at https://github.com/nodejs/node/pull/55903 diff --git a/unofficial.gni b/unofficial.gni -index a6cfd45b109c7b38fcf1529468ff64d3c1c8bd1b..332c9ee7262108ae9616e9bc8bd950a4940a858c 100644 +index 26ebc811272ef2990f8d090c54e7f5294aab9d37..8886f2a79ae77614789d6ae0defd4f18fc756456 100644 --- a/unofficial.gni +++ b/unofficial.gni @@ -160,7 +160,6 @@ template("node_gn_build") { @@ -44,7 +44,7 @@ index a6cfd45b109c7b38fcf1529468ff64d3c1c8bd1b..332c9ee7262108ae9616e9bc8bd950a4 if (v8_enable_i18n_support) { deps += [ "//third_party/icu" ] } -@@ -230,6 +239,19 @@ template("node_gn_build") { +@@ -231,6 +240,19 @@ template("node_gn_build") { sources += node_inspector.node_inspector_sources + node_inspector.node_inspector_generated_sources } diff --git a/patches/node/build_change_crdtp_protocoltypetraits_signatures_to_avoid_conflict.patch b/patches/node/build_change_crdtp_protocoltypetraits_signatures_to_avoid_conflict.patch index 3054af71962d..7f669c5b0bd7 100644 --- a/patches/node/build_change_crdtp_protocoltypetraits_signatures_to_avoid_conflict.patch +++ b/patches/node/build_change_crdtp_protocoltypetraits_signatures_to_avoid_conflict.patch @@ -38,10 +38,10 @@ index 8521730bd03cdfce47e9b5d0f5d68a568bc3de8c..28f4598aa7ea0e93350f79566c06d0f0 } diff --git a/src/inspector/node_string.h b/src/inspector/node_string.h -index 94ec9b2301998c4c5aad9ca3dae72ecf323fa0bb..a0d19a592d7bf9b00d6b98ef1ae931626ebb945c 100644 +index bcdedaa2ae4ab1d3267d7a1347f15e0405261277..ddedca4a5b9b35258050f8b4cb446ceeba956896 100644 --- a/src/inspector/node_string.h +++ b/src/inspector/node_string.h -@@ -19,8 +19,8 @@ namespace crdtp { +@@ -18,8 +18,8 @@ namespace crdtp { template <> struct ProtocolTypeTraits { diff --git a/patches/node/build_compile_with_c_20_support.patch b/patches/node/build_compile_with_c_20_support.patch index b16baaf70f9e..52a25cc54cd5 100644 --- a/patches/node/build_compile_with_c_20_support.patch +++ b/patches/node/build_compile_with_c_20_support.patch @@ -10,10 +10,10 @@ 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 acfc02510ee1ce34a3f410a7a4ce53adb42abd35..b9264bfb1170928431848bb2b99e4f0dfbe8f95a 100644 +index 679633dc6b4ce2a1f5f88e93d1a1c1feb4bbadb4..2caa183213d5632be81b763e894e37c09384391f 100644 --- a/common.gypi +++ b/common.gypi -@@ -538,7 +538,7 @@ +@@ -539,7 +539,7 @@ '-fno-rtti', '-fno-exceptions', '-fno-strict-aliasing', @@ -22,7 +22,7 @@ index acfc02510ee1ce34a3f410a7a4ce53adb42abd35..b9264bfb1170928431848bb2b99e4f0d ], 'defines': [ '__STDC_FORMAT_MACROS' ], 'ldflags': [ '-rdynamic' ], -@@ -708,7 +708,7 @@ +@@ -709,7 +709,7 @@ ['clang==1', { 'xcode_settings': { 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', diff --git a/patches/node/build_enable_perfetto.patch b/patches/node/build_enable_perfetto.patch index 1e2e8823fe0c..1bb292dd4687 100644 --- a/patches/node/build_enable_perfetto.patch +++ b/patches/node/build_enable_perfetto.patch @@ -64,10 +64,10 @@ index 251f51ec454f9cba4023b8b6729241ee753aac13..1de8cac6e3953ce9cab9db03530da327 module.exports = { diff --git a/node.gyp b/node.gyp -index 0434887c363a586cbfa0438765fc8800d4237057..20fbf03cee24e66f9ad0d394dbcfa3ad03348890 100644 +index 442c1e7a6ddafbb7a7ec7a42a97ec04b28ea4d93..3a66c11d39dd2fd129c8f54098a9607e080ecca0 100644 --- a/node.gyp +++ b/node.gyp -@@ -175,7 +175,6 @@ +@@ -176,7 +176,6 @@ 'src/timers.cc', 'src/timer_wrap.cc', 'src/tracing/agent.cc', @@ -75,7 +75,7 @@ index 0434887c363a586cbfa0438765fc8800d4237057..20fbf03cee24e66f9ad0d394dbcfa3ad 'src/tracing/node_trace_writer.cc', 'src/tracing/trace_event.cc', 'src/tracing/traced_value.cc', -@@ -302,7 +301,6 @@ +@@ -304,7 +303,6 @@ 'src/tcp_wrap.h', 'src/timers.h', 'src/tracing/agent.h', 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 8118eaac97d4..3f5e9b39ae14 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 cf643bcd0bc9080b80bf12afeebc69f2db74bb54..acfc02510ee1ce34a3f410a7a4ce53adb42abd35 100644 +index 33af43cd768c24b26d523f3db66eb8b9eb26859a..679633dc6b4ce2a1f5f88e93d1a1c1feb4bbadb4 100644 --- a/common.gypi +++ b/common.gypi @@ -89,6 +89,8 @@ @@ -19,7 +19,7 @@ index cf643bcd0bc9080b80bf12afeebc69f2db74bb54..acfc02510ee1ce34a3f410a7a4ce53ad ##### end V8 defaults ##### # When building native modules using 'npm install' with the system npm, -@@ -297,7 +299,8 @@ +@@ -298,7 +300,8 @@ '_GLIBCXX_USE_CXX11_ABI=1', # This help forks when building Node.js on a 32-bit arch as # libuv is always compiled with _FILE_OFFSET_BITS=64 @@ -29,7 +29,7 @@ index cf643bcd0bc9080b80bf12afeebc69f2db74bb54..acfc02510ee1ce34a3f410a7a4ce53ad ], # Forcibly disable -Werror. We support a wide range of compilers, it's -@@ -454,6 +457,11 @@ +@@ -455,6 +458,11 @@ }], ], }], @@ -42,7 +42,7 @@ index cf643bcd0bc9080b80bf12afeebc69f2db74bb54..acfc02510ee1ce34a3f410a7a4ce53ad # list in v8/BUILD.gn. ['v8_enable_v8_checks == 1', { diff --git a/configure.py b/configure.py -index e9c2a4391f4058a21a259cacaac4fde5d199288e..7821a0d3a7179a9e7fa9e48a062c2b0e7705ca6f 100755 +index 0feb07afbccad97a92cee00954443407eb20ac67..5eccced7cf0212f229db68c76cc824a37e4a29bc 100755 --- a/configure.py +++ b/configure.py @@ -1704,6 +1704,7 @@ def configure_library(lib, output, pkgname=None): 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 025e06ca2388..8b7051b7f036 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 @@ -10,10 +10,10 @@ JS errors and ensures embedder JS is loaded via LoadEmbedderJavaScriptSource. That method is generated by our modifications to js2c.cc in the BUILD.gn patch diff --git a/lib/internal/fs/watchers.js b/lib/internal/fs/watchers.js -index 411eab8136d5957ae8a491bc38ffbdc88e59f5da..63c93b5be09692d0d4b6bfbb214b173b50ccca43 100644 +index 0244a214b187e67e0cb89f26cd019855963ec93a..b65a3be6bcb0e28f7f43367d0fa9da533db9d0d1 100644 --- a/lib/internal/fs/watchers.js +++ b/lib/internal/fs/watchers.js -@@ -292,12 +292,13 @@ function emitCloseNT(self) { +@@ -299,12 +299,13 @@ function emitCloseNT(self) { } // Legacy alias on the C++ wrapper object. This is not public API, so we may @@ -34,7 +34,7 @@ index 411eab8136d5957ae8a491bc38ffbdc88e59f5da..63c93b5be09692d0d4b6bfbb214b173b let kResistStopPropagation; diff --git a/src/node_builtins.cc b/src/node_builtins.cc -index f14b45850e42585f5686b7201e2b8281ed8c24e1..915b8cba6d512096e6090272ab3fbc63d5c61ce8 100644 +index 8b104e175ccf8de90c138337f83f8f6ce1348ac7..35cf42a5e533cb799bf129df0c8370bfe8310233 100644 --- a/src/node_builtins.cc +++ b/src/node_builtins.cc @@ -35,6 +35,7 @@ using v8::Value; diff --git a/patches/node/build_option_to_use_custom_inspector_protocol_path.patch b/patches/node/build_option_to_use_custom_inspector_protocol_path.patch deleted file mode 100644 index 339cddb7a744..000000000000 --- a/patches/node/build_option_to_use_custom_inspector_protocol_path.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: deepak1556 -Date: Mon, 17 Feb 2025 20:57:05 +0900 -Subject: build: option to use custom inspector_protocol path - -This allows building against //third_party/inspector_protocol -which would align us when building with chromium shared dependencies. - -The span changes will be auto-removed when Node.js bumps their -protocol deps to contain https://chromium-review.googlesource.com/c/v8/v8/+/5996636 - -Rest of the changes can be upstreamed. - -diff --git a/node.gni b/node.gni -index 165b26a79a7f2b74d2a2252dc2350b2e10c091e6..c64761b730e61edcdc0e46a48699f2fd5bb1c0a6 100644 ---- a/node.gni -+++ b/node.gni -@@ -16,6 +16,9 @@ declare_args() { - # The location of simdutf - use the one from node's deps by default. - node_simdutf_path = "//third_party/simdutf" - -+ # The location of inspector_protocol - use the one from node's deps by default. -+ node_inspector_protocol_path = "//third_party/inspector_protocol" -+ - # The NODE_MODULE_VERSION defined in node_version.h. - node_module_version = exec_script("$node_path/tools/getmoduleversion.py", [], "value") - -diff --git a/src/inspector/unofficial.gni b/src/inspector/unofficial.gni -index 3d7aa148678b2646b88fa7c32abec91791b02b82..4810d93eb971b253f7dadff7011a632f6dbe6a2b 100644 ---- a/src/inspector/unofficial.gni -+++ b/src/inspector/unofficial.gni -@@ -13,7 +13,7 @@ template("inspector_gn_build") { - } - - node_gen_dir = get_label_info("../..", "target_gen_dir") -- protocol_tool_path = "../../deps/inspector_protocol" -+ protocol_tool_path = "$node_inspector_protocol_path" - - gypi_values = exec_script( - "../../tools/gypi_to_gn.py", -diff --git a/unofficial.gni b/unofficial.gni -index 332c9ee7262108ae9616e9bc8bd950a4940a858c..8886f2a79ae77614789d6ae0defd4f18fc756456 100644 ---- a/unofficial.gni -+++ b/unofficial.gni -@@ -222,13 +222,14 @@ template("node_gn_build") { - } - if (node_enable_inspector) { - deps += [ -- "src/inspector:crdtp", -+ "$node_inspector_protocol_path:crdtp", - "src/inspector:node_protocol_generated_sources", - "src/inspector:v8_inspector_compress_protocol_json", - ] - include_dirs = [ - "$target_gen_dir/src", - "$target_gen_dir/src/inspector", -+ "$node_inspector_protocol_path", - ] - node_inspector = exec_script( - "./tools/gypi_to_gn.py", 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 7901c967e919..88f7586d58c6 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 b9264bfb1170928431848bb2b99e4f0dfbe8f95a..836d96a1bd9c1d5568f0045bbddddca1edb1a0ce 100644 +index 2caa183213d5632be81b763e894e37c09384391f..2cce436c4a9e3d942f957f6c94a4ef9e3db391ce 100644 --- a/common.gypi +++ b/common.gypi @@ -128,6 +128,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 ae864ce06db1..a2901455347a 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 @@ -8,7 +8,7 @@ they use themselves as the entry point. We should try to upstream some form of this. diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js -index 4e7be0594ca1e1ceaf1963debbce46783893ed77..a6df0672bf6ae6e9a74ebbb0e4debff63599cc99 100644 +index 0cda54fd85e1e0bff13d4718a269eb3e7c60312a..6b165062a5eaa40f6e5614bca50bc33ccbdb85cc 100644 --- a/lib/internal/process/pre_execution.js +++ b/lib/internal/process/pre_execution.js @@ -245,12 +245,14 @@ function patchProcessObject(expandArgv1) { diff --git a/patches/node/chore_disable_deprecation_ftbfs_in_simdjson_header.patch b/patches/node/chore_disable_deprecation_ftbfs_in_simdjson_header.patch index 0bde5d3fc9c8..b91313c8345e 100644 --- a/patches/node/chore_disable_deprecation_ftbfs_in_simdjson_header.patch +++ b/patches/node/chore_disable_deprecation_ftbfs_in_simdjson_header.patch @@ -11,10 +11,10 @@ Without this patch, building with simdjson fails with This patch can be removed once this is fixed upstream in simdjson. diff --git a/deps/simdjson/simdjson.h b/deps/simdjson/simdjson.h -index a0d449975224a3e0db5c05de79b290763d6e390c..e77e47f972b4609e38aa8b68ab0d81ed1575effb 100644 +index 8f52a4331d59996786450eec982659da9244cac1..74729673d87b068dff5f24166bbb77d844f15f42 100644 --- a/deps/simdjson/simdjson.h +++ b/deps/simdjson/simdjson.h -@@ -3868,12 +3868,17 @@ inline std::ostream& operator<<(std::ostream& out, simdjson_result padded_string::load(std::string_view filen +@@ -4304,6 +4309,9 @@ inline simdjson_result padded_string::load(std::string_view filen } // namespace simdjson @@ -42,7 +42,7 @@ index a0d449975224a3e0db5c05de79b290763d6e390c..e77e47f972b4609e38aa8b68ab0d81ed inline simdjson::padded_string operator ""_padded(const char *str, size_t len) { return simdjson::padded_string(str, len); } -@@ -4281,6 +4289,8 @@ inline simdjson::padded_string operator ""_padded(const char8_t *str, size_t len +@@ -4312,6 +4320,8 @@ inline simdjson::padded_string operator ""_padded(const char8_t *str, size_t len return simdjson::padded_string(reinterpret_cast(str), len); } #endif diff --git a/patches/node/chore_expose_importmoduledynamically_and.patch b/patches/node/chore_expose_importmoduledynamically_and.patch index 497ea5842d98..3f44ec26449e 100644 --- a/patches/node/chore_expose_importmoduledynamically_and.patch +++ b/patches/node/chore_expose_importmoduledynamically_and.patch @@ -11,7 +11,7 @@ its own blended handler between Node and Blink. Not upstreamable. diff --git a/lib/internal/modules/esm/utils.js b/lib/internal/modules/esm/utils.js -index 9d6f850f667c5186efe6855bc3d5f5af332bdaa7..8521759e20adf53024e5893dbf3cb36e1752085e 100644 +index 9b41db8b0714b7408f79cbd5b4c460d9bc08f239..35ecfb9bbaf2c8e7351e1c69da84c82a4a7cb049 100644 --- a/lib/internal/modules/esm/utils.js +++ b/lib/internal/modules/esm/utils.js @@ -30,7 +30,7 @@ const { @@ -23,7 +23,7 @@ index 9d6f850f667c5186efe6855bc3d5f5af332bdaa7..8521759e20adf53024e5893dbf3cb36e const { loadPreloadModules, initializeFrozenIntrinsics, -@@ -280,12 +280,13 @@ let _forceDefaultLoader = false; +@@ -281,12 +281,13 @@ let _forceDefaultLoader = false; * @param {boolean} [forceDefaultLoader=false] - A boolean indicating disabling custom loaders. */ function initializeESM(forceDefaultLoader = false) { @@ -40,10 +40,10 @@ index 9d6f850f667c5186efe6855bc3d5f5af332bdaa7..8521759e20adf53024e5893dbf3cb36e /** diff --git a/src/module_wrap.cc b/src/module_wrap.cc -index cdd0ba00eb0cafbc79b816017423f9021ca2979d..6916497f6feb14e482cf5080b57d639ae7292d20 100644 +index e317a84e55714af0a93719336d02ac26410ad724..e3880111172363feafb53b51deb08c93596cd4f4 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc -@@ -875,7 +875,7 @@ MaybeLocal ModuleWrap::ResolveModuleCallback( +@@ -895,7 +895,7 @@ MaybeLocal ModuleWrap::ResolveModuleCallback( return module->module_.Get(isolate); } @@ -52,7 +52,7 @@ index cdd0ba00eb0cafbc79b816017423f9021ca2979d..6916497f6feb14e482cf5080b57d639a Local context, Local host_defined_options, Local resource_name, -@@ -947,12 +947,13 @@ void ModuleWrap::SetImportModuleDynamicallyCallback( +@@ -967,12 +967,13 @@ void ModuleWrap::SetImportModuleDynamicallyCallback( Realm* realm = Realm::GetCurrent(args); HandleScope handle_scope(isolate); @@ -68,7 +68,7 @@ index cdd0ba00eb0cafbc79b816017423f9021ca2979d..6916497f6feb14e482cf5080b57d639a } void ModuleWrap::HostInitializeImportMetaObjectCallback( -@@ -994,13 +995,14 @@ void ModuleWrap::SetInitializeImportMetaObjectCallback( +@@ -1014,13 +1015,14 @@ void ModuleWrap::SetInitializeImportMetaObjectCallback( Realm* realm = Realm::GetCurrent(args); Isolate* isolate = realm->isolate(); @@ -87,7 +87,7 @@ index cdd0ba00eb0cafbc79b816017423f9021ca2979d..6916497f6feb14e482cf5080b57d639a MaybeLocal ModuleWrap::SyntheticModuleEvaluationStepsCallback( diff --git a/src/module_wrap.h b/src/module_wrap.h -index ef4dfd1d6b091d2b0f71b946904a47415b6435ba..862f946a75f2a2949d7eeb7f97e96289beab8078 100644 +index 9363ce73e51cde3d3a94f9912f072d532d0f8560..c0e972ed293157726efc5fa76dfa62d3da51c22a 100644 --- a/src/module_wrap.h +++ b/src/module_wrap.h @@ -8,6 +8,7 @@ @@ -114,7 +114,7 @@ index ef4dfd1d6b091d2b0f71b946904a47415b6435ba..862f946a75f2a2949d7eeb7f97e96289 public: enum InternalFields { kModuleSlot = BaseObject::kInternalFieldCount, -@@ -91,6 +99,8 @@ class ModuleWrap : public BaseObject { +@@ -92,6 +100,8 @@ class ModuleWrap : public BaseObject { static void CreateRequiredModuleFacade( const v8::FunctionCallbackInfo& args); @@ -123,7 +123,7 @@ index ef4dfd1d6b091d2b0f71b946904a47415b6435ba..862f946a75f2a2949d7eeb7f97e96289 private: ModuleWrap(Realm* realm, v8::Local object, -@@ -130,7 +140,6 @@ class ModuleWrap : public BaseObject { +@@ -131,7 +141,6 @@ class ModuleWrap : public BaseObject { v8::Local specifier, v8::Local import_attributes, v8::Local referrer); diff --git a/patches/node/chore_remove_protocol_maybe_from_node_string.patch b/patches/node/chore_remove_protocol_maybe_from_node_string.patch deleted file mode 100644 index 12352945185c..000000000000 --- a/patches/node/chore_remove_protocol_maybe_from_node_string.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shelley Vohr -Date: Thu, 26 Jun 2025 09:20:43 +0000 -Subject: chore: remove protocol::Maybe from node_string - -It was removed upstream in https://chromium-review.googlesource.com/c/chromium/src/+/6049967. - -This should be upstreamed. - -diff --git a/src/inspector/node_string.h b/src/inspector/node_string.h -index a0d19a592d7bf9b00d6b98ef1ae931626ebb945c..ddedca4a5b9b35258050f8b4cb446ceeba956896 100644 ---- a/src/inspector/node_string.h -+++ b/src/inspector/node_string.h -@@ -6,7 +6,6 @@ - #include - #include - #include --#include "crdtp/maybe.h" - #include "crdtp/protocol_core.h" - #include "util.h" - #include "v8-inspector.h" -@@ -31,11 +30,6 @@ struct ProtocolTypeTraits { - std::vector* bytes); - }; - --template <> --struct detail::MaybeTypedef { -- typedef ValueMaybe type; --}; -- - } // namespace crdtp - - namespace node { diff --git a/patches/node/cli_move_--trace-atomics-wait_to_eol.patch b/patches/node/cli_move_--trace-atomics-wait_to_eol.patch index 681ea40add6e..dae7ed917b98 100644 --- a/patches/node/cli_move_--trace-atomics-wait_to_eol.patch +++ b/patches/node/cli_move_--trace-atomics-wait_to_eol.patch @@ -15,10 +15,50 @@ Reviewed-By: Benjamin Gruenbaum Reviewed-By: Yagiz Nizipli diff --git a/doc/api/cli.md b/doc/api/cli.md -index d924287df3ca29681cf71e2fbd402314ce8edd97..f2f4d25a838b9758234cd667b0fb537d0d0fcced 100644 +index 404e87e6d1237b5ee79cafd8a959c1b6d9d23fe5..7deda572c940f7b2e8c6813f1826796a13e4db38 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md -@@ -3386,7 +3386,6 @@ one is included in the list below. +@@ -2709,39 +2709,6 @@ added: v12.0.0 + Set default [`tls.DEFAULT_MIN_VERSION`][] to 'TLSv1.3'. Use to disable support + for TLSv1.2, which is not as secure as TLSv1.3. + +-### `--trace-atomics-wait` +- +- +- +-> Stability: 0 - Deprecated +- +-Print short summaries of calls to [`Atomics.wait()`][] to stderr. +-The output could look like this: +- +-```text +-(node:15701) [Thread 0] Atomics.wait(<address> + 0, 1, inf) started +-(node:15701) [Thread 0] Atomics.wait(<address> + 0, 1, inf) did not wait because the values mismatched +-(node:15701) [Thread 0] Atomics.wait(<address> + 0, 0, 10) started +-(node:15701) [Thread 0] Atomics.wait(<address> + 0, 0, 10) timed out +-(node:15701) [Thread 0] Atomics.wait(<address> + 4, 0, inf) started +-(node:15701) [Thread 1] Atomics.wait(<address> + 4, -1, inf) started +-(node:15701) [Thread 0] Atomics.wait(<address> + 4, 0, inf) was woken up by another thread +-(node:15701) [Thread 1] Atomics.wait(<address> + 4, -1, inf) was woken up by another thread +-``` +- +-The fields here correspond to: +- +-* The thread id as given by [`worker_threads.threadId`][] +-* The base address of the `SharedArrayBuffer` in question, as well as the +- byte offset corresponding to the index passed to `Atomics.wait()` +-* The expected value that was passed to `Atomics.wait()` +-* The timeout passed to `Atomics.wait` +- + ### `--trace-deprecation` + +