From 4ae27c5c2af9b63f816529aa17b19f47c9d4de9d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 14 Oct 2025 10:02:24 +0200 Subject: [PATCH] feat: add v24.10.0 patch (#120) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Node.js Patch Update to v24.10.0 This PR updates the Node.js patch to version 24.10.0. The workflow automatically attempts to resolve patch conflicts using AI when the OpenAI API key is available. ### AI Resolution Details Processing section 1/1 for ./src/node_contextify.cc... Found 1 reject files to process Processing: ./src/node_contextify.cc.rej -> ./src/node_contextify.cc Prompt for OpenAI API: I have a Git patch that failed to apply. Here's the specific section that needs to be fixed: REJECTED PATCH HUNK: ``` @@ -1118,6 +1134,10 @@ .IsNothing()) return; + if (sourceless && produce_cached_data) { + V8::DisableCompilationForSourcelessUse(); + } + TRACE_EVENT_END0(TRACING_CATEGORY_NODE2(vm, script), "ContextifyScript::New"); } ``` CURRENT FILE SECTION (lines 1113-1128): ``` return; } if (StoreCodeCacheResult(env, self, compile_options, source, produce_cached_data, std::move(new_cached_data)) .IsNothing()) { return; } if (self->Set(env->context(), env->source_url_string(), v8_script->GetSourceURL()) .IsNothing()) { return; ``` Please apply the intended changes from the rejected hunk to this file section. Return ONLY the corrected file section content, preserving the exact line structure and formatting. Do not add explanations or markdown formatting. RESOLVED CONTENT for ./src/node_contextify.cc: ``` return; } if (StoreCodeCacheResult(env, self, compile_options, source, produce_cached_data, std::move(new_cached_data)) .IsNothing()) { return; } if (sourceless && produce_cached_data) { V8::DisableCompilationForSourcelessUse(); } if (self->Set(env->context(), env->source_url_string(), v8_script->GetSourceURL()) .IsNothing()) { return; ``` ✅ Successfully resolved ./src/node_contextify.cc CONFLICTS_RESOLVED=1 TOTAL_CONFLICTS=1 HAS_UNRESOLVED=False Resolution summary: 1/1 conflicts resolved Co-authored-by: github-actions[bot] Co-authored-by: Daniel Lando --- ....9.0.cpp.patch => node.v24.10.0.cpp.patch} | 36 +++++++++++-------- patches/patches.json | 2 +- 2 files changed, 23 insertions(+), 15 deletions(-) rename patches/{node.v24.9.0.cpp.patch => node.v24.10.0.cpp.patch} (97%) diff --git a/patches/node.v24.9.0.cpp.patch b/patches/node.v24.10.0.cpp.patch similarity index 97% rename from patches/node.v24.9.0.cpp.patch rename to patches/node.v24.10.0.cpp.patch index 5c0997d..d19535e 100644 --- a/patches/node.v24.9.0.cpp.patch +++ b/patches/node.v24.10.0.cpp.patch @@ -1,5 +1,5 @@ diff --git node/common.gypi node/common.gypi -index 0d2fe4d9d6..7dc6890ba0 100644 +index 7727dfc4c6..3ab611dc48 100644 --- node/common.gypi +++ node/common.gypi @@ -192,7 +192,7 @@ @@ -643,10 +643,10 @@ index c70bec82a2..4f807cd526 100644 } diff --git node/src/node_contextify.cc node/src/node_contextify.cc -index 92c7ba0249..701c3fecda 100644 +index 3c234205e8..5d2152be2e 100644 --- node/src/node_contextify.cc +++ node/src/node_contextify.cc -@@ -87,6 +87,7 @@ using v8::Symbol; +@@ -88,6 +88,7 @@ using v8::Symbol; using v8::Uint32; using v8::UnboundScript; using v8::Value; @@ -654,7 +654,7 @@ index 92c7ba0249..701c3fecda 100644 // The vm module executes code in a sandboxed environment with a different // global object than the rest of the code. This is achieved by applying -@@ -994,13 +995,13 @@ void ContextifyScript::New(const FunctionCallbackInfo& args) { +@@ -995,13 +996,13 @@ void ContextifyScript::New(const FunctionCallbackInfo& args) { Local cached_data_buf; bool produce_cached_data = false; Local parsing_context = context; @@ -671,7 +671,7 @@ index 92c7ba0249..701c3fecda 100644 CHECK(args[2]->IsNumber()); line_offset = args[2].As()->Value(); CHECK(args[3]->IsNumber()); -@@ -1021,6 +1022,11 @@ void ContextifyScript::New(const FunctionCallbackInfo& args) { +@@ -1022,6 +1023,11 @@ void ContextifyScript::New(const FunctionCallbackInfo& args) { } CHECK(args[7]->IsSymbol()); id_symbol = args[7].As(); @@ -683,7 +683,7 @@ index 92c7ba0249..701c3fecda 100644 } ContextifyScript* contextify_script = New(env, args.This()); -@@ -1067,6 +1073,10 @@ void ContextifyScript::New(const FunctionCallbackInfo& args) { +@@ -1068,6 +1074,10 @@ void ContextifyScript::New(const FunctionCallbackInfo& args) { ShouldNotAbortOnUncaughtScope no_abort_scope(env); Context::Scope scope(parsing_context); @@ -694,7 +694,7 @@ index 92c7ba0249..701c3fecda 100644 MaybeLocal maybe_v8_script = ScriptCompiler::CompileUnboundScript(isolate, &source, compile_options); -@@ -1081,6 +1091,12 @@ void ContextifyScript::New(const FunctionCallbackInfo& args) { +@@ -1082,6 +1092,12 @@ void ContextifyScript::New(const FunctionCallbackInfo& args) { return; } @@ -707,17 +707,25 @@ index 92c7ba0249..701c3fecda 100644 contextify_script->set_unbound_script(v8_script); std::unique_ptr new_cached_data; -@@ -1118,6 +1134,10 @@ void ContextifyScript::New(const FunctionCallbackInfo& args) { - .IsNothing()) +@@ -1094,7 +1110,7 @@ void ContextifyScript::New(const FunctionCallbackInfo& args) { + if (contextify_script->object() + ->SetPrivate(context, env->host_defined_option_symbol(), id_symbol) + .IsNothing()) { +- return; ++return; + } + if (StoreCodeCacheResult(env, + self, +@@ -1105,6 +1121,9 @@ void ContextifyScript::New(const FunctionCallbackInfo& args) { + .IsNothing()) { return; - + } + if (sourceless && produce_cached_data) { + V8::DisableCompilationForSourcelessUse(); + } -+ - TRACE_EVENT_END0(TRACING_CATEGORY_NODE2(vm, script), "ContextifyScript::New"); - } - + if (self->Set(env->context(), + env->source_url_string(), + v8_script->GetSourceURL()) diff --git node/src/node_main.cc node/src/node_main.cc index 3295121b87..bfe838b8c1 100644 --- node/src/node_main.cc diff --git a/patches/patches.json b/patches/patches.json index dbb0052..9da7a78 100644 --- a/patches/patches.json +++ b/patches/patches.json @@ -1,5 +1,5 @@ { - "v24.9.0": ["node.v24.9.0.cpp.patch"], + "v24.10.0": ["node.v24.10.0.cpp.patch"], "v22.20.0": ["node.v22.20.0.cpp.patch"], "v20.19.5": ["node.v20.19.5.cpp.patch"], "v18.20.8": ["node.v18.20.8.cpp.patch"],