Commit Graph

12002 Commits

Author SHA1 Message Date
Tim Perry
65bee02cca
http: add shouldUpgradeCallback to let servers control HTTP upgrades
Previously, you could either add no 'upgrade' event handler, in which
case all upgrades were ignored, or add an 'upgrade' handler and all
upgrade attempts would effectively succeed and skip normal request
handling. This change adds a new shouldUpgradeCallback option to HTTP
servers, which receives the request details and returns a boolean that
controls whether the request should be upgraded.

PR-URL: https://github.com/nodejs/node/pull/59824
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-09-17 15:14:01 +00:00
Joyee Cheung
c46260284c
module: only put directly require-d ESM into require.cache
This reduces the impact of
https://redirect.github.com/nodejs/node/pull/59679
by delaying the require.cache population of ESM until they
are directly required. After that, it's necessary for them
to be in the cache to maintain correctness.

PR-URL: https://github.com/nodejs/node/pull/59874
Refs: https://github.com/nodejs/node/issues/59868
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2025-09-17 13:13:59 +00:00
Michael Smith
e596098e50
src: reduce the nearest parent package JSON cache size
PR-URL: https://github.com/nodejs/node/pull/59888
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2025-09-17 10:26:52 +00:00
Matteo Collina
1ebe88f87c
stream: use new AsyncResource instead of bind
The bind method uses ObjectDefineProperty that shows up
in flamegraphs. This changes it to avoid the utility.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/59867
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2025-09-16 20:24:38 +00:00
Patrick Costa
64a8b4b1ba
crypto: expose signatureAlgorithm on X509Certificate
Adds the `signatureAlgorithm` property to a X509Certificate allowing
users to retrieve a string representing the algorithm used to sign the
certificate. This string is defined by the OpenSSL library.

Fixes: https://github.com/nodejs/node/issues/59103
PR-URL: https://github.com/nodejs/node/pull/59235
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2025-09-16 19:27:04 +00:00
방진혁
c8c6bfab23
http: optimize checkIsHttpToken for short strings
Use lookup table instead of regex for strings shorter than 10
characters to improve performance for common short header names
while maintaining compatibility.

PR-URL: https://github.com/nodejs/node/pull/59832
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2025-09-14 00:40:06 +00:00
Miguel Marcondes Filho
4ed9d21880
lib: update isDeepStrictEqual to support options
PR-URL: https://github.com/nodejs/node/pull/59762
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2025-09-14 00:39:49 +00:00
Mikhail
1442023134
url: replaced slice with at
PR-URL: https://github.com/nodejs/node/pull/59181
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2025-09-14 00:39:32 +00:00
Ruben Bridgewater
60c1fbcf65
util: inspect objects with throwing Symbol.toStringTag
`util.inspect()` should handle all kinds of input, even if it is
not well defined. Throwing is something that is meant to be worked
around in all known cases. This fixes issues inspecting objects
where accessing the Symbol.toStringTag would cause an error. The
symbol is just ignored in that case.

Refs: https://github.com/nodejs/node/issues/55539
Refs: https://github.com/nodejs/node/pull/55544
PR-URL: https://github.com/nodejs/node/pull/59860
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-09-14 00:07:06 +00:00
Ruben Bridgewater
0319ba51d8
util: fix debuglog.enabled not being present with callback logger
The method returned by the callback is missing the .enabled property.
This is added in a consistent way that it also verifies that it's a
getter.

Fixes: https://github.com/nodejs/node/issues/56676
PR-URL: https://github.com/nodejs/node/pull/59858
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-09-14 00:06:57 +00:00
Ruben Bridgewater
49f79b8e93
repl: fix cpu overhead pasting big strings to the REPL
Pasting input should not trigger any completions and other
calculations. This is now handled by just writing the string to the
terminal in case the user is pasting. As soon as pasting is done,
the completions will be re-enabled.

Fixes: https://github.com/nodejs/node/issues/40626
Fixes: https://github.com/nodejs/node/issues/43343
PR-URL: https://github.com/nodejs/node/pull/59857
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-09-14 00:06:47 +00:00
Renegade334
8869210dd8 crypto: use return await when returning Promises from async functions
This offers _some_ resistance to `%Promise.prototype%` pollution.

Refs: https://github.com/nodejs/node/issues/59699
PR-URL: https://github.com/nodejs/node/pull/59841
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2025-09-12 14:21:50 +00:00
Renegade334
7a205d0ac0 crypto: use async functions for non-stub Promise-returning functions
These were intended to mimic simple async functions, but exceptions
thrown in the function body would be returned synchronously, not
wrapped in a rejected Promise.

PR-URL: https://github.com/nodejs/node/pull/59841
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2025-09-12 14:21:49 +00:00
Renegade334
33e3e423d9 crypto: avoid calls to promise.catch()
This avoids explicit calls to the user-mutable
`%Promise.prototype%.catch`, and by association, implicit calls to the
user-mutable `%Promise.prototype%.then`.

PR-URL: https://github.com/nodejs/node/pull/59841
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2025-09-12 14:21:49 +00:00
simon-id
95ab4eb6ad
url: add type checking to urlToHttpOptions()
PR-URL: https://github.com/nodejs/node/pull/59753
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
2025-09-12 12:59:26 +00:00
Aditi
94422e8a40
src: add an option to make compile cache portable
Adds an option (NODE_COMPILE_CACHE_PORTABLE) for
the built-in compile cache to encode the hashes with
relative file paths. On enabling the option,
the source directory along with cache directory can be
bundled and moved, and the cache continues to work.

When enabled, paths encoded in hash are relative to
compile cache directory.

PR-URL: https://github.com/nodejs/node/pull/58797
Fixes: https://github.com/nodejs/node/issues/58755
Refs: https://github.com/nodejs/node/issues/52696
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-09-12 11:00:39 +00:00
Rafael Gonzaga
29738c7b42
src,permission: add --allow-inspector ability
Refs: https://github.com/nodejs/node/issues/48534
PR-URL: https://github.com/nodejs/node/pull/59711
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2025-09-11 20:10:02 +00:00
Chengzhong Wu
c742220be9
lib,src: cache ModuleWrap.hasAsyncGraph
`v8::Module::IsGraphAsync()` traverses the dependencies to find if they
contain TLA each time. `ModuleWrap.hasAsyncGraph` caches the result
and exposes the property to JS land so that the presence of the property
`module.hasAsyncGraph` can be consistent.

This also allows C++ access of cached `hasAsyncGraph`.

This merges the `intantiateSync`/`instantiate` and
`getNamespaceSync`/`getNamespace` as they are always sync.

PR-URL: https://github.com/nodejs/node/pull/59703
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2025-09-11 12:54:24 +00:00
Chengzhong Wu
f1b56d6200 lib: add source map support for assert messages
Map source lines in assert messages with cached source maps.

PR-URL: https://github.com/nodejs/node/pull/59751
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-09-11 10:37:46 +00:00
Chengzhong Wu
d35bd2088e lib,src: refactor assert to load error source from memory
The source code is available from V8 API and assert can avoid reading
the source file from the filesystem and parse the file again.

PR-URL: https://github.com/nodejs/node/pull/59751
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-09-11 10:37:45 +00:00
Robert Nagy
7d0f6be9d1
http: unbreak keepAliveTimeoutBuffer
Adds a guard.

PR-URL: https://github.com/nodejs/node/pull/59784
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-09-09 19:23:09 +00:00
Haram Jeong
402a02fe2b
assert: cap input size in myersDiff to avoid Int32Array overflow
PR-URL: https://github.com/nodejs/node/pull/59578
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2025-09-09 00:36:14 +00:00
sangwook
670d7ab7f2
util: fix numericSeparator with negative fractional numbers
Fix util.inspect() formatting bug where negative fractional numbers
between -1 and 0 lost their minus sign when numericSeparator was true.
Fixed formatNumber function to preserve sign by using original string
representation. Also corrected test expectations for scientific notation
to not apply numeric separators.
Fixes: https://github.com/nodejs/node/issues/59376

PR-URL: https://github.com/nodejs/node/pull/59379
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-09-08 20:10:50 +00:00
Lee Jiho
26607a650e
path: refactor path joining logic for clarity and performance
PR-URL: https://github.com/nodejs/node/pull/59781
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-09-08 18:44:18 +00:00
Joyee Cheung
916929863d
esm: populate separate cache for require(esm) in imported CJS
Otherwise if the ESM happens to be cached separately by the ESM loader
before it gets loaded with `require(esm)` from within an imported
CJS file (which uses a re-invented require() with a couple of quirks,
including a separate cache), it won't be able to load the esm properly
from the cache.

PR-URL: https://github.com/nodejs/node/pull/59679
Refs: https://github.com/nodejs/node/issues/59666
Refs: https://github.com/nodejs/node/issues/52697
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-09-08 14:59:31 +00:00
Anna Henningsen
6cf64af44d
repl: do not cause side effects in tab completion
A number of recent changes to the REPL tab completion logic have
introduced the ability for completion to cause side effects,
specifically, calling arbitrary functions or variable
assignments/updates.

This was first introduced in 07220230d9 and the problem exacerbated in
8ba66c5e7b. Our team noticed this because our tests started failing
when attempting to update to Node.js 20.19.5.

Some recent commits, such as 1093f38c43 or 69453378fc, have
messages or PR descriptions that imply the intention to avoid side
effects, which I can can generally be agreed upon is in line with the
expectations that a user has of autocomplete functionality.
However, some of the tests introduced in those commts specifically
verify that side effects *can* happen under specific circunmstances.
I am assuming here that this is unintentional, and the corresponding
tests have been removed/replaced in this commit.

Fixes: https://github.com/nodejs/node/issues/59731
Fixes: https://github.com/nodejs/node/issues/58903
Refs: https://github.com/nodejs/node/pull/58709
Refs: https://github.com/nodejs/node/pull/58775
Refs: https://github.com/nodejs/node/pull/57909
Refs: https://github.com/nodejs/node/pull/58891
PR-URL: https://github.com/nodejs/node/pull/59774
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Dario Piotrowicz <dario.piotrowicz@gmail.com>
2025-09-08 13:54:45 +00:00
Robert Nagy
73b50220c7
http: use cached '1.1' http version string
PR-URL: https://github.com/nodejs/node/pull/59717
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2025-09-08 09:27:29 +00:00
Yoo
303677b362
Revert "lib: optimize writable stream buffer clearing"
This reverts commit 8a2fec1f6f.

PR-URL: https://github.com/nodejs/node/pull/59743
Reviewed-By: Mattias Buelens <mattias@buelens.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2025-09-08 08:11:20 +00:00
James M Snell
b4af647920 quic: reduce boilerplate and other minor cleanups
While I get that macros aren't the most loved thing in
the world, they do help reduce boilerplate, and there's
a lot of boilerplate in the QUIC code. This commit cleans
up some of that boilerplate, particularly around the
use of v8 APIs.

PR-URL: https://github.com/nodejs/node/pull/59342
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2025-09-07 19:29:02 -07:00
James M Snell
cd9fd09a27 quic: multiple fixups and updates
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/59342
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
2025-09-07 19:29:01 -07:00
btea
3135477d4a
util: remove unnecessary template strings
PR-URL: https://github.com/nodejs/node/pull/59201
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2025-09-07 21:47:02 +00:00
Filip Skokan
d6221f6f51
crypto: refactor subtle methods to use synchronous import
Refs: #59699
PR-URL: https://github.com/nodejs/node/pull/59771
Refs: https://github.com/nodejs/node/issues/59699
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-09-07 20:59:27 +00:00
Aviv Keller
e1d4d6ab49
repl: eol deprecate instantiating without new
PR-URL: https://github.com/nodejs/node/pull/59495
Refs: https://github.com/nodejs/node/pull/54869
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2025-09-07 19:08:39 +00:00
Filip Skokan
a3cd430ef8 crypto: support Ed448 and ML-DSA context parameter in node:crypto
PR-URL: https://github.com/nodejs/node/pull/59570
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-09-07 13:17:42 +00:00
Filip Skokan
0124e0e0d7 crypto: support Ed448 and ML-DSA context parameter in Web Cryptography
PR-URL: https://github.com/nodejs/node/pull/59570
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-09-07 13:17:42 +00:00
haramjeong
3837993b65 util: remove outdated TODO comment
PR-URL: https://github.com/nodejs/node/pull/59760
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-09-07 13:04:52 +00:00
haramjeong
b3cfa5b734 util: use getOptionValue('--no-deprecation') in deprecated()
PR-URL: https://github.com/nodejs/node/pull/59760
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-09-07 13:04:51 +00:00
Filip Skokan
6478dd0e28
lib: prefer TypedArrayPrototype primordials
Refs: #59699
PR-URL: https://github.com/nodejs/node/pull/59766
Refs: https://github.com/nodejs/node/issues/59699
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2025-09-07 12:34:43 +00:00
Filip Skokan
14c68e3b53
crypto: add KMAC Web Cryptography algorithms
PR-URL: https://github.com/nodejs/node/pull/59647
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-09-06 22:43:15 +00:00
Kingsword
57bc1778a3
repl: fix REPL completion under unary expressions
PR-URL: https://github.com/nodejs/node/pull/59744
Fixes: https://github.com/nodejs/node/issues/59735
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2025-09-05 17:37:04 +00:00
Ruben Bridgewater
0f58a3d0cb
util: hide duplicated stack frames when using util.inspect
Long stack traces often have duplicated stack frames from recursive
calls. These make it difficult to identify important parts of the
stack. This hides the duplicated ones and notifies the user which
lines were hidden.

PR-URL: https://github.com/nodejs/node/pull/59447
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2025-09-05 17:15:12 +00:00
Joyee Cheung
8e2b093c07
url: add err.input to ERR_INVALID_FILE_URL_PATH
Otherwise there's no information from the error about what exactly
is the invalid URL.

PR-URL: https://github.com/nodejs/node/pull/59730
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2025-09-05 17:03:16 +00:00
Ruben Bridgewater
fdef0725de
util,console: colorize regexp groups, character classes, etc
This adds a parser to parse the regular expression and to highlight
different parts of a regular expression in case colors are active.

It is a one time pass algorithm and should therefore not cause too
much overhead during parsing.

As side effect, it is now possible to create individual styles to
colorize inspected values values as a user likes. This might for
example be expanded to numbers with numeric separators, highlighting
the separators or decimal points different.

It would in theory also be possible to return a changed string.
That is however not the intention for this API as it is only
triggered in case colors are active.

PR-URL: https://github.com/nodejs/node/pull/59710
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2025-09-05 14:29:21 +00:00
Joyee Cheung
6428e2e4ca
sea: implement sea.getAssetKeys()
This adds a new API to allow the bundled script in SEA to query
the list of assets.

PR-URL: https://github.com/nodejs/node/pull/59661
Refs: https://github.com/nodejs/single-executable/discussions/112
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2025-09-04 11:58:50 +00:00
Joyee Cheung
3ffc3d73ac
esm: fix missed renaming in ModuleJob.runSync
https://redirect.github.com/nodejs/node/pull/59675 missed a case
when renaming .async to .hasAsyncGraph. This fixes that and add
a test that would previously crash with the missed rename.

PR-URL: https://github.com/nodejs/node/pull/59724
Refs: https://github.com/nodejs/node/pull/59675
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-09-04 10:01:32 +00:00
Moshe Atlow
2258f22672
test_runner: fix todo inheritance
PR-URL: https://github.com/nodejs/node/pull/59721
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-09-04 09:35:48 +00:00
theanarkh
255dd7b62c
worker: optimize cpu profile implement
PR-URL: https://github.com/nodejs/node/pull/59683
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2025-09-01 16:25:48 +00:00
Joyee Cheung
fb22c7f414
src: separate module.hasAsyncGraph and module.hasTopLevelAwait
Clarify the names - hasAsyncGraph means either the module or its
dependencies contains top-level await; hasTopLevelAwait means the
module itself contains top-level await. Theoratically the former
can be inferred from iterating over the dependencies but for the
built-in loader it's currently not fully reliable until we eliminate
async linking.

Also remove the hasTopLevelAwait method - we can simply put it
on the module wrap for source text modules right after compilation.

PR-URL: https://github.com/nodejs/node/pull/59675
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-09-01 14:59:04 +00:00
Chengzhong Wu
dddc4a5972
lib: fix DOMException subclass support
PR-URL: https://github.com/nodejs/node/pull/59680
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2025-08-31 17:20:02 +00:00
방진혁
eefe3b14bf
stream: replace manual function validation with validateFunction
Replace repetitive manual function type checking with the existing
validateFunction in multiple stream operator functions.

PR-URL: https://github.com/nodejs/node/pull/59529
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Mattias Buelens <mattias@buelens.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-08-30 14:37:15 +00:00