Compare commits

...
Author SHA1 Message Date
create-app-token-action-releaser[bot] 62c293567b chore: update dist files 2026-12-05 04:39:47 +00:00
create-app-token-action-releaser[bot] 7fa28c5965 chore(main): release 3.4.1 2026-12-05 04:39:31 +00:00
dependabot[bot] dfd707cab9 fix(deps): bump p-retry from 8.0.1 to 9.0.0 (#418)
Bumps [p-retry](https://github.com/sindresorhus/p-retry) from 8.0.1 to
9.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/sindresorhus/p-retry/releases">p-retry's
releases</a>.</em></p>
<blockquote>
<h2>v9.0.0</h2>
<h3>Breaking</h3>
<ul>
<li>Once <code>signal</code> is aborted, the promise always rejects with
the abort reason and no more callbacks are called dff55ff 1d8bd87
62d4a51
<ul>
<li>Before, if the abort came during an attempt or a callback,
<code>shouldConsumeRetry</code>, <code>onFailedAttempt</code>, and
<code>shouldRetry</code> could still run. The promise could also reject
with the operation's error instead of the abort reason.</li>
<li>The abort reason now also wins over an <code>AbortError</code>
thrown by the operation.</li>
</ul>
</li>
<li><code>shouldConsumeRetry</code> returning nothing now counts as
<code>true</code> e80456b
<ul>
<li>Before, a callback that forgot to <code>return</code> made failures
skip the <code>retries</code> budget, so retries never ran out.</li>
</ul>
</li>
<li>Validate the <code>randomize</code>, <code>unref</code>, and
<code>signal</code> options e80456b dff55ff
<ul>
<li><code>randomize</code> and <code>unref</code> must be booleans, and
<code>signal</code> must be an <code>AbortSignal</code>. Other values
now throw a <code>TypeError</code>.</li>
</ul>
</li>
</ul>
<h3>Improvements</h3>
<ul>
<li>Make the <code>message</code> argument of <code>AbortError</code>
optional 62d4a51</li>
<li>Keep the <code>this</code> type of the function passed to
<code>makeRetriable</code> 2f34d75</li>
<li>Allow explicitly passing <code>undefined</code> for options when
using <code>exactOptionalPropertyTypes</code> 2f34d75</li>
</ul>
<h3>Fixes</h3>
<ul>
<li>Fix very long retry delays firing immediately  4100a6d
<ul>
<li><code>setTimeout</code> runs a delay above 2147483647ms (about 24.9
days) right away. Delays are now capped at that value.</li>
</ul>
</li>
<li>Fix <code>NaN</code> retry delay when <code>minTimeout</code> is
<code>0</code> and <code>factor</code> grows to <code>Infinity</code>
4100a6d</li>
<li>Fix a nested <code>AbortError</code> escaping instead of its cause
dff55ff</li>
<li>Fix a thrown value that cannot be stringified replacing the real
failure 9ba0763</li>
<li>Fix the stack of the error wrapped by <code>AbortError</code>
00a53aa 33d5e2b
<ul>
<li>It now has the correct message and starts at the caller instead of
inside p-retry.</li>
</ul>
</li>
<li>Call <code>shouldConsumeRetry</code> also when
<code>maxRetryTime</code> has run out, so the callbacks always run in
the documented order bd5d4a8</li>
<li>Report <code>retryDelay: 0</code> for a <code>TypeError</code> that
is never retried 127e14e</li>
</ul>
<hr />
<p><a
href="https://github.com/sindresorhus/p-retry/compare/v8.0.1...v9.0.0">https://github.com/sindresorhus/p-retry/compare/v8.0.1...v9.0.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/sindresorhus/p-retry/commit/ac3c4cdb7f015e1f71825e4274e2323a49b615eb"><code>ac3c4cd</code></a>
9.0.0</li>
<li><a
href="https://github.com/sindresorhus/p-retry/commit/2f34d753ec4163e1959b89fc263a2b2b98801bea"><code>2f34d75</code></a>
Tweaks</li>
<li><a
href="https://github.com/sindresorhus/p-retry/commit/f6e099a4aaa00cce64ebc787818cbfba5e9df856"><code>f6e099a</code></a>
Drop the <code>Number.isFinite</code> special cases for
<code>retries</code></li>
<li><a
href="https://github.com/sindresorhus/p-retry/commit/33d5e2beb58f81db172f36c7f1bcc79d9107625f"><code>33d5e2b</code></a>
Start the stack of the wrapped AbortError error at the caller</li>
<li><a
href="https://github.com/sindresorhus/p-retry/commit/90dd863d3d3078b83cbe4c7c7d706f1d95592b8b"><code>90dd863</code></a>
More tests</li>
<li><a
href="https://github.com/sindresorhus/p-retry/commit/84125f74bd6cb6c7508f89aebc422ec3236e0bc0"><code>84125f7</code></a>
Fix the readme structure and sync the <code>retryDelay</code> note</li>
<li><a
href="https://github.com/sindresorhus/p-retry/commit/11cd55b001a076d72fbcd57ae48ab131dd56f49e"><code>11cd55b</code></a>
Only compute the retry delay when a retry is still possible</li>
<li><a
href="https://github.com/sindresorhus/p-retry/commit/127e14ef77ddb49c32615cbfd45d5584bdcdaae0"><code>127e14e</code></a>
Round a fractional <code>maxTimeout</code> up</li>
<li><a
href="https://github.com/sindresorhus/p-retry/commit/4a2fb437465d2d75870cb71e7ba18558c29a60a7"><code>4a2fb43</code></a>
Simplify the tests and add missing coverage</li>
<li><a
href="https://github.com/sindresorhus/p-retry/commit/ece57b2920f5185d60e755fa516133411af1c938"><code>ece57b2</code></a>
Improve the docs for zero delays and aborts</li>
<li>Additional commits viewable in <a
href="https://github.com/sindresorhus/p-retry/compare/v8.0.1...v9.0.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=p-retry&package-manager=npm_and_yarn&previous-version=8.0.1&new-version=9.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-12-04 20:38:41 -08:00
dependabot[bot] 5cb53d9b48 build(deps-dev): bump undici from 8.12.4 to 8.14.0 in the development-dependencies group (#417)
Bumps the development-dependencies group with 1 update:
[undici](https://github.com/nodejs/undici).

Updates `undici` from 8.12.4 to 8.14.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/nodejs/undici/releases">undici's
releases</a>.</em></p>
<blockquote>
<h2>v8.14.0</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(deduplicate): do not deduplicate requests with a body by <a
href="https://github.com/arshsmith1"><code>@​arshsmith1</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/6240">nodejs/undici#6240</a></li>
<li>feat(decompress): add preserveHeaders option by <a
href="https://github.com/domenic"><code>@​domenic</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/6239">nodejs/undici#6239</a></li>
<li>fix(fetch): preserve falsy abort reasons by <a
href="https://github.com/rome-xi"><code>@​rome-xi</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/6232">nodejs/undici#6232</a></li>
<li>fix(socks5): handle bracketed IPv6 literals for proxy and target
hosts by <a
href="https://github.com/hoanle0126"><code>@​hoanle0126</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/6243">nodejs/undici#6243</a></li>
<li>fix(cache): restore backing list in place on failed batch operations
by <a href="https://github.com/hoanle0126"><code>@​hoanle0126</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/6245">nodejs/undici#6245</a></li>
<li>build(deps-dev): bump fast-check from 4.10.2 to 4.10.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/nodejs/undici/pull/6252">nodejs/undici#6252</a></li>
<li>build(deps-dev): bump <code>@​fastify/busboy</code> from 3.2.5 to
3.2.6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/nodejs/undici/pull/6250">nodejs/undici#6250</a></li>
<li>build(deps-dev): bump borp from 1.0.0 to 1.0.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/nodejs/undici/pull/6251">nodejs/undici#6251</a></li>
<li>fix: destroy HTTP/1 sockets on error by <a
href="https://github.com/ferhatelmas"><code>@​ferhatelmas</code></a> in
<a
href="https://redirect.github.com/nodejs/undici/pull/6255">nodejs/undici#6255</a></li>
<li>fix(h2): reset aborted streams with CANCEL by <a
href="https://github.com/gabedemesa"><code>@​gabedemesa</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/6201">nodejs/undici#6201</a></li>
<li>fix(http2): dispatch requests before SETTINGS up to the recommended
100 by <a
href="https://github.com/MIbtehajNasar"><code>@​MIbtehajNasar</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/6203">nodejs/undici#6203</a></li>
<li>test(pool): cover a protocol probe whose request is rejected before
dispatch by <a
href="https://github.com/MIbtehajNasar"><code>@​MIbtehajNasar</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/6142">nodejs/undici#6142</a></li>
<li>docs: fix the urllib3 advisory and GOAWAY frame links by <a
href="https://github.com/qodelicious"><code>@​qodelicious</code></a> in
<a
href="https://redirect.github.com/nodejs/undici/pull/6067">nodejs/undici#6067</a></li>
<li>test(h2): check bounded refusals alongside healthy requests by <a
href="https://github.com/BridgeAR"><code>@​BridgeAR</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/6072">nodejs/undici#6072</a></li>
<li>ci: remove the vendored milo directory recursively by <a
href="https://github.com/dylanpulver"><code>@​dylanpulver</code></a> in
<a
href="https://redirect.github.com/nodejs/undici/pull/6071">nodejs/undici#6071</a></li>
<li>feat(retry): add a resume option to disable mid-body resumption by
<a
href="https://github.com/MIbtehajNasar"><code>@​MIbtehajNasar</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/6096">nodejs/undici#6096</a></li>
<li>fix(h2): preserve request AsyncLocalStorage context for body chunks
by <a href="https://github.com/mcollina"><code>@​mcollina</code></a> in
<a
href="https://redirect.github.com/nodejs/undici/pull/6209">nodejs/undici#6209</a></li>
<li>fix(websocket): make WebSocket kRef/kUnref non-enumerable by <a
href="https://github.com/jasnell"><code>@​jasnell</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/5795">nodejs/undici#5795</a></li>
<li>fix(websocket): add brand-checks to WebSocket kRef/kUnref by <a
href="https://github.com/jasnell"><code>@​jasnell</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/5798">nodejs/undici#5798</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/rome-xi"><code>@​rome-xi</code></a> made
their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/6232">nodejs/undici#6232</a></li>
<li><a
href="https://github.com/hoanle0126"><code>@​hoanle0126</code></a> made
their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/6243">nodejs/undici#6243</a></li>
<li><a
href="https://github.com/gabedemesa"><code>@​gabedemesa</code></a> made
their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/6201">nodejs/undici#6201</a></li>
<li><a
href="https://github.com/dylanpulver"><code>@​dylanpulver</code></a>
made their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/6071">nodejs/undici#6071</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v8.13.1...v8.14.0">https://github.com/nodejs/undici/compare/v8.13.1...v8.14.0</a></p>
<h2>v8.13.1</h2>
<h2>What's Changed</h2>
<ul>
<li>fix(agent): close unused pool after aborted request by <a
href="https://github.com/helmipradita"><code>@​helmipradita</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/6211">nodejs/undici#6211</a></li>
<li>fix(h2): replace a connection whose PING goes unanswered by <a
href="https://github.com/MIbtehajNasar"><code>@​MIbtehajNasar</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/6074">nodejs/undici#6074</a></li>
<li>fix(proxy-agent): decode SOCKS5 credentials from the proxy URI by <a
href="https://github.com/alkaz-nodemaven"><code>@​alkaz-nodemaven</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/6040">nodejs/undici#6040</a></li>
<li>fix(h2): preserve request AsyncLocalStorage context for onInfo by <a
href="https://github.com/mcollina"><code>@​mcollina</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/6208">nodejs/undici#6208</a></li>
<li>fix(fetch): preserve empty strings when inspecting
<code>FormData</code> by <a
href="https://github.com/LiviaMedeiros"><code>@​LiviaMedeiros</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/6183">nodejs/undici#6183</a></li>
<li>fix: do not send a request on a connection verified for another
servername by <a
href="https://github.com/mcollina"><code>@​mcollina</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/6233">nodejs/undici#6233</a></li>
<li>fix(pipeline): abort request when response body is dropped early by
<a href="https://github.com/ferhatelmas"><code>@​ferhatelmas</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/6225">nodejs/undici#6225</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/helmipradita"><code>@​helmipradita</code></a>
made their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/6211">nodejs/undici#6211</a></li>
<li><a
href="https://github.com/MIbtehajNasar"><code>@​MIbtehajNasar</code></a>
made their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/6074">nodejs/undici#6074</a></li>
<li><a
href="https://github.com/alkaz-nodemaven"><code>@​alkaz-nodemaven</code></a>
made their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/6040">nodejs/undici#6040</a></li>
<li><a
href="https://github.com/ferhatelmas"><code>@​ferhatelmas</code></a>
made their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/6225">nodejs/undici#6225</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v8.13.0...v8.13.1">https://github.com/nodejs/undici/compare/v8.13.0...v8.13.1</a></p>
<h2>v8.13.0</h2>
<h2>What's Changed</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/nodejs/undici/commit/f7a6f8f89b503aae3a3e30700c7bca2874c98387"><code>f7a6f8f</code></a>
Bumped v8.14.0 (<a
href="https://redirect.github.com/nodejs/undici/issues/6262">#6262</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/4a7eb932c1a84aa0f429db38cd3661111e0cec36"><code>4a7eb93</code></a>
fix(websocket): add brand-checks to WebSocket kRef/kUnref (<a
href="https://redirect.github.com/nodejs/undici/issues/5798">#5798</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/d69e48edcd548db2221ad7d4e63759fe3d2b5563"><code>d69e48e</code></a>
fix(websocket): make kRef/kUnref non-enumerable (<a
href="https://redirect.github.com/nodejs/undici/issues/5795">#5795</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/3277b3ace37cf5757f5063497928cd1a4ea3a31f"><code>3277b3a</code></a>
fix(h2): preserve request AsyncLocalStorage context for body chunks (<a
href="https://redirect.github.com/nodejs/undici/issues/6209">#6209</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/30a88a17b195eb03275c94594bb39876122c7cd5"><code>30a88a1</code></a>
feat(retry): add a resume option to disable mid-body resumption (<a
href="https://redirect.github.com/nodejs/undici/issues/6096">#6096</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/72709b15651f77ecf80047cb919d8b5c9e4cd297"><code>72709b1</code></a>
ci: remove the vendored milo directory recursively (<a
href="https://redirect.github.com/nodejs/undici/issues/6071">#6071</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/60a96dc850ed48913281365b7c76ce0221e17402"><code>60a96dc</code></a>
test(h2): check bounded refusals alongside healthy requests (<a
href="https://redirect.github.com/nodejs/undici/issues/6072">#6072</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/f944001d79e221bdf6f6f6509896d89a6105bcac"><code>f944001</code></a>
docs: fix the urllib3 advisory and GOAWAY frame links (<a
href="https://redirect.github.com/nodejs/undici/issues/6067">#6067</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/180d007e6ed1c7f8d3c8796f8fe4072e3ea01c46"><code>180d007</code></a>
test(pool): cover a protocol probe whose request is rejected before
dispatch ...</li>
<li><a
href="https://github.com/nodejs/undici/commit/dd2bd50a6ce78e3ad4f352aff1c62935abcac27b"><code>dd2bd50</code></a>
fix(http2): dispatch requests before SETTINGS up to the recommended 100
(<a
href="https://redirect.github.com/nodejs/undici/issues/6203">#6203</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/nodejs/undici/compare/v8.12.4...v8.14.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=undici&package-manager=npm_and_yarn&previous-version=8.12.4&new-version=8.14.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-12-04 20:37:10 -08:00
5 changed files with 101 additions and 85 deletions

No files matched your search

+1 -1
View File
@@ -1,3 +1,3 @@
{
".": "3.4.0"
".": "3.4.1"
}
+7
View File
@@ -1,5 +1,12 @@
# Changelog
## [3.4.1](https://github.com/actions/create-github-app-token/compare/v3.4.0...v3.4.1) (2026-12-05)
### Bug Fixes
* **deps:** bump p-retry from 8.0.1 to 9.0.0 ([#418](https://github.com/actions/create-github-app-token/issues/418)) ([dfd707c](https://github.com/actions/create-github-app-token/commit/dfd707cab9acab8d10acd802f1cde7a30f17d644))
## [3.4.0](https://github.com/actions/create-github-app-token/compare/v3.3.0...v3.4.0) (2026-11-18)
+79 -70
View File
@@ -23891,54 +23891,60 @@ function validateRetries(retries) {
throw new TypeError("Expected `retries` to be a number or Infinity.");
}
}
function validateNumberOption(name, value, { min = 0, allowInfinity = false } = {}) {
if (value === void 0) {
return;
}
function validateNumberOption(name, value, { allowInfinity = false } = {}) {
if (typeof value !== "number" || Number.isNaN(value)) {
throw new TypeError(`Expected \`${name}\` to be a number${allowInfinity ? " or Infinity" : ""}.`);
}
if (!allowInfinity && !Number.isFinite(value)) {
throw new TypeError(`Expected \`${name}\` to be a finite number.`);
}
if (value < min) {
throw new TypeError(`Expected \`${name}\` to be \u2265 ${min}.`);
if (value < 0) {
throw new TypeError(`Expected \`${name}\` to be \u2265 0.`);
}
}
function validateFunctionOption(name, value) {
if (value === void 0) {
function validateOption(name, value, type) {
if (value === void 0 || value === null) {
return;
}
if (typeof value !== "function") {
throw new TypeError(`Expected \`${name}\` to be a function.`);
if (typeof value !== type) {
throw new TypeError(`Expected \`${name}\` to be a ${type}.`);
}
}
var AbortError = class extends Error {
function validateSignal(value) {
if (value === void 0 || value === null) {
return;
}
if (typeof value.throwIfAborted !== "function" || typeof value.addEventListener !== "function" || typeof value.removeEventListener !== "function") {
throw new TypeError("Expected `signal` to be an AbortSignal.");
}
}
var AbortError = class _AbortError extends Error {
constructor(message) {
super();
super(typeof message === "string" ? message : void 0);
this.name = "AbortError";
if (message instanceof Error) {
this.originalError = message;
({ message } = message);
} else {
this.originalError = new Error(message);
this.originalError.stack = this.stack;
({ message } = this.originalError);
Error.captureStackTrace?.(this.originalError, _AbortError);
}
this.name = "AbortError";
this.message = message;
}
};
var maximumDelay = 2 ** 31 - 1;
function calculateDelay(retriesConsumed, options) {
const attempt = Math.max(1, retriesConsumed + 1);
if (options.minTimeout === 0) {
return 0;
}
const attempt = retriesConsumed + 1;
const random = options.randomize ? Math.random() + 1 : 1;
let timeout = Math.round(random * options.minTimeout * options.factor ** (attempt - 1));
timeout = Math.min(timeout, options.maxTimeout);
return timeout;
const timeout = Math.round(random * options.minTimeout * options.factor ** (attempt - 1));
return Math.min(timeout, Math.ceil(options.maxTimeout), maximumDelay);
}
function calculateRemainingTime(start, max) {
if (!Number.isFinite(max)) {
return max;
}
return max - (performance.now() - start);
return Number.isFinite(max) ? max - (performance.now() - start) : max;
}
async function delayForRetry(delay, options) {
if (delay <= 0) {
@@ -23947,7 +23953,6 @@ async function delayForRetry(delay, options) {
await new Promise((resolve2, reject) => {
const onAbort = () => {
clearTimeout(timeoutToken);
options.signal?.removeEventListener("abort", onAbort);
reject(options.signal.reason);
};
const timeoutToken = setTimeout(() => {
@@ -23960,35 +23965,43 @@ async function delayForRetry(delay, options) {
options.signal?.addEventListener("abort", onAbort, { once: true });
});
}
function stringifyThrownValue(value) {
try {
return String(value);
} catch {
return Object.prototype.toString.call(value);
}
}
function unwrapAbortError(error2) {
let cause = error2;
while (cause instanceof AbortError && cause.originalError instanceof Error) {
cause = cause.originalError;
}
return cause;
}
async function onAttemptFailure({ error: error2, attemptNumber, retriesConsumed, startTime, options }) {
const normalizedError = error2 instanceof Error ? error2 : new TypeError(`Non-error was thrown: "${error2}". You should only throw errors.`);
const abortIfNeeded = () => {
options.signal?.throwIfAborted();
};
const normalizedError = error2 instanceof Error ? error2 : new TypeError(`Non-error was thrown: "${stringifyThrownValue(error2)}". You should only throw errors.`);
abortIfNeeded();
if (normalizedError instanceof AbortError) {
throw normalizedError.originalError;
}
const retriesLeft = Number.isFinite(options.retries) ? Math.max(0, options.retries - retriesConsumed) : options.retries;
const maxRetryTime = options.maxRetryTime ?? Number.POSITIVE_INFINITY;
const delayTime = calculateDelay(retriesConsumed, options);
const remainingTimeBeforeCallbacks = calculateRemainingTime(startTime, maxRetryTime);
if (remainingTimeBeforeCallbacks <= 0) {
const context2 = Object.freeze({
error: normalizedError,
attemptNumber,
retriesLeft,
retriesConsumed,
retryDelay: 0
});
await options.onFailedAttempt(context2);
throw normalizedError;
throw unwrapAbortError(normalizedError);
}
const retriesLeft = options.retries - retriesConsumed;
const isRetriableError = !(normalizedError instanceof TypeError) || isNetworkError(normalizedError);
const timeLeft = calculateRemainingTime(startTime, options.maxRetryTime);
const delayTime = isRetriableError && timeLeft > 0 && retriesLeft > 0 ? calculateDelay(retriesConsumed, options) : 0;
const consumeRetryContext = Object.freeze({
error: normalizedError,
attemptNumber,
retriesLeft,
retriesConsumed,
retryDelay: retriesLeft > 0 ? delayTime : 0
retryDelay: delayTime
});
const consumeRetry = await options.shouldConsumeRetry(consumeRetryContext);
const effectiveDelay = consumeRetry && retriesLeft > 0 ? delayTime : 0;
const consumeRetry = await options.shouldConsumeRetry(consumeRetryContext) ?? true;
abortIfNeeded();
const effectiveDelay = consumeRetry ? delayTime : 0;
const context = Object.freeze({
error: normalizedError,
attemptNumber,
@@ -23997,64 +24010,60 @@ async function onAttemptFailure({ error: error2, attemptNumber, retriesConsumed,
retryDelay: effectiveDelay
});
await options.onFailedAttempt(context);
if (calculateRemainingTime(startTime, maxRetryTime) <= 0) {
abortIfNeeded();
const remainingTime = calculateRemainingTime(startTime, options.maxRetryTime);
if (!isRetriableError || remainingTime <= 0 || retriesLeft <= 0) {
throw normalizedError;
}
const remainingTime = calculateRemainingTime(startTime, maxRetryTime);
if (remainingTime <= 0 || retriesLeft <= 0) {
const shouldRetry = await options.shouldRetry(context);
abortIfNeeded();
if (!shouldRetry) {
throw normalizedError;
}
if (normalizedError instanceof TypeError && !isNetworkError(normalizedError)) {
throw normalizedError;
}
if (!await options.shouldRetry(context)) {
throw normalizedError;
}
const remainingTimeAfterShouldRetry = calculateRemainingTime(startTime, maxRetryTime);
const remainingTimeAfterShouldRetry = calculateRemainingTime(startTime, options.maxRetryTime);
if (remainingTimeAfterShouldRetry <= 0) {
throw normalizedError;
}
if (!consumeRetry) {
options.signal?.throwIfAborted();
return false;
}
const finalDelay = Math.min(effectiveDelay, remainingTimeAfterShouldRetry);
options.signal?.throwIfAborted();
await delayForRetry(finalDelay, options);
options.signal?.throwIfAborted();
await delayForRetry(Math.min(effectiveDelay, remainingTimeAfterShouldRetry), options);
return true;
}
async function pRetry(input, options = {}) {
options = { ...options };
options.retries ??= 10;
validateRetries(options.retries);
if (Object.hasOwn(options, "forever")) {
throw new Error("The `forever` option is no longer supported. For many use-cases, you can set `retries: Infinity` instead.");
}
options.retries ??= 10;
options.factor ??= 2;
options.minTimeout ??= 1e3;
options.maxTimeout ??= Number.POSITIVE_INFINITY;
options.maxRetryTime ??= Number.POSITIVE_INFINITY;
options.maxTimeout ??= Infinity;
options.maxRetryTime ??= Infinity;
options.randomize ??= false;
options.onFailedAttempt ??= () => {
};
options.shouldRetry ??= () => true;
options.shouldConsumeRetry ??= () => true;
validateFunctionOption("onFailedAttempt", options.onFailedAttempt);
validateFunctionOption("shouldRetry", options.shouldRetry);
validateFunctionOption("shouldConsumeRetry", options.shouldConsumeRetry);
validateNumberOption("factor", options.factor, { min: 0, allowInfinity: false });
validateNumberOption("minTimeout", options.minTimeout, { min: 0, allowInfinity: false });
validateNumberOption("maxTimeout", options.maxTimeout, { min: 0, allowInfinity: true });
validateNumberOption("maxRetryTime", options.maxRetryTime, { min: 0, allowInfinity: true });
if (!(options.factor > 0)) {
validateOption("onFailedAttempt", options.onFailedAttempt, "function");
validateOption("shouldRetry", options.shouldRetry, "function");
validateOption("shouldConsumeRetry", options.shouldConsumeRetry, "function");
validateOption("randomize", options.randomize, "boolean");
validateOption("unref", options.unref, "boolean");
validateSignal(options.signal);
validateNumberOption("factor", options.factor);
validateNumberOption("minTimeout", options.minTimeout);
validateNumberOption("maxTimeout", options.maxTimeout, { allowInfinity: true });
validateNumberOption("maxRetryTime", options.maxRetryTime, { allowInfinity: true });
if (options.factor === 0) {
options.factor = 1;
}
options.signal?.throwIfAborted();
let attemptNumber = 0;
let retriesConsumed = 0;
const startTime = performance.now();
while (Number.isFinite(options.retries) ? retriesConsumed <= options.retries : true) {
while (retriesConsumed <= options.retries) {
attemptNumber++;
try {
options.signal?.throwIfAborted();
+11 -11
View File
@@ -1,26 +1,26 @@
{
"name": "create-github-app-token",
"version": "3.4.0",
"version": "3.4.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "create-github-app-token",
"version": "3.4.0",
"version": "3.4.1",
"license": "MIT",
"dependencies": {
"@actions/core": "^3.0.1",
"@octokit/auth-app": "^8.3.1",
"@octokit/request": "^10.0.8",
"is-network-error": "^1.3.2",
"p-retry": "^8.0.1"
"p-retry": "^9.0.0"
},
"devDependencies": {
"@octokit/openapi": "^24.0.0",
"c8": "^12.0.0",
"esbuild": "^0.28.2",
"open-cli": "^9.0.0",
"undici": "^8.12.4",
"undici": "^8.14.0",
"yaml": "^2.9.1"
},
"engines": {
@@ -1498,12 +1498,12 @@
}
},
"node_modules/p-retry": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/p-retry/-/p-retry-8.0.1.tgz",
"integrity": "sha512-NAigyu8hfvJe7MsS18mnc4is0MZtau3QMdBklaJKK23oBQb6occO3UPM3vHmTckW8KhfyjMZaUOqdTFEYliHgg==",
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/p-retry/-/p-retry-9.0.0.tgz",
"integrity": "sha512-HuEats8gYn/UUYa5uyveyQGv75mQmwdFtuMgnZlS12dj/7bdnJSO6keaTjgcZUhvkANTj5EO3lACUmV3xmgj0Q==",
"license": "MIT",
"dependencies": {
"is-network-error": "^1.3.0"
"is-network-error": "^1.3.2"
},
"engines": {
"node": ">=22"
@@ -1806,9 +1806,9 @@
}
},
"node_modules/undici": {
"version": "8.12.4",
"resolved": "https://registry.npmjs.org/undici/-/undici-8.12.4.tgz",
"integrity": "sha512-8Mx+uNKKER2bA4AdtedkqRbwUCIJFr2nJckXRe5yrDqzePqwLP7VNcctN8/XdmDSbF7mS+jJKIszlL+vbam1VA==",
"version": "8.14.0",
"resolved": "https://registry.npmjs.org/undici/-/undici-8.14.0.tgz",
"integrity": "sha512-MqM6wqORYo0jb1WFUwFKZTFWFz6VeBMPj9op5Hq+RvlrQjISQCyLEfx5+/iqOLWC/LL1HliJ5t0NP1BgYpXeVQ==",
"dev": true,
"license": "MIT",
"engines": {
+3 -3
View File
@@ -2,7 +2,7 @@
"name": "create-github-app-token",
"private": true,
"type": "module",
"version": "3.4.0",
"version": "3.4.1",
"description": "GitHub Action for creating a GitHub App Installation Access Token",
"engines": {
"node": ">=24.4.0"
@@ -20,14 +20,14 @@
"@octokit/auth-app": "^8.3.1",
"@octokit/request": "^10.0.8",
"is-network-error": "^1.3.2",
"p-retry": "^8.0.1"
"p-retry": "^9.0.0"
},
"devDependencies": {
"@octokit/openapi": "^24.0.0",
"c8": "^12.0.0",
"esbuild": "^0.28.2",
"open-cli": "^9.0.0",
"undici": "^8.12.4",
"undici": "^8.14.0",
"yaml": "^2.9.1"
}
}