Skip to content

Commit 06a5327

Browse files
dependabot[bot]lmvysakh
andauthored
Bump undici from 5.28.5 to 5.29.0 (#641)
* Bump undici from 5.28.5 to 5.29.0 Bumps [undici](https://github.com/nodejs/undici) from 5.28.5 to 5.29.0. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v5.28.5...v5.29.0) --- updated-dependencies: - dependency-name: undici dependency-version: 5.29.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Check failure fix --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: lmvysakh <[email protected]>
1 parent e8e5b82 commit 06a5327

File tree

4 files changed

+66
-66
lines changed

4 files changed

+66
-66
lines changed

.licenses/npm/undici.dep.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cache-save/index.js

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

6477764777

6477864778
const { parseSetCookie } = __nccwpck_require__(4408)
64779-
const { stringify, getHeadersList } = __nccwpck_require__(3121)
64779+
const { stringify } = __nccwpck_require__(3121)
6478064780
const { webidl } = __nccwpck_require__(1744)
6478164781
const { Headers } = __nccwpck_require__(554)
6478264782

@@ -64852,14 +64852,13 @@ function getSetCookies (headers) {
6485264852

6485364853
webidl.brandCheck(headers, Headers, { strict: false })
6485464854

64855-
const cookies = getHeadersList(headers).cookies
64855+
const cookies = headers.getSetCookie()
6485664856

6485764857
if (!cookies) {
6485864858
return []
6485964859
}
6486064860

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

6486564864
/**
@@ -65287,14 +65286,15 @@ module.exports = {
6528765286
/***/ }),
6528865287

6528965288
/***/ 3121:
65290-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
65289+
/***/ ((module) => {
6529165290

6529265291
"use strict";
6529365292

6529465293

65295-
const assert = __nccwpck_require__(9491)
65296-
const { kHeadersList } = __nccwpck_require__(2785)
65297-
65294+
/**
65295+
* @param {string} value
65296+
* @returns {boolean}
65297+
*/
6529865298
function isCTLExcludingHtab (value) {
6529965299
if (value.length === 0) {
6530065300
return false
@@ -65555,31 +65555,13 @@ function stringify (cookie) {
6555565555
return out.join('; ')
6555665556
}
6555765557

65558-
let kHeadersListNode
65559-
65560-
function getHeadersList (headers) {
65561-
if (headers[kHeadersList]) {
65562-
return headers[kHeadersList]
65563-
}
65564-
65565-
if (!kHeadersListNode) {
65566-
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
65567-
(symbol) => symbol.description === 'headers list'
65568-
)
65569-
65570-
assert(kHeadersListNode, 'Headers cannot be parsed')
65571-
}
65572-
65573-
const headersList = headers[kHeadersListNode]
65574-
assert(headersList)
65575-
65576-
return headersList
65577-
}
65578-
6557965558
module.exports = {
6558065559
isCTLExcludingHtab,
65581-
stringify,
65582-
getHeadersList
65560+
validateCookieName,
65561+
validateCookiePath,
65562+
validateCookieValue,
65563+
toIMFDate,
65564+
stringify
6558365565
}
6558465566

6558565567

@@ -69583,6 +69565,7 @@ const {
6958369565
isValidHeaderName,
6958469566
isValidHeaderValue
6958569567
} = __nccwpck_require__(2538)
69568+
const util = __nccwpck_require__(3837)
6958669569
const { webidl } = __nccwpck_require__(1744)
6958769570
const assert = __nccwpck_require__(9491)
6958869571

@@ -70136,6 +70119,9 @@ Object.defineProperties(Headers.prototype, {
7013670119
[Symbol.toStringTag]: {
7013770120
value: 'Headers',
7013870121
configurable: true
70122+
},
70123+
[util.inspect.custom]: {
70124+
enumerable: false
7013970125
}
7014070126
})
7014170127

@@ -79312,6 +79298,20 @@ class Pool extends PoolBase {
7931279298
? { ...options.interceptors }
7931379299
: undefined
7931479300
this[kFactory] = factory
79301+
79302+
this.on('connectionError', (origin, targets, error) => {
79303+
// If a connection error occurs, we remove the client from the pool,
79304+
// and emit a connectionError event. They will not be re-used.
79305+
// Fixes https://github.com/nodejs/undici/issues/3895
79306+
for (const target of targets) {
79307+
// Do not use kRemoveClient here, as it will close the client,
79308+
// but the client cannot be closed in this state.
79309+
const idx = this[kClients].indexOf(target)
79310+
if (idx !== -1) {
79311+
this[kClients].splice(idx, 1)
79312+
}
79313+
}
79314+
})
7931579315
}
7931679316

7931779317
[kGetDispatcher] () {

dist/setup/index.js

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

7702677026

7702777027
const { parseSetCookie } = __nccwpck_require__(4408)
77028-
const { stringify, getHeadersList } = __nccwpck_require__(3121)
77028+
const { stringify } = __nccwpck_require__(3121)
7702977029
const { webidl } = __nccwpck_require__(1744)
7703077030
const { Headers } = __nccwpck_require__(554)
7703177031

@@ -77101,14 +77101,13 @@ function getSetCookies (headers) {
7710177101

7710277102
webidl.brandCheck(headers, Headers, { strict: false })
7710377103

77104-
const cookies = getHeadersList(headers).cookies
77104+
const cookies = headers.getSetCookie()
7710577105

7710677106
if (!cookies) {
7710777107
return []
7710877108
}
7710977109

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

7711477113
/**
@@ -77536,14 +77535,15 @@ module.exports = {
7753677535
/***/ }),
7753777536

7753877537
/***/ 3121:
77539-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
77538+
/***/ ((module) => {
7754077539

7754177540
"use strict";
7754277541

7754377542

77544-
const assert = __nccwpck_require__(9491)
77545-
const { kHeadersList } = __nccwpck_require__(2785)
77546-
77543+
/**
77544+
* @param {string} value
77545+
* @returns {boolean}
77546+
*/
7754777547
function isCTLExcludingHtab (value) {
7754877548
if (value.length === 0) {
7754977549
return false
@@ -77804,31 +77804,13 @@ function stringify (cookie) {
7780477804
return out.join('; ')
7780577805
}
7780677806

77807-
let kHeadersListNode
77808-
77809-
function getHeadersList (headers) {
77810-
if (headers[kHeadersList]) {
77811-
return headers[kHeadersList]
77812-
}
77813-
77814-
if (!kHeadersListNode) {
77815-
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
77816-
(symbol) => symbol.description === 'headers list'
77817-
)
77818-
77819-
assert(kHeadersListNode, 'Headers cannot be parsed')
77820-
}
77821-
77822-
const headersList = headers[kHeadersListNode]
77823-
assert(headersList)
77824-
77825-
return headersList
77826-
}
77827-
7782877807
module.exports = {
7782977808
isCTLExcludingHtab,
77830-
stringify,
77831-
getHeadersList
77809+
validateCookieName,
77810+
validateCookiePath,
77811+
validateCookieValue,
77812+
toIMFDate,
77813+
stringify
7783277814
}
7783377815

7783477816

@@ -81832,6 +81814,7 @@ const {
8183281814
isValidHeaderName,
8183381815
isValidHeaderValue
8183481816
} = __nccwpck_require__(2538)
81817+
const util = __nccwpck_require__(3837)
8183581818
const { webidl } = __nccwpck_require__(1744)
8183681819
const assert = __nccwpck_require__(9491)
8183781820

@@ -82385,6 +82368,9 @@ Object.defineProperties(Headers.prototype, {
8238582368
[Symbol.toStringTag]: {
8238682369
value: 'Headers',
8238782370
configurable: true
82371+
},
82372+
[util.inspect.custom]: {
82373+
enumerable: false
8238882374
}
8238982375
})
8239082376

@@ -91561,6 +91547,20 @@ class Pool extends PoolBase {
9156191547
? { ...options.interceptors }
9156291548
: undefined
9156391549
this[kFactory] = factory
91550+
91551+
this.on('connectionError', (origin, targets, error) => {
91552+
// If a connection error occurs, we remove the client from the pool,
91553+
// and emit a connectionError event. They will not be re-used.
91554+
// Fixes https://github.com/nodejs/undici/issues/3895
91555+
for (const target of targets) {
91556+
// Do not use kRemoveClient here, as it will close the client,
91557+
// but the client cannot be closed in this state.
91558+
const idx = this[kClients].indexOf(target)
91559+
if (idx !== -1) {
91560+
this[kClients].splice(idx, 1)
91561+
}
91562+
}
91563+
})
9156491564
}
9156591565

9156691566
[kGetDispatcher] () {

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)