Commit Graph
45341 Commits
Author SHA1 Message Date
Renegade334 fdff838ce3 src: add internal binding for constructing SharedArrayBuffers
PR-URL: https://github.com/nodejs/node/pull/60497
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-11-05 23:07:51 +01:00
Haram Jeong 519c537875 doc: add haramj as triager
PR-URL: https://github.com/nodejs/node/pull/60348
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
2025-11-05 23:07:51 +01:00
Gürgün Dayıoğlu 94a94a6b3a console: optimize single-string logging
PR-URL: https://github.com/nodejs/node/pull/60422
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2025-11-05 23:07:51 +01:00
dynst 62889d7e99 doc: clarify require(esm) description
PR-URL: https://github.com/nodejs/node/pull/60520
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-11-05 23:07:51 +01:00
Donghoon Nam 0b9ef68705 doc: instantiate resolver object
PR-URL: https://github.com/nodejs/node/pull/60476
Fixes: https://github.com/nodejs/node/issues/60455
Refs: https://nodejs.org/api/stream.html#readabletoarrayoptions
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-11-05 23:07:51 +01:00
Antoine du Hamel 97ed560222 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-05 23:07:51 +01:00
Antoine du Hamel eca6227e7e 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-05 23:07:50 +01:00
Anna Henningsen 4385b0b65f src: move napi_addon_register_func to node_api_types.h
This means that `node.h` can include only this file, instead of
the entirety of `node_api.h`.

Split out from https://github.com/nodejs/node/pull/60496 since
it was rightfully pointed out that the breaking part of the change
should not touch Node-API headers.

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-05 23:07:50 +01:00
Anna Henningsen de78da7887 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-05 23:07:50 +01:00
Xiao-Tao 07bcd28494 deps: V8: cherry-pick 7ef6a001762
Origin commit message:

    [loong64] Fix no pointer compression build

    1. Fix a typo that breaks no static root build.
    2. Use less scratch regs in some compare and branch functions.

    This bug is triggered by Node.js loong64 port.

    Change-Id: If251906cc07feca237c75f0b65517526085f61dd
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7031299
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Auto-Submit: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
    Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
    Cr-Commit-Position: refs/heads/main@{#103105}

Refs: https://github.com/v8/v8/commit/7ef6a00176207b26a2585b163c12f35bedc9c1cf
PR-URL: https://github.com/nodejs/node/pull/60259
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2025-11-05 23:07:48 +01:00
Gürgün Dayıoğlu 4810e4b82d buffer: speed up concat via TypedArray#set
PR-URL: https://github.com/nodejs/node/pull/60399
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-11-05 23:05:53 +01:00
Darshan Sen a38e2f5975 http2: add diagnostics channels for client stream request body
These would allow inspection of HTTP/2 client stream request bodies.

Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/60480
Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2025-11-05 23:05:53 +01:00
Joyee Cheung 313983453b test: fix flaky test-watch-mode-kill-signal-*
After the write triggers a restart of the grandchild, the newly
spawned second grandchild can post another 'script ready' message
before the stdout from the first grandchild is relayed by the
watcher and processed by this parent process to kill
the watcher. If we write again and trigger another restart, we can
end up in an infinite loop and never receive the stdout of the
grandchildren in time.
Only write once to verify the first grandchild process receives
the expected signal. We don't care about the subsequent grandchild
processes.

PR-URL: https://github.com/nodejs/node/pull/60443
Refs: https://github.com/nodejs/node/issues/60297
Refs: https://github.com/nodejs/node/pull/60391
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2025-11-05 23:05:53 +01:00
Michaël Zasso 44ca97b404 tools: fix update-icu script
Closes: https://github.com/nodejs/node/issues/60506
PR-URL: https://github.com/nodejs/node/pull/60521
Fixes: https://github.com/nodejs/node/issues/60506
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-11-05 23:05:53 +01:00
Antoine du Hamel 07b0b5a5ba tools: fix linter for semver-major release proposals
PR-URL: https://github.com/nodejs/node/pull/60481
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2025-11-05 23:05:53 +01:00
Joyee Cheung 3bcf86d56d esm: use sync loading/resolving on non-loader-hook thread
ESM resolution and loading is now always synchronous from a
non-loader-hook thread. If no asynchrnous loader hooks are
registered, the resolution/loading is entirely synchronous.
If asynchronous loader hooks are registered, these would be
synchronous on the non-loader-hook thread, and asynchronous
on the loader hook thread.

This avoids several races caused by async/sync loading sharing
the same cache. In particular, asynchronous loader hooks
now works with `require(esm)` - previously it tends to break
due to races.

In addition, when an asynchronous loader hook
returns a promise that never settles, the main thread no longer
silently exits with exit code 13, leaving the code below
any module loading calls silently ignored without being executed.
Instead, it now throws ERR_ASYNC_LOADER_REQUEST_NEVER_SETTLED
which can be caught and handled by the main thread. If the module
request comes from `import()`, the never-settling promise is
now relayed to the result returned by `import()`.

Drive-by: when annotating the error about importing undetectable
named exports from CommonJS, it now no longer reload the source
code of the CommonJS module, and instead reuses format information
cached when the module was loaded for linking.

PR-URL: https://github.com/nodejs/node/pull/60380
Fixes: https://github.com/nodejs/node/issues/59666
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2025-11-05 23:05:53 +01:00
Joyee Cheung cd5c1ad29f doc: correct module loading descriptions
The existing description is outdated, and exposes too many details
that are subject to change.

- There is no point conceptualizing "two module loaders", in reality
  the boundary is blurred since the two invoke each other to support
  require(esm) and import(cjs). The distinction lies not in
  what kind of module is being requested/which loader is used, but
  only in how the the module request is initiated (via `require()`
  or `import()`). The inner working of the loaders are subject
  to change and not suitable to be documented.
- It should not mention monkey patching in the documentation, as
  publicly supported universal hooks are already provided through
  `module.registerHooks()`, and so there's no need to single out
  any of them in terms of loader hooks support either.
- Remove the description about whether they are asynchronous or
  synchronous, which is also implementation detail subject to change.
- Add missing descriptions about how .ts, .mts and .cts are treated,
  and `.node` is also supported in import now.
- There is no need to specially mention .node treatment in cli.md,
  link to the explanations about loading from `import` in packages.md
  instead.

PR-URL: https://github.com/nodejs/node/pull/60346
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2025-11-05 23:05:52 +01:00
René 4fbb1ab101 lib: throw from localStorage getter on missing storage path
PR-URL: https://github.com/nodejs/node/pull/60351
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
2025-11-05 23:05:52 +01:00
Joyee Cheung 74719dad7a doc: clarify Linux runtime requirements for >=25
Due to the switch to Clang on Linux for building the official
releases, the binaries now require libatomic to run.

PR-URL: https://github.com/nodejs/node/pull/60484
Refs: https://github.com/nodejs/node/issues/37219
Refs: https://github.com/nodejs/build/issues/4091
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Stewart X Addison <sxa@redhat.com>
2025-11-05 23:05:52 +01:00
Joyee Cheung ccc26377b5 test: capture stack trace in debugger timeout errors
Otherwise when the expected prompt does not show up in the
session and the debugger tests time out, there is not enough
information to figure out exactly which line in the test
is causing the timeout.

PR-URL: https://github.com/nodejs/node/pull/60457
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2025-11-05 23:05:52 +01:00
Ge Gao 6877139a2d util: fix stylize of special properties in inspect
Previously, formatExtraProperties applied ctx.stylize to the entire
'[key]: value' string. This caused the colon and space to be styled,
making the output inconsistent with normal object properties.

Now, only the key itself is stylized, and the colon and space remain
unstyled, aligning with the formatting of regular properties.

Refs: https://github.com/nodejs/node/pull/60131
PR-URL: https://github.com/nodejs/node/pull/60479
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-11-05 23:05:52 +01:00
Edy Silva edc3033905 sqlite,doc: fix StatementSync section
PR-URL: https://github.com/nodejs/node/pull/60474
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-11-05 23:05:52 +01:00
Antoine du Hamel 97d74224c3 tools: fix failing release-proposal linter for LTS transitions
PR-URL: https://github.com/nodejs/node/pull/60465
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-11-05 23:05:52 +01:00
btea 69b3d2c845 http: replace startsWith with strict equality
PR-URL: https://github.com/nodejs/node/pull/59394
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2025-11-05 23:05:51 +01:00
Miguel Marcondes Filho 166c72ec02 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-05 23:05:51 +01:00
Antoine du Hamel 019af5bc27 tools: skip running test-shared on deps changes
PR-URL: https://github.com/nodejs/node/pull/60433
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2025-11-05 23:05:51 +01:00
Antoine du Hamel 3ec9764151 tools: pin OpenSSL to 3.5.4 on test-shared workflow
PR-URL: https://github.com/nodejs/node/pull/60428
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-11-05 23:05:51 +01:00
Chengzhong Wu b606d46c3f src: remove unconditional NAPI_EXPERIMENTAL in node.h
PR-URL: https://github.com/nodejs/node/pull/60345
Fixes: https://github.com/nodejs/node/issues/60311
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
2025-11-05 23:05:51 +01:00
Robert Nagy 39dfcbad6e stream: don't try to read more if reading
Avoid unnecessary nextTick.

PR-URL: https://github.com/nodejs/node/pull/60454
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2025-11-05 23:05:51 +01:00
Anna Henningsen 5941341889 src: clean up generic counter implementation
This addresses late review comments for the recently
landed cfbfc1b050 and aligns the new code with the
pre-existing V8 fast call counters.

Refs: https://github.com/nodejs/node/pull/60434#pullrequestreview-3386035944
PR-URL: https://github.com/nodejs/node/pull/60447
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-11-05 23:05:50 +01:00
Filip Skokan fe2d6d44d4 tools: remove undici from daily wpt.fyi job
PR-URL: https://github.com/nodejs/node/pull/60444
Refs: https://github.com/nodejs/undici/issues/4644
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-11-05 23:05:50 +01:00
Joyee Cheung ca39540785 doc: clarify --use-system-ca support status
Node.js only checks trust settings of additional certificates
from the system store.
It does not, however, support revocation/distrust of existing
certificates.

PR-URL: https://github.com/nodejs/node/pull/60340
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-11-05 23:05:50 +01:00
Antoine du Hamel 12e9213a24 test: ensure assertions are reachable in test/sequential
PR-URL: https://github.com/nodejs/node/pull/60412
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-11-05 23:05:50 +01:00
Antoine du Hamel 781a2661de test: ensure assertions are reachable in more folders
PR-URL: https://github.com/nodejs/node/pull/60411
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-11-05 23:05:50 +01:00
Antoine du Hamel d09ba98398 tools: document that nixpkgs updates should not be backported
PR-URL: https://github.com/nodejs/node/pull/60431
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-11-05 23:05:50 +01:00
Shima Ryuhei 003121c475 inspector: fix crash when receiving non json message
PR-URL: https://github.com/nodejs/node/pull/60388
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
2025-11-05 23:05:49 +01:00
Shelley Vohr fd63c27444 test,crypto: update x448 and ed448 expectation when on boringssl
PR-URL: https://github.com/nodejs/node/pull/60387
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2025-11-05 23:05:49 +01:00
Burkov Egor 7015f30e62 src: add enum handle for ToStringHelper + formatting
Fixes: https://github.com/nodejs/node/issues/56666
PR-URL: https://github.com/nodejs/node/pull/56829
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2025-11-05 23:05:01 +01:00
Aviv Keller 07fa6c9081 meta: call create-release-post.yml post release
PR-URL: https://github.com/nodejs/node/pull/60366
Refs: https://github.com/nodejs/nodejs.org/pull/8231
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2025-11-05 23:05:01 +01:00
Vladimir Morozov 6ab83cf979 node-api: use local files for instanceof test
PR-URL: https://github.com/nodejs/node/pull/60190
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-11-05 23:05:01 +01:00
Joyee Cheung 1e979e6eb7 test: split test-runner-watch-mode
The test has been flaky for years and new platforms keep popping
up. As it squeezes too many independent test cases into one file,
split them into individual files to avoid masking regressions
and help only mark the real flaky ones as flaky. This might also
help with the flakiness itself by avoiding updating a shared tmpdir
being watched by differet tests and avoiding running all these
time-consuming tests in one file, which can cause a timeout
on slow machines.

PR-URL: https://github.com/nodejs/node/pull/60391
Refs: https://github.com/nodejs/node/issues/49605
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-11-05 23:05:01 +01:00
Joyee Cheung 8c31cbb99b test: move test-runner-watch-mode helper into common
PR-URL: https://github.com/nodejs/node/pull/60391
Refs: https://github.com/nodejs/node/issues/49605
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-11-05 23:05:01 +01:00
Chengzhong Wu 3671851879 perf_hooks: move non-standard performance properties to perf_hooks
`performance.eventLoopUtilization` and `performance.timerify` are not
part of the Web API. Expose these two functions directly on the
`perf_hooks` module.

PR-URL: https://github.com/nodejs/node/pull/60370
Fixes: https://github.com/nodejs/node/issues/60368
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-11-05 23:05:00 +01:00
Antoine du Hamel 7fc99319e7 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-05 23:04:54 +01:00
Antoine du Hamel 76e0d862e8 Working on v25.1.1
PR-URL: https://github.com/nodejs/node/pull/60436
2025-10-28 20:01:50 +01:00
Antoine du Hamel 1da054d99b 2025-10-28, Version 25.1.0 (Current)
Notable changes:

http:
  * (SEMVER-MINOR) add optimizeEmptyRequests server option (Rafael Gonzaga) https://github.com/nodejs/node/pull/59778
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

PR-URL: https://github.com/nodejs/node/pull/60436
v25.1.0
2025-10-28 01:23:31 +01:00
Joyee Cheung dc93d6988a src: fix timing of snapshot serialize callback
Previously the addAfterUserSerailizeCallback() wasn't
ready to be used for building the built-in snapshot.
This patch initializes the callbacks at the time
lib/internal/v8/start_snapshot.js is loaded, so that
these callbacks get run correctly when building the
built-in snapshot.

Currently when building the built-in snapshot,
addAfterUserSerializeCallback() is only used by createUnsafeBuffer(),
other usages can only come from user-land snapshots,
which is covered by tests, but what gets run by the
built-in snapshot building process is less visible, and the
path used by createUnsafeBuffer() isn't reliably visible in user
land either. This adds an internal usage counter in debug builds
to verify this path when building the built-in snapshot.

PR-URL: https://github.com/nodejs/node/pull/60434
Fixes: https://github.com/nodejs/node/issues/60423
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2025-10-28 01:20:14 +01:00
Joyee Cheung 267e1b3817 src: add COUNT_GENERIC_USAGE utility for tests
PR-URL: https://github.com/nodejs/node/pull/60434
Fixes: https://github.com/nodejs/node/issues/60423
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2025-10-28 01:20:14 +01:00
SeokHun 0ecbb806a8 lib: fix typo in createBlobReaderStream
Corrects the misspelling of "proecss" to "process".

PR-URL: https://github.com/nodejs/node/pull/60132
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-10-27 15:20:08 +01:00
Node.js GitHub Bot fe91c0f755 deps: update simdjson to 4.0.7
PR-URL: https://github.com/nodejs/node/pull/59883
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-10-27 15:20:07 +01:00