Added an extra command to make sure to remind me (and other releasers)
to update the `main` branch _before_ cherry-picking the release commit
to the branch.
Adding this command will often avoid unnecessary extra-work in case
there are mismatches between the local state of the main branch and
remote.
PR-URL: https://github.com/nodejs/node/pull/44384
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
This changeset fixes two consistency issues in this single example that
guides releasers on how to push the tag to the remote repo.
The first issue is that the remote git reference is consistently
referred as `upstream` elsewhere in the guide.
The second issue being that the version example used in the rest of the
guide should be a fictional `v1.2.3` as stated in the "How to create a
release" guide notes:
> * Examples will use the fictional release version `1.2.3`.
PR-URL: https://github.com/nodejs/node/pull/44385
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Doesn't change much but communicates to readers that these
are compile-time conditionals.
PR-URL: https://github.com/nodejs/node/pull/44291
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Feng Yu <F3n67u@outlook.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
The lint rule was not catching all occurences of unsafe primordials use,
and was too strict on some methods.
PR-URL: https://github.com/nodejs/node/pull/43476
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
There is no need to explicitly branch based on num_curves or on the
return value of the second call to EC_get_builtin_curves. Remove
unnecessary branches and replace the loop with a functional transform.
PR-URL: https://github.com/nodejs/node/pull/44309
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This doesn't include the other tests for the result when
running a specific test in WPT.
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
PR-URL: https://github.com/nodejs/node/pull/44238
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
sequential/test-child-process-execsync and
parallel/test-child-process-spawnsync-timeout are both flaky
on azure Windows machines, where it may take longer for Node.js
to launch and receive output from child processes. These tests
work by spawning a child processes that is supposed to sleep
for a long time, but the option is configured so that Node.js
would terminate them early when a shorter timeout is reached.
Then the tests assert that the time taken for the whole thing
is shorter than the specified sleep time (meaning the process
don't actually get to sleep for that long). To make the tests
less brittle on azure Windows, this patch raises the sleep
times in those tests on Windows platform, so that the overhead
can be taken into account there.
PR-URL: https://github.com/nodejs/node/pull/44375
Refs: https://github.com/nodejs/build/issues/3014
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com>
Change the underlying type of DebugCategory to unsigned int so that it
can be safely cast to an unsigned type without having to worry about
negative values, removing the need for the DCHECK_GE statements.
To fully benefit from type safety, remove DebugCategory::CATEGORY_COUNT
and instead add a constexpr kDebugCategoryCount.
Remove the second argument from EnabledDebugList::set_enabled() and
EnabledDebugList::Parse() because it was always set to true.
PR-URL: https://github.com/nodejs/node/pull/44350
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
The test in `test/parallel/test-stream-writable-callback-twice.js` is
duplicated in `test/parallel/test-stream-writable-write-cb-twice.js`.
PR-URL: https://github.com/nodejs/node/pull/44313
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
symmetric_key_len_ is always equal to symmetric_key_.size(). Storing it
separately is redundant and has no significant benefit.
PR-URL: https://github.com/nodejs/node/pull/44346
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Allows APM vendors to generate a diagnostic report without calling into
JavaScript. Like, from their own message channels interrupting the
isolate and generating a report on demand.
PR-URL: https://github.com/nodejs/node/pull/44255
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Add basic tests for providers when using OpenSSL 3.x.
PR-URL: https://github.com/nodejs/node/pull/44148
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
By default, the debugger would query the specified inspector
sever port to see if it's available before starting the server,
and it would keep retrying until a timeout (previously 9999 ms)
is reached. This timeout seems to be longer than necessary. This
patch decreases the timeout to 3 seconds.
PR-URL: https://github.com/nodejs/node/pull/44359
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Richard Lau <rlau@redhat.com>
Access to the global object from within a vm context is intercepted
so it's slow, therefore we should try to avoid unnecessary access
to it during the initialization of vm contexts.
- Remove the Atomics.wake deletion as V8 now does not install it
anymore.
- Move the Intl.v8BreakIterator deletion into the snapshot.
- Do not query the Object prototype if --disable-proto is not set.
This should speed up the creation of vm contexts by about ~12%.
PR-URL: https://github.com/nodejs/node/pull/44252
Refs: https://github.com/nodejs/node/issues/44014
Refs: https://github.com/nodejs/node/issues/37476
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Instead of creating an object template for every ContextifyContext,
we now create one object template that can be reused by all
contexts. The native pointer can be obtained through an embdder
pointer field in the creation context of the receiver in the
interceptors, because the interceptors are only meant to be invoked
on the global object of the contextified contexts. This makes
the ContextifyContext template context-independent and therefore
snapshotable.
PR-URL: https://github.com/nodejs/node/pull/44252
Refs: https://github.com/nodejs/node/issues/44014
Refs: https://github.com/nodejs/node/issues/37476
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
When no error occurs, use `null` instead of `undefined` for the `error`
argument of the `writable.write()` and `writable.end()` callbacks.
Fixes: https://github.com/nodejs/node/issues/44290
PR-URL: https://github.com/nodejs/node/pull/44312
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
The THROW_ERR_* functions interpret the first argument as a printf-like
format string, which is problematic when it contains unsanitized user
input. This typically happens when a printf-like function is used to
produce the error message, which is then passed to a THROW_ERR_*
function, which again interprets the error message as a format string.
Fix such occurrences by properly formatting error messages using static
format strings only, and in a single step.
PR-URL: https://github.com/nodejs/node/pull/44314
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
md and mgf1_md are internal variable names and should not appear in
JS error messages. Also include the invalid digest name in the error
message.
PR-URL: https://github.com/nodejs/node/pull/44307
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Remove an unnecessary static_cast<char*>().
Use OPENSSL_secure_zalloc() instead of OPENSSL_secure_malloc() +
memset().
Update the comment describing the function which predates support for
OpenSSL's secure heap.
PR-URL: https://github.com/nodejs/node/pull/44302
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This function was introduced in 2684c902c4ff90711e57e787c5bfe0bac33bcd49
as an internal helper function. The C++ implementation became a no-op in
a57e2f2138c37e636e1f7684ab07cb36eea79716 when building against OpenSSL
1.1.0 (instead of OpenSSL 1.0.2), and eventually became a no-op in all
supported OpenSSL versions in 970ce14f61a44504520581c5af5dc9c3bddc0f40.
Finally, eb20447407d428dbb239ca0765ba6273975ed663 removed the only call
site of setFreeListLength (which was already a no-op at that point).
Refs: https://github.com/nodejs/node/pull/1529
Refs: https://github.com/nodejs/node/pull/10859
Refs: https://github.com/nodejs/node/pull/19794
Refs: https://github.com/nodejs/node/pull/38116
PR-URL: https://github.com/nodejs/node/pull/44300
Reviewed-By: Feng Yu <F3n67u@outlook.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Avoid magic numbers in the code and use an OpenSSL constant instead.
PR-URL: https://github.com/nodejs/node/pull/44305
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Add WebPerf API `performance.setResourceTimingBufferSize` and event
`'resourcetimingbufferfull'` support.
The resource timing entries are added to the global performance
timeline buffer automatically when using fetch. If users are not
proactively cleaning these events, it can grow without limit. Apply
the https://www.w3.org/TR/timing-entrytypes-registry/ default
resource timing buffer max size so that the buffer can be limited
to not grow indefinitely.
PR-URL: https://github.com/nodejs/node/pull/44220
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/44284
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
The callback argument is required.
PR-URL: https://github.com/nodejs/node/pull/44311
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>