Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add abort signal to body.dump() #1993

Merged
merged 24 commits into from Mar 10, 2023

Conversation

debadree25
Copy link
Member

Attempt to implement body.dump({ abort });

fixes: #1978

@KhafraDev
Copy link
Member

there are failures in v12 and v14 due to the optional chaining

@debadree25
Copy link
Member Author

Removed @KhafraDev

@codecov-commenter
Copy link

codecov-commenter commented Mar 7, 2023

Codecov Report

Patch coverage: 94.44% and project coverage change: +0.04 🎉

Comparison is base (bc8e2b8) 90.42% compared to head (5018f29) 90.46%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1993      +/-   ##
==========================================
+ Coverage   90.42%   90.46%   +0.04%     
==========================================
  Files          71       71              
  Lines        6119     6157      +38     
==========================================
+ Hits         5533     5570      +37     
- Misses        586      587       +1     
Impacted Files Coverage Δ
lib/api/readable.js 91.40% <92.30%> (+0.02%) ⬆️
lib/core/util.js 97.54% <100.00%> (-0.50%) ⬇️
lib/websocket/connection.js 88.31% <0.00%> (-0.94%) ⬇️
lib/fileapi/encoding.js 2.22% <0.00%> (-0.11%) ⬇️
lib/timers.js 100.00% <0.00%> (ø)
lib/client.js 97.55% <0.00%> (+<0.01%) ⬆️
lib/fetch/request.js 88.03% <0.00%> (+0.05%) ⬆️
lib/websocket/websocket.js 92.89% <0.00%> (+0.07%) ⬆️
lib/fetch/index.js 84.93% <0.00%> (+0.18%) ⬆️
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@debadree25
Copy link
Member Author

Still fails 😕, looks like unrelated tests?

@debadree25
Copy link
Member Author

hmm probably not unrelated, investigating

@ronag
Copy link
Member

ronag commented Mar 7, 2023

Copy link
Member

@ronag ronag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not perfect. As it won't cancel the iteration promise. But good enough.

Maybe a .destroy() call on abort can help?

@debadree25
Copy link
Member Author

Something like

signal.addEventListener('abort', () => {
        this.destroy()
})

@debadree25
Copy link
Member Author

Also not sure how to address the failures,
I tried using AbortController from require('abort-controller') but when using that the test simply hangs

@debadree25
Copy link
Member Author

Updated to destroy body on abort

lib/api/readable.js Outdated Show resolved Hide resolved
lib/api/readable.js Outdated Show resolved Hide resolved
Copy link
Member

@ronag ronag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from node:

const validateAbortSignal = hideStackFrames((signal, name) => {
  if (signal !== undefined &&
      (signal === null ||
       typeof signal !== 'object' ||
       !('aborted' in signal))) {
    throw new ERR_INVALID_ARG_TYPE(name, 'AbortSignal', signal);
  }
});

debadree25 and others added 5 commits March 7, 2023 15:14
Co-authored-by: Robert Nagy <ronagy@icloud.com>
Co-authored-by: Robert Nagy <ronagy@icloud.com>
Co-authored-by: Robert Nagy <ronagy@icloud.com>
Co-authored-by: Robert Nagy <ronagy@icloud.com>
lib/api/readable.js Outdated Show resolved Hide resolved
lib/api/readable.js Outdated Show resolved Hide resolved
debadree25 and others added 3 commits March 7, 2023 15:22
Co-authored-by: Robert Nagy <ronagy@icloud.com>
@debadree25
Copy link
Member Author

debadree25 commented Mar 7, 2023

Quite a few CI fails again, looking into these in a while

lib/api/readable.js Outdated Show resolved Hide resolved
lib/api/readable.js Outdated Show resolved Hide resolved
lib/api/readable.js Outdated Show resolved Hide resolved
debadree25 and others added 3 commits March 7, 2023 16:12
Co-authored-by: Robert Nagy <ronagy@icloud.com>
Co-authored-by: Robert Nagy <ronagy@icloud.com>
Co-authored-by: Robert Nagy <ronagy@icloud.com>
@@ -1,3 +1,5 @@
/* globals AbortController */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this not somehow inject AbortController for tests on older versions, i see this pattern being used in tests for eg: test/fetch/client-fetch.js

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it's just telling prettier that AbortController is a global

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any ideas then @KhafraDev what could we do about this test?

@debadree25
Copy link
Member Author

It seems using throwIfAborted would fail for the 16.8 version because the method wasnt released on 16.8 line

@debadree25
Copy link
Member Author

Is there a way to rerun CI, the failures in 18 and 19 look unrelated

@ronag
Copy link
Member

ronag commented Mar 8, 2023

Can you make a fallback throwIfAborted? It needs to throw an error with name AbortError.

@debadree25
Copy link
Member Author

Yes doing so

@debadree25
Copy link
Member Author

Seems everything passing finally 🎉

}
if (!signal.throwIfAborted) {
// add in a throwIfAborted method to the signal
signal.throwIfAborted = function () {
Copy link
Member

@KhafraDev KhafraDev Mar 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think adding a public method here is a good solution, it'd be better to add it as a utility function

function throwIfAborted (signal) {
  if (signal.throwIfAborted) {
    signal.throwIfAborted()
  } else {
    // ...
  }
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, does it look ok?

throwIfAborted()
signal.addEventListener('abort', () => {
this.destroy()
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This event listener needs to be cleaned up or we have a memory leak.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made this { once: true }

@@ -146,15 +146,39 @@ module.exports = class BodyReadable extends Readable {

async dump (opts) {
let limit = opts && Number.isFinite(opts.limit) ? opts.limit : 262144
const signal = opts && opts.signal
function throwIfAborted () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we move this into the util file? throwIfAborted(signal)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

signal.addEventListener('abort', () => {
this.destroy()
})
}, { once: true })
Copy link
Member

@ronag ronag Mar 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will still leak if we completed without abort

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a finally clause to remove it

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry, completely distracted need more chai sigh, anyway have updated

lib/core/util.js Outdated Show resolved Hide resolved
debadree25 and others added 2 commits March 9, 2023 14:18
Co-authored-by: Robert Nagy <ronagy@icloud.com>
@debadree25 debadree25 requested a review from ronag March 10, 2023 10:10
@ronag ronag merged commit 65eea9b into nodejs:main Mar 10, 2023
metcoder95 pushed a commit to metcoder95/undici that referenced this pull request Jul 21, 2023
kodiakhq bot pushed a commit to X-oss-byte/Canary-nextjs that referenced this pull request Oct 1, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [undici](https://undici.nodejs.org) ([source](https://togithub.com/nodejs/undici)) | [`5.19.1` -> `5.25.2`](https://renovatebot.com/diffs/npm/undici/5.19.1/5.25.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/undici/5.25.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/undici/5.25.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/undici/5.19.1/5.25.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/undici/5.19.1/5.25.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### ⚠ Dependency Lookup Warnings ⚠

Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>nodejs/undici (undici)</summary>

### [`v5.25.2`](https://togithub.com/nodejs/undici/releases/tag/v5.25.2)

[Compare Source](https://togithub.com/nodejs/undici/compare/v5.25.1...v5.25.2)

#### What's Changed

-   Add Khaf to releasers by [@&#8203;mcollina](https://togithub.com/mcollina) in [nodejs/undici#2276
-   fix: fix request with readable mode is object by [@&#8203;killagu](https://togithub.com/killagu) in [nodejs/undici#2279
-   fix loading websockets when node is built w/ --without-ssl by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2282

#### New Contributors

-   [@&#8203;killagu](https://togithub.com/killagu) made their first contribution in [nodejs/undici#2279

**Full Changelog**: nodejs/undici@v5.25.1...v5.25.2

### [`v5.25.1`](https://togithub.com/nodejs/undici/releases/tag/v5.25.1)

[Compare Source](https://togithub.com/nodejs/undici/compare/v5.25.0...v5.25.1)

#### What's Changed

-   Add publish types script by [@&#8203;Ethan-Arrowood](https://togithub.com/Ethan-Arrowood) in [nodejs/undici#2273

**Full Changelog**: nodejs/undici@v5.25.0...v5.25.1

### [`v5.25.0`](https://togithub.com/nodejs/undici/releases/tag/v5.25.0)

[Compare Source](https://togithub.com/nodejs/undici/compare/v5.24.0...v5.25.0)

#### What's Changed

-   fix: h2 without body by [@&#8203;metcoder95](https://togithub.com/metcoder95) in [nodejs/undici#2258
-   ci: remove duplicated runs by [@&#8203;metcoder95](https://togithub.com/metcoder95) in [nodejs/undici#2265
-   improve documentation of timeouts by making the units clear in all places by [@&#8203;mcfedr](https://togithub.com/mcfedr) in [nodejs/undici#2266
-   expose websocket in node bundle by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2217
-   test: fix Fetch/HTTP2 tests by [@&#8203;metcoder95](https://togithub.com/metcoder95) in [nodejs/undici#2263
-   fix undici when node is built with --without-ssl by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2272
-   fix: Fix type definition for Client Interceptors by [@&#8203;ComradeCow](https://togithub.com/ComradeCow) in [nodejs/undici#2269
-   Fix http2 agent by [@&#8203;mcollina](https://togithub.com/mcollina) in [nodejs/undici#2275

#### New Contributors

-   [@&#8203;ComradeCow](https://togithub.com/ComradeCow) made their first contribution in [nodejs/undici#2269

**Full Changelog**: nodejs/undici@v5.24.0...v5.25.0

### [`v5.24.0`](https://togithub.com/nodejs/undici/releases/tag/v5.24.0)

[Compare Source](https://togithub.com/nodejs/undici/compare/v5.23.0...v5.24.0)

#### Notable Changes

-   feat: Add H2 support by [@&#8203;metcoder95](https://togithub.com/metcoder95) in [nodejs/undici#2061

#### What's Changed

-   build(deps): bump step-security/harden-runner from 2.4.1 to 2.5.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2203
-   better stack trace for body.json by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2215
-   allow http & https websocket urls by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2218
-   build(deps-dev): bump [@&#8203;sinonjs/fake-timers](https://togithub.com/sinonjs/fake-timers) from 10.3.0 to 11.1.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2221
-   fix: pass ProxyAgent proxy status code error by [@&#8203;NBNGaming](https://togithub.com/NBNGaming) in [nodejs/undici#2162
-   fix failing test by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2223
-   docs: update MockPool.md intercept method description by [@&#8203;capaj](https://togithub.com/capaj) in [nodejs/undici#2220
-   Update wpts by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2226
-   build(deps): bump github/codeql-action from 2.21.2 to 2.21.5 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2240
-   build(deps): bump actions/setup-node from 3.6.0 to 3.8.1 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2237
-   build(deps): bump fastify/github-action-merge-dependabot from 3.9.0 to 3.9.1 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2236
-   build(deps): bump actions/checkout from 3.5.3 to 3.6.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2241
-   build(deps): bump actions/dependency-review-action from 3.0.6 to 3.0.8 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2238
-   fix: aborting request with non-object error by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2243
-   fix: preserve file path when parsing formdata by [@&#8203;jimmywarting](https://togithub.com/jimmywarting) in [nodejs/undici#2245
-   build(deps-dev): bump tsd from 0.28.1 to 0.29.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2246
-   Updated benchmarks by [@&#8203;mcollina](https://togithub.com/mcollina) in [nodejs/undici#2250
-   Fix fetch in node v20.6.0 by [@&#8203;mcollina](https://togithub.com/mcollina) in [nodejs/undici#2251
-   Maybe fix v20 by [@&#8203;mcollina](https://togithub.com/mcollina) in [nodejs/undici#2252
-   feat: Add H2 support by [@&#8203;metcoder95](https://togithub.com/metcoder95) in [nodejs/undici#2061
-   docs: fix tables in README by [@&#8203;regseb](https://togithub.com/regseb) in [nodejs/undici#2254
-   Fix http2 fetch test by [@&#8203;mcollina](https://togithub.com/mcollina) in [nodejs/undici#2253

#### New Contributors

-   [@&#8203;NBNGaming](https://togithub.com/NBNGaming) made their first contribution in [nodejs/undici#2162
-   [@&#8203;capaj](https://togithub.com/capaj) made their first contribution in [nodejs/undici#2220
-   [@&#8203;regseb](https://togithub.com/regseb) made their first contribution in [nodejs/undici#2254

**Full Changelog**: nodejs/undici@v5.23.0...v5.24.0

### [`v5.23.0`](https://togithub.com/nodejs/undici/releases/tag/v5.23.0)

[Compare Source](https://togithub.com/nodejs/undici/compare/v5.22.1...v5.23.0)

#### What's Changed

-   bump engines to node >= 16 by [@&#8203;ronag](https://togithub.com/ronag) in [nodejs/undici#2119
-   Revert "bump engines to node >= 16 ([#&#8203;2119](https://togithub.com/nodejs/undici/issues/2119))" by [@&#8203;ronag](https://togithub.com/ronag) in [nodejs/undici#2121
-   fetch: set referrer properly by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2125
-   fix: support truncated gzip by [@&#8203;jimmywarting](https://togithub.com/jimmywarting) in [nodejs/undici#2126
-   workflow: apply security best practices by [@&#8203;step-security-bot](https://togithub.com/step-security-bot) in [nodejs/undici#2130
-   build(deps): bump actions/upload-artifact from 3.1.0 to 3.1.2 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2135
-   build(deps): bump actions/dependency-review-action from 2.5.1 to 3.0.4 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2133
-   build(deps): bump node from 18-alpine to 20-alpine in /build by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2131
-   build(deps): bump pkgjs/action from 0.1.6 to 0.1.7 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2136
-   build(deps): bump actions/checkout from 3.1.0 to 3.5.2 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2132
-   build(deps-dev): bump jsdom from 21.1.2 to 22.1.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2142
-   build(deps): bump fastify/github-action-merge-dependabot from 3.7.0 to 3.8.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2148
-   fix(pr): use correct pr template file by [@&#8203;AugustinMauroy](https://togithub.com/AugustinMauroy) in [nodejs/undici#2141
-   Additional WebSocket send tests to cover all payload size categories by [@&#8203;jawj](https://togithub.com/jawj) in [nodejs/undici#2149
-   fix: reverse decompression order of "Content-Encoding" encodings (fixes [#&#8203;2158](https://togithub.com/nodejs/undici/issues/2158)) by [@&#8203;rychkog](https://togithub.com/rychkog) in [nodejs/undici#2159
-   fix: keep running WPTs if a test times out by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2165
-   feat: add build environment info by [@&#8203;mhdawson](https://togithub.com/mhdawson) in [nodejs/undici#2168
-   fix: forward error reason to fetch controller by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2172
-   stricter types for bodymixin.json by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2181
-   chore: Renable autoSelectFamily tests. by [@&#8203;ShogunPanda](https://togithub.com/ShogunPanda) in [nodejs/undici#2180
-   build(deps): bump actions/dependency-review-action from 3.0.4 to 3.0.6 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2147
-   build(deps): bump github/codeql-action from 2.3.2 to 2.20.3 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2185
-   fix: fetch resource timing performance entry names should be strings by [@&#8203;GaryWilber](https://togithub.com/GaryWilber) in [nodejs/undici#2188
-   build(deps): bump actions/checkout from 3.5.2 to 3.5.3 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2176
-   build(deps): bump fastify/github-action-merge-dependabot from 3.8.0 to 3.9.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2177
-   build(deps): bump ossf/scorecard-action from 2.1.3 to 2.2.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2178
-   build(deps): bump step-security/harden-runner from 2.4.0 to 2.4.1 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2175
-   test: fix `autoselectfamily` on platforms without IPv6 support by [@&#8203;LiviaMedeiros](https://togithub.com/LiviaMedeiros) in [nodejs/undici#2197
-   fix: make multipart/form-data boundary string more consistent by [@&#8203;LiviaMedeiros](https://togithub.com/LiviaMedeiros) in [nodejs/undici#2196
-   docs: add proxy agent options docs by [@&#8203;dancastillo](https://togithub.com/dancastillo) in [nodejs/undici#2193
-   build(deps): bump github/codeql-action from 2.20.3 to 2.21.2 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2205
-   feat: make use of `addAbortListener` where applicable by [@&#8203;atlowChemi](https://togithub.com/atlowChemi) in [nodejs/undici#2195

#### New Contributors

-   [@&#8203;step-security-bot](https://togithub.com/step-security-bot) made their first contribution in [nodejs/undici#2130
-   [@&#8203;AugustinMauroy](https://togithub.com/AugustinMauroy) made their first contribution in [nodejs/undici#2141
-   [@&#8203;rychkog](https://togithub.com/rychkog) made their first contribution in [nodejs/undici#2159
-   [@&#8203;mhdawson](https://togithub.com/mhdawson) made their first contribution in [nodejs/undici#2168
-   [@&#8203;GaryWilber](https://togithub.com/GaryWilber) made their first contribution in [nodejs/undici#2188
-   [@&#8203;atlowChemi](https://togithub.com/atlowChemi) made their first contribution in [nodejs/undici#2195

**Full Changelog**: nodejs/undici@v5.22.1...v5.23.0

### [`v5.22.1`](https://togithub.com/nodejs/undici/releases/tag/v5.22.1)

[Compare Source](https://togithub.com/nodejs/undici/compare/v5.22.0...v5.22.1)

#### What's Changed

-   Cache storage by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2076
-   test: skip content-disposition test in node 18 by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2081
-   Cache storage cleanup by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2082
-   Cache storage fixes by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2083
-   test: improve test coverage for ErrorEvent and MessageEvent by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2085
-   test: remove --experimental-wasm-simd by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2087
-   websocket: add websocketinit by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2088
-   feat(websocket): allow setting custom headers by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2089
-   test: fix tests failing only on node v20 by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2096
-   fix: skip set content-length when FormData value is stream by [@&#8203;fengmk2](https://togithub.com/fengmk2) in [nodejs/undici#2091
-   doc: update outdated command in contributing.md by [@&#8203;jazelly](https://togithub.com/jazelly) in [nodejs/undici#2099
-   cache: fix most failing WPTs by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2100
-   feat: allow build:wasm to auto detect platform by [@&#8203;jazelly](https://togithub.com/jazelly) in [nodejs/undici#2102
-   docs: updated Error documentation (fixes [#&#8203;2090](https://togithub.com/nodejs/undici/issues/2090)) by [@&#8203;titanism](https://togithub.com/titanism) in [nodejs/undici#2092
-   mimesniff: fix many broken tests by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2103
-   test: fix failing tests by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2097
-   build(deps): bump github/codeql-action from 2.2.9 to 2.3.2 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2105
-   fix: more informative error message to tell that the server doesn't match http/1.1 protocol by [@&#8203;Songkeys](https://togithub.com/Songkeys) in [nodejs/undici#2055
-   Fix bug in 16-bit frame length when buffer is a subarray by [@&#8203;jawj](https://togithub.com/jawj) in [nodejs/undici#2106
-   update wpts by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2108
-   fix: update error definitions by [@&#8203;dfilatov](https://togithub.com/dfilatov) in [nodejs/undici#2112
-   fix: make assertion a noop by [@&#8203;ronag](https://togithub.com/ronag) in [nodejs/undici#2111

#### New Contributors

-   [@&#8203;jazelly](https://togithub.com/jazelly) made their first contribution in [nodejs/undici#2099
-   [@&#8203;titanism](https://togithub.com/titanism) made their first contribution in [nodejs/undici#2092
-   [@&#8203;Songkeys](https://togithub.com/Songkeys) made their first contribution in [nodejs/undici#2055
-   [@&#8203;jawj](https://togithub.com/jawj) made their first contribution in [nodejs/undici#2106
-   [@&#8203;dfilatov](https://togithub.com/dfilatov) made their first contribution in [nodejs/undici#2112

**Full Changelog**: nodejs/undici@v5.22.0...v5.22.1

### [`v5.22.0`](https://togithub.com/nodejs/undici/releases/tag/v5.22.0)

[Compare Source](https://togithub.com/nodejs/undici/compare/v5.21.2...v5.22.0)

#### What's Changed

-   build(deps-dev): bump tsd from 0.27.0 to 0.28.1 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2042
-   build(deps): bump ossf/scorecard-action from 2.1.2 to 2.1.3 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2040
-   fix: handle opaque origin in sameOrigin by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2053
-   test: add typescript import test back by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2054
-   fix: use getMaxListeners when available by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2063
-   feat: allow overriding hwm by [@&#8203;ronag](https://togithub.com/ronag) in [nodejs/undici#2057
-   fix: there is no sync connector by [@&#8203;ronag](https://togithub.com/ronag) in [nodejs/undici#2059
-   fix: rename .wasm to -wasm to appease jest by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2064
-   fix: set content-length when using FormData body w/ request by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2066
-   refactor: unify error body handling by [@&#8203;ronag](https://togithub.com/ronag) in [nodejs/undici#2060
-   fix: close and destroy overlap by [@&#8203;ronag](https://togithub.com/ronag) in [nodejs/undici#2068
-   remove node 12 from test matrix by [@&#8203;ronag](https://togithub.com/ronag) in [nodejs/undici#2069
-   fix: don't leak socket if client is destroyed while connecting by [@&#8203;ronag](https://togithub.com/ronag) in [nodejs/undici#2058
-   fix: flaky leak test by [@&#8203;ronag](https://togithub.com/ronag) in [nodejs/undici#2070
-   test: update wpts by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2073
-   perf: latin1 by [@&#8203;ronag](https://togithub.com/ronag) in [nodejs/undici#2075
-   fix: mock fetch headers shouldn't be an array  by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2080

**Full Changelog**: nodejs/undici@v5.21.2...v5.22.0

### [`v5.21.2`](https://togithub.com/nodejs/undici/releases/tag/v5.21.2)

[Compare Source](https://togithub.com/nodejs/undici/compare/v5.21.1...v5.21.2)

#### What's Changed

-   Content disposition parsing by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2051
-   fix: clear set-cookie headers by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2052

**Full Changelog**: nodejs/undici@v5.21.1...v5.21.2

### [`v5.21.1`](https://togithub.com/nodejs/undici/releases/tag/v5.21.1)

[Compare Source](https://togithub.com/nodejs/undici/compare/v5.21.0...v5.21.1)

#### What's Changed

-   Fix typo in kPipelining symbol by [@&#8203;andrewfecenko](https://togithub.com/andrewfecenko) in [nodejs/undici#2005
-   fix(fetch): remove `undefined` error cause by [@&#8203;aduh95](https://togithub.com/aduh95) in [nodejs/undici#2006
-   chore(deps-dev): bump tsd from 0.25.0 to 0.27.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2007
-   build(deps-dev): bump wait-on from 6.0.1 to 7.0.1 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#1820
-   fix(wpt): set global META_TITLE for the runner by [@&#8203;panva](https://togithub.com/panva) in [nodejs/undici#2008
-   fix: issue 2009 by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2013
-   build(deps-dev): bump typescript from 4.9.5 to 5.0.2 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2018
-   added descriptive error messages for URL parser by [@&#8203;RishabhKodes](https://togithub.com/RishabhKodes) in [nodejs/undici#2016
-   fix(fetch): remove content-length header on redirect by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2022
-   fix(fetch): remove assertion on request.body.source on redirect ([#&#8203;2027](https://togithub.com/nodejs/undici/issues/2027)) by [@&#8203;macno](https://togithub.com/macno) in [nodejs/undici#2028
-   fix: skip failing test in node >= v19.8 by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2034
-   fetch: treat content-encoding as case-insensitive & remove x-deflate by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2037
-   perf(fetch): use string comparisons for url schemes by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2038
-   util: replace util.toUSVString with String.prototype.toWellFormed by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2036
-   build(deps): bump github/codeql-action from 2.2.4 to 2.2.9 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2039
-   build(deps-dev): bump concurrently from 7.6.0 to 8.0.1 by [@&#8203;dependabot](https://togithub.com/dependabot) in [nodejs/undici#2041
-   Small performance improvements by [@&#8203;anonrig](https://togithub.com/anonrig) in [nodejs/undici#2044
-   fix(types): Add missing Blob import by [@&#8203;dpogue](https://togithub.com/dpogue) in [nodejs/undici#2047
-   fix: set window option properly by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2048
-   fetch: fix leak by [@&#8203;ronag](https://togithub.com/ronag) in [nodejs/undici#2049

#### New Contributors

-   [@&#8203;aduh95](https://togithub.com/aduh95) made their first contribution in [nodejs/undici#2006
-   [@&#8203;RishabhKodes](https://togithub.com/RishabhKodes) made their first contribution in [nodejs/undici#2016
-   [@&#8203;macno](https://togithub.com/macno) made their first contribution in [nodejs/undici#2028
-   [@&#8203;dpogue](https://togithub.com/dpogue) made their first contribution in [nodejs/undici#2047

**Full Changelog**: nodejs/undici@v5.21.0...v5.21.1

### [`v5.21.0`](https://togithub.com/nodejs/undici/releases/tag/v5.21.0)

[Compare Source](https://togithub.com/nodejs/undici/compare/v5.20.0...v5.21.0)

##### What's Changed

-   workflow: add scorecard.yml by [@&#8203;RafaelGSS](https://togithub.com/RafaelGSS) in [nodejs/undici#1942
-   ci: timeout CI jobs after 15 minutes by [@&#8203;dominykas](https://togithub.com/dominykas) in [nodejs/undici#1946
-   test(wpt): respect variants by [@&#8203;panva](https://togithub.com/panva) in [nodejs/undici#1951
-   fix: improve isFormDataLike compat by [@&#8203;ronag](https://togithub.com/ronag) in [nodejs/undici#1953
-   fix: flaky fetch tests by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#1956
-   test(wpt): include all testing files by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#1954
-   fix: remove unneeded fetch tests by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#1960
-   fix: use normal timers for delays < 1s by [@&#8203;ronag](https://togithub.com/ronag) in [nodejs/undici#1961
-   perf: optimize happy path by [@&#8203;anonrig](https://togithub.com/anonrig) in [nodejs/undici#1955
-   fix: 🐛 add URL upstream variations in BalancedPool types by [@&#8203;jimmy-guzman](https://togithub.com/jimmy-guzman) in [nodejs/undici#1966
-   test(wpt): handle uncaught exceptions by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#1965
-   Fix failing wpts by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#1967
-   test(wpt): add results to an existing WPT Report by [@&#8203;panva](https://togithub.com/panva) in [nodejs/undici#1944
-   fix: strengthen isStream condition checking by [@&#8203;debadree25](https://togithub.com/debadree25) in [nodejs/undici#1969
-   fix: implement basic policy container by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#1970
-   TypeScript type fixes, for [#&#8203;1949](https://togithub.com/nodejs/undici/issues/1949) by [@&#8203;joshxyzhimself](https://togithub.com/joshxyzhimself) in [nodejs/undici#1968
-   websocket: separate connection logic from websocket by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#1973
-   README: h3 not showing ### as a header by [@&#8203;hilleer](https://togithub.com/hilleer) in [nodejs/undici#1975
-   wptrunner: expose gc by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#1974
-   perf: cork socket before writing by [@&#8203;ronag](https://togithub.com/ronag) in [nodejs/undici#1982
-   fix: fast timers and event loop lag by [@&#8203;ronag](https://togithub.com/ronag) in [nodejs/undici#1977
-   fix: correctly calculate resource timing duration by [@&#8203;amilajack](https://togithub.com/amilajack) in [nodejs/undici#1988
-   wpt: update tests by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#1984
-   fix: undici stream throwOnError by [@&#8203;dancastillo](https://togithub.com/dancastillo) in [nodejs/undici#1995
-   fix: remove unnecessary WeakRef by [@&#8203;ronag](https://togithub.com/ronag) in [nodejs/undici#2000
-   Fix: websocket.d.ts - error TS2304: Cannot find name 'MessagePort' by [@&#8203;ZaBlazzingZephyrus](https://togithub.com/ZaBlazzingZephyrus) in [nodejs/undici#1997
-   feat: add abort signal to body.dump() by [@&#8203;debadree25](https://togithub.com/debadree25) in [nodejs/undici#1993
-   fix(fetch): third party abortcontrollers throwing errors by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#2002
-   Improve ProxyAgent example with autentication by [@&#8203;egmen](https://togithub.com/egmen) in [nodejs/undici#2004
-   Add clientFactory option to ProxyAgent by [@&#8203;andrewfecenko](https://togithub.com/andrewfecenko) in [nodejs/undici#2003

##### New Contributors

-   [@&#8203;jimmy-guzman](https://togithub.com/jimmy-guzman) made their first contribution in [nodejs/undici#1966
-   [@&#8203;hilleer](https://togithub.com/hilleer) made their first contribution in [nodejs/undici#1975
-   [@&#8203;amilajack](https://togithub.com/amilajack) made their first contribution in [nodejs/undici#1988
-   [@&#8203;ZaBlazzingZephyrus](https://togithub.com/ZaBlazzingZephyrus) made their first contribution in [nodejs/undici#1997
-   [@&#8203;egmen](https://togithub.com/egmen) made their first contribution in [nodejs/undici#2004
-   [@&#8203;andrewfecenko](https://togithub.com/andrewfecenko) made their first contribution in [nodejs/undici#2003

**Full Changelog**: nodejs/undici@v5.20.0...v5.21.0

### [`v5.20.0`](https://togithub.com/nodejs/undici/releases/tag/v5.20.0)

[Compare Source](https://togithub.com/nodejs/undici/compare/v5.19.1...v5.20.0)

#### What's Changed

-   perf: improve cookie parsing performance by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#1931
-   fix: disable websocket wpts in ci :( by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#1932
-   fix: Allow “undefined“ as value in headers by [@&#8203;pan93412](https://togithub.com/pan93412) in [nodejs/undici#1929
-   feat: Support autoSelectFamily when connecting. by [@&#8203;ShogunPanda](https://togithub.com/ShogunPanda) in [nodejs/undici#1914
-   fix: copy cookies when cloning haders by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#1936
-   test: more logs in wpt runner by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [nodejs/undici#1933
-   feat: change headersTimeout and bodyTimeout to 300s by [@&#8203;kyrylkov](https://togithub.com/kyrylkov) in [nodejs/undici#1937

**Full Changelog**: nodejs/undici@v5.19.1...v5.20.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/X-oss-byte/Canary-nextjs).
crysmags pushed a commit to crysmags/undici that referenced this pull request Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

body.dump() is missing abort signal support
4 participants