Skip to content

Commit 7ccb478

Browse files
nodejs-github-bottargos
authored andcommittedOct 25, 2023
deps: update undici to 5.26.4
PR-URL: #50274 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent a0e60c1 commit 7ccb478

File tree

10 files changed

+15484
-116
lines changed

10 files changed

+15484
-116
lines changed
 

‎deps/undici/src/docs/api/DispatchInterceptor.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Interface: DispatchInterceptor
1+
# Interface: DispatchInterceptor
22

33
Extends: `Function`
44

‎deps/undici/src/lib/api/api-stream.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ class StreamHandler extends AsyncResource {
104104
{ callback, body: res, contentType, statusCode, statusMessage, headers }
105105
)
106106
} else {
107+
if (factory === null) {
108+
return
109+
}
110+
107111
res = this.runInAsyncScope(factory, null, {
108112
statusCode,
109113
headers,
@@ -152,14 +156,18 @@ class StreamHandler extends AsyncResource {
152156
onData (chunk) {
153157
const { res } = this
154158

155-
return res.write(chunk)
159+
return res ? res.write(chunk) : true
156160
}
157161

158162
onComplete (trailers) {
159163
const { res } = this
160164

161165
removeSignal(this)
162166

167+
if (!res) {
168+
return
169+
}
170+
163171
this.trailers = util.parseHeaders(trailers)
164172

165173
res.end()

‎deps/undici/src/lib/api/readable.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ function consumeEnd (consume) {
265265
pos += buf.byteLength
266266
}
267267

268-
resolve(dst)
268+
resolve(dst.buffer)
269269
} else if (type === 'blob') {
270270
if (!Blob) {
271271
Blob = require('buffer').Blob

‎deps/undici/src/lib/client.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,9 @@ function onParserTimeout (parser) {
10701070

10711071
function onSocketReadable () {
10721072
const { [kParser]: parser } = this
1073-
parser.readMore()
1073+
if (parser) {
1074+
parser.readMore()
1075+
}
10741076
}
10751077

10761078
function onSocketError (err) {

‎deps/undici/src/package-lock.json

+15,026
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎deps/undici/src/package.json

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "undici",
3-
"version": "5.26.3",
3+
"version": "5.26.4",
44
"description": "An HTTP/1.1 client, written from scratch for Node.js",
55
"homepage": "https://undici.nodejs.org",
66
"bugs": {
@@ -67,11 +67,10 @@
6767
"index-fetch.js",
6868
"lib",
6969
"types",
70-
"docs",
71-
"scripts/esbuild-build.mjs"
70+
"docs"
7271
],
7372
"scripts": {
74-
"build:node": "node scripts/esbuild-build.mjs",
73+
"build:node": "npx esbuild@0.19.4 index-fetch.js --bundle --platform=node --outfile=undici-fetch.js --define:esbuildDetection=1 --keep-names",
7574
"prebuild:wasm": "node build/wasm.js --prebuild",
7675
"build:wasm": "node build/wasm.js --docker",
7776
"lint": "standard | snazzy",
@@ -85,7 +84,7 @@
8584
"test:tdd": "tap test/*.js test/diagnostics-channel/*.js -w",
8685
"test:typescript": "node scripts/verifyVersion.js 14 || tsd && tsc --skipLibCheck test/imports/undici-import.ts",
8786
"test:websocket": "node scripts/verifyVersion.js 18 || tap test/websocket/*.js",
88-
"test:wpt": "node scripts/verifyVersion 18 || (node test/wpt/start-fetch.mjs && node test/wpt/start-FileAPI.mjs && node test/wpt/start-mimesniff.mjs && node test/wpt/start-xhr.mjs && node --no-warnings test/wpt/start-websockets.mjs)",
87+
"test:wpt": "node scripts/verifyVersion 18 || (node test/wpt/start-fetch.mjs && node test/wpt/start-FileAPI.mjs && node test/wpt/start-mimesniff.mjs && node test/wpt/start-xhr.mjs && node --no-warnings --expose-internals test/wpt/start-websockets.mjs)",
8988
"coverage": "nyc --reporter=text --reporter=html npm run test",
9089
"coverage:ci": "nyc --reporter=lcov npm run test",
9190
"bench": "PORT=3042 concurrently -k -s first npm:bench:server npm:bench:run",
@@ -110,7 +109,6 @@
110109
"delay": "^5.0.0",
111110
"dns-packet": "^5.4.0",
112111
"docsify-cli": "^4.4.3",
113-
"esbuild": "^0.19.4",
114112
"form-data": "^4.0.0",
115113
"formdata-node": "^4.3.1",
116114
"https-pem": "^3.0.0",

‎deps/undici/src/scripts/esbuild-build.mjs

-24
This file was deleted.

‎deps/undici/undici.js

+436-78
Large diffs are not rendered by default.

‎doc/contributing/maintaining/maintaining-dependencies.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This a list of all the dependencies:
2626
* [openssl][]
2727
* [postject][]
2828
* [simdutf][]
29-
* [undici 5.26.3][]
29+
* [undici 5.26.4][]
3030
* [uv][]
3131
* [uvwasi][]
3232
* [V8][]
@@ -278,7 +278,7 @@ The [postject](https://github.com/nodejs/postject) dependency is used for the
278278
The [simdutf](https://github.com/simdutf/simdutf) dependency is
279279
a C++ library for fast UTF-8 decoding and encoding.
280280

281-
### undici 5.26.3
281+
### undici 5.26.4
282282

283283
The [undici](https://github.com/nodejs/undici) dependency is an HTTP/1.1 client,
284284
written from scratch for Node.js..
@@ -336,7 +336,7 @@ performance improvements not currently available in standard zlib.
336336
[openssl]: #openssl
337337
[postject]: #postject
338338
[simdutf]: #simdutf
339-
[undici 5.26.3]: #undici-5263
339+
[undici 5.26.4]: #undici-5264
340340
[update-openssl-action]: ../../../.github/workflows/update-openssl.yml
341341
[uv]: #uv
342342
[uvwasi]: #uvwasi

‎src/undici_version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
// Refer to tools/update-undici.sh
33
#ifndef SRC_UNDICI_VERSION_H_
44
#define SRC_UNDICI_VERSION_H_
5-
#define UNDICI_VERSION "5.26.3"
5+
#define UNDICI_VERSION "5.26.4"
66
#endif // SRC_UNDICI_VERSION_H_

0 commit comments

Comments
 (0)
Please sign in to comment.