From 3083fab4e461d94f61dc63722cf319a0a32c3afc Mon Sep 17 00:00:00 2001 From: "electron-roller[bot]" <84116207+electron-roller[bot]@users.noreply.github.com> Date: Thu, 30 Oct 2025 17:05:42 +0100 Subject: [PATCH] chore: bump node to v22.21.1 (38-x-y) (#48615) * chore: bump node in DEPS to v22.21.0 * chore: bump node in DEPS to v22.21.1 * chore: update patches * lib,src: refactor assert to load error source from memory nodejs/node#59751 * src: add percentage support to --max-old-space-size nodejs/node#59082 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt --- DEPS | 2 +- patches/node/.patches | 1 - ...etraits_signatures_to_avoid_conflict.patch | 2 +- patches/node/build_enable_perfetto.patch | 10 +-- ...de_entrypoint_to_be_a_builtin_module.patch | 4 +- ...e_expose_importmoduledynamically_and.patch | 30 ++++----- ...cli_move_--trace-atomics-wait_to_eol.patch | 18 ++--- .../node/cli_remove_deprecated_v8_flag.patch | 8 +-- ...g_fileexists_fn_to_legacymainresolve.patch | 10 +-- ...ssert_module_in_the_renderer_process.patch | 67 ------------------- .../node/fix_cppgc_initializing_twice.patch | 4 +- ...separent_bails_on_resource_path_exit.patch | 6 +- ...se_readfilesync_override_for_modules.patch | 16 ++--- ...n_electron_module_via_the_esm_loader.patch | 4 +- ...ingssl_and_openssl_incompatibilities.patch | 27 ++++---- ...ix_remove_deprecated_errno_constants.patch | 2 +- .../fix_remove_fastapitypedarray_usage.patch | 4 +- ...emove_outdated_v8_flags_from_node_cc.patch | 8 +-- ...ch_cppgc_heap_on_v8_isolate_creation.patch | 6 +- ..._on_wrapper-descriptor-based_cppheap.patch | 2 +- ...ted_fields_of_fastapicallbackoptions.patch | 6 +- .../node/support_v8_sandboxed_pointers.patch | 8 +-- ...st_formally_mark_some_tests_as_flaky.patch | 4 +- script/node-disabled-tests.json | 1 + 24 files changed, 91 insertions(+), 159 deletions(-) delete mode 100644 patches/node/fix_assert_module_in_the_renderer_process.patch diff --git a/DEPS b/DEPS index 796f13276751..c0b7f8804654 100644 --- a/DEPS +++ b/DEPS @@ -4,7 +4,7 @@ vars = { 'chromium_version': '140.0.7339.249', 'node_version': - 'v22.20.0', + 'v22.21.1', 'nan_version': 'e14bdcd1f72d62bca1d541b66da43130384ec213', 'squirrel.mac_version': diff --git a/patches/node/.patches b/patches/node/.patches index 5d4aecd41fa6..3d5dc9eef1f3 100644 --- a/patches/node/.patches +++ b/patches/node/.patches @@ -17,7 +17,6 @@ chore_expose_importmoduledynamically_and.patch test_formally_mark_some_tests_as_flaky.patch fix_do_not_resolve_electron_entrypoints.patch ci_ensure_node_tests_set_electron_run_as_node.patch -fix_assert_module_in_the_renderer_process.patch fix_allow_passing_fileexists_fn_to_legacymainresolve.patch fix_remove_deprecated_errno_constants.patch build_enable_perfetto.patch 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 7f669c5b0bd7..927fd478912a 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 @@ -14,7 +14,7 @@ error: duplicate symbol: crdtp::ProtocolTypeTraits ModuleWrap::ResolveModuleCallback( - return module->module_.Get(isolate); +@@ -1063,7 +1063,7 @@ Maybe ModuleWrap::ResolveModule( + return Just(module_wrap); } -static MaybeLocal ImportModuleDynamically( @@ -52,7 +52,7 @@ index c52e20d742942667f43ea3e151fc6702260b176b..cbb3e7f4df72f83cb8a1afc25a742921 Local context, Local host_defined_options, Local resource_name, -@@ -973,12 +973,13 @@ void ModuleWrap::SetImportModuleDynamicallyCallback( +@@ -1135,12 +1135,13 @@ void ModuleWrap::SetImportModuleDynamicallyCallback( Realm* realm = Realm::GetCurrent(args); HandleScope handle_scope(isolate); @@ -68,7 +68,7 @@ index c52e20d742942667f43ea3e151fc6702260b176b..cbb3e7f4df72f83cb8a1afc25a742921 } void ModuleWrap::HostInitializeImportMetaObjectCallback( -@@ -1020,13 +1021,14 @@ void ModuleWrap::SetInitializeImportMetaObjectCallback( +@@ -1182,13 +1183,14 @@ void ModuleWrap::SetInitializeImportMetaObjectCallback( Realm* realm = Realm::GetCurrent(args); Isolate* isolate = realm->isolate(); @@ -87,7 +87,7 @@ index c52e20d742942667f43ea3e151fc6702260b176b..cbb3e7f4df72f83cb8a1afc25a742921 MaybeLocal ModuleWrap::SyntheticModuleEvaluationStepsCallback( diff --git a/src/module_wrap.h b/src/module_wrap.h -index 9363ce73e51cde3d3a94f9912f072d532d0f8560..c0e972ed293157726efc5fa76dfa62d3da51c22a 100644 +index 695b73ca7ffea850cd88e94546125d12ddc991f6..09602a8e619ba52f3525e3d312047c6dba0484a5 100644 --- a/src/module_wrap.h +++ b/src/module_wrap.h @@ -8,6 +8,7 @@ @@ -98,8 +98,8 @@ index 9363ce73e51cde3d3a94f9912f072d532d0f8560..c0e972ed293157726efc5fa76dfa62d3 #include "v8-script.h" namespace node { -@@ -33,7 +34,14 @@ enum HostDefinedOptions : int { - kLength = 9, +@@ -86,7 +87,14 @@ struct ModuleCacheKey : public MemoryRetainer { + hash(hash) {} }; -class ModuleWrap : public BaseObject { @@ -111,10 +111,10 @@ index 9363ce73e51cde3d3a94f9912f072d532d0f8560..c0e972ed293157726efc5fa76dfa62d3 + v8::Local import_assertions); + +class NODE_EXTERN ModuleWrap : public BaseObject { - public: - enum InternalFields { - kModuleSlot = BaseObject::kInternalFieldCount, -@@ -92,6 +100,8 @@ class ModuleWrap : public BaseObject { + using ResolveCache = + std::unordered_map; + +@@ -151,6 +159,8 @@ class ModuleWrap : public BaseObject { static void CreateRequiredModuleFacade( const v8::FunctionCallbackInfo& args); @@ -123,11 +123,11 @@ index 9363ce73e51cde3d3a94f9912f072d532d0f8560..c0e972ed293157726efc5fa76dfa62d3 private: ModuleWrap(Realm* realm, v8::Local object, -@@ -131,7 +141,6 @@ class ModuleWrap : public BaseObject { +@@ -190,7 +200,6 @@ class ModuleWrap : public BaseObject { v8::Local specifier, v8::Local import_attributes, v8::Local referrer); - static ModuleWrap* GetFromModule(node::Environment*, v8::Local); - v8::Global module_; - std::unordered_map> resolve_cache_; + // This method may throw a JavaScript exception, so the return type is + // wrapped in a Maybe. 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 394ae7770d0c..f47b566e0153 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 9a0e83b95a72486ab9751b3b8818f4beeb527041..1da7126b9d51238e9b89ee6bed602df3f5598a9e 100644 +index a97053929c81ac18bcb3beda7cecb69621b6e70c..a54d0e46c8e4e3aa6be433fba73ef9a3228fa175 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md -@@ -2727,39 +2727,6 @@ added: v12.0.0 +@@ -2749,39 +2749,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 9a0e83b95a72486ab9751b3b8818f4beeb527041..1da7126b9d51238e9b89ee6bed602df3 ### `--trace-deprecation`