Commit Graph

43941 Commits

Author SHA1 Message Date
Attila Szegedi
ffb9bfb206 src: add ExecutionAsyncId getter for any Context
Adds a variant of AsyncHooksGetExecutionAsyncId that takes a V8 Context
and returns the async ID belonging to the Environment (if any) of that
Context. Sometimes we want to use Isolate::GetEnteredOrMicrotaskContext
insteads of Isolate::GetCurrentContext (e.g. recording the async ID in
a V8 GC prologue callback) when current context is not set.

PR-URL: https://github.com/nodejs/node/pull/57820
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
2025-04-17 18:00:05 +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
Node.js GitHub Bot
02edc31367 deps: update timezone to 2025b
PR-URL: https://github.com/nodejs/node/pull/57857
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-04-16 22:08:52 +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
Aditi
e800f009f6 src: update std::vector<v8::Local<T>> to use v8::LocalVector<T>
Refs: https://github.com/nodejs/node/pull/57578
PR-URL: https://github.com/nodejs/node/pull/57646
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-04-16 16:59:07 +00:00
Aditi
ad3e835421 src: update std::vector<v8::Local<T>> to use v8::LocalVector<T>
A follow up of https://github.com/nodejs/node/pull/57578 to
replace all std::vector<v8::Local<T>> to use v8::LocalVector<T>

PR-URL: https://github.com/nodejs/node/pull/57642
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-16 16:58:55 +00:00
Aditi
e74e065662 src: update std::vector<v8::Local<T>> to use v8::LocalVector<T>
According to V8's public API documentation, local handles
(i.e., objects of type v8::Local<T>) "should never be allocated
on the heap". This replaces the usage of heap-allocated data
structures containing instances of `v8::Local`, specifically the
`std::vector<v8::Local<v8::String>>` with recently
introduced `v8::LocalVector<T>`.

This is first of the series of commits to replace all
`std::vector<v8::Local<T>>` to use `v8::LocalVector<T>`.

PR-URL: https://github.com/nodejs/node/pull/57578
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-16 16:58:44 +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
Node.js GitHub Bot
5077ea4149 deps: update amaro to 0.5.2
PR-URL: https://github.com/nodejs/node/pull/57871
Fixes: https://github.com/nodejs/node/issues/57471
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2025-04-16 10:34:19 +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
Node.js GitHub Bot
91d8a524ad deps: update simdutf to 6.4.2
PR-URL: https://github.com/nodejs/node/pull/57855
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-04-15 13:56:21 +00:00
Alex Schwartz
c9c61a3a7d doc: fix typo in module.md
PR-URL: https://github.com/nodejs/node/pull/57889
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
2025-04-15 14:42:38 +02:00
Tobias Nießen
0a1d5d353b crypto: revert dangerous uses of std::string_view
An `std::string_view v` is a `const char* v.data()` along with an
`std::size_t v.size()` that guarantees that `v.size()` contiguous
elements of type `char` can be accessed relative to the pointer
`v.data()`.

One of the main reasons behind the existence of  `std::string_view` is
the ability to operate on `char` sequences without requiring null
termination, which otherwise often requires expensive copies of strings
to be made. As a consequence, it is generally incorrect to assume that
`v.data()` points to a null-terminated sequence of `char`, and the only
way to obtain a null-terminated string from an `std::string_view` is to
make a copy. It is not even possible to check if the sequence pointed to
by `v.data()` is null-terminated because the null character would be at
position `v.data() + v.size()`, which is outside of the range that `v`
guarantees safe access to. (A default-constructed `std::string_view`
even sets its own data pointer to a `nullptr`, which is fine because it
only needs to guarantee safe access to zero elements, i.e., to no
elements).

In `deps/ncrypto` and `src/crypto`, there are various APIs that consume
`std::string_view v` arguments but then ignore `v.size()` and treat
`v.data()` as a C-style string of type `const char*`. However, that is
not what call sites would expect from functions that explicitly ask for
`std::string_view` arguments, since it makes assumptions beyond the
guarantees provided by `std::string_view` and leads to undefined
behavior unless the given view either contains an embedded null
character or the `char` at address `v.data() + v.size()` is a null
character. This is not a reasonable assumption for `std::string_view` in
general, and it also defeats the purpose of `std::string_view` for the
most part since, when `v.size()` is being ignored, it is essentially
just a `const char*`.

Constructing an `std::string_view` from a `const char*` is also not
"free" but requires computing the length of the C-style string (unless
the length can be computed at compile time, e.g., because the value is
just a string literal). Repeated conversion between `const char*` as
used by OpenSSL and `std::string_view` as used by ncrypto thus incurs
the additional overhead of computing the length of the string whenever
an `std::string_view` is constructed from a `const char*`. (This seems
negligible compared to the safety argument though.)

Similarly, returning a `const char*` pointer to a C-style string as an
`std::string_view` has two downsides: the function must compute the
length of the string in order to construct the view, and the caller
can no longer assume that the return value is null-terminated and thus
cannot pass the returned view to functions that require their arguments
to be null terminated. (And, for the reasons explained above, the caller
also cannot check if the value is null-terminated without potentially
invoking undefined behavior.)

C++20 unfortunately does not have a type similar to Rust's `CStr` or
GSL `czstring`. Therefore, this commit changes many occurrences of
`std::string_view` back to `const char*`, which is conventional for
null-terminated C-style strings and does not require computing the
length of strings.

There are _a lot_ of occurrences of `std::string_view` in ncrypto and
for each one, we need to evaluate if it is safe and a good abstraction.
I tried to do so, but I might have changed too few or too many, so
please feel free to give feedback on individual occurrences.

PR-URL: https://github.com/nodejs/node/pull/57816
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2025-04-15 12:09:22 +00:00
Node.js GitHub Bot
2204587d76 test: update WPT for WebCryptoAPI to 164426ace2
PR-URL: https://github.com/nodejs/node/pull/57854
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-04-15 01:04:25 +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
Dario Piotrowicz
11bb7cdb07 doc: increase z-index of header element
increase the z-index of the header element to make sure that
opened pickers from it (such as the node version picker) are
on top of other content

PR-URL: https://github.com/nodejs/node/pull/57851
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-04-14 12:01:54 -07:00
Rafael Gonzaga
78fd82b77b tools: add codeql nightly
Refs: https://github.com/nodejs/node/pull/57535
PR-URL: https://github.com/nodejs/node/pull/57788
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-04-14 17:22:32 +00: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
Elves Vieira
958fd912d5 tools: edit create-release-proposal workflow to handle pr body length
PR-URL: https://github.com/nodejs/node/pull/57841
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-04-14 12:54:17 +00:00
Trivikram Kamat
004ecc12eb doc: clarify future Corepack removal in v25+
PR-URL: https://github.com/nodejs/node/pull/57825
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2025-04-14 03:25:03 +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
Antoine du Hamel
86c2505441 doc: add missing TS formats for load hooks
PR-URL: https://github.com/nodejs/node/pull/57837
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2025-04-13 17:38:56 +00:00
KASEYA\yahor.siarheyenka
18c18fe216 tools: add zstd updater to workflow
PR-URL: https://github.com/nodejs/node/pull/57831
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-13 09:57:01 -07:00
Dario Piotrowicz
a4843f4a47 src: improve error message for invalid child stdio type in spawn_sync
PR-URL: https://github.com/nodejs/node/pull/57589
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-04-13 09:54:37 -07: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
Michaël Zasso
dfaded80e1 deps: delete OpenSSL demos, doc and test folders
And ignore them for future updates.

PR-URL: https://github.com/nodejs/node/pull/57835
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-13 15:34:51 +00: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
Ruben Bridgewater
964e41c5df src: implement util.types fast API calls
All util.types.is##Type() calls are ported to the fast API.

This improves the performance for multiple APIs such as:

- util.inspect (and util.format and console methods respectively)
- util.isDeepStrictEqual
- assert.(not)deepEqual (including strict and partial mode)

It will also improve any other API where these APIs are used.

PR-URL: https://github.com/nodejs/node/pull/57819
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-13 09:36:11 +00:00
Justin Nietzel
09ecd2e84a fs: added test for missing call to uv_fs_req_cleanup
Added a unit test for testing the memory usage of readFileSync.
Test is looking specifically for the the issue caused by failing
to free the filepath buffer in fs::ReadFileUtf8(), but it will also
catch other significant memory leaks in readFileSync() as well.

Refs: https://github.com/nodejs/node/issues/57800
PR-URL: https://github.com/nodejs/node/pull/57811
Fixes: https://github.com/nodejs/node/issues/57800
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-12 13:08:12 -07:00
Justin Nietzel
6a7b005a07 fs: add missing call to uv_fs_req_cleanup
Always call uv_fs_req_cleanup after calling uv_fs_open instead of just
when uv_fs_open returns a negative result. I referenced ReadFileSync
from node:js2c when making this change.

https://github.com/bnoordhuis made the same suggestion based on the
PR https://github.com/nodejs/node/pull/49691.

Fixes: https://github.com/nodejs/node/issues/57800
PR-URL: https://github.com/nodejs/node/pull/57811
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-12 13:08:10 -07:00
Antoine du Hamel
d0a5bd676f tools: remove unused osx-pkg-postinstall.sh
PR-URL: https://github.com/nodejs/node/pull/57667
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-12 18:27:10 +00:00
Tobias Nießen
195ed4a708 crypto: make auth tag size assumption explicit
The `CipherBase` class assumes that any authentication tag will fit into
`EVP_GCM_TLS_TAG_LEN` bytes, which is true because Node.js only supports
GCM with AES as the blocker cipher, and the block size of AES happens to
be 16 bytes, which coincidentally is also the output size of the
Poly1305 construction used by ChaCha20-Poly1305 as well as the maximum
size of authentication tags produced by AES in CCM or OCB mode.

This commit adds a new constant `ncrypto::Cipher::MAX_AUTH_TAG_LENGTH`
which is the maximum length of authentication tags produced by
algorithms that Node.js supports and replaces some constants in
`CipherBase` with semantically more meaningful named constants.

The OpenSSL team is debating whether a constant like
`MAX_AUTH_TAG_LENGTH` (`EVP_MAX_AEAD_TAG_LENGTH`) should exist at all
since its value necessarily depends on the set of AEAD algorithms
supported, but I do believe that, for Node.js, this is a step in the
right direction. It certainly makes more sense than to use the AES-GCM
tag size as defined by TLS.

PR-URL: https://github.com/nodejs/node/pull/57803
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-12 11:25:36 -07:00
Joyee Cheung
d0ce668cac src: enter and lock isolate properly in json parser
PR-URL: https://github.com/nodejs/node/pull/57823
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
2025-04-12 10:40:44 -07:00
Edy Silva
62426a79ee sqlite: add timeout options to DatabaseSync
PR-URL: https://github.com/nodejs/node/pull/57752
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2025-04-12 16:23:01 +00:00
Dario Piotrowicz
95b0f9d448 doc: clarify the multi REPL example
clarify the example presented where multiple REPL
instances are run in the same process by:
 - making its title unambiguous
 - clarifying that they share the same `global` object
   (which currently is a bit ambiguous/half implied)
 - making sure that they do share the same `global`
   object (via `useGlobal` set to `true`)
 - they delete the unix socket if present
   (so that people running the code twice don't get
    confused/annoyed that the second time it doesn't
    properly work)

PR-URL: https://github.com/nodejs/node/pull/57759
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-04-11 18:59:38 +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
jakecastelli
795dd8eb79 test: deflake test-buffer-large-size
PR-URL: https://github.com/nodejs/node/pull/57789
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-11 03:31:26 +00:00
Antoine du Hamel
d5b3dbb0f5 tools: do not use temp files when merging PRs
PR-URL: https://github.com/nodejs/node/pull/57790
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-04-10 22:37:31 +00:00
npm CLI robot
f03e90a0df deps: upgrade npm to 11.3.0
PR-URL: https://github.com/nodejs/node/pull/57801
Reviewed-By: Jordan Harband <ljharb@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2025-04-10 21:36:22 +00:00
Chengzhong Wu
f692878dec src: add BaseObjectPtr nullptr operations
Allow comparing a `BaseObjectPtr` or implicitly construct a
`BaseObjectPtr` with `nullptr`.

PR-URL: https://github.com/nodejs/node/pull/56585
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2025-04-10 16:25:10 +00:00
Node.js GitHub Bot
edf87b4fbf deps: update c-ares to v1.34.5
PR-URL: https://github.com/nodejs/node/pull/57792
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-04-10 12:39:53 +00:00
Tobias Nießen
8dce7215a8 src: remove void* -> char* -> void* casts
When passing the return value of `BackingStore::Data()` as the first or
second argument to `memcpy()`, it is unnecessary to cast the returned
pointer to `char*`.

Refs: https://github.com/nodejs/node/pull/52292
PR-URL: https://github.com/nodejs/node/pull/57791
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2025-04-10 12:39:33 +00:00
Node.js GitHub Bot
da794ed60e tools: update gyp-next to 0.20.0
PR-URL: https://github.com/nodejs/node/pull/57683
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-04-10 12:39:20 +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
Livia Medeiros
038d82980a doc: fix deprecation type for DEP0148
PR-URL: https://github.com/nodejs/node/pull/57785
Refs: https://github.com/nodejs/node/pull/40121
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-04-09 14:36:40 +00:00