From f63a8b75e36cfb503d71ddd735cfb682b8d33ae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrg=C3=BCn=20Day=C4=B1o=C4=9Flu?= Date: Fri, 2 Jan 2026 12:40:05 +0100 Subject: [PATCH 01/36] process: optimize asyncHandledRejections by using FixedQueue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/60854 Reviewed-By: Juan José Arboleda Reviewed-By: Ilyas Shabi Reviewed-By: Stephen Belanger --- benchmark/process/handled-rejections.js | 43 +++++++++++++++++++++++++ lib/internal/process/promises.js | 16 ++++----- 2 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 benchmark/process/handled-rejections.js diff --git a/benchmark/process/handled-rejections.js b/benchmark/process/handled-rejections.js new file mode 100644 index 00000000000000..ff816549c7ef7b --- /dev/null +++ b/benchmark/process/handled-rejections.js @@ -0,0 +1,43 @@ +'use strict'; + +const common = require('../common.js'); + +// Benchmarks the throughput of processing many promise rejections that are +// initially unhandled, get warned, and then handled asynchronously, exercising +// asyncHandledRejections + processPromiseRejections. +// +// Note: This benchmark uses --unhandled-rejections=warn to avoid crashing +// when promises are temporarily unhandled. + +const bench = common.createBenchmark(main, { + n: [1e4, 5e4, 1e5], +}, { + flags: ['--unhandled-rejections=warn'], +}); + +function main({ n }) { + const rejections = []; + + // Suppress warning output during the benchmark + process.removeAllListeners('warning'); + + for (let i = 0; i < n; i++) { + rejections.push(Promise.reject(i)); + } + + // Wait for them to be processed as unhandled and warned. + setImmediate(() => { + setImmediate(() => { + bench.start(); + + for (let i = 0; i < n; i++) { + rejections[i].catch(() => {}); + } + + // Let processPromiseRejections drain asyncHandledRejections. + setImmediate(() => { + bench.end(n); + }); + }); + }); +} diff --git a/lib/internal/process/promises.js b/lib/internal/process/promises.js index da5581d650ab04..0ccea4d05a87f5 100644 --- a/lib/internal/process/promises.js +++ b/lib/internal/process/promises.js @@ -1,14 +1,14 @@ 'use strict'; const { - ArrayPrototypePush, - ArrayPrototypeShift, Error, ObjectPrototypeHasOwnProperty, SafeMap, SafeWeakMap, } = primordials; +const FixedQueue = require('internal/fixed_queue'); + const { tickInfo, promiseRejectEvents: { @@ -119,9 +119,9 @@ const maybeUnhandledPromises = new SafeWeakMap(); let pendingUnhandledRejections = new SafeMap(); /** - * @type {Array<{promise: Promise, warning: Error}>} + * @type {import('internal/fixed_queue')<{promise: Promise, warning: Error}>} */ -const asyncHandledRejections = []; +const asyncHandledRejections = new FixedQueue(); /** * @type {number} @@ -219,7 +219,7 @@ function handledRejection(promise) { if (promiseInfo.warned) { // Generate the warning object early to get a good stack trace. const warning = new PromiseRejectionHandledWarning(promiseInfo.uid); - ArrayPrototypePush(asyncHandledRejections, { promise, warning }); + asyncHandledRejections.push({ promise, warning }); setHasRejectionToWarn(true); } } @@ -375,10 +375,10 @@ function getUnhandledRejectionsMode() { // a warning to be emitted which requires the microtask and next tick // queues to be drained again. function processPromiseRejections() { - let maybeScheduledTicksOrMicrotasks = asyncHandledRejections.length > 0; + let maybeScheduledTicksOrMicrotasks = !asyncHandledRejections.isEmpty(); - while (asyncHandledRejections.length !== 0) { - const { promise, warning } = ArrayPrototypeShift(asyncHandledRejections); + while (!asyncHandledRejections.isEmpty()) { + const { promise, warning } = asyncHandledRejections.shift(); if (!process.emit('rejectionHandled', promise)) { process.emitWarning(warning); } From 892518977969baa1b24074b0325734b44a69a3c4 Mon Sep 17 00:00:00 2001 From: TseIan Date: Fri, 2 Jan 2026 19:40:16 +0800 Subject: [PATCH 02/36] process: improve process.cwd() error message PR-URL: https://github.com/nodejs/node/pull/61164 Reviewed-By: Stephen Belanger Reviewed-By: theanarkh Reviewed-By: Anna Henningsen --- src/node_process_methods.cc | 12 +++++-- test/known_issues/test-cwd-enoent-file.js | 2 +- .../test-cwd-enoent-improved-message.js | 32 +++++++++++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 test/parallel/test-cwd-enoent-improved-message.js diff --git a/src/node_process_methods.cc b/src/node_process_methods.cc index fe4aad63bc877b..67278974199db4 100644 --- a/src/node_process_methods.cc +++ b/src/node_process_methods.cc @@ -163,9 +163,17 @@ static void Cwd(const FunctionCallbackInfo& args) { size_t cwd_len = sizeof(buf); int err = uv_cwd(buf, &cwd_len); if (err) { - return env->ThrowUVException(err, "uv_cwd"); + std::string err_msg = + std::string("process.cwd failed with error ") + uv_strerror(err); + if (err == UV_ENOENT) { + // If err == UV_ENOENT it is necessary to notice the user + // that the current working dir was likely removed. + err_msg = err_msg + + ", the current working directory was likely removed " + + "without changing the working directory"; + } + return env->ThrowUVException(err, "uv_cwd", err_msg.c_str()); } - Local cwd; if (String::NewFromUtf8(env->isolate(), buf, NewStringType::kNormal, cwd_len) .ToLocal(&cwd)) { diff --git a/test/known_issues/test-cwd-enoent-file.js b/test/known_issues/test-cwd-enoent-file.js index 6d99987895baf4..9545ad6873f268 100644 --- a/test/known_issues/test-cwd-enoent-file.js +++ b/test/known_issues/test-cwd-enoent-file.js @@ -23,7 +23,7 @@ if (process.argv[2] === 'child') { process.chdir(dir); fs.rmdirSync(dir); assert.throws(process.cwd, - /^Error: ENOENT: no such file or directory, uv_cwd$/); + /^Error: ENOENT: process\.cwd failed with error no such file or directory, the current working directory was likely removed without changing the working directory, uv_cwd$/); const r = cp.spawnSync(process.execPath, [__filename, 'child']); diff --git a/test/parallel/test-cwd-enoent-improved-message.js b/test/parallel/test-cwd-enoent-improved-message.js new file mode 100644 index 00000000000000..e481627bbadfe3 --- /dev/null +++ b/test/parallel/test-cwd-enoent-improved-message.js @@ -0,0 +1,32 @@ +'use strict'; + +const common = require('../common'); +const { isMainThread } = require('worker_threads'); +const assert = require('assert'); +const fs = require('fs'); + +if (!isMainThread) { + common.skip('process.chdir is not available in Workers'); +} + +// Fails with EINVAL on SmartOS, EBUSY on Windows, EBUSY on AIX. +if (common.isSunOS || common.isWindows || common.isAIX || common.isIBMi) { + common.skip('cannot rmdir current working directory'); +} + +const tmpdir = require('../common/tmpdir'); +const dirname = `${tmpdir.path}/cwd-does-not-exist-${process.pid}`; + +tmpdir.refresh(); +fs.mkdirSync(dirname); +process.chdir(dirname); +fs.rmdirSync(dirname); + +assert.throws( + () => process.cwd(), + { + code: 'ENOENT', + message: 'ENOENT: process.cwd failed with error no such file or directory,' + + ' the current working directory was likely removed without changing the working directory, uv_cwd', + } +); From b4ca32615cd06d4073d238cf612eefd873847cfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E9=B8=BF=E9=A3=9E?= Date: Fri, 2 Jan 2026 23:30:15 +0800 Subject: [PATCH 03/36] build: support building crates (temporal) on windows PR-URL: https://github.com/nodejs/node/pull/61163 Reviewed-By: Chengzhong Wu --- deps/crates/crates.gyp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/deps/crates/crates.gyp b/deps/crates/crates.gyp index 25384f2d0dfef8..405b8d2f452773 100644 --- a/deps/crates/crates.gyp +++ b/deps/crates/crates.gyp @@ -1,6 +1,7 @@ { 'variables': { 'cargo_vendor_dir': './vendor', + 'node_crates_libpath': '<(SHARED_INTERMEDIATE_DIR)/>(cargo_build_mode)/<(STATIC_LIB_PREFIX)node_crates<(STATIC_LIB_SUFFIX)', }, 'targets': [ { @@ -14,7 +15,15 @@ ], 'link_settings': { 'libraries': [ - '<(SHARED_INTERMEDIATE_DIR)/>(cargo_build_mode)/libnode_crates.a', + '<(node_crates_libpath)', + ], + 'conditions': [ + ['OS=="win"', { + 'libraries': [ + '-lntdll', + '-luserenv' + ], + }], ], }, 'actions': [ @@ -24,7 +33,7 @@ '<@(_sources)' ], 'outputs': [ - '<(SHARED_INTERMEDIATE_DIR)/>(cargo_build_mode)/libnode_crates.a' + '<(node_crates_libpath)' ], 'action': [ 'cargo', From 04bfc15dee1136abb05e1eae1ce276156f85c91b Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Fri, 2 Jan 2026 11:00:40 -0500 Subject: [PATCH 04/36] test: asserts that import.meta.resolve invokes sync loader hooks PR-URL: https://github.com/nodejs/node/pull/61158 Reviewed-By: Marco Ippolito Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig --- .../test-esm-import-meta-resolve-hooks.mjs | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/es-module/test-esm-import-meta-resolve-hooks.mjs diff --git a/test/es-module/test-esm-import-meta-resolve-hooks.mjs b/test/es-module/test-esm-import-meta-resolve-hooks.mjs new file mode 100644 index 00000000000000..8d68546b87f62e --- /dev/null +++ b/test/es-module/test-esm-import-meta-resolve-hooks.mjs @@ -0,0 +1,21 @@ +// Flags: --experimental-import-meta-resolve +import '../common/index.mjs'; +import assert from 'node:assert'; +import { registerHooks } from 'node:module'; + +// Asserts that import.meta.resolve invokes loader hooks registered via `registerHooks`. + +registerHooks({ + resolve(specifier, context, defaultResolve) { + if (specifier === 'custom:hooked') { + return { + shortCircuit: true, + url: new URL('./test-esm-import-meta.mjs', import.meta.url).href, + }; + } + return defaultResolve(specifier, context); + }, +}); + +assert.strictEqual(import.meta.resolve('custom:hooked'), + new URL('./test-esm-import-meta.mjs', import.meta.url).href); From 055e6ff288078bbc2a6fb588d9e154b193eb76fc Mon Sep 17 00:00:00 2001 From: siaeyy <75006429+siaeyy@users.noreply.github.com> Date: Fri, 2 Jan 2026 21:37:36 +0300 Subject: [PATCH 05/36] node-api: add napi_set_prototype PR-URL: https://github.com/nodejs/node/pull/60711 Refs: https://github.com/nodejs/node/issues/60670 Reviewed-By: Chengzhong Wu Reviewed-By: Vladimir Morozov --- doc/api/n-api.md | 22 ++++++ src/js_native_api.h | 6 ++ src/js_native_api_v8.cc | 20 +++++ test/js-native-api/test_general/binding.gyp | 5 +- test/js-native-api/test_general/test.js | 6 ++ .../js-native-api/test_general/test_general.c | 78 ++++++++++++------- 6 files changed, 110 insertions(+), 27 deletions(-) diff --git a/doc/api/n-api.md b/doc/api/n-api.md index ffd392551bd54f..7764951eaeea93 100644 --- a/doc/api/n-api.md +++ b/doc/api/n-api.md @@ -5051,6 +5051,28 @@ added to it, as well as marking all existing properties as non-configurable. This is described in [Section 19.1.2.20](https://tc39.es/ecma262/#sec-object.seal) of the ECMA-262 specification. +#### `node_api_set_prototype` + + + +> Stability: 1 - Experimental + +```c +napi_status node_api_set_prototype(napi_env env, + napi_value object, + napi_value value); +``` + +* `[in] env`: The environment that the Node-API call is invoked under. +* `[in] object`: The object on which to set the prototype. +* `[in] value`: The prototype value. + +Returns `napi_ok` if the API succeeded. + +This API sets the prototype of the `Object` passed in. + ## Working with JavaScript functions Node-API provides a set of APIs that allow JavaScript code to diff --git a/src/js_native_api.h b/src/js_native_api.h index f979720b0caeab..0bc8f1810d2872 100644 --- a/src/js_native_api.h +++ b/src/js_native_api.h @@ -197,6 +197,12 @@ NAPI_EXTERN napi_status NAPI_CDECL napi_coerce_to_string(napi_env env, napi_value* result); // Methods to work with Objects +#ifdef NAPI_EXPERIMENTAL +#define NODE_API_EXPERIMENTAL_HAS_SET_PROTOTYPE +NAPI_EXTERN napi_status NAPI_CDECL node_api_set_prototype(napi_env env, + napi_value object, + napi_value value); +#endif NAPI_EXTERN napi_status NAPI_CDECL napi_get_prototype(napi_env env, napi_value object, napi_value* result); diff --git a/src/js_native_api_v8.cc b/src/js_native_api_v8.cc index 8c4062c84275bc..42e15e959bb1c9 100644 --- a/src/js_native_api_v8.cc +++ b/src/js_native_api_v8.cc @@ -1567,6 +1567,26 @@ napi_status NAPI_CDECL napi_strict_equals(napi_env env, return GET_RETURN_STATUS(env); } +napi_status NAPI_CDECL node_api_set_prototype(napi_env env, + napi_value object, + napi_value value) { + NAPI_PREAMBLE(env); + CHECK_ARG(env, value); + + v8::Local context = env->context(); + v8::Local obj; + + CHECK_TO_OBJECT(env, context, obj, object); + + v8::Local val = v8impl::V8LocalValueFromJsValue(value); + + v8::Maybe set_maybe = obj->SetPrototypeV2(context, val); + + RETURN_STATUS_IF_FALSE_WITH_PREAMBLE( + env, set_maybe.FromMaybe(false), napi_generic_failure); + return GET_RETURN_STATUS(env); +} + napi_status NAPI_CDECL napi_get_prototype(napi_env env, napi_value object, napi_value* result) { diff --git a/test/js-native-api/test_general/binding.gyp b/test/js-native-api/test_general/binding.gyp index 577a506f7fad73..cd261547de149f 100644 --- a/test/js-native-api/test_general/binding.gyp +++ b/test/js-native-api/test_general/binding.gyp @@ -4,7 +4,10 @@ "target_name": "test_general", "sources": [ "test_general.c" - ] + ], + "defines": [ + "NAPI_EXPERIMENTAL" + ], } ] } diff --git a/test/js-native-api/test_general/test.js b/test/js-native-api/test_general/test.js index 843c6aee3af47f..7bb40f7ae74eb8 100644 --- a/test/js-native-api/test_general/test.js +++ b/test/js-native-api/test_general/test.js @@ -18,12 +18,18 @@ class ExtendedClass extends BaseClass { const baseObject = new BaseClass(); const extendedObject = new ExtendedClass(); +const nullProtoObject = { __proto__: null }; // Test napi_strict_equals assert.ok(test_general.testStrictEquals(val1, val1)); assert.strictEqual(test_general.testStrictEquals(val1, val2), false); assert.ok(test_general.testStrictEquals(val2, val3)); +// Test napi_set_prototype +test_general.testSetPrototype(nullProtoObject, Object.prototype); +assert.strictEqual(Object.getPrototypeOf(nullProtoObject), + Object.prototype); + // Test napi_get_prototype assert.strictEqual(test_general.testGetPrototype(baseObject), Object.getPrototypeOf(baseObject)); diff --git a/test/js-native-api/test_general/test_general.c b/test/js-native-api/test_general/test_general.c index 0cd1c54ee142f1..6249c55a7cbd54 100644 --- a/test/js-native-api/test_general/test_general.c +++ b/test/js-native-api/test_general/test_general.c @@ -23,6 +23,16 @@ static napi_value testStrictEquals(napi_env env, napi_callback_info info) { return result; } +static napi_value testSetPrototype(napi_env env, napi_callback_info info) { + size_t argc = 2; + napi_value args[2]; + NODE_API_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); + + NODE_API_CALL(env, node_api_set_prototype(env, args[0], args[1])); + + return NULL; +} + static napi_value testGetPrototype(napi_env env, napi_callback_info info) { size_t argc = 1; napi_value args[1]; @@ -137,7 +147,7 @@ static napi_value testNapiTypeof(napi_env env, napi_callback_info info) { } static bool deref_item_called = false; -static void deref_item(napi_env env, void* data, void* hint) { +static void deref_item(node_api_nogc_env env, void* data, void* hint) { (void) hint; NODE_API_ASSERT_RETURN_VOID(env, data == &deref_item_called, @@ -156,7 +166,7 @@ static napi_value deref_item_was_called(napi_env env, napi_callback_info info) { static napi_value wrap_first_arg(napi_env env, napi_callback_info info, - napi_finalize finalizer, + node_api_basic_finalize finalizer, void* data) { size_t argc = 1; napi_value to_wrap; @@ -195,7 +205,7 @@ static napi_value remove_wrap(napi_env env, napi_callback_info info) { } static bool finalize_called = false; -static void test_finalize(napi_env env, void* data, void* hint) { +static void test_finalize(node_api_nogc_env env, void* data, void* hint) { finalize_called = true; } @@ -242,6 +252,15 @@ static void finalizer_only_callback(napi_env env, void* data, void* hint) { NODE_API_CALL_RETURN_VOID(env, napi_delete_reference(env, js_cb_ref)); } +static void schedule_finalizer_only_callback(node_api_nogc_env env, + void* data, + void* hint) { + NODE_API_CALL_RETURN_VOID( + (napi_env)env, + node_api_post_finalizer( + (napi_env)env, finalizer_only_callback, data, NULL)); +} + static napi_value add_finalizer_only(napi_env env, napi_callback_info info) { size_t argc = 2; napi_value argv[2]; @@ -250,8 +269,12 @@ static napi_value add_finalizer_only(napi_env env, napi_callback_info info) { NODE_API_CALL(env, napi_get_cb_info(env, info, &argc, argv, NULL, NULL)); NODE_API_CALL(env, napi_create_reference(env, argv[1], 1, &js_cb_ref)); NODE_API_CALL(env, - napi_add_finalizer( - env, argv[0], js_cb_ref, finalizer_only_callback, NULL, NULL)); + napi_add_finalizer(env, + argv[0], + js_cb_ref, + schedule_finalizer_only_callback, + NULL, + NULL)); return NULL; } @@ -262,7 +285,9 @@ static const char* env_cleanup_finalizer_messages[] = { "second wrap" }; -static void cleanup_env_finalizer(napi_env env, void* data, void* hint) { +static void cleanup_env_finalizer(node_api_nogc_env env, + void* data, + void* hint) { (void) env; (void) hint; @@ -286,26 +311,27 @@ static napi_value env_cleanup_wrap(napi_env env, napi_callback_info info) { EXTERN_C_START napi_value Init(napi_env env, napi_value exports) { napi_property_descriptor descriptors[] = { - DECLARE_NODE_API_PROPERTY("testStrictEquals", testStrictEquals), - DECLARE_NODE_API_PROPERTY("testGetPrototype", testGetPrototype), - DECLARE_NODE_API_PROPERTY("testGetVersion", testGetVersion), - DECLARE_NODE_API_PROPERTY("testNapiRun", testNapiRun), - DECLARE_NODE_API_PROPERTY("doInstanceOf", doInstanceOf), - DECLARE_NODE_API_PROPERTY("getUndefined", getUndefined), - DECLARE_NODE_API_PROPERTY("getNull", getNull), - DECLARE_NODE_API_PROPERTY("createNapiError", createNapiError), - DECLARE_NODE_API_PROPERTY("testNapiErrorCleanup", testNapiErrorCleanup), - DECLARE_NODE_API_PROPERTY("testNapiTypeof", testNapiTypeof), - DECLARE_NODE_API_PROPERTY("wrap", wrap), - DECLARE_NODE_API_PROPERTY("envCleanupWrap", env_cleanup_wrap), - DECLARE_NODE_API_PROPERTY("unwrap", unwrap), - DECLARE_NODE_API_PROPERTY("removeWrap", remove_wrap), - DECLARE_NODE_API_PROPERTY("addFinalizerOnly", add_finalizer_only), - DECLARE_NODE_API_PROPERTY("testFinalizeWrap", test_finalize_wrap), - DECLARE_NODE_API_PROPERTY("finalizeWasCalled", finalize_was_called), - DECLARE_NODE_API_PROPERTY("derefItemWasCalled", deref_item_was_called), - DECLARE_NODE_API_PROPERTY("testAdjustExternalMemory", testAdjustExternalMemory) - }; + DECLARE_NODE_API_PROPERTY("testStrictEquals", testStrictEquals), + DECLARE_NODE_API_PROPERTY("testSetPrototype", testSetPrototype), + DECLARE_NODE_API_PROPERTY("testGetPrototype", testGetPrototype), + DECLARE_NODE_API_PROPERTY("testGetVersion", testGetVersion), + DECLARE_NODE_API_PROPERTY("testNapiRun", testNapiRun), + DECLARE_NODE_API_PROPERTY("doInstanceOf", doInstanceOf), + DECLARE_NODE_API_PROPERTY("getUndefined", getUndefined), + DECLARE_NODE_API_PROPERTY("getNull", getNull), + DECLARE_NODE_API_PROPERTY("createNapiError", createNapiError), + DECLARE_NODE_API_PROPERTY("testNapiErrorCleanup", testNapiErrorCleanup), + DECLARE_NODE_API_PROPERTY("testNapiTypeof", testNapiTypeof), + DECLARE_NODE_API_PROPERTY("wrap", wrap), + DECLARE_NODE_API_PROPERTY("envCleanupWrap", env_cleanup_wrap), + DECLARE_NODE_API_PROPERTY("unwrap", unwrap), + DECLARE_NODE_API_PROPERTY("removeWrap", remove_wrap), + DECLARE_NODE_API_PROPERTY("addFinalizerOnly", add_finalizer_only), + DECLARE_NODE_API_PROPERTY("testFinalizeWrap", test_finalize_wrap), + DECLARE_NODE_API_PROPERTY("finalizeWasCalled", finalize_was_called), + DECLARE_NODE_API_PROPERTY("derefItemWasCalled", deref_item_was_called), + DECLARE_NODE_API_PROPERTY("testAdjustExternalMemory", + testAdjustExternalMemory)}; NODE_API_CALL(env, napi_define_properties( env, exports, sizeof(descriptors) / sizeof(*descriptors), descriptors)); From 7a7beef306090865ed8b51ab62f257594df9b89f Mon Sep 17 00:00:00 2001 From: Efe Date: Sat, 3 Jan 2026 04:01:34 +0100 Subject: [PATCH 06/36] fs: validate statfs path PR-URL: https://github.com/nodejs/node/pull/61230 Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Aviv Keller Reviewed-By: LiviaMedeiros --- lib/internal/fs/promises.js | 2 +- .../test-fs-promises-statfs-validate-path.js | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 test/parallel/test-fs-promises-statfs-validate-path.js diff --git a/lib/internal/fs/promises.js b/lib/internal/fs/promises.js index 5e7e099df5f0ce..9741dcd8516eca 100644 --- a/lib/internal/fs/promises.js +++ b/lib/internal/fs/promises.js @@ -1037,7 +1037,7 @@ async function stat(path, options = { bigint: false }) { async function statfs(path, options = { bigint: false }) { const result = await PromisePrototypeThen( - binding.statfs(path, options.bigint, kUsePromises), + binding.statfs(getValidatedPath(path), options.bigint, kUsePromises), undefined, handleErrorFromBinding, ); diff --git a/test/parallel/test-fs-promises-statfs-validate-path.js b/test/parallel/test-fs-promises-statfs-validate-path.js new file mode 100644 index 00000000000000..64928521f504c4 --- /dev/null +++ b/test/parallel/test-fs-promises-statfs-validate-path.js @@ -0,0 +1,12 @@ +'use strict'; + +const common = require('../common'); +const fs = require('fs'); +const assert = require('assert'); + +(async () => { + await assert.rejects( + fs.promises.statfs(), + { code: 'ERR_INVALID_ARG_TYPE' }, + ); +})().then(common.mustCall()); From 984962d00bae3125abb6c924bb5c0f0fb45c2b83 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Jan 2026 18:13:53 +0000 Subject: [PATCH 07/36] meta: bump cachix/install-nix-action from 31.8.4 to 31.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 31.8.4 to 31.9.0. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md) - [Commits](https://github.com/cachix/install-nix-action/compare/0b0e072294b088b73964f1d72dfdac0951439dbd...4e002c8ec80594ecd40e759629461e26c8abed15) --- updated-dependencies: - dependency-name: cachix/install-nix-action dependency-version: 31.9.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] PR-URL: https://github.com/nodejs/node/pull/61236 Reviewed-By: Antoine du Hamel Reviewed-By: Colin Ihrig Reviewed-By: Ulises Gascón Reviewed-By: Rafael Gonzaga --- .github/workflows/linters.yml | 2 +- .github/workflows/test-shared.yml | 2 +- .github/workflows/tools.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 78344490800cf0..94967139eebf00 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -149,7 +149,7 @@ jobs: persist-credentials: false sparse-checkout: '*.nix' sparse-checkout-cone-mode: false - - uses: cachix/install-nix-action@0b0e072294b088b73964f1d72dfdac0951439dbd # v31.8.4 + - uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0 - name: Lint Nix files run: | nix-shell -I nixpkgs=./tools/nix/pkgs.nix -p 'nixfmt-tree' --run ' diff --git a/.github/workflows/test-shared.yml b/.github/workflows/test-shared.yml index f1509989a1f78e..caad7ec954488e 100644 --- a/.github/workflows/test-shared.yml +++ b/.github/workflows/test-shared.yml @@ -157,7 +157,7 @@ jobs: tar xzf tarballs/*.tar.gz -C "$RUNNER_TEMP" echo "TAR_DIR=$RUNNER_TEMP/$(basename tarballs/*.tar.gz .tar.gz)" >> "$GITHUB_ENV" - - uses: cachix/install-nix-action@0b0e072294b088b73964f1d72dfdac0951439dbd # v31.8.4 + - uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0 with: extra_nix_config: sandbox = true diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index d27f9f7e4672a2..7429b85c964be5 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -306,7 +306,7 @@ jobs: allow-prereleases: true - name: Set up Nix if: matrix.id == 'nixpkgs-unstable' && (github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id) - uses: cachix/install-nix-action@0b0e072294b088b73964f1d72dfdac0951439dbd # v31.8.4 + uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0 - run: ${{ matrix.run }} if: github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id env: From 578ca18a42d2249925f0f0a11b2851f90a520224 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Jan 2026 18:14:05 +0000 Subject: [PATCH 08/36] meta: bump peter-evans/create-pull-request from 7.0.9 to 8.0.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 7.0.9 to 8.0.0. - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](https://github.com/peter-evans/create-pull-request/compare/84ae59a2cdc2258d6fa0732dd66352dddae2a412...98357b18bf14b5342f975ff684046ec3b2a07725) --- updated-dependencies: - dependency-name: peter-evans/create-pull-request dependency-version: 8.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] PR-URL: https://github.com/nodejs/node/pull/61237 Reviewed-By: Antoine du Hamel Reviewed-By: Colin Ihrig Reviewed-By: Ulises Gascón Reviewed-By: Luigi Pinca --- .github/workflows/tools.yml | 2 +- .github/workflows/update-v8.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index 7429b85c964be5..e7365abf5c560e 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -315,7 +315,7 @@ jobs: if: env.COMMIT_MSG == '' && (github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id) run: | echo "COMMIT_MSG=${{ matrix.subsystem }}: update ${{ matrix.id }} to ${{ env.NEW_VERSION }}" >> "$GITHUB_ENV" - - uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7.0.9 + - uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0 if: github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id # Creates a PR or update the Action's existing PR, or # no-op if the base branch is already up-to-date. diff --git a/.github/workflows/update-v8.yml b/.github/workflows/update-v8.yml index b7469a7787d8a3..d80863025f5fb3 100644 --- a/.github/workflows/update-v8.yml +++ b/.github/workflows/update-v8.yml @@ -45,7 +45,7 @@ jobs: cat temp-output tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true rm temp-output - - uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7.0.9 + - uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725 # v8.0.0 # Creates a PR or update the Action's existing PR, or # no-op if the base branch is already up-to-date. with: From 2d29bf9e2e6db2d9d13d861b3bc087112074780d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Jan 2026 18:14:17 +0000 Subject: [PATCH 09/36] meta: bump actions/upload-artifact from 5.0.0 to 6.0.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5.0.0 to 6.0.0. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/330a01c490aca151604b8cf639adc76d48f6c5d4...b7c566a772e6b6bfb58ed0dc250532a479d7789f) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: 6.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] PR-URL: https://github.com/nodejs/node/pull/61238 Reviewed-By: Antoine du Hamel Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Ulises Gascón --- .github/workflows/build-tarball.yml | 2 +- .github/workflows/daily-wpt-fyi.yml | 2 +- .github/workflows/doc.yml | 2 +- .github/workflows/scorecard.yml | 2 +- .github/workflows/test-shared.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-tarball.yml b/.github/workflows/build-tarball.yml index f449e0fe52bcd9..0db5a5379f5a0d 100644 --- a/.github/workflows/build-tarball.yml +++ b/.github/workflows/build-tarball.yml @@ -93,7 +93,7 @@ jobs: export COMMIT=$(git rev-parse --short=10 "$GITHUB_SHA") ./configure && make tar -j4 SKIP_XZ=1 - name: Upload tarball artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: tarballs path: '*.tar.gz' diff --git a/.github/workflows/daily-wpt-fyi.yml b/.github/workflows/daily-wpt-fyi.yml index 48ffadd0622500..4366736a0ab3ce 100644 --- a/.github/workflows/daily-wpt-fyi.yml +++ b/.github/workflows/daily-wpt-fyi.yml @@ -103,7 +103,7 @@ jobs: run: cp wptreport.json wptreport-${{ steps.setup-node.outputs.node-version }}.json - name: Upload GitHub Actions artifact if: ${{ env.WPT_REPORT != '' }} - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: path: out/wpt/wptreport-*.json name: WPT Report for ${{ steps.setup-node.outputs.node-version }} diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index b39acc9c4837b7..6b2dfbd32b70ef 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -35,7 +35,7 @@ jobs: run: npx envinfo - name: Build run: NODE=$(command -v node) make doc-only - - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 + - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: docs path: out/doc diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 0b9af14977c71a..483739ac02dee0 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -65,7 +65,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: Upload artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: SARIF file path: results.sarif diff --git a/.github/workflows/test-shared.yml b/.github/workflows/test-shared.yml index caad7ec954488e..705cb7c31b84dd 100644 --- a/.github/workflows/test-shared.yml +++ b/.github/workflows/test-shared.yml @@ -122,7 +122,7 @@ jobs: - name: Upload tarball artifact if: ${{ github.event_name != 'workflow_dispatch' }} - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: name: tarballs path: '*.tar.gz' From 9fb4b6dbb391ded16354db067194a47bd15403d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Jan 2026 18:14:26 +0000 Subject: [PATCH 10/36] meta: bump actions/checkout from 6.0.0 to 6.0.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.0 to 6.0.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/1af3b93b6815bc44a9784bd300feb67ff0d1eeb3...8e8c483db84b4bee98b60c0593521ed34d9990e8) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] PR-URL: https://github.com/nodejs/node/pull/61239 Reviewed-By: Rafael Gonzaga Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Ulises Gascón --- .github/workflows/auto-start-ci.yml | 2 +- .github/workflows/build-tarball.yml | 4 ++-- .github/workflows/codeql.yml | 2 +- .github/workflows/commit-lint.yml | 2 +- .github/workflows/commit-queue.yml | 2 +- .../workflows/coverage-linux-without-intl.yml | 2 +- .github/workflows/coverage-linux.yml | 2 +- .github/workflows/coverage-windows.yml | 2 +- .github/workflows/create-release-proposal.yml | 2 +- .github/workflows/daily-wpt-fyi.yml | 4 ++-- .github/workflows/daily.yml | 2 +- .github/workflows/doc.yml | 2 +- .../workflows/find-inactive-collaborators.yml | 2 +- .github/workflows/find-inactive-tsc.yml | 4 ++-- .github/workflows/license-builder.yml | 2 +- .github/workflows/lint-release-proposal.yml | 2 +- .github/workflows/linters.yml | 22 +++++++++---------- .github/workflows/notify-on-push.yml | 2 +- .github/workflows/scorecard.yml | 2 +- .github/workflows/test-internet.yml | 2 +- .github/workflows/test-linux.yml | 2 +- .github/workflows/test-macos.yml | 2 +- .github/workflows/test-shared.yml | 2 +- .github/workflows/timezone-update.yml | 4 ++-- .github/workflows/tools.yml | 2 +- .github/workflows/update-openssl.yml | 2 +- .github/workflows/update-v8.yml | 2 +- .github/workflows/update-wpt.yml | 2 +- 28 files changed, 42 insertions(+), 42 deletions(-) diff --git a/.github/workflows/auto-start-ci.yml b/.github/workflows/auto-start-ci.yml index 8dfd126cbc340b..608227a7ddcee2 100644 --- a/.github/workflows/auto-start-ci.yml +++ b/.github/workflows/auto-start-ci.yml @@ -45,7 +45,7 @@ jobs: if: needs.get-prs-for-ci.outputs.numbers != '' runs-on: ubuntu-latest steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false diff --git a/.github/workflows/build-tarball.yml b/.github/workflows/build-tarball.yml index 0db5a5379f5a0d..ae318689b7056c 100644 --- a/.github/workflows/build-tarball.yml +++ b/.github/workflows/build-tarball.yml @@ -76,7 +76,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} @@ -106,7 +106,7 @@ jobs: CXX: sccache clang++-19 SCCACHE_GHA_ENABLED: 'true' steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false sparse-checkout: .github/actions/install-clang diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 162eb6277e8624..de282484b11adf 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -23,7 +23,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/commit-lint.yml b/.github/workflows/commit-lint.yml index 03b0d2537a9229..a3fe3ae4c03983 100644 --- a/.github/workflows/commit-lint.yml +++ b/.github/workflows/commit-lint.yml @@ -17,7 +17,7 @@ jobs: run: | echo "plusOne=$((${{ github.event.pull_request.commits }} + 1))" >> $GITHUB_OUTPUT echo "minusOne=$((${{ github.event.pull_request.commits }} - 1))" >> $GITHUB_OUTPUT - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: fetch-depth: ${{ steps.nb-of-commits.outputs.plusOne }} persist-credentials: false diff --git a/.github/workflows/commit-queue.yml b/.github/workflows/commit-queue.yml index 09e99d69cbf9c6..2b0ce32ce76934 100644 --- a/.github/workflows/commit-queue.yml +++ b/.github/workflows/commit-queue.yml @@ -59,7 +59,7 @@ jobs: if: needs.get_mergeable_prs.outputs.numbers != '' runs-on: ubuntu-latest steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: # A personal token is required because pushing with GITHUB_TOKEN will # prevent commits from running CI after they land. It needs diff --git a/.github/workflows/coverage-linux-without-intl.yml b/.github/workflows/coverage-linux-without-intl.yml index 1178787db727b8..324a03c1e4b45f 100644 --- a/.github/workflows/coverage-linux-without-intl.yml +++ b/.github/workflows/coverage-linux-without-intl.yml @@ -49,7 +49,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false - name: Install Clang ${{ env.CLANG_VERSION }} diff --git a/.github/workflows/coverage-linux.yml b/.github/workflows/coverage-linux.yml index c87fdd18c674e0..411b05333ab084 100644 --- a/.github/workflows/coverage-linux.yml +++ b/.github/workflows/coverage-linux.yml @@ -49,7 +49,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false - name: Install Clang ${{ env.CLANG_VERSION }} diff --git a/.github/workflows/coverage-windows.yml b/.github/workflows/coverage-windows.yml index 9b9804b13fd891..b06870a7a58bcb 100644 --- a/.github/workflows/coverage-windows.yml +++ b/.github/workflows/coverage-windows.yml @@ -45,7 +45,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: windows-2025 steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} diff --git a/.github/workflows/create-release-proposal.yml b/.github/workflows/create-release-proposal.yml index ba3d5d006fbbaa..f5ab79feb8d0f7 100644 --- a/.github/workflows/create-release-proposal.yml +++ b/.github/workflows/create-release-proposal.yml @@ -33,7 +33,7 @@ jobs: RELEASE_LINE: ${{ inputs.release-line }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: ref: ${{ env.STAGING_BRANCH }} persist-credentials: false diff --git a/.github/workflows/daily-wpt-fyi.yml b/.github/workflows/daily-wpt-fyi.yml index 4366736a0ab3ce..c53137c3a4d383 100644 --- a/.github/workflows/daily-wpt-fyi.yml +++ b/.github/workflows/daily-wpt-fyi.yml @@ -64,7 +64,7 @@ jobs: SHORT_SHA=$(node -p 'process.version.split(/-nightly\d{8}/)[1]') echo "NIGHTLY_REF=$(gh api /repos/nodejs/node/commits/$SHORT_SHA --jq '.sha')" >> $GITHUB_ENV - name: Checkout ${{ steps.setup-node.outputs.node-version }} - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false ref: ${{ env.NIGHTLY_REF || steps.setup-node.outputs.node-version }} @@ -80,7 +80,7 @@ jobs: run: rm -rf wpt working-directory: test/fixtures - name: Checkout epochs/daily WPT - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: repository: web-platform-tests/wpt persist-credentials: false diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 9e9159707d6648..392ae13dd6e2e5 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -15,7 +15,7 @@ jobs: build-lto: runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false - name: Use Node.js ${{ env.NODE_VERSION }} diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 6b2dfbd32b70ef..e5a2b2c522e1bb 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -24,7 +24,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false - name: Use Node.js ${{ env.NODE_VERSION }} diff --git a/.github/workflows/find-inactive-collaborators.yml b/.github/workflows/find-inactive-collaborators.yml index ec72c077f8dabb..c84d027555773a 100644 --- a/.github/workflows/find-inactive-collaborators.yml +++ b/.github/workflows/find-inactive-collaborators.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: fetch-depth: 0 persist-credentials: false diff --git a/.github/workflows/find-inactive-tsc.yml b/.github/workflows/find-inactive-tsc.yml index b2a2724b4cd571..10c5e4190b5b0c 100644 --- a/.github/workflows/find-inactive-tsc.yml +++ b/.github/workflows/find-inactive-tsc.yml @@ -20,13 +20,13 @@ jobs: steps: - name: Checkout the repo - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: fetch-depth: 0 persist-credentials: false - name: Clone nodejs/TSC repository - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: fetch-depth: 0 path: .tmp diff --git a/.github/workflows/license-builder.yml b/.github/workflows/license-builder.yml index 6abd7865ea12ba..8c1fffd1285fcc 100644 --- a/.github/workflows/license-builder.yml +++ b/.github/workflows/license-builder.yml @@ -17,7 +17,7 @@ jobs: if: github.repository == 'nodejs/node' runs-on: ubuntu-latest steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false - run: ./tools/license-builder.sh # Run the license builder tool diff --git a/.github/workflows/lint-release-proposal.yml b/.github/workflows/lint-release-proposal.yml index b97fd6e2f83788..dbd8232fa40280 100644 --- a/.github/workflows/lint-release-proposal.yml +++ b/.github/workflows/lint-release-proposal.yml @@ -23,7 +23,7 @@ jobs: contents: read pull-requests: read steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false - name: Lint release commit title format diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 94967139eebf00..bb4160a0f1be1e 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -25,7 +25,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false - name: Use Node.js ${{ env.NODE_VERSION }} @@ -40,7 +40,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} @@ -56,7 +56,7 @@ jobs: if: ${{ github.event.pull_request && github.event.pull_request.draft == false && github.base_ref == github.event.repository.default_branch }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: fetch-depth: 0 persist-credentials: false @@ -95,7 +95,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false - name: Use Node.js ${{ env.NODE_VERSION }} @@ -144,7 +144,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false sparse-checkout: '*.nix' @@ -160,7 +160,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false sparse-checkout: | @@ -188,7 +188,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false sparse-checkout: | @@ -213,7 +213,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false sparse-checkout: | @@ -227,7 +227,7 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false - uses: mszostok/codeowners-validator@7f3f5e28c6d7b8dfae5731e54ce2272ca384592f @@ -237,7 +237,7 @@ jobs: if: ${{ github.event.pull_request }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: fetch-depth: 2 persist-credentials: false @@ -250,7 +250,7 @@ jobs: lint-readme: runs-on: ubuntu-latest steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false sparse-checkout: | diff --git a/.github/workflows/notify-on-push.yml b/.github/workflows/notify-on-push.yml index ce4180b36ba09f..562c043b781778 100644 --- a/.github/workflows/notify-on-push.yml +++ b/.github/workflows/notify-on-push.yml @@ -32,7 +32,7 @@ jobs: if: github.repository == 'nodejs/node' runs-on: ubuntu-latest steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false - name: Check commit message diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 483739ac02dee0..80a2a7618961da 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -38,7 +38,7 @@ jobs: egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs - name: Checkout code - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false diff --git a/.github/workflows/test-internet.yml b/.github/workflows/test-internet.yml index b6b0e9e2f3b58f..665270b5698fdb 100644 --- a/.github/workflows/test-internet.yml +++ b/.github/workflows/test-internet.yml @@ -46,7 +46,7 @@ jobs: if: github.event_name == 'schedule' && github.repository == 'nodejs/node' || github.event.pull_request.draft == false runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false - name: Install Clang ${{ env.CLANG_VERSION }} diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 5a294a0c268278..eb50c544b0f4ff 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -50,7 +50,7 @@ jobs: matrix: os: [ubuntu-24.04, ubuntu-24.04-arm] steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false path: node diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index d4a44f6771b0fc..a2f3652cdf41dd 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -83,7 +83,7 @@ jobs: CXX: sccache g++ SCCACHE_GHA_ENABLED: 'true' steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false path: node diff --git a/.github/workflows/test-shared.yml b/.github/workflows/test-shared.yml index 705cb7c31b84dd..4fc5dd59dc9ecf 100644 --- a/.github/workflows/test-shared.yml +++ b/.github/workflows/test-shared.yml @@ -106,7 +106,7 @@ jobs: name: ${{ github.event_name == 'workflow_dispatch' && 'Skipped job' || 'Build slim tarball' }} runs-on: ubuntu-24.04-arm steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 if: ${{ github.event_name != 'workflow_dispatch' }} with: persist-credentials: false diff --git a/.github/workflows/timezone-update.yml b/.github/workflows/timezone-update.yml index 5465298fa9da50..a7afc7ad0700e8 100644 --- a/.github/workflows/timezone-update.yml +++ b/.github/workflows/timezone-update.yml @@ -20,12 +20,12 @@ jobs: steps: - name: Checkout nodejs/node - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false - name: Checkout unicode-org/icu-data - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: path: icu-data persist-credentials: false diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index e7365abf5c560e..258772934def71 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -292,7 +292,7 @@ jobs: run: | git config --global user.name "Node.js GitHub Bot" git config --global user.email "github-bot@iojs.org" - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 if: github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id with: persist-credentials: false diff --git a/.github/workflows/update-openssl.yml b/.github/workflows/update-openssl.yml index ccd9868b6c50e5..f541e4669efd0c 100644 --- a/.github/workflows/update-openssl.yml +++ b/.github/workflows/update-openssl.yml @@ -14,7 +14,7 @@ jobs: if: github.repository == 'nodejs/node' runs-on: ubuntu-latest steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false - name: Check and download new OpenSSL version diff --git a/.github/workflows/update-v8.yml b/.github/workflows/update-v8.yml index d80863025f5fb3..e6eb7fa38200cd 100644 --- a/.github/workflows/update-v8.yml +++ b/.github/workflows/update-v8.yml @@ -16,7 +16,7 @@ jobs: if: github.repository == 'nodejs/node' runs-on: ubuntu-latest steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false - name: Cache node modules and update-v8 diff --git a/.github/workflows/update-wpt.yml b/.github/workflows/update-wpt.yml index f4cae25ee591a2..5a3751ffece43d 100644 --- a/.github/workflows/update-wpt.yml +++ b/.github/workflows/update-wpt.yml @@ -27,7 +27,7 @@ jobs: subsystem: ${{ fromJSON(github.event.inputs.subsystems || '["url", "urlpattern", "WebCryptoAPI"]') }} steps: - - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: persist-credentials: false From 4a4566f9c170cbafdeb410a2e6e831efa29d1cf2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Jan 2026 18:14:37 +0000 Subject: [PATCH 11/36] meta: bump codecov/codecov-action from 5.5.1 to 5.5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.5.1 to 5.5.2. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/5a1091511ad55cbe89839c7260b706298ca349f7...671740ac38dd9b0130fbe1cec585b89eea48d3de) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-version: 5.5.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] PR-URL: https://github.com/nodejs/node/pull/61240 Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Ulises Gascón --- .github/workflows/coverage-linux-without-intl.yml | 2 +- .github/workflows/coverage-linux.yml | 2 +- .github/workflows/coverage-windows.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coverage-linux-without-intl.yml b/.github/workflows/coverage-linux-without-intl.yml index 324a03c1e4b45f..aef4fed2ce322d 100644 --- a/.github/workflows/coverage-linux-without-intl.yml +++ b/.github/workflows/coverage-linux-without-intl.yml @@ -85,6 +85,6 @@ jobs: - name: Clean tmp run: rm -rf coverage/tmp && rm -rf out - name: Upload - uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 + uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 with: directory: ./coverage diff --git a/.github/workflows/coverage-linux.yml b/.github/workflows/coverage-linux.yml index 411b05333ab084..c023618b8d52e4 100644 --- a/.github/workflows/coverage-linux.yml +++ b/.github/workflows/coverage-linux.yml @@ -85,6 +85,6 @@ jobs: - name: Clean tmp run: rm -rf coverage/tmp && rm -rf out - name: Upload - uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 + uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 with: directory: ./coverage diff --git a/.github/workflows/coverage-windows.yml b/.github/workflows/coverage-windows.yml index b06870a7a58bcb..b95cb310e9d721 100644 --- a/.github/workflows/coverage-windows.yml +++ b/.github/workflows/coverage-windows.yml @@ -72,6 +72,6 @@ jobs: - name: Clean tmp run: npx rimraf ./coverage/tmp - name: Upload - uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1 + uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 with: directory: ./coverage From 2a6b5fc476bb461b7a8851d596f27d0f4fed6e89 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Jan 2026 18:14:47 +0000 Subject: [PATCH 12/36] meta: bump github/codeql-action from 4.31.6 to 4.31.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.6 to 4.31.9. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/fe4161a26a8629af62121b670040955b330f9af2...5d4e8d1aca955e8d8589aabd499c5cae939e33c7) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.31.9 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] PR-URL: https://github.com/nodejs/node/pull/61241 Reviewed-By: Colin Ihrig Reviewed-By: Ulises Gascón Reviewed-By: Luigi Pinca --- .github/workflows/codeql.yml | 6 +++--- .github/workflows/scorecard.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index de282484b11adf..4c8cc67515f9b3 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -27,15 +27,15 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6 + uses: github/codeql-action/init@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9 with: languages: ${{ matrix.language }} config-file: ./.github/codeql-config.yml - name: Autobuild - uses: github/codeql-action/autobuild@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6 + uses: github/codeql-action/autobuild@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6 + uses: github/codeql-action/analyze@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9 with: category: /language:${{matrix.language}} diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 80a2a7618961da..3073882bdcce9a 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -73,6 +73,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: Upload to code-scanning - uses: github/codeql-action/upload-sarif@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6 + uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4.31.9 with: sarif_file: results.sarif From d4507e7279c11238fc1815c7544c7f075f21c462 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Jan 2026 18:14:58 +0000 Subject: [PATCH 13/36] meta: bump actions/download-artifact from 6.0.0 to 7.0.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 6.0.0 to 7.0.0. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/018cc2cf5baa6db3ef3c5f8a56943fffe632ef53...37930b1c2abaa49bbe596cd826c3c89aef350131) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] PR-URL: https://github.com/nodejs/node/pull/61242 Reviewed-By: Antoine du Hamel Reviewed-By: Colin Ihrig Reviewed-By: Ulises Gascón --- .github/workflows/build-tarball.yml | 2 +- .github/workflows/test-shared.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-tarball.yml b/.github/workflows/build-tarball.yml index ae318689b7056c..161b7ecac2d274 100644 --- a/.github/workflows/build-tarball.yml +++ b/.github/workflows/build-tarball.yml @@ -127,7 +127,7 @@ jobs: - name: Environment Information run: npx envinfo - name: Download tarball - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 with: name: tarballs path: tarballs diff --git a/.github/workflows/test-shared.yml b/.github/workflows/test-shared.yml index 4fc5dd59dc9ecf..e8d89d02030a3c 100644 --- a/.github/workflows/test-shared.yml +++ b/.github/workflows/test-shared.yml @@ -145,7 +145,7 @@ jobs: name: '${{ matrix.system }}: with shared libraries' runs-on: ${{ matrix.runner }} steps: - - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 + - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 if: ${{ github.event_name != 'workflow_dispatch' }} with: name: tarballs From 81c99eabe98dd53482c3ddfc388162375df723c6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Jan 2026 18:15:08 +0000 Subject: [PATCH 14/36] meta: bump actions/cache from 4.3.0 to 5.0.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/cache](https://github.com/actions/cache) from 4.3.0 to 5.0.1. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/0057852bfaa89a56745cba8c7296529d2fc39830...9255dc7a253b0ccc959486e2bca901246202afeb) --- updated-dependencies: - dependency-name: actions/cache dependency-version: 5.0.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] PR-URL: https://github.com/nodejs/node/pull/61243 Reviewed-By: Antoine du Hamel Reviewed-By: Colin Ihrig Reviewed-By: Ulises Gascón Reviewed-By: Rafael Gonzaga --- .github/workflows/update-v8.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update-v8.yml b/.github/workflows/update-v8.yml index e6eb7fa38200cd..f416646042d933 100644 --- a/.github/workflows/update-v8.yml +++ b/.github/workflows/update-v8.yml @@ -20,7 +20,7 @@ jobs: with: persist-credentials: false - name: Cache node modules and update-v8 - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 id: cache-v8-npm env: cache-name: cache-v8-npm From dafb2f3e7a534fe09a75e40b6850cbbd3ffbfa90 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Jan 2026 18:15:18 +0000 Subject: [PATCH 15/36] meta: bump actions/setup-node from 6.0.0 to 6.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6.0.0 to 6.1.0. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/2028fbc5c25fe9cf00d9f06a71cc4710d4507903...395ad3262231945c25e8478fd5baf05154b1d79f) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] PR-URL: https://github.com/nodejs/node/pull/61244 Reviewed-By: Antoine du Hamel Reviewed-By: Colin Ihrig Reviewed-By: Ulises Gascón --- .github/workflows/auto-start-ci.yml | 2 +- .github/workflows/commit-lint.yml | 2 +- .github/workflows/commit-queue.yml | 2 +- .github/workflows/create-release-proposal.yml | 2 +- .github/workflows/daily-wpt-fyi.yml | 2 +- .github/workflows/daily.yml | 2 +- .github/workflows/doc.yml | 2 +- .github/workflows/find-inactive-collaborators.yml | 2 +- .github/workflows/find-inactive-tsc.yml | 2 +- .github/workflows/linters.yml | 6 +++--- .github/workflows/update-v8.yml | 2 +- .github/workflows/update-wpt.yml | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/auto-start-ci.yml b/.github/workflows/auto-start-ci.yml index 608227a7ddcee2..ea182ea1792eed 100644 --- a/.github/workflows/auto-start-ci.yml +++ b/.github/workflows/auto-start-ci.yml @@ -50,7 +50,7 @@ jobs: persist-credentials: false - name: Install Node.js - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: ${{ env.NODE_VERSION }} diff --git a/.github/workflows/commit-lint.yml b/.github/workflows/commit-lint.yml index a3fe3ae4c03983..48fccde1946eea 100644 --- a/.github/workflows/commit-lint.yml +++ b/.github/workflows/commit-lint.yml @@ -23,7 +23,7 @@ jobs: persist-credentials: false - run: git reset HEAD^2 - name: Install Node.js - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: ${{ env.NODE_VERSION }} - name: Validate commit message diff --git a/.github/workflows/commit-queue.yml b/.github/workflows/commit-queue.yml index 2b0ce32ce76934..1f3bfe7297deb6 100644 --- a/.github/workflows/commit-queue.yml +++ b/.github/workflows/commit-queue.yml @@ -69,7 +69,7 @@ jobs: # Install dependencies - name: Install Node.js - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: ${{ env.NODE_VERSION }} - name: Install @node-core/utils diff --git a/.github/workflows/create-release-proposal.yml b/.github/workflows/create-release-proposal.yml index f5ab79feb8d0f7..ace808e1040764 100644 --- a/.github/workflows/create-release-proposal.yml +++ b/.github/workflows/create-release-proposal.yml @@ -40,7 +40,7 @@ jobs: # Install dependencies - name: Install Node.js - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: ${{ env.NODE_VERSION }} diff --git a/.github/workflows/daily-wpt-fyi.yml b/.github/workflows/daily-wpt-fyi.yml index c53137c3a4d383..f93b4dfc01311b 100644 --- a/.github/workflows/daily-wpt-fyi.yml +++ b/.github/workflows/daily-wpt-fyi.yml @@ -52,7 +52,7 @@ jobs: run: echo "NIGHTLY=$(curl -s https://nodejs.org/download/nightly/index.json | jq -r '[.[] | select(.files[] | contains("linux-x64"))][0].version')" >> $GITHUB_ENV - name: Install Node.js id: setup-node - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: ${{ env.NIGHTLY || matrix.node-version }} check-latest: true diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 392ae13dd6e2e5..95b5cc90e426a7 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -19,7 +19,7 @@ jobs: with: persist-credentials: false - name: Use Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: ${{ env.NODE_VERSION }} - name: Environment Information diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index e5a2b2c522e1bb..251164a89c8cc4 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -28,7 +28,7 @@ jobs: with: persist-credentials: false - name: Use Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: ${{ env.NODE_VERSION }} - name: Environment Information diff --git a/.github/workflows/find-inactive-collaborators.yml b/.github/workflows/find-inactive-collaborators.yml index c84d027555773a..11911967900174 100644 --- a/.github/workflows/find-inactive-collaborators.yml +++ b/.github/workflows/find-inactive-collaborators.yml @@ -25,7 +25,7 @@ jobs: persist-credentials: false - name: Use Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: ${{ env.NODE_VERSION }} diff --git a/.github/workflows/find-inactive-tsc.yml b/.github/workflows/find-inactive-tsc.yml index 10c5e4190b5b0c..53a8916bcbe3fc 100644 --- a/.github/workflows/find-inactive-tsc.yml +++ b/.github/workflows/find-inactive-tsc.yml @@ -34,7 +34,7 @@ jobs: repository: nodejs/TSC - name: Use Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: ${{ env.NODE_VERSION }} diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index bb4160a0f1be1e..ea8805083d4d83 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -29,7 +29,7 @@ jobs: with: persist-credentials: false - name: Use Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: ${{ env.NODE_VERSION }} - name: Environment Information @@ -61,7 +61,7 @@ jobs: fetch-depth: 0 persist-credentials: false - name: Use Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: ${{ env.NODE_VERSION }} - name: Set up Python ${{ env.PYTHON_VERSION }} @@ -99,7 +99,7 @@ jobs: with: persist-credentials: false - name: Use Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: ${{ env.NODE_VERSION }} - name: Environment Information diff --git a/.github/workflows/update-v8.yml b/.github/workflows/update-v8.yml index f416646042d933..18e5436949aa24 100644 --- a/.github/workflows/update-v8.yml +++ b/.github/workflows/update-v8.yml @@ -30,7 +30,7 @@ jobs: ~/.npm key: ${{ runner.os }}-build-${{ env.cache-name }} - name: Install Node.js - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: ${{ env.NODE_VERSION }} - name: Install @node-core/utils diff --git a/.github/workflows/update-wpt.yml b/.github/workflows/update-wpt.yml index 5a3751ffece43d..cf5c0151ac52ec 100644 --- a/.github/workflows/update-wpt.yml +++ b/.github/workflows/update-wpt.yml @@ -32,7 +32,7 @@ jobs: persist-credentials: false - name: Install Node.js - uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 + uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 with: node-version: ${{ env.NODE_VERSION }} From 140f89d63945a785409b1470ea961f2cec8eec5c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Jan 2026 18:15:31 +0000 Subject: [PATCH 16/36] meta: bump step-security/harden-runner from 2.13.2 to 2.14.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.13.2 to 2.14.0. - [Release notes](https://github.com/step-security/harden-runner/releases) - [Commits](https://github.com/step-security/harden-runner/compare/95d9a5deda9de15063e7595e9719c11c38c90ae2...20cf305ff2072d973412fa9b1e3a4f227bda3c76) --- updated-dependencies: - dependency-name: step-security/harden-runner dependency-version: 2.14.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] PR-URL: https://github.com/nodejs/node/pull/61245 Reviewed-By: Colin Ihrig Reviewed-By: Ulises Gascón --- .github/workflows/scorecard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 3073882bdcce9a..4d96ec7eb2a46a 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -33,7 +33,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2 + uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 with: egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs From 319cfbfe02a6b1d19a338400382ecd8c1811b05d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Jan 2026 18:15:41 +0000 Subject: [PATCH 17/36] tools: bump the eslint group in /tools/eslint with 2 updates Bumps the eslint group in /tools/eslint with 2 updates: [eslint](https://github.com/eslint/eslint) and [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc). Updates `eslint` from 9.39.1 to 9.39.2 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](https://github.com/eslint/eslint/compare/v9.39.1...v9.39.2) Updates `eslint-plugin-jsdoc` from 61.4.1 to 61.5.0 - [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases) - [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v61.4.1...v61.5.0) --- updated-dependencies: - dependency-name: eslint dependency-version: 9.39.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: eslint - dependency-name: eslint-plugin-jsdoc dependency-version: 61.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: eslint ... Signed-off-by: dependabot[bot] PR-URL: https://github.com/nodejs/node/pull/61246 Reviewed-By: Colin Ihrig Reviewed-By: Antoine du Hamel --- tools/eslint/package-lock.json | 24 ++++++++++++------------ tools/eslint/package.json | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tools/eslint/package-lock.json b/tools/eslint/package-lock.json index c0ad0a65e22d29..b6cb05dea5c3f9 100644 --- a/tools/eslint/package-lock.json +++ b/tools/eslint/package-lock.json @@ -13,9 +13,9 @@ "@babel/plugin-syntax-import-source": "^7.27.1", "@eslint/markdown": "^7.5.1", "@stylistic/eslint-plugin": "^5.6.1", - "eslint": "^9.39.1", + "eslint": "^9.39.2", "eslint-formatter-tap": "^9.0.1", - "eslint-plugin-jsdoc": "^61.4.1", + "eslint-plugin-jsdoc": "^61.5.0", "globals": "^16.5.0" } }, @@ -424,9 +424,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.39.1", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.1.tgz", - "integrity": "sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==", + "version": "9.39.2", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.2.tgz", + "integrity": "sha512-q1mjIoW1VX4IvSocvM/vbTiveKC4k9eLrajNEuSsmjymSDEbpGddtpfOoN7YGAqBK3NG+uqo8ia4PDTt8buCYA==", "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1012,9 +1012,9 @@ } }, "node_modules/eslint": { - "version": "9.39.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.1.tgz", - "integrity": "sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==", + "version": "9.39.2", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.2.tgz", + "integrity": "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw==", "license": "MIT", "peer": true, "dependencies": { @@ -1024,7 +1024,7 @@ "@eslint/config-helpers": "^0.4.2", "@eslint/core": "^0.17.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.39.1", + "@eslint/js": "9.39.2", "@eslint/plugin-kit": "^0.4.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", @@ -1084,9 +1084,9 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "61.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-61.4.1.tgz", - "integrity": "sha512-3c1QW/bV25sJ1MsIvsvW+EtLtN6yZMduw7LVQNVt72y2/5BbV5Pg5b//TE5T48LRUxoEQGaZJejCmcj3wCxBzw==", + "version": "61.5.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-61.5.0.tgz", + "integrity": "sha512-PR81eOGq4S7diVnV9xzFSBE4CDENRQGP0Lckkek8AdHtbj+6Bm0cItwlFnxsLFriJHspiE3mpu8U20eODyToIg==", "license": "BSD-3-Clause", "dependencies": { "@es-joy/jsdoccomment": "~0.76.0", diff --git a/tools/eslint/package.json b/tools/eslint/package.json index 4ccb3597d6fda7..5919c2e0930e43 100644 --- a/tools/eslint/package.json +++ b/tools/eslint/package.json @@ -8,9 +8,9 @@ "@babel/plugin-syntax-import-source": "^7.27.1", "@eslint/markdown": "^7.5.1", "@stylistic/eslint-plugin": "^5.6.1", - "eslint": "^9.39.1", + "eslint": "^9.39.2", "eslint-formatter-tap": "^9.0.1", - "eslint-plugin-jsdoc": "^61.4.1", + "eslint-plugin-jsdoc": "^61.5.0", "globals": "^16.5.0" } } From a0c0482dc958ea417b3139c93ee4e4c826e70a83 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Sat, 3 Jan 2026 23:39:11 +0100 Subject: [PATCH 18/36] src: dump snapshot source with node:generate_default_snapshot_source This helps diffing snapshots when the reproducibility gets broken. PR-URL: https://github.com/nodejs/node/pull/61101 Reviewed-By: Anna Henningsen Reviewed-By: Chengzhong Wu --- src/node.cc | 15 +++++++++ test/parallel/test-snapshot-reproducible.js | 35 ++++----------------- 2 files changed, 21 insertions(+), 29 deletions(-) diff --git a/src/node.cc b/src/node.cc index a18660d388be9d..8367227dd56ed4 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1374,6 +1374,21 @@ ExitCode GenerateAndWriteSnapshotData(const SnapshotData** snapshot_data_ptr, DCHECK(snapshot_config.builder_script_path.has_value()); const std::string& builder_script = snapshot_config.builder_script_path.value(); + + // For the special builder node:generate_default_snapshot_source, generate + // the snapshot as C++ source and write it to snapshot.cc (for testing). + if (builder_script == "node:generate_default_snapshot_source") { + // Reset to empty to generate from scratch. + snapshot_config.builder_script_path = {}; + exit_code = + node::SnapshotBuilder::GenerateAsSource("snapshot.cc", + args_maybe_patched, + result->exec_args(), + snapshot_config, + true /* use_array_literals */); + return exit_code; + } + // node:embedded_snapshot_main indicates that we are using the // embedded snapshot and we are not supposed to clean it up. if (builder_script == "node:embedded_snapshot_main") { diff --git a/test/parallel/test-snapshot-reproducible.js b/test/parallel/test-snapshot-reproducible.js index f9392a7fb4adfc..efb664d1e6dc85 100644 --- a/test/parallel/test-snapshot-reproducible.js +++ b/test/parallel/test-snapshot-reproducible.js @@ -21,7 +21,7 @@ function generateSnapshot() { '--random_seed=42', '--predictable', '--build-snapshot', - 'node:generate_default_snapshot', + 'node:generate_default_snapshot_source', ], { env: { ...process.env, NODE_DEBUG_NATIVE: 'SNAPSHOT_SERDES' }, @@ -38,33 +38,10 @@ function generateSnapshot() { }, } ); - const blobPath = tmpdir.resolve('snapshot.blob'); - return fs.readFileSync(blobPath); + const outputPath = tmpdir.resolve('snapshot.cc'); + return fs.readFileSync(outputPath, 'utf-8').split('\n'); } -const buf1 = generateSnapshot(); -const buf2 = generateSnapshot(); - -const diff = []; -let offset = 0; -const step = 16; -do { - const length = Math.min(buf1.length - offset, step); - const slice1 = buf1.slice(offset, offset + length).toString('hex'); - const slice2 = buf2.slice(offset, offset + length).toString('hex'); - if (slice1 !== slice2) { - diff.push({ offset: '0x' + (offset).toString(16), slice1, slice2 }); - } - offset += length; -} while (offset < buf1.length); - -assert.strictEqual(offset, buf1.length); -if (offset < buf2.length) { - const length = Math.min(buf2.length - offset, step); - const slice2 = buf2.slice(offset, offset + length).toString('hex'); - diff.push({ offset, slice1: '', slice2 }); - offset += length; -} while (offset < buf2.length); - -assert.deepStrictEqual(diff, []); -assert.strictEqual(buf1.length, buf2.length); +const source1 = generateSnapshot(); +const source2 = generateSnapshot(); +assert.deepStrictEqual(source1, source2); From 4b0087098a277588c479957c30faa3789dcb23ea Mon Sep 17 00:00:00 2001 From: mag123c Date: Sun, 4 Jan 2026 11:13:31 +0900 Subject: [PATCH 19/36] doc: add reusePort error behavior to net module PR-URL: https://github.com/nodejs/node/pull/61250 Fixes: https://github.com/nodejs/node/issues/61018 Reviewed-By: Yagiz Nizipli Reviewed-By: Matteo Collina Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca --- doc/api/dgram.md | 2 +- doc/api/net.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/api/dgram.md b/doc/api/dgram.md index 8ea655f645bc4d..e8efbcfd262b0e 100644 --- a/doc/api/dgram.md +++ b/doc/api/dgram.md @@ -951,7 +951,7 @@ changes: port, even if another process has already bound a socket on it. Incoming datagrams are distributed to listening sockets. The option is available only on some platforms, such as Linux 3.9+, DragonFlyBSD 3.6+, FreeBSD 12.0+, - Solaris 11.4, and AIX 7.2.5+. On unsupported platforms this option raises an + Solaris 11.4, and AIX 7.2.5+. On unsupported platforms, this option raises an error when the socket is bound. **Default:** `false`. * `ipv6Only` {boolean} Setting `ipv6Only` to `true` will diff --git a/doc/api/net.md b/doc/api/net.md index 7d8b863bdff4d8..0bc2adbd455b8b 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -558,7 +558,8 @@ changes: multiple sockets on the same host to bind to the same port. Incoming connections are distributed by the operating system to listening sockets. This option is available only on some platforms, such as Linux 3.9+, DragonFlyBSD 3.6+, FreeBSD 12.0+, - Solaris 11.4, and AIX 7.2.5+. **Default:** `false`. + Solaris 11.4, and AIX 7.2.5+. On unsupported platforms, this option raises + an error. **Default:** `false`. * `path` {string} Will be ignored if `port` is specified. See [Identifying paths for IPC connections][]. * `port` {number} From b2c36d9a60e364957025eceea232e4987c5016ee Mon Sep 17 00:00:00 2001 From: Rafael Gonzaga Date: Sun, 4 Jan 2026 16:39:14 -0300 Subject: [PATCH 20/36] doc: add PR-URL requirement for security backports Security release automation requires that all backport commits include PR-URL metadata in their commit messages. Signed-off-by: RafaelGSS PR-URL: https://github.com/nodejs/node/pull/61256 Refs: https://github.com/nodejs/node-core-utils/pull/1022 Reviewed-By: Chengzhong Wu Reviewed-By: Marco Ippolito Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Aviv Keller --- doc/contributing/security-release-process.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/contributing/security-release-process.md b/doc/contributing/security-release-process.md index 676d8fd408909a..b58251de636daa 100644 --- a/doc/contributing/security-release-process.md +++ b/doc/contributing/security-release-process.md @@ -83,6 +83,8 @@ The current security stewards are documented in the main Node.js * Get volunteers for the upcoming security release on the affected release lines. * Make sure to sync nodejs-private (vN.x) branches with nodejs/node. + * **Important:** Ensure that all backport commits include the `PR-URL` metadata + in their commit messages. This is required for the security release automation. * [ ] 7\. **Preparing Pre and Post Release Blog Posts:** * [ ] Create a pre-release blog post using `git node security --pre-release`. From 6f1b327466ec96e362cbf1efa7d0be61f04eae3c Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sun, 4 Jan 2026 21:11:43 +0100 Subject: [PATCH 21/36] build: fix inconsistent quoting in `Makefile` PR-URL: https://github.com/nodejs/node/pull/60511 Reviewed-By: Aviv Keller --- Makefile | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/Makefile b/Makefile index a5536982b8e833..fadfdda336fcbd 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ endif ARCHTYPE := $(shell uname -m | tr '[:upper:]' '[:lower:]') COVTESTS ?= test-cov COV_SKIP_TESTS ?= core_line_numbers.js,testFinalizer.js,test_function/test.js -GTEST_FILTER ?= "*" +GTEST_FILTER ?= * GNUMAKEFLAGS += --no-print-directory GCOV ?= gcov PWD = $(CURDIR) @@ -31,9 +31,9 @@ else endif ifdef ENABLE_V8_TAP - TAP_V8 := --junitout $(PWD)/v8-tap.xml - TAP_V8_INTL := --junitout $(PWD)/v8-intl-tap.xml - TAP_V8_BENCHMARKS := --junitout $(PWD)/v8-benchmarks-tap.xml + TAP_V8 := --junitout '$(PWD)/v8-tap.xml' + TAP_V8_INTL := --junitout '$(PWD)/v8-intl-tap.xml' + TAP_V8_BENCHMARKS := --junitout '$(PWD)/v8-benchmarks-tap.xml' define convert_to_junit @true endef @@ -47,12 +47,12 @@ ifdef ENABLE_CONVERT_V8_JSON_TO_XML # By default, the V8's JSON test output only includes the tests which have # failed. We use --slow-tests-cutoff to ensure that all tests are present # in the output, including those which pass. - TAP_V8 := --json-test-results $(TAP_V8_JSON) --slow-tests-cutoff 1000000 - TAP_V8_INTL := --json-test-results $(TAP_V8_INTL_JSON) --slow-tests-cutoff 1000000 - TAP_V8_BENCHMARKS := --json-test-results $(TAP_V8_BENCHMARKS_JSON) --slow-tests-cutoff 1000000 + TAP_V8 := --json-test-results '$(TAP_V8_JSON)' --slow-tests-cutoff 1000000 + TAP_V8_INTL := --json-test-results '$(TAP_V8_INTL_JSON)' --slow-tests-cutoff 1000000 + TAP_V8_BENCHMARKS := --json-test-results '$(TAP_V8_BENCHMARKS_JSON)' --slow-tests-cutoff 1000000 define convert_to_junit - export PATH="$(NO_BIN_OVERRIDE_PATH)" && \ + PATH="$(NO_BIN_OVERRIDE_PATH)" \ $(PYTHON) tools/v8-json-to-junit.py < $(1) > $(1:.json=.xml) endef endif @@ -83,11 +83,11 @@ NPM ?= ./deps/npm/bin/npm-cli.js # Release build of node. # Use $(PWD) so we can cd to anywhere before calling this. -NODE ?= "$(PWD)/$(NODE_EXE)" +NODE ?= $(PWD)/$(NODE_EXE) # Prefer $(OUT_NODE) when running tests. Use $(NODE) # when generating coverage reports or running toolings as # debug build is be slower. -OUT_NODE ?= "$(PWD)/out/$(BUILDTYPE)/node$(EXEEXT)" +OUT_NODE ?= $(PWD)/out/$(BUILDTYPE)/node$(EXEEXT) # Flags for packaging. BUILD_DOWNLOAD_FLAGS ?= --download=all @@ -100,8 +100,8 @@ V ?= 0 # Use -e to double check in case it's a broken link available-node = \ - if [ -x "$(NODE)" ] && [ -e "$(NODE)" ]; then \ - "$(NODE)" $(1); \ + if [ -x '$(NODE)' ] && [ -e '$(NODE)' ]; then \ + '$(NODE)' $(1); \ elif [ -x `command -v node` ] && [ -e `command -v node` ] && [ `command -v node` ]; then \ `command -v node` $(1); \ else \ @@ -268,7 +268,7 @@ coverage-build: all ## Build coverage files. coverage-build-js: ## Build JavaScript coverage files. mkdir -p node_modules if [ ! -d node_modules/c8 ]; then \ - $(NODE) ./deps/npm install c8 --no-save --no-package-lock;\ + '$(NODE)' ./deps/npm install c8 --no-save --no-package-lock;\ fi .PHONY: coverage-test @@ -295,13 +295,13 @@ coverage-test: coverage-build ## Run the tests and generate a coverage report. .PHONY: coverage-report-js coverage-report-js: ## Report JavaScript coverage results. -$(MAKE) coverage-build-js - $(NODE) ./node_modules/.bin/c8 report + '$(NODE)' ./node_modules/.bin/c8 report .PHONY: cctest cctest: all ## Run the C++ tests using the built `cctest` executable. @out/$(BUILDTYPE)/$@ --gtest_filter=$(GTEST_FILTER) - $(OUT_NODE) ./test/embedding/test-embedding.js + '$(OUT_NODE)' ./test/embedding/test-embedding.js .PHONY: list-gtests list-gtests: ## List all available C++ gtests. @@ -393,7 +393,7 @@ test/addons/.docbuildstamp: $(DOCBUILDSTAMP_PREREQS) tools/doc/node_modules echo "Skipping .docbuildstamp (no crypto and/or no ICU)"; \ else \ $(RM) -r test/addons/??_*/; \ - [ -x $(NODE) ] && $(NODE) $< || node $< ; \ + [ -x '$(NODE)' ] && '$(NODE)' $< || node $< ; \ [ $$? -eq 0 ] && touch $@; \ fi @@ -613,7 +613,7 @@ test-ci: | clear-stalled bench-addons-build build-addons build-js-native-api-tes $(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \ --mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \ $(TEST_CI_ARGS) $(CI_JS_SUITES) $(CI_NATIVE_SUITES) $(CI_DOC) - $(OUT_NODE) ./test/embedding/test-embedding.js + '$(OUT_NODE)' ./test/embedding/test-embedding.js $(info Clean up any leftover processes, error if found.) ps awwx | grep Release/node | grep -v grep | cat @PS_OUT=`ps awwx | grep Release/node | grep -v grep | awk '{print $$1}'`; \ @@ -663,8 +663,8 @@ test-wpt: all ## Run the Web Platform Tests. test-wpt-report: ## Run the Web Platform Tests and generate a report. $(RM) -r out/wpt mkdir -p out/wpt - -WPT_REPORT=1 $(PYTHON) tools/test.py --shell $(NODE) $(PARALLEL_ARGS) wpt - $(NODE) "$$PWD/tools/merge-wpt-reports.mjs" + -WPT_REPORT=1 $(PYTHON) tools/test.py --shell '$(NODE)' $(PARALLEL_ARGS) wpt + '$(NODE)' "$$PWD/tools/merge-wpt-reports.mjs" .PHONY: test-internet test-internet: all ## Run internet tests. @@ -684,7 +684,7 @@ test-doc: doc-only lint-md ## Build, lint, and verify the docs. .PHONY: test-doc-ci test-doc-ci: doc-only ## Build, lint, and verify the docs (CI). - $(PYTHON) tools/test.py --shell $(NODE) $(TEST_CI_ARGS) $(PARALLEL_ARGS) doctool + $(PYTHON) tools/test.py --shell '$(NODE)' $(TEST_CI_ARGS) $(PARALLEL_ARGS) doctool .PHONY: test-known-issues test-known-issues: all ## Run tests for known issues. @@ -693,11 +693,11 @@ test-known-issues: all ## Run tests for known issues. # Related CI job: node-test-npm .PHONY: test-npm test-npm: $(OUT_NODE) ## Run the npm test suite on deps/npm. - $(OUT_NODE) tools/test-npm-package --install --logfile=test-npm.tap deps/npm test + '$(OUT_NODE)' tools/test-npm-package --install --logfile=test-npm.tap deps/npm test .PHONY: test-npm-publish test-npm-publish: $(OUT_NODE) ## Test the `npm publish` command. - npm_package_config_publishtest=true $(OUT_NODE) deps/npm/test/run.js + npm_package_config_publishtest=true '$(OUT_NODE)' deps/npm/test/run.js .PHONY: test-js-native-api test-js-native-api: test-build-js-native-api ## Run JS Native-API tests. @@ -841,7 +841,7 @@ out/doc/api/assets/%: doc/api_assets/% | out/doc/api/assets @cp $< $@ ; $(RM) out/doc/api/assets/README.md -run-npm-ci = $(PWD)/$(NPM) ci +run-npm-ci = '$(PWD)/$(NPM)' ci LINK_DATA = out/doc/apilinks.json VERSIONS_DATA = out/previous-doc-versions.json @@ -1181,7 +1181,7 @@ endif $(MACOSOUTDIR)/dist/npm/usr/local/lib/node_modules unlink $(MACOSOUTDIR)/dist/node/usr/local/bin/npm unlink $(MACOSOUTDIR)/dist/node/usr/local/bin/npx - $(NODE) tools/license2rtf.mjs < LICENSE > \ + '$(NODE)' tools/license2rtf.mjs < LICENSE > \ $(MACOSOUTDIR)/installer/productbuild/Resources/license.rtf cp doc/osx_installer_logo.png $(MACOSOUTDIR)/installer/productbuild/Resources pkgbuild --version $(FULLVERSION) \ @@ -1680,8 +1680,8 @@ HAS_DOCKER ?= $(shell command -v docker > /dev/null 2>&1; [ $$? -eq 0 ] && echo .PHONY: gen-openssl ifeq ($(HAS_DOCKER), 1) -DOCKER_COMMAND ?= docker run --rm -u $(shell id -u) -v $(PWD):/node -IS_IN_WORKTREE = $(shell grep '^gitdir: ' $(PWD)/.git 2>/dev/null) +DOCKER_COMMAND ?= docker run --rm -u $(shell id -u) -v '$(PWD):/node' +IS_IN_WORKTREE = $(shell grep '^gitdir: ' '$(PWD)/.git' 2>/dev/null) GIT_WORKTREE_COMMON = $(shell git rev-parse --git-common-dir) DOCKER_COMMAND += $(if $(IS_IN_WORKTREE), -v $(GIT_WORKTREE_COMMON):$(GIT_WORKTREE_COMMON)) gen-openssl: ## Generate platform dependent openssl files (requires docker). From 5f593ee115613a455560ab4803e998617b21bdbc Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Mon, 5 Jan 2026 14:08:06 +0100 Subject: [PATCH 22/36] build: expose libplatform symbols in shared libnode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This requires setting BUILDING_V8_PLATFORM_SHARED to expose the public symbols since we build with hidden visibility by default. PR-URL: https://github.com/nodejs/node/pull/61144 Fixes: https://github.com/nodejs/node/issues/61102 Reviewed-By: Michaël Zasso Reviewed-By: Chengzhong Wu Reviewed-By: Richard Lau --- node.gypi | 2 ++ tools/v8_gypfiles/v8.gyp | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/node.gypi b/node.gypi index 8ba67f53192159..4f35b103449fc3 100644 --- a/node.gypi +++ b/node.gypi @@ -50,9 +50,11 @@ 'defines': [ 'USING_UV_SHARED', 'USING_V8_SHARED', + 'USING_V8_PLATFORM_SHARED', 'BUILDING_NODE_EXTENSION' ], 'defines!': [ + 'BUILDING_V8_PLATFORM_SHARED=1', 'BUILDING_V8_SHARED=1', 'BUILDING_UV_SHARED=1' ] diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index f22e914e1fc4a6..f323d8fba68f96 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -58,6 +58,7 @@ ['OS!="aix" and OS!="os400"', { 'defines': [ 'BUILDING_V8_SHARED', # Make V8_EXPORT visible. + 'BUILDING_V8_PLATFORM_SHARED', # Make V8_PLATFORM_EXPORT visible. ] }], ['node_shared=="true"', { @@ -1345,6 +1346,7 @@ ['component=="shared_library"', { 'defines': [ 'BUILDING_V8_SHARED', + 'BUILDING_V8_PLATFORM_SHARED', ], }], ['v8_enable_i18n_support==1', { @@ -1414,6 +1416,7 @@ 'defines!': [ '_HAS_EXCEPTIONS=0', 'BUILDING_V8_SHARED=1', + 'BUILDING_V8_PLATFORM_SHARED=1', ], 'cflags_cc!': ['-fno-exceptions'], 'cflags_cc': ['-fexceptions'], @@ -1440,6 +1443,7 @@ 'defines!': [ '_HAS_EXCEPTIONS=0', 'BUILDING_V8_SHARED=1', + 'BUILDING_V8_PLATFORM_SHARED=1', ], 'cflags_cc!': ['-fno-exceptions'], 'cflags_cc': ['-fexceptions'], @@ -1781,6 +1785,7 @@ ], 'defines!': [ 'BUILDING_V8_SHARED=1', + 'BUILDING_V8_PLATFORM_SHARED=1', ], 'dependencies': [ 'v8_libbase', @@ -1862,6 +1867,7 @@ 'defines!': [ '_HAS_EXCEPTIONS=0', 'BUILDING_V8_SHARED=1', + 'BUILDING_V8_PLATFORM_SHARED=1', ], 'cflags_cc!': ['-fno-exceptions'], 'cflags_cc': ['-fexceptions'], @@ -1905,6 +1911,7 @@ 'defines!': [ '_HAS_EXCEPTIONS=0', 'BUILDING_V8_SHARED=1', + 'BUILDING_V8_PLATFORM_SHARED=1', ], 'msvs_settings': { 'VCCLCompilerTool': { @@ -2119,10 +2126,12 @@ ], 'defines': [ 'BUILDING_V8_SHARED', + 'BUILDING_V8_PLATFORM_SHARED', ], 'direct_dependent_settings': { 'defines': [ 'USING_V8_SHARED', + 'USING_V8_PLATFORM_SHARED', ], }, 'conditions': [ From 4cca6a1cccadf72467fc9d300a766f5c5c69a458 Mon Sep 17 00:00:00 2001 From: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Date: Mon, 5 Jan 2026 14:08:16 +0100 Subject: [PATCH 23/36] doc: correct typo in api contributing doc PR-URL: https://github.com/nodejs/node/pull/61260 Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Aviv Keller Reviewed-By: Rafael Gonzaga --- doc/contributing/api-documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/contributing/api-documentation.md b/doc/contributing/api-documentation.md index ffe1cef1386765..5847e9c216e134 100644 --- a/doc/contributing/api-documentation.md +++ b/doc/contributing/api-documentation.md @@ -54,7 +54,7 @@ meant to be a guide on how to write documentation for Node.js. it as a reference for the structure of the documentation. * The [Stability Index](https://nodejs.org/dist/latest/docs/api/documentation.html#stability-index) - is used to community the Stability of a given Node.js module. The Stability + is used to describe the Stability of a given Node.js module. The Stability levels include: * Stability 0: Deprecated. (This module is Deprecated) * Stability 1: Experimental. (This module is Experimental) From ac4c71b123ad76d0a219e480b5b24f8e754925f3 Mon Sep 17 00:00:00 2001 From: Mike McCready <66998419+MikeMcC399@users.noreply.github.com> Date: Mon, 5 Jan 2026 16:55:55 +0100 Subject: [PATCH 24/36] doc: correct typo in BUILDING doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/61261 Reviewed-By: Colin Ihrig Reviewed-By: Ulises Gascón Reviewed-By: Michaël Zasso Reviewed-By: Luigi Pinca Reviewed-By: Rafael Gonzaga --- BUILDING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BUILDING.md b/BUILDING.md index de8e92fc2ab8a8..995ff85fc8c472 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -178,7 +178,7 @@ Binaries at are produced on: Starting with Node.js 25, official Linux binaries are linked with `libatomic` and these systems must have the `libatomic` runtime installed and available at execution time to run the binaries. The package name for the `libatomic` runtime is typically `libatomic` or `libatomic1` depending -on your Linux distibution. +on your Linux distribution. From 77a743af6fa1935a7dcf5c29e0d9432f7b9bdc87 Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Tue, 6 Jan 2026 00:02:24 +0800 Subject: [PATCH 25/36] worker: update code examples for `node:worker_threads` module PR-URL: https://github.com/nodejs/node/pull/58264 Reviewed-By: James M Snell Reviewed-By: Antoine du Hamel --- doc/api/worker_threads.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/api/worker_threads.md b/doc/api/worker_threads.md index d3962939f23061..48747a4b5c74ee 100644 --- a/doc/api/worker_threads.md +++ b/doc/api/worker_threads.md @@ -47,8 +47,8 @@ export default function parseJSAsync(script) { workerData: script, }); worker.on('message', resolve); - worker.on('error', reject); - worker.on('exit', (code) => { + worker.once('error', reject); + worker.once('exit', (code) => { if (code !== 0) reject(new Error(`Worker stopped with exit code ${code}`)); }); @@ -73,8 +73,8 @@ if (isMainThread) { workerData: script, }); worker.on('message', resolve); - worker.on('error', reject); - worker.on('exit', (code) => { + worker.once('error', reject); + worker.once('exit', (code) => { if (code !== 0) reject(new Error(`Worker stopped with exit code ${code}`)); }); @@ -670,7 +670,7 @@ share read and write access to the same set of environment variables. import process from 'node:process'; import { Worker, SHARE_ENV } from 'node:worker_threads'; new Worker('process.env.SET_IN_WORKER = "foo"', { eval: true, env: SHARE_ENV }) - .on('exit', () => { + .once('exit', () => { console.log(process.env.SET_IN_WORKER); // Prints 'foo'. }); ``` @@ -680,7 +680,7 @@ new Worker('process.env.SET_IN_WORKER = "foo"', { eval: true, env: SHARE_ENV }) const { Worker, SHARE_ENV } = require('node:worker_threads'); new Worker('process.env.SET_IN_WORKER = "foo"', { eval: true, env: SHARE_ENV }) - .on('exit', () => { + .once('exit', () => { console.log(process.env.SET_IN_WORKER); // Prints 'foo'. }); ``` @@ -1110,7 +1110,7 @@ const { port1, port2 } = new MessageChannel(); // foobar // closed! port2.on('message', (message) => console.log(message)); -port2.on('close', () => console.log('closed!')); +port2.once('close', () => console.log('closed!')); port1.postMessage('foobar'); port1.close(); @@ -1126,7 +1126,7 @@ const { port1, port2 } = new MessageChannel(); // foobar // closed! port2.on('message', (message) => console.log(message)); -port2.on('close', () => console.log('closed!')); +port2.once('close', () => console.log('closed!')); port1.postMessage('foobar'); port1.close(); From 697f94502af0ebe6c516ee39c936109f4be797eb Mon Sep 17 00:00:00 2001 From: Rafael Gonzaga Date: Mon, 5 Jan 2026 18:00:32 -0300 Subject: [PATCH 26/36] doc: mention --newVersion release script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/61255 Reviewed-By: Marco Ippolito Reviewed-By: Colin Ihrig Reviewed-By: Ruy Adorno Reviewed-By: Ulises Gascón --- doc/contributing/releases.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/contributing/releases.md b/doc/contributing/releases.md index 05bdb40515fd9d..adbe8c80c3d806 100644 --- a/doc/contributing/releases.md +++ b/doc/contributing/releases.md @@ -325,7 +325,12 @@ git node release -S --prepare --security --filterLabel v20.x ``` to automate the remaining steps until step 6 or you can perform it manually -following the below steps. +following the below steps. For semver-minors, you can pass the new version +explicitly with `--newVersion` arg: + +```bash +git node release -S --prepare --security --filterLabel v20.x --newVersion 20.20.0 +```
Security release From 9db3d94de010b02ca7ecc112840fd002f604c2f9 Mon Sep 17 00:00:00 2001 From: "Node.js GitHub Bot" Date: Tue, 6 Jan 2026 01:14:28 +0000 Subject: [PATCH 27/36] deps: update nbytes to 0.1.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/61270 Reviewed-By: Michaël Zasso Reviewed-By: Aviv Keller Reviewed-By: Colin Ihrig Reviewed-By: Rafael Gonzaga --- deps/nbytes/include/nbytes.h | 53 +++++++++++++++++++++--------------- deps/nbytes/src/nbytes.cpp | 2 +- 2 files changed, 32 insertions(+), 23 deletions(-) diff --git a/deps/nbytes/include/nbytes.h b/deps/nbytes/include/nbytes.h index b012729c6cca8e..525a91735c954a 100644 --- a/deps/nbytes/include/nbytes.h +++ b/deps/nbytes/include/nbytes.h @@ -4,6 +4,7 @@ #include #include #include +#include #include #include @@ -548,7 +549,11 @@ size_t StringSearch::BoyerMooreSearch(Vector subject, size_t start = start_; int *bad_char_occurrence = bad_char_shift_table_; - int *good_suffix_shift = good_suffix_shift_table_ - start_; + + auto good_suffix_get = [&](size_t idx) -> int { + if (idx < start || idx - start > kBMMaxShift) return 0; + return good_suffix_shift_table_[idx - start]; + }; Char last_char = pattern_[pattern_length - 1]; size_t index = start_index; @@ -575,7 +580,7 @@ size_t StringSearch::BoyerMooreSearch(Vector subject, index += pattern_length - 1 - CharOccurrence(bad_char_occurrence, last_char); } else { - int gs_shift = good_suffix_shift[j + 1]; + int gs_shift = good_suffix_get(j + 1); int bc_occ = CharOccurrence(bad_char_occurrence, c); int shift = j - bc_occ; if (gs_shift > shift) { @@ -591,22 +596,25 @@ size_t StringSearch::BoyerMooreSearch(Vector subject, template void StringSearch::PopulateBoyerMooreTable() { const size_t pattern_length = pattern_.length(); - // Only look at the last kBMMaxShift characters of pattern (from start_ - // to pattern_length). const size_t start = start_; const size_t length = pattern_length - start; - // Biased tables so that we can use pattern indices as table indices, - // even if we only cover the part of the pattern from offset start. - int *shift_table = good_suffix_shift_table_ - start_; - int *suffix_table = suffix_table_ - start_; + auto shift_get = [&](size_t idx) -> int & { + if (idx < start) abort(); + return good_suffix_shift_table_[idx - start]; + }; + + auto suffix_get = [&](size_t idx) -> int & { + if (idx < start) abort(); + return suffix_table_[idx - start]; + }; // Initialize table. for (size_t i = start; i < pattern_length; i++) { - shift_table[i] = length; + shift_get(i) = length; } - shift_table[pattern_length] = 1; - suffix_table[pattern_length] = pattern_length + 1; + shift_get(pattern_length) = 1; + suffix_get(pattern_length) = pattern_length + 1; if (pattern_length <= start) { return; @@ -620,34 +628,35 @@ void StringSearch::PopulateBoyerMooreTable() { while (i > start) { Char c = pattern_[i - 1]; while (suffix <= pattern_length && c != pattern_[suffix - 1]) { - if (static_cast(shift_table[suffix]) == length) { - shift_table[suffix] = suffix - i; + if (static_cast(shift_get(suffix)) == length) { + shift_get(suffix) = suffix - i; } - suffix = suffix_table[suffix]; + suffix = suffix_get(suffix); } - suffix_table[--i] = --suffix; + suffix_get(--i) = --suffix; if (suffix == pattern_length) { // No suffix to extend, so we check against last_char only. while ((i > start) && (pattern_[i - 1] != last_char)) { - if (static_cast(shift_table[pattern_length]) == length) { - shift_table[pattern_length] = pattern_length - i; + if (static_cast(shift_get(pattern_length)) == length) { + shift_get(pattern_length) = pattern_length - i; } - suffix_table[--i] = pattern_length; + suffix_get(--i) = pattern_length; } if (i > start) { - suffix_table[--i] = --suffix; + suffix_get(--i) = --suffix; } } } } + // Build shift table using suffixes. if (suffix < pattern_length) { for (size_t i = start; i <= pattern_length; i++) { - if (static_cast(shift_table[i]) == length) { - shift_table[i] = suffix - start; + if (static_cast(shift_get(i)) == length) { + shift_get(i) = suffix - start; } if (i == suffix) { - suffix = suffix_table[suffix]; + suffix = suffix_get(suffix); } } } diff --git a/deps/nbytes/src/nbytes.cpp b/deps/nbytes/src/nbytes.cpp index 86abed713e9cbe..a827809adbacd3 100644 --- a/deps/nbytes/src/nbytes.cpp +++ b/deps/nbytes/src/nbytes.cpp @@ -205,7 +205,7 @@ void ForceAscii(const char *src, char *dst, size_t len) { ForceAsciiSlow(src, dst, unalign); src += unalign; dst += unalign; - len -= src_unalign; + len -= unalign; } else { ForceAsciiSlow(src, dst, len); return; From 64fb3c2d0a8c91adf39f6312d802d1d36ab2797c Mon Sep 17 00:00:00 2001 From: "Node.js GitHub Bot" Date: Tue, 6 Jan 2026 01:14:39 +0000 Subject: [PATCH 28/36] deps: update cjs-module-lexer to 2.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/61271 Reviewed-By: Michaël Zasso Reviewed-By: Aviv Keller Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Rafael Gonzaga --- deps/cjs-module-lexer/dist/lexer.js | 2 +- deps/cjs-module-lexer/dist/lexer.mjs | 4 +- deps/cjs-module-lexer/lexer.js | 164 ++++++++++++++++++- deps/cjs-module-lexer/src/lexer.js | 164 ++++++++++++++++++- deps/cjs-module-lexer/src/package-lock.json | 6 +- deps/cjs-module-lexer/src/package.json | 10 +- deps/cjs-module-lexer/src/src/lexer.js | 165 +++++++++++++++++++- src/cjs_module_lexer_version.h | 2 +- 8 files changed, 501 insertions(+), 16 deletions(-) diff --git a/deps/cjs-module-lexer/dist/lexer.js b/deps/cjs-module-lexer/dist/lexer.js index cb397040a42a7e..e1a05b5b260684 100644 --- a/deps/cjs-module-lexer/dist/lexer.js +++ b/deps/cjs-module-lexer/dist/lexer.js @@ -1 +1 @@ -"use strict";exports.init=init;exports.initSync=initSync;exports.parse=parse;let A;const B=1===new Uint8Array(new Uint16Array([1]).buffer)[0];function parse(I,C="@"){if(!A)throw new Error("Not initialized");const w=I.length+1,D=(A.__heap_base.value||A.__heap_base)+4*w-A.memory.buffer.byteLength;D>0&&A.memory.grow(Math.ceil(D/65536));const G=A.sa(w);(B?g:E)(I,new Uint16Array(A.memory.buffer,G,w));const S=A.parseCJS(G,I.length,0,0,0);if(S){const B=new Error(`Parse error ${C}${A.e()}:${I.slice(0,A.e()).split("\n").length}:${A.e()-I.lastIndexOf("\n",A.e()-1)}`);throw Object.assign(B,{idx:A.e()}),5!==S&&6!==S&&7!==S||Object.assign(B,{code:"ERR_LEXER_ESM_SYNTAX"}),B}let R=new Set,H=new Set,o=new Set;for(;A.rre();){const B=Q(I.slice(A.res(),A.ree()));B&&H.add(B)}for(;A.ru();)o.add(Q(I.slice(A.us(),A.ue())));for(;A.re();){let B=Q(I.slice(A.es(),A.ee()));void 0===B||o.has(B)||R.add(B)}return{exports:[...R],reexports:[...H]}}function Q(A){if('"'!==A[0]&&"'"!==A[0])return A;try{const B=(0,eval)(A);for(let A=0;A>>8}}function g(A,B){const Q=A.length;let E=0;for(;EA.charCodeAt(0))}let C;function init(){return C||(C=(async()=>{const B=await WebAssembly.compile(I()),{exports:Q}=await WebAssembly.instantiate(B);A=Q})())}function initSync(){if(A)return;const B=new WebAssembly.Module(I()),{exports:Q}=new WebAssembly.Instance(B);A=Q} \ No newline at end of file +"use strict";exports.init=init;exports.initSync=initSync;exports.parse=parse;let A;const B=1===new Uint8Array(new Uint16Array([1]).buffer)[0];function parse(E,g="@"){if(!A)throw new Error("Not initialized");const w=E.length+1,D=(A.__heap_base.value||A.__heap_base)+4*w-A.memory.buffer.byteLength;D>0&&A.memory.grow(Math.ceil(D/65536));const G=A.sa(w);(B?C:I)(E,new Uint16Array(A.memory.buffer,G,w));const S=A.parseCJS(G,E.length,0,0,0);if(S){const B=new Error(`Parse error ${g}${A.e()}:${E.slice(0,A.e()).split("\n").length}:${A.e()-E.lastIndexOf("\n",A.e()-1)}`);throw Object.assign(B,{idx:A.e()}),5!==S&&6!==S&&7!==S||Object.assign(B,{code:"ERR_LEXER_ESM_SYNTAX"}),B}let o=new Set,R=new Set,y=new Set;for(;A.rre();){const B=Q(E.slice(A.res(),A.ree()));B&&R.add(B)}for(;A.ru();)y.add(Q(E.slice(A.us(),A.ue())));for(;A.re();){let B=Q(E.slice(A.es(),A.ee()));void 0===B||y.has(B)||o.add(B)}return{exports:[...o],reexports:[...R]}}function Q(A){if('"'!==A[0]&&"'"!==A[0])return A;try{const B=function(A){const B=A[0];if('"'===B)try{return JSON.parse(A)}catch{}else if("'"===B&&A.length>1&&"'"===A[A.length-1]&&-1===A.indexOf('"'))try{return JSON.parse('"'+A.slice(1,-1)+'"')}catch{}let Q="",g={v:1};for(;g.v1114111)throw new SyntaxError;++B.v}while("}"!==A[B.v]);++B.v}else for(let E=0;E<4;++E)Q=16*Q+g(A[B.v]),++B.v;return String.fromCodePoint(Q)}(A,B);case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":return function(A,B,Q){let E=A<="3"?2:1,g=+A;do{if((A=B[Q.v])<"0"||A>"7")break;g=8*g+ +A,++Q.v,--E}while(E>0);return String.fromCodePoint(g)}(Q,A,B);default:return Q}}function g(A){if(A>="0"&&A<="9")return+A;if(A>="a"&&A<="f")return A.charCodeAt(0)-87;if(A>="A"&&A<="F")return A.charCodeAt(0)-55;throw new SyntaxError}function I(A,B){const Q=A.length;let E=0;for(;E>>8}}function C(A,B){const Q=A.length;let E=0;for(;EA.charCodeAt(0))}let D;function init(){return D||(D=(async()=>{const B=await WebAssembly.compile(w()),{exports:Q}=await WebAssembly.instantiate(B);A=Q})())}function initSync(){if(A)return;const B=new WebAssembly.Module(w()),{exports:Q}=new WebAssembly.Instance(B);A=Q} \ No newline at end of file diff --git a/deps/cjs-module-lexer/dist/lexer.mjs b/deps/cjs-module-lexer/dist/lexer.mjs index a6bbeffdf8a288..44a2f3eb0d1c35 100644 --- a/deps/cjs-module-lexer/dist/lexer.mjs +++ b/deps/cjs-module-lexer/dist/lexer.mjs @@ -1,2 +1,2 @@ -/* cjs-module-lexer 2.1.1 */ -let A;const B=1===new Uint8Array(new Uint16Array([1]).buffer)[0];export function parse(I,C="@"){if(!A)throw new Error("Not initialized");const w=I.length+1,D=(A.__heap_base.value||A.__heap_base)+4*w-A.memory.buffer.byteLength;D>0&&A.memory.grow(Math.ceil(D/65536));const G=A.sa(w);(B?g:E)(I,new Uint16Array(A.memory.buffer,G,w));const S=A.parseCJS(G,I.length,0,0,0);if(S){const B=new Error(`Parse error ${C}${A.e()}:${I.slice(0,A.e()).split("\n").length}:${A.e()-I.lastIndexOf("\n",A.e()-1)}`);throw Object.assign(B,{idx:A.e()}),5!==S&&6!==S&&7!==S||Object.assign(B,{code:"ERR_LEXER_ESM_SYNTAX"}),B}let R=new Set,H=new Set,o=new Set;for(;A.rre();){const B=Q(I.slice(A.res(),A.ree()));B&&H.add(B)}for(;A.ru();)o.add(Q(I.slice(A.us(),A.ue())));for(;A.re();){let B=Q(I.slice(A.es(),A.ee()));void 0===B||o.has(B)||R.add(B)}return{exports:[...R],reexports:[...H]}}function Q(A){if('"'!==A[0]&&"'"!==A[0])return A;try{const B=(0,eval)(A);for(let A=0;A>>8}}function g(A,B){const Q=A.length;let E=0;for(;EA.charCodeAt(0))}let C;export function init(){return C||(C=(async()=>{const B=await WebAssembly.compile(I()),{exports:Q}=await WebAssembly.instantiate(B);A=Q})())}export function initSync(){if(A)return;const B=new WebAssembly.Module(I()),{exports:Q}=new WebAssembly.Instance(B);A=Q} \ No newline at end of file +/* cjs-module-lexer 2.2.0 */ +let A;const B=1===new Uint8Array(new Uint16Array([1]).buffer)[0];export function parse(E,g="@"){if(!A)throw new Error("Not initialized");const w=E.length+1,D=(A.__heap_base.value||A.__heap_base)+4*w-A.memory.buffer.byteLength;D>0&&A.memory.grow(Math.ceil(D/65536));const G=A.sa(w);(B?C:I)(E,new Uint16Array(A.memory.buffer,G,w));const S=A.parseCJS(G,E.length,0,0,0);if(S){const B=new Error(`Parse error ${g}${A.e()}:${E.slice(0,A.e()).split("\n").length}:${A.e()-E.lastIndexOf("\n",A.e()-1)}`);throw Object.assign(B,{idx:A.e()}),5!==S&&6!==S&&7!==S||Object.assign(B,{code:"ERR_LEXER_ESM_SYNTAX"}),B}let o=new Set,R=new Set,y=new Set;for(;A.rre();){const B=Q(E.slice(A.res(),A.ree()));B&&R.add(B)}for(;A.ru();)y.add(Q(E.slice(A.us(),A.ue())));for(;A.re();){let B=Q(E.slice(A.es(),A.ee()));void 0===B||y.has(B)||o.add(B)}return{exports:[...o],reexports:[...R]}}function Q(A){if('"'!==A[0]&&"'"!==A[0])return A;try{const B=function(A){const B=A[0];if('"'===B)try{return JSON.parse(A)}catch{}else if("'"===B&&A.length>1&&"'"===A[A.length-1]&&-1===A.indexOf('"'))try{return JSON.parse('"'+A.slice(1,-1)+'"')}catch{}let Q="",g={v:1};for(;g.v1114111)throw new SyntaxError;++B.v}while("}"!==A[B.v]);++B.v}else for(let E=0;E<4;++E)Q=16*Q+g(A[B.v]),++B.v;return String.fromCodePoint(Q)}(A,B);case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":return function(A,B,Q){let E=A<="3"?2:1,g=+A;do{if((A=B[Q.v])<"0"||A>"7")break;g=8*g+ +A,++Q.v,--E}while(E>0);return String.fromCodePoint(g)}(Q,A,B);default:return Q}}function g(A){if(A>="0"&&A<="9")return+A;if(A>="a"&&A<="f")return A.charCodeAt(0)-87;if(A>="A"&&A<="F")return A.charCodeAt(0)-55;throw new SyntaxError}function I(A,B){const Q=A.length;let E=0;for(;E>>8}}function C(A,B){const Q=A.length;let E=0;for(;EA.charCodeAt(0))}let D;export function init(){return D||(D=(async()=>{const B=await WebAssembly.compile(w()),{exports:Q}=await WebAssembly.instantiate(B);A=Q})())}export function initSync(){if(A)return;const B=new WebAssembly.Module(w()),{exports:Q}=new WebAssembly.Instance(B);A=Q} \ No newline at end of file diff --git a/deps/cjs-module-lexer/lexer.js b/deps/cjs-module-lexer/lexer.js index 6807f0bffc2843..1614fd9e62d88f 100755 --- a/deps/cjs-module-lexer/lexer.js +++ b/deps/cjs-module-lexer/lexer.js @@ -55,7 +55,7 @@ function parseCJS (source, name = '@') { function decode (str) { if (str[0] === '"' || str[0] === '\'') { try { - const decoded = (0, eval)(str); + const decoded = scanStringLiteral(str); // Filter to exclude non-matching UTF-16 surrogate strings for (let i = 0; i < decoded.length; i++) { const surrogatePrefix = decoded.charCodeAt(i) & 0xFC00; @@ -1027,6 +1027,168 @@ function tryParseLiteralExports () { } } +// This function and it's callees are duplicated in src/lexer.js +function scanStringLiteral (source) { + const quote = source[0]; + + // try JSON.parse first for performance + if (quote === '"') { + try { + return JSON.parse(source); + } catch { + // ignored + } + } else if (quote === "'" && source.length > 1 && source[source.length - 1] === "'" && source.indexOf('"') === -1) { + try { + return JSON.parse('"' + source.slice(1, -1) + '"'); + } catch { + // ignored + } + } + + // fall back to doing it the hard way + let parsed = ''; + let index = { v: 1 }; + + while (index.v < source.length) { + const char = source[index.v]; + switch (char) { + case quote: { + return parsed; + } + case '\\': { + ++index.v; + parsed += scanEscapeSequence(source, index); + break; + } + case '\r': + case '\n': { + throw new SyntaxError(); + } + default: { + ++index.v; + parsed += char; + } + } + } + + throw new SyntaxError(); +} + +function scanEscapeSequence (source, index) { + if (index.v === source.length) { + throw new SyntaxError(); + } + const char = source[index.v]; + ++index.v; + switch (char) { + case '\r': { + if (source[index.v] === '\n') { + ++index.v; + } + // fall through + } + case '\n': + case '\u2028': + case '\u2029': { + return ''; + } + case 'r': { + return '\r'; + } + case 'n': { + return '\n'; + } + case 't': { + return '\t'; + } + case 'b': { + return '\b'; + } + case 'f': { + return '\f'; + } + case 'v': { + return '\v'; + } + case 'x': { + return scanHexEscapeSequence(source, index); + } + case 'u': { + return scanUnicodeEscapeSequence(source, index); + } + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': { + return scanOctalEscapeSequence(char, source, index); + } + default: { + return char; + } + } +} + +function scanHexEscapeSequence (source, index) { + const a = readHex(source[index.v]); + ++index.v; + const b = readHex(source[index.v]); + ++index.v; + return String.fromCodePoint(a * 16 + b); +} + +function scanUnicodeEscapeSequence (source, index) { + let result = 0; + if (source[index.v] === '{') { + ++index.v; + do { + result = result * 16 + readHex(source[index.v]); + if (result > 0x10FFFF) { + throw new SyntaxError(); + } + ++index.v; + } while (source[index.v] !== '}'); + ++index.v; + } else { + for (let i = 0; i < 4; ++i) { + result = result * 16 + readHex(source[index.v]); + ++index.v; + } + } + return String.fromCodePoint(result); +} + +function scanOctalEscapeSequence (char, source, index) { + let toRead = char <= '3' ? 2 : 1; + let result = +char; + do { + char = source[index.v]; + if (char < '0' || char > '7') { + break; + } + result = result * 8 + (+char); + ++index.v; + --toRead; + } while (toRead > 0); + return String.fromCodePoint(result); +} + +function readHex (char) { + if (char >= '0' && char <= '9') { + return +char; + } else if (char >= 'a' && char <= 'f') { + return char.charCodeAt(0) - 87; + } else if (char >= 'A' && char <= 'F') { + return char.charCodeAt(0) - 55; + } + throw new SyntaxError(); +} + + // --- Extracted from AcornJS --- //(https://github.com/acornjs/acorn/blob/master/acorn/src/identifier.js#L23 // diff --git a/deps/cjs-module-lexer/src/lexer.js b/deps/cjs-module-lexer/src/lexer.js index 6807f0bffc2843..1614fd9e62d88f 100755 --- a/deps/cjs-module-lexer/src/lexer.js +++ b/deps/cjs-module-lexer/src/lexer.js @@ -55,7 +55,7 @@ function parseCJS (source, name = '@') { function decode (str) { if (str[0] === '"' || str[0] === '\'') { try { - const decoded = (0, eval)(str); + const decoded = scanStringLiteral(str); // Filter to exclude non-matching UTF-16 surrogate strings for (let i = 0; i < decoded.length; i++) { const surrogatePrefix = decoded.charCodeAt(i) & 0xFC00; @@ -1027,6 +1027,168 @@ function tryParseLiteralExports () { } } +// This function and it's callees are duplicated in src/lexer.js +function scanStringLiteral (source) { + const quote = source[0]; + + // try JSON.parse first for performance + if (quote === '"') { + try { + return JSON.parse(source); + } catch { + // ignored + } + } else if (quote === "'" && source.length > 1 && source[source.length - 1] === "'" && source.indexOf('"') === -1) { + try { + return JSON.parse('"' + source.slice(1, -1) + '"'); + } catch { + // ignored + } + } + + // fall back to doing it the hard way + let parsed = ''; + let index = { v: 1 }; + + while (index.v < source.length) { + const char = source[index.v]; + switch (char) { + case quote: { + return parsed; + } + case '\\': { + ++index.v; + parsed += scanEscapeSequence(source, index); + break; + } + case '\r': + case '\n': { + throw new SyntaxError(); + } + default: { + ++index.v; + parsed += char; + } + } + } + + throw new SyntaxError(); +} + +function scanEscapeSequence (source, index) { + if (index.v === source.length) { + throw new SyntaxError(); + } + const char = source[index.v]; + ++index.v; + switch (char) { + case '\r': { + if (source[index.v] === '\n') { + ++index.v; + } + // fall through + } + case '\n': + case '\u2028': + case '\u2029': { + return ''; + } + case 'r': { + return '\r'; + } + case 'n': { + return '\n'; + } + case 't': { + return '\t'; + } + case 'b': { + return '\b'; + } + case 'f': { + return '\f'; + } + case 'v': { + return '\v'; + } + case 'x': { + return scanHexEscapeSequence(source, index); + } + case 'u': { + return scanUnicodeEscapeSequence(source, index); + } + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': { + return scanOctalEscapeSequence(char, source, index); + } + default: { + return char; + } + } +} + +function scanHexEscapeSequence (source, index) { + const a = readHex(source[index.v]); + ++index.v; + const b = readHex(source[index.v]); + ++index.v; + return String.fromCodePoint(a * 16 + b); +} + +function scanUnicodeEscapeSequence (source, index) { + let result = 0; + if (source[index.v] === '{') { + ++index.v; + do { + result = result * 16 + readHex(source[index.v]); + if (result > 0x10FFFF) { + throw new SyntaxError(); + } + ++index.v; + } while (source[index.v] !== '}'); + ++index.v; + } else { + for (let i = 0; i < 4; ++i) { + result = result * 16 + readHex(source[index.v]); + ++index.v; + } + } + return String.fromCodePoint(result); +} + +function scanOctalEscapeSequence (char, source, index) { + let toRead = char <= '3' ? 2 : 1; + let result = +char; + do { + char = source[index.v]; + if (char < '0' || char > '7') { + break; + } + result = result * 8 + (+char); + ++index.v; + --toRead; + } while (toRead > 0); + return String.fromCodePoint(result); +} + +function readHex (char) { + if (char >= '0' && char <= '9') { + return +char; + } else if (char >= 'a' && char <= 'f') { + return char.charCodeAt(0) - 87; + } else if (char >= 'A' && char <= 'F') { + return char.charCodeAt(0) - 55; + } + throw new SyntaxError(); +} + + // --- Extracted from AcornJS --- //(https://github.com/acornjs/acorn/blob/master/acorn/src/identifier.js#L23 // diff --git a/deps/cjs-module-lexer/src/package-lock.json b/deps/cjs-module-lexer/src/package-lock.json index f80411b7d9376d..61fd2b65fdfc51 100644 --- a/deps/cjs-module-lexer/src/package-lock.json +++ b/deps/cjs-module-lexer/src/package-lock.json @@ -1,12 +1,12 @@ { "name": "cjs-module-lexer", - "version": "2.1.1", + "version": "2.2.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cjs-module-lexer", - "version": "2.1.1", + "version": "2.2.0", "license": "MIT", "devDependencies": { "@babel/cli": "^7.5.5", @@ -86,7 +86,6 @@ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.5.tgz", "integrity": "sha512-SBuTAjg91A3eKOvD+bPEz3LlhHZRNu1nFOVts9lzDJTXshHTjII0BAtDS3Y2DAkdZdDKWVZGVwkDfc4Clxn1dg==", "dev": true, - "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.22.5", @@ -555,7 +554,6 @@ "url": "https://github.com/sponsors/ai" } ], - "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001489", "electron-to-chromium": "^1.4.411", diff --git a/deps/cjs-module-lexer/src/package.json b/deps/cjs-module-lexer/src/package.json index d6c84bdd4328a0..0e1bbf829f8acd 100755 --- a/deps/cjs-module-lexer/src/package.json +++ b/deps/cjs-module-lexer/src/package.json @@ -1,6 +1,6 @@ { "name": "cjs-module-lexer", - "version": "2.1.1", + "version": "2.2.0", "description": "Lexes CommonJS modules, returning their named exports metadata", "main": "lexer.js", "exports": { @@ -12,10 +12,10 @@ }, "types": "lexer.d.ts", "scripts": { - "test-js": "mocha -b -u tdd test/*.js", - "test-wasm": "cross-env WASM=1 mocha -b -u tdd test/*.js", - "test-wasm-sync": "cross-env WASM_SYNC=1 mocha -b -u tdd test/*.js", - "test": "npm run test-wasm ; npm run test-wasm-sync ; npm run test-js", + "test-js": "cross-env NODE_OPTIONS=--disallow-code-generation-from-strings mocha -b -u tdd test/*.js", + "test-wasm": "cross-env WASM=1 NODE_OPTIONS=--disallow-code-generation-from-strings mocha -b -u tdd test/*.js", + "test-wasm-sync": "cross-env WASM_SYNC=1 NODE_OPTIONS=--disallow-code-generation-from-strings mocha -b -u tdd test/*.js", + "test": "npm run test-wasm && npm run test-wasm-sync && npm run test-js", "bench": "node --expose-gc bench/index.mjs", "build": "node build.js ; babel dist/lexer.mjs -o dist/lexer.js ; terser dist/lexer.js -o dist/lexer.js", "build-wasm": "make lib/lexer.wasm ; node build.js", diff --git a/deps/cjs-module-lexer/src/src/lexer.js b/deps/cjs-module-lexer/src/src/lexer.js index 1fc557dd1ef17a..30bca50218e07a 100755 --- a/deps/cjs-module-lexer/src/src/lexer.js +++ b/deps/cjs-module-lexer/src/src/lexer.js @@ -47,7 +47,7 @@ export function parse (source, name = '@') { function decode (str) { if (str[0] === '"' || str[0] === '\'') { try { - const decoded = (0, eval)(str); + const decoded = scanStringLiteral(str); // Filter to exclude non-matching UTF-16 surrogate strings for (let i = 0; i < decoded.length; i++) { const surrogatePrefix = decoded.charCodeAt(i) & 0xFC00; @@ -74,6 +74,169 @@ function decode (str) { } } + +function scanStringLiteral (source) { + const quote = source[0]; + + // try JSON.parse first for performance + if (quote === '"') { + try { + return JSON.parse(source); + } catch { + // ignored + } + } else if (quote === "'" && source.length > 1 && source[source.length - 1] === "'" && source.indexOf('"') === -1) { + try { + return JSON.parse('"' + source.slice(1, -1) + '"'); + } catch { + // ignored + } + } + + // fall back to doing it the hard way + let parsed = ''; + let index = { v: 1 }; + + while (index.v < source.length) { + const char = source[index.v]; + switch (char) { + case quote: { + return parsed; + } + case '\\': { + ++index.v; + parsed += scanEscapeSequence(source, index); + break; + } + case '\r': + case '\n': { + throw new SyntaxError(); + } + default: { + ++index.v; + parsed += char; + } + } + } + + throw new SyntaxError(); +} + +function scanEscapeSequence (source, index) { + if (index.v === source.length) { + throw new SyntaxError(); + } + const char = source[index.v]; + ++index.v; + switch (char) { + case '\r': { + if (source[index.v] === '\n') { + ++index.v; + } + // fall through + } + case '\n': + case '\u2028': + case '\u2029': { + return ''; + } + case 'r': { + return '\r'; + } + case 'n': { + return '\n'; + } + case 't': { + return '\t'; + } + case 'b': { + return '\b'; + } + case 'f': { + return '\f'; + } + case 'v': { + return '\v'; + } + case 'x': { + return scanHexEscapeSequence(source, index); + } + case 'u': { + return scanUnicodeEscapeSequence(source, index); + } + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': { + return scanOctalEscapeSequence(char, source, index); + } + default: { + return char; + } + } +} + +function scanHexEscapeSequence (source, index) { + const a = readHex(source[index.v]); + ++index.v; + const b = readHex(source[index.v]); + ++index.v; + return String.fromCodePoint(a * 16 + b); +} + +function scanUnicodeEscapeSequence (source, index) { + let result = 0; + if (source[index.v] === '{') { + ++index.v; + do { + result = result * 16 + readHex(source[index.v]); + if (result > 0x10FFFF) { + throw new SyntaxError(); + } + ++index.v; + } while (source[index.v] !== '}'); + ++index.v; + } else { + for (let i = 0; i < 4; ++i) { + result = result * 16 + readHex(source[index.v]); + ++index.v; + } + } + return String.fromCodePoint(result); +} + +function scanOctalEscapeSequence (char, source, index) { + let toRead = char <= '3' ? 2 : 1; + let result = +char; + do { + char = source[index.v]; + if (char < '0' || char > '7') { + break; + } + result = result * 8 + (+char); + ++index.v; + --toRead; + } while (toRead > 0); + return String.fromCodePoint(result); +} + +function readHex (char) { + if (char >= '0' && char <= '9') { + return +char; + } else if (char >= 'a' && char <= 'f') { + return char.charCodeAt(0) - 87; + } else if (char >= 'A' && char <= 'F') { + return char.charCodeAt(0) - 55; + } + throw new SyntaxError(); +} + + + function copyBE (src, outBuf16) { const len = src.length; let i = 0; diff --git a/src/cjs_module_lexer_version.h b/src/cjs_module_lexer_version.h index 0aaa4cc5fcacdc..c734bdcc9ba184 100644 --- a/src/cjs_module_lexer_version.h +++ b/src/cjs_module_lexer_version.h @@ -2,5 +2,5 @@ // Refer to tools/dep_updaters/update-cjs-module-lexer.sh #ifndef SRC_CJS_MODULE_LEXER_VERSION_H_ #define SRC_CJS_MODULE_LEXER_VERSION_H_ -#define CJS_MODULE_LEXER_VERSION "2.1.1" +#define CJS_MODULE_LEXER_VERSION "2.2.0" #endif // SRC_CJS_MODULE_LEXER_VERSION_H_ From 5b5a98710fd78b27a93b34b1af1737f27141612f Mon Sep 17 00:00:00 2001 From: Hardanish Singh <61027578+Hardanish-Singh@users.noreply.github.com> Date: Tue, 6 Jan 2026 03:52:15 -0500 Subject: [PATCH 29/36] doc: fix typos and grammar in `BUILDING.md` & `onboarding.md` PR-URL: https://github.com/nodejs/node/pull/61267 Reviewed-By: Gireesh Punathil Reviewed-By: Antoine du Hamel Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca Reviewed-By: Rafael Gonzaga --- BUILDING.md | 8 ++++---- onboarding.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 995ff85fc8c472..5428449b453127 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -635,7 +635,7 @@ on Linux, you can try [Docker](https://www.docker.com/products/docker-desktop/) (using an image like `gengjiawen/node-build:2020-02-14`). The `--debug` is not necessary and will slow down build and testing, but it can -show clear stacktrace if ASan hits an issue. +show a clear stack trace if ASan hits an issue. ```bash ./configure --debug --enable-asan && make -j4 @@ -713,8 +713,8 @@ the number of parallel build tasks (`-j`). #### Tips -You may need disable vcpkg integration if you got link error about symbol -redefine related to zlib.lib(zlib1.dll), even you never install it by hand, +You may need to disable vcpkg integration if you encounter a link error about symbol +redefinition related to zlib.lib(zlib1.dll), even if you never installed it by hand, as vcpkg is part of CLion and Visual Studio now. ```powershell @@ -889,7 +889,7 @@ cp c:\ccache\ccache.exe c:\ccache\cl.exe ``` With newer version of Visual Studio, it may need the copy to be `clang-cl.exe` -instead. If the output of `vcbuild.bat` suggestion missing `clang-cl.exe`, copy +instead. If the output of `vcbuild.bat` suggests missing `clang-cl.exe`, copy it differently: ```powershell diff --git a/onboarding.md b/onboarding.md index 46731e5a0e831b..7d447163885adf 100644 --- a/onboarding.md +++ b/onboarding.md @@ -286,7 +286,7 @@ needs to be pointed out separately during the onboarding. * If you are interested in helping to fix coverity reports consider requesting access to the projects coverity project as outlined in [static-analysis][]. * If you are interested in helping out with CI reliability, check out the - [reliability respository][] and [guide on how to deal with CI flakes][]. + [reliability repository][] and [guide on how to deal with CI flakes][]. [Code of Conduct]: https://github.com/nodejs/admin/blob/HEAD/CODE_OF_CONDUCT.md [Labels]: doc/contributing/collaborator-guide.md#labels @@ -299,7 +299,7 @@ needs to be pointed out separately during the onboarding. [`node-test-pull-request`]: https://ci.nodejs.org/job/node-test-pull-request/ [guide on how to deal with CI flakes]: https://github.com/nodejs/test?tab=readme-ov-file#protocols-in-improving-ci-reliability [participants' expenses]: https://github.com/openjs-foundation/cross-project-council/blob/main/community-fund/COMMUNITY_FUND_POLICY.md#community-fund-rules -[reliability respository]: https://github.com/nodejs/reliability +[reliability repository]: https://github.com/nodejs/reliability [set up the credentials]: https://github.com/nodejs/node-core-utils#setting-up-github-credentials [static-analysis]: doc/contributing/static-analysis.md [two-factor authentication]: https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/ From 5fc361809c796266da3fff43233c6cf1e99a9ec2 Mon Sep 17 00:00:00 2001 From: Hardanish Singh <61027578+Hardanish-Singh@users.noreply.github.com> Date: Thu, 8 Jan 2026 12:55:01 -0500 Subject: [PATCH 30/36] doc: fix filename typo PR-URL: https://github.com/nodejs/node/pull/61297 Reviewed-By: Colin Ihrig Reviewed-By: Antoine du Hamel Reviewed-By: Luigi Pinca Reviewed-By: Rafael Gonzaga Reviewed-By: Gireesh Punathil --- ...ocial-media-acounts.md => managing-social-media-accounts.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename doc/contributing/{managing-social-media-acounts.md => managing-social-media-accounts.md} (99%) diff --git a/doc/contributing/managing-social-media-acounts.md b/doc/contributing/managing-social-media-accounts.md similarity index 99% rename from doc/contributing/managing-social-media-acounts.md rename to doc/contributing/managing-social-media-accounts.md index 3095e0ab740218..20c0adc0d8d6be 100644 --- a/doc/contributing/managing-social-media-acounts.md +++ b/doc/contributing/managing-social-media-accounts.md @@ -41,7 +41,7 @@ delegated to the Foundation Staff. No project members have access to the Facebook account. -## Linkedin +## LinkedIn Day to day management of the LinkedIn account has been delegated to the Foundation Staff. From 1eab53b6d7d748645f0bc8e647e903aed3d40a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9?= Date: Thu, 8 Jan 2026 21:34:57 +0000 Subject: [PATCH 31/36] doc: add sqlite session disposal method PR-URL: https://github.com/nodejs/node/pull/61273 Refs: https://github.com/nodejs/node/pull/58378 Reviewed-By: Colin Ihrig Reviewed-By: Luigi Pinca --- doc/api/sqlite.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/api/sqlite.md b/doc/api/sqlite.md index 2324e8633ef68d..72c8e60490dc35 100644 --- a/doc/api/sqlite.md +++ b/doc/api/sqlite.md @@ -733,11 +733,19 @@ Similar to the method above, but generates a more compact patchset. See [Changes in the documentation of SQLite. An exception is thrown if the database or the session is not open. This method is a wrapper around [`sqlite3session_patchset()`][]. -### `session.close()`. +### `session.close()` Closes the session. An exception is thrown if the database or the session is not open. This method is a wrapper around [`sqlite3session_delete()`][]. +### `session[Symbol.dispose]()` + + + +Closes the session. If the session is already closed, does nothing. + ## Class: `StatementSync` + +* {boolean} + +The `process.traceProcessWarnings` property indicates whether the `--trace-warnings` flag +is set on the current Node.js process. This property allows programmatic control over the +tracing of warnings, enabling or disabling stack traces for warnings at runtime. + +```js +// Enable trace warnings +process.traceProcessWarnings = true; + +// Emit a warning with a stack trace +process.emitWarning('Warning with stack trace'); + +// Disable trace warnings +process.traceProcessWarnings = false; +``` + ## `process.umask()`