Skip to content

Commit a134f0d

Browse files
authored
build: update distribution (#409)
1 parent a40ce29 commit a134f0d

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

dist/index.js

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16685,7 +16685,7 @@ module.exports = {
1668516685

1668616686

1668716687
const { parseSetCookie } = __nccwpck_require__(8915)
16688-
const { stringify, getHeadersList } = __nccwpck_require__(3834)
16688+
const { stringify } = __nccwpck_require__(3834)
1668916689
const { webidl } = __nccwpck_require__(4222)
1669016690
const { Headers } = __nccwpck_require__(6349)
1669116691

@@ -16761,14 +16761,13 @@ function getSetCookies (headers) {
1676116761

1676216762
webidl.brandCheck(headers, Headers, { strict: false })
1676316763

16764-
const cookies = getHeadersList(headers).cookies
16764+
const cookies = headers.getSetCookie()
1676516765

1676616766
if (!cookies) {
1676716767
return []
1676816768
}
1676916769

16770-
// In older versions of undici, cookies is a list of name:value.
16771-
return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
16770+
return cookies.map((pair) => parseSetCookie(pair))
1677216771
}
1677316772

1677416773
/**
@@ -17196,14 +17195,15 @@ module.exports = {
1719617195
/***/ }),
1719717196

1719817197
/***/ 3834:
17199-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
17198+
/***/ ((module) => {
1720017199

1720117200
"use strict";
1720217201

1720317202

17204-
const assert = __nccwpck_require__(2613)
17205-
const { kHeadersList } = __nccwpck_require__(6443)
17206-
17203+
/**
17204+
* @param {string} value
17205+
* @returns {boolean}
17206+
*/
1720717207
function isCTLExcludingHtab (value) {
1720817208
if (value.length === 0) {
1720917209
return false
@@ -17464,31 +17464,13 @@ function stringify (cookie) {
1746417464
return out.join('; ')
1746517465
}
1746617466

17467-
let kHeadersListNode
17468-
17469-
function getHeadersList (headers) {
17470-
if (headers[kHeadersList]) {
17471-
return headers[kHeadersList]
17472-
}
17473-
17474-
if (!kHeadersListNode) {
17475-
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
17476-
(symbol) => symbol.description === 'headers list'
17477-
)
17478-
17479-
assert(kHeadersListNode, 'Headers cannot be parsed')
17480-
}
17481-
17482-
const headersList = headers[kHeadersListNode]
17483-
assert(headersList)
17484-
17485-
return headersList
17486-
}
17487-
1748817467
module.exports = {
1748917468
isCTLExcludingHtab,
17490-
stringify,
17491-
getHeadersList
17469+
validateCookieName,
17470+
validateCookiePath,
17471+
validateCookieValue,
17472+
toIMFDate,
17473+
stringify
1749217474
}
1749317475

1749417476

@@ -21492,6 +21474,7 @@ const {
2149221474
isValidHeaderName,
2149321475
isValidHeaderValue
2149421476
} = __nccwpck_require__(5523)
21477+
const util = __nccwpck_require__(9023)
2149521478
const { webidl } = __nccwpck_require__(4222)
2149621479
const assert = __nccwpck_require__(2613)
2149721480

@@ -22045,6 +22028,9 @@ Object.defineProperties(Headers.prototype, {
2204522028
[Symbol.toStringTag]: {
2204622029
value: 'Headers',
2204722030
configurable: true
22031+
},
22032+
[util.inspect.custom]: {
22033+
enumerable: false
2204822034
}
2204922035
})
2205022036

@@ -31221,6 +31207,20 @@ class Pool extends PoolBase {
3122131207
? { ...options.interceptors }
3122231208
: undefined
3122331209
this[kFactory] = factory
31210+
31211+
this.on('connectionError', (origin, targets, error) => {
31212+
// If a connection error occurs, we remove the client from the pool,
31213+
// and emit a connectionError event. They will not be re-used.
31214+
// Fixes https://github.com/nodejs/undici/issues/3895
31215+
for (const target of targets) {
31216+
// Do not use kRemoveClient here, as it will close the client,
31217+
// but the client cannot be closed in this state.
31218+
const idx = this[kClients].indexOf(target)
31219+
if (idx !== -1) {
31220+
this[kClients].splice(idx, 1)
31221+
}
31222+
}
31223+
})
3122431224
}
3122531225

3122631226
[kGetDispatcher] () {

0 commit comments

Comments
 (0)