@@ -6110,19 +6110,19 @@ var __copyProps = (to, from, except, desc) => {
61106110var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
61116111
61126112// pkg/dist-src/index.js
6113- var dist_src_exports = {};
6114- __export(dist_src_exports , {
6113+ var index_exports = {};
6114+ __export(index_exports , {
61156115 Octokit: () => Octokit
61166116});
6117- module.exports = __toCommonJS(dist_src_exports );
6117+ module.exports = __toCommonJS(index_exports );
61186118var import_universal_user_agent = __nccwpck_require__(3843);
61196119var import_before_after_hook = __nccwpck_require__(2732);
61206120var import_request = __nccwpck_require__(8636);
61216121var import_graphql = __nccwpck_require__(7);
61226122var import_auth_token = __nccwpck_require__(7864);
61236123
61246124// pkg/dist-src/version.js
6125- var VERSION = "5.2.0 ";
6125+ var VERSION = "5.2.1 ";
61266126
61276127// pkg/dist-src/index.js
61286128var noop = () => {
@@ -18121,7 +18121,7 @@ module.exports = {
1812118121
1812218122
1812318123const { parseSetCookie } = __nccwpck_require__(8915)
18124- const { stringify, getHeadersList } = __nccwpck_require__(3834)
18124+ const { stringify } = __nccwpck_require__(3834)
1812518125const { webidl } = __nccwpck_require__(4222)
1812618126const { Headers } = __nccwpck_require__(6349)
1812718127
@@ -18197,14 +18197,13 @@ function getSetCookies (headers) {
1819718197
1819818198 webidl.brandCheck(headers, Headers, { strict: false })
1819918199
18200- const cookies = getHeadersList( headers).cookies
18200+ const cookies = headers.getSetCookie()
1820118201
1820218202 if (!cookies) {
1820318203 return []
1820418204 }
1820518205
18206- // In older versions of undici, cookies is a list of name:value.
18207- return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
18206+ return cookies.map((pair) => parseSetCookie(pair))
1820818207}
1820918208
1821018209/**
@@ -18632,14 +18631,15 @@ module.exports = {
1863218631/***/ }),
1863318632
1863418633/***/ 3834:
18635- /***/ ((module, __unused_webpack_exports, __nccwpck_require__ ) => {
18634+ /***/ ((module) => {
1863618635
1863718636"use strict";
1863818637
1863918638
18640- const assert = __nccwpck_require__(2613)
18641- const { kHeadersList } = __nccwpck_require__(6443)
18642-
18639+ /**
18640+ * @param {string} value
18641+ * @returns {boolean}
18642+ */
1864318643function isCTLExcludingHtab (value) {
1864418644 if (value.length === 0) {
1864518645 return false
@@ -18900,31 +18900,13 @@ function stringify (cookie) {
1890018900 return out.join('; ')
1890118901}
1890218902
18903- let kHeadersListNode
18904-
18905- function getHeadersList (headers) {
18906- if (headers[kHeadersList]) {
18907- return headers[kHeadersList]
18908- }
18909-
18910- if (!kHeadersListNode) {
18911- kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
18912- (symbol) => symbol.description === 'headers list'
18913- )
18914-
18915- assert(kHeadersListNode, 'Headers cannot be parsed')
18916- }
18917-
18918- const headersList = headers[kHeadersListNode]
18919- assert(headersList)
18920-
18921- return headersList
18922- }
18923-
1892418903module.exports = {
1892518904 isCTLExcludingHtab,
18926- stringify,
18927- getHeadersList
18905+ validateCookieName,
18906+ validateCookiePath,
18907+ validateCookieValue,
18908+ toIMFDate,
18909+ stringify
1892818910}
1892918911
1893018912
@@ -22928,6 +22910,7 @@ const {
2292822910 isValidHeaderName,
2292922911 isValidHeaderValue
2293022912} = __nccwpck_require__(5523)
22913+ const util = __nccwpck_require__(9023)
2293122914const { webidl } = __nccwpck_require__(4222)
2293222915const assert = __nccwpck_require__(2613)
2293322916
@@ -23481,6 +23464,9 @@ Object.defineProperties(Headers.prototype, {
2348123464 [Symbol.toStringTag]: {
2348223465 value: 'Headers',
2348323466 configurable: true
23467+ },
23468+ [util.inspect.custom]: {
23469+ enumerable: false
2348423470 }
2348523471})
2348623472
@@ -32657,6 +32643,20 @@ class Pool extends PoolBase {
3265732643 ? { ...options.interceptors }
3265832644 : undefined
3265932645 this[kFactory] = factory
32646+
32647+ this.on('connectionError', (origin, targets, error) => {
32648+ // If a connection error occurs, we remove the client from the pool,
32649+ // and emit a connectionError event. They will not be re-used.
32650+ // Fixes https://github.com/nodejs/undici/issues/3895
32651+ for (const target of targets) {
32652+ // Do not use kRemoveClient here, as it will close the client,
32653+ // but the client cannot be closed in this state.
32654+ const idx = this[kClients].indexOf(target)
32655+ if (idx !== -1) {
32656+ this[kClients].splice(idx, 1)
32657+ }
32658+ }
32659+ })
3266032660 }
3266132661
3266232662 [kGetDispatcher] () {
0 commit comments