@@ -7802,7 +7802,7 @@ module.exports = __toCommonJS(dist_src_exports);
7802
7802
var import_universal_user_agent = __nccwpck_require__(5030);
7803
7803
7804
7804
// pkg/dist-src/version.js
7805
- var VERSION = "9.0.5 ";
7805
+ var VERSION = "9.0.6 ";
7806
7806
7807
7807
// pkg/dist-src/defaults.js
7808
7808
var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
@@ -7907,9 +7907,9 @@ function addQueryParameters(url, parameters) {
7907
7907
}
7908
7908
7909
7909
// pkg/dist-src/util/extract-url-variable-names.js
7910
- var urlVariableRegex = /\{[^}]+\}/g;
7910
+ var urlVariableRegex = /\{[^{} }]+\}/g;
7911
7911
function removeNonChars(variableName) {
7912
- return variableName.replace(/^\W+|\W+$ /g, "").split(/,/);
7912
+ return variableName.replace(/(?: ^\W+)|(?:(?<!\W)\W+$) /g, "").split(/,/);
7913
7913
}
7914
7914
function extractUrlVariableNames(url) {
7915
7915
const matches = url.match(urlVariableRegex);
@@ -8095,7 +8095,7 @@ function parse(options) {
8095
8095
}
8096
8096
if (url.endsWith("/graphql")) {
8097
8097
if (options.mediaType.previews?.length) {
8098
- const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
8098
+ const previewsFromAcceptHeader = headers.accept.match(/(?<![\w-]) [\w-]+(?=-preview)/g) || [];
8099
8099
headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {
8100
8100
const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
8101
8101
return `application/vnd.github.${preview}-preview${format}`;
@@ -8344,7 +8344,7 @@ __export(dist_src_exports, {
8344
8344
module.exports = __toCommonJS(dist_src_exports);
8345
8345
8346
8346
// pkg/dist-src/version.js
8347
- var VERSION = "9.2.1 ";
8347
+ var VERSION = "9.2.2 ";
8348
8348
8349
8349
// pkg/dist-src/normalize-paginated-list-response.js
8350
8350
function normalizePaginatedListResponse(response) {
@@ -8392,7 +8392,7 @@ function iterator(octokit, route, parameters) {
8392
8392
const response = await requestMethod({ method, url, headers });
8393
8393
const normalizedResponse = normalizePaginatedListResponse(response);
8394
8394
url = ((normalizedResponse.headers.link || "").match(
8395
- /<([^>]+)>;\s*rel="next"/
8395
+ /<([^< >]+)>;\s*rel="next"/
8396
8396
) || [])[1];
8397
8397
return { value: normalizedResponse };
8398
8398
} catch (error) {
@@ -10944,7 +10944,7 @@ var RequestError = class extends Error {
10944
10944
if (options.request.headers.authorization) {
10945
10945
requestCopy.headers = Object.assign({}, options.request.headers, {
10946
10946
authorization: options.request.headers.authorization.replace(
10947
- / .*$/,
10947
+ /(?<! ) .*$/,
10948
10948
" [REDACTED]"
10949
10949
)
10950
10950
});
@@ -11012,7 +11012,7 @@ var import_endpoint = __nccwpck_require__(9440);
11012
11012
var import_universal_user_agent = __nccwpck_require__(5030);
11013
11013
11014
11014
// pkg/dist-src/version.js
11015
- var VERSION = "8.4.0 ";
11015
+ var VERSION = "8.4.1 ";
11016
11016
11017
11017
// pkg/dist-src/is-plain-object.js
11018
11018
function isPlainObject(value) {
@@ -11071,7 +11071,7 @@ function fetchWrapper(requestOptions) {
11071
11071
headers[keyAndValue[0]] = keyAndValue[1];
11072
11072
}
11073
11073
if ("deprecation" in headers) {
11074
- const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/);
11074
+ const matches = headers.link && headers.link.match(/<([^< >]+)>; rel="deprecation"/);
11075
11075
const deprecationLink = matches && matches.pop();
11076
11076
log.warn(
11077
11077
`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
@@ -18725,7 +18725,7 @@ module.exports = {
18725
18725
18726
18726
18727
18727
const { parseSetCookie } = __nccwpck_require__(4408)
18728
- const { stringify, getHeadersList } = __nccwpck_require__(3121)
18728
+ const { stringify } = __nccwpck_require__(3121)
18729
18729
const { webidl } = __nccwpck_require__(1744)
18730
18730
const { Headers } = __nccwpck_require__(554)
18731
18731
@@ -18801,14 +18801,13 @@ function getSetCookies (headers) {
18801
18801
18802
18802
webidl.brandCheck(headers, Headers, { strict: false })
18803
18803
18804
- const cookies = getHeadersList( headers).cookies
18804
+ const cookies = headers.getSetCookie()
18805
18805
18806
18806
if (!cookies) {
18807
18807
return []
18808
18808
}
18809
18809
18810
- // In older versions of undici, cookies is a list of name:value.
18811
- return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
18810
+ return cookies.map((pair) => parseSetCookie(pair))
18812
18811
}
18813
18812
18814
18813
/**
@@ -19236,14 +19235,15 @@ module.exports = {
19236
19235
/***/ }),
19237
19236
19238
19237
/***/ 3121:
19239
- /***/ ((module, __unused_webpack_exports, __nccwpck_require__ ) => {
19238
+ /***/ ((module) => {
19240
19239
19241
19240
"use strict";
19242
19241
19243
19242
19244
- const assert = __nccwpck_require__(9491)
19245
- const { kHeadersList } = __nccwpck_require__(2785)
19246
-
19243
+ /**
19244
+ * @param {string} value
19245
+ * @returns {boolean}
19246
+ */
19247
19247
function isCTLExcludingHtab (value) {
19248
19248
if (value.length === 0) {
19249
19249
return false
@@ -19504,31 +19504,13 @@ function stringify (cookie) {
19504
19504
return out.join('; ')
19505
19505
}
19506
19506
19507
- let kHeadersListNode
19508
-
19509
- function getHeadersList (headers) {
19510
- if (headers[kHeadersList]) {
19511
- return headers[kHeadersList]
19512
- }
19513
-
19514
- if (!kHeadersListNode) {
19515
- kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
19516
- (symbol) => symbol.description === 'headers list'
19517
- )
19518
-
19519
- assert(kHeadersListNode, 'Headers cannot be parsed')
19520
- }
19521
-
19522
- const headersList = headers[kHeadersListNode]
19523
- assert(headersList)
19524
-
19525
- return headersList
19526
- }
19527
-
19528
19507
module.exports = {
19529
19508
isCTLExcludingHtab,
19530
- stringify,
19531
- getHeadersList
19509
+ validateCookieName,
19510
+ validateCookiePath,
19511
+ validateCookieValue,
19512
+ toIMFDate,
19513
+ stringify
19532
19514
}
19533
19515
19534
19516
@@ -21457,6 +21439,14 @@ const { isUint8Array, isArrayBuffer } = __nccwpck_require__(9830)
21457
21439
const { File: UndiciFile } = __nccwpck_require__(8511)
21458
21440
const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685)
21459
21441
21442
+ let random
21443
+ try {
21444
+ const crypto = __nccwpck_require__(6005)
21445
+ random = (max) => crypto.randomInt(0, max)
21446
+ } catch {
21447
+ random = (max) => Math.floor(Math.random(max))
21448
+ }
21449
+
21460
21450
let ReadableStream = globalThis.ReadableStream
21461
21451
21462
21452
/** @type {globalThis['File']} */
@@ -21542,7 +21532,7 @@ function extractBody (object, keepalive = false) {
21542
21532
// Set source to a copy of the bytes held by object.
21543
21533
source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))
21544
21534
} else if (util.isFormDataLike(object)) {
21545
- const boundary = `----formdata-undici-0${`${Math.floor(Math. random() * 1e11)}`.padStart(11, '0')}`
21535
+ const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`
21546
21536
const prefix = `--${boundary}\r\nContent-Disposition: form-data`
21547
21537
21548
21538
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
@@ -23524,6 +23514,7 @@ const {
23524
23514
isValidHeaderName,
23525
23515
isValidHeaderValue
23526
23516
} = __nccwpck_require__(2538)
23517
+ const util = __nccwpck_require__(3837)
23527
23518
const { webidl } = __nccwpck_require__(1744)
23528
23519
const assert = __nccwpck_require__(9491)
23529
23520
@@ -24077,6 +24068,9 @@ Object.defineProperties(Headers.prototype, {
24077
24068
[Symbol.toStringTag]: {
24078
24069
value: 'Headers',
24079
24070
configurable: true
24071
+ },
24072
+ [util.inspect.custom]: {
24073
+ enumerable: false
24080
24074
}
24081
24075
})
24082
24076
@@ -33253,6 +33247,20 @@ class Pool extends PoolBase {
33253
33247
? { ...options.interceptors }
33254
33248
: undefined
33255
33249
this[kFactory] = factory
33250
+
33251
+ this.on('connectionError', (origin, targets, error) => {
33252
+ // If a connection error occurs, we remove the client from the pool,
33253
+ // and emit a connectionError event. They will not be re-used.
33254
+ // Fixes https://github.com/nodejs/undici/issues/3895
33255
+ for (const target of targets) {
33256
+ // Do not use kRemoveClient here, as it will close the client,
33257
+ // but the client cannot be closed in this state.
33258
+ const idx = this[kClients].indexOf(target)
33259
+ if (idx !== -1) {
33260
+ this[kClients].splice(idx, 1)
33261
+ }
33262
+ }
33263
+ })
33256
33264
}
33257
33265
33258
33266
[kGetDispatcher] () {
@@ -36408,6 +36416,14 @@ module.exports = require("net");
36408
36416
36409
36417
/***/ }),
36410
36418
36419
+ /***/ 6005:
36420
+ /***/ ((module) => {
36421
+
36422
+ "use strict";
36423
+ module.exports = require("node:crypto");
36424
+
36425
+ /***/ }),
36426
+
36411
36427
/***/ 5673:
36412
36428
/***/ ((module) => {
36413
36429
0 commit comments