Skip to content

Commit 63fb322

Browse files
authored
Update distribution (#399)
1 parent 76b256c commit 63fb322

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
@@ -13094,7 +13094,7 @@ module.exports = {
1309413094

1309513095

1309613096
const { parseSetCookie } = __nccwpck_require__(8915)
13097-
const { stringify, getHeadersList } = __nccwpck_require__(3834)
13097+
const { stringify } = __nccwpck_require__(3834)
1309813098
const { webidl } = __nccwpck_require__(4222)
1309913099
const { Headers } = __nccwpck_require__(6349)
1310013100

@@ -13170,14 +13170,13 @@ function getSetCookies (headers) {
1317013170

1317113171
webidl.brandCheck(headers, Headers, { strict: false })
1317213172

13173-
const cookies = getHeadersList(headers).cookies
13173+
const cookies = headers.getSetCookie()
1317413174

1317513175
if (!cookies) {
1317613176
return []
1317713177
}
1317813178

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

1318313182
/**
@@ -13605,14 +13604,15 @@ module.exports = {
1360513604
/***/ }),
1360613605

1360713606
/***/ 3834:
13608-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
13607+
/***/ ((module) => {
1360913608

1361013609
"use strict";
1361113610

1361213611

13613-
const assert = __nccwpck_require__(2613)
13614-
const { kHeadersList } = __nccwpck_require__(6443)
13615-
13612+
/**
13613+
* @param {string} value
13614+
* @returns {boolean}
13615+
*/
1361613616
function isCTLExcludingHtab (value) {
1361713617
if (value.length === 0) {
1361813618
return false
@@ -13873,31 +13873,13 @@ function stringify (cookie) {
1387313873
return out.join('; ')
1387413874
}
1387513875

13876-
let kHeadersListNode
13877-
13878-
function getHeadersList (headers) {
13879-
if (headers[kHeadersList]) {
13880-
return headers[kHeadersList]
13881-
}
13882-
13883-
if (!kHeadersListNode) {
13884-
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
13885-
(symbol) => symbol.description === 'headers list'
13886-
)
13887-
13888-
assert(kHeadersListNode, 'Headers cannot be parsed')
13889-
}
13890-
13891-
const headersList = headers[kHeadersListNode]
13892-
assert(headersList)
13893-
13894-
return headersList
13895-
}
13896-
1389713876
module.exports = {
1389813877
isCTLExcludingHtab,
13899-
stringify,
13900-
getHeadersList
13878+
validateCookieName,
13879+
validateCookiePath,
13880+
validateCookieValue,
13881+
toIMFDate,
13882+
stringify
1390113883
}
1390213884

1390313885

@@ -17901,6 +17883,7 @@ const {
1790117883
isValidHeaderName,
1790217884
isValidHeaderValue
1790317885
} = __nccwpck_require__(5523)
17886+
const util = __nccwpck_require__(9023)
1790417887
const { webidl } = __nccwpck_require__(4222)
1790517888
const assert = __nccwpck_require__(2613)
1790617889

@@ -18454,6 +18437,9 @@ Object.defineProperties(Headers.prototype, {
1845418437
[Symbol.toStringTag]: {
1845518438
value: 'Headers',
1845618439
configurable: true
18440+
},
18441+
[util.inspect.custom]: {
18442+
enumerable: false
1845718443
}
1845818444
})
1845918445

@@ -27630,6 +27616,20 @@ class Pool extends PoolBase {
2763027616
? { ...options.interceptors }
2763127617
: undefined
2763227618
this[kFactory] = factory
27619+
27620+
this.on('connectionError', (origin, targets, error) => {
27621+
// If a connection error occurs, we remove the client from the pool,
27622+
// and emit a connectionError event. They will not be re-used.
27623+
// Fixes https://github.com/nodejs/undici/issues/3895
27624+
for (const target of targets) {
27625+
// Do not use kRemoveClient here, as it will close the client,
27626+
// but the client cannot be closed in this state.
27627+
const idx = this[kClients].indexOf(target)
27628+
if (idx !== -1) {
27629+
this[kClients].splice(idx, 1)
27630+
}
27631+
}
27632+
})
2763327633
}
2763427634

2763527635
[kGetDispatcher] () {

0 commit comments

Comments
 (0)