Commit Graph

12099 Commits

Author SHA1 Message Date
mag123c
37d9cfcd3a esm: improve error messages for ambiguous module syntax
PR-URL: https://github.com/nodejs/node/pull/60376
Fixes: https://github.com/nodejs/node/issues/60322
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-12-05 23:51:23 +00:00
Livia Medeiros
e77694631f http2,zlib: prefer call() over apply() if argument list is not array
PR-URL: https://github.com/nodejs/node/pull/60834
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-12-04 14:36:16 +00:00
Mert Can Altin
f65b0bc81a src: implement Windows-1252 encoding support and update related tests
PR-URL: https://github.com/nodejs/node/pull/60893
Fixes: https://github.com/nodejs/node/issues/60888
Fixes: https://github.com/nodejs/node/issues/59515
Fixes: https://github.com/nodejs/node/issues/56542
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-12-04 14:23:01 +00:00
Jan Olaf Martin
e8c9c43336 module: allow subpath imports that start with #/
It's a common ecosystem pattern to map a source root directory to
`@/` but it requires special tooling support. This turns `#/*` into
a more realistic alternative for that pattern.

PR-URL: https://github.com/nodejs/node/pull/60864
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
2025-12-04 02:27:04 +00:00
René
ecdf6a8c53 stream: fix isErrored/isWritable for WritableStreams
PR-URL: https://github.com/nodejs/node/pull/60905
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2025-12-03 13:08:34 +00:00
Filip Skokan
94cd600542 crypto: fix DOMException name for non-extractable key error
PR-URL: https://github.com/nodejs/node/pull/60830
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-11-30 21:45:27 +00:00
Michaël Zasso
10837e33b0 lib,test: fix jsdoc comments
To prepare for eslint-plugin-jsdoc update.

Refs: https://github.com/nodejs/node/pull/60535
PR-URL: https://github.com/nodejs/node/pull/60870
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-11-30 19:14:12 +01:00
Yves M.
ca5956cb7a util: safely inspect getter errors whose message throws
PR-URL: https://github.com/nodejs/node/pull/60684
Fixes: https://github.com/nodejs/node/issues/60683
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-11-27 11:06:24 +00:00
Antoine du Hamel
0392f0caea lib: add lint rules for reflective function calls
PR-URL: https://github.com/nodejs/node/pull/60825
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
2025-11-27 10:24:09 +01:00
René
9c2500295e events: repurpose events.listenerCount() to accept EventTargets
PR-URL: https://github.com/nodejs/node/pull/60214
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2025-11-26 11:09:07 +00:00
Aliaksandr
d255fc7bae test_runner: fix line feed escaping in JUnit
Replaces line feed characters with the correct character reference in
XML attribute values.

PR-URL: https://github.com/nodejs/node/pull/60274
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-11-23 18:39:24 +00:00
Gürgün Dayıoğlu
7fe8085727 url: remove array.reduce usage
PR-URL: https://github.com/nodejs/node/pull/60748
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2025-11-23 17:13:58 +00:00
Livia Medeiros
46dc5d7c9f lib: prefer call() over apply() if argument list is not array
PR-URL: https://github.com/nodejs/node/pull/60796
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-11-23 08:45:46 +00:00
René
fb6b83c9ef tools: lint Temporal global
PR-URL: https://github.com/nodejs/node/pull/60793
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-11-22 12:56:28 +01:00
Sebastian Beltran
93c25815ee http: move writeHeader to end-of-life
PR-URL: https://github.com/nodejs/node/pull/60635
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2025-11-21 19:49:23 +00:00
Đỗ Trọng Hải
d729bec976 repl: tab completion targets <class> instead of new <class>
Signed-off-by: hainenber <dotronghai96@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/60319
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2025-11-20 22:04:36 +00:00
Antoine du Hamel
5e6ac7ede6 test_runner: simplify code and make it more consistent
PR-URL: https://github.com/nodejs/node/pull/60777
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com>
2025-11-20 14:16:04 +00:00
Antoine du Hamel
3330e5caf1 doc,src,lib: clarify experimental status of Web Storage support
PR-URL: https://github.com/nodejs/node/pull/60708
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2025-11-16 15:03:06 +00:00
Hans Klunder
33b1574cbf lib: add support for readable byte streams to .toWeb()
Add support for the creation of ReadableByteStream to Readable.toWeb()
and Duplex.toWeb()
This enables the use of .getReader({ mode: "byob" }) on
e.g. socket().toWeb()

Refs: https://github.com/nodejs/node/issues/56004#issuecomment-2908265316
Refs: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API/Using_readable_byte_streams
PR-URL: https://github.com/nodejs/node/pull/58664
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Mattias Buelens <mattias@buelens.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-11-16 06:51:24 +00:00
Gürgün Dayıoğlu
2271d2dc10 lib: use FastBuffer for empty buffer allocation
PR-URL: https://github.com/nodejs/node/pull/60558
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2025-11-15 21:39:32 +01:00
Shima Ryuhei
2e944d7de1 http,https: fix double ERR_PROXY_TUNNEL emission
Fixes: https://github.com/nodejs/node/issues/60697
PR-URL: https://github.com/nodejs/node/pull/60699
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2025-11-15 09:29:08 +00:00
Nikita Skovoroda
fc32ac242b buffer: let Buffer.of use heap
PR-URL: https://github.com/nodejs/node/pull/60503
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-11-13 23:34:12 +00:00
Filip Skokan
537df2eeb3 lib: refactor JWK import PQC support check
PR-URL: https://github.com/nodejs/node/pull/60586
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2025-11-13 21:45:28 +00:00
Joyee Cheung
04a086a1f4 esm: use wasm version of cjs-module-lexer
The synchronous version has been available since 1.4.0.

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>
2025-11-12 18:34:59 +00:00
Filip Skokan
238899169f 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-12 11:53:01 +00:00
Joyee Cheung
12fad1bd7b src: build v8 tick processor as built-in source text modules
Instead of polyfilling it with vm.SourceTextModule,
use a built-in source text module loader so that we can
also build the code cache for it at build tiem to
embed the code cache for them in the binary.

Drive-by: instead of inferring how to compile a particular
built-in at run time, do the inferring at build time,
so the function-based built-ins can be compiled using
parameters quickly looked up from a static map, and
the builtins that should be compiled as source text
modules are known internally based on extension in
the source code (at run time, the extensions are all
removed).

PR-URL: https://github.com/nodejs/node/pull/60518
Reviewed-By: Aditi Singh <aditisingh1400@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-11-11 02:53:13 +00:00
Joyee Cheung
1d6a62662c src: move import.meta initializer to native land
When the source text module is compiled without custom callbacks,
instead of calling into JS land from the per-isolate import.meta
initializer and then back to C++ land to set up lazy data
properties, just do the initialization all in C++ land.
Only import.meta.resolve initialization will call back
into JS land to generate a closure that call the cascaded loader
for resolution.

In addition, simplify the loader structure by merging
allowImportMetaResolve into isForAsyncLoaderHookWorker - the two
are essentially equivalent, as import.meta.resolve is only
allowed in a non-loader-hook worker thread's loader.

PR-URL: https://github.com/nodejs/node/pull/60603
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2025-11-08 16:33:34 +00:00
Marco Ippolito
4e7f9c997d 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-08 14:35:07 +00:00
Marco Ippolito
8e5c80d108 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-08 09:36:45 +00:00
Caio Lima
ed6569c753 v8: adding total_allocated_bytes to HeapStatistics
PR-URL: https://github.com/nodejs/node/pull/60573
Reviewed-By: theanarkh <theratliter@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-11-07 15:56:41 +00:00
Joyee Cheung
9495906f8b debugger: fix event listener leak in the run command
It should remove both the error and the ready event listeners
attached when either of them fires, instead of removing only
the one whose corresponding event fires, otherwise the other
event listener will always get leaked.

PR-URL: https://github.com/nodejs/node/pull/60464
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-11-07 13:28:03 +00:00
Chengzhong Wu
a78f7d9e02 inspector: inspect HTTP response body
PR-URL: https://github.com/nodejs/node/pull/60572
Refs: https://github.com/nodejs/node/issues/53946
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-11-06 22:31:30 +00:00
Ruben Bridgewater
525c4fb316 repl: fix pasting after moving the cursor to the left
Fixes: https://github.com/nodejs/node/issues/60446
PR-URL: https://github.com/nodejs/node/pull/60470
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2025-11-05 20:36:59 +00:00
Rafael Gonzaga
cfa11ba893 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-05 02:52:26 +00:00
Darshan Sen
c63e88e9a6 inspector: support inspecting HTTP/2 request and response bodies
Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/60483
Refs: https://github.com/nodejs/node/issues/53946
Reviewed-By: Ryuhei Shima <shimaryuhei@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2025-11-04 08:35:00 +00:00
Tim Perry
4346c0f7a7 http: fix handling of HTTP upgrades with bodies
Previously, we ignored all indicators of the body (content-length or
transfer-encoding headers) and treated any information following
the headers as part of the upgraded stream. We now fully process the
requests bodies separately instead, allowing us to automatically handle
correct parsing of the body like any other HTTP request.

This is a breaking change if you are currently accepting HTTP Upgrade
requests with request bodies successfully, or if you use
socket-specific fields & methods on the upgraded stream argument.

In the former case, before now you will have received the request body
and then the upgraded data on the same stream without any distinction
or HTTP parsing applied. Now, you will need to separately read the
request body from the request (the 1st argument) and the upgraded
data from the upgrade stream (the 2nd argument). If you're not
interested in request bodies, you can continue to just read from the
upgrade stream directly.

In the latter case, if you want to access the raw socket, you should do
so via request.socket, instead of expecting the 2nd argument to be a
socket.

PR-URL: https://github.com/nodejs/node/pull/60016
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-11-03 17:19:33 +00:00
Renegade334
21b0fe4b28 lib: replace global SharedArrayBuffer constructor with bound method
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-03 13:23:20 +00:00
Renegade334
48d0cd7fdc 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-03 13:23:20 +00:00
Gürgün Dayıoğlu
c2a4acb100 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-02 23:33:58 +00:00
Gürgün Dayıoğlu
24bebd01a7 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-01 22:51:55 +00:00
Darshan Sen
f46152fdb3 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-01 19:56:44 +05:30
Joyee Cheung
3e31baeda6 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-10-31 20:45:10 +00:00
René
2fb3c7eef5 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-10-31 19:48:29 +00:00
Ge Gao
fbef1cf438 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-10-31 08:33:38 +00:00
btea
bdf03bfcd5 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-10-30 14:43:31 +00:00
Robert Nagy
3dba25fbd2 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-10-30 08:55:51 +00:00
Joyee Cheung
1f6b681bf2 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 00:15:55 +00:00
Chengzhong Wu
51a57f2b36 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-10-28 00:23:50 +01:00
avcribl
4fe325d93d stream: preserve AsyncLocalStorage on finished only when needed
PR-URL: https://github.com/nodejs/node/pull/59873
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-10-27 19:23:34 +00:00
SeokHun
d9cf867a9d 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 14:14:15 +00:00