Commit Graph

11707 Commits

Author SHA1 Message Date
James M Snell 647175ee0b buffer: move SlowBuffer to EOL
`SlowBuffer` has been deprecated for many years now. Let's remove it.

PR-URL: https://github.com/nodejs/node/pull/58008
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-04-27 07:40:37 -07:00
Tim Perry 4cd8e1914a http2: add raw header array support to h2Session.request()
This also notably changes error handling for request(). Previously some
invalid header values (but not all) would cause the session to be
unnecessarily destroyed automatically, e.g. passing an unparseable
header name to request(). This is no longer the case: header validation
failures will throw an error, but will not destroy the session or emit
'error' events.

PR-URL: https://github.com/nodejs/node/pull/57917
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-26 09:27:27 -07:00
0hm☘️🏳️‍⚧️ a8a86b3adb
lib: resolve the issue of not adhering to the specified buffer size
We create a `queueHandler`, and in every iteration we execute
the handlers in the `queueHandler` until we get a non-null result.

PR-URL: https://github.com/nodejs/node/pull/55896
Refs: https://github.com/nodejs/node/issues/55764
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-26 15:38:15 +00:00
Jacob Smith cf896c3b12
test_runner: support mocking json modules
PR-URL: https://github.com/nodejs/node/pull/58007
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-04-26 14:56:24 +00:00
Dario Piotrowicz b673c697a7
Revert "readline: add stricter validation for functions called after closed"
This reverts commit 8e7f32f968.

PR-URL: https://github.com/nodejs/node/pull/58024
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2025-04-25 22:45:58 +00:00
Dario Piotrowicz b665127963
watch: clarify completion/failure watch mode messages
clarify the messages that `node --watch` presents to the user
when the process terminates (either successfully or because of
some error) by clearly conveying that node is waiting for new
file changes before restarting the process

PR-URL: https://github.com/nodejs/node/pull/57926
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-04-24 14:00:24 +00:00
Antoine du Hamel 5d15cbb416
crypto: fix cross-realm `SharedArrayBuffer` validation
PR-URL: https://github.com/nodejs/node/pull/57974
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-04-24 13:28:51 +00:00
Dario Piotrowicz 8e7f32f968 readline: add stricter validation for functions called after closed
PR-URL: https://github.com/nodejs/node/pull/57680
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-04-22 19:27:58 -07:00
Felipe Forbeck 6bf7fd7f4e
crypto: fix cross-realm check of `ArrayBuffer`
This patch modifies the `isNonSharedArrayBuffer` function in the WebIDL
implementation for the SubtleCrypto API to properly handle `ArrayBuffer`
instances created in different JavaScript realms.

Before this fix, when a `TypedArray.buffer` from a different realm
(e.g., from a VM context or worker thread) was passed to
`SubtleCrypto.digest()`, it would fail with:

> TypeError: Failed to execute 'digest' on 'SubtleCrypto': 2nd argument
> is not instance of ArrayBuffer, Buffer, TypedArray, or DataView."

The fix use the `isArrayBuffer` function from `internal/util/types` to
detect cross-realm `ArrayBuffer` instances when the prototype chain
check fails.

PR-URL: https://github.com/nodejs/node/pull/57828
Refs: https://github.com/storacha/w3up/issues/1591
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-04-22 15:01:21 +02:00
Wiyeong Seo 7102ea1559
os: fix netmask format check condition in getCIDR function
Modified to check the format of the netmask instead
of just checking that each part of the netmask is even

PR-URL: https://github.com/nodejs/node/pull/57324
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-20 05:54:48 +00:00
Kushagra Pandey 609df89cd3 http2: session tracking and graceful server close
This change adds proper tracking of HTTP / 2 server sessions
to ensure they are gracefully closed when the server is
shut down.It implements:

- A new kSessions symbol for tracking active sessions
- Adding/removing sessions from a SafeSet in the server
- A closeAllSessions helper function to close active sessions
- Updates to Http2Server and Http2SecureServer close methods

Breaking Change: any client trying to create new requests
on existing connections will not be able to do so once
server close is initiated

Refs: https://datatracker.ietf.org/doc/html/rfc7540\#section-9.1
Refs: https://nodejs.org/api/http.html\#serverclosecallback

- improve HTTP/2 server shutdown to prevent race conditions

1. Fix server shutdown race condition
   - Stop listening for new connections before closing existing ones
   - Ensure server.close() properly completes in all scenarios

2. Improve HTTP/2 tests
   - Replace setTimeout with event-based flow control
   - Simplify test logic for better readability
   - Add clear state tracking for event ordering
   - Improve assertions to verify correct shutdown sequence

This eliminates a race condition where new sessions could connect
between the time existing sessions are closed and the server stops
listening, potentially preventing the server from fully shutting down.

- fix cross-platform test timing issues

Fix test-http2-server-http1-client.js failure on Ubuntu
by deferring server.close() to next event loop cycle.

The issue only affected Ubuntu where session close occurs
before error emission, causing the test to miss errors
when HTTP/1 clients connect to HTTP/2 servers.

Using setImmediate() ensures error events fire before
server close across all platforms while maintaining
recent session handling improvements.

PR-URL: https://github.com/nodejs/node/pull/57586
Fixes: https://github.com/nodejs/node/issues/57611
Refs: https://datatracker.ietf.org/doc/html/rfc7540#section-9.1
Refs: https://nodejs.org/api/http.html#serverclosecallback
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-19 10:17:12 -07:00
Livia Medeiros afd318db67
assert: support `Float16Array` in loose deep equality checks
PR-URL: https://github.com/nodejs/node/pull/57881
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-04-19 17:04:03 +00:00
Kushagra Pandey 2acc8bc6a9
http2: fix graceful session close
Fix issue where session.close() prematurely destroys the session
when response.end() was called with an empty payload while active
http2 streams still existed. This change ensures that sessions are
closed gracefully only after all http2 streams complete and clients
properly receive the GOAWAY frame as per the HTTP/2 spec.

Refs: https://nodejs.org/api/http2.html\#http2sessionclosecallback
PR-URL: https://github.com/nodejs/node/pull/57808
Fixes: https://github.com/nodejs/node/issues/57809
Refs: https://nodejs.org/api/http2.html%5C#http2sessionclosecallback
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-19 16:36:03 +00:00
Ruben Bridgewater 733e0fc2c4
assert,util: fix constructor lookup in deep equal comparison
The latest performance optimization did not take into account that
an object may have a property called constructor. This is addressed
in this PR by adding a new fast path and using fallbacks.

PR-URL: https://github.com/nodejs/node/pull/57876
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-04-19 11:10:40 +00:00
Abdirahim Musse 963b24e9a6
process: disable building execve on IBM i
The `execve` syscall does exist on IBM i but
it has caveats that make it not usable in Node.js context.

These changes disable building with `execve` like Windows does.

PR-URL: https://github.com/nodejs/node/pull/57883
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2025-04-18 11:07:51 +00:00
Gürgün Dayıoğlu 9d6626a37e
lib: fix AbortSignal.any() with timeout signals
PR-URL: https://github.com/nodejs/node/pull/57867
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-04-17 14:28:36 +00:00
Shima Ryuhei d8e9e05a27
util: fix formatting of objects with built-in Symbol.toPrimitive
Fixes: https://github.com/nodejs/node/issues/57818
PR-URL: https://github.com/nodejs/node/pull/57832
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-04-17 13:35:56 +00:00
Matteo Collina 33d8e03d9d
worker: add worker.getHeapStatistics()
Adds worker.getHeapStatistics() so that the heap usage of the worker
could be observer from the parent thread.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/57888
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2025-04-17 10:30:59 +00:00
Livia Medeiros c11c7be36e
crypto: forbid passing `Float16Array` to `getRandomValues()`
PR-URL: https://github.com/nodejs/node/pull/57880
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2025-04-17 07:26:53 +00:00
Livia Medeiros e61937b82c
util: add `types.isFloat16Array()`
PR-URL: https://github.com/nodejs/node/pull/57879
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-16 22:09:02 +00:00
Pietro Marchini cb5f671a34
test_runner: add global setup and teardown functionality
PR-URL: https://github.com/nodejs/node/pull/57438
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2025-04-16 17:51:06 +00:00
Pietro Marchini 8e4e4df91a
test_runner: recalculate run duration on watch restart
PR-URL: https://github.com/nodejs/node/pull/57786
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-04-16 15:38:50 +00:00
Giovanni Bucci af85f3f169
repl: fix multiline history editing string order
PR-URL: https://github.com/nodejs/node/pull/57874
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-04-16 15:01:38 +00:00
Gürgün Dayıoğlu 4b2b3c01b4
stream: preserve AsyncLocalStorage context in finished()
PR-URL: https://github.com/nodejs/node/pull/57865
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-16 09:27:37 +00:00
Joyee Cheung b2405e9b07 src: migrate from deprecated SnapshotCreator constructor
Previously we have been using the variant of SnapshotCreator that
only passes the external references instead of
v8::Isolate::CreateParams and it's about to be deprecated.
Switch to using the new constructor that takes a fully CreateParams
instead.

This also makes sure that the snapshot building script is using
the Node.js array buffer allocator instead of a separate default
one that was previously used by the old constructor. The zero fill
toggle in the Node.js array buffer allocator would still be ignored
during snapshot building, however, until we fixes the array buffer
allocator and let V8 own the toggle backing store instead, because
otherwise the snapshot would contain the external toggle address
and become unreproducible.

PR-URL: https://github.com/nodejs/node/pull/55337
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-14 12:11:43 -07:00
Shima Ryuhei f89baf2e2a
test_runner: match minimum file column to 'all files'
PR-URL: https://github.com/nodejs/node/pull/57848
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2025-04-14 13:40:19 +00:00
Tobias Nießen 29af9cea7f
crypto: fix misleading positional argument
The fourth positional argument of `createCipherBase` is `true` when
called from within the `Cipheriv` constructor and `false`when called
from within the `Decipheriv` constructor. This value is then passed to
the `CipherBase::New()` method, which treats it as follows:

    args[0]->IsTrue() ? kCipher : kDecipher

However, the current name of said positional argument is `decipher` and
thus indicates the exact opposite: when the argument is set to true, the
instance is *not* a `Decipheriv` object. Therefore, this commit renames
the argument to `isEncrypt`, which matches the actual semantics.

PR-URL: https://github.com/nodejs/node/pull/57843
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-13 23:22:02 +00:00
Dario Piotrowicz a42bca5fa7 readline: fix unicode line separators being ignored
PR-URL: https://github.com/nodejs/node/pull/57591
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-13 09:52:04 -07:00
Giovanni Bucci 4a4aa58fa4
repl: add support for multiline history
PR-URL: https://github.com/nodejs/node/pull/57400
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2025-04-13 11:58:01 +00:00
Livia Medeiros 86f86a25e1
util: preserve `length` of deprecated functions
PR-URL: https://github.com/nodejs/node/pull/57806
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-04-11 16:26:25 +00:00
Tobias Nießen 9bbbe60f6b
crypto: remove CipherBase::Init
As far as I can tell, the `iv` parameter can never be `undefined` (but
it can be `null`!), so this code appears to have been dead since
Node.js 22.

This change removes dead code and adds a tiny test case for passing
`undefined` as the IV.

Refs: https://github.com/nodejs/node/pull/50973
PR-URL: https://github.com/nodejs/node/pull/57787
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2025-04-09 22:13:44 +00:00
jakecastelli 67786c1270
test_runner: improve --test-timeout to be per test
Previously `--test-timeout` is set on per test execution, this is
obviously a bug as per test execution is hard to be expected, this patch
addresses the issue by setting `timeout` from per execution to per test.

This patch also fixes a minor issue that `--test-timeout` is not being
respected when running without `--test`.

PR-URL: https://github.com/nodejs/node/pull/57672
Fixes: https://github.com/nodejs/node/issues/57656
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-04-09 14:36:19 +00:00
haykam821 bc09144aa6
module: fix incorrect formatting in require(esm) cycle error message
Fixes: https://github.com/nodejs/node/issues/57451
PR-URL: https://github.com/nodejs/node/pull/57453
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-09 11:47:58 +00:00
Tobias Nießen a6cc2400a2
Revert "test: add tests for REPL custom evals"
This reverts commit 1f7cfb7a36, which was
merged into the main branch despite relevant test failures.

PR-URL: https://github.com/nodejs/node/pull/57793
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2025-04-08 20:50:22 +00:00
Gürgün Dayıoğlu 1e95107b16
lib: use Map primordial for ActiveAsyncContextFrame
PR-URL: https://github.com/nodejs/node/pull/57670
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2025-04-08 17:51:08 +00:00
Rich Trott b2ab1a2c41
fs: improve globSync performance
PR-URL: https://github.com/nodejs/node/pull/57725
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2025-04-08 00:15:02 +02:00
Dario Piotrowicz 1f7cfb7a36
test: add tests for REPL custom evals
PR-URL: https://github.com/nodejs/node/pull/57691
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-04-08 00:09:33 +02:00
James M Snell a369818b1e lib: add defaultValue and name options to AsyncLocalStorage
The upcoming `AsyncContext` specification adds a default value and name
to async storage variables. This adds the same to `AsyncLocalStorage`
to promote closer alignment with the pending spec.

```js
const als = new AsyncLocalStorage({
  name: 'foo',
  defaultValue: 123,
});

console.log(als.name);  // 'foo'
console.log(als.getStore());  // 123
```

Refs: https://github.com/tc39/proposal-async-context/blob/master/spec.html
PR-URL: https://github.com/nodejs/node/pull/57766
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-04-07 13:41:18 -07:00
Remco Haszing 7d45c346bb
doc: allow the $schema property in node.config.json
The documentation states people can use the `$schema` property, but the
JSON schema forbids this. This change allows it.

PR-URL: https://github.com/nodejs/node/pull/57560
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-06 17:19:36 +00:00
Jason Zhang 8456a12459
watch: check parent and child path properly
Co-authored-by: Jake Yuesong Li <jake.yuesong@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/57425
Fixes: https://github.com/nodejs/node/issues/57422
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2025-04-06 09:48:53 +02:00
Dario Piotrowicz 8c254658bb
module: improve `getPackageType` performance
PR-URL: https://github.com/nodejs/node/pull/57599
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2025-04-06 07:47:53 +00:00
Dario Piotrowicz d7a1565350
module: remove unnecessary `readPackage` function
PR-URL: https://github.com/nodejs/node/pull/57596
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2025-04-06 07:47:45 +00:00
Dario Piotrowicz e232b4a69a
repl: deprecate `repl.builtinModules`
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/57508
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2025-04-05 13:40:18 +00:00
Ruben Bridgewater e739559e46
assert,util: improve deep object comparison performance
This improves the performance for almost all objects when comparing
them deeply.

PR-URL: https://github.com/nodejs/node/pull/57648
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-04-05 08:53:31 +00:00
Shima Ryuhei b1402835a5
http2: skip writeHead if stream is closed
Fixes: https://github.com/nodejs/node/issues/57416
PR-URL: https://github.com/nodejs/node/pull/57686
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2025-04-04 15:07:09 +00:00
Guy Bedford 870dec25f7 esm: support top-level Wasm without package type
PR-URL: https://github.com/nodejs/node/pull/57610
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-04-03 19:38:40 -07:00
Marco Ippolito 0dc4725909
deps: update amaro to 0.5.1
PR-URL: https://github.com/nodejs/node/pull/57704
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-04-03 12:00:52 +00:00
jakecastelli 10cff7b33d
quic: fix debug log
PR-URL: https://github.com/nodejs/node/pull/57689
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2025-04-03 10:36:56 +00:00
Ruben Bridgewater 657f818532 assert,util: improve unequal number comparison performance
This improves the performance to compare unequal numbers while doing
a deep equal comparison. Comparing for NaN is faster by checking
`variable !== variable` than by using `Number.isNaN()`.

PR-URL: https://github.com/nodejs/node/pull/57619
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2025-04-02 23:45:37 +00:00
Ruben Bridgewater b9c9bf4945 assert,util: improve array comparison
Sparse arrays and arrays containing undefined are now compared faster
using assert.deepStrictEqual() or util.isDeepStrictEqual().

PR-URL: https://github.com/nodejs/node/pull/57619
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2025-04-02 23:45:36 +00:00