Compare commits

..

10 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
21 changed files with 1063 additions and 551 deletions
+1
View File
@@ -5,6 +5,7 @@ on:
branches:
- main
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
+37 -13
View File
@@ -79,14 +79,14 @@ jobs:
# required
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
- name: Retrieve GitHub App User ID
- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.generate-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
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}}"
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
@@ -104,14 +104,14 @@ jobs:
# required
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
- name: Retrieve GitHub App User ID
- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.generate-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
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 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 .
@@ -119,8 +119,12 @@ jobs:
git push
```
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%5Bbot%5D` to see the user ID of dependabot is 49699333.
> [!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
@@ -159,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 }}
@@ -203,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"
@@ -274,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"
+195 -171
View File
@@ -2239,6 +2239,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":
@@ -2938,6 +2939,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;
@@ -4172,7 +4174,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;
}
@@ -22785,7 +22801,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;
}
@@ -23887,11 +23917,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) {
@@ -24034,8 +24076,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,
@@ -24114,7 +24159,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r
}
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]);
@@ -24134,7 +24179,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r
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) {
@@ -24152,7 +24198,10 @@ Content-Type: ${value.type || "application/octet-stream"}\r
extractBody,
safelyExtractBody,
cloneBody,
mixinBody
mixinBody,
streamRegistry,
hasFinalizationRegistry,
bodyUnusable
};
}
});
@@ -26706,8 +26755,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);
@@ -26761,7 +26815,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;
@@ -30146,7 +30204,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;
@@ -30171,19 +30229,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() {
@@ -30295,7 +30341,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."
@@ -30354,7 +30400,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;
}
@@ -30479,7 +30525,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;
}
@@ -30594,7 +30640,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();
@@ -30915,7 +30961,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."
);
@@ -31050,7 +31096,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]);
@@ -31143,7 +31189,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;
}
@@ -36957,132 +37003,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");
@@ -37092,22 +37122,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)}`;
}
@@ -37134,11 +37160,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);
// node_modules/@octokit/oauth-methods/dist-bundle/index.js
function requestToOAuthBaseUrl(request2) {
@@ -39484,7 +39506,7 @@ async function hook4(state, request2, route, parameters) {
state,
// @ts-expect-error TBD
{},
request2
request2.defaults({ baseUrl: endpoint2.baseUrl })
);
endpoint2.headers.authorization = `token ${token}`;
return sendRequestWithRetries(
@@ -39517,7 +39539,7 @@ async function sendRequestWithRetries(state, request2, options, createdAt, retri
return sendRequestWithRetries(state, request2, options, createdAt, retries);
}
}
var VERSION6 = "7.1.0";
var VERSION6 = "7.1.1";
function createAppAuth(options) {
if (!options.appId) {
throw new Error("[@octokit/auth-app] appId option is required");
@@ -39678,33 +39700,35 @@ async function pRetry(input, options) {
// lib/main.js
async function main(appId2, privateKey2, owner2, repositories2, core3, createAppAuth2, request2, skipTokenRevoke2) {
let parsedOwner = "";
let parsedRepositoryNames = "";
if (!owner2 && !repositories2) {
[parsedOwner, parsedRepositoryNames] = String(
let parsedRepositoryNames = [];
if (!owner2 && repositories2.length === 0) {
const [owner3, repo] = String(
process.env.GITHUB_REPOSITORY
).split("/");
parsedOwner = owner3;
parsedRepositoryNames = [repo];
core3.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 (owner2 && !repositories2) {
if (owner2 && repositories2.length === 0) {
parsedOwner = owner2;
core3.info(
`repositories not set, creating token for all repositories for given owner "${owner2}"`
);
}
if (!owner2 && repositories2) {
if (!owner2 && repositories2.length > 0) {
parsedOwner = String(process.env.GITHUB_REPOSITORY_OWNER);
parsedRepositoryNames = repositories2;
core3.info(
`owner not set, creating owner for given repositories "${repositories2}" in current owner ("${parsedOwner}")`
`owner not set, creating owner for given repositories "${repositories2.join(",")}" in current owner ("${parsedOwner}")`
);
}
if (owner2 && repositories2) {
if (owner2 && repositories2.length > 0) {
parsedOwner = owner2;
parsedRepositoryNames = repositories2;
core3.info(
`owner and repositories set, creating token for repositories "${repositories2}" owned by "${owner2}"`
`owner and repositories set, creating token for repositories "${repositories2.join(",")}" owned by "${owner2}"`
);
}
const auth5 = createAppAuth2({
@@ -39713,11 +39737,11 @@ async function main(appId2, privateKey2, owner2, repositories2, core3, createApp
request: request2
});
let authentication, installationId, appSlug;
if (parsedRepositoryNames) {
if (parsedRepositoryNames.length > 0) {
({ authentication, installationId, appSlug } = await pRetry(() => getTokenFromRepository(request2, auth5, parsedOwner, parsedRepositoryNames), {
onFailedAttempt: (error) => {
core3.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
@@ -39767,7 +39791,7 @@ async function getTokenFromOwner(request2, auth5, parsedOwner) {
async function getTokenFromRepository(request2, auth5, parsedOwner, parsedRepositoryNames) {
const response = await request2("GET /repos/{owner}/{repo}/installation", {
owner: parsedOwner,
repo: parsedRepositoryNames.split(",")[0],
repo: parsedRepositoryNames[0],
request: {
hook: auth5.hook
}
@@ -39775,7 +39799,7 @@ async function getTokenFromRepository(request2, auth5, parsedOwner, parsedReposi
const authentication = await auth5({
type: "installation",
installationId: response.data.id,
repositoryNames: parsedRepositoryNames.split(",")
repositoryNames: parsedRepositoryNames
});
const installationId = response.data.id;
const appSlug = response.data["app_slug"];
@@ -39825,7 +39849,7 @@ if (!privateKey) {
throw new Error("Input required and not supplied: private-key");
}
var owner = import_core2.default.getInput("owner");
var repositories = import_core2.default.getInput("repositories");
var repositories = import_core2.default.getInput("repositories").split(/[\n,]+/).map((s) => s.trim()).filter((x) => x !== "");
var skipTokenRevoke = Boolean(
import_core2.default.getInput("skip-token-revoke") || import_core2.default.getInput("skip_token_revoke")
);
+177 -155
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;
}
@@ -22556,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;
}
@@ -23658,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) {
@@ -23805,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,
@@ -23885,7 +23930,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r
}
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]);
@@ -23905,7 +23950,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r
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) {
@@ -23923,7 +23969,10 @@ Content-Type: ${value.type || "application/octet-stream"}\r
extractBody,
safelyExtractBody,
cloneBody,
mixinBody
mixinBody,
streamRegistry,
hasFinalizationRegistry,
bodyUnusable
};
}
});
@@ -26477,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);
@@ -26532,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;
@@ -29917,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;
@@ -29942,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() {
@@ -30066,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."
@@ -30125,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;
}
@@ -30250,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;
}
@@ -30365,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();
@@ -30686,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."
);
@@ -30821,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]);
@@ -30914,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;
}
@@ -36769,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");
@@ -36904,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)}`;
}
@@ -36946,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);
+17 -15
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,
@@ -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")
+514 -164
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.3",
"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.19.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" } }
);
+62 -4
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␊
@@ -75,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
@@ -95,6 +134,25 @@ Generated by [AVA](https://avajs.dev).
::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=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
> stderr
@@ -103,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␊
@@ -122,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␊
@@ -199,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␊
Binary file not shown.