Skip to content

Commit ae2b61d

Browse files
Bump undici from 5.28.5 to 5.29.0 (#833)
* 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]> * Fix CI failures --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: HarithaVattikuti <[email protected]>
1 parent c190c18 commit ae2b61d

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/cleanup/index.js

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

7111771117

7111871118
const { parseSetCookie } = __nccwpck_require__(4408)
71119-
const { stringify, getHeadersList } = __nccwpck_require__(3121)
71119+
const { stringify } = __nccwpck_require__(3121)
7112071120
const { webidl } = __nccwpck_require__(1744)
7112171121
const { Headers } = __nccwpck_require__(554)
7112271122

@@ -71192,14 +71192,13 @@ function getSetCookies (headers) {
7119271192

7119371193
webidl.brandCheck(headers, Headers, { strict: false })
7119471194

71195-
const cookies = getHeadersList(headers).cookies
71195+
const cookies = headers.getSetCookie()
7119671196

7119771197
if (!cookies) {
7119871198
return []
7119971199
}
7120071200

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

7120571204
/**
@@ -71627,14 +71626,15 @@ module.exports = {
7162771626
/***/ }),
7162871627

7162971628
/***/ 3121:
71630-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
71629+
/***/ ((module) => {
7163171630

7163271631
"use strict";
7163371632

7163471633

71635-
const assert = __nccwpck_require__(9491)
71636-
const { kHeadersList } = __nccwpck_require__(2785)
71637-
71634+
/**
71635+
* @param {string} value
71636+
* @returns {boolean}
71637+
*/
7163871638
function isCTLExcludingHtab (value) {
7163971639
if (value.length === 0) {
7164071640
return false
@@ -71895,31 +71895,13 @@ function stringify (cookie) {
7189571895
return out.join('; ')
7189671896
}
7189771897

71898-
let kHeadersListNode
71899-
71900-
function getHeadersList (headers) {
71901-
if (headers[kHeadersList]) {
71902-
return headers[kHeadersList]
71903-
}
71904-
71905-
if (!kHeadersListNode) {
71906-
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
71907-
(symbol) => symbol.description === 'headers list'
71908-
)
71909-
71910-
assert(kHeadersListNode, 'Headers cannot be parsed')
71911-
}
71912-
71913-
const headersList = headers[kHeadersListNode]
71914-
assert(headersList)
71915-
71916-
return headersList
71917-
}
71918-
7191971898
module.exports = {
7192071899
isCTLExcludingHtab,
71921-
stringify,
71922-
getHeadersList
71900+
validateCookieName,
71901+
validateCookiePath,
71902+
validateCookieValue,
71903+
toIMFDate,
71904+
stringify
7192371905
}
7192471906

7192571907

@@ -75923,6 +75905,7 @@ const {
7592375905
isValidHeaderName,
7592475906
isValidHeaderValue
7592575907
} = __nccwpck_require__(2538)
75908+
const util = __nccwpck_require__(3837)
7592675909
const { webidl } = __nccwpck_require__(1744)
7592775910
const assert = __nccwpck_require__(9491)
7592875911

@@ -76476,6 +76459,9 @@ Object.defineProperties(Headers.prototype, {
7647676459
[Symbol.toStringTag]: {
7647776460
value: 'Headers',
7647876461
configurable: true
76462+
},
76463+
[util.inspect.custom]: {
76464+
enumerable: false
7647976465
}
7648076466
})
7648176467

@@ -85652,6 +85638,20 @@ class Pool extends PoolBase {
8565285638
? { ...options.interceptors }
8565385639
: undefined
8565485640
this[kFactory] = factory
85641+
85642+
this.on('connectionError', (origin, targets, error) => {
85643+
// If a connection error occurs, we remove the client from the pool,
85644+
// and emit a connectionError event. They will not be re-used.
85645+
// Fixes https://github.com/nodejs/undici/issues/3895
85646+
for (const target of targets) {
85647+
// Do not use kRemoveClient here, as it will close the client,
85648+
// but the client cannot be closed in this state.
85649+
const idx = this[kClients].indexOf(target)
85650+
if (idx !== -1) {
85651+
this[kClients].splice(idx, 1)
85652+
}
85653+
}
85654+
})
8565585655
}
8565685656

8565785657
[kGetDispatcher] () {

dist/setup/index.js

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

9597195971

9597295972
const { parseSetCookie } = __nccwpck_require__(24408)
95973-
const { stringify, getHeadersList } = __nccwpck_require__(43121)
95973+
const { stringify } = __nccwpck_require__(43121)
9597495974
const { webidl } = __nccwpck_require__(21744)
9597595975
const { Headers } = __nccwpck_require__(10554)
9597695976

@@ -96046,14 +96046,13 @@ function getSetCookies (headers) {
9604696046

9604796047
webidl.brandCheck(headers, Headers, { strict: false })
9604896048

96049-
const cookies = getHeadersList(headers).cookies
96049+
const cookies = headers.getSetCookie()
9605096050

9605196051
if (!cookies) {
9605296052
return []
9605396053
}
9605496054

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

9605996058
/**
@@ -96481,14 +96480,15 @@ module.exports = {
9648196480
/***/ }),
9648296481

9648396482
/***/ 43121:
96484-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
96483+
/***/ ((module) => {
9648596484

9648696485
"use strict";
9648796486

9648896487

96489-
const assert = __nccwpck_require__(39491)
96490-
const { kHeadersList } = __nccwpck_require__(72785)
96491-
96488+
/**
96489+
* @param {string} value
96490+
* @returns {boolean}
96491+
*/
9649296492
function isCTLExcludingHtab (value) {
9649396493
if (value.length === 0) {
9649496494
return false
@@ -96749,31 +96749,13 @@ function stringify (cookie) {
9674996749
return out.join('; ')
9675096750
}
9675196751

96752-
let kHeadersListNode
96753-
96754-
function getHeadersList (headers) {
96755-
if (headers[kHeadersList]) {
96756-
return headers[kHeadersList]
96757-
}
96758-
96759-
if (!kHeadersListNode) {
96760-
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
96761-
(symbol) => symbol.description === 'headers list'
96762-
)
96763-
96764-
assert(kHeadersListNode, 'Headers cannot be parsed')
96765-
}
96766-
96767-
const headersList = headers[kHeadersListNode]
96768-
assert(headersList)
96769-
96770-
return headersList
96771-
}
96772-
9677396752
module.exports = {
9677496753
isCTLExcludingHtab,
96775-
stringify,
96776-
getHeadersList
96754+
validateCookieName,
96755+
validateCookiePath,
96756+
validateCookieValue,
96757+
toIMFDate,
96758+
stringify
9677796759
}
9677896760

9677996761

@@ -100777,6 +100759,7 @@ const {
100777100759
isValidHeaderName,
100778100760
isValidHeaderValue
100779100761
} = __nccwpck_require__(52538)
100762+
const util = __nccwpck_require__(73837)
100780100763
const { webidl } = __nccwpck_require__(21744)
100781100764
const assert = __nccwpck_require__(39491)
100782100765

@@ -101330,6 +101313,9 @@ Object.defineProperties(Headers.prototype, {
101330101313
[Symbol.toStringTag]: {
101331101314
value: 'Headers',
101332101315
configurable: true
101316+
},
101317+
[util.inspect.custom]: {
101318+
enumerable: false
101333101319
}
101334101320
})
101335101321

@@ -110506,6 +110492,20 @@ class Pool extends PoolBase {
110506110492
? { ...options.interceptors }
110507110493
: undefined
110508110494
this[kFactory] = factory
110495+
110496+
this.on('connectionError', (origin, targets, error) => {
110497+
// If a connection error occurs, we remove the client from the pool,
110498+
// and emit a connectionError event. They will not be re-used.
110499+
// Fixes https://github.com/nodejs/undici/issues/3895
110500+
for (const target of targets) {
110501+
// Do not use kRemoveClient here, as it will close the client,
110502+
// but the client cannot be closed in this state.
110503+
const idx = this[kClients].indexOf(target)
110504+
if (idx !== -1) {
110505+
this[kClients].splice(idx, 1)
110506+
}
110507+
}
110508+
})
110509110509
}
110510110510

110511110511
[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)