build(deps): bump undici from 5.25.4 to 5.26.3 (#879)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2023-10-16 21:48:18 +02:00 committed by GitHub
parent 5a72764667
commit 4b1e98b37d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 70 additions and 30 deletions

34
dist/post_run/index.js generated vendored
View File

@ -64708,6 +64708,7 @@ module.exports = {
const assert = __nccwpck_require__(9491)
const net = __nccwpck_require__(1808)
const http = __nccwpck_require__(3685)
const { pipeline } = __nccwpck_require__(2781)
const util = __nccwpck_require__(3983)
const timers = __nccwpck_require__(9459)
@ -64795,6 +64796,7 @@ const {
HTTP2_HEADER_AUTHORITY,
HTTP2_HEADER_METHOD,
HTTP2_HEADER_PATH,
HTTP2_HEADER_SCHEME,
HTTP2_HEADER_CONTENT_LENGTH,
HTTP2_HEADER_EXPECT,
HTTP2_HEADER_STATUS
@ -64971,7 +64973,7 @@ class Client extends DispatcherBase {
this[kConnector] = connect
this[kSocket] = null
this[kPipelining] = pipelining != null ? pipelining : 1
this[kMaxHeadersSize] = maxHeaderSize || 16384
this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize
this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout
this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout
this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold
@ -66391,7 +66393,7 @@ function writeH2 (client, session, request) {
const h2State = client[kHTTP2SessionState]
headers[HTTP2_HEADER_AUTHORITY] = host || client[kHost]
headers[HTTP2_HEADER_PATH] = path
headers[HTTP2_HEADER_METHOD] = method
if (method === 'CONNECT') {
session.ref()
@ -66418,10 +66420,14 @@ function writeH2 (client, session, request) {
})
return true
} else {
headers[HTTP2_HEADER_METHOD] = method
}
// https://tools.ietf.org/html/rfc7540#section-8.3
// :path and :scheme headers must be omited when sending CONNECT
headers[HTTP2_HEADER_PATH] = path
headers[HTTP2_HEADER_SCHEME] = 'https'
// https://tools.ietf.org/html/rfc7231#section-4.3.1
// https://tools.ietf.org/html/rfc7231#section-4.3.2
// https://tools.ietf.org/html/rfc7231#section-4.3.5
@ -66558,6 +66564,7 @@ function writeH2 (client, session, request) {
stream.cork()
stream.write(body)
stream.uncork()
stream.end()
request.onBodySent(body)
request.onRequestSent()
} else if (util.isBlobLike(body)) {
@ -66792,13 +66799,17 @@ async function writeIterable ({ h2stream, body, client, request, socket, content
throw socket[kError]
}
if (!h2stream.write(chunk)) {
const res = h2stream.write(chunk)
request.onBodySent(chunk)
if (!res) {
await waitForDrain()
}
}
} catch (err) {
h2stream.destroy(err)
} finally {
request.onRequestSent()
h2stream.end()
h2stream
.off('close', onDrain)
.off('drain', onDrain)
@ -67011,6 +67022,7 @@ class CompatFinalizer {
}
register (dispatcher, key) {
if (dispatcher.on) {
dispatcher.on('disconnect', () => {
if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) {
this.finalizer(key)
@ -67018,6 +67030,7 @@ class CompatFinalizer {
})
}
}
}
module.exports = function () {
// FIXME: remove workaround when the Node bug is fixed
@ -68681,7 +68694,8 @@ function processHeader (request, key, val, skipAppend = false) {
key.toLowerCase() === 'content-type'
) {
request.contentType = val
request.headers += processHeaderValue(key, val)
if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend)
else request.headers += processHeaderValue(key, val)
} else if (
key.length === 17 &&
key.toLowerCase() === 'transfer-encoding'
@ -73371,6 +73385,10 @@ async function httpRedirectFetch (fetchParams, response) {
if (!sameOrigin(requestCurrentURL(request), locationURL)) {
// https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name
request.headersList.delete('authorization')
// "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement.
request.headersList.delete('cookie')
request.headersList.delete('host')
}
// 14. If requests body is non-null, then set requests body to the first return
@ -73515,7 +73533,7 @@ async function httpNetworkOrCacheFetch (
// user agents should append `User-Agent`/default `User-Agent` value to
// httpRequests header list.
if (!httpRequest.headersList.contains('user-agent')) {
httpRequest.headersList.append('user-agent', 'undici')
httpRequest.headersList.append('user-agent', typeof esbuildDetection === 'undefined' ? 'undici' : 'node')
}
// 15. If httpRequests cache mode is "default" and httpRequests header
@ -73577,6 +73595,8 @@ async function httpNetworkOrCacheFetch (
}
}
httpRequest.headersList.delete('host')
// 20. If includeCredentials is true, then:
if (includeCredentials) {
// 1. If the user agent is not configured to block cookies for httpRequest

34
dist/run/index.js generated vendored
View File

@ -64708,6 +64708,7 @@ module.exports = {
const assert = __nccwpck_require__(9491)
const net = __nccwpck_require__(1808)
const http = __nccwpck_require__(3685)
const { pipeline } = __nccwpck_require__(2781)
const util = __nccwpck_require__(3983)
const timers = __nccwpck_require__(9459)
@ -64795,6 +64796,7 @@ const {
HTTP2_HEADER_AUTHORITY,
HTTP2_HEADER_METHOD,
HTTP2_HEADER_PATH,
HTTP2_HEADER_SCHEME,
HTTP2_HEADER_CONTENT_LENGTH,
HTTP2_HEADER_EXPECT,
HTTP2_HEADER_STATUS
@ -64971,7 +64973,7 @@ class Client extends DispatcherBase {
this[kConnector] = connect
this[kSocket] = null
this[kPipelining] = pipelining != null ? pipelining : 1
this[kMaxHeadersSize] = maxHeaderSize || 16384
this[kMaxHeadersSize] = maxHeaderSize || http.maxHeaderSize
this[kKeepAliveDefaultTimeout] = keepAliveTimeout == null ? 4e3 : keepAliveTimeout
this[kKeepAliveMaxTimeout] = keepAliveMaxTimeout == null ? 600e3 : keepAliveMaxTimeout
this[kKeepAliveTimeoutThreshold] = keepAliveTimeoutThreshold == null ? 1e3 : keepAliveTimeoutThreshold
@ -66391,7 +66393,7 @@ function writeH2 (client, session, request) {
const h2State = client[kHTTP2SessionState]
headers[HTTP2_HEADER_AUTHORITY] = host || client[kHost]
headers[HTTP2_HEADER_PATH] = path
headers[HTTP2_HEADER_METHOD] = method
if (method === 'CONNECT') {
session.ref()
@ -66418,10 +66420,14 @@ function writeH2 (client, session, request) {
})
return true
} else {
headers[HTTP2_HEADER_METHOD] = method
}
// https://tools.ietf.org/html/rfc7540#section-8.3
// :path and :scheme headers must be omited when sending CONNECT
headers[HTTP2_HEADER_PATH] = path
headers[HTTP2_HEADER_SCHEME] = 'https'
// https://tools.ietf.org/html/rfc7231#section-4.3.1
// https://tools.ietf.org/html/rfc7231#section-4.3.2
// https://tools.ietf.org/html/rfc7231#section-4.3.5
@ -66558,6 +66564,7 @@ function writeH2 (client, session, request) {
stream.cork()
stream.write(body)
stream.uncork()
stream.end()
request.onBodySent(body)
request.onRequestSent()
} else if (util.isBlobLike(body)) {
@ -66792,13 +66799,17 @@ async function writeIterable ({ h2stream, body, client, request, socket, content
throw socket[kError]
}
if (!h2stream.write(chunk)) {
const res = h2stream.write(chunk)
request.onBodySent(chunk)
if (!res) {
await waitForDrain()
}
}
} catch (err) {
h2stream.destroy(err)
} finally {
request.onRequestSent()
h2stream.end()
h2stream
.off('close', onDrain)
.off('drain', onDrain)
@ -67011,6 +67022,7 @@ class CompatFinalizer {
}
register (dispatcher, key) {
if (dispatcher.on) {
dispatcher.on('disconnect', () => {
if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) {
this.finalizer(key)
@ -67018,6 +67030,7 @@ class CompatFinalizer {
})
}
}
}
module.exports = function () {
// FIXME: remove workaround when the Node bug is fixed
@ -68681,7 +68694,8 @@ function processHeader (request, key, val, skipAppend = false) {
key.toLowerCase() === 'content-type'
) {
request.contentType = val
request.headers += processHeaderValue(key, val)
if (skipAppend) request.headers[key] = processHeaderValue(key, val, skipAppend)
else request.headers += processHeaderValue(key, val)
} else if (
key.length === 17 &&
key.toLowerCase() === 'transfer-encoding'
@ -73371,6 +73385,10 @@ async function httpRedirectFetch (fetchParams, response) {
if (!sameOrigin(requestCurrentURL(request), locationURL)) {
// https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name
request.headersList.delete('authorization')
// "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement.
request.headersList.delete('cookie')
request.headersList.delete('host')
}
// 14. If requests body is non-null, then set requests body to the first return
@ -73515,7 +73533,7 @@ async function httpNetworkOrCacheFetch (
// user agents should append `User-Agent`/default `User-Agent` value to
// httpRequests header list.
if (!httpRequest.headersList.contains('user-agent')) {
httpRequest.headersList.append('user-agent', 'undici')
httpRequest.headersList.append('user-agent', typeof esbuildDetection === 'undefined' ? 'undici' : 'node')
}
// 15. If httpRequests cache mode is "default" and httpRequests header
@ -73577,6 +73595,8 @@ async function httpNetworkOrCacheFetch (
}
}
httpRequest.headersList.delete('host')
// 20. If includeCredentials is true, then:
if (includeCredentials) {
// 1. If the user agent is not configured to block cookies for httpRequest

12
package-lock.json generated
View File

@ -3813,9 +3813,9 @@
}
},
"node_modules/undici": {
"version": "5.25.4",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.25.4.tgz",
"integrity": "sha512-450yJxT29qKMf3aoudzFpIciqpx6Pji3hEWaXqXmanbXF58LTAGCKxcJjxMXWu3iG+Mudgo3ZUfDB6YDFd/dAw==",
"version": "5.26.3",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.26.3.tgz",
"integrity": "sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==",
"dependencies": {
"@fastify/busboy": "^2.0.0"
},
@ -6688,9 +6688,9 @@
}
},
"undici": {
"version": "5.25.4",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.25.4.tgz",
"integrity": "sha512-450yJxT29qKMf3aoudzFpIciqpx6Pji3hEWaXqXmanbXF58LTAGCKxcJjxMXWu3iG+Mudgo3ZUfDB6YDFd/dAw==",
"version": "5.26.3",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.26.3.tgz",
"integrity": "sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==",
"requires": {
"@fastify/busboy": "^2.0.0"
}