From fa1505cca9a3b416ed84c198ca553ddb62d3b61c Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 12:04:35 +0200 Subject: [PATCH] chore: bump node to v22.19.0 (37-x-y) (#48220) Co-authored-by: Shelley Vohr Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> --- DEPS | 2 +- patches/node/.patches | 2 +- patches/node/build_add_gn_build_files.patch | 51 +++++-------------- .../build_compile_with_c_20_support.patch | 2 +- patches/node/build_enable_perfetto.patch | 2 +- ...compilation_fails_if_not_using_a_new.patch | 2 +- ...f_original-fs_and_custom_embedder_js.patch | 2 +- ...e_clang_as_default_compiler_on_macos.patch | 2 +- ...de_entrypoint_to_be_a_builtin_module.patch | 2 +- ...cli_move_--trace-atomics-wait_to_eol.patch | 14 ++--- .../node/cli_remove_deprecated_v8_flag.patch | 6 +-- ..._values_for_variables_in_common_gypi.patch | 2 +- ...g_fileexists_fn_to_legacymainresolve.patch | 10 ++-- ...ssert_module_in_the_renderer_process.patch | 4 +- .../node/fix_cppgc_initializing_twice.patch | 4 +- .../fix_crypto_tests_to_run_with_bssl.patch | 10 ++-- ..._do_not_resolve_electron_entrypoints.patch | 2 +- ...se_readfilesync_override_for_modules.patch | 4 +- ...n_electron_module_via_the_esm_loader.patch | 6 +-- ...ingssl_and_openssl_incompatibilities.patch | 12 ++--- ...in_esm_loaders_to_apply_asar_patches.patch | 2 +- .../fix_remove_fastapitypedarray_usage.patch | 8 +-- ...rmony-import-assertions_from_node_cc.patch | 25 --------- ...emove_outdated_v8_flags_from_node_cc.patch | 36 +++++++++++++ .../pass_all_globals_through_require.patch | 6 +-- ...dder_overriding_of_internal_fs_calls.patch | 2 +- ...ch_cppgc_heap_on_v8_isolate_creation.patch | 12 ++--- ...st_formally_mark_some_tests_as_flaky.patch | 2 +- ...e_static_method_names_in_call_stacks.patch | 4 +- script/node-disabled-tests.json | 1 + 30 files changed, 112 insertions(+), 127 deletions(-) delete mode 100644 patches/node/fix_remove_harmony-import-assertions_from_node_cc.patch create mode 100644 patches/node/fix_remove_outdated_v8_flags_from_node_cc.patch diff --git a/DEPS b/DEPS index 1697492a2057..74ff89aa92ef 100644 --- a/DEPS +++ b/DEPS @@ -4,7 +4,7 @@ vars = { 'chromium_version': '138.0.7204.251', 'node_version': - 'v22.18.0', + 'v22.19.0', 'nan_version': 'e14bdcd1f72d62bca1d541b66da43130384ec213', 'squirrel.mac_version': diff --git a/patches/node/.patches b/patches/node/.patches index 17e363ed7928..0eee822f5fef 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -30,7 +30,7 @@ build_compile_with_c_20_support.patch add_v8_taskpirority_to_foreground_task_runner_signature.patch cli_remove_deprecated_v8_flag.patch build_restore_clang_as_default_compiler_on_macos.patch -fix_remove_harmony-import-assertions_from_node_cc.patch +fix_remove_outdated_v8_flags_from_node_cc.patch chore_disable_deprecation_ftbfs_in_simdjson_header.patch build_allow_unbundling_of_node_js_dependencies.patch test_use_static_method_names_in_call_stacks.patch diff --git a/patches/node/build_add_gn_build_files.patch b/patches/node/build_add_gn_build_files.patch index 5e0111ef8ca4..ed758f53ab54 100644 --- a/patches/node/build_add_gn_build_files.patch +++ b/patches/node/build_add_gn_build_files.patch @@ -24,7 +24,7 @@ index 2415940835036226799a7ea14c6687cc0d56c523..0feb07afbccad97a92cee00954443407 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 b049f0692980c3e26771c3209c3bdd2e9a4d637b..e2407027ab05e59b2f0f1c213b98ea469db7a91b 100644 +index d4438f7fd61598afac2c1e3184721a759d22b10c..e2407027ab05e59b2f0f1c213b98ea469db7a91b 100644 --- a/node.gni +++ b/node.gni @@ -5,10 +5,10 @@ @@ -40,15 +40,7 @@ index b049f0692980c3e26771c3209c3bdd2e9a4d637b..e2407027ab05e59b2f0f1c213b98ea46 # The location of OpenSSL - use the one from node's deps by default. node_openssl_path = "$node_path/deps/openssl" -@@ -42,12 +42,15 @@ declare_args() { - # The variable is called "openssl" for parity with node's GYP build. - node_use_openssl = true - -+ # Build node with SQLite support. -+ node_use_sqlite = true -+ - # Use the specified path to system CA (PEM format) in addition to - # the BoringSSL supplied CA store or compiled-in Mozilla CA copy. +@@ -50,7 +50,7 @@ declare_args() { node_openssl_system_ca_path = "" # Initialize v8 platform during node.js startup. @@ -57,7 +49,7 @@ index b049f0692980c3e26771c3209c3bdd2e9a4d637b..e2407027ab05e59b2f0f1c213b98ea46 # Custom build tag. node_tag = "" -@@ -67,10 +70,16 @@ declare_args() { +@@ -70,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,7 +68,7 @@ index b049f0692980c3e26771c3209c3bdd2e9a4d637b..e2407027ab05e59b2f0f1c213b98ea46 assert(!node_enable_inspector || node_use_openssl, diff --git a/src/node_builtins.cc b/src/node_builtins.cc -index abf1583cdac9f139056cf4809f14e28e62f6d24c..8b104e175ccf8de90c138337f83f8f6ce1348ac7 100644 +index b4acc40618e372b09d0cb5e3755034f08711a282..efeaaef7e4dc64a0adb5e6bdbbe18945890de62c 100644 --- a/src/node_builtins.cc +++ b/src/node_builtins.cc @@ -789,6 +789,7 @@ void BuiltinLoader::RegisterExternalReferences( @@ -279,22 +271,10 @@ index 856878c33681a73d41016729dabe48b0a6a80589..91a11852d206b65485fe90fd037a0bd1 if sys.platform == 'win32': files = [ x.replace('\\', '/') for x in files ] diff --git a/unofficial.gni b/unofficial.gni -index da565473f1ae96b4d009935f7733e6ab15ea9de2..26ebc811272ef2990f8d090c54e7f5294aab9d37 100644 +index 865a0d5ce9c6792e57f4216bcaa594ca6fc7b1c8..26ebc811272ef2990f8d090c54e7f5294aab9d37 100644 --- a/unofficial.gni +++ b/unofficial.gni -@@ -22,6 +22,11 @@ template("node_gn_build") { - } else { - defines += [ "HAVE_OPENSSL=0" ] - } -+ if (node_use_sqlite) { -+ defines += [ "HAVE_SQLITE=1" ] -+ } else { -+ defines += [ "HAVE_SQLITE=0" ] -+ } - if (node_use_amaro) { - defines += [ "HAVE_AMARO=1" ] - } else { -@@ -142,32 +147,41 @@ template("node_gn_build") { +@@ -147,31 +147,41 @@ template("node_gn_build") { public_configs = [ ":node_external_config", "deps/googletest:googletest_config", @@ -317,7 +297,6 @@ index da565473f1ae96b4d009935f7733e6ab15ea9de2..26ebc811272ef2990f8d090c54e7f529 "deps/nghttp2", - "deps/ngtcp2", "deps/postject", -- "deps/sqlite", "deps/uvwasi", - "deps/zstd", "//third_party/zlib", @@ -340,7 +319,7 @@ index da565473f1ae96b4d009935f7733e6ab15ea9de2..26ebc811272ef2990f8d090c54e7f529 "$target_gen_dir/node_javascript.cc", ] + gypi_values.node_sources -@@ -190,9 +204,13 @@ template("node_gn_build") { +@@ -194,7 +204,7 @@ template("node_gn_build") { } if (node_use_openssl) { deps += [ "deps/ncrypto" ] @@ -348,14 +327,8 @@ index da565473f1ae96b4d009935f7733e6ab15ea9de2..26ebc811272ef2990f8d090c54e7f529 + public_deps += [ "//third_party/boringssl" ] sources += gypi_values.node_crypto_sources } -+ if (node_use_sqlite) { -+ deps += [ "deps/sqlite" ] -+ sources += gypi_values.node_sqlite_sources -+ } - if (node_enable_inspector) { - deps += [ - "$node_inspector_protocol_path:crdtp", -@@ -215,6 +233,10 @@ template("node_gn_build") { + if (node_use_sqlite) { +@@ -223,6 +233,10 @@ template("node_gn_build") { } } @@ -366,7 +339,7 @@ index da565473f1ae96b4d009935f7733e6ab15ea9de2..26ebc811272ef2990f8d090c54e7f529 executable(target_name) { forward_variables_from(invoker, "*") -@@ -289,6 +311,7 @@ template("node_gn_build") { +@@ -297,6 +311,7 @@ template("node_gn_build") { } executable("node_js2c") { @@ -374,7 +347,7 @@ index da565473f1ae96b4d009935f7733e6ab15ea9de2..26ebc811272ef2990f8d090c54e7f529 deps = [ "deps/uv", "$node_simdutf_path", -@@ -299,26 +322,75 @@ template("node_gn_build") { +@@ -307,26 +322,75 @@ template("node_gn_build") { "src/embedded_data.cc", "src/embedded_data.h", ] @@ -460,7 +433,7 @@ index da565473f1ae96b4d009935f7733e6ab15ea9de2..26ebc811272ef2990f8d090c54e7f529 outputs = [ "$target_gen_dir/node_javascript.cc" ] # Get the path to node_js2c executable of the host toolchain. -@@ -332,11 +404,11 @@ template("node_gn_build") { +@@ -340,11 +404,11 @@ template("node_gn_build") { get_label_info(":node_js2c($host_toolchain)", "name") + host_executable_suffix diff --git a/patches/node/build_compile_with_c_20_support.patch b/patches/node/build_compile_with_c_20_support.patch index 52a25cc54cd5..4ea916a3b134 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 679633dc6b4ce2a1f5f88e93d1a1c1feb4bbadb4..2caa183213d5632be81b763e894e37c09384391f 100644 +index 3a1d2fc9d147a8c89f7b5231d63d37f29979965d..6425ee9e8dba993f3e899362ce9bd7b097f08883 100644 --- a/common.gypi +++ b/common.gypi @@ -539,7 +539,7 @@ diff --git a/patches/node/build_enable_perfetto.patch b/patches/node/build_enable_perfetto.patch index 1bb292dd4687..a4aff646cb11 100644 --- a/patches/node/build_enable_perfetto.patch +++ b/patches/node/build_enable_perfetto.patch @@ -64,7 +64,7 @@ index 251f51ec454f9cba4023b8b6729241ee753aac13..1de8cac6e3953ce9cab9db03530da327 module.exports = { diff --git a/node.gyp b/node.gyp -index 442c1e7a6ddafbb7a7ec7a42a97ec04b28ea4d93..3a66c11d39dd2fd129c8f54098a9607e080ecca0 100644 +index d604e0ddd973174aa7be6f2d250af7b9c2b0fcfd..8e97aa3f44087213425927113fe72bca9ddef45b 100644 --- a/node.gyp +++ b/node.gyp @@ -176,7 +176,6 @@ 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 3f5e9b39ae14..c698eb182600 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 33af43cd768c24b26d523f3db66eb8b9eb26859a..679633dc6b4ce2a1f5f88e93d1a1c1feb4bbadb4 100644 +index e56ba31ed068b81f5c6fbd432cd82bb6916e9a85..3a1d2fc9d147a8c89f7b5231d63d37f29979965d 100644 --- a/common.gypi +++ b/common.gypi @@ -89,6 +89,8 @@ 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 8b7051b7f036..270f96dc50c2 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 @@ -34,7 +34,7 @@ index 0244a214b187e67e0cb89f26cd019855963ec93a..b65a3be6bcb0e28f7f43367d0fa9da53 let kResistStopPropagation; diff --git a/src/node_builtins.cc b/src/node_builtins.cc -index 8b104e175ccf8de90c138337f83f8f6ce1348ac7..35cf42a5e533cb799bf129df0c8370bfe8310233 100644 +index efeaaef7e4dc64a0adb5e6bdbbe18945890de62c..557972987abeaa56918362638a17a9b6e0763238 100644 --- a/src/node_builtins.cc +++ b/src/node_builtins.cc @@ -35,6 +35,7 @@ using v8::Value; 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 88f7586d58c6..e03a0c393202 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 2caa183213d5632be81b763e894e37c09384391f..2cce436c4a9e3d942f957f6c94a4ef9e3db391ce 100644 +index 6425ee9e8dba993f3e899362ce9bd7b097f08883..95d66f75b582b3fd3b833109dfe110ae5b196f83 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 a2901455347a..ca0d26b834e9 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 0cda54fd85e1e0bff13d4718a269eb3e7c60312a..6b165062a5eaa40f6e5614bca50bc33ccbdb85cc 100644 +index 98ed40e3076f6628b1771dade63ac51600e8e447..1eba13caf1e00a8b41b2cf8afc4168c8f98be69f 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/cli_move_--trace-atomics-wait_to_eol.patch b/patches/node/cli_move_--trace-atomics-wait_to_eol.patch index dae7ed917b98..b2451d795d6a 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,10 @@ Reviewed-By: Benjamin Gruenbaum Reviewed-By: Yagiz Nizipli diff --git a/doc/api/cli.md b/doc/api/cli.md -index 404e87e6d1237b5ee79cafd8a959c1b6d9d23fe5..7deda572c940f7b2e8c6813f1826796a13e4db38 100644 +index 8cabb58e621a9951acd5551afb85c192f2b1c690..b69bacebef3e5e5e5b191c61aa5fe0f71c1edfb3 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md -@@ -2709,39 +2709,6 @@ added: v12.0.0 +@@ -2712,39 +2712,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. @@ -58,7 +58,7 @@ index 404e87e6d1237b5ee79cafd8a959c1b6d9d23fe5..7deda572c940f7b2e8c6813f1826796a ### `--trace-deprecation`