Compare commits

...
17 Commits
Author SHA1 Message Date
Kevin Stillhammer eef6392152 Test exit-zero 2025-01-26 17:49:55 +01:00
Kevin StillhammerandGitHub 9071a7b1c3 Use TOML 1.0.0 compliant library for parsing (#47)
iarna/toml is unmaintained.
Replaced by smol-toml which is maintained and has the same api
2025-01-16 17:20:40 +01:00
0c24450c01 chore: update known checksums for 0.9.1 (#42)
chore: update known checksums for 0.9.1

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2025-01-11 13:39:34 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
e6390afda0 Bump @types/node from 22.10.2 to 22.10.5 (#38)
Bumps
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
from 22.10.2 to 22.10.5.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node">compare
view</a></li>
</ul>
</details>
<br />


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

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

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

---

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

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-08 07:48:15 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
55d5f5e208 Bump eifinger/actionlint-action from 1.8.0 to 1.9.0 (#39)
Bumps
[eifinger/actionlint-action](https://github.com/eifinger/actionlint-action)
from 1.8.0 to 1.9.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/eifinger/actionlint-action/commit/8ebeb40569f3c15ca66fe36d1b75f9b70c6c4f6e"><code>8ebeb40</code></a>
set default actionlint version to 1.7.6 (<a
href="https://redirect.github.com/eifinger/actionlint-action/issues/18">#18</a>)</li>
<li>See full diff in <a
href="https://github.com/eifinger/actionlint-action/compare/2af1600e137a7adb5c075232720cb9580b4274e0...8ebeb40569f3c15ca66fe36d1b75f9b70c6c4f6e">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=eifinger/actionlint-action&package-manager=github_actions&previous-version=1.8.0&new-version=1.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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

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

---

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

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-07 07:43:06 +01:00
Christian ClaussandGitHub f6d50c4b88 update readme to v3 (#35) 2024-12-31 11:28:59 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4ef55e95c2 Bump peter-evans/create-pull-request from 7.0.5 to 7.0.6 (#34)
Bumps
[peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request)
from 7.0.5 to 7.0.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/peter-evans/create-pull-request/releases">peter-evans/create-pull-request's
releases</a>.</em></p>
<blockquote>
<h2>Create Pull Request v7.0.6</h2>
<p>⚙️ Fixes an issue with commit signing where unicode characters in
file paths were not preserved.</p>
<h2>What's Changed</h2>
<ul>
<li>build(deps-dev): bump <code>@​vercel/ncc</code> from 0.38.1 to
0.38.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3365">peter-evans/create-pull-request#3365</a></li>
<li>Update distribution by <a
href="https://github.com/actions-bot"><code>@​actions-bot</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3370">peter-evans/create-pull-request#3370</a></li>
<li>build(deps): bump
<code>@​octokit/plugin-rest-endpoint-methods</code> from 13.2.4 to
13.2.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3375">peter-evans/create-pull-request#3375</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.50 to
18.19.54 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3376">peter-evans/create-pull-request#3376</a></li>
<li>build(deps): bump <code>@​octokit/plugin-paginate-rest</code> from
11.3.3 to 11.3.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3377">peter-evans/create-pull-request#3377</a></li>
<li>Update distribution by <a
href="https://github.com/actions-bot"><code>@​actions-bot</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3388">peter-evans/create-pull-request#3388</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.54 to
18.19.55 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3400">peter-evans/create-pull-request#3400</a></li>
<li>build(deps): bump <code>@​actions/core</code> from 1.10.1 to 1.11.1
by <a href="https://github.com/dependabot"><code>@​dependabot</code></a>
in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3401">peter-evans/create-pull-request#3401</a></li>
<li>build(deps): bump
<code>@​octokit/plugin-rest-endpoint-methods</code> from 13.2.5 to
13.2.6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3403">peter-evans/create-pull-request#3403</a></li>
<li>build(deps-dev): bump eslint-plugin-import from 2.30.0 to 2.31.0 by
<a href="https://github.com/dependabot"><code>@​dependabot</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3402">peter-evans/create-pull-request#3402</a></li>
<li>build(deps): bump <code>@​octokit/plugin-throttling</code> from
9.3.1 to 9.3.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3404">peter-evans/create-pull-request#3404</a></li>
<li>Update distribution by <a
href="https://github.com/actions-bot"><code>@​actions-bot</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3423">peter-evans/create-pull-request#3423</a></li>
<li>build(deps-dev): bump typescript from 5.6.2 to 5.6.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3441">peter-evans/create-pull-request#3441</a></li>
<li>build(deps): bump undici from 6.19.8 to 6.20.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3442">peter-evans/create-pull-request#3442</a></li>
<li>Update distribution by <a
href="https://github.com/actions-bot"><code>@​actions-bot</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3451">peter-evans/create-pull-request#3451</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.55 to
18.19.58 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3457">peter-evans/create-pull-request#3457</a></li>
<li>build(deps-dev): bump <code>@​types/jest</code> from 29.5.13 to
29.5.14 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3462">peter-evans/create-pull-request#3462</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.58 to
18.19.60 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3463">peter-evans/create-pull-request#3463</a></li>
<li>chore: don't bundle undici by <a
href="https://github.com/benmccann"><code>@​benmccann</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3475">peter-evans/create-pull-request#3475</a></li>
<li>Update distribution by <a
href="https://github.com/actions-bot"><code>@​actions-bot</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3478">peter-evans/create-pull-request#3478</a></li>
<li>chore: use node-fetch-native support for proxy env vars by <a
href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3483">peter-evans/create-pull-request#3483</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.60 to
18.19.64 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3488">peter-evans/create-pull-request#3488</a></li>
<li>build(deps-dev): bump undici from 6.20.1 to 6.21.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3499">peter-evans/create-pull-request#3499</a></li>
<li>build(deps-dev): bump <code>@​vercel/ncc</code> from 0.38.2 to
0.38.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3500">peter-evans/create-pull-request#3500</a></li>
<li>docs: note <code>push-to-repo</code> classic PAT
<code>workflow</code> scope requirement by <a
href="https://github.com/scop"><code>@​scop</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3511">peter-evans/create-pull-request#3511</a></li>
<li>docs: spelling fixes by <a
href="https://github.com/scop"><code>@​scop</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3512">peter-evans/create-pull-request#3512</a></li>
<li>build(deps-dev): bump typescript from 5.6.3 to 5.7.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3516">peter-evans/create-pull-request#3516</a></li>
<li>build(deps-dev): bump prettier from 3.3.3 to 3.4.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3517">peter-evans/create-pull-request#3517</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.64 to
18.19.66 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3518">peter-evans/create-pull-request#3518</a></li>
<li>docs(README): clarify that an existing open PR is managed by <a
href="https://github.com/caugner"><code>@​caugner</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3498">peter-evans/create-pull-request#3498</a></li>
<li>Update distribution by <a
href="https://github.com/actions-bot"><code>@​actions-bot</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3529">peter-evans/create-pull-request#3529</a></li>
<li>build(deps): bump <code>@​octokit/plugin-paginate-rest</code> from
11.3.5 to 11.3.6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3542">peter-evans/create-pull-request#3542</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.66 to
18.19.67 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3543">peter-evans/create-pull-request#3543</a></li>
<li>build(deps-dev): bump prettier from 3.4.0 to 3.4.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3544">peter-evans/create-pull-request#3544</a></li>
<li>build(deps-dev): bump eslint-import-resolver-typescript from 3.6.3
to 3.7.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3559">peter-evans/create-pull-request#3559</a></li>
<li>build(deps-dev): bump prettier from 3.4.1 to 3.4.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3560">peter-evans/create-pull-request#3560</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.67 to
18.19.68 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3570">peter-evans/create-pull-request#3570</a></li>
<li>build(deps): bump p-limit from 6.1.0 to 6.2.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3578">peter-evans/create-pull-request#3578</a></li>
<li>Update distribution by <a
href="https://github.com/actions-bot"><code>@​actions-bot</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3583">peter-evans/create-pull-request#3583</a></li>
<li>fix: preserve unicode in filepaths when commit signing by <a
href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3588">peter-evans/create-pull-request#3588</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/benmccann"><code>@​benmccann</code></a>
made their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3475">peter-evans/create-pull-request#3475</a></li>
<li><a href="https://github.com/scop"><code>@​scop</code></a> made their
first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3511">peter-evans/create-pull-request#3511</a></li>
<li><a href="https://github.com/caugner"><code>@​caugner</code></a> made
their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3498">peter-evans/create-pull-request#3498</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/67ccf781d68cd99b580ae25a5c18a1cc84ffff1f"><code>67ccf78</code></a>
fix: preserve unicode in filepaths when commit signing (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3588">#3588</a>)</li>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/bb88e27d3f9cc69c8bc689eba126096c6fe3dded"><code>bb88e27</code></a>
build: update distribution (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3583">#3583</a>)</li>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/b378ed537a3374cbb7642141277ace10488f9318"><code>b378ed5</code></a>
build(deps): bump p-limit from 6.1.0 to 6.2.0 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3578">#3578</a>)</li>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/fa9200e5b4f0d3fe4adc6d4a980fdb27ca333ed2"><code>fa9200e</code></a>
build(deps-dev): bump <code>@​types/node</code> from 18.19.67 to
18.19.68 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3570">#3570</a>)</li>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/16e0059bfd236716f0191bfcfa63d9ded4cf325f"><code>16e0059</code></a>
build(deps-dev): bump prettier from 3.4.1 to 3.4.2 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3560">#3560</a>)</li>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/5bffd5ae80c9e3cdce3fdaba74ba437193643add"><code>5bffd5a</code></a>
build(deps-dev): bump eslint-import-resolver-typescript (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3559">#3559</a>)</li>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/a22a0ddc2127a4161a9f144623d1e51be98d81aa"><code>a22a0dd</code></a>
build(deps-dev): bump prettier from 3.4.0 to 3.4.1 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3544">#3544</a>)</li>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/b27ce378c8a71596550fb729c05c9a998f8ff26f"><code>b27ce37</code></a>
build(deps-dev): bump <code>@​types/node</code> from 18.19.66 to
18.19.67 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3543">#3543</a>)</li>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/4e0cc19e22f9071762b3542aa9fa90a1d682dd32"><code>4e0cc19</code></a>
build(deps): bump <code>@​octokit/plugin-paginate-rest</code> from
11.3.5 to 11.3.6 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3542">#3542</a>)</li>
<li><a
href="https://github.com/peter-evans/create-pull-request/commit/25b6871a4ebe4c3585f47c7a687ac6fd0ec0e32d"><code>25b6871</code></a>
docs: update scopes for push-to-fork</li>
<li>Additional commits viewable in <a
href="https://github.com/peter-evans/create-pull-request/compare/5e914681df9dc83aa4e4905692ca88beb2f9e91f...67ccf781d68cd99b580ae25a5c18a1cc84ffff1f">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=peter-evans/create-pull-request&package-manager=github_actions&previous-version=7.0.5&new-version=7.0.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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

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

---

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

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-30 10:26:47 +01:00
Kevin StillhammerandGitHub aef0def40a Bump eifinger/actionlint-action to v1.8.0 (#33) 2024-12-28 19:21:53 +01:00
Kevin StillhammerandGitHub 31a5185046 Replace toml parsing library (#32)
"toml" does not support all TOML features
https://github.com/BinaryMuse/toml-node/issues/51

Fixes: #31
2024-12-23 19:07:34 +01:00
Kevin StillhammerandGitHub 7a82f1f7e4 Default to ruff-version from pyproject.toml (#30)
Closes: #9 

Changes the default behavior to:

- Search for a pyproject.toml in the repo root
- Search in project.dependencies and dependency-groups.dev for ruff
- If none is found use latest

Support for requirements.txt files can be added later
2024-12-23 11:07:46 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
cac2f108b2 Bump @types/node from 22.10.1 to 22.10.2 (#29)
Bumps
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
from 22.10.1 to 22.10.2.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node">compare
view</a></li>
</ul>
</details>
<br />


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

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

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

---

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

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-16 17:23:51 +01:00
Kevin StillhammerandGitHub 35619fdbcc Add problem matchers (#26)
Closes: #12
2024-12-08 12:17:50 +01:00
dependabot[bot]GitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
c9185454fa Bump @types/node from 22.9.3 to 22.10.1 (#20)
Bumps
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
from 22.9.3 to 22.10.1.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node">compare
view</a></li>
</ul>
</details>
<br />


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

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

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

---

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

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-08 11:38:39 +01:00
Kevin StillhammerandGitHub a2d5d1ffa4 Set output format to github (#24)
This was accidentally removed in the v2 release
2024-12-08 11:36:31 +01:00
Kevin StillhammerandGitHub ec9ad4417f Add lint error in malformed python project (#25) 2024-12-08 11:31:53 +01:00
Kevin StillhammerandGitHub efef6ba8fa Move release-drafter.yml to .github (#22)
Fixes `Configuration file .github/release-drafter.yml is not found. The
configuration file must reside in your default branch.`
2024-12-06 13:17:45 +01:00
Christian ClaussandGitHub e5ab5d43a6 README.md: astral-sh/ruff-action@v1 --> v2 (#21)
README.md upgraded to match
https://github.com/astral-sh/ruff-action/releases
```diff
- - uses: astral-sh/ruff-action@v1
+ - uses: astral-sh/ruff-action@v2
```
2024-12-06 08:49:52 +01:00
23 changed files with 2013 additions and 304 deletions
+17
View File
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "ruff-check",
"pattern": [
{
"regexp": "^Error: (.*):(\\d+):(\\d+): (\\w+) (.*)$",
"file": 1,
"line": 2,
"column": 3,
"code": 4,
"message": 5
}
]
}
]
}
+14
View File
@@ -0,0 +1,14 @@
{
"problemMatcher": [
{
"owner": "ruff-format",
"pattern": [
{
"regexp": "^(Would reformat):\\s*(.+)$",
"message": 1,
"file": 2
}
]
}
]
}
+60 -7
View File
@@ -16,8 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Actionlint
uses: eifinger/actionlint-action@bdc2a242a53ae50e609e29f8eeb0d05d792edc09 # v1.7.0
continue-on-error: true # Until https://github.com/rhysd/actionlint/pull/485 is released
uses: eifinger/actionlint-action@8ebeb40569f3c15ca66fe36d1b75f9b70c6c4f6e # v1.9.0
- uses: actions/setup-node@v4
with:
node-version: "20"
@@ -28,17 +27,18 @@ jobs:
- name: Make sure no changes from linters are detected
run: |
git diff --exit-code
test-default-version:
test-latest-version:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-14, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Use default version
- name: Use latest version
uses: ./
with:
src: __tests__/fixtures/python-project
version: latest
test-specific-version:
runs-on: ubuntu-latest
strategy:
@@ -51,6 +51,39 @@ jobs:
with:
version: ${{ matrix.ruff-version }}
src: __tests__/fixtures/python-project
test-default-version-from-pyproject:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use default version from pyproject.toml
id: ruff-action
uses: ./
with:
src: __tests__/fixtures/python-project
- name: Correct version gets installed
run: |
if [ "$RUFF_VERSION" != "0.6.2" ]; then
exit 1
fi
env:
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
test-default-version-from-pyproject-dev-group:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use default version from pyproject.toml dev group
id: ruff-action
uses: ./
with:
src: __tests__/fixtures/pyproject-dependency-dev-project
version-file: __tests__/fixtures/pyproject-dependency-dev-project/pyproject.toml
- name: Correct version gets installed
run: |
if [ "$RUFF_VERSION" != "0.8.3" ]; then
exit 1
fi
env:
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
test-semver-range:
runs-on: ubuntu-latest
steps:
@@ -114,8 +147,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use args
id: should-fail
- name: Format should fail
id: format-should-fail
continue-on-error: true
uses: ./
with:
@@ -123,7 +156,18 @@ jobs:
src: __tests__/fixtures/malformed-python-project
- name: Check if the action failed
run: |
if [ ${{ steps.should-fail.outcome }} == "success" ]; then
if [ ${{ steps.format-should-fail.outcome }} == "success" ]; then
exit 1
fi
- name: Check should fail
id: check-should-fail
continue-on-error: true
uses: ./
with:
src: __tests__/fixtures/malformed-python-project
- name: Check if the action failed
run: |
if [ ${{ steps.check-should-fail.outcome }} == "success" ]; then
exit 1
fi
test-multiple-src:
@@ -140,3 +184,12 @@ jobs:
src: >-
__tests__/fixtures/python-project/src/python_project/__init__.py
__tests__/fixtures/python-project/src/python_project/hello_world.py
test-exit-zero:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Debug this
uses: ./
with:
args: "--exit-zero"
src: __tests__/fixtures/python-project
+1 -1
View File
@@ -17,7 +17,7 @@ jobs:
src/download/checksum/known-checksums.ts ${{ secrets.GITHUB_TOKEN }}
- run: npm install && npm run all
- name: Create Pull Request
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7.0.6
with:
commit-message: "chore: update known checksums"
title:
+33 -21
View File
@@ -19,6 +19,7 @@ fix).
- [Install the latest version (default)](#install-the-latest-version-default)
- [Install a specific version](#install-a-specific-version)
- [Install a version by supplying a semver range](#install-a-version-by-supplying-a-semver-range)
- [Install a version from a specified version file](#install-a-version-from-a-specified-version-file)
- [Validate checksum](#validate-checksum)
- [GitHub authentication token](#github-authentication-token)
- [Outputs](#outputs)
@@ -26,8 +27,9 @@ fix).
## Usage
| Input | Description | Default |
|----------------|---------------------------------------------------------------------------------------------|--------------------|
|----------------|--------------------------------------------------------------------------------------------------------------------------------------------|--------------------|
| `version` | The version of Ruff to install. See [Install specific versions](#install-specific-versions) | `latest` |
| `version-file` | The file to read the version from. See [Install a version from a specified version file](#install-a-version-from-a-specified-version-file) | None |
| `args` | The arguments to pass to the `ruff` command. See [Configuring Ruff] | `check` |
| `src` | The directory or single files to run `ruff` on. | [github.workspace] |
| `checksum` | The sha256 checksum of the downloaded executable. | None |
@@ -36,13 +38,13 @@ fix).
### Basic
```yaml
- uses: astral-sh/ruff-action@v2
- uses: astral-sh/ruff-action@v3
```
### Specify a different source directory
```yaml
- uses: astral-sh/ruff-action@v1
- uses: astral-sh/ruff-action@v3
with:
src: "./src"
```
@@ -50,7 +52,7 @@ fix).
### Specify multiple files
```yaml
- uses: astral-sh/ruff-action@v1
- uses: astral-sh/ruff-action@v3
with:
src: >-
path/to/file1.py
@@ -62,7 +64,7 @@ fix).
This action adds ruff to the PATH, so you can use it in subsequent steps.
```yaml
- uses: astral-sh/ruff-action@v1
- uses: astral-sh/ruff-action@v3
- run: ruff check --fix
- run: ruff format
```
@@ -70,56 +72,66 @@ This action adds ruff to the PATH, so you can use it in subsequent steps.
### Use `ruff format`
```yaml
- uses: astral-sh/ruff-action@v1
- uses: astral-sh/ruff-action@v3
with:
args: "format --check"
```
### Install specific versions
#### Install the latest version (default)
By default this action looks for a pyproject.toml file in the root of the repository to determine
the ruff version to install. If no pyproject.toml file is found, or no ruff version is defined in
either `dependencies` or `dependency-groups.dev` the latest version is installed.
#### Install the latest version
```yaml
- name: Install the latest version of ruff
uses: astral-sh/ruff-action@v2
uses: astral-sh/ruff-action@v3
with:
version: "latest"
```
> [!TIP]
>
> Using `latest` requires to download the ruff executable on every run, which incurs a cost
> (especially on self-hosted runners). As a best practice, consider pinning the version to a
> specific release.
### Install a specific version
#### Install a specific version
```yaml
- name: Install a specific version of ruff
uses: astral-sh/ruff-action@v2
uses: astral-sh/ruff-action@v3
with:
version: "0.4.4"
```
### Install a version by supplying a semver range
#### Install a version by supplying a semver range
You can specify a [semver range](https://github.com/npm/node-semver?tab=readme-ov-file#ranges)
to install the latest version that satisfies the range.
```yaml
- name: Install a semver range of ruff
uses: astral-sh/ruff-action@v2
uses: astral-sh/ruff-action@v3
with:
version: ">=0.4.0"
```
```yaml
- name: Pinning a minor version of ruff
uses: astral-sh/ruff-action@v2
uses: astral-sh/ruff-action@v3
with:
version: "0.4.x"
```
#### Install a version from a specified version file
You can specify a file to read the version from.
Currently `pyproject.toml` is supported.
```yaml
- name: Install a version from a specified version file
uses: astral-sh/ruff-action@v3
with:
version-file: "my-path/to/pyproject.toml"
```
### Validate checksum
You can specify a checksum to validate the downloaded executable. Checksums up to the default version
@@ -128,7 +140,7 @@ are automatically verified by this action. The sha256 hashes can be found on the
```yaml
- name: Install a specific version and validate the checksum
uses: astral-sh/ruff-action@v2
uses: astral-sh/ruff-action@v3
with:
version: "0.7.4"
checksum: "0de731c669b9ece77e799ac3f4a160c30849752714d9775c94cc4cfaf326860c"
@@ -146,7 +158,7 @@ are not sufficient, you can provide a custom GitHub token with the necessary per
```yaml
- name: Install the latest version of ruff with a custom GitHub token
uses: astral-sh/ruff-action@v2
uses: astral-sh/ruff-action@v3
with:
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
```
@@ -1,2 +1,4 @@
import sys
print("Hello world!")
print('How are you?')
@@ -0,0 +1,15 @@
[project]
name = "pyproject-dependency-dev-project"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
[dependency-groups]
dev = [
"ruff==0.8.3"
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
@@ -0,0 +1,2 @@
def hello() -> str:
return "Hello from python-project!"
@@ -5,7 +5,7 @@ description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"ruff>=0.6.2",
"ruff==0.6.2",
]
[build-system]
+5 -2
View File
@@ -11,9 +11,12 @@ inputs:
required: false
default: ${{ github.workspace }}
version:
description: "The version of Ruff to use, e.g., `0.6.0` Defaults to the latest version."
description: "The version of Ruff to use, e.g., `0.6.0` Defaults to the version in pyproject.toml or 'latest'."
required: false
default: ""
version-file:
description: "Path to a pyproject.toml or requirements.txt file to read the version from."
required: false
default: "latest"
checksum:
description: "The checksum of the ruff version to install"
required: false
Generated Vendored
+1185 -75
View File
File diff suppressed because it is too large Load Diff
+151 -41
View File
@@ -32547,6 +32547,142 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.KNOWN_CHECKSUMS = void 0;
// AUTOGENERATED_DO_NOT_EDIT
exports.KNOWN_CHECKSUMS = {
"aarch64-apple-darwin-0.9.1": "fedcadac96deda2ed1a1ebe10985c9489e97768164e15a2f473830d97c760745",
"aarch64-pc-windows-msvc-0.9.1": "e31578352732bd493497a0472d28cf9e90ff7d3c689fe3a6dbf44a1a785e42ff",
"aarch64-unknown-linux-gnu-0.9.1": "470ee4dd634f7a5fab41489b0709e9e278f58da3fa4fd5541cd8ba9d662c4e4f",
"aarch64-unknown-linux-musl-0.9.1": "5b005a537644221d595f90475804954f85096aeaf049a7825b845d4c7e46c879",
"arm-unknown-linux-musleabihf-0.9.1": "d4ccfa086cf9cdad89956cc57a32488aca09556ae549ddfe63e269e0f1571099",
"armv7-unknown-linux-gnueabihf-0.9.1": "b32d7b5dd12c23da9ddc56d98a913ae52419fd34e2c89e8796cc7ef6cd57168a",
"armv7-unknown-linux-musleabihf-0.9.1": "adf85ba14bc3351c77b9275a43326ea0986fb847cf1cb37609453481c5307f52",
"i686-pc-windows-msvc-0.9.1": "ab90abd4f5f697d0c97f09565f01f5483a2075b6e36104d8dce83957f9c319b5",
"i686-unknown-linux-gnu-0.9.1": "99b0c4341bfc7c522533dde54a0c97bc658c6346b991aa4dd0c478489c741840",
"i686-unknown-linux-musl-0.9.1": "4145d3b167e5760f3a556064c89f494903d3ffd1e8e926360f81f00d1b2a5af2",
"powerpc64-unknown-linux-gnu-0.9.1": "b5dbc69db0d28216319452b43d0ff843b5df6f6a75ea10cb49469f269c168677",
"powerpc64le-unknown-linux-gnu-0.9.1": "55abd96d5f5c8169b4b97b116d7085e8fa3285514b5522aa49f0849ddcae3c0a",
"s390x-unknown-linux-gnu-0.9.1": "fa6afa859d7a917330442cc27171fd034e8e8d407219d08e6a5f2350feacf537",
"x86_64-apple-darwin-0.9.1": "a713c37e1fbbdcfdec9c7736a156f0b0684f34762398c2e936d2d3d51c3a0ece",
"x86_64-pc-windows-msvc-0.9.1": "7da670a27b595c715c315e99d8a96b82fc97dbccc99e10677d33757195554c10",
"x86_64-unknown-linux-gnu-0.9.1": "a7ae6cbe30bd48da1cbf6430ebea2de10bae00d76969c5a8eb8ad6eb8cec1c1c",
"x86_64-unknown-linux-musl-0.9.1": "30274fd101b608860fccc5635a46fa66585fc9471f127c0fa7332cf367385598",
"aarch64-apple-darwin-0.9.0": "8d29aeef301e7632ead317c95fbb1565457375992b373e9d40d2e81d89e2172a",
"aarch64-pc-windows-msvc-0.9.0": "0a027f0966de7a2fedef4c0b5c21d0e78a4711d3a4f8c413b643c564315db42d",
"aarch64-unknown-linux-gnu-0.9.0": "63f78452c4103df4a84c32c46336128f056c23f1e4aec50572f348aa8dd3b7f6",
"aarch64-unknown-linux-musl-0.9.0": "0f69102c44a305054bc97f818479daa043f20ae9efa90bbfc5cbc9db36789689",
"arm-unknown-linux-musleabihf-0.9.0": "24407a3aac9b579ede33d8e982d707741316c1bedc12066c7383ec200cb7c6fa",
"armv7-unknown-linux-gnueabihf-0.9.0": "35a46997737e945f4150d6238406c8a21996a4ed880e996a199c38e1c0c3095a",
"armv7-unknown-linux-musleabihf-0.9.0": "f5ac5f2b45a94b30f302bcd806a00e00a023b2cd267798eb672dce44cd4ec8da",
"i686-pc-windows-msvc-0.9.0": "7ab0393909605bedb8db948366dbe811a9568f4a0b7fb7df109829f81530a18e",
"i686-unknown-linux-gnu-0.9.0": "2fffc9b6cb0d9725c3aa6535c39a6b97a94f360dbf7970aed4b68cf0eca11509",
"i686-unknown-linux-musl-0.9.0": "05fd6d15a0eb6dd06aea6ce9f69b316eebf13f161068896c51ddf836a0bc0515",
"powerpc64-unknown-linux-gnu-0.9.0": "357ba64467776fa305638de0666344ff96094ed27aad9d587c55897070b99501",
"powerpc64le-unknown-linux-gnu-0.9.0": "1b2ac0fba624eceeb8ed984c8bb32cbaea81bdd46c0292ab08bf30da8c19ecce",
"s390x-unknown-linux-gnu-0.9.0": "3f1a17968f58a567bf525058245b657751331bcb8e1bb817e3b4083083bb2db6",
"x86_64-apple-darwin-0.9.0": "6e2af7e3efb5c353500d0b9bd003dfc08824a998a77ef6e734fd0046c3f1ef75",
"x86_64-pc-windows-msvc-0.9.0": "3e9db77d8f91977f8f00fbce61a2a5f3cd747ceaf24aee03309d114233fe8fbf",
"x86_64-unknown-linux-gnu-0.9.0": "91470718f191157b9ba203fa1e1107d4e921350c4da0cd128713c8af1b2222f4",
"x86_64-unknown-linux-musl-0.9.0": "d5cc1131c575e0ca9462c72346dea21c10cdf3cb9b664bfc72c8b5f2d48f1a01",
"aarch64-apple-darwin-0.8.6": "d24cfe247de2bfd90d7f0604196247b680e1db5b6c8427cf6e540c38044526f7",
"aarch64-pc-windows-msvc-0.8.6": "1b1a9cc718c59e7c2a9fd471ba39b7eed7730094b7d8ecdc554bbb66f53715d0",
"aarch64-unknown-linux-gnu-0.8.6": "110b9d3fd081d1ac37cb0e4cebad1103c10989c21ff83c587682da308febb5e8",
"aarch64-unknown-linux-musl-0.8.6": "23c5d1dd7eed23d2bd6d340df05a068030e267db28150892a72e3dc97b175164",
"arm-unknown-linux-musleabihf-0.8.6": "5cece038a35e89f5000e93fe45fbc2d1e66b385859fa902f621c812663bf6743",
"armv7-unknown-linux-gnueabihf-0.8.6": "878d1febd822efb423296a228c63083e5858111682772f5f251537b64013e302",
"armv7-unknown-linux-musleabihf-0.8.6": "2263e81d447fa787b9375acf580807365c81154a1232b05f22325106614309d1",
"i686-pc-windows-msvc-0.8.6": "00f6a747a5fb29d604e8921ee2564523e93f1e85522d9e347af703220a596a1e",
"i686-unknown-linux-gnu-0.8.6": "3e00cf6bc53a40de6e34c223c21753b2b1590a690925536b0ba7b382664a140f",
"i686-unknown-linux-musl-0.8.6": "108e35e89386fbb32698abcdec8ff734a79908a34c29d70e2604f3a7c0efc2de",
"powerpc64-unknown-linux-gnu-0.8.6": "573855774fdce775ff843583e7090c44782eb385381831ac4d7fdea0e7d69d30",
"powerpc64le-unknown-linux-gnu-0.8.6": "0d5d3334c7a6f5fa5aeb88a391495fd4a33090656d7069e03cf5062e8304ac55",
"s390x-unknown-linux-gnu-0.8.6": "5e92c81b6fe4a1288bcbc1657aae706a0612d428a1d9876f76b81a9bef5e7ae7",
"x86_64-apple-darwin-0.8.6": "3ff48d180472a1aee6385ba43606ba6a5a6ab89f16a3ca8ccb234966fe3698c1",
"x86_64-pc-windows-msvc-0.8.6": "4ca646f3659a88eb64b73bcfd4a4927c0194005c5aff69f4c71406d4370360c2",
"x86_64-unknown-linux-gnu-0.8.6": "1baca186d3525656c4e8e387bff990fc25af63642e22a0af04f45288b9d566e7",
"x86_64-unknown-linux-musl-0.8.6": "a691c78f045f7202b15620939c4b087f301afe884e42d09a19725f61581aa887",
"aarch64-apple-darwin-0.8.5": "36043a503192fd0c4c37b3f4b9f4d4351a6a3b1734120f0c780b4b8dc4ebea4a",
"aarch64-pc-windows-msvc-0.8.5": "07098d8f1f9816b2b23489414e4f1c441606986d14b3b9e7a915ffd4786679ed",
"aarch64-unknown-linux-gnu-0.8.5": "c858454b7cd90450e4a00c83ebe9523f2baf1cafe24f527c288f70acf8de9ade",
"aarch64-unknown-linux-musl-0.8.5": "120a34b83b45374466914d2a5836f68c31dc99f04f490816a5a16e72ce4879fb",
"arm-unknown-linux-musleabihf-0.8.5": "81c263084e823262e047736f48452bdd0554c0d5a2acf320be27a77914d5cbaa",
"armv7-unknown-linux-gnueabihf-0.8.5": "20154c987c5180baf42d56405a49b3b3b77c5fa532e454ccb206d189c0710456",
"armv7-unknown-linux-musleabihf-0.8.5": "dc77ba378a5fd7636db5e02315b45e0cf11db7dd489028761b00da1167955a35",
"i686-pc-windows-msvc-0.8.5": "d6b2a77f74dff14b38279d53e8faf6abd3c1495c26c4f36ecaf633429356c122",
"i686-unknown-linux-gnu-0.8.5": "c3533505401746c061f7b9275a4657de89e16ed69ad3f87168297a1c9908e3d1",
"i686-unknown-linux-musl-0.8.5": "8dd61925815987d8de68528d361beaa24a8942e895cea30a10e0fd6aa798b61a",
"powerpc64-unknown-linux-gnu-0.8.5": "ceee3b726807d75ac38c8f3ce0484cb9fb516b7f9c1aa90f89704a7db91aceb6",
"powerpc64le-unknown-linux-gnu-0.8.5": "36be86db6653b5cc903deb342dd63fab695b1e16218a64597a1bb1ee85eeb63c",
"s390x-unknown-linux-gnu-0.8.5": "5911cbab251b455ae1c0163300fa921cf95210d1a220862d4fafb3ee3b1d15ca",
"x86_64-apple-darwin-0.8.5": "04ac1eaa178ba358bfd4d31926cdf588f1bee2c6a2085d220ff20ad15f8c117f",
"x86_64-pc-windows-msvc-0.8.5": "3cbe83e67640f080f8fee0daa47929c5f88c89af6e0b50a69339051629a593c0",
"x86_64-unknown-linux-gnu-0.8.5": "74de1995e95438427f7a2b0402263fbfd1868827004b314b50ab720c324c20c0",
"x86_64-unknown-linux-musl-0.8.5": "187b47984ab559a5ad0a1d3401c37fd1afa8c3816ef21cc073240b64026f0c85",
"aarch64-apple-darwin-0.8.4": "8893f3ede33a73740f69b10ee9356e5cf2933c0afe146f00176be12ef91bf9d9",
"aarch64-pc-windows-msvc-0.8.4": "09a6f59fd0407d4d183821c199f4d65de06f2fdd46a8b5dec2dcebb704ef442b",
"aarch64-unknown-linux-gnu-0.8.4": "0dfe36fabb817638863375e0140ce03bf26ccc9a7fd9d2c8e8337b1a21697ed4",
"aarch64-unknown-linux-musl-0.8.4": "c497a751d87c09d0e0185bd4c9f221b35003dbc5611c46df00b55e48e6b8fdd5",
"arm-unknown-linux-musleabihf-0.8.4": "ba28a3f397f5e71d0395c248cda7a9fd5561d5b815390837eea2372ae83ef36c",
"armv7-unknown-linux-gnueabihf-0.8.4": "8e3bf4b4e44b808e42596a360e58da9fc6ebdbe7127ad1721da1bc9f062f65d3",
"armv7-unknown-linux-musleabihf-0.8.4": "50ab927866961307c353cb96ca1053abc718379eb368a4402b367a4fa1a91ccc",
"i686-pc-windows-msvc-0.8.4": "cb944992cd4847a6ea0dc7c57230a6c7b40acdf64b0d09773f27ba0a65802c8b",
"i686-unknown-linux-gnu-0.8.4": "bd46b0fbb90bcab70924f756c17a1cf2cba30e05122d7553e9f33cb8ed41cd14",
"i686-unknown-linux-musl-0.8.4": "4c8317b1fdb7dcb17a3cbd7975180914047e4b6596d9acd6f0fb39ee53c98ff2",
"powerpc64-unknown-linux-gnu-0.8.4": "c5e99c5703989a16be4217caa67dbc1a358e9dbd8ad806e9cb96cbf070d57f0a",
"powerpc64le-unknown-linux-gnu-0.8.4": "42abb3ebc87b0317a91a3622f94f5383c1afe9c40876c50a997a873cef43241d",
"s390x-unknown-linux-gnu-0.8.4": "255510d803b11042aadd6b07f8f7e724a7544f357bfbd3b4cdd855861d74d762",
"x86_64-apple-darwin-0.8.4": "b47e45fe5bf128eaaeaf9f477388934586d00c2c16469034c770d93ceb655a16",
"x86_64-pc-windows-msvc-0.8.4": "9a1ae43ede1dabf08678060c6e6ccccf11b11e13341615c4dfa6f854e311b102",
"x86_64-unknown-linux-gnu-0.8.4": "c4e6591ae1bb4f15c09c9022b7bfc57e1c3a567acdc9cd76021cd1304b5868c3",
"x86_64-unknown-linux-musl-0.8.4": "6c95a04d3c589dac62adc1538c72e5cc100031da04b9bfec639a195cf8dbb017",
"aarch64-apple-darwin-0.8.3": "b99da0f689b01d5b556fe2f66a756c99fe85b78cebd19f73817de7315438d53e",
"aarch64-pc-windows-msvc-0.8.3": "16f543b6ac7765c3f91a8f6b24e49f42dc98e710ccb61b7800f7d21fe9026a14",
"aarch64-unknown-linux-gnu-0.8.3": "e8fd209006dc6be4066eb1730371aa2bba0216471a7fddb57aaf07562dcf7283",
"aarch64-unknown-linux-musl-0.8.3": "a9978f88e3e5e1c2789f93cc1f264cf8981f7a4b6969ea8dd7e630c5c46e3972",
"arm-unknown-linux-musleabihf-0.8.3": "21094f80f0f71025da293fb190468e47e38a55bb2c8595f239ddd6ce5c4718e1",
"armv7-unknown-linux-gnueabihf-0.8.3": "2594d44751d87af208f363113af7fe7b3d706da0edcb421a00816f1a0099c962",
"armv7-unknown-linux-musleabihf-0.8.3": "56be377ab0f6136ff50a52e5c37377d16b07ff3a037f3310fbbd9efe53e691f6",
"i686-pc-windows-msvc-0.8.3": "165e7187594046d20f7d2863e78748bc75f3c3692493c4511bcb2662a8d6e765",
"i686-unknown-linux-gnu-0.8.3": "653a54ddfa27cc5dd172043278f624b6b5af58f27e82a18c66e6874ebf30caf5",
"i686-unknown-linux-musl-0.8.3": "a0363f6e917d4494473307313403241cde2fd1a9ef43a9a3f47156b9be64b88d",
"powerpc64-unknown-linux-gnu-0.8.3": "9ef2a28502dd4212c3fcd47bf8db22b5348737290f598275b59562de42a8dcb0",
"powerpc64le-unknown-linux-gnu-0.8.3": "490eff7f0e16cb7ab026364c80a4b38ce713b305d7441170ece4ac88b25d19f9",
"s390x-unknown-linux-gnu-0.8.3": "508927e86a819822ba7aa8eed647a18c38e570c512a9ad61f1c218e336a9d7d7",
"x86_64-apple-darwin-0.8.3": "92b471249c6c7341ebfc75719620e7d1b01ef70a8ffe1309549e98b57d4d9850",
"x86_64-pc-windows-msvc-0.8.3": "297b8b1c8a888cadd12ca6baf4af115cc65890ccee75d51ca4057000cb0f4c3a",
"x86_64-unknown-linux-gnu-0.8.3": "19eb5ce0cf1151d5ef58372633c342e1c000f4bfa8877b3d4ba0f0191b4bf839",
"x86_64-unknown-linux-musl-0.8.3": "14c104c0d862b0419766136f616973cedd549b33863f480b5b6dcd6fcc75747b",
"aarch64-apple-darwin-0.8.2": "e261948e088a92959b4d8815b04b331609c8160d93b22308a80070a18bf984dd",
"aarch64-pc-windows-msvc-0.8.2": "547b3ff302b124023e025d7cf662e8b818740432338c7e2b5c990edc3dbeeb6d",
"aarch64-unknown-linux-gnu-0.8.2": "fb82155967c658b871706ff928ac8c2150db36c8c5304e70c101d849b50b42cd",
"aarch64-unknown-linux-musl-0.8.2": "a4e7eec392741d1f43bdf8ce947497344e5d56af64dcd3dfce8586834ddfcb86",
"arm-unknown-linux-musleabihf-0.8.2": "4334688da6c51d622fe9a4d34b90be7507a5a11b7e2ea616e39a48d9a315c495",
"armv7-unknown-linux-gnueabihf-0.8.2": "1f066d2e55deb227096a53d92b58991355bf522f30a6403973ccd2daa38aa394",
"armv7-unknown-linux-musleabihf-0.8.2": "6316f026cc3cde815c5bae24b0ef0483be6ad3ec7bd1508780205251bce309e4",
"i686-pc-windows-msvc-0.8.2": "cb031edcace8297046c1fa0eba4eb37982c1b18f5f744ad1fbcb3271e6d845e8",
"i686-unknown-linux-gnu-0.8.2": "c79c8576e5119b30018ffc553a8836de704e08c4203480aa8da760497d89b1dd",
"i686-unknown-linux-musl-0.8.2": "02613f37e1289b599063f8215820a67cae0e9be4a4ea1beb6df1207fe14eea0f",
"powerpc64-unknown-linux-gnu-0.8.2": "fe1ab21a4f0215a5bc0c2e16ee441594882cbb3c7541996cd03e7c95579c6816",
"powerpc64le-unknown-linux-gnu-0.8.2": "431e6d1c966c2390112cb4822b1dcaf4a09f16597d12784de6cfb148953904e6",
"s390x-unknown-linux-gnu-0.8.2": "949705a2abef4559a85c8927f8c5a02ebd402de3fbd20872a93bb5b162386c8a",
"x86_64-apple-darwin-0.8.2": "07e9559eda46d02ba3c09fa0ea78cc15b9bbb10408f47b61d524d13b407eab0c",
"x86_64-pc-windows-msvc-0.8.2": "4ee1f8373e7f7c1be42d51b642d576cfea068584c5c8ee7086f502f0d3a2f483",
"x86_64-unknown-linux-gnu-0.8.2": "b0e54de8d1d384fa9f9e1edf939ac63dcc72ba9ea7c001352510bc5fcc450386",
"x86_64-unknown-linux-musl-0.8.2": "aebe16a7975ff8f477a2790ae49fd01ae34061ffbae3078121620f91fac0506a",
"aarch64-apple-darwin-0.8.1": "19408d81732451fa9eca5bb58f52ab3544a3c4c894f87dbd16265f1eaa542038",
"aarch64-pc-windows-msvc-0.8.1": "18823e9728c09c09347bdcb8bf56eee117476e19248fce0bf9553f1510244a23",
"aarch64-unknown-linux-gnu-0.8.1": "05ca640a800b2ebcb3a60dab20ccdc4485d41a79261243cf44dda551a7ec59f9",
"aarch64-unknown-linux-musl-0.8.1": "a443c2383551c087972be060109971daeb5fedff62e7bd0b9f403f8a0d10ea5c",
"arm-unknown-linux-musleabihf-0.8.1": "e6eda932f691813b7d2ac6c558c2e3be378d0ce2b87b218b22b5f70a73750067",
"armv7-unknown-linux-gnueabihf-0.8.1": "e9ff9fb2b9f81ee2289cf187a88d653cbccefbc489ae78f085799c1aba621bd9",
"armv7-unknown-linux-musleabihf-0.8.1": "04fcb9fb935f1eb328a0bbad611e08683476a73bf26cd2e4f88fd63b4c8728e4",
"i686-pc-windows-msvc-0.8.1": "d9d062c0266e3eebf2aa32633600561465d54e2612cb4e5986a990f5968cdacf",
"i686-unknown-linux-gnu-0.8.1": "a7cde3a634f1c304cb9208951a6fc72c08b5dc72815f2f0e5d4a5b719f6b2480",
"i686-unknown-linux-musl-0.8.1": "c2a16b066541aa53dbab7493ff4c7ab11fa41a33bbb6a27b8d4c6554c1725c69",
"powerpc64-unknown-linux-gnu-0.8.1": "759992752f5427fd230c8cc3c7b622b247eade44c85b2f2642220335eabb6cd2",
"powerpc64le-unknown-linux-gnu-0.8.1": "a5e407808592da5cfbd96c42c45270914aef37a316e4fb3cd8b0f05b7e3453fc",
"s390x-unknown-linux-gnu-0.8.1": "144c57540a1c8b812d0bb9aefc177d8ecb6ef16a173eb7305cee2318f4c370a6",
"x86_64-apple-darwin-0.8.1": "29e5c09a23dd1750f903c29a3ef36ea12527b0035983940eccbb738c2bc914b1",
"x86_64-pc-windows-msvc-0.8.1": "ba096b22fec82e5fffff9bf76a7a75d617586c4d03ef2d13eb047882c532427a",
"x86_64-unknown-linux-gnu-0.8.1": "27942bb3688c2382603b89e7772fcd6df4456eaa1ae2eb93f3f3bb82967d8b00",
"x86_64-unknown-linux-musl-0.8.1": "d03f855ddfacfbddea476c2838d284c316aa97ec141355c69553db2401afd682",
"aarch64-apple-darwin-0.8.0": "eede1dc7e7bf14ceef1b2ef7274cf74b5aa4939f8299ef5b42dc72f25fd4513c",
"aarch64-pc-windows-msvc-0.8.0": "cd9d99c402fa10ba1c19e490379d69e97867058251aadcd9b968e62cd5369a45",
"aarch64-unknown-linux-gnu-0.8.0": "9e130c1c539904e63d186e2f15d08edb61ee38bea04c7a39d2d13eda5b51c66b",
@@ -34342,39 +34478,28 @@ var __importStar = (this && this.__importStar) || (function () {
return result;
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.updateChecksums = updateChecksums;
const node_fs_1 = __nccwpck_require__(3024);
const tc = __importStar(__nccwpck_require__(3472));
const known_checksums_1 = __nccwpck_require__(2764);
function updateChecksums(filePath, downloadUrls) {
return __awaiter(this, void 0, void 0, function* () {
yield node_fs_1.promises.rm(filePath);
yield node_fs_1.promises.appendFile(filePath, "// AUTOGENERATED_DO_NOT_EDIT\nexport const KNOWN_CHECKSUMS: { [key: string]: string } = {\n");
async function updateChecksums(filePath, downloadUrls) {
await node_fs_1.promises.rm(filePath);
await node_fs_1.promises.appendFile(filePath, "// AUTOGENERATED_DO_NOT_EDIT\nexport const KNOWN_CHECKSUMS: { [key: string]: string } = {\n");
let firstLine = true;
for (const downloadUrl of downloadUrls) {
const key = getKey(downloadUrl);
if (key === undefined) {
continue;
}
const checksum = yield getOrDownloadChecksum(key, downloadUrl);
const checksum = await getOrDownloadChecksum(key, downloadUrl);
if (!firstLine) {
yield node_fs_1.promises.appendFile(filePath, ",\n");
await node_fs_1.promises.appendFile(filePath, ",\n");
}
yield node_fs_1.promises.appendFile(filePath, ` "${key}":\n "${checksum}"`);
await node_fs_1.promises.appendFile(filePath, ` "${key}":\n "${checksum}"`);
firstLine = false;
}
yield node_fs_1.promises.appendFile(filePath, ",\n};\n");
});
await node_fs_1.promises.appendFile(filePath, ",\n};\n");
}
function getKey(downloadUrl) {
const parts = downloadUrl.split("/");
@@ -34394,24 +34519,20 @@ function getKey(downloadUrl) {
const name = fileName.split(".")[0].split("ruff-")[1];
return `${name}-${version}`;
}
function getOrDownloadChecksum(key, downloadUrl) {
return __awaiter(this, void 0, void 0, function* () {
async function getOrDownloadChecksum(key, downloadUrl) {
let checksum;
if (key in known_checksums_1.KNOWN_CHECKSUMS) {
checksum = known_checksums_1.KNOWN_CHECKSUMS[key];
}
else {
const content = yield downloadAssetContent(downloadUrl);
const content = await downloadAssetContent(downloadUrl);
checksum = content.split(" ")[0].trim();
}
return checksum;
});
}
function downloadAssetContent(downloadUrl) {
return __awaiter(this, void 0, void 0, function* () {
const downloadPath = yield tc.downloadTool(downloadUrl);
return yield node_fs_1.promises.readFile(downloadPath, "utf8");
});
async function downloadAssetContent(downloadUrl) {
const downloadPath = await tc.downloadTool(downloadUrl);
return await node_fs_1.promises.readFile(downloadPath, "utf8");
}
@@ -34455,39 +34576,28 @@ var __importStar = (this && this.__importStar) || (function () {
return result;
};
})();
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const github = __importStar(__nccwpck_require__(3228));
const core = __importStar(__nccwpck_require__(7484));
const constants_1 = __nccwpck_require__(6156);
const semver = __importStar(__nccwpck_require__(9318));
const update_known_checksums_1 = __nccwpck_require__(6182);
function run() {
return __awaiter(this, void 0, void 0, function* () {
async function run() {
const checksumFilePath = process.argv.slice(2)[0];
const github_token = process.argv.slice(2)[1];
const octokit = github.getOctokit(github_token);
const response = yield octokit.paginate(octokit.rest.repos.listReleases, {
const response = await octokit.paginate(octokit.rest.repos.listReleases, {
owner: constants_1.OWNER,
repo: constants_1.REPO,
});
const downloadUrls = response.flatMap((release) => release.assets
.filter((asset) => asset.name.endsWith(".sha256"))
.map((asset) => asset.browser_download_url));
yield (0, update_known_checksums_1.updateChecksums)(checksumFilePath, downloadUrls);
await (0, update_known_checksums_1.updateChecksums)(checksumFilePath, downloadUrls);
const latestVersion = response
.map((release) => release.tag_name)
.sort(semver.rcompare)[0];
core.setOutput("latest-version", latestVersion);
});
}
run();
+23 -10
View File
@@ -12,11 +12,12 @@
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
"@actions/tool-cache": "^2.0.1"
"@actions/tool-cache": "^2.0.1",
"smol-toml": "^1.3.1"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/node": "^22.9.1",
"@types/node": "^22.10.5",
"@types/semver": "^7.5.8",
"@vercel/ncc": "^0.38.3",
"js-yaml": "^4.1.0",
@@ -386,12 +387,12 @@
}
},
"node_modules/@types/node": {
"version": "22.9.3",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.3.tgz",
"integrity": "sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw==",
"version": "22.10.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.5.tgz",
"integrity": "sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==",
"dev": true,
"dependencies": {
"undici-types": "~6.19.8"
"undici-types": "~6.20.0"
}
},
"node_modules/@types/semver": {
@@ -453,6 +454,17 @@
"semver": "bin/semver.js"
}
},
"node_modules/smol-toml": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.3.1.tgz",
"integrity": "sha512-tEYNll18pPKHroYSmLLrksq233j021G0giwW7P3D24jC54pQ5W5BXMsQ/Mvw1OJCmEYDgY+lrzT+3nNUtoNfXQ==",
"engines": {
"node": ">= 18"
},
"funding": {
"url": "https://github.com/sponsors/cyyynthia"
}
},
"node_modules/tunnel": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
@@ -486,10 +498,11 @@
}
},
"node_modules/undici-types": {
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"dev": true
"version": "6.20.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
"integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==",
"dev": true,
"license": "MIT"
},
"node_modules/universal-user-agent": {
"version": "6.0.1",
+3 -2
View File
@@ -25,11 +25,12 @@
"@actions/core": "^1.11.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
"@actions/tool-cache": "^2.0.1"
"@actions/tool-cache": "^2.0.1",
"smol-toml": "^1.3.1"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/node": "^22.9.1",
"@types/node": "^22.10.5",
"@types/semver": "^7.5.8",
"@vercel/ncc": "^0.38.3",
"js-yaml": "^4.1.0",
+272
View File
@@ -1,5 +1,277 @@
// AUTOGENERATED_DO_NOT_EDIT
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
"aarch64-apple-darwin-0.9.1":
"fedcadac96deda2ed1a1ebe10985c9489e97768164e15a2f473830d97c760745",
"aarch64-pc-windows-msvc-0.9.1":
"e31578352732bd493497a0472d28cf9e90ff7d3c689fe3a6dbf44a1a785e42ff",
"aarch64-unknown-linux-gnu-0.9.1":
"470ee4dd634f7a5fab41489b0709e9e278f58da3fa4fd5541cd8ba9d662c4e4f",
"aarch64-unknown-linux-musl-0.9.1":
"5b005a537644221d595f90475804954f85096aeaf049a7825b845d4c7e46c879",
"arm-unknown-linux-musleabihf-0.9.1":
"d4ccfa086cf9cdad89956cc57a32488aca09556ae549ddfe63e269e0f1571099",
"armv7-unknown-linux-gnueabihf-0.9.1":
"b32d7b5dd12c23da9ddc56d98a913ae52419fd34e2c89e8796cc7ef6cd57168a",
"armv7-unknown-linux-musleabihf-0.9.1":
"adf85ba14bc3351c77b9275a43326ea0986fb847cf1cb37609453481c5307f52",
"i686-pc-windows-msvc-0.9.1":
"ab90abd4f5f697d0c97f09565f01f5483a2075b6e36104d8dce83957f9c319b5",
"i686-unknown-linux-gnu-0.9.1":
"99b0c4341bfc7c522533dde54a0c97bc658c6346b991aa4dd0c478489c741840",
"i686-unknown-linux-musl-0.9.1":
"4145d3b167e5760f3a556064c89f494903d3ffd1e8e926360f81f00d1b2a5af2",
"powerpc64-unknown-linux-gnu-0.9.1":
"b5dbc69db0d28216319452b43d0ff843b5df6f6a75ea10cb49469f269c168677",
"powerpc64le-unknown-linux-gnu-0.9.1":
"55abd96d5f5c8169b4b97b116d7085e8fa3285514b5522aa49f0849ddcae3c0a",
"s390x-unknown-linux-gnu-0.9.1":
"fa6afa859d7a917330442cc27171fd034e8e8d407219d08e6a5f2350feacf537",
"x86_64-apple-darwin-0.9.1":
"a713c37e1fbbdcfdec9c7736a156f0b0684f34762398c2e936d2d3d51c3a0ece",
"x86_64-pc-windows-msvc-0.9.1":
"7da670a27b595c715c315e99d8a96b82fc97dbccc99e10677d33757195554c10",
"x86_64-unknown-linux-gnu-0.9.1":
"a7ae6cbe30bd48da1cbf6430ebea2de10bae00d76969c5a8eb8ad6eb8cec1c1c",
"x86_64-unknown-linux-musl-0.9.1":
"30274fd101b608860fccc5635a46fa66585fc9471f127c0fa7332cf367385598",
"aarch64-apple-darwin-0.9.0":
"8d29aeef301e7632ead317c95fbb1565457375992b373e9d40d2e81d89e2172a",
"aarch64-pc-windows-msvc-0.9.0":
"0a027f0966de7a2fedef4c0b5c21d0e78a4711d3a4f8c413b643c564315db42d",
"aarch64-unknown-linux-gnu-0.9.0":
"63f78452c4103df4a84c32c46336128f056c23f1e4aec50572f348aa8dd3b7f6",
"aarch64-unknown-linux-musl-0.9.0":
"0f69102c44a305054bc97f818479daa043f20ae9efa90bbfc5cbc9db36789689",
"arm-unknown-linux-musleabihf-0.9.0":
"24407a3aac9b579ede33d8e982d707741316c1bedc12066c7383ec200cb7c6fa",
"armv7-unknown-linux-gnueabihf-0.9.0":
"35a46997737e945f4150d6238406c8a21996a4ed880e996a199c38e1c0c3095a",
"armv7-unknown-linux-musleabihf-0.9.0":
"f5ac5f2b45a94b30f302bcd806a00e00a023b2cd267798eb672dce44cd4ec8da",
"i686-pc-windows-msvc-0.9.0":
"7ab0393909605bedb8db948366dbe811a9568f4a0b7fb7df109829f81530a18e",
"i686-unknown-linux-gnu-0.9.0":
"2fffc9b6cb0d9725c3aa6535c39a6b97a94f360dbf7970aed4b68cf0eca11509",
"i686-unknown-linux-musl-0.9.0":
"05fd6d15a0eb6dd06aea6ce9f69b316eebf13f161068896c51ddf836a0bc0515",
"powerpc64-unknown-linux-gnu-0.9.0":
"357ba64467776fa305638de0666344ff96094ed27aad9d587c55897070b99501",
"powerpc64le-unknown-linux-gnu-0.9.0":
"1b2ac0fba624eceeb8ed984c8bb32cbaea81bdd46c0292ab08bf30da8c19ecce",
"s390x-unknown-linux-gnu-0.9.0":
"3f1a17968f58a567bf525058245b657751331bcb8e1bb817e3b4083083bb2db6",
"x86_64-apple-darwin-0.9.0":
"6e2af7e3efb5c353500d0b9bd003dfc08824a998a77ef6e734fd0046c3f1ef75",
"x86_64-pc-windows-msvc-0.9.0":
"3e9db77d8f91977f8f00fbce61a2a5f3cd747ceaf24aee03309d114233fe8fbf",
"x86_64-unknown-linux-gnu-0.9.0":
"91470718f191157b9ba203fa1e1107d4e921350c4da0cd128713c8af1b2222f4",
"x86_64-unknown-linux-musl-0.9.0":
"d5cc1131c575e0ca9462c72346dea21c10cdf3cb9b664bfc72c8b5f2d48f1a01",
"aarch64-apple-darwin-0.8.6":
"d24cfe247de2bfd90d7f0604196247b680e1db5b6c8427cf6e540c38044526f7",
"aarch64-pc-windows-msvc-0.8.6":
"1b1a9cc718c59e7c2a9fd471ba39b7eed7730094b7d8ecdc554bbb66f53715d0",
"aarch64-unknown-linux-gnu-0.8.6":
"110b9d3fd081d1ac37cb0e4cebad1103c10989c21ff83c587682da308febb5e8",
"aarch64-unknown-linux-musl-0.8.6":
"23c5d1dd7eed23d2bd6d340df05a068030e267db28150892a72e3dc97b175164",
"arm-unknown-linux-musleabihf-0.8.6":
"5cece038a35e89f5000e93fe45fbc2d1e66b385859fa902f621c812663bf6743",
"armv7-unknown-linux-gnueabihf-0.8.6":
"878d1febd822efb423296a228c63083e5858111682772f5f251537b64013e302",
"armv7-unknown-linux-musleabihf-0.8.6":
"2263e81d447fa787b9375acf580807365c81154a1232b05f22325106614309d1",
"i686-pc-windows-msvc-0.8.6":
"00f6a747a5fb29d604e8921ee2564523e93f1e85522d9e347af703220a596a1e",
"i686-unknown-linux-gnu-0.8.6":
"3e00cf6bc53a40de6e34c223c21753b2b1590a690925536b0ba7b382664a140f",
"i686-unknown-linux-musl-0.8.6":
"108e35e89386fbb32698abcdec8ff734a79908a34c29d70e2604f3a7c0efc2de",
"powerpc64-unknown-linux-gnu-0.8.6":
"573855774fdce775ff843583e7090c44782eb385381831ac4d7fdea0e7d69d30",
"powerpc64le-unknown-linux-gnu-0.8.6":
"0d5d3334c7a6f5fa5aeb88a391495fd4a33090656d7069e03cf5062e8304ac55",
"s390x-unknown-linux-gnu-0.8.6":
"5e92c81b6fe4a1288bcbc1657aae706a0612d428a1d9876f76b81a9bef5e7ae7",
"x86_64-apple-darwin-0.8.6":
"3ff48d180472a1aee6385ba43606ba6a5a6ab89f16a3ca8ccb234966fe3698c1",
"x86_64-pc-windows-msvc-0.8.6":
"4ca646f3659a88eb64b73bcfd4a4927c0194005c5aff69f4c71406d4370360c2",
"x86_64-unknown-linux-gnu-0.8.6":
"1baca186d3525656c4e8e387bff990fc25af63642e22a0af04f45288b9d566e7",
"x86_64-unknown-linux-musl-0.8.6":
"a691c78f045f7202b15620939c4b087f301afe884e42d09a19725f61581aa887",
"aarch64-apple-darwin-0.8.5":
"36043a503192fd0c4c37b3f4b9f4d4351a6a3b1734120f0c780b4b8dc4ebea4a",
"aarch64-pc-windows-msvc-0.8.5":
"07098d8f1f9816b2b23489414e4f1c441606986d14b3b9e7a915ffd4786679ed",
"aarch64-unknown-linux-gnu-0.8.5":
"c858454b7cd90450e4a00c83ebe9523f2baf1cafe24f527c288f70acf8de9ade",
"aarch64-unknown-linux-musl-0.8.5":
"120a34b83b45374466914d2a5836f68c31dc99f04f490816a5a16e72ce4879fb",
"arm-unknown-linux-musleabihf-0.8.5":
"81c263084e823262e047736f48452bdd0554c0d5a2acf320be27a77914d5cbaa",
"armv7-unknown-linux-gnueabihf-0.8.5":
"20154c987c5180baf42d56405a49b3b3b77c5fa532e454ccb206d189c0710456",
"armv7-unknown-linux-musleabihf-0.8.5":
"dc77ba378a5fd7636db5e02315b45e0cf11db7dd489028761b00da1167955a35",
"i686-pc-windows-msvc-0.8.5":
"d6b2a77f74dff14b38279d53e8faf6abd3c1495c26c4f36ecaf633429356c122",
"i686-unknown-linux-gnu-0.8.5":
"c3533505401746c061f7b9275a4657de89e16ed69ad3f87168297a1c9908e3d1",
"i686-unknown-linux-musl-0.8.5":
"8dd61925815987d8de68528d361beaa24a8942e895cea30a10e0fd6aa798b61a",
"powerpc64-unknown-linux-gnu-0.8.5":
"ceee3b726807d75ac38c8f3ce0484cb9fb516b7f9c1aa90f89704a7db91aceb6",
"powerpc64le-unknown-linux-gnu-0.8.5":
"36be86db6653b5cc903deb342dd63fab695b1e16218a64597a1bb1ee85eeb63c",
"s390x-unknown-linux-gnu-0.8.5":
"5911cbab251b455ae1c0163300fa921cf95210d1a220862d4fafb3ee3b1d15ca",
"x86_64-apple-darwin-0.8.5":
"04ac1eaa178ba358bfd4d31926cdf588f1bee2c6a2085d220ff20ad15f8c117f",
"x86_64-pc-windows-msvc-0.8.5":
"3cbe83e67640f080f8fee0daa47929c5f88c89af6e0b50a69339051629a593c0",
"x86_64-unknown-linux-gnu-0.8.5":
"74de1995e95438427f7a2b0402263fbfd1868827004b314b50ab720c324c20c0",
"x86_64-unknown-linux-musl-0.8.5":
"187b47984ab559a5ad0a1d3401c37fd1afa8c3816ef21cc073240b64026f0c85",
"aarch64-apple-darwin-0.8.4":
"8893f3ede33a73740f69b10ee9356e5cf2933c0afe146f00176be12ef91bf9d9",
"aarch64-pc-windows-msvc-0.8.4":
"09a6f59fd0407d4d183821c199f4d65de06f2fdd46a8b5dec2dcebb704ef442b",
"aarch64-unknown-linux-gnu-0.8.4":
"0dfe36fabb817638863375e0140ce03bf26ccc9a7fd9d2c8e8337b1a21697ed4",
"aarch64-unknown-linux-musl-0.8.4":
"c497a751d87c09d0e0185bd4c9f221b35003dbc5611c46df00b55e48e6b8fdd5",
"arm-unknown-linux-musleabihf-0.8.4":
"ba28a3f397f5e71d0395c248cda7a9fd5561d5b815390837eea2372ae83ef36c",
"armv7-unknown-linux-gnueabihf-0.8.4":
"8e3bf4b4e44b808e42596a360e58da9fc6ebdbe7127ad1721da1bc9f062f65d3",
"armv7-unknown-linux-musleabihf-0.8.4":
"50ab927866961307c353cb96ca1053abc718379eb368a4402b367a4fa1a91ccc",
"i686-pc-windows-msvc-0.8.4":
"cb944992cd4847a6ea0dc7c57230a6c7b40acdf64b0d09773f27ba0a65802c8b",
"i686-unknown-linux-gnu-0.8.4":
"bd46b0fbb90bcab70924f756c17a1cf2cba30e05122d7553e9f33cb8ed41cd14",
"i686-unknown-linux-musl-0.8.4":
"4c8317b1fdb7dcb17a3cbd7975180914047e4b6596d9acd6f0fb39ee53c98ff2",
"powerpc64-unknown-linux-gnu-0.8.4":
"c5e99c5703989a16be4217caa67dbc1a358e9dbd8ad806e9cb96cbf070d57f0a",
"powerpc64le-unknown-linux-gnu-0.8.4":
"42abb3ebc87b0317a91a3622f94f5383c1afe9c40876c50a997a873cef43241d",
"s390x-unknown-linux-gnu-0.8.4":
"255510d803b11042aadd6b07f8f7e724a7544f357bfbd3b4cdd855861d74d762",
"x86_64-apple-darwin-0.8.4":
"b47e45fe5bf128eaaeaf9f477388934586d00c2c16469034c770d93ceb655a16",
"x86_64-pc-windows-msvc-0.8.4":
"9a1ae43ede1dabf08678060c6e6ccccf11b11e13341615c4dfa6f854e311b102",
"x86_64-unknown-linux-gnu-0.8.4":
"c4e6591ae1bb4f15c09c9022b7bfc57e1c3a567acdc9cd76021cd1304b5868c3",
"x86_64-unknown-linux-musl-0.8.4":
"6c95a04d3c589dac62adc1538c72e5cc100031da04b9bfec639a195cf8dbb017",
"aarch64-apple-darwin-0.8.3":
"b99da0f689b01d5b556fe2f66a756c99fe85b78cebd19f73817de7315438d53e",
"aarch64-pc-windows-msvc-0.8.3":
"16f543b6ac7765c3f91a8f6b24e49f42dc98e710ccb61b7800f7d21fe9026a14",
"aarch64-unknown-linux-gnu-0.8.3":
"e8fd209006dc6be4066eb1730371aa2bba0216471a7fddb57aaf07562dcf7283",
"aarch64-unknown-linux-musl-0.8.3":
"a9978f88e3e5e1c2789f93cc1f264cf8981f7a4b6969ea8dd7e630c5c46e3972",
"arm-unknown-linux-musleabihf-0.8.3":
"21094f80f0f71025da293fb190468e47e38a55bb2c8595f239ddd6ce5c4718e1",
"armv7-unknown-linux-gnueabihf-0.8.3":
"2594d44751d87af208f363113af7fe7b3d706da0edcb421a00816f1a0099c962",
"armv7-unknown-linux-musleabihf-0.8.3":
"56be377ab0f6136ff50a52e5c37377d16b07ff3a037f3310fbbd9efe53e691f6",
"i686-pc-windows-msvc-0.8.3":
"165e7187594046d20f7d2863e78748bc75f3c3692493c4511bcb2662a8d6e765",
"i686-unknown-linux-gnu-0.8.3":
"653a54ddfa27cc5dd172043278f624b6b5af58f27e82a18c66e6874ebf30caf5",
"i686-unknown-linux-musl-0.8.3":
"a0363f6e917d4494473307313403241cde2fd1a9ef43a9a3f47156b9be64b88d",
"powerpc64-unknown-linux-gnu-0.8.3":
"9ef2a28502dd4212c3fcd47bf8db22b5348737290f598275b59562de42a8dcb0",
"powerpc64le-unknown-linux-gnu-0.8.3":
"490eff7f0e16cb7ab026364c80a4b38ce713b305d7441170ece4ac88b25d19f9",
"s390x-unknown-linux-gnu-0.8.3":
"508927e86a819822ba7aa8eed647a18c38e570c512a9ad61f1c218e336a9d7d7",
"x86_64-apple-darwin-0.8.3":
"92b471249c6c7341ebfc75719620e7d1b01ef70a8ffe1309549e98b57d4d9850",
"x86_64-pc-windows-msvc-0.8.3":
"297b8b1c8a888cadd12ca6baf4af115cc65890ccee75d51ca4057000cb0f4c3a",
"x86_64-unknown-linux-gnu-0.8.3":
"19eb5ce0cf1151d5ef58372633c342e1c000f4bfa8877b3d4ba0f0191b4bf839",
"x86_64-unknown-linux-musl-0.8.3":
"14c104c0d862b0419766136f616973cedd549b33863f480b5b6dcd6fcc75747b",
"aarch64-apple-darwin-0.8.2":
"e261948e088a92959b4d8815b04b331609c8160d93b22308a80070a18bf984dd",
"aarch64-pc-windows-msvc-0.8.2":
"547b3ff302b124023e025d7cf662e8b818740432338c7e2b5c990edc3dbeeb6d",
"aarch64-unknown-linux-gnu-0.8.2":
"fb82155967c658b871706ff928ac8c2150db36c8c5304e70c101d849b50b42cd",
"aarch64-unknown-linux-musl-0.8.2":
"a4e7eec392741d1f43bdf8ce947497344e5d56af64dcd3dfce8586834ddfcb86",
"arm-unknown-linux-musleabihf-0.8.2":
"4334688da6c51d622fe9a4d34b90be7507a5a11b7e2ea616e39a48d9a315c495",
"armv7-unknown-linux-gnueabihf-0.8.2":
"1f066d2e55deb227096a53d92b58991355bf522f30a6403973ccd2daa38aa394",
"armv7-unknown-linux-musleabihf-0.8.2":
"6316f026cc3cde815c5bae24b0ef0483be6ad3ec7bd1508780205251bce309e4",
"i686-pc-windows-msvc-0.8.2":
"cb031edcace8297046c1fa0eba4eb37982c1b18f5f744ad1fbcb3271e6d845e8",
"i686-unknown-linux-gnu-0.8.2":
"c79c8576e5119b30018ffc553a8836de704e08c4203480aa8da760497d89b1dd",
"i686-unknown-linux-musl-0.8.2":
"02613f37e1289b599063f8215820a67cae0e9be4a4ea1beb6df1207fe14eea0f",
"powerpc64-unknown-linux-gnu-0.8.2":
"fe1ab21a4f0215a5bc0c2e16ee441594882cbb3c7541996cd03e7c95579c6816",
"powerpc64le-unknown-linux-gnu-0.8.2":
"431e6d1c966c2390112cb4822b1dcaf4a09f16597d12784de6cfb148953904e6",
"s390x-unknown-linux-gnu-0.8.2":
"949705a2abef4559a85c8927f8c5a02ebd402de3fbd20872a93bb5b162386c8a",
"x86_64-apple-darwin-0.8.2":
"07e9559eda46d02ba3c09fa0ea78cc15b9bbb10408f47b61d524d13b407eab0c",
"x86_64-pc-windows-msvc-0.8.2":
"4ee1f8373e7f7c1be42d51b642d576cfea068584c5c8ee7086f502f0d3a2f483",
"x86_64-unknown-linux-gnu-0.8.2":
"b0e54de8d1d384fa9f9e1edf939ac63dcc72ba9ea7c001352510bc5fcc450386",
"x86_64-unknown-linux-musl-0.8.2":
"aebe16a7975ff8f477a2790ae49fd01ae34061ffbae3078121620f91fac0506a",
"aarch64-apple-darwin-0.8.1":
"19408d81732451fa9eca5bb58f52ab3544a3c4c894f87dbd16265f1eaa542038",
"aarch64-pc-windows-msvc-0.8.1":
"18823e9728c09c09347bdcb8bf56eee117476e19248fce0bf9553f1510244a23",
"aarch64-unknown-linux-gnu-0.8.1":
"05ca640a800b2ebcb3a60dab20ccdc4485d41a79261243cf44dda551a7ec59f9",
"aarch64-unknown-linux-musl-0.8.1":
"a443c2383551c087972be060109971daeb5fedff62e7bd0b9f403f8a0d10ea5c",
"arm-unknown-linux-musleabihf-0.8.1":
"e6eda932f691813b7d2ac6c558c2e3be378d0ce2b87b218b22b5f70a73750067",
"armv7-unknown-linux-gnueabihf-0.8.1":
"e9ff9fb2b9f81ee2289cf187a88d653cbccefbc489ae78f085799c1aba621bd9",
"armv7-unknown-linux-musleabihf-0.8.1":
"04fcb9fb935f1eb328a0bbad611e08683476a73bf26cd2e4f88fd63b4c8728e4",
"i686-pc-windows-msvc-0.8.1":
"d9d062c0266e3eebf2aa32633600561465d54e2612cb4e5986a990f5968cdacf",
"i686-unknown-linux-gnu-0.8.1":
"a7cde3a634f1c304cb9208951a6fc72c08b5dc72815f2f0e5d4a5b719f6b2480",
"i686-unknown-linux-musl-0.8.1":
"c2a16b066541aa53dbab7493ff4c7ab11fa41a33bbb6a27b8d4c6554c1725c69",
"powerpc64-unknown-linux-gnu-0.8.1":
"759992752f5427fd230c8cc3c7b622b247eade44c85b2f2642220335eabb6cd2",
"powerpc64le-unknown-linux-gnu-0.8.1":
"a5e407808592da5cfbd96c42c45270914aef37a316e4fb3cd8b0f05b7e3453fc",
"s390x-unknown-linux-gnu-0.8.1":
"144c57540a1c8b812d0bb9aefc177d8ecb6ef16a173eb7305cee2318f4c370a6",
"x86_64-apple-darwin-0.8.1":
"29e5c09a23dd1750f903c29a3ef36ea12527b0035983940eccbb738c2bc914b1",
"x86_64-pc-windows-msvc-0.8.1":
"ba096b22fec82e5fffff9bf76a7a75d617586c4d03ef2d13eb047882c532427a",
"x86_64-unknown-linux-gnu-0.8.1":
"27942bb3688c2382603b89e7772fcd6df4456eaa1ae2eb93f3f3bb82967d8b00",
"x86_64-unknown-linux-musl-0.8.1":
"d03f855ddfacfbddea476c2838d284c316aa97ec141355c69553db2401afd682",
"aarch64-apple-darwin-0.8.0":
"eede1dc7e7bf14ceef1b2ef7274cf74b5aa4939f8299ef5b42dc72f25fd4513c",
"aarch64-pc-windows-msvc-0.8.0":
+4 -11
View File
@@ -29,13 +29,12 @@ export async function downloadVersion(
checkSum: string | undefined,
githubToken: string,
): Promise<{ version: string; cachedToolDir: string }> {
const resolvedVersion = await resolveVersion(version, githubToken);
const artifact = `ruff-${arch}-${platform}`;
let extension = ".tar.gz";
if (platform === "pc-windows-msvc") {
extension = ".zip";
}
const downloadUrl = `https://github.com/${OWNER}/${REPO}/releases/download/${resolvedVersion}/${artifact}${extension}`;
const downloadUrl = `https://github.com/${OWNER}/${REPO}/releases/download/${version}/${artifact}${extension}`;
core.info(`Downloading ruff from "${downloadUrl}" ...`);
const downloadPath = await tc.downloadTool(
@@ -43,13 +42,7 @@ export async function downloadVersion(
undefined,
githubToken,
);
await validateChecksum(
checkSum,
downloadPath,
arch,
platform,
resolvedVersion,
);
await validateChecksum(checkSum, downloadPath, arch, platform, version);
let ruffDir: string;
if (platform === "pc-windows-msvc") {
@@ -64,10 +57,10 @@ export async function downloadVersion(
const cachedToolDir = await tc.cacheDir(
ruffDir,
TOOL_CACHE_NAME,
resolvedVersion,
version,
arch,
);
return { version: resolvedVersion, cachedToolDir };
return { version: version, cachedToolDir };
}
export async function resolveVersion(
+54 -10
View File
@@ -13,7 +13,16 @@ import {
getPlatform,
type Platform,
} from "./utils/platforms";
import { args, checkSum, githubToken, src, version } from "./utils/inputs";
import {
args,
checkSum,
githubToken,
src,
version,
versionFile as versionFileInput,
} from "./utils/inputs";
import { getRuffVersionFromPyproject } from "./utils/pyproject";
import * as fs from "node:fs";
async function run(): Promise<void> {
const platform = getPlatform();
@@ -26,15 +35,11 @@ async function run(): Promise<void> {
if (arch === undefined) {
throw new Error(`Unsupported architecture: ${process.arch}`);
}
const setupResult = await setupRuff(
platform,
arch,
version,
checkSum,
githubToken,
);
const setupResult = await setupRuff(platform, arch, checkSum, githubToken);
addRuffToPath(setupResult.ruffDir);
setOutputFormat();
addMatchers();
core.setOutput("ruff-version", setupResult.version);
core.info(`Successfully installed ruff version ${setupResult.version}`);
@@ -53,11 +58,10 @@ async function run(): Promise<void> {
async function setupRuff(
platform: Platform,
arch: Architecture,
versionInput: string,
checkSum: string | undefined,
githubToken: string,
): Promise<{ ruffDir: string; version: string }> {
const resolvedVersion = await resolveVersion(versionInput, githubToken);
const resolvedVersion = await determineVersion();
const toolCacheResult = tryGetFromToolCache(arch, resolvedVersion);
if (toolCacheResult.installedPath) {
core.info(`Found ruffDir in tool-cache for ${toolCacheResult.version}`);
@@ -81,11 +85,51 @@ async function setupRuff(
};
}
async function determineVersion(): Promise<string> {
if (versionFileInput !== "" && version !== "") {
throw Error("It is not allowed to specify both version and version-file");
}
if (version !== "") {
return await resolveVersion(version, githubToken);
}
if (versionFileInput !== "") {
const versionFromPyproject = getRuffVersionFromPyproject(versionFileInput);
if (versionFromPyproject === undefined) {
core.warning(
"Could not parse version from supplied pyproject.toml. Using latest version.",
);
return await resolveVersion("latest", githubToken);
}
}
const pyProjectPath = path.join(src, "pyproject.toml");
if (!fs.existsSync(pyProjectPath)) {
return await resolveVersion("latest", githubToken);
}
const versionFromPyproject = getRuffVersionFromPyproject(pyProjectPath);
return await resolveVersion(versionFromPyproject || "latest", githubToken);
}
function addRuffToPath(cachedPath: string): void {
core.addPath(cachedPath);
core.info(`Added ${cachedPath} to the path`);
}
function setOutputFormat() {
core.exportVariable("RUFF_OUTPUT_FORMAT", "github");
core.info("Set RUFF_OUTPUT_FORMAT to github");
}
function addMatchers(): void {
const matchersPath = path.join(
__dirname,
`..${path.sep}..`,
".github",
"matchers",
);
core.info(`##[add-matcher]${path.join(matchersPath, "check.json")}`);
core.info(`##[add-matcher]${path.join(matchersPath, "format.json")}`);
}
async function runRuff(
ruffExecutablePath: string,
args: string[],
+1
View File
@@ -5,3 +5,4 @@ export const checkSum = core.getInput("checksum");
export const githubToken = core.getInput("github-token");
export const args = core.getInput("args");
export const src = core.getInput("src");
export const versionFile = core.getInput("version-file");
+46
View File
@@ -0,0 +1,46 @@
import * as fs from "node:fs";
import * as core from "@actions/core";
import * as toml from "smol-toml";
export function getRuffVersionFromPyproject(
filePath: string,
): string | undefined {
if (!fs.existsSync(filePath)) {
core.warning(`Could not find file: ${filePath}`);
return undefined;
}
const pyprojectContent = fs.readFileSync(filePath, "utf-8");
let pyproject:
| {
project?: { dependencies?: string[] };
"dependency-groups"?: { dev?: string[] };
}
| undefined;
try {
pyproject = toml.parse(pyprojectContent);
} catch (err) {
const message = (err as Error).message;
core.warning(`Error while parsing ${filePath}: ${message}`);
return undefined;
}
const dependencies: string[] = pyproject?.project?.dependencies || [];
const devDependencies: string[] = pyproject?.["dependency-groups"]?.dev || [];
const ruffVersionDefinition =
dependencies.find((dep: string) => dep.startsWith("ruff")) ||
devDependencies.find((dep: string) => dep.startsWith("ruff"));
if (ruffVersionDefinition) {
const ruffVersion = ruffVersionDefinition
.match(/^ruff([^A-Z0-9._-]+.*)$/)?.[1]
.trim();
if (ruffVersion?.startsWith("==")) {
return ruffVersion.slice(2);
}
core.info(`Found ruff version in pyproject.toml: ${ruffVersion}`);
return ruffVersion;
}
return undefined;
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"compilerOptions": {
"target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
"target": "ES2022" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
"outDir": "./lib" /* Redirect output structure to the directory. */,
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,