Commit Graph

45109 Commits

Author SHA1 Message Date
Antoine du Hamel d9cb0b3237
doc: add links to parent class for `node:zlib` classes
PR-URL: https://github.com/nodejs/node/pull/58433
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2025-05-25 09:30:41 +00:00
James M Snell 33505d1bb0 src: make a number of minor improvements to buffer
When using Buffer::New with an externally allocated buffer and
v8 sandbox enabled, defer to copy instead of wrapping the buffer.

Also, when immediately memcpy'ing into the full buffer, allocate
the buffer with kUninitialized as a slight perf optimization.

PR-URL: https://github.com/nodejs/node/pull/58377
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
2025-05-24 14:11:22 -07:00
dependabot[bot] 2ecf8fa1ec
meta: bump actions/download-artifact from 4.2.1 to 4.3.0
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.2.1 to 4.3.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](95815c38cf...d3f86a106a)

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

Signed-off-by: dependabot[bot] <support@github.com>
PR-URL: https://github.com/nodejs/node/pull/58106
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-05-24 20:45:18 +00:00
Shelley Vohr cf5cbffbbc
test: leverage process.features.openssl_is_boringssl in test
PR-URL: https://github.com/nodejs/node/pull/58421
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-05-24 13:58:11 +00:00
Joyee Cheung e9c6004a2d
test: fix test-buffer-tostring-range on allocation failure
If the test cannot allocate a buffer over 4GB, there is no point
continue testing toString() on it.

This also split the test case to a different file for clarity and
reduce interference with other cases.

PR-URL: https://github.com/nodejs/node/pull/58416
Fixes: https://github.com/nodejs/node/issues/56726
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2025-05-23 21:13:39 +00:00
Joyee Cheung 996a774eba
test: skip in test-buffer-tostring-rangeerror on allocation failure
If the buffer allocation fails due to insufficient memory, there is no
point continue testing toString().

PR-URL: https://github.com/nodejs/node/pull/58415
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-05-23 21:02:37 +00:00
Joyee Cheung 8287f6748b
test: fix missing edge case in test-blob-slice-with-large-size
The test only cares about whether a size outside the range
of the 32-bit signed integers works with Blob.prototype.slice().
If it fails due to allocation failure when the system
does not have enough memory, the test should just be skipped.
The test previously only skipped the test when the allocation
failure happens during allocation of the buffer source, but
it could also happen during Blob.prototype.slice().

PR-URL: https://github.com/nodejs/node/pull/58414
Fixes: https://github.com/nodejs/node/issues/57235
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2025-05-23 20:45:46 +00:00
René 9239373b7a
doc: remove remaining uses of `@@wellknown` syntax
PR-URL: https://github.com/nodejs/node/pull/58413
Refs: https://github.com/tc39/ecma262/pull/1314
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2025-05-23 18:31:34 +00:00
Sonny 60273710ef
benchmark: add more options to cp-sync
PR-URL: https://github.com/nodejs/node/pull/58278
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-05-23 14:07:32 +00:00
Dario Piotrowicz cd68e35704
lib: deprecate `_stream_*` modules
PR-URL: https://github.com/nodejs/node/pull/58337
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Mattias Buelens <mattias@buelens.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2025-05-23 13:48:24 +00:00
Dario Piotrowicz 1a5ab963b8
fs: improve `cpSync` dest overriding performance
move the logic in `cpSync` that overrides existing
dest files from JavaScript to C++ increasing its performance

PR-URL: https://github.com/nodejs/node/pull/58160
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-05-23 12:26:04 +00:00
Antoine du Hamel d96d57d5a7
src: fix build when using shared simdutf
PR-URL: https://github.com/nodejs/node/pull/58407
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2025-05-22 18:12:42 +00:00
theanarkh 74acfdf65f
report: use uv_getrusage_thread in report
PR-URL: https://github.com/nodejs/node/pull/58405
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2025-05-22 17:10:39 +00:00
Juan Ignacio Benito 0d3e1b3985 doc: clarify behavior of --watch-path and --watch flags
Fixes: https://github.com/nodejs/node/issues/58113
PR-URL: https://github.com/nodejs/node/pull/58136
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Co-authored-by: Tierney Cyren <accounts@bnb.im>
2025-05-22 11:58:28 -05:00
Guy Bedford f5ac35ee15 esm: add support for dynamic source phase hook
PR-URL: https://github.com/nodejs/node/pull/58147
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-05-22 07:42:28 -07:00
Allon Murienik 27edff5cb9
doc: fix the order of `process.md` sections
Fixes: https://github.com/nodejs/node/issues/58402
PR-URL: https://github.com/nodejs/node/pull/58403
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-05-22 16:19:14 +02:00
Jan Staněk cb88e99bfe
build: search for libnode.so in multiple places
As the actual location of built libnode.so may differ depending on which
system was used to orchestrate the build (ninja or make),
multiple places should be searched for it's location.

PR-URL: https://github.com/nodejs/node/pull/58213
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2025-05-22 12:16:25 +00:00
Shelley Vohr 5ffcf6bca1
test: make crypto tests work with BoringSSL
PR-URL: https://github.com/nodejs/node/pull/58117
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2025-05-22 11:26:56 +00:00
Shelley Vohr 2b425345fe
crypto: expose crypto.constants.OPENSSL_IS_BORINGSSL
PR-URL: https://github.com/nodejs/node/pull/58387
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-05-22 11:04:16 +00:00
Dario Piotrowicz 06fb007988 typings: remove no longer valid `FixedSizeBlobCopyJob` type
PR-URL: https://github.com/nodejs/node/pull/58305
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-05-22 09:48:29 +00:00
Dario Piotrowicz d824a929be typings: remove no longer valid `revokeDataObject` type
PR-URL: https://github.com/nodejs/node/pull/58305
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-05-22 09:48:29 +00:00
Tobias Nießen 53944c4462
test: test reordering of setAAD and setAuthTag
This test, so far, has been ensuring that `setAuthTag()` can be called
either before or after `update()`. This commit expands the test to
ensure that `setAuthTag()` can be called before, between, or after calls
to `setAAD()` and `update()`, and it also covers scenarios in which
`update()` is never called (e.g., in case of GMAC).

PR-URL: https://github.com/nodejs/node/pull/58396
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2025-05-21 21:36:37 +00:00
Aviv Keller 2dcbd789c1
test: switch from deprecated `optparse` to `argparse`
PR-URL: https://github.com/nodejs/node/pull/58224
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-05-21 19:25:49 +00:00
Node.js GitHub Bot 0f5fb04ae7
2025-05-21, Version 24.1.0 (Current)
Notable changes:

doc:
  * add JonasBa to collaborators (Jonas Badalic) https://github.com/nodejs/node/pull/58355
  * add puskin to collaborators (Giovanni Bucci) https://github.com/nodejs/node/pull/58308
fs:
  * (SEMVER-MINOR) add to `Dir` support for explicit resource management (Antoine du Hamel) https://github.com/nodejs/node/pull/58206
test_runner:
  * Revert "test_runner: change ts default glob (Théo LUDWIG) https://github.com/nodejs/node/pull/58202

PR-URL: https://github.com/nodejs/node/pull/58406
2025-05-21 17:20:47 +02:00
Antoine du Hamel 0bd9680a84
2025-05-21, Version 22.16.0 'Jod' (LTS)
Notable changes:

deps:
  * update timezone to 2025b (Node.js GitHub Bot) https://github.com/nodejs/node/pull/57857
doc:
  * add dario-piotrowicz to collaborators (Dario Piotrowicz) https://github.com/nodejs/node/pull/58102
  * (SEMVER-MINOR) graduate multiple experimental apis (James M Snell) https://github.com/nodejs/node/pull/57765
esm:
  * (SEMVER-MINOR) graduate import.meta properties (James M Snell) https://github.com/nodejs/node/pull/58011
  * (SEMVER-MINOR) support top-level Wasm without package type (Guy Bedford) https://github.com/nodejs/node/pull/57610
sqlite:
  * (SEMVER-MINOR) add StatementSync.prototype.columns() (Colin Ihrig) https://github.com/nodejs/node/pull/57490
src:
  * (SEMVER-MINOR) set default config as `node.config.json` (Marco Ippolito) https://github.com/nodejs/node/pull/57171
  * (SEMVER-MINOR) create `THROW_ERR_OPTIONS_BEFORE_BOOTSTRAPPING` (Marco Ippolito) https://github.com/nodejs/node/pull/57016
  * (SEMVER-MINOR) add config file support (Marco Ippolito) https://github.com/nodejs/node/pull/57016
  * (SEMVER-MINOR) add ExecutionAsyncId getter for any Context (Attila Szegedi) https://github.com/nodejs/node/pull/57820
stream:
  * (SEMVER-MINOR) preserve AsyncLocalStorage context in finished() (Gürgün Dayıoğlu) https://github.com/nodejs/node/pull/57865
util:
  * (SEMVER-MINOR) add `types.isFloat16Array()` (Livia Medeiros) https://github.com/nodejs/node/pull/57879
worker:
  * (SEMVER-MINOR) add worker.getHeapStatistics() (Matteo Collina) https://github.com/nodejs/node/pull/57888

PR-URL: https://github.com/nodejs/node/pull/58388
2025-05-21 17:20:47 +02:00
Ruben Bridgewater 7c3c91e18a
lib: remove no-mixed-operators eslint rule
The rule often makes code less readable by requiring the additional
brackets.

PR-URL: https://github.com/nodejs/node/pull/58375
Refs: https://eslint.org/docs/latest/rules/no-mixed-operators
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2025-05-21 15:03:40 +00:00
hqzing 7964eb3a3b
build: add support for OpenHarmony operating system
PR-URL: https://github.com/nodejs/node/pull/58350
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-05-21 13:18:38 +00:00
Livia Medeiros 8d603d540d
child_process: give names to `ChildProcess` functions
PR-URL: https://github.com/nodejs/node/pull/58370
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2025-05-21 12:59:25 +00:00
Ruben Bridgewater 0e72f3b715
tty: improve color terminal color detection
This adds a couple new entries or increases the support depending
on newer data.
I checked ncurses, tput, supports-color, and termstandard on
github. Most updates are from supports-color.

PR-URL: https://github.com/nodejs/node/pull/58146
Refs: https://github.com/nodejs/node/issues/57998
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-05-21 12:05:07 +00:00
Tobias Nießen 283ed5357f
test: do not skip OCB decryption in FIPS mode
I believe that OCB should work in FIPS mode, and only CCM should be
skipped here.

PR-URL: https://github.com/nodejs/node/pull/58382
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-05-21 00:38:15 +00:00
Joyee Cheung 0bbe5d34e7
test: show more information in test-http2-debug upon failure
Use spawnSyncAndAssert() so that the stderr is logged when it
doesn't match expectations.

PR-URL: https://github.com/nodejs/node/pull/58391
Refs: https://github.com/nodejs/node/issues/58353
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-05-20 19:00:50 +00:00
Joyee Cheung d2a13695bf
src: track cppgc wrappers with a list in Realm
This allows us to perform cleanups of cppgc wrappers that rely on a
living Realm during Realm shutdown. Otherwise the cleanup may happen
during object destruction, which can be triggered by GC after Realm
shutdown, leading to invalid access to Realm.

The general pattern for this type of non-trivial destruction is
designed to be:

```
class MyWrap final : CPPGC_MIXIN(MyWrap) {
    public:
    ~MyWrap() { this->Finalize(); }
    void Clean(Realm* realm) override {
        // Do cleanup that relies on a living Realm. This would be
        // called by CppgcMixin::Finalize() first during Realm
        // shutdown, while the Realm is still alive. If the destructor
        // calls Finalize() again later during garbage collection that
        // happens after Realm shutdown, Clean() would be skipped,
        // preventing invalid access to the Realm.
    }
}
```

In addition, this allows us to trace external memory held by the
wrappers in the heap snapshots if we add synthethic edges between the
wrappers and other nodes in the embdder graph callback, or to perform
snapshot serialization for them.

PR-URL: https://github.com/nodejs/node/pull/56534
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2025-05-19 20:56:33 +00:00
Chengzhong Wu b395420a99
inspector: add protocol method Network.dataReceived
PR-URL: https://github.com/nodejs/node/pull/58001
Refs: https://github.com/nodejs/node/issues/53946
Refs: https://github.com/nodejs/undici/issues/4166
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-05-19 14:57:27 +00:00
Tobias Nießen eab4ccfade
test: remove loop over single element
This loop used to iterate over two elements, but since commit
215f4d04b7, it only iterates over
a single element. Therefore, move the test out of the loop body
and remove the loop itself.

Refs: https://github.com/nodejs/node/pull/50973
PR-URL: https://github.com/nodejs/node/pull/58368
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2025-05-19 13:24:07 +00:00
Ruben Bridgewater 35180bafd7
path: improve path.resolve() performance when used as process.cwd()
`path.resolve()` and `path.resolve('.')` is frequently called as
alternative to process.cwd(). This minimized overhead for these
specific cases.

PR-URL: https://github.com/nodejs/node/pull/58362
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2025-05-19 13:23:57 +00:00
Tobias Nießen 1ef99237f5
test: add chacha20-poly1305 to auth tag order test
Add ChaCha20-Poly1305 to the algorithms for which we ensure that the
authentication tag can be set either before or after calling `update()`.

PR-URL: https://github.com/nodejs/node/pull/58367
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2025-05-19 11:21:08 +00:00
Jacopo Martinelli 38757c906d
test_runner: add level parameter to reporter.diagnostic
Added a parameter to allow severity-based formatting for
diagnostic messages. Defaults to 'info'.
This update enables better control over message presentation
(e.g., coloring) based on severity levels such as 'info', 'warn',
and 'error'.

Refs: https://github.com/nodejs/node/issues/55922
PR-URL: https://github.com/nodejs/node/pull/57923
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-05-19 08:28:05 +00:00
Darshan Sen 7c74205aa7
http2: add diagnostics channel 'http2.client.stream.close'
Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58329
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-05-19 08:12:41 +00:00
Joyee Cheung 20c4b80ffc test: skip wasm-allocation tests for pointer compression builds
V8 isolate group initialization forces allocation of the virtual
memory cage with pointer compression builds and simply would not
work when there is a smaller hard limit on the virtual memory.

PR-URL: https://github.com/nodejs/node/pull/58171
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-05-18 23:24:02 +00:00
Joyee Cheung ac8706196b build: fix pointer compression builds
- Remove usage of deprecated V8::InitializeSandbox().
- External code space and pointer compression shared cage must
  be enabled when pointer compression builds are enabled.
- We cannot enable the sandbox because that requires allocating
  the array buffer backing stores in the sandbox - we currently
  have many backing stores tied to pointers from C++ land that
  are not even necessarily dynamic (e.g. in static storage).
  Until we manage to get rid of all those, sandbox cannot be
  enabled. Note that enabling pointer compression without
  enabling sandbox is unsupported by V8, and can be broken
  at any time.

PR-URL: https://github.com/nodejs/node/pull/58171
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-05-18 23:24:01 +00:00
Anna Henningsen db2aae8022
tty: use terminal VT mode on Windows
As of 0315283cbd, the libuv `UV_TTY_MODE_RAW_VT` flag is available for
applications on Windows in order to have the terminal itself translate
keypresses into control sequences, rather than libuv.
This aligns the TTY setup more closely with POSIX platforms, and
enables handling of control sequences in applications which libuv
is not able to emit at all.

Since the Node.js `readline` implementation already handles divergences
between different control character sequences for the same keypresses
(e.g. `<ESC>[[A` vs `<ESC>OP` for the F1 key), this should not present
a visible change for typical Node.js TTY applications.

Testing is handled on the libuv side, and not easily feasible with
Node.js’s current TTY test setup.

PR-URL: https://github.com/nodejs/node/pull/58358
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-05-18 22:43:58 +00:00
Tobias Nießen 61aecf2e58
test: remove references to create(De|C)ipher
Both `createCipher()` and `createDecipher()` were removed in Node.js 22.

PR-URL: https://github.com/nodejs/node/pull/58363
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-05-18 22:34:16 +00:00
Dario Piotrowicz 39ab68b2c1
readline: add stricter validation for functions called after closed
PR-URL: https://github.com/nodejs/node/pull/58283
Fixes: https://github.com/nodejs/node/issues/57678
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-05-18 19:46:38 +00:00
Node.js GitHub Bot 73e7bd1c0e
deps: update undici to 7.9.0
PR-URL: https://github.com/nodejs/node/pull/58268
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2025-05-18 16:09:46 +00:00
Darshan Sen 9eb9c26b26
net: always publish to 'net.client.socket' diagnostics channel
Previously, the 'net.client.socket' diagnostics channel was only
published to when `net.connect()` was called. This change ensures the
message is also published for the following calls:

- net.createConnection()
- net.Socket#connect()
- tls.connect()

Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58349
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2025-05-18 09:05:17 +00:00
Node.js GitHub Bot fdfd0fd7b5
deps: update ada to 3.2.4
PR-URL: https://github.com/nodejs/node/pull/58152
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2025-05-18 08:11:20 +00:00
Michaël Zasso a8217a9eb8 tools: update V8 gypfiles for 13.7
Refs: 1eb7d3ce47
Refs: f942a499fe
PR-URL: https://github.com/nodejs/node/pull/58064
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-05-18 07:42:54 +00:00
Shu-yu Guo 6d61175db0 deps: V8: backport 1d3362c55396
Original commit message:

    [float16array] Turn flag on by default

    Float16Array has shipped in blink since M135. It is unlikely it'll
    unship by now, so turn the flag on by default.

    Bug: 42203953
    Change-Id: Ibd9de407b8810dd7bcdb46194fe04fc290ff8fb8
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6513988
    Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
    Commit-Queue: Shu-yu Guo <syg@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#100104}

Refs: 1d3362c553
Co-authored-by: Michaël Zasso <targos@protonmail.com>
PR-URL: https://github.com/nodejs/node/pull/58230
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58064
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-05-18 07:42:53 +00:00
Shu-yu Guo 974773572e deps: V8: cherry-pick 4f38995c8295
Original commit message:

    [explicit-resource-management] Turn flag on by default

    This feature has shipped since M134 on the blink side, and is highly
    unlikely to be unshipped now, so flip the flag on.

    Bug: 42203506
    Change-Id: I9554cea721983464b150c0de70b58a4b50fd477b
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6513391
    Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
    Commit-Queue: Shu-yu Guo <syg@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#100069}

Refs: 4f38995c82
PR-URL: https://github.com/nodejs/node/pull/58230
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58064
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-05-18 07:42:53 +00:00
Rezvan Mahdavi Hezaveh 70bfc398e9 deps: V8: cherry-pick 044b9b6f589d
Original commit message:

    [explicit-resource-management] disallow using in switch cases

    This CL disallows `using` and `await using` in switch cases.
    This was a normative change that got consensus in TC39 meetings:
    https://github.com/rbuckton/ecma262/pull/14

    Bug: 409478039
    Change-Id: I077e75d7d0d632c8b34150cfc76e4903984d6091
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6500234
    Reviewed-by: Shu-yu Guo <syg@chromium.org>
    Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#100037}

Refs: 044b9b6f58
PR-URL: https://github.com/nodejs/node/pull/58230
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58064
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-05-18 07:42:52 +00:00