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`