Commit Graph
45293 Commits
Author SHA1 Message Date
Joyee Cheung c702fccd76 benchmark: use typescript for import cjs benchmark
The original benchmark uses a not very realistic fixture (it has
a huge try-catch block that would throw on the first line and then
export at the end, hardly representative of real-world code).
Also, it measures the entire import including evaluation, not just
parsing. This updates the name to import-cjs to be more accurate,
and use the typescript.js as the fixture which has been reported
to be slow to import, leading users to use require() to work around
the peformance impact. It splits the measurement into two different
types: parsing CJS for the first time (where the overhead of
loading the lexer makes a difference) and parsing CJS after the
lexer has been loaded.

PR-URL: https://github.com/nodejs/node/pull/60663
Refs: https://github.com/nodejs/node/issues/59913
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-01-19 19:19:03 +01:00
Node.js GitHub Bot ee1d99131c deps: update simdjson to 4.2.1
PR-URL: https://github.com/nodejs/node/pull/60644
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-01-19 19:19:03 +01:00
Node.js GitHub Bot 0a33189050 tools: update gyp-next to 0.21.0
PR-URL: https://github.com/nodejs/node/pull/60645
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2026-01-19 19:19:03 +01:00
Levi Zim 63a2400c64 test: limit the concurrency of WPTRunner for RISC-V
For riscv64, the most commonly supported paging mode is sv39, which
allocates 256GiB of virtual address space for the user space. However,
due to trap handler security mechanism in V8, creating a wasm memory
will cost 8GiB of continuous virtual address space. In a fresh node
repl, I could only create 27 WebAssembly.Memory instances. When the
virtual address space is more fragmented, it is worse.

The wpt tests are randomly failing on riscv64 due to insufficient
virtual address space to create wasm memories. This PR fixes it by
limiting the concurrency of the WPTRunner to prevent the tests from
creating too many wasm memories.

PR-URL: https://github.com/nodejs/node/pull/60591
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-01-19 19:19:02 +01:00
Levi Zim ec40989dfb test: fix test-strace-openat-openssl for RISC-V
Recent architectures like RISC-V does not support open syscall,
which will cause strace to fail and thus test failure.

    AssertionError [ERR_ASSERTION]: strace: invalid system call 'open'

This patch disables tracing open syscall for RISC-V in the test to fix
the test failure.

PR-URL: https://github.com/nodejs/node/pull/60588
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-01-19 19:19:02 +01:00
Joyee Cheung b09129df18 test: split test-runner-run-watch.mjs
This test contains too many independent test cases and as a
result, marking it as flaky on all major platforms means
actual regressions could be covered up, and it's constantly
making the CI orange and requires extra resuming on the
flaked platforms which is still not great. Split it into
individual files so that the actual flake can be identified
out of the monolith.

PR-URL: https://github.com/nodejs/node/pull/60653
Refs: https://github.com/nodejs/node/issues/54534
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-01-19 19:19:02 +01:00
Antoine du Hamel 0f05221aec test: ensure assertions are reached on more tests
PR-URL: https://github.com/nodejs/node/pull/60641
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-01-19 19:18:57 +01:00
Marco Ippolito 2592d94e29 doc: fix v24 changelog after security release
PR-URL: https://github.com/nodejs/node/pull/61371
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2026-01-16 00:17:22 +01:00
Domagoj Stolfa 23582967b7 deps: V8: cherry-pick 1441665e0d87
Original commit message:

    [riscv] Fix the RISC-V build.

    Due to recent changes, there were missing implementations of various
    methods needed in the simulator and Maglev. Additionally, a static_cast
    is needed in the assembler to silence a warning.

    Port commit dfc894cd22d86ce42830e3bfdf485d963f6396ad
    Port commit c33af9bd408eadd6b62571f862bcb5b763c98ad9

    Change-Id: Ie37a1cfa8225fc12f367ff62139cc7cd8fa967d0
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6396542
    Reviewed-by: Victor Gomes <victorgomes@chromium.org>
    Commit-Queue: Yahan Lu (LuYahan) <yahan@iscas.ac.cn>
    Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
    Reviewed-by: Yahan Lu (LuYahan) <yahan@iscas.ac.cn>
    Cr-Commit-Position: refs/heads/main@{#99706}

Refs: https://github.com/v8/v8/commit/1441665e0d87b541932390385101840758b44924
PR-URL: https://github.com/nodejs/node/pull/60989
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
2026-01-13 14:26:49 +01:00
Lu Yahan 155eaedff2 deps: V8: cherry-pick 394a8053b59e
Original commit message:

    [riscv] Check trampoline before Constant pool in Release mode

    Change-Id: I9645cded9328dabb2c11c7859b998c838b95f97b
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6653368
    Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
    Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
    Cr-Commit-Position: refs/heads/main@{#100935}

Refs: https://github.com/v8/v8/commit/394a8053b59e719f9347a9695062acafe6007def
PR-URL: https://github.com/nodejs/node/pull/60962
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Stewart X Addison <sxa@redhat.com>
2026-01-13 14:26:48 +01:00
Lu Yahanandkxxt c95a4a0f43 deps: V8: backport bbaae8e36164
Original commit message:

    Reland "[riscv] Fix Check failed in bind_to"

    This is a reland of commit fdb5de2c741658e94944f2ec1218530e98601c23

    Original change's description:
    > [riscv] Fix Check failed in bind_to
    >
    > The trampoline should be emitted before the constant pool.
    >
    > Bug: 420232092
    >
    > Change-Id: I3a909b122607e37aca9d8765f28810ec74d5dc0b
    > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6578135
    > Auto-Submit: Yahan Lu (LuYahan) <yahan@iscas.ac.cn>
    > Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
    > Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
    > Cr-Commit-Position: refs/heads/main@{#100480}

    Bug: 420232092
    Change-Id: I1fac1ed8c349383ef4510abea338b3d695ed57ab
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6595668
    Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
    Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
    Cr-Commit-Position: refs/heads/main@{#100745}

Refs: https://github.com/v8/v8/commit/bbaae8e36164b02b678966c7612bf3d23644b22c
Co-authored-by: kxxt <rsworktech@outlook.com>
PR-URL: https://github.com/nodejs/node/pull/60962
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Stewart X Addison <sxa@redhat.com>
2026-01-13 14:26:48 +01:00
Marco Ippolito 0f19304809 Working on v24.13.1
PR-URL: https://github.com/nodejs-private/node-private/pull/800
2026-01-13 14:24:10 +01:00
Marco Ippolito def0bdf8ab 2026-01-13, Version 24.13.0 'Krypton' (LTS)
This is a security release.

Notable changes:

lib:
  * (CVE-2025-59465) add TLSSocket default error handler (RafaelGSS) <https://github.com/nodejs-private/node-private/pull/797>
  * (CVE-2025-55132) disable futimes when permission model is enabled (RafaelGSS) <https://github.com/nodejs-private/node-private/pull/748>
lib,permission:
  * (CVE-2025-55130) require full read and write to symlink APIs (RafaelGSS) <https://github.com/nodejs-private/node-private/pull/760>
src:
  * (CVE-2025-59466) rethrow stack overflow exceptions in async\_hooks (Matteo Collina) <https://github.com/nodejs-private/node-private/pull/773>
src,lib:
  * (CVE-2025-55131) refactor unsafe buffer creation to remove zero-fill toggle (Сковорода Никита Андреевич) <https://github.com/nodejs-private/node-private/pull/759>
tls:
  * (CVE-2026-21637) route callback exceptions through error handlers (Matteo Collina) <https://github.com/nodejs-private/node-private/pull/796>

PR-URL: https://github.com/nodejs-private/node-private/pull/800
v24.13.0
2026-01-09 18:29:17 -03:00
Сковорода Никита АндреевичandRafael Gonzaga 20075692fe src,lib: refactor unsafe buffer creation to remove zero-fill toggle
This removes the zero-fill toggle mechanism that allowed JavaScript
to control ArrayBuffer initialization via shared memory. Instead,
unsafe buffer creation now uses a dedicated C++ API.

Refs: https://hackerone.com/reports/3405778
Co-Authored-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/759
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
CVE-ID: CVE-2025-55131
2026-01-09 18:24:30 -03:00
Node.js GitHub Bot 2092785d01 deps: update c-ares to v1.34.6
PR-URL: https://github.com/nodejs/node/pull/60997
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2026-01-09 18:23:25 -03:00
Node.js GitHub Bot 3e58b7f2af deps: update undici to 7.18.2
PR-URL: https://github.com/nodejs/node/pull/61283
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
2026-01-09 18:23:25 -03:00
RafaelGSS 4ba536a5a6 lib: add TLSSocket default error handler
This prevents the server from crashing due to an unhandled rejection
when a TLSSocket connection is abruptly destroyed during initialization
and the user has not attached an error handler to the socket.
e.g:

```js
const server = http2.createSecureServer({ ... })
server.on('secureConnection', socket => {
  socket.on('error', err => {
    console.log(err)
  })
})
```

PR-URL: https://github.com/nodejs-private/node-private/pull/797
Fixes: https://github.com/nodejs/node/issues/44751
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=3262404
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
CVE-ID: CVE-2025-59465
2026-01-09 18:23:25 -03:00
Matteo Collina 20591b0618 tls: route callback exceptions through error handlers
Wrap pskCallback and ALPNCallback invocations in try-catch blocks
to route exceptions through owner.destroy() instead of letting them
become uncaught exceptions. This prevents remote attackers from
crashing TLS servers or causing resource exhaustion.

Fixes: https://hackerone.com/reports/3473882
PR-URL: https://github.com/nodejs-private/node-private/pull/796
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
CVE-ID: CVE-2026-21637
2026-01-09 18:23:25 -03:00
Matteo Collina ac030753c4 src: rethrow stack overflow exceptions in async_hooks
When a stack overflow exception occurs during async_hooks callbacks
(which use TryCatchScope::kFatal), detect the specific "Maximum call
stack size exceeded" RangeError and re-throw it instead of immediately
calling FatalException. This allows user code to catch the exception
with try-catch blocks instead of requiring uncaughtException handlers.

The implementation adds IsStackOverflowError() helper to detect stack
overflow RangeErrors and re-throws them in TryCatchScope destructor
instead of calling FatalException.

This fixes the issue where async_hooks would cause stack overflow
exceptions to exit with code 7 (kExceptionInFatalExceptionHandler)
instead of being catchable.

Fixes: https://github.com/nodejs/node/issues/37989
Ref: https://hackerone.com/reports/3456295
PR-URL: https://github.com/nodejs-private/node-private/pull/773
Refs: https://hackerone.com/reports/3456295
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
CVE-ID: CVE-2025-59466
2026-01-09 18:23:25 -03:00
RafaelGSS 7302b4dae1 lib,permission: require full read and write to symlink APIs
Refs: https://hackerone.com/reports/3417819
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/760
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
CVE-ID: CVE-2025-55130
2026-01-09 18:23:24 -03:00
RafaelGSS 89adaa21fd lib: disable futimes when permission model is enabled
Refs: https://hackerone.com/reports/3390084
PR-URL: https://github.com/nodejs-private/node-private/pull/748
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
CVE-ID: CVE-2025-55132
2026-01-07 08:59:43 +01:00
Michaël Zasso 2ac18ce50f Working on v24.12.1
PR-URL: https://github.com/nodejs/node/pull/61001
2025-12-10 17:31:09 +01:00
Node.js GitHub Bot 70f6b58ac6 2025-12-10, Version 24.12.0 'Krypton' (LTS)
Notable changes:

http:
  * (SEMVER-MINOR) add optimizeEmptyRequests server option (Rafael Gonzaga) https://github.com/nodejs/node/pull/59778
lib:
  * (SEMVER-MINOR) add options to util.deprecate (Rafael Gonzaga) https://github.com/nodejs/node/pull/59982
module:
  * (SEMVER-MINOR) mark type stripping as stable (Marco Ippolito) https://github.com/nodejs/node/pull/60600
node-api:
  * (SEMVER-MINOR) add napi_create_object_with_properties (Miguel Marcondes Filho) https://github.com/nodejs/node/pull/59953
sqlite:
  * (SEMVER-MINOR) allow setting defensive flag (Bart Louwers) https://github.com/nodejs/node/pull/60217
src:
  * (SEMVER-MINOR) add watch config namespace (Marco Ippolito) https://github.com/nodejs/node/pull/60178
  * (SEMVER-MINOR) add an option to make compile cache portable (Aditi) https://github.com/nodejs/node/pull/58797
src,permission:
  * (SEMVER-MINOR) add --allow-inspector ability (Rafael Gonzaga) https://github.com/nodejs/node/pull/59711
v8:
  * (SEMVER-MINOR) add cpu profile (theanarkh) https://github.com/nodejs/node/pull/59807

PR-URL: https://github.com/nodejs/node/pull/61001
v24.12.0
2025-12-09 14:35:14 +01:00
pthier c361a628b4 deps: V8: cherry-pick 72b0e27bd936
Original commit message:

    [regexp] Fix modifiers for ChoiceNodes

    Each alternative might modify flags when their sub-graph is emitted.
    We need to restore flags to the value at the beginning of a ChoiceNode
    for each alternative.

    Drive-by: Move regexp-modifiers test out of harmony/

    Fixed: 447583670
    Change-Id: I9f41e51f34df7659461da0a4fcd28b7e157f52e1
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6995181
    Reviewed-by: Jakob Linke <jgruber@chromium.org>
    Commit-Queue: Patrick Thier <pthier@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#102838}

Refs: https://github.com/v8/v8/commit/72b0e27bd936432d4998e4d1762e7a8fe6d347f5
Fixes: https://github.com/nodejs/node/issues/60030
PR-URL: https://github.com/nodejs/node/pull/60732
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-12-07 19:42:41 +01:00
Erik Corry c70f4588dd deps: V8: cherry-pick 6bb32bd2c194
Original commit message:

    [regexp] Clean up state for fixed length loop.

    Also reduces the on-stack Trace size by one word,
    adds some comments, renames some variables for
    more clarity.

    Change-Id: I9ec105cd9cebbaba65e9801c47dd0574cc81f967
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6512896
    Reviewed-by: Patrick Thier <pthier@chromium.org>
    Commit-Queue: Erik Corry <erikcorry@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#100117}

Refs: https://github.com/v8/v8/commit/6bb32bd2c194f67778188014d3cf8b8be9467b27
PR-URL: https://github.com/nodejs/node/pull/60732
Fixes: https://github.com/nodejs/node/issues/60030
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-12-07 19:42:38 +01:00
Erik Corry 881fe784c5 deps: V8: cherry-pick 0dd2318b5237
Original commit message:

    [regexp] Remove DeferredAction class.

    We can just chain up the traces and use the regular
    ActionNodes that we already have to represent the
    deferred actions.  Also simplifies the ActionNodes
    a little.  No functional change intended.

    Reduce the size of the Trace from 128->120 bytes.

    This is a stack allocated struct so to avoid stack
    overflows after adding the next_ field I am reducing
    it back down to 120 bytes by rearranging and shrinking
    fields.

    Change-Id: I6dca9946e035e9b22798e160b8fadaeca61f4955
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6512931
    Reviewed-by: Patrick Thier <pthier@chromium.org>
    Commit-Queue: Erik Corry <erikcorry@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#100092}

Refs: https://github.com/v8/v8/commit/0dd2318b52379894e2d1754303e4a3bc3f660cb8
PR-URL: https://github.com/nodejs/node/pull/60732
Fixes: https://github.com/nodejs/node/issues/60030
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-12-07 19:42:34 +01:00
Erik Corry 457c33efcc deps: V8: cherry-pick df20105ccf36
Original commit message:

    [regexp] Rename "greedy loops" to "fixed length".

    Some greedy quantifiers are code-generated in a more efficient
    way, but far from all greedy quantifiers are generated
    in this way.  This change renames the specially optimized loops
    from "greedy loops" to "fixed length loops", which should be
    clearer.

    Going forward, we can probably reuse much of the code for
    fixed length loops when code-generating simple possessive
    quantifiers.

    Change-Id: I13b9d14beac430e2d05d0feaf887fc0566bc4103
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6508846
    Reviewed-by: Patrick Thier <pthier@chromium.org>
    Commit-Queue: Erik Corry <erikcorry@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#100062}

Refs: https://github.com/v8/v8/commit/df20105ccf366215e7a10d8e161f257fc860a8c3
PR-URL: https://github.com/nodejs/node/pull/60732
Fixes: https://github.com/nodejs/node/issues/60030
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-12-07 19:42:31 +01:00
Darshan Sen 0bf45a829c deps: V8: backport e5dbbbadcbff
Original commit message:

    Enable --perf-prof flag on MacOS

    MacOS actually can share the implementation of {PerfJitLogger} with
    Linux. From the issue 40112126, only Fuzzer tests on Windows ran
    into UNREACHABLE/FATAL because of the unimplemented {PerfJitLogger}.
    This CL enables the flag --perf-prof on MacOS.

    Bug: 403765219
    Change-Id: I97871fbcc0cb9890c51ca14fd7a6e65bd0e3c0d2
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6385655
    Reviewed-by: Clemens Backes <clemensb@chromium.org>
    Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
    Auto-Submit: 杨文明 <yangwenming@bytedance.com>
    Commit-Queue: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#99885}

Refs: v8/v8@e5dbbba
Co-authored-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/60524
Refs: https://github.com/v8/v8/commit/e5dbbba
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2025-12-06 17:01:16 +01:00
Juan José Arboleda 4993bdc476 deps: V8: cherry-pick 5ba9200cd046
Original commit message:

    [debug] Fix crash when pausing in for-of loop header

    Given a for-of loop:

      for (const each of subject) {

    The bytecode generator emits the iterator.next call + done check +
    assigning to `each` all into the source position of `const each`.

    The pseudo-desugared code looks something like:

      var tmp;
      loop {
        var result = iterator.next();
        if (result.done) break;
        tmp = result.value;

        PushBlockContext;
        const each = tmp;

        // rest of the loop.
      }

    This is a problem, as the parser starts the block scope already on
    the `const each`. If the scope requires a context we can pause on
    bytecode that has or has not pushed the block context yet, while
    the source position looks the same.

    The recent addition of per-script unique scope IDs lets us fix
    this problem in the debugger: We can check if the scope ID of
    the runtime scope matches the parser scope. If not, the context
    was not pushed yet.

    The debugger already has a `HasContext` helper. We extend it to
    also check for matching scope IDs and then use `HasContext` where
    we would read variable values off the context. If the context was
    not pushed yet, we report them as 'unavailable'.

    R=leszeks@chromium.org

    Fixed: 384413079,399002824
    Change-Id: Ia2d0008d574e7eaf6c06b640053df696014d37f8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6507402
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Simon Zünd <szuend@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#100029}

Refs: https://github.com/v8/v8/commit/5ba9200cd04602c486ff5a5fc4f9e0d4ab19606b
Fixes: https://github.com/nodejs/node/issues/60580
PR-URL: https://github.com/nodejs/node/pull/60620
Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2025-12-06 15:05:03 +01:00
Fedor Indutny d92ec21a4c src: use CP_UTF8 for wide file names on win32
`src/node_modules.cc` needs to be consistent with `src/node_file.cc` in
how it translates the utf8 strings to `std::wstring` otherwise we might
end up in situation where we can read the source code of imported
package from disk, but fail to recognize that it is an ESM (or CJS) and
cause runtime errors. This type of error is possible on Windows when the
path contains unicode characters and "Language for non-Unicode programs"
is set to "Chinese (Traditional, Taiwan)".

See: #58768
PR-URL: https://github.com/nodejs/node/pull/60575
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-12-05 17:00:31 +01:00
Rafael Gonzaga 92ea669240 src,permission: add --allow-inspector ability
Refs: https://github.com/nodejs/node/issues/48534
PR-URL: https://github.com/nodejs/node/pull/59711
Backport-PR-URL: https://github.com/nodejs/node/pull/60248
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
2025-12-05 14:28:35 +01:00
Node.js GitHub Bot 1e9abe0078 deps: update corepack to 0.34.5
PR-URL: https://github.com/nodejs/node/pull/60842
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2025-11-30 08:42:43 +01:00
Node.js GitHub Bot 3f704ed08f deps: update corepack to 0.34.4
PR-URL: https://github.com/nodejs/node/pull/60643
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2025-11-30 08:42:42 +01:00
Michaël Zasso 04e360fdb1 deps: V8: cherry-pick 06bf293610ef, 146962dda8d2 and e0fb10b5148c
Cherry-pick 06bf293610ef.
Original commit message:

    [tagged] Make FreeSpace a HeapObjectLayout

    Bug: 42202654
    Change-Id: I2c5d1a69d9bf0272b631e3fa7964026f3ccded11
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6596552
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Auto-Submit: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#100564}

Refs: https://github.com/v8/v8/commit/06bf293610ef8cae7cf1d02f285ead7383d7786f

Cherry-pick 146962dda8d2.
Original commit message:

    [heap] Store FreeSpace size in multiples of tagged words

    Since FreeSpace has to be aligned to Tagged words, we can support larger
    free spaces by storing the size in words rather than bytes.

    Bug: 417413670
    Change-Id: I19ef4921e00a5ec23d39ff4aa5b379b36fc86e0a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6596680
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Auto-Submit: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#100590}

Refs: https://github.com/v8/v8/commit/146962dda8d25d8a917a589dc8d0aa9ae973e3f2

Cherry-pick e0fb10b5148c.
Original commit message:

    [array] Increase the maximum size of FixedArrays

    Use the newly increased maximum FreeSpace size to allow a larger upper
    bound for FixedArray/FixedDoubleArray size.

    Bug: 417413670
    Change-Id: I655c98bb68dfe033ae62f2b16441c62bc4403058
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6597277
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Reviewed-by: Igor Sheludko <ishell@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#100593}

Refs: https://github.com/v8/v8/commit/e0fb10b5148ceaf3cea8e7af612c257d593ac94b
PR-URL: https://github.com/nodejs/node/pull/60713
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2025-11-25 09:34:11 +01:00
Michaël Zasso fcbd8dbbde deps: patch V8 to 13.6.233.17
Refs: https://github.com/v8/v8/compare/13.6.233.10...13.6.233.17
PR-URL: https://github.com/nodejs/node/pull/60712
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2025-11-25 09:33:16 +01:00
Filip Skokan 6cd9bdc580 crypto: ensure documented RSA-PSS saltLength default is used
PR-URL: https://github.com/nodejs/node/pull/60662
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-11-18 15:29:16 +01:00
Riddhi 5763c96e7c tools: replace invalid expression in dependabot config
PR-URL: https://github.com/nodejs/node/pull/60649
Fixes: https://github.com/nodejs/node/issues/60637
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2025-11-18 15:29:16 +01:00
Marco Ippolito 8987159234 module: mark type stripping as stable
PR-URL: https://github.com/nodejs/node/pull/60600
Refs: https://github.com/nodejs/typescript/issues/24
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2025-11-18 15:29:15 +01:00
Rafael Gonzaga ff5754077d lib: add options to util.deprecate
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/59982
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-11-18 15:29:15 +01:00
dependabot[bot] b047586a08 meta: bump actions/download-artifact from 5.0.0 to 6.0.0
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/634f93cb2916e3fdff6788551b99b062d0335ce0...018cc2cf5baa6db3ef3c5f8a56943fffe632ef53)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
PR-URL: https://github.com/nodejs/node/pull/60532
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-11-18 15:29:15 +01:00
dependabot[bot] 64192176d7 meta: bump actions/upload-artifact from 4.6.2 to 5.0.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.2 to 5.0.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/ea165f8d65b6e75b540449e92b4886f43607fa02...330a01c490aca151604b8cf639adc76d48f6c5d4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
PR-URL: https://github.com/nodejs/node/pull/60531
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-11-18 15:29:15 +01:00
Antoine du Hamel b6e21b47d7 tools: skip unaffected GHA jobs for changes in test/internet
PR-URL: https://github.com/nodejs/node/pull/60517
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-11-18 15:29:15 +01:00
Antoine du Hamel 790288a93b test: ensure assertions are reachable in test/internet
PR-URL: https://github.com/nodejs/node/pull/60513
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-11-18 15:29:11 +01:00
Anna Henningsen baef0468ed src: move Node-API version detection to where it is used
`src/js_native_api_types.h` and other files actually depend on
the moved macros being evaluated, so before this change there
was an implicit requirement that `src/js_native_api.h` would be
included separately before any include of
`src/js_native_api_types.h`, direct or transitive.

PR-URL: https://github.com/nodejs/node/pull/60512
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-11-18 14:22:12 +01:00
Miguel Marcondes Filho 92c484ebf4 node-api: add napi_create_object_with_properties
PR-URL: https://github.com/nodejs/node/pull/59953
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
2025-11-18 14:15:37 +01:00
Antoine du Hamel 999664c76d tools: do not use short hashes for deps versioning to avoid collision
PR-URL: https://github.com/nodejs/node/pull/60407
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-11-18 14:14:57 +01:00
Bart Louwers b11bc5984e sqlite: allow setting defensive flag
PR-URL: https://github.com/nodejs/node/pull/60217
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2025-11-18 14:14:30 +01:00
Marco Ippolito a2caf19f70 watch: fix interaction with multiple env files
PR-URL: https://github.com/nodejs/node/pull/60605
Fixes: https://github.com/nodejs/node/issues/60599
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-11-18 13:25:01 +01:00
Marco Ippolito e7da5b4b7d src: add watch config namespace
PR-URL: https://github.com/nodejs/node/pull/60178
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-11-18 13:24:35 +01:00
Antoine du Hamel 0a85132989 test: fix status when compiled without inspector
PR-URL: https://github.com/nodejs/node/pull/60289
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2025-11-18 13:24:26 +01:00