Skip to content

Commit 58095a0

Browse files
committed
Repackage action following undici bump
GitHub downloads each action run in a workflow during runtime and executes it as a complete package of code before you can use workflow commands like run to interact with the runner machine. This means that we must provide all JavaScript package dependencies as part of the distributed action in order for it to be usable in workflows. A naive approach to doing this is checking in the `node_modules` folder. However, this approach results in a huge amount of frequently changing external content being included in the repository, much of which is not even part of the executed program. A far better approach is to use the excellent ncc tool to compile the program, including all the relevant code from the dependencies, into a single file. We use a "continuous packaging" approach, where the packaged action code that is generated via ncc is always kept in sync with the development source code and dependencies. This allows a beta version of the action to be easily used in workflows by beta testers or those who need changes not in the release simply by using the name of the branch as the action ref (e.g., `uses: arduino/arduino-lint-action@main` will cause the version of the action from the tip of the `main` branch to be used by the workflow run). The update of the package dependency results in a change to the packaged code, so the packaging is here updated accordingly.
1 parent 78aa69e commit 58095a0

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

dist/index.js

+31-31
Original file line numberDiff line numberDiff line change
@@ -15806,7 +15806,7 @@ module.exports = {
1580615806

1580715807

1580815808
const { parseSetCookie } = __nccwpck_require__(8915)
15809-
const { stringify, getHeadersList } = __nccwpck_require__(3834)
15809+
const { stringify } = __nccwpck_require__(3834)
1581015810
const { webidl } = __nccwpck_require__(4222)
1581115811
const { Headers } = __nccwpck_require__(6349)
1581215812

@@ -15882,14 +15882,13 @@ function getSetCookies (headers) {
1588215882

1588315883
webidl.brandCheck(headers, Headers, { strict: false })
1588415884

15885-
const cookies = getHeadersList(headers).cookies
15885+
const cookies = headers.getSetCookie()
1588615886

1588715887
if (!cookies) {
1588815888
return []
1588915889
}
1589015890

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

1589515894
/**
@@ -16317,14 +16316,15 @@ module.exports = {
1631716316
/***/ }),
1631816317

1631916318
/***/ 3834:
16320-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
16319+
/***/ ((module) => {
1632116320

1632216321
"use strict";
1632316322

1632416323

16325-
const assert = __nccwpck_require__(2613)
16326-
const { kHeadersList } = __nccwpck_require__(6443)
16327-
16324+
/**
16325+
* @param {string} value
16326+
* @returns {boolean}
16327+
*/
1632816328
function isCTLExcludingHtab (value) {
1632916329
if (value.length === 0) {
1633016330
return false
@@ -16585,31 +16585,13 @@ function stringify (cookie) {
1658516585
return out.join('; ')
1658616586
}
1658716587

16588-
let kHeadersListNode
16589-
16590-
function getHeadersList (headers) {
16591-
if (headers[kHeadersList]) {
16592-
return headers[kHeadersList]
16593-
}
16594-
16595-
if (!kHeadersListNode) {
16596-
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
16597-
(symbol) => symbol.description === 'headers list'
16598-
)
16599-
16600-
assert(kHeadersListNode, 'Headers cannot be parsed')
16601-
}
16602-
16603-
const headersList = headers[kHeadersListNode]
16604-
assert(headersList)
16605-
16606-
return headersList
16607-
}
16608-
1660916588
module.exports = {
1661016589
isCTLExcludingHtab,
16611-
stringify,
16612-
getHeadersList
16590+
validateCookieName,
16591+
validateCookiePath,
16592+
validateCookieValue,
16593+
toIMFDate,
16594+
stringify
1661316595
}
1661416596

1661516597

@@ -20613,6 +20595,7 @@ const {
2061320595
isValidHeaderName,
2061420596
isValidHeaderValue
2061520597
} = __nccwpck_require__(5523)
20598+
const util = __nccwpck_require__(9023)
2061620599
const { webidl } = __nccwpck_require__(4222)
2061720600
const assert = __nccwpck_require__(2613)
2061820601

@@ -21166,6 +21149,9 @@ Object.defineProperties(Headers.prototype, {
2116621149
[Symbol.toStringTag]: {
2116721150
value: 'Headers',
2116821151
configurable: true
21152+
},
21153+
[util.inspect.custom]: {
21154+
enumerable: false
2116921155
}
2117021156
})
2117121157

@@ -30342,6 +30328,20 @@ class Pool extends PoolBase {
3034230328
? { ...options.interceptors }
3034330329
: undefined
3034430330
this[kFactory] = factory
30331+
30332+
this.on('connectionError', (origin, targets, error) => {
30333+
// If a connection error occurs, we remove the client from the pool,
30334+
// and emit a connectionError event. They will not be re-used.
30335+
// Fixes https://github.com/nodejs/undici/issues/3895
30336+
for (const target of targets) {
30337+
// Do not use kRemoveClient here, as it will close the client,
30338+
// but the client cannot be closed in this state.
30339+
const idx = this[kClients].indexOf(target)
30340+
if (idx !== -1) {
30341+
this[kClients].splice(idx, 1)
30342+
}
30343+
}
30344+
})
3034530345
}
3034630346

3034730347
[kGetDispatcher] () {

0 commit comments

Comments
 (0)