Source code of `class Zstd` calls ctor of parent `ZlibBase` via
`super()`
By inspecting `opts` in `ZlibBase` ctor, we can see `opts?.info` is
further used to determine the return shapes of `*Sync()` methods in
children class. This information will need to be revealed in nodejs doc.
This PR is separated from the one for `BrotliOptions`, since these two
changes potentially need to be backported to different minimum versions.
PR-URL: https://github.com/nodejs/node/pull/58360
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Source code of `function Brotli()` calls ctor of parent `ZlibBase` via
`ReflectApply()`
By inspecting `opts` in `ZlibBase` ctor, we can see `opts?.info` is
further used to determine the return shapes of `*Sync()` methods in
children class. This information will need to be revealed in nodejs doc.
This PR is separated from the one for `ZstdOptions`, since these two
changes potentially need to be backported to different minimum versions.
PR-URL: https://github.com/nodejs/node/pull/58359
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58470
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: https://github.com/nodejs/node/pull/58470
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Now that Symbol.dispose and Symbol.asyncDispose have been
enabled by default and are expected to likely advance to
stage 4 this week, let's graduate them from experimental
status.
PR-URL: https://github.com/nodejs/node/pull/58467
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Dario Piotrowicz <dario.piotrowicz@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58439
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: https://github.com/nodejs/node/pull/58477
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@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: Dario Piotrowicz <dario.piotrowicz@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58457
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
PR-URL: https://github.com/nodejs/node/pull/58454
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58472
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58176
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jan Martin <jan.krems@gmail.com>
This change should have no effect since the test does not appear to
emit any warnings. If there are warnings, we probably should handle
them properly instead of passing this flag to the runtime.
Refs: https://github.com/nodejs/node/pull/35093
PR-URL: https://github.com/nodejs/node/pull/58424
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
`Z_TREES` is never exposed on `DefineZlibConstants()`, hence it shall be
removed.
This fix is applicable to v18+.
Refs: https://github.com/nodejs/node/blob/main/src/node_zlib.cc
PR-URL: https://github.com/nodejs/node/pull/58371
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Boolean value to check if an ES Module is the entrypoint of the
current process.
Implements: #57226
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/57804
Fixes: https://github.com/nodejs/node/issues/57226
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58434
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58434
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58456
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
For cases where the style is not needed but code still calls styleText
unconditionally, this adds a `none` style that not not apply any styling
to the text.
PR-URL: https://github.com/nodejs/node/pull/58437
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Introduce `ERR_TRAILING_JUNK_AFTER_STREAM_END`
error to handle unexpected data after the end of
a compressed stream. This ensures proper error
reporting when decompressing deflate or gzip
streams with trailing junk. Added tests to
verify the behavior.
Fixes: https://github.com/nodejs/node/issues/58247
PR-URL: https://github.com/nodejs/node/pull/58316
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
This commit updates the aggregate function 'result' callback
handling to not crash when an exception is thrown.
Fixes: https://github.com/nodejs/node/issues/58425
PR-URL: https://github.com/nodejs/node/pull/58426
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This is a followup cleanup on a previous PR. Current source code and doc
explicitly states that `selectPadding` has been removed for all exports.
Refs: https://github.com/nodejs/node/pull/29144
Refs: https://nodejs.org/api/http2.html
PR-URL: https://github.com/nodejs/node/pull/58373
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Signed-off-by: Darshan Sen <raisinten@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58390
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
We need two specific files to generate platform-specific files
PR-URL: https://github.com/nodejs/node/pull/58431
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
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>
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>
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>
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>
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>
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>
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>