Skip to content

Commit 6f26dcc

Browse files
Bump undici from 5.28.5 to 5.29.0 (#594)
* 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 8d4083a commit 6f26dcc

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

6280362803

6280462804
const { parseSetCookie } = __nccwpck_require__(4408)
62805-
const { stringify, getHeadersList } = __nccwpck_require__(3121)
62805+
const { stringify } = __nccwpck_require__(3121)
6280662806
const { webidl } = __nccwpck_require__(1744)
6280762807
const { Headers } = __nccwpck_require__(554)
6280862808

@@ -62878,14 +62878,13 @@ function getSetCookies (headers) {
6287862878

6287962879
webidl.brandCheck(headers, Headers, { strict: false })
6288062880

62881-
const cookies = getHeadersList(headers).cookies
62881+
const cookies = headers.getSetCookie()
6288262882

6288362883
if (!cookies) {
6288462884
return []
6288562885
}
6288662886

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

6289162890
/**
@@ -63313,14 +63312,15 @@ module.exports = {
6331363312
/***/ }),
6331463313

6331563314
/***/ 3121:
63316-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
63315+
/***/ ((module) => {
6331763316

6331863317
"use strict";
6331963318

6332063319

63321-
const assert = __nccwpck_require__(9491)
63322-
const { kHeadersList } = __nccwpck_require__(2785)
63323-
63320+
/**
63321+
* @param {string} value
63322+
* @returns {boolean}
63323+
*/
6332463324
function isCTLExcludingHtab (value) {
6332563325
if (value.length === 0) {
6332663326
return false
@@ -63581,31 +63581,13 @@ function stringify (cookie) {
6358163581
return out.join('; ')
6358263582
}
6358363583

63584-
let kHeadersListNode
63585-
63586-
function getHeadersList (headers) {
63587-
if (headers[kHeadersList]) {
63588-
return headers[kHeadersList]
63589-
}
63590-
63591-
if (!kHeadersListNode) {
63592-
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
63593-
(symbol) => symbol.description === 'headers list'
63594-
)
63595-
63596-
assert(kHeadersListNode, 'Headers cannot be parsed')
63597-
}
63598-
63599-
const headersList = headers[kHeadersListNode]
63600-
assert(headersList)
63601-
63602-
return headersList
63603-
}
63604-
6360563584
module.exports = {
6360663585
isCTLExcludingHtab,
63607-
stringify,
63608-
getHeadersList
63586+
validateCookieName,
63587+
validateCookiePath,
63588+
validateCookieValue,
63589+
toIMFDate,
63590+
stringify
6360963591
}
6361063592

6361163593

@@ -67609,6 +67591,7 @@ const {
6760967591
isValidHeaderName,
6761067592
isValidHeaderValue
6761167593
} = __nccwpck_require__(2538)
67594+
const util = __nccwpck_require__(3837)
6761267595
const { webidl } = __nccwpck_require__(1744)
6761367596
const assert = __nccwpck_require__(9491)
6761467597

@@ -68162,6 +68145,9 @@ Object.defineProperties(Headers.prototype, {
6816268145
[Symbol.toStringTag]: {
6816368146
value: 'Headers',
6816468147
configurable: true
68148+
},
68149+
[util.inspect.custom]: {
68150+
enumerable: false
6816568151
}
6816668152
})
6816768153

@@ -77338,6 +77324,20 @@ class Pool extends PoolBase {
7733877324
? { ...options.interceptors }
7733977325
: undefined
7734077326
this[kFactory] = factory
77327+
77328+
this.on('connectionError', (origin, targets, error) => {
77329+
// If a connection error occurs, we remove the client from the pool,
77330+
// and emit a connectionError event. They will not be re-used.
77331+
// Fixes https://github.com/nodejs/undici/issues/3895
77332+
for (const target of targets) {
77333+
// Do not use kRemoveClient here, as it will close the client,
77334+
// but the client cannot be closed in this state.
77335+
const idx = this[kClients].indexOf(target)
77336+
if (idx !== -1) {
77337+
this[kClients].splice(idx, 1)
77338+
}
77339+
}
77340+
})
7734177341
}
7734277342

7734377343
[kGetDispatcher] () {

dist/setup/index.js

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

6914969149

6915069150
const { parseSetCookie } = __nccwpck_require__(4408)
69151-
const { stringify, getHeadersList } = __nccwpck_require__(3121)
69151+
const { stringify } = __nccwpck_require__(3121)
6915269152
const { webidl } = __nccwpck_require__(1744)
6915369153
const { Headers } = __nccwpck_require__(554)
6915469154

@@ -69224,14 +69224,13 @@ function getSetCookies (headers) {
6922469224

6922569225
webidl.brandCheck(headers, Headers, { strict: false })
6922669226

69227-
const cookies = getHeadersList(headers).cookies
69227+
const cookies = headers.getSetCookie()
6922869228

6922969229
if (!cookies) {
6923069230
return []
6923169231
}
6923269232

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

6923769236
/**
@@ -69659,14 +69658,15 @@ module.exports = {
6965969658
/***/ }),
6966069659

6966169660
/***/ 3121:
69662-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
69661+
/***/ ((module) => {
6966369662

6966469663
"use strict";
6966569664

6966669665

69667-
const assert = __nccwpck_require__(9491)
69668-
const { kHeadersList } = __nccwpck_require__(2785)
69669-
69666+
/**
69667+
* @param {string} value
69668+
* @returns {boolean}
69669+
*/
6967069670
function isCTLExcludingHtab (value) {
6967169671
if (value.length === 0) {
6967269672
return false
@@ -69927,31 +69927,13 @@ function stringify (cookie) {
6992769927
return out.join('; ')
6992869928
}
6992969929

69930-
let kHeadersListNode
69931-
69932-
function getHeadersList (headers) {
69933-
if (headers[kHeadersList]) {
69934-
return headers[kHeadersList]
69935-
}
69936-
69937-
if (!kHeadersListNode) {
69938-
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
69939-
(symbol) => symbol.description === 'headers list'
69940-
)
69941-
69942-
assert(kHeadersListNode, 'Headers cannot be parsed')
69943-
}
69944-
69945-
const headersList = headers[kHeadersListNode]
69946-
assert(headersList)
69947-
69948-
return headersList
69949-
}
69950-
6995169930
module.exports = {
6995269931
isCTLExcludingHtab,
69953-
stringify,
69954-
getHeadersList
69932+
validateCookieName,
69933+
validateCookiePath,
69934+
validateCookieValue,
69935+
toIMFDate,
69936+
stringify
6995569937
}
6995669938

6995769939

@@ -73955,6 +73937,7 @@ const {
7395573937
isValidHeaderName,
7395673938
isValidHeaderValue
7395773939
} = __nccwpck_require__(2538)
73940+
const util = __nccwpck_require__(3837)
7395873941
const { webidl } = __nccwpck_require__(1744)
7395973942
const assert = __nccwpck_require__(9491)
7396073943

@@ -74508,6 +74491,9 @@ Object.defineProperties(Headers.prototype, {
7450874491
[Symbol.toStringTag]: {
7450974492
value: 'Headers',
7451074493
configurable: true
74494+
},
74495+
[util.inspect.custom]: {
74496+
enumerable: false
7451174497
}
7451274498
})
7451374499

@@ -83684,6 +83670,20 @@ class Pool extends PoolBase {
8368483670
? { ...options.interceptors }
8368583671
: undefined
8368683672
this[kFactory] = factory
83673+
83674+
this.on('connectionError', (origin, targets, error) => {
83675+
// If a connection error occurs, we remove the client from the pool,
83676+
// and emit a connectionError event. They will not be re-used.
83677+
// Fixes https://github.com/nodejs/undici/issues/3895
83678+
for (const target of targets) {
83679+
// Do not use kRemoveClient here, as it will close the client,
83680+
// but the client cannot be closed in this state.
83681+
const idx = this[kClients].indexOf(target)
83682+
if (idx !== -1) {
83683+
this[kClients].splice(idx, 1)
83684+
}
83685+
}
83686+
})
8368783687
}
8368883688

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