From a65421a679a09fd29d9cc544d8718fb69ee99098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCrg=C3=BCn=20Day=C4=B1o=C4=9Flu?= Date: Sun, 21 Dec 2025 02:12:15 +0100 Subject: [PATCH 1/5] process: preserve AsyncLocalStorage in queueMicrotask only when needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/60913 Reviewed-By: Matteo Collina Reviewed-By: Stephen Belanger Reviewed-By: Gerhard Stöbich --- lib/internal/process/task_queues.js | 20 ++++++++++++------- .../errors/async_error_nexttick_main.snapshot | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/lib/internal/process/task_queues.js b/lib/internal/process/task_queues.js index bec1fd8bd468ba..518aea930789e0 100644 --- a/lib/internal/process/task_queues.js +++ b/lib/internal/process/task_queues.js @@ -25,6 +25,7 @@ const { const { getDefaultTriggerAsyncId, + getHookArrays, newAsyncId, initHooksExist, emitInit, @@ -158,13 +159,18 @@ const defaultMicrotaskResourceOpts = { requireManualDestroy: true }; function queueMicrotask(callback) { validateFunction(callback, 'callback'); - const asyncResource = new AsyncResource( - 'Microtask', - defaultMicrotaskResourceOpts, - ); - asyncResource.callback = callback; - - enqueueMicrotask(FunctionPrototypeBind(runMicrotask, asyncResource)); + const contextFrame = AsyncContextFrame.current(); + if (contextFrame || getHookArrays()[0].length > 0) { + const asyncResource = new AsyncResource( + 'Microtask', + defaultMicrotaskResourceOpts, + ); + asyncResource.callback = callback; + enqueueMicrotask(FunctionPrototypeBind(runMicrotask, asyncResource)); + } else { + // Fast path: no AsyncLocalStorage in use + enqueueMicrotask(callback); + } } module.exports = { diff --git a/test/fixtures/errors/async_error_nexttick_main.snapshot b/test/fixtures/errors/async_error_nexttick_main.snapshot index 5c2e6e1558076c..0034454e590ab5 100644 --- a/test/fixtures/errors/async_error_nexttick_main.snapshot +++ b/test/fixtures/errors/async_error_nexttick_main.snapshot @@ -1,7 +1,7 @@ Error: test at one (*fixtures*async-error.js:4:9) at two (*fixtures*async-error.js:17:9) - at process.processTicksAndRejections (node:internal*process*task_queues:103:5) + at process.processTicksAndRejections (node:internal*process*task_queues:104:5) at async three (*fixtures*async-error.js:20:3) at async four (*fixtures*async-error.js:24:3) at async main (*async_error_nexttick_main.js:7:5) From 01ebb475a40f385ea4c241a04d0bfb599fefb64c Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sun, 21 Dec 2025 11:14:59 +0100 Subject: [PATCH 2/5] tools: use sparse-checkout in linter jobs We can reduce out usage by avoiding to download files we don't need. PR-URL: https://github.com/nodejs/node/pull/61123 Reviewed-By: Colin Ihrig Reviewed-By: Xuguang Mei Reviewed-By: Luigi Pinca --- .github/workflows/linters.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 695bd86b5d95ad..78344490800cf0 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -163,6 +163,16 @@ jobs: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: persist-credentials: false + sparse-checkout: | + /Makefile + /benchmark/ + /doc/ + /lib/ + /src/node_version.h + /tools/ + pyproject.toml + *.py + sparse-checkout-cone-mode: false - name: Set up Python ${{ env.PYTHON_VERSION }} uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 with: @@ -181,6 +191,12 @@ jobs: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: persist-credentials: false + sparse-checkout: | + /Makefile + /tools/pip/ + *.yml + *.yaml + sparse-checkout-cone-mode: false - name: Use Python ${{ env.PYTHON_VERSION }} uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 with: @@ -200,6 +216,10 @@ jobs: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: persist-credentials: false + sparse-checkout: | + /tools/lint-sh.mjs + *.sh + sparse-checkout-cone-mode: false - run: shellcheck -V - name: Lint Shell scripts run: tools/lint-sh.mjs . @@ -221,6 +241,10 @@ jobs: with: fetch-depth: 2 persist-credentials: false + sparse-checkout: | + /tools/lint-pr-url.mjs + /doc/api/ + sparse-checkout-cone-mode: false # GH Actions squashes all PR commits, HEAD^ refers to the base branch. - run: git diff HEAD^ HEAD -G"pr-url:" -- "*.md" | ./tools/lint-pr-url.mjs ${{ github.event.pull_request.html_url }} lint-readme: @@ -229,6 +253,10 @@ jobs: - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 with: persist-credentials: false + sparse-checkout: | + README.md + /tools/lint-readme-lists.mjs + sparse-checkout-cone-mode: false - name: Get team members if possible if: ${{ (github.event.pull_request && github.event.pull_request.base.ref == github.event.pull_request.base.repo.default_branch) || github.event.ref == github.event.repository.default_branch }} id: team_members From 9d27d9a39337bb26a4d05e852e7574065e0da03c Mon Sep 17 00:00:00 2001 From: "Node.js GitHub Bot" Date: Sun, 21 Dec 2025 10:41:24 +0000 Subject: [PATCH 3/5] deps: patch V8 to 14.3.127.17 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: https://github.com/v8/v8/compare/14.3.127.16...14.3.127.17 PR-URL: https://github.com/nodejs/node/pull/61058 Reviewed-By: Michaël Zasso Reviewed-By: Colin Ihrig Reviewed-By: Gürgün Dayıoğlu Reviewed-By: Rafael Gonzaga Reviewed-By: Chemi Atlow Reviewed-By: Luigi Pinca --- deps/v8/include/v8-version.h | 2 +- deps/v8/src/maglev/arm64/maglev-ir-arm64.cc | 6 ++--- .../test/mjsunit/maglev/regress-466786677.js | 22 +++++++++++++++++++ 3 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 deps/v8/test/mjsunit/maglev/regress-466786677.js diff --git a/deps/v8/include/v8-version.h b/deps/v8/include/v8-version.h index a24677d508ecfa..d094da01d71a80 100644 --- a/deps/v8/include/v8-version.h +++ b/deps/v8/include/v8-version.h @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 14 #define V8_MINOR_VERSION 3 #define V8_BUILD_NUMBER 127 -#define V8_PATCH_LEVEL 16 +#define V8_PATCH_LEVEL 17 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff --git a/deps/v8/src/maglev/arm64/maglev-ir-arm64.cc b/deps/v8/src/maglev/arm64/maglev-ir-arm64.cc index b71a0c7b314ae0..29c7ec267268a9 100644 --- a/deps/v8/src/maglev/arm64/maglev-ir-arm64.cc +++ b/deps/v8/src/maglev/arm64/maglev-ir-arm64.cc @@ -323,7 +323,7 @@ void Int32Multiply::GenerateCode(MaglevAssembler* masm, __ Smull(out, left, right); // Making sure that the 32-bit output is zero-extended. - __ Move(out.W(), out.W()); + __ Mov(out.W(), out.W()); } void Int32MultiplyOverflownBits::SetValueLocationConstraints() { @@ -468,7 +468,7 @@ void Int32MultiplyWithOverflow::GenerateCode(MaglevAssembler* masm, // Making sure that the 32-bit output is zero-extended (and moving it to the // right register if {out_alias_input} is true). - __ Move(out, res.W()); + __ Mov(out, res.W()); } void Int32DivideWithOverflow::SetValueLocationConstraints() { @@ -536,7 +536,7 @@ void Int32DivideWithOverflow::GenerateCode(MaglevAssembler* masm, __ CompareAndBranch(temp, Immediate(0), ne, __ GetDeoptLabel(this, DeoptimizeReason::kNotInt32)); - __ Move(out, res); + __ Mov(out, res); } void Int32ModulusWithOverflow::SetValueLocationConstraints() { diff --git a/deps/v8/test/mjsunit/maglev/regress-466786677.js b/deps/v8/test/mjsunit/maglev/regress-466786677.js new file mode 100644 index 00000000000000..5b58f1104c09d1 --- /dev/null +++ b/deps/v8/test/mjsunit/maglev/regress-466786677.js @@ -0,0 +1,22 @@ +// Copyright 2025 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Flags: --allow-natives-syntax + +function trigger(cond) { + let o = {}; + let mul = (cond ? 1 : 0x80000000) | 0; + print(mul); + let idx = (mul * 2) | 0; + print(idx); + o[0] = 1.1; + if (cond) o[1] = 2.2; + return o[idx]; +} + +%PrepareFunctionForOptimization(trigger); +trigger(true); +trigger(false); +%OptimizeMaglevOnNextCall(trigger); +trigger(false); From 607a741941994a5f27774a807ef36149963cb821 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Sun, 21 Dec 2025 11:45:18 +0100 Subject: [PATCH 4/5] tools: only report commit validation failure on Slack PR-URL: https://github.com/nodejs/node/pull/61124 Reviewed-By: Colin Ihrig Reviewed-By: Xuguang Mei Reviewed-By: Luigi Pinca --- .github/workflows/notify-on-push.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/notify-on-push.yml b/.github/workflows/notify-on-push.yml index e61b7652a51191..ce4180b36ba09f 100644 --- a/.github/workflows/notify-on-push.yml +++ b/.github/workflows/notify-on-push.yml @@ -36,11 +36,12 @@ jobs: with: persist-credentials: false - name: Check commit message + id: commit-check run: npx -q core-validate-commit "$COMMIT" env: COMMIT: ${{ github.event.after }} - name: Slack Notification - if: failure() + if: ${{ failure() && steps.commit-check.conclusion == 'failure' }} uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # 2.3.3 env: SLACK_COLOR: '#DE512A' From 18b068378abcb08ffb2d809d1560b8928b120aa5 Mon Sep 17 00:00:00 2001 From: MD Faizan Date: Sun, 21 Dec 2025 22:15:45 +0530 Subject: [PATCH 5/5] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a7ea15defe7152..3753f9dc4088e2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +Edited by MD Faizan # Node.js Node.js is an open-source, cross-platform JavaScript runtime environment.