From 26c60f02e6505308ff224449e015408e77c79302 Mon Sep 17 00:00:00 2001 From: peter-evans <18365890+peter-evans@users.noreply.github.com> Date: Tue, 9 Dec 2025 20:14:50 +0000 Subject: [PATCH] [CI] test committed --- action.yml | 2 +- dist/index.js | 72 ++++++++++++++++++++++++++++----------------------- report.txt | 1 + 3 files changed, 42 insertions(+), 33 deletions(-) create mode 100644 report.txt diff --git a/action.yml b/action.yml index 9d28570c..e09c1f3b 100644 --- a/action.yml +++ b/action.yml @@ -94,7 +94,7 @@ outputs: pull-request-branch: description: 'The pull request branch name' runs: - using: 'node20' + using: 'node24' main: 'dist/index.js' branding: icon: 'git-pull-request' diff --git a/dist/index.js b/dist/index.js index 56c158d3..a0c3f557 100644 --- a/dist/index.js +++ b/dist/index.js @@ -10020,7 +10020,7 @@ module.exports = { const { parseSetCookie } = __nccwpck_require__(7803) -const { stringify, getHeadersList } = __nccwpck_require__(6338) +const { stringify } = __nccwpck_require__(6338) const { webidl } = __nccwpck_require__(8134) const { Headers } = __nccwpck_require__(9061) @@ -10096,14 +10096,13 @@ function getSetCookies (headers) { webidl.brandCheck(headers, Headers, { strict: false }) - const cookies = getHeadersList(headers).cookies + const cookies = headers.getSetCookie() if (!cookies) { return [] } - // In older versions of undici, cookies is a list of name:value. - return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair)) + return cookies.map((pair) => parseSetCookie(pair)) } /** @@ -10531,14 +10530,15 @@ module.exports = { /***/ }), /***/ 6338: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ ((module) => { "use strict"; -const assert = __nccwpck_require__(2613) -const { kHeadersList } = __nccwpck_require__(9411) - +/** + * @param {string} value + * @returns {boolean} + */ function isCTLExcludingHtab (value) { if (value.length === 0) { return false @@ -10799,31 +10799,13 @@ function stringify (cookie) { return out.join('; ') } -let kHeadersListNode - -function getHeadersList (headers) { - if (headers[kHeadersList]) { - return headers[kHeadersList] - } - - if (!kHeadersListNode) { - kHeadersListNode = Object.getOwnPropertySymbols(headers).find( - (symbol) => symbol.description === 'headers list' - ) - - assert(kHeadersListNode, 'Headers cannot be parsed') - } - - const headersList = headers[kHeadersListNode] - assert(headersList) - - return headersList -} - module.exports = { isCTLExcludingHtab, - stringify, - getHeadersList + validateCookieName, + validateCookiePath, + validateCookieValue, + toIMFDate, + stringify } @@ -12752,6 +12734,14 @@ const { isUint8Array, isArrayBuffer } = __nccwpck_require__(8253) const { File: UndiciFile } = __nccwpck_require__(3305) const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(4346) +let random +try { + const crypto = __nccwpck_require__(7598) + random = (max) => crypto.randomInt(0, max) +} catch { + random = (max) => Math.floor(Math.random(max)) +} + let ReadableStream = globalThis.ReadableStream /** @type {globalThis['File']} */ @@ -12837,7 +12827,7 @@ function extractBody (object, keepalive = false) { // Set source to a copy of the bytes held by object. source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)) } else if (util.isFormDataLike(object)) { - const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}` + const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}` const prefix = `--${boundary}\r\nContent-Disposition: form-data` /*! formdata-polyfill. MIT License. Jimmy Wärting */ @@ -14819,6 +14809,7 @@ const { isValidHeaderName, isValidHeaderValue } = __nccwpck_require__(555) +const util = __nccwpck_require__(9023) const { webidl } = __nccwpck_require__(8134) const assert = __nccwpck_require__(2613) @@ -15372,6 +15363,9 @@ Object.defineProperties(Headers.prototype, { [Symbol.toStringTag]: { value: 'Headers', configurable: true + }, + [util.inspect.custom]: { + enumerable: false } }) @@ -24548,6 +24542,20 @@ class Pool extends PoolBase { ? { ...options.interceptors } : undefined this[kFactory] = factory + + this.on('connectionError', (origin, targets, error) => { + // If a connection error occurs, we remove the client from the pool, + // and emit a connectionError event. They will not be re-used. + // Fixes https://github.com/nodejs/undici/issues/3895 + for (const target of targets) { + // Do not use kRemoveClient here, as it will close the client, + // but the client cannot be closed in this state. + const idx = this[kClients].indexOf(target) + if (idx !== -1) { + this[kClients].splice(idx, 1) + } + } + }) } [kGetDispatcher] () { diff --git a/report.txt b/report.txt new file mode 100644 index 00000000..86975537 --- /dev/null +++ b/report.txt @@ -0,0 +1 @@ +1765311290