Repository navigation
[v24.x] deps: update undici to 7.30.2 - #67273
Closed
nodejs-github-bot wants to merge 240 commits into
Closed
nodejs-github-bot wants to merge 240 commits into
nodejs-github-bot wants to merge 240 commits into
Conversation
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: #63790 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Upgrades the experimental tag filter introduced by stage 1 to accept a boolean expression instead of a literal tag name. Grammar: `and`/`&&`, `or`/`||`, `not`/`!`, parentheses for grouping, and `*` wildcards inside identifiers. Standard precedence (`not > and > or`); binary operators are left-associative. Word forms require whitespace separation; punctuation forms do not. Untagged tests evaluate `false` for any include expression and `true` for `not X`, so excluding tags does not accidentally remove untagged tests. The flag and `testTagFilters` option are still repeatable; multiple expressions still AND together. Malformed expressions fail fast at the parent process at startup. Tag value validation tightens to reject whitespace, operator characters (`& | ! ( ) *`), and the reserved words `and`/`or`/`not` in any casing - a breaking change relative to the stage 1 ship, acceptable at Stability 1.0 (Early development). Signed-off-by: atlowChemi <chemi@atlow.co.il> PR-URL: #63054 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
A portable compile cache is meant to be reused wherever the same module layout is found, which includes being generated once (at build time, say) and shipped read-only with an application for whoever runs it. On platforms with uids the cache subdirectory is suffixed with the uid of the user who created it, so such a cache is only ever found by that one user. Omit the suffix in portable mode: a user who cannot write to the directory still reads it, and a failed write is only a cache miss. Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com> PR-URL: #65293 Reviewed-By: James M Snell <jasnell@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com> Assisted-by: Opencode/Opus PR-URL: #65309 Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
The helpers report the command, both streams, and the exit condition on failure, so mismatches are diagnosed consistently across tests. Signed-off-by: greenhead <greenheadhq@gmail.com> PR-URL: #65552 Refs: #65377 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: #65572 Refs: https://github.com/nodejs/node/pull/65552/changes#r3862720795 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
`uvimpl::Work::AfterThreadPoolWork()` and the thread-safe function's `DispatchOne()` and `Finalize()` opened an `AsyncResource::CallbackScope` with only a `HandleScope`. `InternalCallbackScope` expects the resource's environment context to be entered and otherwise asserts that `Environment::GetCurrent(isolate)` is that environment, so with two environments on one isolate an addon's async work completion or thread-safe function call aborted the process whenever the other environment's context was current when the loop ran the callback. Enter the node-api env's context first, as `CallFinalizer()` and the zlib and WebCrypto thread pool callbacks already do. In `Finalize()` the scope covers only the finalizer call, since `MaybeDelete()` can free the env whose persistent handle `context()` returns. Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com> PR-URL: #65406 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Pass input, output, and version values through environment variables instead of expanding them into shell source. Split benchmark categories and PR numbers into arrays to retain separate arguments. Signed-off-by: Filip Skokan <panva.ip@gmail.com> Assisted-by: Codex PR-URL: #66013 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Xuguang Mei <meixuguang@gmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
PR-URL: #65813 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Remove allocations and repeated work performed for every request: - reuse a per-connection updateOutgoingData closure and a shared 'finish' listener instead of binding two functions per request, reaching resOnFinish through the connection state stored on the response - cache the ServerResponse options object per server (custom response classes keep receiving a fresh object) - check for Host, Expect, Content-Length and Transfer-Encoding by scanning rawHeaders instead of materializing req.headers, which was built (with per-name toLowerCase calls) for every request even when the application never reads it - cache the rendered status line per status code when the reason phrase is the default, skipping its character validation - cache the complete 'Date: ...' header line in the utcDate cache and the keep-alive header pair for the current server settings - compute the lenient-validation option chain once per message Signed-off-by: Matteo Collina <hello@matteocollina.com> PR-URL: #65802 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tim Perry <pimterry@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
type-long-settimeout.any.js and type-long-setinterval.any.js arm setTimeout(assert_unreached, 100) as a guard. Under load it can fire after done(), and the resulting uncaught exception can reach the WPT runner before the completion message, failing the spec. Use a script modifier to clear the guard timer from a completion callback, for these two fixtures only. The guard still fails the test when done() is never called. Signed-off-by: marcopiraccini <marco.piraccini@gmail.com> PR-URL: #63106 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Signed-off-by: Tim Perry <pimterry@gmail.com> PR-URL: #66093 Reviewed-By: Xuguang Mei <meixuguang@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
libuv reports the event loop metrics exposed through `performance.nodeTiming.uvMetricsInfo` as `uint64_t` counters, but they were copied into an `Int32Array` (and, before that, converted using `v8::Integer::New()`), so they wrapped around after 2^31 on long-running processes. Store the metrics in a `Float64Array` instead. Values are now exact up to `Number.MAX_SAFE_INTEGER`. Assisted-by: OpenCode Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #66094 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
`performanceNodeTiming.uvMetricsInfo` is a property, not a method, so document its value using `Type:` rather than `Returns:`. Assisted-by: OpenCode Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #66094 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
`performance.nodeTiming.uvMetricsInfo` returns the libuv event loop metrics as numbers, which are only exact up to `Number.MAX_SAFE_INTEGER`. Add `uvMetricsInfoBigInt`, which returns the same metrics as bigints backed by `uint64_t` storage, carrying the full 64-bit range reported by libuv. A single native call fills both a `Float64Array` and a `BigUint64Array`, so `uvMetricsInfo` does not pay for bigint allocation and conversion. The new property is omitted from `toJSON()`, as `JSON.stringify()` cannot serialize bigints. Assisted-by: OpenCode Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #66094 Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Short-lived streams (create, a few chunks, close) pay a fixed cost per stream that dominates once the per-chunk path is lean. Streams created internally (transform stream sides, tee branches, ReadableStream.from, transferred streams) were built by wrapper constructors that swapped the prototype of every instance and then assigned an own, enumerable `constructor` property to look like a public stream. Each internal stream therefore had its own hidden class and `Object.keys(stream)` reported `['constructor']`. The public constructors now accept the internal construction sentinel and leave controller setup to the caller, so every ReadableStream and WritableStream shares one hidden class and no per-instance prototype swap or own property is needed. The queue ring buffer grew after a push filled it, so the initial 8-slot ring held only three (value, size) pairs and a four-chunk stream reallocated every time. Growing before the push lets the ring hold four pairs. pipeTo observed the source's closed promise with two reactions and, on teardown, let the reader and writer release paths probe and reject promise records that only the pipe could have observed. One reaction pair now watches the source, and finalize drops the records before release. Signed-off-by: Matteo Collina <hello@matteocollina.com> PR-URL: #66052 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 7.0.0 to 7.1.0. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](codecov/codecov-action@fb8b358...0b35c9e) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-version: 7.1.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> PR-URL: #66103 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Observing the same entry type more than once on a PerformanceObserver,
through repeated `observe({ type })` calls or duplicates in
`entryTypes`, incremented the internal observer count each time, while
`disconnect()` decremented it only once per observed type. The counts
never returned to zero, so GC tracking stayed installed, and entries
for types such as `'http'` and `'dns'` kept being created after all
observers had disconnected.
Count each entry type at most once per observer.
Assisted-by: OpenCode
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #66097
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Whether the V8 GC callbacks used for `'gc'` performance entries were installed was tracked by a boolean in JavaScript, separately from the native state, and the two could get out of sync. After deserializing a user-land snapshot built while a `'gc'` PerformanceObserver was active, the boolean claimed the callbacks were installed, although V8 GC callbacks do not survive a snapshot. Observing `'gc'` again did not install them, and disconnecting removed callbacks that had never been registered, crashing the process. Track the installation state in `PerformanceState` instead, and replace the install and remove bindings with a single idempotent `updateGarbageCollectionTracking()` binding, which registers the callbacks if and only if there are `'gc'` observers. Assisted-by: OpenCode Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #66097 Reviewed-By: Xuguang Mei <meixuguang@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
V8 GC callbacks do not survive a snapshot, so a `'gc'` PerformanceObserver that was active while building a user-land snapshot received no entries after deserialization, unless another `'gc'` observer was created. When `'gc'` is observed while building a snapshot, add a deserialize callback that registers the GC callbacks again if `'gc'` observers are still active. Assisted-by: OpenCode Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: #66097 Reviewed-By: Xuguang Mei <meixuguang@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
tls.connect() can throw while validating TLS options. For proxied HTTPS requests, it is called after the CONNECT response has been received, so the throw happens asynchronously from the original https.request() call and ends the process as an uncaught exception. Catch the error, close the tunnel socket, and propagate it to the request. Signed-off-by: Christian Aurich <christian.aurichzm@gmail.com> PR-URL: #66096 Reviewed-By: Xuguang Mei <meixuguang@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com>
Signed-off-by: Guilherme Araújo <arauujogui@gmail.com> PR-URL: #64190 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br> Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: James M Snell <jasnell@gmail.com>
`FileHandle::TransferData` uses `-1` to indicate that it no longer owns a file descriptor. However, its destructor only closes descriptors greater than 0. If a transferred `FileHandle` owns fd 0 and the message is discarded, the descriptor is left open. Treat fd 0 like any other valid descriptor and only skip `-1`. Signed-off-by: Christian Aurich <christian.aurichzm@gmail.com> PR-URL: #66095 Reviewed-By: Xuguang Mei <meixuguang@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
typings/internalBinding/quic.d.ts already declares QuicBinding, but
it was never imported into globals.d.ts or added to
InternalBindingMap, so internalBinding('quic') resolved to `any`
instead of it.
Signed-off-by: agape1225 <49804691+agape1225@users.noreply.github.com>
PR-URL: #65556
Reviewed-By: James M Snell <jasnell@gmail.com>
Fixes: nodejs/TSC#1892 Signed-off-by: XadillaX <i@2333.moe> PR-URL: #66063 Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
`node_napi_env__::New()` returns nullptr after throwing when an add-on declares a Node-API version this binary does not support, but `napi_module_register_by_symbol()` dereferenced the result without checking it. Loading such an add-on segfaulted instead of surfacing the error the version check had already produced, so `require()` could not catch it. Reproduced on v20.x, v22.x, v24.x and v26.8.2 with a ten-line add-on whose only distinguishing content is a NAPI_VERSION above NODE_API_SUPPORTED_VERSION_MAX. `main`, `v22.x-staging` and `v24.x-staging` all lack the check. The error path had no test coverage: the message text appears in exactly one file in the repository, `src/node_api.cc`. A test is added next to `test_null_init`, which covers the sibling early return in the same function. Prepared with assistance from a closed-source coding agent, named in the pull request description. The design, review and validation are my own: I verified the fix and the test against a local build, including removing the four added lines and relinking to confirm the test fails without them. Refs: #57233 Signed-off-by: Alexey Karimov <krassx@gmail.com> PR-URL: #66019 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Test mode reduces bufferSize to one, giving the random buffers a 1/256 chance of matching and failing the comparison count assertion. Use 256 bytes in test mode and force the first bytes to differ before timing. Remove the flaky designation. Fixes: #52690 Signed-off-by: Filip Skokan <panva.ip@gmail.com> Assisted-by: Codex PR-URL: #66151 Fixes: #58353 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Native debug writes can be lost when the non-blocking stderr pipe fills, leaving expected log lines missing even when the child exits successfully. Capture stderr in a temporary file and apply the existing assertions to its contents. Remove the flaky designation on Linux s390x. Fixes: #58353 Signed-off-by: Filip Skokan <panva.ip@gmail.com> Assisted-by: Codex PR-URL: #66151 Fixes: #52690 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #66142 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Matthew Aitken <maitken033380023@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
ncrypto::KEM creates a new EVP_PKEY_CTX per operation. Parameters, entropy, scratch buffers, and outputs are private to each call. ML-KEM expansion finishes during import, and operations read an immutable key. EC and X25519 retain read-only recipient keys. RSA synchronizes mutable caches internally. Remove the outer locks serializing jobs that share a KeyObject or CryptoKey. Cover cold keys and worker clones across RSA, EC, X25519, and ML-KEM, checking every resulting shared secret. Refs: https://docs.openssl.org/3.5/man7/openssl-threads/ Signed-off-by: Filip Skokan <panva.ip@gmail.com> Assisted-by: Codex PR-URL: #66413 Backport-PR-URL: #66970 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Raw and JWK getters return independently owned bytes or BIGNUMs. RSA metadata snapshots public parameters and PSS restrictions. EC fallback paths reconstruct or duplicate the source key. EC PKCS8 export changes encoding flags only on its own clone. Early OpenSSL 3 key downgrading mutated shared provider fields. Current OpenSSL publishes separate legacy and provider conversion caches under internal read/write locks. Ordinary DER/PEM export, equality, signing, and key derivation already access the same keys without these locks. Remove export and metadata acquisitions, including their coverage of V8 allocation and encoding, and remove the now-unused shared mutex storage. Retain shared immutable key ownership. The concurrent reuse test checks that EC PKCS8 export leaves the original flags intact. Refs: #36825 Refs: https://docs.openssl.org/3.5/man7/openssl-threads/ Signed-off-by: Filip Skokan <panva.ip@gmail.com> Assisted-by: Codex PR-URL: #66413 Backport-PR-URL: #66970 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
The non-canonical IP address fix also addresses CVE-2026-106072. Record both CVE IDs in the v24.22.1 notable changes. Refs: #66981 Assisted-by: a closed-source coding agent Signed-off-by: inoway46 <inoueyuya416@gmail.com> PR-URL: #66984 Fixes: #66981 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Collaborator
Author
|
Review requested:
|
Collaborator
Author
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v24.x-staging #67273 +/- ##
=================================================
+ Coverage 90.31% 90.41% +0.10%
=================================================
Files 711 717 +6
Lines 228425 240605 +12180
Branches 43160 45904 +2744
=================================================
+ Hits 206293 217544 +11251
- Misses 14090 14528 +438
- Partials 8042 8533 +491 🚀 New features to boost your workflow:
|
Collaborator
Author
Collaborator
Author
richardlau
approved these changes
Nov 6, 2026
This was referenced Nov 10, 2026
Closed
aduh95
force-pushed
the
v24.x-staging
branch
from
November 11, 2026 16:33
145c7da to
87dad9f
Compare
MikeMcC399
pushed a commit
to MikeMcC399/node
that referenced
this pull request
Nov 11, 2026
PR-URL: nodejs#67273 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Richard Lau <richard.lau@ibm.com>
Contributor
|
This pull request has conflicts with its base branch, removing the |
Contributor
|
Landed in 792f0d7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an automated update of undici to 7.30.2.