PR-URL: https://github.com/nodejs/node/pull/57287
Fixes: https://github.com/nodejs/node/issues/57284
Refs: https://github.com/nodejs/node/pull/55676
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Vladimir Morozov <vmorozov@microsoft.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Cipher was removed from the public API a while ago but we were still
defining it and exporting `require('crypto').Cipher` as `undefined`.
Silly us.
PR-URL: https://github.com/nodejs/node/pull/57266
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Expose `CppHeap` data via
`cppgc::CppHeap::CollectStatistics()` in the v8 module.
PR-URL: https://github.com/nodejs/node/pull/57146
Fixes: https://github.com/nodejs/node/issues/56533
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
TypeScript 5.8 is now released which adds a new tsconfig flag that
aligns with Node's default behavior.
https://www.typescriptlang.org/tsconfig/#erasableSyntaxOnly
Two weeks ago this options was added to the recommended TSConfig for
Node which resides in the tsconfig/bases project.
https://github.com/tsconfig/bases/blob/main/bases/node-ts.json
PR-URL: https://github.com/nodejs/node/pull/57271
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
PR-URL: https://github.com/nodejs/node/pull/57073
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit documents the return types for assert.rejects() and
assert.doesNotReject().
PR-URL: https://github.com/nodejs/node/pull/57219
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Add clarification based on discussion with security
researcher.
Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/57150
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/56467
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/57109
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/57109
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/57093
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
the statement `set Y to be the file system root` can be wrongly
interpreted as the file system root being updated to match Y,
removing the `be` term removes this potential interpretation
PR-URL: https://github.com/nodejs/node/pull/57092
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/57090
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
updates the sentence saying that `module.builtinModule`
only contains the modules that can be loaded without
`node:` (since v23.5.0 also prefix-only modules are
included in the list)
PR-URL: https://github.com/nodejs/node/pull/57089
Refs: https://github.com/nodejs/node/pull/56185
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
It's somewhat esoteric at best to define distance in terms of squared
length!
PR-URL: https://github.com/nodejs/node/pull/57046
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/57091
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
The loader hooks examples have been broken for a while:
1. The nextLoad() hook cannot be used on a .coffee file that ends
up going to the default load step without an explict format,
which would cause a ERR_UNKNOWN_FILE_EXTENSION. Mention
adding a package.json with a type field to work around it
in the example.
2. Pass the context parameter to the nextLoad() invocation and
document that context.format is mandatory when module type
is not explicitly inferrable from the module.
3. Correct the getPackageType() implementation which returns
false instead of undefined in the absence of an explict format,
which is not a valid type for format.
PR-URL: https://github.com/nodejs/node/pull/57037
Refs: https://github.com/nodejs/node/issues/57030
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
On other platforms, load from the OpenSSL default certificate
file and diretory.
This is different from --use-openssl-ca in that it caches
the certificates on first load, instead of always reading
from disk every time a new root store is needed.
When used together with the statically-linked OpenSSL, the
default configuration usually leads to this behavior:
- If SSL_CERT_FILE is used, load from SSL_CERT_FILE. Otherwise
load from /etc/ssl/cert.pem
- If SSL_CERT_DIR is used, load from all the files under
SSL_CERT_DIR. Otherwise, load from all the files under
/etc/ssl/certs
PR-URL: https://github.com/nodejs/node/pull/57009
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/57015
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/56804
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Harshitha K P <harshitha014@gmail.com>
The original implementation of the experimental
`FileHandle.readableWebStream` API created non-`type: 'bytes'` streams,
which prevented callers from creating `mode: 'byob'` readers from the
returned stream, which means they could not achieve the associated
"zero-copy" performance characteristics.
Then, #46933 added a parameter allowing callers to pass the `type`
parameter down to the ReadableStream constructor, exposing the same
semantics to callers of `FileHandle.readableWebStream`.
But there is no point to giving callers this choice: FileHandle-derived
streams are by their very nature byte streams. We should not require
callers to explicitly opt in to having byte stream semantics. Moreover,
I do not see a situation in which callers would ever want to have a
non-bytes stream: bytes-streams only do anything differently than normal
ones if `mode: 'byob'` is passed to `getReader`.
So, remove the `options` parameter and always create a ReadableStream
with `type: 'bytes'`.
Fixes#54041.
PR-URL: https://github.com/nodejs/node/pull/55461
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>