Compare commits

...

18 Commits

Author SHA1 Message Date
semantic-release-bot 5d869da34e build(release): 1.11.0 [skip ci]
# [1.11.0](https://github.com/actions/create-github-app-token/compare/v1.10.4...v1.11.0) (2024-09-11)

### Features

* allow repositories input to be comma or newline-separated ([#169](https://github.com/actions/create-github-app-token/issues/169)) ([796b88d](https://github.com/actions/create-github-app-token/commit/796b88dc585016182c9da7fa3e5dfe98e0a9b19f))
2024-09-11 20:55:26 +00:00
Peter Evans 796b88dc58 feat: allow repositories input to be comma or newline-separated (#169)
Resolves https://github.com/actions/create-github-app-token/issues/106

- Fixes the parsing to cope with whitespace in the input string.
- Allows the input to be comma or newline-separated. (I've done this for
all array-type inputs in my own actions, but I'm happy to remove this if
you only want to support comma-separated.)
- Added tests for parsing comma and newline-separated inputs.
2024-09-11 13:54:50 -07:00
semantic-release-bot 3378cda945 build(release): 1.10.4 [skip ci]
## [1.10.4](https://github.com/actions/create-github-app-token/compare/v1.10.3...v1.10.4) (2024-09-04)

### Bug Fixes

* **deps:** bump the production-dependencies group across 1 directory with 3 updates ([#166](https://github.com/actions/create-github-app-token/issues/166)) ([e177c20](https://github.com/actions/create-github-app-token/commit/e177c20e0f736e68f4a37ffee6aa32c73da13988)), closes [#641](https://github.com/actions/create-github-app-token/issues/641) [#641](https://github.com/actions/create-github-app-token/issues/641) [#639](https://github.com/actions/create-github-app-token/issues/639) [#638](https://github.com/actions/create-github-app-token/issues/638) [#637](https://github.com/actions/create-github-app-token/issues/637) [#636](https://github.com/actions/create-github-app-token/issues/636) [#633](https://github.com/actions/create-github-app-token/issues/633) [#632](https://github.com/actions/create-github-app-token/issues/632) [#631](https://github.com/actions/create-github-app-token/issues/631) [#630](https://github.com/actions/create-github-app-token/issues/630) [#629](https://github.com/actions/create-github-app-token/issues/629) [#714](https://github.com/actions/create-github-app-token/issues/714) [#711](https://github.com/actions/create-github-app-token/issues/711) [#714](https://github.com/actions/create-github-app-token/issues/714) [#716](https://github.com/actions/create-github-app-token/issues/716) [#711](https://github.com/actions/create-github-app-token/issues/711) [#712](https://github.com/actions/create-github-app-token/issues/712) [#710](https://github.com/actions/create-github-app-token/issues/710) [#709](https://github.com/actions/create-github-app-token/issues/709) [#708](https://github.com/actions/create-github-app-token/issues/708) [#702](https://github.com/actions/create-github-app-token/issues/702) [#706](https://github.com/actions/create-github-app-token/issues/706) [#3458](https://github.com/actions/create-github-app-token/issues/3458) [#3461](https://github.com/actions/create-github-app-token/issues/3461) [#3460](https://github.com/actions/create-github-app-token/issues/3460) [#3454](https://github.com/actions/create-github-app-token/issues/3454) [#3450](https://github.com/actions/create-github-app-token/issues/3450) [#3445](https://github.com/actions/create-github-app-token/issues/3445)
2024-09-04 04:41:08 +00:00
dependabot[bot] e177c20e0f fix(deps): bump the production-dependencies group across 1 directory with 3 updates (#166)
Bumps the production-dependencies group with 3 updates in the /
directory: [@octokit/auth-app](https://github.com/octokit/auth-app.js),
[@octokit/request](https://github.com/octokit/request.js) and
[undici](https://github.com/nodejs/undici).

Updates `@octokit/auth-app` from 7.1.0 to 7.1.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/octokit/auth-app.js/releases"><code>@​octokit/auth-app</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v7.1.1</h2>
<h2><a
href="https://github.com/octokit/auth-app.js/compare/v7.1.0...v7.1.1">7.1.1</a>
(2024-09-03)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>respect <code>baseUrl</code> passed as part of request parameters
(<a
href="https://redirect.github.com/octokit/auth-app.js/issues/641">#641</a>)
(<a
href="https://github.com/octokit/auth-app.js/commit/8478cac30ca251951901430e4a695744e449ef48">8478cac</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/octokit/auth-app.js/commit/8478cac30ca251951901430e4a695744e449ef48"><code>8478cac</code></a>
fix: respect <code>baseUrl</code> passed as part of request parameters
(<a
href="https://redirect.github.com/octokit/auth-app.js/issues/641">#641</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/447852ffd190b410dcfcea0fb0bff5667d90755f"><code>447852f</code></a>
build(deps): lock file maintenance (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/639">#639</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/47313fc7236074171ca0298e6c9f331e5404b344"><code>47313fc</code></a>
build(deps): lock file maintenance (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/638">#638</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/bf6d0a45de2f4c59dae22b49c54256235bc902eb"><code>bf6d0a4</code></a>
build(deps): lock file maintenance (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/637">#637</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/afcd20bb5ca8af61fe4070869493b837c442decd"><code>afcd20b</code></a>
build(deps): lock file maintenance (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/636">#636</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/d9001b1504567ff1c55f53a1ccaa5ecad00dfb02"><code>d9001b1</code></a>
build(deps): lock file maintenance (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/633">#633</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/bf1bb9d2d3221733e1ec019ad94b45d8b1de8f8d"><code>bf1bb9d</code></a>
build(deps): lock file maintenance (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/632">#632</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/d8380f99936f9be313a0c5423b8ff57ade5a4413"><code>d8380f9</code></a>
build(deps): lock file maintenance (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/631">#631</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/c525302c92511df4cc6731628e196f1360dd2308"><code>c525302</code></a>
build(deps): lock file maintenance (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/630">#630</a>)</li>
<li><a
href="https://github.com/octokit/auth-app.js/commit/e647e114092a9c58a7a9f8c4407a20d4ebbe4600"><code>e647e11</code></a>
chore(deps): update dependency prettier to v3.3.3 (<a
href="https://redirect.github.com/octokit/auth-app.js/issues/629">#629</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/octokit/auth-app.js/compare/v7.1.0...v7.1.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `@octokit/request` from 9.1.1 to 9.1.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/octokit/request.js/releases"><code>@​octokit/request</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v9.1.3</h2>
<h2><a
href="https://github.com/octokit/request.js/compare/v9.1.2...v9.1.3">9.1.3</a>
(2024-07-14)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>improve toErrorMessage (<a
href="https://redirect.github.com/octokit/request.js/issues/714">#714</a>)
(<a
href="https://github.com/octokit/request.js/commit/fcc5b25e044a2dd0fb8c1a76390eb6da9aa06d42">fcc5b25</a>)</li>
</ul>
<h2>v9.1.2</h2>
<h2><a
href="https://github.com/octokit/request.js/compare/v9.1.1...v9.1.2">9.1.2</a>
(2024-07-13)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>refactor:</strong> async await instead of Promise chain (<a
href="https://redirect.github.com/octokit/request.js/issues/711">#711</a>)
(<a
href="https://github.com/octokit/request.js/commit/611b275b445eb9a5817a003e2f9a6260aba5f477">611b275</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/octokit/request.js/commit/fcc5b25e044a2dd0fb8c1a76390eb6da9aa06d42"><code>fcc5b25</code></a>
fix: improve toErrorMessage (<a
href="https://redirect.github.com/octokit/request.js/issues/714">#714</a>)</li>
<li><a
href="https://github.com/octokit/request.js/commit/f2162d6cea02cf67760d3f4580f0768e5e793844"><code>f2162d6</code></a>
chore(deps): update dependency prettier to v3.3.3 (<a
href="https://redirect.github.com/octokit/request.js/issues/716">#716</a>)</li>
<li><a
href="https://github.com/octokit/request.js/commit/611b275b445eb9a5817a003e2f9a6260aba5f477"><code>611b275</code></a>
fix(refactor): async await instead of Promise chain (<a
href="https://redirect.github.com/octokit/request.js/issues/711">#711</a>)</li>
<li><a
href="https://github.com/octokit/request.js/commit/bc059c87990d078a58e9f64928d46bd1dacdbc8e"><code>bc059c8</code></a>
ci: start testing against 22 (<a
href="https://redirect.github.com/octokit/request.js/issues/712">#712</a>)</li>
<li><a
href="https://github.com/octokit/request.js/commit/9205e49ec5d77e72bcef6d886cc0aab6b73a7ea4"><code>9205e49</code></a>
chore: integrate getBufferResponse (<a
href="https://redirect.github.com/octokit/request.js/issues/710">#710</a>)</li>
<li><a
href="https://github.com/octokit/request.js/commit/2ac28348e2f7334e0dbb5f99d11fbb8a5d0ca78e"><code>2ac2834</code></a>
refactor: assign fetch once (<a
href="https://redirect.github.com/octokit/request.js/issues/709">#709</a>)</li>
<li><a
href="https://github.com/octokit/request.js/commit/94141f4f83c4413b68cc1fad4d6dfb0127147e00"><code>94141f4</code></a>
chore(test): remove fetch-mock from request-common-test.ts (<a
href="https://redirect.github.com/octokit/request.js/issues/708">#708</a>)</li>
<li><a
href="https://github.com/octokit/request.js/commit/af8ef43bbd44d6c0adc9cee5c1d229a49ecc29e0"><code>af8ef43</code></a>
test: use native fetch with mock server (<a
href="https://redirect.github.com/octokit/request.js/issues/702">#702</a>)</li>
<li><a
href="https://github.com/octokit/request.js/commit/eaceec751632fb6b5b328489e79a293aaaab5d28"><code>eaceec7</code></a>
chore(deps): update vitest monorepo to v2 (major) (<a
href="https://redirect.github.com/octokit/request.js/issues/706">#706</a>)</li>
<li><a
href="https://github.com/octokit/request.js/commit/ac95d1e096c4583ea98c5c42878585c20891d32f"><code>ac95d1e</code></a>
chore(deps): update dependency esbuild to ^0.23.0</li>
<li>Additional commits viewable in <a
href="https://github.com/octokit/request.js/compare/v9.1.1...v9.1.3">compare
view</a></li>
</ul>
</details>
<br />

Updates `undici` from 6.19.2 to 6.19.8
<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>v6.19.8</h2>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v6.19.7...v6.19.8">https://github.com/nodejs/undici/compare/v6.19.7...v6.19.8</a></p>
<h2>v6.19.7</h2>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v6.19.6...v6.19.7">https://github.com/nodejs/undici/compare/v6.19.6...v6.19.7</a></p>
<h2>v6.19.6</h2>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v6.19.5...v6.19.6">https://github.com/nodejs/undici/compare/v6.19.5...v6.19.6</a></p>
<h2>v6.19.5</h2>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v6.19.4...v6.19.5">https://github.com/nodejs/undici/compare/v6.19.4...v6.19.5</a></p>
<h2>v6.19.4</h2>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v6.19.3...v6.19.4">https://github.com/nodejs/undici/compare/v6.19.3...v6.19.4</a></p>
<h2>v6.19.3</h2>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v6.19.2...v6.19.3">https://github.com/nodejs/undici/compare/v6.19.2...v6.19.3</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/nodejs/undici/commit/3d3ce0695c8c3f9a8f3c8af90dd42d0569d3f0bb"><code>3d3ce06</code></a>
Bumped v6.19.8</li>
<li><a
href="https://github.com/nodejs/undici/commit/cde714f7f5b8469c5b598bb9d52455891a84386b"><code>cde714f</code></a>
use FinalizationRegistry for cloned response body (<a
href="https://redirect.github.com/nodejs/undici/issues/3458">#3458</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/dbb6b40e69b5e7863c95fb439b9a95c66ba3e9f4"><code>dbb6b40</code></a>
perf: non-recursive implementation of euclidian gcd in balanced pool (<a
href="https://redirect.github.com/nodejs/undici/issues/3461">#3461</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/405a2ce3da0a5f7642b8b1df520d4bb26f91be87"><code>405a2ce</code></a>
use bodyUnusable to check if body is unusable (<a
href="https://redirect.github.com/nodejs/undici/issues/3460">#3460</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/bc463323b41bf2cfa1855236e2579d0961025e10"><code>bc46332</code></a>
build: parametrize the location of wasm-opt (<a
href="https://redirect.github.com/nodejs/undici/issues/3454">#3454</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/52870545df66d9b391bb7200dfccf4490406bf46"><code>5287054</code></a>
test: add test for memory leak (<a
href="https://redirect.github.com/nodejs/undici/issues/3450">#3450</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/c81f5a72d653917da08eb7ccc99e332aed51768c"><code>c81f5a7</code></a>
Bumped v6.19.7</li>
<li><a
href="https://github.com/nodejs/undici/commit/09c566756b042798728b59ee4d4d2033d939e4f1"><code>09c5667</code></a>
build: remove -i flag to docker run to allow command being run without a
TTY</li>
<li><a
href="https://github.com/nodejs/undici/commit/b9bf7adfddeb9cd93a9433a0a1d38e39afa5dfb5"><code>b9bf7ad</code></a>
Bumped v6.19.6</li>
<li><a
href="https://github.com/nodejs/undici/commit/638ee3235de2ce4c2096016e0c54ce66e4c24e5e"><code>638ee32</code></a>
fix: memory leak in finalization first appearing in v6.16.0 (<a
href="https://redirect.github.com/nodejs/undici/issues/3445">#3445</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/nodejs/undici/compare/v6.19.2...v6.19.8">compare
view</a></li>
</ul>
</details>
<br />


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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
Co-authored-by: Parker Brown <17183625+parkerbxyz@users.noreply.github.com>
2024-09-03 21:40:32 -07:00
dependabot[bot] 961c2284dc build(deps-dev): bump the development-dependencies group across 1 directory with 4 updates (#167) 2024-09-03 21:39:02 -07:00
Parker Brown 15db0371da test: fix test file extensions and inputs for repositories (#161)
This pull request fixes the file extension for two test files that were
incorrectly named. This caused them not to be tested. A new test has
been added to ensure all test files have the correct extension.

This also fixes a bug in some tests where `repositories` inputs included
the repository owner. The owner has been removed from these inputs and
the snapshots have been updated.
2024-09-03 20:04:47 -07:00
Parker Brown 9ccc6dbd71 ci(test): add workflow_dispatch trigger 2024-08-08 14:31:42 -07:00
vleon1a 000e2a0d29 docs(readme): document how a Base64 private key could be decoded (#155)
Addressing this comment
https://github.com/actions/create-github-app-token/issues/42#issuecomment-2214599409

---------

Co-authored-by: Parker Brown <17183625+parkerbxyz@users.noreply.github.com>
2024-07-11 22:09:08 +00:00
沙漠之子 d0ac2addd1 docs(README): fix the git committer string and Configure git CLI examples (#151)
1. Fix the `git committer string` and `Configure git CLI` examples.
2. Formatting examples
3. Modify the get `<BOT USER ID>` comment and add a note that
[octokit/request-action](https://github.com/octokit/request-action) can
be used.

---------

Co-authored-by: Parker Brown <17183625+parkerbxyz@users.noreply.github.com>
2024-07-02 20:09:29 -07:00
dependabot[bot] 040c2598aa build(deps-dev): bump the development-dependencies group with 4 updates (#150)
Bumps the development-dependencies group with 4 updates:
[c8](https://github.com/bcoe/c8),
[esbuild](https://github.com/evanw/esbuild),
[execa](https://github.com/sindresorhus/execa) and
[yaml](https://github.com/eemeli/yaml).

Updates `c8` from 9.1.0 to 10.1.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/bcoe/c8/releases">c8's
releases</a>.</em></p>
<blockquote>
<h2>v10.1.2</h2>
<h2><a
href="https://github.com/bcoe/c8/compare/v10.1.1...v10.1.2">10.1.2</a>
(2024-06-13)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>deps:</strong> make monocart-coverage-reports an optional
with meta defined (<a
href="https://github.com/bcoe/c8/commit/3b91fdaa0e5554a72f6e625af3a7254b0cb19e8c">3b91fda</a>)</li>
</ul>
<h2>v10.1.1</h2>
<h2><a
href="https://github.com/bcoe/c8/compare/v10.1.0...v10.1.1">10.1.1</a>
(2024-06-11)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>stop installing monocart-coverage-reports (<a
href="https://redirect.github.com/bcoe/c8/issues/535">#535</a>) (<a
href="https://github.com/bcoe/c8/commit/13979a76b5b44fc6758f350bae4cb3febd60d75e">13979a7</a>)</li>
</ul>
<h2>v10.1.0</h2>
<h2><a
href="https://github.com/bcoe/c8/compare/v10.0.0...v10.1.0">10.1.0</a>
(2024-06-11)</h2>
<h3>Features</h3>
<ul>
<li>add experimental monocart reports (<a
href="https://redirect.github.com/bcoe/c8/issues/521">#521</a>) (<a
href="https://github.com/bcoe/c8/commit/2e5e297ac024bf7af1bc72689b644e11d73eac89">2e5e297</a>)</li>
</ul>
<h2>v10.0.0</h2>
<h2><a
href="https://github.com/bcoe/c8/compare/v9.1.0...v10.0.0">10.0.0</a>
(2024-06-10)</h2>
<h3>⚠ BREAKING CHANGES</h3>
<ul>
<li><strong>deps:</strong> Node 18 is now the minimum supported Node.js
version</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>deps:</strong> update test-exclude with new glob / minimatch
(<a href="https://redirect.github.com/bcoe/c8/issues/531">#531</a>) (<a
href="https://github.com/bcoe/c8/commit/e33cf30d0c44470f9c87553df487e2f27f58f4ac">e33cf30</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/bcoe/c8/blob/main/CHANGELOG.md">c8's
changelog</a>.</em></p>
<blockquote>
<h2><a
href="https://github.com/bcoe/c8/compare/v10.1.1...v10.1.2">10.1.2</a>
(2024-06-13)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>deps:</strong> make monocart-coverage-reports an optional
with meta defined (<a
href="https://github.com/bcoe/c8/commit/3b91fdaa0e5554a72f6e625af3a7254b0cb19e8c">3b91fda</a>)</li>
</ul>
<h2><a
href="https://github.com/bcoe/c8/compare/v10.1.0...v10.1.1">10.1.1</a>
(2024-06-11)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>stop installing monocart-coverage-reports (<a
href="https://redirect.github.com/bcoe/c8/issues/535">#535</a>) (<a
href="https://github.com/bcoe/c8/commit/13979a76b5b44fc6758f350bae4cb3febd60d75e">13979a7</a>)</li>
</ul>
<h2><a
href="https://github.com/bcoe/c8/compare/v10.0.0...v10.1.0">10.1.0</a>
(2024-06-11)</h2>
<h3>Features</h3>
<ul>
<li>add experimental monocart reports (<a
href="https://redirect.github.com/bcoe/c8/issues/521">#521</a>) (<a
href="https://github.com/bcoe/c8/commit/2e5e297ac024bf7af1bc72689b644e11d73eac89">2e5e297</a>)</li>
</ul>
<h2><a
href="https://github.com/bcoe/c8/compare/v9.1.0...v10.0.0">10.0.0</a>
(2024-06-10)</h2>
<h3>⚠ BREAKING CHANGES</h3>
<ul>
<li><strong>deps:</strong> Node 18 is now the minimum supported Node.js
version</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>deps:</strong> update test-exclude with new glob / minimatch
(<a href="https://redirect.github.com/bcoe/c8/issues/531">#531</a>) (<a
href="https://github.com/bcoe/c8/commit/e33cf30d0c44470f9c87553df487e2f27f58f4ac">e33cf30</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bcoe/c8/commit/ff146b4dde004c62651b57c33cedd8353c94c423"><code>ff146b4</code></a>
chore(main): release 10.1.2 (<a
href="https://redirect.github.com/bcoe/c8/issues/538">#538</a>)</li>
<li><a
href="https://github.com/bcoe/c8/commit/3b91fdaa0e5554a72f6e625af3a7254b0cb19e8c"><code>3b91fda</code></a>
fix(deps): make monocart-coverage-reports an optional with meta
defined</li>
<li><a
href="https://github.com/bcoe/c8/commit/e3560e1211718d361612457245e57e638b8001d2"><code>e3560e1</code></a>
chore(main): release 10.1.1 (<a
href="https://redirect.github.com/bcoe/c8/issues/536">#536</a>)</li>
<li><a
href="https://github.com/bcoe/c8/commit/13979a76b5b44fc6758f350bae4cb3febd60d75e"><code>13979a7</code></a>
fix: stop installing monocart-coverage-reports (<a
href="https://redirect.github.com/bcoe/c8/issues/535">#535</a>)</li>
<li><a
href="https://github.com/bcoe/c8/commit/15ac6905cd274fafce1abb9c52b0d430a78e7b1b"><code>15ac690</code></a>
chore(main): release 10.1.0 (<a
href="https://redirect.github.com/bcoe/c8/issues/533">#533</a>)</li>
<li><a
href="https://github.com/bcoe/c8/commit/96e869ff8c8ff279207865ccf71b605044405d32"><code>96e869f</code></a>
build(deps-dev): bump braces from 3.0.2 to 3.0.3 (<a
href="https://redirect.github.com/bcoe/c8/issues/534">#534</a>)</li>
<li><a
href="https://github.com/bcoe/c8/commit/2e5e297ac024bf7af1bc72689b644e11d73eac89"><code>2e5e297</code></a>
feat: add experimental monocart reports (<a
href="https://redirect.github.com/bcoe/c8/issues/521">#521</a>)</li>
<li><a
href="https://github.com/bcoe/c8/commit/dc38051b14a3df9ca09aeea098b2233bc015dd4a"><code>dc38051</code></a>
chore(main): release 10.0.0 (<a
href="https://redirect.github.com/bcoe/c8/issues/532">#532</a>)</li>
<li><a
href="https://github.com/bcoe/c8/commit/e33cf30d0c44470f9c87553df487e2f27f58f4ac"><code>e33cf30</code></a>
fix(deps)!: update test-exclude with new glob / minimatch (<a
href="https://redirect.github.com/bcoe/c8/issues/531">#531</a>)</li>
<li><a
href="https://github.com/bcoe/c8/commit/1eeeaebe659d0e3be143f52695d342b042241f59"><code>1eeeaeb</code></a>
doc(CONTRIBUTING): remove dead link, update broken link (<a
href="https://redirect.github.com/bcoe/c8/issues/526">#526</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/bcoe/c8/compare/v9.1.0...v10.1.2">compare
view</a></li>
</ul>
</details>
<br />

Updates `esbuild` from 0.21.4 to 0.22.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/evanw/esbuild/releases">esbuild's
releases</a>.</em></p>
<blockquote>
<h2>v0.22.0</h2>
<p><strong>This release deliberately contains backwards-incompatible
changes.</strong> To avoid automatically picking up releases like this,
you should either be pinning the exact version of <code>esbuild</code>
in your <code>package.json</code> file (recommended) or be using a
version range syntax that only accepts patch upgrades such as
<code>^0.21.0</code> or <code>~0.21.0</code>. See npm's documentation
about <a
href="https://docs.npmjs.com/cli/v6/using-npm/semver/">semver</a> for
more information.</p>
<ul>
<li>
<p>Omit packages from bundles by default when targeting node (<a
href="https://redirect.github.com/evanw/esbuild/issues/1874">#1874</a>,
<a
href="https://redirect.github.com/evanw/esbuild/issues/2830">#2830</a>,
<a
href="https://redirect.github.com/evanw/esbuild/issues/2846">#2846</a>,
<a
href="https://redirect.github.com/evanw/esbuild/issues/2915">#2915</a>,
<a
href="https://redirect.github.com/evanw/esbuild/issues/3145">#3145</a>,
<a
href="https://redirect.github.com/evanw/esbuild/issues/3294">#3294</a>,
<a
href="https://redirect.github.com/evanw/esbuild/issues/3323">#3323</a>,
<a
href="https://redirect.github.com/evanw/esbuild/issues/3582">#3582</a>,
<a
href="https://redirect.github.com/evanw/esbuild/issues/3809">#3809</a>,
<a
href="https://redirect.github.com/evanw/esbuild/issues/3815">#3815</a>)</p>
<p>This breaking change is an experiment. People are commonly confused
when using esbuild to bundle code for node (i.e. for
<code>--platform=node</code>) because some packages may not be intended
for bundlers, and may use node-specific features that don't work with a
bundler. Even though esbuild's &quot;getting started&quot; instructions
say to use <code>--packages=external</code> to work around this problem,
many people don't read the documentation and don't do this, and are then
confused when it doesn't work. So arguably this is a bad default
behavior for esbuild to have if people keep tripping over this.</p>
<p>With this release, esbuild will now omit packages from the bundle by
default when the platform is <code>node</code> (i.e. the previous
behavior of <code>--packages=external</code> is now the default in this
case). <em>Note that your dependencies must now be present on the file
system when your bundle is run.</em> If you don't want this behavior,
you can do <code>--packages=bundle</code> to allow packages to be
included in the bundle (i.e. the previous default behavior). Note that
<code>--packages=bundle</code> doesn't mean all packages are bundled,
just that packages are allowed to be bundled. You can still exclude
individual packages from the bundle using <code>--external:</code> even
when <code>--packages=bundle</code> is present.</p>
<p>The <code>--packages=</code> setting considers all import paths that
&quot;look like&quot; package imports in the original source code to be
package imports. Specifically import paths that don't start with a path
segment of <code>/</code> or <code>.</code> or <code>..</code> are
considered to be package imports. The only two exceptions to this rule
are <a
href="https://nodejs.org/api/packages.html#subpath-imports">subpath
imports</a> (which start with a <code>#</code> character) and TypeScript
path remappings via <code>paths</code> and/or <code>baseUrl</code> in
<code>tsconfig.json</code> (which are applied first).</p>
</li>
<li>
<p>Drop support for older platforms (<a
href="https://redirect.github.com/evanw/esbuild/issues/3802">#3802</a>)</p>
<p>This release drops support for the following operating systems:</p>
<ul>
<li>Windows 7</li>
<li>Windows 8</li>
<li>Windows Server 2008</li>
<li>Windows Server 2012</li>
</ul>
<p>This is because the Go programming language dropped support for these
operating system versions in <a
href="https://go.dev/doc/go1.21#windows">Go 1.21</a>, and this release
updates esbuild from Go 1.20 to Go 1.22.</p>
<p>Note that this only affects the binary esbuild executables that are
published to the <code>esbuild</code> npm package. It's still possible
to compile esbuild's source code for these older operating systems. If
you need to, you can compile esbuild for yourself using an older version
of the Go compiler (before Go version 1.21). That might look something
like this:</p>
<pre><code>git clone https://github.com/evanw/esbuild.git
cd esbuild
go build ./cmd/esbuild
./esbuild.exe --version
</code></pre>
<p>In addition, this release increases the minimum required node version
for esbuild's JavaScript API from node 12 to node 18. Node 18 is the
oldest version of node that is still being supported (see node's <a
href="https://nodejs.org/en/about/previous-releases">release
schedule</a> for more information). This increase is because of an
incompatibility between the JavaScript that the Go compiler generates
for the <code>esbuild-wasm</code> package and versions of node before
node 17.4 (specifically the <code>crypto.getRandomValues</code>
function).</p>
</li>
<li>
<p>Update <code>await using</code> behavior to match TypeScript</p>
<p>TypeScript 5.5 subtly changes the way <code>await using</code>
behaves. This release updates esbuild to match these changes in
TypeScript. You can read more about these changes in <a
href="https://redirect.github.com/microsoft/TypeScript/pull/58624">microsoft/TypeScript#58624</a>.</p>
</li>
<li>
<p>Allow <code>es2024</code> as a target environment</p>
<p>The ECMAScript 2024 specification was just approved, so it has been
added to esbuild as a possible compilation target. You can read more
about the features that it adds here: <a
href="https://2ality.com/2024/06/ecmascript-2024.html">https://2ality.com/2024/06/ecmascript-2024.html</a>.
The only addition that's relevant for esbuild is the regular expression
<code>/v</code> flag. With <code>--target=es2024</code>, regular
expressions that use the <code>/v</code> flag will now be passed through
untransformed instead of being transformed into a call to <code>new
RegExp</code>.</p>
</li>
<li>
<p>Publish binaries for OpenBSD on 64-bit ARM (<a
href="https://redirect.github.com/evanw/esbuild/issues/3665">#3665</a>,
<a
href="https://redirect.github.com/evanw/esbuild/pull/3674">#3674</a>)</p>
<p>With this release, you should now be able to install the
<code>esbuild</code> npm package in OpenBSD on 64-bit ARM, such as on an
Apple device with an M1 chip.</p>
<p>This was contributed by <a
href="https://github.com/ikmckenz"><code>@​ikmckenz</code></a>.</p>
</li>
<li>
<p>Publish binaries for WASI (WebAssembly System Interface) preview 1
(<a
href="https://redirect.github.com/evanw/esbuild/issues/3300">#3300</a>,
<a
href="https://redirect.github.com/evanw/esbuild/pull/3779">#3779</a>)</p>
<p>The upcoming WASI (WebAssembly System Interface) standard is going to
be a way to run WebAssembly outside of a JavaScript host environment. In
this scenario you only need a <code>.wasm</code> file without any
supporting JavaScript code. Instead of JavaScript providing the APIs for
the host environment, the WASI standard specifies a &quot;system
interface&quot; that WebAssembly code can access directly (e.g. for file
system access).</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/evanw/esbuild/blob/main/CHANGELOG.md">esbuild's
changelog</a>.</em></p>
<blockquote>
<h2>0.22.0</h2>
<p><strong>This release deliberately contains backwards-incompatible
changes.</strong> To avoid automatically picking up releases like this,
you should either be pinning the exact version of <code>esbuild</code>
in your <code>package.json</code> file (recommended) or be using a
version range syntax that only accepts patch upgrades such as
<code>^0.21.0</code> or <code>~0.21.0</code>. See npm's documentation
about <a
href="https://docs.npmjs.com/cli/v6/using-npm/semver/">semver</a> for
more information.</p>
<ul>
<li>
<p>Omit packages from bundles by default when targeting node (<a
href="https://redirect.github.com/evanw/esbuild/issues/1874">#1874</a>,
<a
href="https://redirect.github.com/evanw/esbuild/issues/2830">#2830</a>,
<a
href="https://redirect.github.com/evanw/esbuild/issues/2846">#2846</a>,
<a
href="https://redirect.github.com/evanw/esbuild/issues/2915">#2915</a>,
<a
href="https://redirect.github.com/evanw/esbuild/issues/3145">#3145</a>,
<a
href="https://redirect.github.com/evanw/esbuild/issues/3294">#3294</a>,
<a
href="https://redirect.github.com/evanw/esbuild/issues/3323">#3323</a>,
<a
href="https://redirect.github.com/evanw/esbuild/issues/3582">#3582</a>,
<a
href="https://redirect.github.com/evanw/esbuild/issues/3809">#3809</a>,
<a
href="https://redirect.github.com/evanw/esbuild/issues/3815">#3815</a>)</p>
<p>This breaking change is an experiment. People are commonly confused
when using esbuild to bundle code for node (i.e. for
<code>--platform=node</code>) because some packages may not be intended
for bundlers, and may use node-specific features that don't work with a
bundler. Even though esbuild's &quot;getting started&quot; instructions
say to use <code>--packages=external</code> to work around this problem,
many people don't read the documentation and don't do this, and are then
confused when it doesn't work. So arguably this is a bad default
behavior for esbuild to have if people keep tripping over this.</p>
<p>With this release, esbuild will now omit packages from the bundle by
default when the platform is <code>node</code> (i.e. the previous
behavior of <code>--packages=external</code> is now the default in this
case). <em>Note that your dependencies must now be present on the file
system when your bundle is run.</em> If you don't want this behavior,
you can do <code>--packages=bundle</code> to allow packages to be
included in the bundle (i.e. the previous default behavior). Note that
<code>--packages=bundle</code> doesn't mean all packages are bundled,
just that packages are allowed to be bundled. You can still exclude
individual packages from the bundle using <code>--external:</code> even
when <code>--packages=bundle</code> is present.</p>
<p>The <code>--packages=</code> setting considers all import paths that
&quot;look like&quot; package imports in the original source code to be
package imports. Specifically import paths that don't start with a path
segment of <code>/</code> or <code>.</code> or <code>..</code> are
considered to be package imports. The only two exceptions to this rule
are <a
href="https://nodejs.org/api/packages.html#subpath-imports">subpath
imports</a> (which start with a <code>#</code> character) and TypeScript
path remappings via <code>paths</code> and/or <code>baseUrl</code> in
<code>tsconfig.json</code> (which are applied first).</p>
</li>
<li>
<p>Drop support for older platforms (<a
href="https://redirect.github.com/evanw/esbuild/issues/3802">#3802</a>)</p>
<p>This release drops support for the following operating systems:</p>
<ul>
<li>Windows 7</li>
<li>Windows 8</li>
<li>Windows Server 2008</li>
<li>Windows Server 2012</li>
</ul>
<p>This is because the Go programming language dropped support for these
operating system versions in <a
href="https://go.dev/doc/go1.21#windows">Go 1.21</a>, and this release
updates esbuild from Go 1.20 to Go 1.22.</p>
<p>Note that this only affects the binary esbuild executables that are
published to the <code>esbuild</code> npm package. It's still possible
to compile esbuild's source code for these older operating systems. If
you need to, you can compile esbuild for yourself using an older version
of the Go compiler (before Go version 1.21). That might look something
like this:</p>
<pre><code>git clone https://github.com/evanw/esbuild.git
cd esbuild
go build ./cmd/esbuild
./esbuild.exe --version
</code></pre>
<p>In addition, this release increases the minimum required node version
for esbuild's JavaScript API from node 12 to node 18. Node 18 is the
oldest version of node that is still being supported (see node's <a
href="https://nodejs.org/en/about/previous-releases">release
schedule</a> for more information). This increase is because of an
incompatibility between the JavaScript that the Go compiler generates
for the <code>esbuild-wasm</code> package and versions of node before
node 17.4 (specifically the <code>crypto.getRandomValues</code>
function).</p>
</li>
<li>
<p>Update <code>await using</code> behavior to match TypeScript</p>
<p>TypeScript 5.5 subtly changes the way <code>await using</code>
behaves. This release updates esbuild to match these changes in
TypeScript. You can read more about these changes in <a
href="https://redirect.github.com/microsoft/TypeScript/pull/58624">microsoft/TypeScript#58624</a>.</p>
</li>
<li>
<p>Allow <code>es2024</code> as a target environment</p>
<p>The ECMAScript 2024 specification was just approved, so it has been
added to esbuild as a possible compilation target. You can read more
about the features that it adds here: <a
href="https://2ality.com/2024/06/ecmascript-2024.html">https://2ality.com/2024/06/ecmascript-2024.html</a>.
The only addition that's relevant for esbuild is the regular expression
<code>/v</code> flag. With <code>--target=es2024</code>, regular
expressions that use the <code>/v</code> flag will now be passed through
untransformed instead of being transformed into a call to <code>new
RegExp</code>.</p>
</li>
<li>
<p>Publish binaries for OpenBSD on 64-bit ARM (<a
href="https://redirect.github.com/evanw/esbuild/issues/3665">#3665</a>,
<a
href="https://redirect.github.com/evanw/esbuild/pull/3674">#3674</a>)</p>
<p>With this release, you should now be able to install the
<code>esbuild</code> npm package in OpenBSD on 64-bit ARM, such as on an
Apple device with an M1 chip.</p>
<p>This was contributed by <a
href="https://github.com/ikmckenz"><code>@​ikmckenz</code></a>.</p>
</li>
<li>
<p>Publish binaries for WASI (WebAssembly System Interface) preview 1
(<a
href="https://redirect.github.com/evanw/esbuild/issues/3300">#3300</a>,
<a
href="https://redirect.github.com/evanw/esbuild/pull/3779">#3779</a>)</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/evanw/esbuild/commit/80c6e6ea094a71691ab1644ab61494cc67729365"><code>80c6e6e</code></a>
publish 0.22.0 to npm</li>
<li><a
href="https://github.com/evanw/esbuild/commit/196dcad1954cdd462cd41ca6bd93ca528b15c0f8"><code>196dcad</code></a>
fix <a
href="https://redirect.github.com/evanw/esbuild/issues/1874">#1874</a>:
node defaults to <code>--packages=external</code></li>
<li><a
href="https://github.com/evanw/esbuild/commit/3f57db853fac17268358cf155268834861aba21b"><code>3f57db8</code></a>
release notes for <a
href="https://redirect.github.com/evanw/esbuild/issues/3539">#3539</a></li>
<li><a
href="https://github.com/evanw/esbuild/commit/91663db644e08d92823f1ee18a506aefcbc4db87"><code>91663db</code></a>
Provide API to create a custom esbuild CLI with plugins (<a
href="https://redirect.github.com/evanw/esbuild/issues/3539">#3539</a>)</li>
<li><a
href="https://github.com/evanw/esbuild/commit/e01c0e028ce352ad12e7e534775bfbe2c37656c6"><code>e01c0e0</code></a>
also mention <a
href="https://redirect.github.com/evanw/esbuild/issues/3665">#3665</a>
in release notes</li>
<li><a
href="https://github.com/evanw/esbuild/commit/65711b32d57d84eb20203199b990c6753c10cfbf"><code>65711b3</code></a>
release notes for <a
href="https://redirect.github.com/evanw/esbuild/issues/3674">#3674</a></li>
<li><a
href="https://github.com/evanw/esbuild/commit/63eb8140a7dd878727d3682654be5e609dc2f793"><code>63eb814</code></a>
Add OpenBSD arm64 (<a
href="https://redirect.github.com/evanw/esbuild/issues/3674">#3674</a>)</li>
<li><a
href="https://github.com/evanw/esbuild/commit/b7220009d0fde2e89917ed3ea97c6b8ca04adbf1"><code>b722000</code></a>
fix <a
href="https://redirect.github.com/evanw/esbuild/issues/3300">#3300</a>,
fix <a
href="https://redirect.github.com/evanw/esbuild/issues/3779">#3779</a>:
add <code>@esbuild/wasi-preview1</code></li>
<li><a
href="https://github.com/evanw/esbuild/commit/6679ec8c7fc04bf4d31504c4f9d6f2b9006725d3"><code>6679ec8</code></a>
fix: verbose analyse output improperly trimmed (<a
href="https://redirect.github.com/evanw/esbuild/issues/3785">#3785</a>)</li>
<li><a
href="https://github.com/evanw/esbuild/commit/94f09ea521d966f9223c002943ef840be5703aa0"><code>94f09ea</code></a>
fix <a
href="https://redirect.github.com/evanw/esbuild/issues/3790">#3790</a>:
warn about incorrect <code>onResolve</code> plugin</li>
<li>Additional commits viewable in <a
href="https://github.com/evanw/esbuild/compare/v0.21.4...v0.22.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `execa` from 9.1.0 to 9.3.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/sindresorhus/execa/releases">execa's
releases</a>.</em></p>
<blockquote>
<h2>v9.3.0</h2>
<h2>Features</h2>
<ul>
<li>The <a
href="https://github.com/sindresorhus/execa/blob/HEAD/docs/api.md#optionsverbose"><code>verbose</code></a>
option can now be <a
href="https://github.com/sindresorhus/execa/blob/HEAD/docs/api.md#verbose-function">a
function</a> to <a
href="https://github.com/sindresorhus/execa/blob/HEAD/docs/debugging.md#custom-logging">customize
logging</a>. (<a
href="https://redirect.github.com/sindresorhus/execa/issues/1130">#1130</a>)</li>
</ul>
<h2>v9.2.0</h2>
<p>This release includes a <a
href="https://github.com/sindresorhus/execa/blob/HEAD/docs/ipc.md">new
set of methods</a> to exchange messages between the current process and
a Node.js subprocess, also known as &quot;IPC&quot;. This allows <a
href="https://github.com/sindresorhus/execa/blob/HEAD/docs/input.md#any-input-type">passing</a>
and <a
href="https://github.com/sindresorhus/execa/blob/HEAD/docs/output.md#any-output-type">returning</a>
almost any message type to/from a Node.js subprocess. Also, <a
href="https://github.com/sindresorhus/execa/blob/HEAD/docs/ipc.md#debugging">debugging</a>
IPC is now much easier.</p>
<p>Moreover, a new <a
href="https://github.com/sindresorhus/execa/blob/HEAD/docs/api.md#optionsgracefulcancel"><code>gracefulCancel</code></a>
option has also been added to <a
href="https://github.com/sindresorhus/execa/blob/HEAD/docs/termination.md#graceful-termination">terminate
a subprocess gracefully</a>.</p>
<p>For a deeper dive-in, please check and share the <a
href="https://medium.com/@ehmicky/ipc-made-easy-with-execa-9-2-939c6a358731">release
post</a>!</p>
<p>Thanks <a href="https://github.com/iiroj"><code>@​iiroj</code></a>
for your contribution, <a
href="https://github.com/SimonSiefke"><code>@​SimonSiefke</code></a> and
<a href="https://github.com/adymorz"><code>@​adymorz</code></a> for
reporting the bugs fixed in this release, and <a
href="https://github.com/karlhorky"><code>@​karlhorky</code></a> for
improving the documentation!</p>
<h2>Deprecations</h2>
<ul>
<li>Passing <code>'ipc'</code> to the <a
href="https://github.com/sindresorhus/execa/blob/HEAD/docs/api.md#optionsstdio"><code>stdio</code></a>
option has been deprecated. It will be removed in the next major
release. Instead, the <a
href="https://github.com/sindresorhus/execa/blob/HEAD/docs/api.md#optionsipc"><code>ipc:
true</code></a> option should be used. (<a
href="https://redirect.github.com/sindresorhus/execa/issues/1056">#1056</a>)</li>
</ul>
<pre lang="diff"><code>- await execa('npm', ['run', 'build'], {stdio:
['pipe', 'pipe', 'pipe', 'ipc']});
+ await execa('npm', ['run', 'build'], {ipc: true});
</code></pre>
<ul>
<li>The <a
href="https://github.com/sindresorhus/execa/blob/v9.1.0/docs/api.md#execacommandcommand-options"><code>execaCommand()</code></a>
method has been deprecated. It will be removed in the next major
release. If most cases, the <a
href="https://github.com/sindresorhus/execa/blob/HEAD/docs/execution.md#template-string-syntax">template
string syntax</a> should be used instead.</li>
</ul>
<pre lang="diff"><code>- import {execaCommand} from 'execa';
+ import {execa} from 'execa';
<ul>
<li>await execaCommand('npm run build');</li>
</ul>
<ul>
<li>await execa<code>npm run build</code>;</li>
</ul>
<p>const taskName = 'build';</p>
<ul>
<li>await execaCommand(<code>npm run ${taskName}</code>);</li>
</ul>
<ul>
<li>await execa<code>npm run ${taskName}</code>;</li>
</ul>
<p>const commandArguments = ['run', 'task with space'];
await execa<code>npm ${commandArguments}</code>;
</code></pre></p>
<p>If the file and/or multiple arguments are supplied as a single
string, <a
href="https://github.com/sindresorhus/execa/blob/main/docs/api.md#parsecommandstringcommand">parseCommandString(command)</a>
can split that string into an array. <a
href="https://github.com/sindresorhus/execa/blob/HEAD/docs/escaping.md">More
info.</a> (<a
href="https://redirect.github.com/sindresorhus/execa/issues/1054">#1054</a>)</p>
<pre lang="diff"><code>- import {execaCommand} from 'execa';
+ import {execa, parseCommandString} from 'execa';
<p>const commandString = 'npm run task';</p>
<ul>
<li>await execaCommand(commandString);</li>
</ul>
<ul>
<li>const commandArray = parseCommandString(commandString); // ['npm',
'run', 'task']</li>
<li>await execa<code>${commandArray}</code>;
&lt;/tr&gt;&lt;/table&gt;
</code></pre></li>
</ul>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/sindresorhus/execa/commit/57658b0190dc0f0e5ed2c5984c9d9ea526e085b5"><code>57658b0</code></a>
9.3.0</li>
<li><a
href="https://github.com/sindresorhus/execa/commit/8daf3484e94b2a1515bc152f3ca2047910d48e19"><code>8daf348</code></a>
Allow <code>verbose</code> option to be a function for custom logging
(<a
href="https://redirect.github.com/sindresorhus/execa/issues/1130">#1130</a>)</li>
<li><a
href="https://github.com/sindresorhus/execa/commit/78edcb9f2ba4d52ee3e28a499544b038c1cc3f99"><code>78edcb9</code></a>
Fix c8 memory crash (<a
href="https://redirect.github.com/sindresorhus/execa/issues/1129">#1129</a>)</li>
<li><a
href="https://github.com/sindresorhus/execa/commit/18d320f93a8b747e583497c613b018b0ef468eca"><code>18d320f</code></a>
Refactor test helpers for the <code>verbose</code> option (<a
href="https://redirect.github.com/sindresorhus/execa/issues/1128">#1128</a>)</li>
<li><a
href="https://github.com/sindresorhus/execa/commit/37e00242eaadd2590b5fda32d2062ff028b828e1"><code>37e0024</code></a>
Add more tests for the <code>verbose</code> option (<a
href="https://redirect.github.com/sindresorhus/execa/issues/1127">#1127</a>)</li>
<li><a
href="https://github.com/sindresorhus/execa/commit/f9f1199f675be9972897135124e9d2947acdb093"><code>f9f1199</code></a>
Refactor <code>verbose</code> logic (<a
href="https://redirect.github.com/sindresorhus/execa/issues/1126">#1126</a>)</li>
<li><a
href="https://github.com/sindresorhus/execa/commit/cbe805c72ddcff932d8c37bb1910aa6864099cea"><code>cbe805c</code></a>
9.2.0</li>
<li><a
href="https://github.com/sindresorhus/execa/commit/8ae69754d99c55bff5d1484d9feb7a08e1630a13"><code>8ae6975</code></a>
Send fewer requests with link checking (<a
href="https://redirect.github.com/sindresorhus/execa/issues/1122">#1122</a>)</li>
<li><a
href="https://github.com/sindresorhus/execa/commit/e15e5162c108f41289844eea3025930fa0785ea1"><code>e15e516</code></a>
Fix typo in IPC documentation (<a
href="https://redirect.github.com/sindresorhus/execa/issues/1121">#1121</a>)</li>
<li><a
href="https://github.com/sindresorhus/execa/commit/4044152329a177a1463e8398e55058dfcb3571df"><code>4044152</code></a>
Automatically check Markdown links (<a
href="https://redirect.github.com/sindresorhus/execa/issues/1120">#1120</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/sindresorhus/execa/compare/v9.1.0...v9.3.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `yaml` from 2.4.2 to 2.4.5
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/eemeli/yaml/releases">yaml's
releases</a>.</em></p>
<blockquote>
<h2>v2.4.5</h2>
<ul>
<li>Improve tab handling (<a
href="https://redirect.github.com/eemeli/yaml/issues/553">#553</a>,
yaml-test-suite tests <a
href="https://github.com/yaml/yaml-test-suite/blob/main/src/DK95.yaml">DK95</a>
&amp; <a
href="https://github.com/yaml/yaml-test-suite/blob/main/src/Y79Y.yaml">Y79Y</a>)</li>
</ul>
<h2>v2.4.4</h2>
<p>With special thanks to <a
href="https://github.com/RedCMD"><code>@​RedCMD</code></a> for finding
and reporting all of the following:</p>
<ul>
<li>Allow comment after top-level block scalar with explicit indent
indicator (<a
href="https://redirect.github.com/eemeli/yaml/issues/547">#547</a>)</li>
<li>Allow tab as indent for line comments before nodes (<a
href="https://redirect.github.com/eemeli/yaml/issues/548">#548</a>)</li>
<li>Do not allow tab before block collection (<a
href="https://redirect.github.com/eemeli/yaml/issues/549">#549</a>)</li>
<li>In flow collections, allow <code>[]{}</code> immediately after
<code>:</code> with plain key (<a
href="https://redirect.github.com/eemeli/yaml/issues/550">#550</a>)</li>
<li>Require indentation for <code>?</code> explicit-key contents (<a
href="https://redirect.github.com/eemeli/yaml/issues/551">#551</a>)</li>
<li>Require indentation from block scalar header &amp; flow collections
in mapping values (<a
href="https://redirect.github.com/eemeli/yaml/issues/553">#553</a>)</li>
</ul>
<h2>v2.4.3</h2>
<ul>
<li>Improve error when parsing a non-string value (<a
href="https://redirect.github.com/eemeli/yaml/issues/459">#459</a>)</li>
<li>Do not parse <code>-.NaN</code> or <code>+.nan</code> as NaN (<a
href="https://redirect.github.com/eemeli/yaml/issues/546">#546</a>)</li>
<li>Support <code>#</code> within <code>%TAG</code> prefixes with
trailing <code>#comments</code></li>
<li>Check for non-node complex keys when stringifying with simpleKeys
(<a
href="https://redirect.github.com/eemeli/yaml/issues/541">#541</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/eemeli/yaml/commit/1b8fde6717c096446d4b1cf9e21ef1fb87090385"><code>1b8fde6</code></a>
2.4.5</li>
<li><a
href="https://github.com/eemeli/yaml/commit/f3c7d030e919347c20f414c08c8110bf9974dc85"><code>f3c7d03</code></a>
test: Obey yaml-test-suite skip instructions</li>
<li><a
href="https://github.com/eemeli/yaml/commit/4e66d72c7666de561de2f03aea555ef8d85f82ea"><code>4e66d72</code></a>
fix: Improve tab handling (tests DK95 &amp; Y79Y, <a
href="https://redirect.github.com/eemeli/yaml/issues/553">#553</a>)</li>
<li><a
href="https://github.com/eemeli/yaml/commit/d06f3867ae9af453ad115f73b83bad0095b65125"><code>d06f386</code></a>
2.4.4</li>
<li><a
href="https://github.com/eemeli/yaml/commit/39053e83bb82fdaae06f484d25145b0f08f8b71b"><code>39053e8</code></a>
chore: Satisfy strict TS</li>
<li><a
href="https://github.com/eemeli/yaml/commit/8baee44423baded552bab0390e10c48662af08ad"><code>8baee44</code></a>
test: Use source files for yaml-test-suite tests</li>
<li><a
href="https://github.com/eemeli/yaml/commit/280a861919b77a3e04e774ceca548732ac7e64ec"><code>280a861</code></a>
fix: Allow comment after top-level block scalar with explicit indent
indicato...</li>
<li><a
href="https://github.com/eemeli/yaml/commit/767bc477e63138cac21cb29664d911b97363e8a2"><code>767bc47</code></a>
fix: Require indentation from block scalar header &amp; flow collections
in mappi...</li>
<li><a
href="https://github.com/eemeli/yaml/commit/5096f837863a63abda5fb0204e251ba286d11acc"><code>5096f83</code></a>
fix: Require indentation for ? explicit-key contents (fixes <a
href="https://redirect.github.com/eemeli/yaml/issues/551">#551</a>)</li>
<li><a
href="https://github.com/eemeli/yaml/commit/22f2c6faddb6c3bff77ec0a8e42f169d4c0a9e48"><code>22f2c6f</code></a>
fix: In flow collections, allow []{} immediately after : with plain key
(fixe...</li>
<li>Additional commits viewable in <a
href="https://github.com/eemeli/yaml/compare/v2.4.2...v2.4.5">compare
view</a></li>
</ul>
</details>
<br />


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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
2024-07-01 12:02:56 -07:00
semantic-release-bot 31c86eb3b3 build(release): 1.10.3 [skip ci]
## [1.10.3](https://github.com/actions/create-github-app-token/compare/v1.10.2...v1.10.3) (2024-07-01)

### Bug Fixes

* **deps:** bump undici from 6.18.2 to 6.19.2 in the production-dependencies group ([#149](https://github.com/actions/create-github-app-token/issues/149)) ([cc82279](https://github.com/actions/create-github-app-token/commit/cc82279e84540c5543078cedc5af4fcfab0a96bb)), closes [#3337](https://github.com/actions/create-github-app-token/issues/3337) [nodejs/undici#3338](https://github.com/nodejs/undici/issues/3338) [nodejs/undici#3340](https://github.com/nodejs/undici/issues/3340) [nodejs/undici#3332](https://github.com/nodejs/undici/issues/3332) [nodejs/undici#3335](https://github.com/nodejs/undici/issues/3335) [nodejs/undici#3305](https://github.com/nodejs/undici/issues/3305) [nodejs/undici#3303](https://github.com/nodejs/undici/issues/3303) [nodejs/undici#3304](https://github.com/nodejs/undici/issues/3304) [nodejs/undici#3306](https://github.com/nodejs/undici/issues/3306) [nodejs/undici#3309](https://github.com/nodejs/undici/issues/3309) [nodejs/undici#3313](https://github.com/nodejs/undici/issues/3313) [nodejs/undici#3311](https://github.com/nodejs/undici/issues/3311) [nodejs/undici#3107](https://github.com/nodejs/undici/issues/3107) [nodejs/undici#3302](https://github.com/nodejs/undici/issues/3302) [nodejs/undici#3320](https://github.com/nodejs/undici/issues/3320) [nodejs/undici#3321](https://github.com/nodejs/undici/issues/3321) [nodejs/undici#3316](https://github.com/nodejs/undici/issues/3316) [nodejs/undici#3318](https://github.com/nodejs/undici/issues/3318) [nodejs/undici#3326](https://github.com/nodejs/undici/issues/3326) [nodejs/undici#3324](https://github.com/nodejs/undici/issues/3324) [nodejs/undici#3325](https://github.com/nodejs/undici/issues/3325) [nodejs/undici#3316](https://github.com/nodejs/undici/issues/3316) [nodejs/undici#3318](https://github.com/nodejs/undici/issues/3318) [#3342](https://github.com/actions/create-github-app-token/issues/3342) [#3332](https://github.com/actions/create-github-app-token/issues/3332) [#3340](https://github.com/actions/create-github-app-token/issues/3340) [#3337](https://github.com/actions/create-github-app-token/issues/3337) [#3338](https://github.com/actions/create-github-app-token/issues/3338) [#3336](https://github.com/actions/create-github-app-token/issues/3336) [#3335](https://github.com/actions/create-github-app-token/issues/3335) [#3325](https://github.com/actions/create-github-app-token/issues/3325) [#3324](https://github.com/actions/create-github-app-token/issues/3324) [#3326](https://github.com/actions/create-github-app-token/issues/3326)
2024-07-01 13:15:08 +00:00
dependabot[bot] cc82279e84 fix(deps): bump undici from 6.18.2 to 6.19.2 in the production-dependencies group (#149)
Bumps the production-dependencies group with 1 update:
[undici](https://github.com/nodejs/undici).

Updates `undici` from 6.18.2 to 6.19.2
<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>v6.19.2</h2>
<h2>What's Changed</h2>
<ul>
<li>fix <a
href="https://redirect.github.com/nodejs/undici/issues/3337">#3337</a>
by <a href="https://github.com/KhafraDev"><code>@​KhafraDev</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/3338">nodejs/undici#3338</a></li>
<li>build: use <code>husky</code> as <code>husky install</code> is
deprecated by <a
href="https://github.com/jazelly"><code>@​jazelly</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/3340">nodejs/undici#3340</a></li>
<li>fix: interceptors.d.ts has no default export by <a
href="https://github.com/Uzlopak"><code>@​Uzlopak</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/3332">nodejs/undici#3332</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v6.19.1...v6.19.2">https://github.com/nodejs/undici/compare/v6.19.1...v6.19.2</a></p>
<h2>v6.19.1</h2>
<h2>What's Changed</h2>
<ul>
<li>don't append empty origin by <a
href="https://github.com/KhafraDev"><code>@​KhafraDev</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/3335">nodejs/undici#3335</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v6.19.0...v6.19.1">https://github.com/nodejs/undici/compare/v6.19.0...v6.19.1</a></p>
<h2>v6.19.0</h2>
<h2>What's Changed</h2>
<ul>
<li>build(deps): bump ossf/scorecard-action from 2.3.1 to 2.3.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/3305">nodejs/undici#3305</a></li>
<li>build(deps): bump codecov/codecov-action from 4.3.1 to 4.4.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/3303">nodejs/undici#3303</a></li>
<li>build(deps): bump step-security/harden-runner from 2.7.1 to 2.8.0 by
<a href="https://github.com/dependabot"><code>@​dependabot</code></a> in
<a
href="https://redirect.github.com/nodejs/undici/pull/3304">nodejs/undici#3304</a></li>
<li>build(deps): bump github/codeql-action from 3.25.3 to 3.25.7 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/3306">nodejs/undici#3306</a></li>
<li>build(deps): bump node from <code>9e8f45f</code> to
<code>dd7e693</code> in /build by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/3309">nodejs/undici#3309</a></li>
<li>build(deps): bump node from <code>dd7e693</code> to
<code>e6d4495</code> in /build by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/3313">nodejs/undici#3313</a></li>
<li>remove websocket experimental warning by <a
href="https://github.com/KhafraDev"><code>@​KhafraDev</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/3311">nodejs/undici#3311</a></li>
<li>perf: optimization of request instantiation by <a
href="https://github.com/tsctx"><code>@​tsctx</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/3107">nodejs/undici#3107</a></li>
<li>perf: convert object to params by <a
href="https://github.com/DarkGL"><code>@​DarkGL</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/3302">nodejs/undici#3302</a></li>
<li>build(deps-dev): bump borp from 0.14.0 to 0.15.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/3320">nodejs/undici#3320</a></li>
<li>build(deps-dev): bump c8 from 9.1.0 to 10.0.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/3321">nodejs/undici#3321</a></li>
<li>fix: add missing error classes to types by <a
href="https://github.com/maxbeatty"><code>@​maxbeatty</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/3316">nodejs/undici#3316</a></li>
<li>export interceptor to type def file by <a
href="https://github.com/jakecastelli"><code>@​jakecastelli</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/3318">nodejs/undici#3318</a></li>
<li>build(deps): bump node from <code>e6d4495</code> to
<code>075a5cc</code> in /build by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/3326">nodejs/undici#3326</a></li>
<li>doc: clearify the behaviour of <code>bodyTimeout</code> in the
request by <a
href="https://github.com/jakecastelli"><code>@​jakecastelli</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/3324">nodejs/undici#3324</a></li>
<li>feature: support pre-shared sessions by <a
href="https://github.com/tastypackets"><code>@​tastypackets</code></a>
in <a
href="https://redirect.github.com/nodejs/undici/pull/3325">nodejs/undici#3325</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/maxbeatty"><code>@​maxbeatty</code></a>
made their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/3316">nodejs/undici#3316</a></li>
<li><a
href="https://github.com/jakecastelli"><code>@​jakecastelli</code></a>
made their first contribution in <a
href="https://redirect.github.com/nodejs/undici/pull/3318">nodejs/undici#3318</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v6.18.2...v6.19.0">https://github.com/nodejs/undici/compare/v6.18.2...v6.19.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/nodejs/undici/commit/532b7b28827afe52ed7b43cbb210ac8425516c28"><code>532b7b2</code></a>
Bumped v6.19.2 (<a
href="https://redirect.github.com/nodejs/undici/issues/3342">#3342</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/a7441d8aaa44f9eec111a23a5df238d77b150c3a"><code>a7441d8</code></a>
fix: interceptors.d.ts has no default export (<a
href="https://redirect.github.com/nodejs/undici/issues/3332">#3332</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/5dadb95f10cebf5f82050a8174d515d5abac9732"><code>5dadb95</code></a>
build: use <code>husky</code> as <code>husky install</code> is
deprecated (<a
href="https://redirect.github.com/nodejs/undici/issues/3340">#3340</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/035524e71756f1f6e2f9886f3c7227394bdb5363"><code>035524e</code></a>
fix <a
href="https://redirect.github.com/nodejs/undici/issues/3337">#3337</a>
(<a
href="https://redirect.github.com/nodejs/undici/issues/3338">#3338</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/f6b9b442b02d8ab81b06ea0473e1c22bc8ddc254"><code>f6b9b44</code></a>
Bumped v6.19.1 (<a
href="https://redirect.github.com/nodejs/undici/issues/3336">#3336</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/1573f693db99d30a1ee13f2704f04181e88960c4"><code>1573f69</code></a>
don't append empty origin (<a
href="https://redirect.github.com/nodejs/undici/issues/3335">#3335</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/981fb3d72a4393f77c9f28e3ea2f77dc4cf6e9ad"><code>981fb3d</code></a>
Bumped v6.19.0</li>
<li><a
href="https://github.com/nodejs/undici/commit/39869b29966ac68157f5cbd27f3cf65cd2ab763d"><code>39869b2</code></a>
feature: support pre-shared sessions (<a
href="https://redirect.github.com/nodejs/undici/issues/3325">#3325</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/7f54a24a4a573088937530708be91586160d2d83"><code>7f54a24</code></a>
doc: clearify the behaviour of <code>bodyTimeout</code> in the request
(<a
href="https://redirect.github.com/nodejs/undici/issues/3324">#3324</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/9785b15cbd7831c4501e76c749fa3a6873042e6d"><code>9785b15</code></a>
build(deps): bump node from <code>e6d4495</code> to <code>075a5cc</code>
in /build (<a
href="https://redirect.github.com/nodejs/undici/issues/3326">#3326</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/nodejs/undici/compare/v6.18.2...v6.19.2">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=6.18.2&new-version=6.19.2)](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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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>
2024-07-01 06:14:36 -07:00
Anuraag (Rag) Agrawal 74cd7f68cb docs(README): fix committer string example and add git config example (#145) 2024-06-28 07:51:24 -07:00
semantic-release-bot ad38cffc07 build(release): 1.10.2 [skip ci]
## [1.10.2](https://github.com/actions/create-github-app-token/compare/v1.10.1...v1.10.2) (2024-06-26)

### Bug Fixes

* do not revoke token if already expired ([#147](https://github.com/actions/create-github-app-token/issues/147)) ([66a7045](https://github.com/actions/create-github-app-token/commit/66a70456860bafc79e37635eea77b8b2a929f6c8)), closes [#140](https://github.com/actions/create-github-app-token/issues/140) [#95](https://github.com/actions/create-github-app-token/issues/95)
2024-06-26 01:11:30 +00:00
Wechuli 66a7045686 fix: do not revoke token if already expired (#147)
Closes #140 

The pull request at #95 introduced changes to avoid revoking expired
tokens by saving the `expiresAt` value in the state. The change,
however, used `core.setOutput` instead of `core.setState` meaning the
value is not saved in the state but rather available in the output.

```javascript
if (!skipTokenRevoke) {
    core.saveState("token", authentication.token);
    core.setOutput("expiresAt", authentication.expiresAt);
  }
```
This means that when we use the value downstream, it evaluates to an
empty string and the following code block is never run:

```javascript
 const expiresAt = core.getState("expiresAt"); 
 if (expiresAt && tokenExpiresIn(expiresAt) < 0) { 
   core.info("Token expired, skipping token revocation"); 
   return; 
 } 
```
This is a tiny PR to correct that typo.
2024-06-25 18:10:54 -07:00
dependabot[bot] d2eeb384df build(deps-dev): bump braces from 3.0.2 to 3.0.3 (#146)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to
3.0.3.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/micromatch/braces/commit/74b2db2938fad48a2ea54a9c8bf27a37a62c350d"><code>74b2db2</code></a>
3.0.3</li>
<li><a
href="https://github.com/micromatch/braces/commit/88f1429a0f47e1dd3813de35211fc97ffda27f9e"><code>88f1429</code></a>
update eslint. lint, fix unit tests.</li>
<li><a
href="https://github.com/micromatch/braces/commit/415d660c3002d1ab7e63dbf490c9851da80596ff"><code>415d660</code></a>
Snyk js braces 6838727 (<a
href="https://redirect.github.com/micromatch/braces/issues/40">#40</a>)</li>
<li><a
href="https://github.com/micromatch/braces/commit/190510f79db1adf21d92798b0bb6fccc1f72c9d6"><code>190510f</code></a>
fix tests, skip 1 test in test/braces.expand</li>
<li><a
href="https://github.com/micromatch/braces/commit/716eb9f12d820b145a831ad678618731927e8856"><code>716eb9f</code></a>
readme bump</li>
<li><a
href="https://github.com/micromatch/braces/commit/a5851e57f45c3431a94d83fc565754bc10f5bbc3"><code>a5851e5</code></a>
Merge pull request <a
href="https://redirect.github.com/micromatch/braces/issues/37">#37</a>
from coderaiser/fix/vulnerability</li>
<li><a
href="https://github.com/micromatch/braces/commit/2092bd1fb108d2c59bd62e243b70ad98db961538"><code>2092bd1</code></a>
feature: braces: add maxSymbols (<a
href="https://github.com/micromatch/braces/issues/">https://github.com/micromatch/braces/issues/</a>...</li>
<li><a
href="https://github.com/micromatch/braces/commit/9f5b4cf47329351bcb64287223ffb6ecc9a5e6d3"><code>9f5b4cf</code></a>
fix: vulnerability (<a
href="https://security.snyk.io/vuln/SNYK-JS-BRACES-6838727">https://security.snyk.io/vuln/SNYK-JS-BRACES-6838727</a>)</li>
<li><a
href="https://github.com/micromatch/braces/commit/98414f9f1fabe021736e26836d8306d5de747e0d"><code>98414f9</code></a>
remove funding file</li>
<li><a
href="https://github.com/micromatch/braces/commit/665ab5d561c017a38ba7aafd92cc6655b91d8c14"><code>665ab5d</code></a>
update keepEscaping doc (<a
href="https://redirect.github.com/micromatch/braces/issues/27">#27</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/micromatch/braces/compare/3.0.2...3.0.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=braces&package-manager=npm_and_yarn&previous-version=3.0.2&new-version=3.0.3)](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 merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@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)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/actions/create-github-app-token/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-21 21:06:17 -07:00
Gregor Martynus 0fd38177ed docs(README): add note about expiration (#141)
addresses https://github.com/actions/create-github-app-token/issues/121#issuecomment-2043214796

Co-authored-by: Parker Brown <17183625+parkerbxyz@users.noreply.github.com>
2024-06-11 20:56:57 -07:00
Gregor Martynus b3be847492 docs(README): Create a git committer string for an app installation (#142)
closes #137
2024-06-11 10:16:50 -07:00
21 changed files with 1347 additions and 813 deletions
+1
View File
@@ -5,6 +5,7 @@ on:
branches:
- main
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
+88 -3
View File
@@ -12,6 +12,9 @@ In order to use this action, you need to:
2. [Store the App's ID in your repository environment variables](https://docs.github.com/actions/learn-github-actions/variables#defining-configuration-variables-for-multiple-workflows) (example: `APP_ID`)
3. [Store the App's private key in your repository secrets](https://docs.github.com/actions/security-guides/encrypted-secrets?tool=webui#creating-encrypted-secrets-for-a-repository) (example: `PRIVATE_KEY`)
> [!IMPORTANT]
> An installation access token expires after 1 hour. Please [see this comment](https://github.com/actions/create-github-app-token/issues/121#issuecomment-2043214796) for alternative approaches if you have long-running processes.
### Create a token for the current repository
```yaml
@@ -61,6 +64,68 @@ jobs:
github_token: ${{ steps.app-token.outputs.token }}
```
### Create a git committer string for an app installation
```yaml
on: [pull_request]
jobs:
auto-format:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
# required
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
- id: committer
run: echo "string=${{ steps.app-token.outputs.app-slug }}[bot] <${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>" >> "$GITHUB_OUTPUT"
- run: echo "committer string is ${ {steps.committer.outputs.string }}"
```
### Configure git CLI for an app's bot user
```yaml
on: [pull_request]
jobs:
auto-format:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
# required
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
- run: |
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>'
# git commands like commit work using the bot user
- run: |
git add .
git commit -m "Auto-generated changes"
git push
```
> [!TIP]
> The `<BOT USER ID>` is the numeric user ID of the app's bot user, which can be found under `https://api.github.com/users/<app-slug>%5Bbot%5D`.
>
> For example, we can check at `https://api.github.com/users/dependabot[bot]` to see the user ID of Dependabot is 49699333.
>
> Alternatively, you can use the [octokit/request-action](https://github.com/octokit/request-action) to get the ID.
### Create a token for all repositories in the current owner's installation
```yaml
@@ -98,7 +163,9 @@ jobs:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: "repo1,repo2"
repositories: |
repo1
repo2
- uses: peter-evans/create-or-update-comment@v3
with:
token: ${{ steps.app-token.outputs.token }}
@@ -142,7 +209,7 @@ jobs:
set-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{steps.set.outputs.matrix }}
matrix: ${{ steps.set.outputs.matrix }}
steps:
- id: set
run: echo 'matrix=[{"owner":"owner1"},{"owner":"owner2","repos":["repo1"]}]' >>"$GITHUB_OUTPUT"
@@ -213,13 +280,31 @@ jobs:
**Required:** GitHub App private key. Escaped newlines (`\\n`) will be automatically replaced with actual newlines.
Some other actions may require the private key to be Base64 encoded. To avoid recreating a new secret, it can be decoded on the fly, but it needs to be managed securely. Here is an example of how this can be achieved:
```yaml
steps:
- name: Decode the GitHub App Private Key
id: decode
run: |
private_key=$(echo "${{ secrets.PRIVATE_KEY }}" | base64 -d | awk 'BEGIN {ORS="\\n"} {print}' | head -c -2) &> /dev/null
echo "::add-mask::$private_key"
echo "private-key=$private_key" >> "$GITHUB_OUTPUT"
- name: Generate GitHub App Token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ steps.decode.outputs.private-key }}
```
### `owner`
**Optional:** The owner of the GitHub App installation. If empty, defaults to the current repository owner.
### `repositories`
**Optional:** Comma-separated list of repositories to grant access to.
**Optional:** Comma or newline-separated list of repositories to grant access to.
> [!NOTE]
> If `owner` is set and `repositories` is empty, access will be scoped to all repositories in the provided repository owner's installation. If `owner` and `repositories` are empty, access will be scoped to only the current repository.
+1 -1
View File
@@ -23,7 +23,7 @@ inputs:
description: "The owner of the GitHub App installation (defaults to current repository owner)"
required: false
repositories:
description: "Repositories to install the GitHub App on (defaults to current repository if owner is unset)"
description: "Comma or newline-separated list of repositories to install the GitHub App on (defaults to current repository if owner is unset)"
required: false
skip-token-revoke:
description: "If truthy, the token will not be revoked when the current job is complete"
+304 -295
View File
File diff suppressed because it is too large Load Diff
+285 -278
View File
@@ -2238,6 +2238,7 @@ var require_decodeText = __commonJS({
return decoders.utf8;
case "latin1":
case "ascii":
// TODO: Make these a separate, strict decoder?
case "us-ascii":
case "iso-8859-1":
case "iso8859-1":
@@ -2937,6 +2938,7 @@ var require_basename = __commonJS({
for (var i = path.length - 1; i >= 0; --i) {
switch (path.charCodeAt(i)) {
case 47:
// '/'
case 92:
path = path.slice(i + 1);
return path === ".." || path === "." ? "" : path;
@@ -4171,7 +4173,21 @@ var require_util2 = __commonJS({
return referrerOrigin;
}
case "strict-origin":
// eslint-disable-line
/**
* 1. If referrerURL is a potentially trustworthy URL and
* requests current URL is not a potentially trustworthy URL,
* then return no referrer.
* 2. Return referrerOrigin
*/
case "no-referrer-when-downgrade":
// eslint-disable-line
/**
* 1. If referrerURL is a potentially trustworthy URL and
* requests current URL is not a potentially trustworthy URL,
* then return no referrer.
* 2. Return referrerOrigin
*/
default:
return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin;
}
@@ -19943,6 +19959,27 @@ var require_util8 = __commonJS({
}
var kEnumerableProperty = /* @__PURE__ */ Object.create(null);
kEnumerableProperty.enumerable = true;
var normalizedMethodRecordsBase = {
delete: "DELETE",
DELETE: "DELETE",
get: "GET",
GET: "GET",
head: "HEAD",
HEAD: "HEAD",
options: "OPTIONS",
OPTIONS: "OPTIONS",
post: "POST",
POST: "POST",
put: "PUT",
PUT: "PUT"
};
var normalizedMethodRecords = {
...normalizedMethodRecordsBase,
patch: "patch",
PATCH: "PATCH"
};
Object.setPrototypeOf(normalizedMethodRecordsBase, null);
Object.setPrototypeOf(normalizedMethodRecords, null);
module2.exports = {
kEnumerableProperty,
nop,
@@ -19981,6 +20018,8 @@ var require_util8 = __commonJS({
isValidHeaderValue,
isTokenCharCode,
parseRangeHeader,
normalizedMethodRecordsBase,
normalizedMethodRecords,
isValidPort,
isHttpOrHttpsPrefixed,
nodeMajor,
@@ -20196,7 +20235,8 @@ var require_request3 = __commonJS({
isBlobLike,
buildURL,
validateHandler,
getServerName
getServerName,
normalizedMethodRecords
} = require_util8();
var { channels } = require_diagnostics();
var { headerNameLowerCasedRecord } = require_constants6();
@@ -20223,12 +20263,12 @@ var require_request3 = __commonJS({
throw new InvalidArgumentError("path must be a string");
} else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") {
throw new InvalidArgumentError("path must be an absolute URL or start with a slash");
} else if (invalidPathRegex.exec(path) !== null) {
} else if (invalidPathRegex.test(path)) {
throw new InvalidArgumentError("invalid request path");
}
if (typeof method !== "string") {
throw new InvalidArgumentError("method must be a string");
} else if (!isValidHTTPToken(method)) {
} else if (normalizedMethodRecords[method] === void 0 && !isValidHTTPToken(method)) {
throw new InvalidArgumentError("invalid request method");
}
if (upgrade && typeof upgrade !== "string") {
@@ -20773,7 +20813,7 @@ var require_connect2 = __commonJS({
}
};
}
function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, ...opts }) {
function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) {
if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) {
throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero");
}
@@ -20789,7 +20829,7 @@ var require_connect2 = __commonJS({
}
servername = servername || options.servername || util.getServerName(host) || null;
const sessionKey = servername || hostname;
const session = sessionCache.get(sessionKey) || null;
const session = customSession || sessionCache.get(sessionKey) || null;
assert(sessionKey);
socket = tls.connect({
highWaterMark: 16384,
@@ -22307,7 +22347,7 @@ var require_util9 = __commonJS({
var { getGlobalOrigin } = require_global3();
var { collectASequenceOfCodePoints, collectAnHTTPQuotedString, removeChars, parseMIMEType } = require_data_url();
var { performance: performance2 } = require("node:perf_hooks");
var { isBlobLike, ReadableStreamFrom, isValidHTTPToken } = require_util8();
var { isBlobLike, ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require_util8();
var assert = require("node:assert");
var { isUint8Array } = require("node:util/types");
var { webidl } = require_webidl2();
@@ -22414,7 +22454,7 @@ var require_util9 = __commonJS({
}
function appendRequestOriginHeader(request2) {
let serializedOrigin = request2.origin;
if (serializedOrigin === "client") {
if (serializedOrigin === "client" || serializedOrigin === void 0) {
return;
}
if (request2.responseTainting === "cors" || request2.mode === "websocket") {
@@ -22532,7 +22572,21 @@ var require_util9 = __commonJS({
return referrerOrigin;
}
case "strict-origin":
// eslint-disable-line
/**
* 1. If referrerURL is a potentially trustworthy URL and
* requests current URL is not a potentially trustworthy URL,
* then return no referrer.
* 2. Return referrerOrigin
*/
case "no-referrer-when-downgrade":
// eslint-disable-line
/**
* 1. If referrerURL is a potentially trustworthy URL and
* requests current URL is not a potentially trustworthy URL,
* then return no referrer.
* 2. Return referrerOrigin
*/
default:
return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin;
}
@@ -22695,29 +22749,8 @@ var require_util9 = __commonJS({
function isCancelled(fetchParams) {
return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated";
}
var normalizeMethodRecordBase = {
delete: "DELETE",
DELETE: "DELETE",
get: "GET",
GET: "GET",
head: "HEAD",
HEAD: "HEAD",
options: "OPTIONS",
OPTIONS: "OPTIONS",
post: "POST",
POST: "POST",
put: "PUT",
PUT: "PUT"
};
var normalizeMethodRecord = {
...normalizeMethodRecordBase,
patch: "patch",
PATCH: "PATCH"
};
Object.setPrototypeOf(normalizeMethodRecordBase, null);
Object.setPrototypeOf(normalizeMethodRecord, null);
function normalizeMethod(method) {
return normalizeMethodRecordBase[method.toLowerCase()] ?? method;
return normalizedMethodRecordsBase[method.toLowerCase()] ?? method;
}
function serializeJavascriptValueToJSONString(value) {
const result = JSON.stringify(value);
@@ -22854,7 +22887,7 @@ var require_util9 = __commonJS({
}
});
}
async function fullyReadBody(body, processBody, processBodyError, shouldClone) {
async function fullyReadBody(body, processBody, processBodyError) {
const successSteps = processBody;
const errorSteps = processBodyError;
let reader;
@@ -22865,7 +22898,7 @@ var require_util9 = __commonJS({
return;
}
try {
successSteps(await readAllBytes(reader, shouldClone));
successSteps(await readAllBytes(reader));
} catch (e) {
errorSteps(e);
}
@@ -22888,19 +22921,12 @@ var require_util9 = __commonJS({
assert(!invalidIsomorphicEncodeValueRegex.test(input));
return input;
}
async function readAllBytes(reader, shouldClone) {
async function readAllBytes(reader) {
const bytes = [];
let byteLength = 0;
while (true) {
const { done, value: chunk } = await reader.read();
if (done) {
if (bytes.length === 1) {
const { buffer, byteOffset, byteLength: byteLength2 } = bytes[0];
if (shouldClone === false) {
return Buffer.from(buffer, byteOffset, byteLength2);
}
return Buffer.from(buffer.slice(byteOffset, byteOffset + byteLength2), 0, byteLength2);
}
return Buffer.concat(bytes, byteLength);
}
if (!isUint8Array(chunk)) {
@@ -23163,7 +23189,6 @@ var require_util9 = __commonJS({
urlHasHttpsScheme,
urlIsHttpHttpsScheme,
readAllBytes,
normalizeMethodRecord,
simpleRangeHeaderValue,
buildContentRange,
parseMetadata,
@@ -23663,11 +23688,23 @@ var require_body2 = __commonJS({
var { webidl } = require_webidl2();
var { Blob: Blob2 } = require("node:buffer");
var assert = require("node:assert");
var { isErrored } = require_util8();
var { isErrored, isDisturbed } = require("node:stream");
var { isArrayBuffer } = require("node:util/types");
var { serializeAMimeType } = require_data_url();
var { multipartFormDataParser } = require_formdata_parser();
var textEncoder = new TextEncoder();
function noop() {
}
var hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf("v18") !== 0;
var streamRegistry;
if (hasFinalizationRegistry) {
streamRegistry = new FinalizationRegistry((weakRef) => {
const stream = weakRef.deref();
if (stream && !stream.locked && !isDisturbed(stream) && !isErrored(stream)) {
stream.cancel("Response object has been garbage collected").catch(noop);
}
});
}
function extractBody(object, keepalive = false) {
let stream = null;
if (object instanceof ReadableStream) {
@@ -23810,8 +23847,11 @@ Content-Type: ${value.type || "application/octet-stream"}\r
}
return extractBody(object, keepalive);
}
function cloneBody(body) {
function cloneBody(instance, body) {
const [out1, out2] = body.stream.tee();
if (hasFinalizationRegistry) {
streamRegistry.register(instance, new WeakRef(out1));
}
body.stream = out1;
return {
stream: out2,
@@ -23835,18 +23875,18 @@ Content-Type: ${value.type || "application/octet-stream"}\r
mimeType = serializeAMimeType(mimeType);
}
return new Blob2([bytes], { type: mimeType });
}, instance, false);
}, instance);
},
arrayBuffer() {
return consumeBody(this, (bytes) => {
return bytes.buffer;
}, instance, true);
return new Uint8Array(bytes).buffer;
}, instance);
},
text() {
return consumeBody(this, utf8DecodeBytes, instance, false);
return consumeBody(this, utf8DecodeBytes, instance);
},
json() {
return consumeBody(this, parseJSONFromBytes, instance, false);
return consumeBody(this, parseJSONFromBytes, instance);
},
formData() {
return consumeBody(this, (value) => {
@@ -23875,12 +23915,12 @@ Content-Type: ${value.type || "application/octet-stream"}\r
throw new TypeError(
'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".'
);
}, instance, false);
}, instance);
},
bytes() {
return consumeBody(this, (bytes) => {
return new Uint8Array(bytes.buffer, 0, bytes.byteLength);
}, instance, true);
return new Uint8Array(bytes);
}, instance);
}
};
return methods;
@@ -23888,9 +23928,9 @@ Content-Type: ${value.type || "application/octet-stream"}\r
function mixinBody(prototype) {
Object.assign(prototype.prototype, bodyMixinMethods(prototype));
}
async function consumeBody(object, convertBytesToJSValue, instance, shouldClone) {
async function consumeBody(object, convertBytesToJSValue, instance) {
webidl.brandCheck(object, instance);
if (bodyUnusable(object[kState].body)) {
if (bodyUnusable(object)) {
throw new TypeError("Body is unusable: Body has already been read");
}
throwIfAborted(object[kState]);
@@ -23907,10 +23947,11 @@ Content-Type: ${value.type || "application/octet-stream"}\r
successSteps(Buffer.allocUnsafe(0));
return promise.promise;
}
await fullyReadBody(object[kState].body, successSteps, errorSteps, shouldClone);
await fullyReadBody(object[kState].body, successSteps, errorSteps);
return promise.promise;
}
function bodyUnusable(body) {
function bodyUnusable(object) {
const body = object[kState].body;
return body != null && (body.stream.locked || util.isDisturbed(body.stream));
}
function parseJSONFromBytes(bytes) {
@@ -23928,7 +23969,10 @@ Content-Type: ${value.type || "application/octet-stream"}\r
extractBody,
safelyExtractBody,
cloneBody,
mixinBody
mixinBody,
streamRegistry,
hasFinalizationRegistry,
bodyUnusable
};
}
});
@@ -24660,25 +24704,25 @@ upgrade: ${upgrade}\r
channels.sendHeaders.publish({ request: request2, headers: header, socket });
}
if (!body || bodyLength === 0) {
writeBuffer({ abort, body: null, client, request: request2, socket, contentLength, header, expectsPayload });
writeBuffer(abort, null, client, request2, socket, contentLength, header, expectsPayload);
} else if (util.isBuffer(body)) {
writeBuffer({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload });
writeBuffer(abort, body, client, request2, socket, contentLength, header, expectsPayload);
} else if (util.isBlobLike(body)) {
if (typeof body.stream === "function") {
writeIterable({ abort, body: body.stream(), client, request: request2, socket, contentLength, header, expectsPayload });
writeIterable(abort, body.stream(), client, request2, socket, contentLength, header, expectsPayload);
} else {
writeBlob({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload });
writeBlob(abort, body, client, request2, socket, contentLength, header, expectsPayload);
}
} else if (util.isStream(body)) {
writeStream({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload });
writeStream(abort, body, client, request2, socket, contentLength, header, expectsPayload);
} else if (util.isIterable(body)) {
writeIterable({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload });
writeIterable(abort, body, client, request2, socket, contentLength, header, expectsPayload);
} else {
assert(false);
}
return true;
}
function writeStream({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) {
function writeStream(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
let finished = false;
const writer = new AsyncWriter({ abort, socket, request: request2, contentLength, client, expectsPayload, header });
@@ -24747,7 +24791,7 @@ upgrade: ${upgrade}\r
setImmediate(onClose);
}
}
function writeBuffer({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) {
function writeBuffer(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
try {
if (!body) {
if (contentLength === 0) {
@@ -24778,7 +24822,7 @@ upgrade: ${upgrade}\r
abort(err);
}
}
async function writeBlob({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) {
async function writeBlob(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
assert(contentLength === body.size, "blob body must have content length");
try {
if (contentLength != null && contentLength !== body.size) {
@@ -24801,7 +24845,7 @@ upgrade: ${upgrade}\r
abort(err);
}
}
async function writeIterable({ abort, body, client, request: request2, socket, contentLength, header, expectsPayload }) {
async function writeIterable(abort, body, client, request2, socket, contentLength, header, expectsPayload) {
assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
let callback = null;
function onDrain() {
@@ -25264,81 +25308,79 @@ var require_client_h2 = __commonJS({
return true;
function writeBodyH2() {
if (!body || contentLength === 0) {
writeBuffer({
writeBuffer(
abort,
stream,
null,
client,
request: request2,
request2,
client[kSocket],
contentLength,
expectsPayload,
h2stream: stream,
body: null,
socket: client[kSocket]
});
expectsPayload
);
} else if (util.isBuffer(body)) {
writeBuffer({
writeBuffer(
abort,
client,
request: request2,
contentLength,
stream,
body,
expectsPayload,
h2stream: stream,
socket: client[kSocket]
});
client,
request2,
client[kSocket],
contentLength,
expectsPayload
);
} else if (util.isBlobLike(body)) {
if (typeof body.stream === "function") {
writeIterable({
writeIterable(
abort,
stream,
body.stream(),
client,
request: request2,
request2,
client[kSocket],
contentLength,
expectsPayload,
h2stream: stream,
body: body.stream(),
socket: client[kSocket]
});
expectsPayload
);
} else {
writeBlob({
writeBlob(
abort,
stream,
body,
client,
request: request2,
request2,
client[kSocket],
contentLength,
expectsPayload,
h2stream: stream,
socket: client[kSocket]
});
expectsPayload
);
}
} else if (util.isStream(body)) {
writeStream({
writeStream(
abort,
client[kSocket],
expectsPayload,
stream,
body,
client,
request: request2,
contentLength,
expectsPayload,
socket: client[kSocket],
h2stream: stream,
header: ""
});
request2,
contentLength
);
} else if (util.isIterable(body)) {
writeIterable({
writeIterable(
abort,
stream,
body,
client,
request: request2,
request2,
client[kSocket],
contentLength,
expectsPayload,
header: "",
h2stream: stream,
socket: client[kSocket]
});
expectsPayload
);
} else {
assert(false);
}
}
}
function writeBuffer({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) {
function writeBuffer(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) {
try {
if (body != null && util.isBuffer(body)) {
assert(contentLength === body.byteLength, "buffer body must have content length");
@@ -25357,7 +25399,7 @@ var require_client_h2 = __commonJS({
abort(error);
}
}
function writeStream({ abort, socket, expectsPayload, h2stream, body, client, request: request2, contentLength }) {
function writeStream(abort, socket, expectsPayload, h2stream, body, client, request2, contentLength) {
assert(contentLength !== 0 || client[kRunning] === 0, "stream body cannot be pipelined");
const pipe = pipeline(
body,
@@ -25381,7 +25423,7 @@ var require_client_h2 = __commonJS({
request2.onBodySent(chunk);
}
}
async function writeBlob({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) {
async function writeBlob(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) {
assert(contentLength === body.size, "blob body must have content length");
try {
if (contentLength != null && contentLength !== body.size) {
@@ -25402,7 +25444,7 @@ var require_client_h2 = __commonJS({
abort(err);
}
}
async function writeIterable({ abort, h2stream, body, client, request: request2, socket, contentLength, expectsPayload }) {
async function writeIterable(abort, h2stream, body, client, request2, socket, contentLength, expectsPayload) {
assert(contentLength !== 0 || client[kRunning] === 0, "iterator body cannot be pipelined");
let callback = null;
function onDrain() {
@@ -26484,8 +26526,13 @@ var require_balanced_pool2 = __commonJS({
var kMaxWeightPerServer = Symbol("kMaxWeightPerServer");
var kErrorPenalty = Symbol("kErrorPenalty");
function getGreatestCommonDivisor(a, b) {
if (b === 0) return a;
return getGreatestCommonDivisor(b, a % b);
if (a === 0) return b;
while (b !== 0) {
const t = b;
b = a % b;
a = t;
}
return a;
}
function defaultFactory(origin, opts) {
return new Pool(origin, opts);
@@ -26539,7 +26586,11 @@ var require_balanced_pool2 = __commonJS({
return this;
}
_updateBalancedPoolStats() {
this[kGreatestCommonDivisor] = this[kClients].map((p) => p[kWeight]).reduce(getGreatestCommonDivisor, 0);
let result = 0;
for (let i = 0; i < this[kClients].length; i++) {
result = getGreatestCommonDivisor(this[kClients][i][kWeight], result);
}
this[kGreatestCommonDivisor] = result;
}
removeUpstream(upstream) {
const upstreamOrigin = parseOrigin(upstream).origin;
@@ -27147,7 +27198,7 @@ var require_retry_handler = __commonJS({
this.abort(
new RequestRetryError("Content-Range mismatch", statusCode, {
headers,
count: this.retryCount
data: { count: this.retryCount }
})
);
return false;
@@ -27156,7 +27207,7 @@ var require_retry_handler = __commonJS({
this.abort(
new RequestRetryError("ETag mismatch", statusCode, {
headers,
count: this.retryCount
data: { count: this.retryCount }
})
);
return false;
@@ -29924,7 +29975,7 @@ var require_response2 = __commonJS({
"node_modules/undici/lib/web/fetch/response.js"(exports2, module2) {
"use strict";
var { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers2();
var { extractBody, cloneBody, mixinBody } = require_body2();
var { extractBody, cloneBody, mixinBody, hasFinalizationRegistry, streamRegistry, bodyUnusable } = require_body2();
var util = require_util8();
var nodeUtil = require("node:util");
var { kEnumerableProperty } = util;
@@ -29949,19 +30000,7 @@ var require_response2 = __commonJS({
var { kConstruct } = require_symbols6();
var assert = require("node:assert");
var { types } = require("node:util");
var { isDisturbed, isErrored } = require("node:stream");
var textEncoder = new TextEncoder("utf-8");
var hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf("v18") !== 0;
var registry;
if (hasFinalizationRegistry) {
registry = new FinalizationRegistry((stream) => {
if (!stream.locked && !isDisturbed(stream) && !isErrored(stream)) {
stream.cancel("Response object has been garbage collected").catch(noop);
}
});
}
function noop() {
}
var Response = class _Response {
// Creates network error Response.
static error() {
@@ -30073,7 +30112,7 @@ var require_response2 = __commonJS({
// Returns a clone of response.
clone() {
webidl.brandCheck(this, _Response);
if (this.bodyUsed || this.body?.locked) {
if (bodyUnusable(this)) {
throw webidl.errors.exception({
header: "Response.clone",
message: "Body has already been consumed."
@@ -30132,7 +30171,7 @@ var require_response2 = __commonJS({
}
const newResponse = makeResponse({ ...response, body: null });
if (response.body != null) {
newResponse.body = cloneBody(response.body);
newResponse.body = cloneBody(newResponse, response.body);
}
return newResponse;
}
@@ -30257,7 +30296,7 @@ var require_response2 = __commonJS({
setHeadersList(response[kHeaders], innerResponse.headersList);
setHeadersGuard(response[kHeaders], guard);
if (hasFinalizationRegistry && innerResponse.body?.stream) {
registry.register(response, innerResponse.body.stream);
streamRegistry.register(response, new WeakRef(innerResponse.body.stream));
}
return response;
}
@@ -30372,7 +30411,7 @@ var require_dispatcher_weakref2 = __commonJS({
var require_request4 = __commonJS({
"node_modules/undici/lib/web/fetch/request.js"(exports2, module2) {
"use strict";
var { extractBody, mixinBody, cloneBody } = require_body2();
var { extractBody, mixinBody, cloneBody, bodyUnusable } = require_body2();
var { Headers, fill: fillHeaders, HeadersList, setHeadersGuard, getHeadersGuard, setHeadersList, getHeadersList } = require_headers2();
var { FinalizationRegistry: FinalizationRegistry2 } = require_dispatcher_weakref2()();
var util = require_util8();
@@ -30380,9 +30419,7 @@ var require_request4 = __commonJS({
var {
isValidHTTPToken,
sameOrigin,
normalizeMethod,
environmentSettingsObject,
normalizeMethodRecord
environmentSettingsObject
} = require_util9();
var {
forbiddenMethodsSet,
@@ -30394,7 +30431,7 @@ var require_request4 = __commonJS({
requestCache,
requestDuplex
} = require_constants8();
var { kEnumerableProperty } = util;
var { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util;
var { kHeaders, kSignal, kState, kDispatcher } = require_symbols7();
var { webidl } = require_webidl2();
var { URLSerializer } = require_data_url();
@@ -30591,17 +30628,18 @@ var require_request4 = __commonJS({
}
if (init.method !== void 0) {
let method = init.method;
const mayBeNormalized = normalizeMethodRecord[method];
const mayBeNormalized = normalizedMethodRecords[method];
if (mayBeNormalized !== void 0) {
request2.method = mayBeNormalized;
} else {
if (!isValidHTTPToken(method)) {
throw new TypeError(`'${method}' is not a valid HTTP method.`);
}
if (forbiddenMethodsSet.has(method.toUpperCase())) {
const upperCase = method.toUpperCase();
if (forbiddenMethodsSet.has(upperCase)) {
throw new TypeError(`'${method}' HTTP method is unsupported.`);
}
method = normalizeMethod(method);
method = normalizedMethodRecordsBase[upperCase] ?? method;
request2.method = method;
}
if (!patchMethodWarning && request2.method === "patch") {
@@ -30694,7 +30732,7 @@ var require_request4 = __commonJS({
}
let finalBody = inputOrInitBody;
if (initBody == null && inputBody != null) {
if (util.isDisturbed(inputBody.stream) || inputBody.stream.locked) {
if (bodyUnusable(input)) {
throw new TypeError(
"Cannot construct a Request with a Request object that has already been used."
);
@@ -30829,7 +30867,7 @@ var require_request4 = __commonJS({
// Returns a clone of request.
clone() {
webidl.brandCheck(this, _Request);
if (this.bodyUsed || this.body?.locked) {
if (bodyUnusable(this)) {
throw new TypeError("unusable");
}
const clonedRequest = cloneRequest(this[kState]);
@@ -30922,7 +30960,7 @@ var require_request4 = __commonJS({
function cloneRequest(request2) {
const newRequest = makeRequest({ ...request2, body: null });
if (request2.body != null) {
newRequest.body = cloneBody(request2.body);
newRequest.body = cloneBody(newRequest, request2.body);
}
return newRequest;
}
@@ -35317,7 +35355,6 @@ var require_websocket2 = __commonJS({
var { types } = require("node:util");
var { ErrorEvent, CloseEvent } = require_events2();
var { SendQueue } = require_sender();
var experimentalWarned = false;
var WebSocket = class _WebSocket extends EventTarget {
#events = {
open: null,
@@ -35338,12 +35375,6 @@ var require_websocket2 = __commonJS({
super();
const prefix = "WebSocket constructor";
webidl.argumentLengthCheck(arguments, 1, prefix);
if (!experimentalWarned) {
experimentalWarned = true;
process.emitWarning("WebSockets are experimental, expect them to change at any time.", {
code: "UNDICI-WS"
});
}
const options = webidl.converters["DOMString or sequence<DOMString> or WebSocketInit"](protocols, prefix, "options");
url = webidl.converters.USVString(url, prefix, "url");
protocols = options.protocols;
@@ -36784,132 +36815,116 @@ var RequestError = class extends Error {
// node_modules/@octokit/request/dist-bundle/index.js
var VERSION2 = "0.0.0-development";
var defaults_default = {
headers: {
"user-agent": `octokit-request.js/${VERSION2} ${getUserAgent()}`
}
};
function isPlainObject2(value) {
if (typeof value !== "object" || value === null)
return false;
if (Object.prototype.toString.call(value) !== "[object Object]")
return false;
if (typeof value !== "object" || value === null) return false;
if (Object.prototype.toString.call(value) !== "[object Object]") return false;
const proto = Object.getPrototypeOf(value);
if (proto === null)
return true;
if (proto === null) return true;
const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
}
function getBufferResponse(response) {
return response.arrayBuffer();
}
function fetchWrapper(requestOptions) {
const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false;
if (isPlainObject2(requestOptions.body) || Array.isArray(requestOptions.body)) {
requestOptions.body = JSON.stringify(requestOptions.body);
}
let headers = {};
let status;
let url;
let { fetch } = globalThis;
if (requestOptions.request?.fetch) {
fetch = requestOptions.request.fetch;
}
async function fetchWrapper(requestOptions) {
const fetch = requestOptions.request?.fetch || globalThis.fetch;
if (!fetch) {
throw new Error(
"fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing"
);
}
return fetch(requestOptions.url, {
method: requestOptions.method,
body: requestOptions.body,
redirect: requestOptions.request?.redirect,
// Header values must be `string`
headers: Object.fromEntries(
Object.entries(requestOptions.headers).map(([name, value]) => [
name,
String(value)
])
),
signal: requestOptions.request?.signal,
// duplex must be set if request.body is ReadableStream or Async Iterables.
// See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.
...requestOptions.body && { duplex: "half" }
}).then(async (response) => {
url = response.url;
status = response.status;
for (const keyAndValue of response.headers) {
headers[keyAndValue[0]] = keyAndValue[1];
}
if ("deprecation" in headers) {
const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/);
const deprecationLink = matches && matches.pop();
log.warn(
`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
);
}
if (status === 204 || status === 205) {
return;
}
if (requestOptions.method === "HEAD") {
if (status < 400) {
return;
const log = requestOptions.request?.log || console;
const parseSuccessResponseBody = requestOptions.request?.parseSuccessResponseBody !== false;
const body = isPlainObject2(requestOptions.body) || Array.isArray(requestOptions.body) ? JSON.stringify(requestOptions.body) : requestOptions.body;
const requestHeaders = Object.fromEntries(
Object.entries(requestOptions.headers).map(([name, value]) => [
name,
String(value)
])
);
let fetchResponse;
try {
fetchResponse = await fetch(requestOptions.url, {
method: requestOptions.method,
body,
redirect: requestOptions.request?.redirect,
headers: requestHeaders,
signal: requestOptions.request?.signal,
// duplex must be set if request.body is ReadableStream or Async Iterables.
// See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.
...requestOptions.body && { duplex: "half" }
});
} catch (error) {
let message = "Unknown Error";
if (error instanceof Error) {
if (error.name === "AbortError") {
error.status = 500;
throw error;
}
throw new RequestError(response.statusText, status, {
response: {
url,
status,
headers,
data: void 0
},
request: requestOptions
});
}
if (status === 304) {
throw new RequestError("Not modified", status, {
response: {
url,
status,
headers,
data: await getResponseData(response)
},
request: requestOptions
});
}
if (status >= 400) {
const data = await getResponseData(response);
const error = new RequestError(toErrorMessage(data), status, {
response: {
url,
status,
headers,
data
},
request: requestOptions
});
throw error;
}
return parseSuccessResponseBody ? await getResponseData(response) : response.body;
}).then((data) => {
return {
status,
url,
headers,
data
};
}).catch((error) => {
if (error instanceof RequestError)
throw error;
else if (error.name === "AbortError")
throw error;
let message = error.message;
if (error.name === "TypeError" && "cause" in error) {
if (error.cause instanceof Error) {
message = error.cause.message;
} else if (typeof error.cause === "string") {
message = error.cause;
message = error.message;
if (error.name === "TypeError" && "cause" in error) {
if (error.cause instanceof Error) {
message = error.cause.message;
} else if (typeof error.cause === "string") {
message = error.cause;
}
}
}
throw new RequestError(message, 500, {
const requestError = new RequestError(message, 500, {
request: requestOptions
});
});
requestError.cause = error;
throw requestError;
}
const status = fetchResponse.status;
const url = fetchResponse.url;
const responseHeaders = {};
for (const [key, value] of fetchResponse.headers) {
responseHeaders[key] = value;
}
const octokitResponse = {
url,
status,
headers: responseHeaders,
data: ""
};
if ("deprecation" in responseHeaders) {
const matches = responseHeaders.link && responseHeaders.link.match(/<([^>]+)>; rel="deprecation"/);
const deprecationLink = matches && matches.pop();
log.warn(
`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${responseHeaders.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
);
}
if (status === 204 || status === 205) {
return octokitResponse;
}
if (requestOptions.method === "HEAD") {
if (status < 400) {
return octokitResponse;
}
throw new RequestError(fetchResponse.statusText, status, {
response: octokitResponse,
request: requestOptions
});
}
if (status === 304) {
octokitResponse.data = await getResponseData(fetchResponse);
throw new RequestError("Not modified", status, {
response: octokitResponse,
request: requestOptions
});
}
if (status >= 400) {
octokitResponse.data = await getResponseData(fetchResponse);
throw new RequestError(toErrorMessage(octokitResponse.data), status, {
response: octokitResponse,
request: requestOptions
});
}
octokitResponse.data = parseSuccessResponseBody ? await getResponseData(fetchResponse) : fetchResponse.body;
return octokitResponse;
}
async function getResponseData(response) {
const contentType = response.headers.get("content-type");
@@ -36919,22 +36934,18 @@ async function getResponseData(response) {
if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
return response.text();
}
return getBufferResponse(response);
return response.arrayBuffer();
}
function toErrorMessage(data) {
if (typeof data === "string")
if (typeof data === "string") {
return data;
let suffix;
if ("documentation_url" in data) {
suffix = ` - ${data.documentation_url}`;
} else {
suffix = "";
}
if (data instanceof ArrayBuffer) {
return "Unknown error";
}
if ("message" in data) {
if (Array.isArray(data.errors)) {
return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`;
}
return `${data.message}${suffix}`;
const suffix = "documentation_url" in data ? ` - ${data.documentation_url}` : "";
return Array.isArray(data.errors) ? `${data.message}: ${data.errors.map((v) => JSON.stringify(v)).join(", ")}${suffix}` : `${data.message}${suffix}`;
}
return `Unknown error: ${JSON.stringify(data)}`;
}
@@ -36961,11 +36972,7 @@ function withDefaults2(oldEndpoint, newDefaults) {
defaults: withDefaults2.bind(null, endpoint2)
});
}
var request = withDefaults2(endpoint, {
headers: {
"user-agent": `octokit-request.js/${VERSION2} ${getUserAgent()}`
}
});
var request = withDefaults2(endpoint, defaults_default);
// lib/request.js
var import_undici = __toESM(require_undici2(), 1);
+18 -16
View File
@@ -5,7 +5,7 @@ import pRetry from "p-retry";
* @param {string} appId
* @param {string} privateKey
* @param {string} owner
* @param {string} repositories
* @param {string[]} repositories
* @param {import("@actions/core")} core
* @param {import("@octokit/auth-app").createAppAuth} createAppAuth
* @param {import("@octokit/request").request} request
@@ -22,21 +22,23 @@ export async function main(
skipTokenRevoke
) {
let parsedOwner = "";
let parsedRepositoryNames = "";
let parsedRepositoryNames = [];
// If neither owner nor repositories are set, default to current repository
if (!owner && !repositories) {
[parsedOwner, parsedRepositoryNames] = String(
if (!owner && repositories.length === 0) {
const [owner, repo] = String(
process.env.GITHUB_REPOSITORY
).split("/");
parsedOwner = owner;
parsedRepositoryNames = [repo];
core.info(
`owner and repositories not set, creating token for the current repository ("${parsedRepositoryNames}")`
`owner and repositories not set, creating token for the current repository ("${repo}")`
);
}
// If only an owner is set, default to all repositories from that owner
if (owner && !repositories) {
if (owner && repositories.length === 0) {
parsedOwner = owner;
core.info(
@@ -45,22 +47,22 @@ export async function main(
}
// If repositories are set, but no owner, default to `GITHUB_REPOSITORY_OWNER`
if (!owner && repositories) {
if (!owner && repositories.length > 0) {
parsedOwner = String(process.env.GITHUB_REPOSITORY_OWNER);
parsedRepositoryNames = repositories;
core.info(
`owner not set, creating owner for given repositories "${repositories}" in current owner ("${parsedOwner}")`
`owner not set, creating owner for given repositories "${repositories.join(',')}" in current owner ("${parsedOwner}")`
);
}
// If both owner and repositories are set, use those values
if (owner && repositories) {
if (owner && repositories.length > 0) {
parsedOwner = owner;
parsedRepositoryNames = repositories;
core.info(
`owner and repositories set, creating token for repositories "${repositories}" owned by "${owner}"`
`owner and repositories set, creating token for repositories "${repositories.join(',')}" owned by "${owner}"`
);
}
@@ -73,11 +75,11 @@ export async function main(
let authentication, installationId, appSlug;
// If at least one repository is set, get installation ID from that repository
if (parsedRepositoryNames) {
if (parsedRepositoryNames.length > 0) {
({ authentication, installationId, appSlug } = await pRetry(() => getTokenFromRepository(request, auth, parsedOwner, parsedRepositoryNames), {
onFailedAttempt: (error) => {
core.info(
`Failed to create token for "${parsedRepositoryNames}" (attempt ${error.attemptNumber}): ${error.message}`
`Failed to create token for "${parsedRepositoryNames.join(',')}" (attempt ${error.attemptNumber}): ${error.message}`
);
},
retries: 3,
@@ -104,7 +106,7 @@ export async function main(
// Make token accessible to post function (so we can invalidate it)
if (!skipTokenRevoke) {
core.saveState("token", authentication.token);
core.setOutput("expiresAt", authentication.expiresAt);
core.saveState("expiresAt", authentication.expiresAt);
}
}
@@ -144,7 +146,7 @@ async function getTokenFromRepository(request, auth, parsedOwner, parsedReposito
// https://docs.github.com/rest/apps/apps?apiVersion=2022-11-28#get-a-repository-installation-for-the-authenticated-app
const response = await request("GET /repos/{owner}/{repo}/installation", {
owner: parsedOwner,
repo: parsedRepositoryNames.split(",")[0],
repo: parsedRepositoryNames[0],
request: {
hook: auth.hook,
},
@@ -154,11 +156,11 @@ async function getTokenFromRepository(request, auth, parsedOwner, parsedReposito
const authentication = await auth({
type: "installation",
installationId: response.data.id,
repositoryNames: parsedRepositoryNames.split(","),
repositoryNames: parsedRepositoryNames,
});
const installationId = response.data.id;
const appSlug = response.data['app_slug'];
return { authentication, installationId, appSlug };
}
}
+4 -1
View File
@@ -25,7 +25,10 @@ if (!privateKey) {
throw new Error("Input required and not supplied: private-key");
}
const owner = core.getInput("owner");
const repositories = core.getInput("repositories");
const repositories = core.getInput("repositories")
.split(/[\n,]+/)
.map(s => s.trim())
.filter(x => x !== '');
const skipTokenRevoke = Boolean(
core.getInput("skip-token-revoke") || core.getInput("skip_token_revoke")
+521 -171
View File
File diff suppressed because it is too large Load Diff
+10 -10
View File
@@ -2,10 +2,10 @@
"name": "create-github-app-token",
"private": true,
"type": "module",
"version": "1.10.1",
"version": "1.11.0",
"description": "GitHub Action for creating a GitHub App Installation Access Token",
"scripts": {
"build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --target=node20.0.0",
"build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --target=node20.0.0 --packages=bundle",
"test": "c8 --100 ava tests/index.js",
"coverage": "c8 report --reporter html",
"postcoverage": "open-cli coverage/index.html"
@@ -13,20 +13,20 @@
"license": "MIT",
"dependencies": {
"@actions/core": "^1.10.1",
"@octokit/auth-app": "^7.1.0",
"@octokit/request": "^9.0.1",
"@octokit/auth-app": "^7.1.1",
"@octokit/request": "^9.1.3",
"p-retry": "^6.2.0",
"undici": "^6.18.2"
"undici": "^6.19.8"
},
"devDependencies": {
"@sinonjs/fake-timers": "^11.2.2",
"@sinonjs/fake-timers": "^13.0.1",
"ava": "^6.1.3",
"c8": "^9.1.0",
"c8": "^10.1.2",
"dotenv": "^16.4.5",
"esbuild": "^0.21.4",
"execa": "^9.1.0",
"esbuild": "^0.23.1",
"execa": "^9.3.1",
"open-cli": "^8.0.0",
"yaml": "^2.4.2"
"yaml": "^2.5.1"
},
"release": {
"branches": [
+13 -3
View File
@@ -1,11 +1,21 @@
import { readdirSync } from "node:fs";
import { execa } from "execa";
import test from "ava";
import { execa } from "execa";
const tests = readdirSync("tests").filter((file) => file.endsWith(".test.js"));
// Get all files in tests directory
const files = readdirSync("tests");
for (const file of tests) {
// Files to ignore
const ignore = ["index.js", "main.js", "README.md", "snapshots"];
const testFiles = files.filter((file) => !ignore.includes(file));
// Throw an error if there is a file that does not end with test.js in the tests directory
for (const file of testFiles) {
if (!file.endsWith(".test.js")) {
throw new Error(`File ${file} does not end with .test.js`);
}
test(file, async (t) => {
// Override Actions environment variables that change `core`s behavior
const env = {
+3 -2
View File
@@ -1,10 +1,11 @@
import { test, DEFAULT_ENV } from "./main.js";
import { DEFAULT_ENV, test } from "./main.js";
// Verify that main works with a custom GitHub API URL passed as `github-api-url` input
await test(
() => {
process.env.INPUT_OWNER = process.env.GITHUB_REPOSITORY_OWNER;
process.env.INPUT_REPOSITORIES = process.env.GITHUB_REPOSITORY;
const currentRepoName = process.env.GITHUB_REPOSITORY.split("/")[1];
process.env.INPUT_REPOSITORIES = currentRepoName;
},
{
...DEFAULT_ENV,
@@ -1,6 +0,0 @@
import { test, DEFAULT_ENV } from "./main.js";
// Verify `main` works correctly when `private-key` input has escaped newlines
await test(() => {
process.env['INPUT_PRIVATE-KEY'] = DEFAULT_ENV.PRIVATE_KEY.replace(/\n/g, '\\n')
});
@@ -0,0 +1,9 @@
import { DEFAULT_ENV, test } from "./main.js";
// Verify `main` works correctly when `private-key` input has escaped newlines
await test(() => {
process.env["INPUT_PRIVATE-KEY"] = DEFAULT_ENV["INPUT_PRIVATE-KEY"].replace(
/\n/g,
"\\n"
);
});
@@ -0,0 +1,9 @@
import { test } from "./main.js";
// Verify `main` successfully obtains a token when the `owner` and `repositories` inputs are set (and the latter is a list of repos).
await test(() => {
process.env.INPUT_OWNER = process.env.GITHUB_REPOSITORY_OWNER;
const currentRepoName = process.env.GITHUB_REPOSITORY.split("/")[1];
// Intentional unnecessary whitespace to test parsing to array
process.env.INPUT_REPOSITORIES = `\n ${currentRepoName}\ntoolkit \n\n checkout \n`;
});
@@ -3,5 +3,7 @@ import { test } from "./main.js";
// Verify `main` successfully obtains a token when the `owner` and `repositories` inputs are set (and the latter is a list of repos).
await test(() => {
process.env.INPUT_OWNER = process.env.GITHUB_REPOSITORY_OWNER;
process.env.INPUT_REPOSITORIES = `${process.env.GITHUB_REPOSITORY},actions/toolkit`;
const currentRepoName = process.env.GITHUB_REPOSITORY.split("/")[1];
// Intentional unnecessary whitespace to test parsing to array
process.env.INPUT_REPOSITORIES = ` ${currentRepoName}, toolkit ,checkout`;
});
@@ -3,5 +3,6 @@ import { test } from "./main.js";
// Verify `main` successfully obtains a token when the `owner` and `repositories` inputs are set (and the latter is a single repo).
await test(() => {
process.env.INPUT_OWNER = process.env.GITHUB_REPOSITORY_OWNER;
process.env.INPUT_REPOSITORIES = process.env.GITHUB_REPOSITORY;
const currentRepoName = process.env.GITHUB_REPOSITORY.split("/")[1];
process.env.INPUT_REPOSITORIES = currentRepoName;
});
@@ -3,5 +3,6 @@ import { test } from "./main.js";
// Verify `main` successfully obtains a token when the `owner` input is not set, but the `repositories` input is set.
await test(() => {
delete process.env.INPUT_OWNER;
process.env.INPUT_REPOSITORIES = process.env.GITHUB_REPOSITORY;
const currentRepoName = process.env.GITHUB_REPOSITORY.split("/")[1];
process.env.INPUT_REPOSITORIES = currentRepoName;
});
+4 -3
View File
@@ -46,7 +46,7 @@ export async function test(cb = (_mockPool) => {}, env = DEFAULT_ENV) {
// Set up mocking
const baseUrl = new URL(env["INPUT_GITHUB-API-URL"]);
const basePath = baseUrl.pathname === '/' ? '' : baseUrl.pathname;
const basePath = baseUrl.pathname === "/" ? "" : baseUrl.pathname;
const mockAgent = new MockAgent();
mockAgent.disableNetConnect();
setGlobalDispatcher(mockAgent);
@@ -58,8 +58,9 @@ export async function test(cb = (_mockPool) => {}, env = DEFAULT_ENV) {
const mockInstallationId = "123456";
const mockAppSlug = "github-actions";
const owner = env.INPUT_OWNER ?? env.GITHUB_REPOSITORY_OWNER;
const currentRepoName = env.GITHUB_REPOSITORY.split("/")[1];
const repo = encodeURIComponent(
(env.INPUT_REPOSITORIES ?? env.GITHUB_REPOSITORY).split(",")[0]
(env.INPUT_REPOSITORIES ?? currentRepoName).split(",")[0]
);
mockPool
.intercept({
@@ -73,7 +74,7 @@ export async function test(cb = (_mockPool) => {}, env = DEFAULT_ENV) {
})
.reply(
200,
{ id: mockInstallationId, "app_slug": mockAppSlug },
{ id: mockInstallationId, app_slug: mockAppSlug },
{ headers: { "content-type": "application/json" } }
);
+70 -21
View File
@@ -24,7 +24,7 @@ Generated by [AVA](https://avajs.dev).
> stdout
`owner and repositories set, creating token for repositories "actions/create-github-app-token" owned by "actions"␊
`owner and repositories set, creating token for repositories "create-github-app-token" owned by "actions"␊
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
@@ -33,8 +33,7 @@ Generated by [AVA](https://avajs.dev).
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=expiresAt::2016-07-11T22:14:10Z`
::save-state name=expiresAt::2016-07-11T22:14:10Z`
## main-missing-app-id.test.js
@@ -76,6 +75,45 @@ Generated by [AVA](https://avajs.dev).
''
## main-private-key-with-escaped-newlines.test.js
> stderr
''
> stdout
`owner and repositories not set, creating token for the current repository ("create-github-app-token")␊
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=installation-id::123456␊
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=expiresAt::2016-07-11T22:14:10Z`
## main-repo-skew.test.js
> stderr
`'Issued at' claim ('iat') must be an Integer representing the time that the assertion was issued.␊
[@octokit/auth-app] GitHub API time and system time are different by 30 seconds. Retrying request with the difference accounted for.`
> stdout
`owner and repositories set, creating token for repositories "failed-repo" owned by "actions"␊
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=installation-id::123456␊
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=expiresAt::2016-07-11T22:14:10Z`
## main-token-get-owner-set-repo-fail-response.test.js
> stderr
@@ -94,8 +132,26 @@ Generated by [AVA](https://avajs.dev).
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=expiresAt::2016-07-11T22:14:10Z`
## main-token-get-owner-set-repo-set-to-many-newline.test.js
> stderr
''
> stdout
`owner and repositories set, creating token for repositories "create-github-app-token,toolkit,checkout" owned by "actions"␊
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=expiresAt::2016-07-11T22:14:10Z`
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=installation-id::123456␊
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::save-state name=expiresAt::2016-07-11T22:14:10Z`
## main-token-get-owner-set-repo-set-to-many.test.js
@@ -105,7 +161,7 @@ Generated by [AVA](https://avajs.dev).
> stdout
`owner and repositories set, creating token for repositories "actions/create-github-app-token,actions/toolkit" owned by "actions"␊
`owner and repositories set, creating token for repositories "create-github-app-token,toolkit,checkout" owned by "actions"␊
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
@@ -114,8 +170,7 @@ Generated by [AVA](https://avajs.dev).
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=expiresAt::2016-07-11T22:14:10Z`
::save-state name=expiresAt::2016-07-11T22:14:10Z`
## main-token-get-owner-set-repo-set-to-one.test.js
@@ -125,7 +180,7 @@ Generated by [AVA](https://avajs.dev).
> stdout
`owner and repositories set, creating token for repositories "actions/create-github-app-token" owned by "actions"␊
`owner and repositories set, creating token for repositories "create-github-app-token" owned by "actions"␊
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
@@ -134,8 +189,7 @@ Generated by [AVA](https://avajs.dev).
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=expiresAt::2016-07-11T22:14:10Z`
::save-state name=expiresAt::2016-07-11T22:14:10Z`
## main-token-get-owner-set-to-org-repo-unset.test.js
@@ -154,8 +208,7 @@ Generated by [AVA](https://avajs.dev).
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=expiresAt::2016-07-11T22:14:10Z`
::save-state name=expiresAt::2016-07-11T22:14:10Z`
## main-token-get-owner-set-to-user-fail-response.test.js
@@ -175,8 +228,7 @@ Generated by [AVA](https://avajs.dev).
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=expiresAt::2016-07-11T22:14:10Z`
::save-state name=expiresAt::2016-07-11T22:14:10Z`
## main-token-get-owner-set-to-user-repo-unset.test.js
@@ -195,8 +247,7 @@ Generated by [AVA](https://avajs.dev).
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=expiresAt::2016-07-11T22:14:10Z`
::save-state name=expiresAt::2016-07-11T22:14:10Z`
## main-token-get-owner-unset-repo-set.test.js
@@ -206,7 +257,7 @@ Generated by [AVA](https://avajs.dev).
> stdout
`owner not set, creating owner for given repositories "actions/create-github-app-token" in current owner ("actions")␊
`owner not set, creating owner for given repositories "create-github-app-token" in current owner ("actions")␊
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
@@ -215,8 +266,7 @@ Generated by [AVA](https://avajs.dev).
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=expiresAt::2016-07-11T22:14:10Z`
::save-state name=expiresAt::2016-07-11T22:14:10Z`
## main-token-get-owner-unset-repo-unset.test.js
@@ -235,8 +285,7 @@ Generated by [AVA](https://avajs.dev).
::set-output name=app-slug::github-actions␊
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a␊
::set-output name=expiresAt::2016-07-11T22:14:10Z`
::save-state name=expiresAt::2016-07-11T22:14:10Z`
## post-revoke-token-fail-response.test.js
Binary file not shown.