@@ -2922,6 +2922,7 @@ class Context {
29222922 this.action = process.env.GITHUB_ACTION;
29232923 this.actor = process.env.GITHUB_ACTOR;
29242924 this.job = process.env.GITHUB_JOB;
2925+ this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT, 10);
29252926 this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER, 10);
29262927 this.runId = parseInt(process.env.GITHUB_RUN_ID, 10);
29272928 this.apiUrl = (_a = process.env.GITHUB_API_URL) !== null && _a !== void 0 ? _a : `https://api.github.com`;
@@ -4776,7 +4777,7 @@ module.exports = __toCommonJS(dist_src_exports);
47764777var import_universal_user_agent = __nccwpck_require__(3843);
47774778
47784779// pkg/dist-src/version.js
4779- var VERSION = "9.0.5 ";
4780+ var VERSION = "9.0.6 ";
47804781
47814782// pkg/dist-src/defaults.js
47824783var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
@@ -4881,9 +4882,9 @@ function addQueryParameters(url, parameters) {
48814882}
48824883
48834884// pkg/dist-src/util/extract-url-variable-names.js
4884- var urlVariableRegex = /\{[^}]+\}/g;
4885+ var urlVariableRegex = /\{[^{} }]+\}/g;
48854886function removeNonChars(variableName) {
4886- return variableName.replace(/^\W+|\W+$ /g, "").split(/,/);
4887+ return variableName.replace(/(?: ^\W+)|(?:(?<!\W)\W+$) /g, "").split(/,/);
48874888}
48884889function extractUrlVariableNames(url) {
48894890 const matches = url.match(urlVariableRegex);
@@ -5069,7 +5070,7 @@ function parse(options) {
50695070 }
50705071 if (url.endsWith("/graphql")) {
50715072 if (options.mediaType.previews?.length) {
5072- const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
5073+ const previewsFromAcceptHeader = headers.accept.match(/(?<![\w-]) [\w-]+(?=-preview)/g) || [];
50735074 headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {
50745075 const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
50755076 return `application/vnd.github.${preview}-preview${format}`;
@@ -5318,7 +5319,7 @@ __export(dist_src_exports, {
53185319module.exports = __toCommonJS(dist_src_exports);
53195320
53205321// pkg/dist-src/version.js
5321- var VERSION = "9.2.1 ";
5322+ var VERSION = "9.2.2 ";
53225323
53235324// pkg/dist-src/normalize-paginated-list-response.js
53245325function normalizePaginatedListResponse(response) {
@@ -5366,7 +5367,7 @@ function iterator(octokit, route, parameters) {
53665367 const response = await requestMethod({ method, url, headers });
53675368 const normalizedResponse = normalizePaginatedListResponse(response);
53685369 url = ((normalizedResponse.headers.link || "").match(
5369- /<([^>]+)>;\s*rel="next"/
5370+ /<([^< >]+)>;\s*rel="next"/
53705371 ) || [])[1];
53715372 return { value: normalizedResponse };
53725373 } catch (error) {
@@ -7918,7 +7919,7 @@ var RequestError = class extends Error {
79187919 if (options.request.headers.authorization) {
79197920 requestCopy.headers = Object.assign({}, options.request.headers, {
79207921 authorization: options.request.headers.authorization.replace(
7921- / .*$/,
7922+ /(?<! ) .*$/,
79227923 " [REDACTED]"
79237924 )
79247925 });
@@ -7986,7 +7987,7 @@ var import_endpoint = __nccwpck_require__(4471);
79867987var import_universal_user_agent = __nccwpck_require__(3843);
79877988
79887989// pkg/dist-src/version.js
7989- var VERSION = "8.4.0 ";
7990+ var VERSION = "8.4.1 ";
79907991
79917992// pkg/dist-src/is-plain-object.js
79927993function isPlainObject(value) {
@@ -8045,7 +8046,7 @@ function fetchWrapper(requestOptions) {
80458046 headers[keyAndValue[0]] = keyAndValue[1];
80468047 }
80478048 if ("deprecation" in headers) {
8048- const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/);
8049+ const matches = headers.link && headers.link.match(/<([^< >]+)>; rel="deprecation"/);
80498050 const deprecationLink = matches && matches.pop();
80508051 log.warn(
80518052 `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
@@ -18171,7 +18172,7 @@ module.exports = {
1817118172
1817218173
1817318174const { parseSetCookie } = __nccwpck_require__(8915)
18174- const { stringify, getHeadersList } = __nccwpck_require__(3834)
18175+ const { stringify } = __nccwpck_require__(3834)
1817518176const { webidl } = __nccwpck_require__(4222)
1817618177const { Headers } = __nccwpck_require__(6349)
1817718178
@@ -18247,14 +18248,13 @@ function getSetCookies (headers) {
1824718248
1824818249 webidl.brandCheck(headers, Headers, { strict: false })
1824918250
18250- const cookies = getHeadersList( headers).cookies
18251+ const cookies = headers.getSetCookie()
1825118252
1825218253 if (!cookies) {
1825318254 return []
1825418255 }
1825518256
18256- // In older versions of undici, cookies is a list of name:value.
18257- return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
18257+ return cookies.map((pair) => parseSetCookie(pair))
1825818258}
1825918259
1826018260/**
@@ -18682,14 +18682,15 @@ module.exports = {
1868218682/***/ }),
1868318683
1868418684/***/ 3834:
18685- /***/ ((module, __unused_webpack_exports, __nccwpck_require__ ) => {
18685+ /***/ ((module) => {
1868618686
1868718687"use strict";
1868818688
1868918689
18690- const assert = __nccwpck_require__(2613)
18691- const { kHeadersList } = __nccwpck_require__(6443)
18692-
18690+ /**
18691+ * @param {string} value
18692+ * @returns {boolean}
18693+ */
1869318694function isCTLExcludingHtab (value) {
1869418695 if (value.length === 0) {
1869518696 return false
@@ -18950,31 +18951,13 @@ function stringify (cookie) {
1895018951 return out.join('; ')
1895118952}
1895218953
18953- let kHeadersListNode
18954-
18955- function getHeadersList (headers) {
18956- if (headers[kHeadersList]) {
18957- return headers[kHeadersList]
18958- }
18959-
18960- if (!kHeadersListNode) {
18961- kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
18962- (symbol) => symbol.description === 'headers list'
18963- )
18964-
18965- assert(kHeadersListNode, 'Headers cannot be parsed')
18966- }
18967-
18968- const headersList = headers[kHeadersListNode]
18969- assert(headersList)
18970-
18971- return headersList
18972- }
18973-
1897418954module.exports = {
1897518955 isCTLExcludingHtab,
18976- stringify,
18977- getHeadersList
18956+ validateCookieName,
18957+ validateCookiePath,
18958+ validateCookieValue,
18959+ toIMFDate,
18960+ stringify
1897818961}
1897918962
1898018963
@@ -22978,6 +22961,7 @@ const {
2297822961 isValidHeaderName,
2297922962 isValidHeaderValue
2298022963} = __nccwpck_require__(5523)
22964+ const util = __nccwpck_require__(9023)
2298122965const { webidl } = __nccwpck_require__(4222)
2298222966const assert = __nccwpck_require__(2613)
2298322967
@@ -23531,6 +23515,9 @@ Object.defineProperties(Headers.prototype, {
2353123515 [Symbol.toStringTag]: {
2353223516 value: 'Headers',
2353323517 configurable: true
23518+ },
23519+ [util.inspect.custom]: {
23520+ enumerable: false
2353423521 }
2353523522})
2353623523
@@ -32707,6 +32694,20 @@ class Pool extends PoolBase {
3270732694 ? { ...options.interceptors }
3270832695 : undefined
3270932696 this[kFactory] = factory
32697+
32698+ this.on('connectionError', (origin, targets, error) => {
32699+ // If a connection error occurs, we remove the client from the pool,
32700+ // and emit a connectionError event. They will not be re-used.
32701+ // Fixes https://github.com/nodejs/undici/issues/3895
32702+ for (const target of targets) {
32703+ // Do not use kRemoveClient here, as it will close the client,
32704+ // but the client cannot be closed in this state.
32705+ const idx = this[kClients].indexOf(target)
32706+ if (idx !== -1) {
32707+ this[kClients].splice(idx, 1)
32708+ }
32709+ }
32710+ })
3271032711 }
3271132712
3271232713 [kGetDispatcher] () {
0 commit comments