5
0
mirror of https://github.com/astral-sh/setup-uv.git synced 2025-12-15 11:07:14 +00:00

Compare commits

...

38 Commits
v1.0 ... v3.0

Author SHA1 Message Date
Kevin Stillhammer
9f1f1fece2 Run prettier (#78) 2024-09-16 19:33:16 +00:00
dependabot[bot]
6343f7c79b Bump eslint-plugin-github from 5.0.1 to 5.0.2 (#69)
Bumps
[eslint-plugin-github](https://github.com/github/eslint-plugin-github)
from 5.0.1 to 5.0.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/github/eslint-plugin-github/releases">eslint-plugin-github's
releases</a>.</em></p>
<blockquote>
<h2>v5.0.2</h2>
<h2>What's Changed</h2>
<ul>
<li>chore(deps): bump the all-dependencies group across 1 directory with
3 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/533">github/eslint-plugin-github#533</a></li>
<li>chore(deps): bump braces from 3.0.2 to 3.0.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/534">github/eslint-plugin-github#534</a></li>
<li>chore(deps): bump the all-dependencies group with 3 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/535">github/eslint-plugin-github#535</a></li>
<li>chore(deps): bump the all-dependencies group with 3 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/536">github/eslint-plugin-github#536</a></li>
<li>chore(deps): bump the all-dependencies group with 4 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/537">github/eslint-plugin-github#537</a></li>
<li>chore(deps): bump the all-dependencies group with 3 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/538">github/eslint-plugin-github#538</a></li>
<li>chore(deps): bump the all-dependencies group with 3 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/540">github/eslint-plugin-github#540</a></li>
<li>chore(deps): bump the all-dependencies group with 4 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/541">github/eslint-plugin-github#541</a></li>
<li>chore(deps): bump the all-dependencies group across 1 directory with
3 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/543">github/eslint-plugin-github#543</a></li>
<li>chore(deps): bump the all-dependencies group with 3 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/544">github/eslint-plugin-github#544</a></li>
<li>chore(deps): bump the all-dependencies group with 3 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/545">github/eslint-plugin-github#545</a></li>
<li>chore(deps): bump the all-dependencies group across 1 directory with
4 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/github/eslint-plugin-github/pull/551">github/eslint-plugin-github#551</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/github/eslint-plugin-github/compare/v5.0.1...v5.0.2">https://github.com/github/eslint-plugin-github/compare/v5.0.1...v5.0.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d6f656d78f"><code>d6f656d</code></a>
Merge pull request <a
href="https://redirect.github.com/github/eslint-plugin-github/issues/551">#551</a>
from github/dependabot/npm_and_yarn/all-dependencies-...</li>
<li><a
href="df2c60a624"><code>df2c60a</code></a>
chore(deps): bump the all-dependencies group across 1 directory with 4
updates</li>
<li><a
href="0f0979cb38"><code>0f0979c</code></a>
chore(deps): bump the all-dependencies group with 3 updates (<a
href="https://redirect.github.com/github/eslint-plugin-github/issues/545">#545</a>)</li>
<li><a
href="0e294e5c4d"><code>0e294e5</code></a>
Merge pull request <a
href="https://redirect.github.com/github/eslint-plugin-github/issues/544">#544</a>
from github/dependabot/npm_and_yarn/all-dependencies-...</li>
<li><a
href="17c6e39aa4"><code>17c6e39</code></a>
chore(deps): bump the all-dependencies group with 3 updates</li>
<li><a
href="86d5cb1324"><code>86d5cb1</code></a>
Merge pull request <a
href="https://redirect.github.com/github/eslint-plugin-github/issues/543">#543</a>
from github/dependabot/npm_and_yarn/all-dependencies-...</li>
<li><a
href="522309f8d0"><code>522309f</code></a>
chore(deps): bump the all-dependencies group across 1 directory with 3
updates</li>
<li><a
href="c3857ba01e"><code>c3857ba</code></a>
Merge pull request <a
href="https://redirect.github.com/github/eslint-plugin-github/issues/541">#541</a>
from github/dependabot/npm_and_yarn/all-dependencies-...</li>
<li><a
href="8010f55226"><code>8010f55</code></a>
chore(deps): bump the all-dependencies group with 4 updates</li>
<li><a
href="777227525b"><code>7772275</code></a>
Merge pull request <a
href="https://redirect.github.com/github/eslint-plugin-github/issues/540">#540</a>
from github/dependabot/npm_and_yarn/all-dependencies-...</li>
<li>Additional commits viewable in <a
href="https://github.com/github/eslint-plugin-github/compare/v5.0.1...v5.0.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=eslint-plugin-github&package-manager=npm_and_yarn&previous-version=5.0.1&new-version=5.0.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-09-16 21:12:54 +02:00
dependabot[bot]
bfea2a2a76 Bump typescript from 5.5.4 to 5.6.2 (#64)
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.5.4
to 5.6.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/microsoft/TypeScript/releases">typescript's
releases</a>.</em></p>
<blockquote>
<h2>TypeScript 5.6</h2>
<p>For release notes, check out the <a
href="https://devblogs.microsoft.com/typescript/announcing-typescript-5-6/">release
announcement</a>.</p>
<p>For the complete list of fixed issues, check out the</p>
<ul>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.6.0%22+is%3Aclosed+">fixed
issues query for Typescript 5.6.0 (Beta)</a>.</li>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.6.1%22+is%3Aclosed+">fixed
issues query for Typescript 5.6.1 (RC)</a>.</li>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.6.2%22+is%3Aclosed+">fixed
issues query for Typescript 5.6.2 (Stable)</a>.</li>
</ul>
<p>Downloads are available on:</p>
<ul>
<li><a href="https://www.npmjs.com/package/typescript">npm</a></li>
<li><a
href="https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild">NuGet
package</a></li>
</ul>
<h2>TypeScript 5.6 RC</h2>
<p>For release notes, check out the <a
href="https://devblogs.microsoft.com/typescript/announcing-typescript-5-6-rc/">release
announcement</a>.</p>
<p>For the complete list of fixed issues, check out the</p>
<ul>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;milestone%3A%22TypeScript+5.6.1%22+is%3Aclosed+">fixed
issues query for TypeScript v5.6.1 (RC)</a>.</li>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;milestone%3A%22TypeScript+5.6.0%22+is%3Aclosed+">fixed
issues query for TypeScript v5.6.0 (Beta)</a>.</li>
</ul>
<p>Downloads are available on:</p>
<ul>
<li><a href="https://www.npmjs.com/package/typescript">npm</a></li>
</ul>
<h2>TypeScript 5.6 Beta</h2>
<p>For release notes, check out the <a
href="https://devblogs.microsoft.com/typescript/announcing-typescript-5-6-beta/">release
announcement</a>.</p>
<p>For the complete list of fixed issues, check out the</p>
<ul>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.6.0%22+is%3Aclosed+">fixed
issues query for Typescript 5.6.0 (Beta)</a>.</li>
</ul>
<p>Downloads are available on:</p>
<ul>
<li><a href="https://www.npmjs.com/package/typescript">npm</a></li>
<li><a
href="https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild">NuGet
package</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a7e3374f13"><code>a7e3374</code></a>
Bump version to 5.6.2 and LKG</li>
<li><a
href="20633579fc"><code>2063357</code></a>
🤖 Pick PR <a
href="https://redirect.github.com/microsoft/TypeScript/issues/59708">#59708</a>
(LEGO: Pull request from lego/hb_537...) into release-5.6 (#...</li>
<li><a
href="4fe7e41ea1"><code>4fe7e41</code></a>
🤖 Pick PR <a
href="https://redirect.github.com/microsoft/TypeScript/issues/59670">#59670</a>
(fix(59649): ts Move to a new file d...) into release-5.6 (#...</li>
<li><a
href="1a03e5340a"><code>1a03e53</code></a>
🤖 Pick PR <a
href="https://redirect.github.com/microsoft/TypeScript/issues/59761">#59761</a>
(<code>this</code> can be nullish) into release-5.6 (<a
href="https://redirect.github.com/microsoft/TypeScript/issues/59762">#59762</a>)</li>
<li><a
href="6212132b83"><code>6212132</code></a>
Update LKG</li>
<li><a
href="bbb5faf7e7"><code>bbb5faf</code></a>
🤖 Pick PR <a
href="https://redirect.github.com/microsoft/TypeScript/issues/59542">#59542</a>
(Fixing delay caused in vscode due t...) into release-5.6 (#...</li>
<li><a
href="e6914a5587"><code>e6914a5</code></a>
Bump version to 5.6.1-rc and LKG</li>
<li><a
href="34121c42b6"><code>34121c4</code></a>
Update LKG</li>
<li><a
href="2a30c2a8f0"><code>2a30c2a</code></a>
Merge remote-tracking branch 'origin/main' into release-5.6</li>
<li><a
href="936a79bbb5"><code>936a79b</code></a>
Expose TypeChecker. getAwaitedType to public (<a
href="https://redirect.github.com/microsoft/TypeScript/issues/59268">#59268</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/microsoft/TypeScript/compare/v5.5.4...v5.6.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=typescript&package-manager=npm_and_yarn&previous-version=5.5.4&new-version=5.6.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-09-16 21:12:39 +02:00
Kevin Stillhammer
8d65000ec9 Set the cache-dependency-glob default to **/uv.lock (#77)
We should aim for a solution with sane defaults that work as most users
would expect it.

The current default leads to a cache that is never invalidated and thus
never updated.

This also mirrors the default behaviors for setup-python which use
`**/requirements.txt`, `**/Pipfile.lock` or `**/poetry.lock`

Also make it clear that the uv cache on the filesystem can be uploaded to the GitHub Actions cache, but they are distinct things.

Also make it clear that the local cache path can be changed without using `enable-cache: true`
2024-09-16 21:08:44 +02:00
Kevin Stillhammer
4456fa154a Add .idea files to gitignore (#76) 2024-09-16 13:05:47 +00:00
dependabot[bot]
8af341e206 Bump @types/node from 22.5.4 to 22.5.5 (#74)
Bumps
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
from 22.5.4 to 22.5.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.5.4&new-version=22.5.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>
2024-09-16 14:57:20 +02:00
dependabot[bot]
6beca84284 Bump peter-evans/create-pull-request from 7.0.2 to 7.0.3 (#75)
Bumps
[peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request)
from 7.0.2 to 7.0.3.
<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.3</h2>
<p>⚙️ Fixes an issue with commit signing where commit SHAs have variable
lengths when abbreviated.</p>
<h2>What's Changed</h2>
<ul>
<li>fix: disable abbreviated commit shas in diff 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/3337">peter-evans/create-pull-request#3337</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v7.0.2...v7.0.3">https://github.com/peter-evans/create-pull-request/compare/v7.0.2...v7.0.3</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6cd32fd936"><code>6cd32fd</code></a>
fix: disable abbreviated commit shas in diff (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3337">#3337</a>)</li>
<li>See full diff in <a
href="d121e62763...6cd32fd936">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.2&new-version=7.0.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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

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

---

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

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


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-16 14:53:59 +02:00
github-actions[bot]
6dfebec6dd chore: update known checksums for 0.4.10 (#72)
chore: update known checksums for 0.4.10

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-09-13 19:15:03 +00:00
dependabot[bot]
756f81db94 Bump peter-evans/create-pull-request from 7.0.1 to 7.0.2 (#71)
Bumps
[peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request)
from 7.0.1 to 7.0.2.
<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.2</h2>
<p>⚙️ Fixes an issue with commit signing when a change was detected as
being a rename or copy.</p>
<h2>What's Changed</h2>
<ul>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.48 to
18.19.50 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3320">peter-evans/create-pull-request#3320</a></li>
<li>build(deps-dev): bump typescript from 5.5.4 to 5.6.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/3319">peter-evans/create-pull-request#3319</a></li>
<li>fix: disable diff detection for renames and copies 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/3330">peter-evans/create-pull-request#3330</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v7.0.1...v7.0.2">https://github.com/peter-evans/create-pull-request/compare/v7.0.1...v7.0.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d121e62763"><code>d121e62</code></a>
fix: disable diff detection for renames and copies (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3330">#3330</a>)</li>
<li><a
href="f4d66f4d5a"><code>f4d66f4</code></a>
build(deps-dev): bump typescript from 5.5.4 to 5.6.2 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3319">#3319</a>)</li>
<li><a
href="488c869d17"><code>488c869</code></a>
build(deps-dev): bump <code>@​types/node</code> from 18.19.48 to
18.19.50 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3320">#3320</a>)</li>
<li><a
href="5354f85616"><code>5354f85</code></a>
docs: update readme</li>
<li>See full diff in <a
href="8867c4aba1...d121e62763">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.1&new-version=7.0.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-09-13 16:17:03 +02:00
hori-ryota
8e854494e0 fix example for multiple cache-dependency-glob without quote (#67) 2024-09-12 14:58:45 +02:00
github-actions[bot]
d70817ce85 chore: update known checksums for 0.4.9 (#65)
chore: update known checksums for 0.4.9

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-09-11 10:08:52 +00:00
Lukas Burgholzer
49df72dfcf 🚸 use GitHub token by default (#61)
This PR adjusts the action so that it is no longer necessary to
explicitly specify the GitHub token to circumvent the API rate limit.
To this end, it simply passes the repository's GitHub token (available
via `${{ github.token }}`) as a default for the `github_token` action
input.

This is similar to how this is handled in, e.g.,
https://github.com/peter-evans/create-pull-request; specifically
[here](5354f85616/action.yml (L4-L6)).
2024-09-11 08:18:23 +00:00
github-actions[bot]
89ebbb66d2 chore: update known checksums for 0.4.8 (#62)
chore: update known checksums for 0.4.8

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-09-10 09:54:20 +00:00
Kevin Stillhammer
b463f5b8ca rename utils/utils.ts to constants.ts (#59) 2024-09-07 12:13:50 +00:00
Kevin Stillhammer
417c97acee Use D:\a\_tmp\setup-uv-cache as default cacheLocalPath on Windows (#57)
Fixes: #52
2024-09-07 14:11:25 +02:00
github-actions[bot]
4beb0eca42 chore: update known checksums for 0.4.7 (#58)
chore: update known checksums for 0.4.7

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-09-07 09:47:36 +00:00
dependabot[bot]
428055c3da Bump peter-evans/create-pull-request from 7.0.0 to 7.0.1 (#56)
Bumps
[peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request)
from 7.0.0 to 7.0.1.
<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.1</h2>
<p>⚙️ Fixes <a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3311">an
issue</a> affecting one particular use case where the action fails on
<code>diff --stat</code> with <code>fatal: ambiguous
argument</code>.</p>
<h2>What's Changed</h2>
<ul>
<li>build(deps): bump peter-evans/create-pull-request from 6 to 7 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3283">peter-evans/create-pull-request#3283</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.46 to
18.19.48 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3288">peter-evans/create-pull-request#3288</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/parser</code> from
7.17.0 to 7.18.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/3289">peter-evans/create-pull-request#3289</a></li>
<li>build(deps-dev): bump eslint-plugin-import from 2.29.1 to 2.30.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/3290">peter-evans/create-pull-request#3290</a></li>
<li>build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code>
from 7.17.0 to 7.18.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/3291">peter-evans/create-pull-request#3291</a></li>
<li>fix: handle ambiguous argument failure on diff stat 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/3312">peter-evans/create-pull-request#3312</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v7.0.0...v7.0.1">https://github.com/peter-evans/create-pull-request/compare/v7.0.0...v7.0.1</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8867c4aba1"><code>8867c4a</code></a>
fix: handle ambiguous argument failure on diff stat (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3312">#3312</a>)</li>
<li><a
href="6073f5434b"><code>6073f54</code></a>
build(deps-dev): bump <code>@​typescript-eslint/eslint-plugin</code> (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3291">#3291</a>)</li>
<li><a
href="6d01b5601c"><code>6d01b56</code></a>
build(deps-dev): bump eslint-plugin-import from 2.29.1 to 2.30.0 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3290">#3290</a>)</li>
<li><a
href="25cf8451c3"><code>25cf845</code></a>
build(deps-dev): bump <code>@​typescript-eslint/parser</code> from
7.17.0 to 7.18.0 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3289">#3289</a>)</li>
<li><a
href="d87b980a0e"><code>d87b980</code></a>
build(deps-dev): bump <code>@​types/node</code> from 18.19.46 to
18.19.48 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3288">#3288</a>)</li>
<li><a
href="119d131ea9"><code>119d131</code></a>
build(deps): bump peter-evans/create-pull-request from 6 to 7 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3283">#3283</a>)</li>
<li><a
href="73e6230af4"><code>73e6230</code></a>
docs: update readme</li>
<li><a
href="c0348e860f"><code>c0348e8</code></a>
ci: add v7 to workflow</li>
<li>See full diff in <a
href="4320041ed3...8867c4aba1">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.0&new-version=7.0.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-09-06 14:47:10 +02:00
Hynek Schlawack
20d812c7a3 Update README to v2 (#50) 2024-09-06 14:46:33 +02:00
Kevin Stillhammer
d9a2b6b6fa Support a list of cache-dependency-glob (#41)
Closes: #40

Because of build conflics (forgot to run `npm i` after pulling) I
deleted the `dist`folder to start fresh. Turns out that it still
contained the source maps from the very first commit. I removed the
argument to generate those a long time ago
2024-09-06 14:44:31 +02:00
github-actions[bot]
606b0d67da chore: update known checksums for 0.4.6 (#55)
chore: update known checksums for 0.4.6

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-09-06 13:31:10 +02:00
Kevin Stillhammer
67736b0f01 Always run check-dist check (#53)
Currently we mark it as a required check and thus prevent automatic PR
merges when only markdown files are contained in the PR
2024-09-06 13:07:34 +02:00
github-actions[bot]
fc672aa0a3 chore: update known checksums for 0.4.5 (#48)
chore: update known checksums for 0.4.5

Co-authored-by: eifinger <1481961+eifinger@users.noreply.github.com>
2024-09-06 09:30:10 +02:00
Kevin Stillhammer
79643936e1 Run test build only on ubuntu-latest (#51)
It is unnecessary to test this on several OS. This is done by the actual
action tests in other jobs.
2024-09-06 09:19:26 +02:00
Kevin Stillhammer
663d8f7082 Fix typo "relaying" in README.md (#47) 2024-09-05 09:54:40 -04:00
dependabot[bot]
d8c8151c2b Bump @actions/glob from 0.4.0 to 0.5.0 (#10) 2024-09-05 09:40:37 -04:00
Charlie Marsh
040c0c3cf0 Make some minor edits to the README (#46) 2024-09-05 13:38:39 +00:00
dependabot[bot]
902c4a5691 Bump typescript from 5.4.5 to 5.5.4 (#30) 2024-09-05 09:30:29 -04:00
Kevin Stillhammer
b3cf8231d5 Do not change default version on known checksum update (#39) 2024-09-05 13:26:17 +00:00
Charlie Marsh
bfebbf80cb Change default to "latest" (#37)
## Summary

Also did some light editing of the README.
2024-09-05 09:24:32 -04:00
dependabot[bot]
a6cb892a36 Bump peter-evans/create-pull-request from 7.0.0 to 7.0.1 (#42) 2024-09-05 09:24:18 -04:00
dependabot[bot]
bd99ba67dc Bump eslint-plugin-jest from 28.8.2 to 28.8.3 (#43) 2024-09-05 09:24:12 -04:00
dependabot[bot]
1f78a33fdb Bump @types/node from 22.5.3 to 22.5.4 (#44) 2024-09-05 09:24:04 -04:00
Charlie Marsh
182c9c7e92 Change Prettier settings (#36)
## Summary

I know this is a little tedious but I'd prefer to use the same settings
as in Ruff.
2024-09-05 08:06:45 -04:00
dependabot[bot]
1785c7bde0 Bump eslint-plugin-import from 2.29.1 to 2.30.0 (#31) 2024-09-04 17:29:25 -04:00
dependabot[bot]
43f9a7cdf9 Bump @types/node from 20.14.9 to 22.5.3 (#32) 2024-09-04 17:29:17 -04:00
Charlie Marsh
0fa3b93f6e Run Prettier over Markdown and YAML files (#35)
## Summary

Partly personal preference, but mostly to align with other Astral
projects.
2024-09-04 21:14:10 +00:00
Charlie Marsh
6f825bd8e7 Add acknowledgements and Astral logo (#34) 2024-09-04 17:13:00 -04:00
Kevin Stillhammer
e4d1d0eef8 Rename repo org in examples and urls (#33) 2024-09-04 20:09:26 +02:00
56 changed files with 6858 additions and 42611 deletions

20
.editorconfig Normal file
View File

@@ -0,0 +1,20 @@
# Check http://editorconfig.org for more information
# This is the main config file for this project:
root = true
[*]
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
indent_style = space
insert_final_newline = true
indent_size = 2
[*.{rs,py,pyi}]
indent_size = 4
[*.snap]
trim_trailing_whitespace = false
[*.md]
max_line_length = 100

View File

@@ -1,57 +1,61 @@
{
"plugins": ["jest", "@typescript-eslint"],
"extends": ["plugin:github/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],
"i18n-text/no-en": "off",
"eslint-comments/no-use": "off",
"import/no-namespace": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}],
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"camelcase": "off",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"semi": "off",
"@typescript-eslint/semi": ["error", "never"],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "error"
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
}
}
"plugins": ["jest", "@typescript-eslint"],
"extends": ["plugin:github/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module",
"project": "./tsconfig.json"
},
"rules": {
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],
"i18n-text/no-en": "off",
"eslint-comments/no-use": "off",
"import/no-namespace": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{ "accessibility": "no-public" }
],
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"camelcase": "off",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/explicit-function-return-type": [
"error",
{ "allowExpressions": true }
],
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "error"
},
"env": {
"node": true,
"es6": true,
"jest/globals": true
}
}

2
.gitattributes vendored
View File

@@ -1,2 +1,2 @@
* text=auto eol=lf
dist/** -diff linguist-generated=true
dist/** -diff linguist-generated=true

30
.github/python.json vendored
View File

@@ -1,18 +1,18 @@
{
"problemMatcher": [
"problemMatcher": [
{
"owner": "python",
"pattern": [
{
"owner": "python",
"pattern": [
{
"regexp": "^\\s*File\\s\\\"(.*)\\\",\\sline\\s(\\d+),\\sin\\s(.*)$",
"file": 1,
"line": 2
},
{
"regexp": "^\\s*raise\\s(.*)\\(\\'(.*)\\'\\)$",
"message": 2
}
]
"regexp": "^\\s*File\\s\\\"(.*)\\\",\\sline\\s(\\d+),\\sin\\s(.*)$",
"file": 1,
"line": 2
},
{
"regexp": "^\\s*raise\\s(.*)\\(\\'(.*)\\'\\)$",
"message": 2
}
]
}
]
}
]
}

View File

@@ -1,5 +1,5 @@
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
name-template: "v$RESOLVED_VERSION 🌈"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: "🚨 Breaking changes"
labels:
@@ -19,32 +19,32 @@ categories:
labels:
- "maintenance"
- "ci"
- "default-version-update"
- "update-known-checksums"
- title: "📚 Documentation"
labels:
- "documentation"
- title: "⬆️ Dependency updates"
labels:
- "dependencies"
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
- 'breaking-change'
- "major"
- "breaking-change"
minor:
labels:
- 'minor'
- 'new-feature'
- 'enhancement'
- "minor"
- "new-feature"
- "enhancement"
patch:
labels:
- 'patch'
- 'bugfix'
- "patch"
- "bugfix"
- "default-version-update"
default: patch
template: |
## Changes
$CHANGES
$CHANGES

View File

@@ -9,11 +9,7 @@ on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:
jobs:

View File

@@ -13,12 +13,12 @@ name: "CodeQL"
on:
push:
branches: [ main ]
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [main]
schedule:
- cron: '31 7 * * 3'
- cron: "31 7 * * 3"
jobs:
analyze:
@@ -32,40 +32,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'TypeScript' ]
language: ["TypeScript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
source-root: src
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
source-root: src
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

View File

@@ -16,4 +16,4 @@ jobs:
- name: 🚀 Run Release Drafter
uses: release-drafter/release-drafter@v6.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,4 +1,4 @@
name: 'test-cache-windows'
name: "test-cache-windows"
on:
pull_request:
push:
@@ -36,8 +36,8 @@ jobs:
id: restore
uses: ./
with:
enable-cache: true
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}
enable-cache: true
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}
- name: Cache was hit
run: |
if ($env:CACHE_HIT -ne "true") {

View File

@@ -1,4 +1,4 @@
name: 'test-cache'
name: "test-cache"
on:
pull_request:
push:
@@ -36,8 +36,8 @@ jobs:
id: restore
uses: ./
with:
enable-cache: true
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}
enable-cache: true
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}
- name: Cache was hit
run: |
if [ "$CACHE_HIT" != "true" ]; then
@@ -48,6 +48,46 @@ jobs:
- run: uv sync
working-directory: __tests__/fixtures/uv-project
test-setup-cache-dependency-glob:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup with cache
uses: ./
with:
enable-cache: true
cache-dependency-glob: |
__tests__/fixtures/uv-project/uv.lock
**/pyproject.toml
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}
- run: uv sync
working-directory: __tests__/fixtures/uv-project
test-restore-cache-dependency-glob:
runs-on: ubuntu-latest
needs: test-setup-cache-dependency-glob
steps:
- uses: actions/checkout@v4
- name: Change pyproject.toml
run: |
echo '[tool.uv]' >> __tests__/fixtures/uv-project/pyproject.toml
echo 'dev-dependencies = []' >> __tests__/fixtures/uv-project/pyproject.toml
- name: Restore with cache
id: restore
uses: ./
with:
enable-cache: true
cache-dependency-glob: |
__tests__/fixtures/uv-project/uv.lock
**/pyproject.toml
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}
- name: Cache was not hit
run: |
if [ "$CACHE_HIT" == "true" ]; then
exit 1
fi
env:
CACHE_HIT: ${{ steps.restore.outputs.cache-hit }}
test-setup-cache-local:
runs-on: oracle-aarch64
steps:
@@ -69,9 +109,9 @@ jobs:
id: restore
uses: ./
with:
enable-cache: true
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}
cache-local-path: /tmp/uv-cache
enable-cache: true
cache-suffix: ${{ github.run_id }}-${{ github.run_attempt }}
cache-local-path: /tmp/uv-cache
- name: Cache was hit
run: |
if [ "$CACHE_HIT" != "true" ]; then

View File

@@ -1,4 +1,4 @@
name: 'test-windows'
name: "test-windows"
on:
pull_request:
push:
@@ -23,7 +23,5 @@ jobs:
}
- name: Setup uv
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: uv sync
working-directory: __tests__\fixtures\uv-project

View File

@@ -1,4 +1,4 @@
name: 'test'
name: "test"
on:
pull_request:
push:
@@ -11,19 +11,19 @@ concurrency:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-14, oracle-aarch64]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: "20"
- run: |
npm install
- run: |
npm run all
- name: Make sure no changes from linters are detected
run: |
git diff --exit-code
test-default-version:
runs-on: ${{ matrix.os }}
strategy:
@@ -33,8 +33,6 @@ jobs:
- uses: actions/checkout@v4
- name: Install default version
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: uv sync
working-directory: __tests__/fixtures/uv-project
test-specific-version:
@@ -42,14 +40,13 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-14, oracle-aarch64]
uv-version: ['latest','0.3.0','0.3.2']
uv-version: ["latest", "0.3.0", "0.3.2"]
steps:
- uses: actions/checkout@v4
- name: Install version ${{ matrix.uv-version }}
uses: ./
with:
version: ${{ matrix.uv-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: uv sync
working-directory: __tests__/fixtures/uv-project
test-checksum:
@@ -57,30 +54,31 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, oracle-aarch64]
checksum: ['4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd']
checksum:
["4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd"]
exclude:
- os: oracle-aarch64
checksum: '4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd'
checksum: "4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd"
include:
- os: oracle-aarch64
checksum: 'e11b01402ab645392c7ad6044db63d37e4fd1e745e015306993b07695ea5f9f8'
checksum: "e11b01402ab645392c7ad6044db63d37e4fd1e745e015306993b07695ea5f9f8"
steps:
- uses: actions/checkout@v4
- name: Checksum matches expected
uses: ./
with:
version: '0.3.2'
version: "0.3.2"
checksum: ${{ matrix.checksum }}
github-token: ${{ secrets.GITHUB_TOKEN }}
test-without-github-token:
test-with-explicit-token:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install default version
uses: ./
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: uv sync
working-directory: __tests__/fixtures/uv-project
test-uvx:
runs-on: ubuntu-latest
steps:

View File

@@ -1,26 +0,0 @@
name: 'Update default version and checksums'
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Update default version and checksums
id: update-default-version
run: node dist/update-default-version/index.js src/download/checksum/known-checksums.ts action.yml ${{ secrets.GITHUB_TOKEN }}
- run: npm install && npm run all
- name: Create Pull Request
uses: peter-evans/create-pull-request@4320041ed380b20e97d388d56a7fb4f9b8c20e79 # v7.0.0
with:
commit-message: "chore: update checksums"
title: "chore: update default version to ${{ steps.update-default-version.outputs.latest-version }}"
body: "chore: update default version to ${{ steps.update-default-version.outputs.latest-version }}"
base: main
labels: "automated-pr,default-version-update"
branch: update-default-version-pr
delete-branch: true

View File

@@ -0,0 +1,32 @@
name: "Update known checksums"
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Update known checksums
id: update-known-checksums
run:
node dist/update-known-checksums/index.js
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@6cd32fd93684475c31847837f87bb135d40a2b79 # v7.0.3
with:
commit-message: "chore: update known checksums"
title:
"chore: update known checksums for ${{
steps.update-known-checksums.outputs.latest-version }}"
body:
"chore: update known checksums for ${{
steps.update-known-checksums.outputs.latest-version }}"
base: main
labels: "automated-pr,update-known-checksums"
branch: update-known-checksums-pr
delete-branch: true

View File

@@ -5,9 +5,9 @@ name: Update Major Minor Tags
on:
push:
branches-ignore:
- '**'
- "**"
tags:
- 'v*.*.*'
- "v*.*.*"
jobs:
update_major_minor_tags:
@@ -16,4 +16,4 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Run Update semver
uses: haya14busa/action-update-semver@v1.2.1
uses: haya14busa/action-update-semver@v1.2.1

5
.gitignore vendored
View File

@@ -96,4 +96,7 @@ Thumbs.db
# Ignore built ts files
__tests__/runner/*
lib/**/*
lib/**/*
# Idea IDEs (PyCharm, WebStorm, IntelliJ, etc)
.idea/

View File

@@ -1,10 +1,4 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"arrowParens": "avoid"
"trailingComma": "all",
"proseWrap": "always"
}

227
README.md
View File

@@ -2,92 +2,91 @@
Set up your GitHub Actions workflow with a specific version of [uv](https://docs.astral.sh/uv/).
* Install a version of uv and add it to the path
* Cache the installed version of uv to speed up consecutive runs on self-hosted runners
* Register problem matchers for error output
* Optional: Cache the uv cache
* Optional: Verify the checksum of the downloaded uv executable
- Install a version of uv and add it to PATH
- Cache the installed version of uv to speed up consecutive runs on self-hosted runners
- Register problem matchers for error output
- (Optional) Persist the uv's cache in the GitHub Actions Cache
- (Optional) Verify the checksum of the downloaded uv executable
## Contents
* [Usage](#usage)
* [Install specific version](#install-specific-version)
* [Install latest version](#install-latest-version)
* [Validate checksum](#validate-checksum)
* [Enable Caching](#enable-caching)
* [Local cache path](#local-cache-path)
* [Cache dependency glob](#cache-dependency-glob)
* [API rate limit](#api-rate-limit)
* [How it works](#how-it-works)
* [FAQ](#faq)
- [Usage](#usage)
- [Install the latest version (default)](#install-the-latest-version-default)
- [Install a specific version](#install-a-specific-version)
- [Validate checksum](#validate-checksum)
- [Enable Caching](#enable-caching)
- [Cache dependency glob](#cache-dependency-glob)
- [Local cache path](#local-cache-path)
- [GitHub authentication token](#github-authentication-token)
- [How it works](#how-it-works)
- [FAQ](#faq)
## Usage
Example workflow in a real world project can be found [here](https://github.com/eifinger/hass-weenect/blob/main/.github/workflows/ci.yml)
### Install specific version
You can also specify a specific version of uv
### Install the latest version (default)
```yaml
- name: Install a specific version
uses: eifinger/setup-uv@v1
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v2
with:
version: '0.3.0'
version: "latest"
```
### Install latest version
For an example workflow, see
[here](https://github.com/charliermarsh/autobot/blob/e42c66659bf97b90ca9ff305a19cc99952d0d43f/.github/workflows/ci.yaml).
By default this action installs the version defined as `default` in `action.yml`.
This gets automatically updated in a new release of this action when a new version of uv is released.
If you don't want to wait for a new release of this action you can use use `version: latest`.
> [!TIP]
>
> Using `latest` requires that uv download the 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.
> [!WARNING]
> Using the `latest` version means that the uv executable gets downloaded every single time instead of loaded from the tools cache.
> This can take up to 20s depending on the download speed.
> This does not affect the uv cache.
### Install a specific version
```yaml
- name: Install a specific version
uses: eifinger/setup-uv@v1
- name: Install a specific version of uv
uses: astral-sh/setup-uv@v2
with:
version: 'latest'
version: "0.4.4"
```
### Validate checksum
You can also specify a checksum to validate the downloaded file.
Checksums up to the default version are automatically verified by this action.
The sha265 hashes can be found on the [releases page](https://github.com/astral-sh/uv/releases)
of the uv repo.
You can also specify a checksum to validate the downloaded file. Checksums up to the default version
are automatically verified by this action. The sha265 hashes can be found on the
[releases page](https://github.com/astral-sh/uv/releases) of the uv repo.
```yaml
- name: Install a specific version and validate the checksum
uses: eifinger/setup-uv@v1
uses: astral-sh/setup-uv@v2
with:
version: '0.3.1'
checksum: 'e11b01402ab645392c7ad6044db63d37e4fd1e745e015306993b07695ea5f9f8'
version: "0.3.1"
checksum: "e11b01402ab645392c7ad6044db63d37e4fd1e745e015306993b07695ea5f9f8"
```
### Enable caching
If you enable caching the [uv cache](https://docs.astral.sh/uv/concepts/cache/) will
be cached to the GitHub Actions Cache. This can speed up runs which can reuse the cache
by several minutes. The cache will always be reused on self-hosted runners.
If you enable caching, the [uv cache](https://docs.astral.sh/uv/concepts/cache/) will be cached to
the GitHub Actions Cache. This can speed up runs that reuse the cache by several minutes.
> [!TIP]
>
> On self-hosted runners this is usually not needed since the cache generated by uv on the runner's
> filesystem is not removed after a run. For more details see [Local cache path](#local-cache-path).
You can optionally define a custom cache key suffix.
```yaml
- name: Enable caching and define a custom cache key suffix
id: setup-uv
uses: eifinger/setup-uv@v1
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
cache-suffix: 'optional-suffix'
cache-suffix: "optional-suffix"
```
When the cache was successfully restored the output `cache-hit` will be set to `true` and you can use it in subsequent steps.
For the example above you can use it like this:
When the cache was successfully restored, the output `cache-hit` will be set to `true` and you can
use it in subsequent steps. For example, to use the cache in the above case:
```yaml
- name: Do something if the cache was restored
@@ -95,82 +94,106 @@ For the example above you can use it like this:
run: echo "Cache was restored"
```
#### Local cache path
#### Cache dependency glob
If you want to save the cache to a local path other than the default path (`/tmp/setup-uv-cache`)
you can specify the path with the `cache-local-path` input.
If you want to control when the cache is invalidated, specify a glob pattern with the
`cache-dependency-glob` input. The cache will be invalidated if any file matching the glob pattern
changes. The glob matches files relative to the repository root.
> [!NOTE] The default is `**/uv.lock`.
```yaml
- name: Define a cache dependency glob
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
cache-dependency-glob: "**/requirements*.txt"
```
```yaml
- name: Define a list of cache dependency globs
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
cache-dependency-glob: |
**/requirements*.txt
**/pyproject.toml
```
```yaml
- name: Never invalidate the cache
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
cache-dependency-glob: ""
```
### Local cache path
This action controls where uv stores its cache on the runner's filesystem. You can change the
default (`/tmp/setup-uv-cache`) by specifying the path with the `cache-local-path` input.
```yaml
- name: Define a custom uv cache path
uses: eifinger/setup-uv@v1
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
cache-local-path: '/path/to/cache'
cache-local-path: "/path/to/cache"
```
#### Cache dependency glob
### GitHub authentication token
If you want to control when the cache is invalidated you can specify a glob pattern with the `cache-dependency-glob` input.
The cache will be invalidated if any file matching the glob pattern changes.
The glob matches files relative to the repository root.
This action uses the GitHub API to fetch the uv release artifacts. To avoid hitting the GitHub API
rate limit too quickly, an authentication token can be provided via the `github-token` input. By
default, the `GITHUB_TOKEN` secret is used, which is automatically provided by GitHub Actions.
If the default
[permissions for the GitHub token](https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)
are not sufficient, you can provide a custom GitHub token with the necessary permissions.
```yaml
- name: Define a cache dependency glob
uses: eifinger/setup-uv@v1
- name: Install the latest version of uv with a custom GitHub token
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
cache-dependency-glob: 'uv.lock'
```
```yaml
- name: Define a cache dependency glob
uses: eifinger/setup-uv@v1
with:
enable-cache: true
cache-dependency-glob: '**requirements*.txt'
```
### API rate limit
To avoid hitting the error `API rate limit exceeded` you can supply a GitHub token with the `github-token` input.
```yaml
- name: Install uv and supply a GitHub token
uses: eifinger/setup-uv@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
```
## How it works
This action downloads uv from the releases of the [uv repo](https://github.com/astral-sh/uv) and uses the [GitHub Actions Toolkit](https://github.com/actions/toolkit) to cache it as a tool to speed up consecutive runs on self-hosted runners.
This action downloads uv from the uv repo's official
[GitHub Releases](https://github.com/astral-sh/uv) and uses the
[GitHub Actions Toolkit](https://github.com/actions/toolkit) to cache it as a tool to speed up
consecutive runs on self-hosted runners.
The installed version of uv is then added to the runner path so other steps can just use it by calling `uv`.
The installed version of uv is then added to the runner PATH, enabling subsequent steps to invoke it
by name (`uv`).
## FAQ
### Do I still need actions/setup-python when using this action?
### Do I still need `actions/setup-python` alongside `setup-uv`?
No! This action was modelled as a drop-in replacement for `actions/setup-python` when using uv.
No. This action is modelled as a drop-in replacement for `actions/setup-python` when using uv. With
`setup-uv`, you can install a specific version of Python using `uv python install` rather than
relying on `actions/setup-python`.
A simple example workflow could look like this:
For example:
```yaml
- name: Checkout the repository
uses: actions/checkout@main
- name: Install the latest version of uv
uses: eifinger/setup-uv@v1
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
- name: Test
run: uv run --frozen pytest
```
If you want to have a specific python version installed you can use the command [`uv python install`](https://docs.astral.sh/uv/guides/install-python/):
To install a specific version of Python, use
[`uv python install`](https://docs.astral.sh/uv/guides/install-python/):
```yaml
- name: Install the latest version of uv
uses: eifinger/setup-uv@v1
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
- name: Install Python 3.12
@@ -179,22 +202,34 @@ If you want to have a specific python version installed you can use the command
### What is the default version?
By default this action installs the version defined as `default` in `action.yml`.
When a new release of uv is published this triggers an automatic release of this action with the new version as `default`.
By default, this action installs the latest version of uv.
If you have to know the version installed for other steps of your workflow you can use the `uv-version` output:
If you require the installed version in subsequent steps of your workflow, use the `uv-version`
output:
```yaml
- name: Checkout the repository
uses: actions/checkout@main
- name: Install the default version of uv
id: setup-uv
uses: eifinger/setup-uv@v1
uses: astral-sh/setup-uv@v2
- name: Print the installed version
run: echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}"
```
---
## Acknowledgements
[<img src="https://raw.githubusercontent.com/eifinger/setup-uv/main/docs/images/bmc-button.svg" width=150 height=40 style="margin: 5px"/>](https://www.buymeacoffee.com/eifinger)
[<img src="https://raw.githubusercontent.com/eifinger/setup-uv/main/docs/images/paypal-button.svg" width=150 height=40 style="margin: 5px"/>](https://paypal.me/kevinstillhammer)
`setup-uv` was initially written and published by [Kevin Stillhammer](https://github.com/eifinger)
before moving under the official [Astral](https://github.com/astral-sh) GitHub organization. You can
support Kevin's work in open source on [Buy me a coffee](https://www.buymeacoffee.com/eifinger) or
[PayPal](https://paypal.me/kevinstillhammer).
## License
MIT
<div align="center">
<a target="_blank" href="https://astral.sh" style="background:none">
<img src="https://raw.githubusercontent.com/astral-sh/uv/main/assets/svg/Astral.svg" alt="Made by Astral">
</a>
</div>

View File

@@ -1,37 +0,0 @@
import {expect, test, it} from '@jest/globals'
import {
isknownVersion,
validateChecksum
} from '../../../src/download/checksum/checksum'
test('checksum should match', async () => {
const validChecksum =
'f3da96ec7e995debee7f5d52ecd034dfb7074309a1da42f76429ecb814d813a3'
const filePath = '__tests__/fixtures/checksumfile'
// string params don't matter only test the checksum mechanism, not known checksums
await validateChecksum(
validChecksum,
filePath,
'aarch64',
'pc-windows-msvc',
'1.2.3'
)
})
type KnownVersionFixture = {version: string; known: boolean}
it.each<KnownVersionFixture>([
{
version: '0.3.0',
known: true
},
{
version: '0.0.15',
known: false
}
])(
'isknownVersion should return $known for version $version',
({version, known}) => {
expect(isknownVersion(version)).toBe(known)
}
)

View File

@@ -0,0 +1,37 @@
import { expect, test, it } from "@jest/globals";
import {
isknownVersion,
validateChecksum,
} from "../../../src/download/checksum/checksum";
test("checksum should match", async () => {
const validChecksum =
"f3da96ec7e995debee7f5d52ecd034dfb7074309a1da42f76429ecb814d813a3";
const filePath = "__tests__/fixtures/checksumfile";
// string params don't matter only test the checksum mechanism, not known checksums
await validateChecksum(
validChecksum,
filePath,
"aarch64",
"pc-windows-msvc",
"1.2.3",
);
});
type KnownVersionFixture = { version: string; known: boolean };
it.each<KnownVersionFixture>([
{
version: "0.3.0",
known: true,
},
{
version: "0.0.15",
known: false,
},
])(
"isknownVersion should return $known for version $version",
({ version, known }) => {
expect(isknownVersion(version)).toBe(known);
},
);

View File

@@ -1,38 +1,43 @@
name: 'Python setup uv'
description: 'Set up your GitHub Actions workflow with a specific version of uv'
author: 'eifinger'
name: "Python setup uv"
description: "Set up your GitHub Actions workflow with a specific version of uv"
author: "eifinger"
inputs:
version:
description: 'The version of uv to install'
default: '0.4.4'
version:
description: "The version of uv to install"
default: "latest"
checksum:
description: 'The checksum of the uv version to install'
description: "The checksum of the uv version to install"
required: false
github-token:
description: 'Used to increase the rate limit when retrieving versions and downloading uv.'
description:
"Used to increase the rate limit when retrieving versions and downloading
uv."
required: false
default: ${{ github.token }}
enable-cache:
description: 'Enable caching of the uv cache'
default: 'false'
description: "Enable caching of the uv cache"
default: "false"
cache-dependency-glob:
description: 'Glob pattern to match files relative to the repository root to control the cache. e.g. "uv.lock"'
required: false
description:
"Glob pattern to match files relative to the repository root to control
the cache."
default: "**/uv.lock"
cache-suffix:
description: 'Suffix for the cache key'
description: "Suffix for the cache key"
required: false
cache-local-path:
description: 'Local path to store the cache.'
default: '/tmp/setup-uv-cache'
description: "Local path to store the cache."
default: ""
outputs:
uv-version:
description: "The installed uv version. Useful when using latest."
cache-hit:
description: "A boolean value to indicate a cache entry was found"
runs:
using: 'node20'
main: 'dist/setup/index.js'
post: 'dist/save-cache/index.js'
using: "node20"
main: "dist/setup/index.js"
post: "dist/save-cache/index.js"
post-if: success()
branding:
icon: 'package'
color: 'blue'
icon: "package"
color: "blue"

230
dist/save-cache/index.js generated vendored
View File

@@ -5157,7 +5157,7 @@ function hashFiles(patterns, currentWorkspace = '', options, verbose = false) {
followSymbolicLinks = options.followSymbolicLinks;
}
const globber = yield create(patterns, { followSymbolicLinks });
return internal_hash_files_1.hashFiles(globber, currentWorkspace, verbose);
return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose);
});
}
exports.hashFiles = hashFiles;
@@ -5172,7 +5172,11 @@ exports.hashFiles = hashFiles;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
@@ -5185,7 +5189,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
@@ -5200,7 +5204,8 @@ function getOptions(copy) {
followSymbolicLinks: true,
implicitDescendants: true,
matchDirectories: true,
omitBrokenSymbolicLinks: true
omitBrokenSymbolicLinks: true,
excludeHiddenFiles: false
};
if (copy) {
if (typeof copy.followSymbolicLinks === 'boolean') {
@@ -5219,6 +5224,10 @@ function getOptions(copy) {
result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks;
core.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`);
}
if (typeof copy.excludeHiddenFiles === 'boolean') {
result.excludeHiddenFiles = copy.excludeHiddenFiles;
core.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`);
}
}
return result;
}
@@ -5234,7 +5243,11 @@ exports.getOptions = getOptions;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
@@ -5247,7 +5260,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
@@ -5301,19 +5314,21 @@ class DefaultGlobber {
return this.searchPaths.slice();
}
glob() {
var e_1, _a;
var _a, e_1, _b, _c;
return __awaiter(this, void 0, void 0, function* () {
const result = [];
try {
for (var _b = __asyncValues(this.globGenerator()), _c; _c = yield _b.next(), !_c.done;) {
const itemPath = _c.value;
for (var _d = true, _e = __asyncValues(this.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
_c = _f.value;
_d = false;
const itemPath = _c;
result.push(itemPath);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b);
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
}
finally { if (e_1) throw e_1.error; }
}
@@ -5371,6 +5386,10 @@ class DefaultGlobber {
if (!stats) {
continue;
}
// Hidden file or directory?
if (options.excludeHiddenFiles && path.basename(item.path).match(/^\./)) {
continue;
}
// Directory
if (stats.isDirectory()) {
// Matched
@@ -5476,7 +5495,11 @@ exports.DefaultGlobber = DefaultGlobber;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
@@ -5489,7 +5512,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
@@ -5518,19 +5541,21 @@ const stream = __importStar(__nccwpck_require__(2781));
const util = __importStar(__nccwpck_require__(3837));
const path = __importStar(__nccwpck_require__(1017));
function hashFiles(globber, currentWorkspace, verbose = false) {
var e_1, _a;
var _b;
var _a, e_1, _b, _c;
var _d;
return __awaiter(this, void 0, void 0, function* () {
const writeDelegate = verbose ? core.info : core.debug;
let hasMatch = false;
const githubWorkspace = currentWorkspace
? currentWorkspace
: (_b = process.env['GITHUB_WORKSPACE']) !== null && _b !== void 0 ? _b : process.cwd();
: (_d = process.env['GITHUB_WORKSPACE']) !== null && _d !== void 0 ? _d : process.cwd();
const result = crypto.createHash('sha256');
let count = 0;
try {
for (var _c = __asyncValues(globber.globGenerator()), _d; _d = yield _c.next(), !_d.done;) {
const file = _d.value;
for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) {
_c = _g.value;
_e = false;
const file = _c;
writeDelegate(file);
if (!file.startsWith(`${githubWorkspace}${path.sep}`)) {
writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`);
@@ -5553,7 +5578,7 @@ function hashFiles(globber, currentWorkspace, verbose = false) {
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_d && !_d.done && (_a = _c.return)) yield _a.call(_c);
if (!_e && !_a && (_b = _f.return)) yield _b.call(_f);
}
finally { if (e_1) throw e_1.error; }
}
@@ -5593,7 +5618,7 @@ var MatchKind;
MatchKind[MatchKind["File"] = 2] = "File";
/** Matched */
MatchKind[MatchKind["All"] = 3] = "All";
})(MatchKind = exports.MatchKind || (exports.MatchKind = {}));
})(MatchKind || (exports.MatchKind = MatchKind = {}));
//# sourceMappingURL=internal-match-kind.js.map
/***/ }),
@@ -5605,7 +5630,11 @@ var MatchKind;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
@@ -5618,7 +5647,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
@@ -5668,8 +5697,8 @@ exports.dirname = dirname;
* or `C:` are expanded based on the current working directory.
*/
function ensureAbsoluteRoot(root, itemPath) {
assert_1.default(root, `ensureAbsoluteRoot parameter 'root' must not be empty`);
assert_1.default(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`);
(0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`);
(0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`);
// Already rooted
if (hasAbsoluteRoot(itemPath)) {
return itemPath;
@@ -5679,7 +5708,7 @@ function ensureAbsoluteRoot(root, itemPath) {
// Check for itemPath like C: or C:foo
if (itemPath.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)) {
let cwd = process.cwd();
assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
(0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
// Drive letter matches cwd? Expand to cwd
if (itemPath[0].toUpperCase() === cwd[0].toUpperCase()) {
// Drive only, e.g. C:
@@ -5704,11 +5733,11 @@ function ensureAbsoluteRoot(root, itemPath) {
// Check for itemPath like \ or \foo
else if (normalizeSeparators(itemPath).match(/^\\$|^\\[^\\]/)) {
const cwd = process.cwd();
assert_1.default(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
(0, assert_1.default)(cwd.match(/^[A-Z]:\\/i), `Expected current directory to start with an absolute drive root. Actual '${cwd}'`);
return `${cwd[0]}:\\${itemPath.substr(1)}`;
}
}
assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`);
(0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`);
// Otherwise ensure root ends with a separator
if (root.endsWith('/') || (IS_WINDOWS && root.endsWith('\\'))) {
// Intentionally empty
@@ -5725,7 +5754,7 @@ exports.ensureAbsoluteRoot = ensureAbsoluteRoot;
* `\\hello\share` and `C:\hello` (and using alternate separator).
*/
function hasAbsoluteRoot(itemPath) {
assert_1.default(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`);
(0, assert_1.default)(itemPath, `hasAbsoluteRoot parameter 'itemPath' must not be empty`);
// Normalize separators
itemPath = normalizeSeparators(itemPath);
// Windows
@@ -5742,7 +5771,7 @@ exports.hasAbsoluteRoot = hasAbsoluteRoot;
* `\`, `\hello`, `\\hello\share`, `C:`, and `C:\hello` (and using alternate separator).
*/
function hasRoot(itemPath) {
assert_1.default(itemPath, `isRooted parameter 'itemPath' must not be empty`);
(0, assert_1.default)(itemPath, `isRooted parameter 'itemPath' must not be empty`);
// Normalize separators
itemPath = normalizeSeparators(itemPath);
// Windows
@@ -5810,7 +5839,11 @@ exports.safeTrimTrailingSeparator = safeTrimTrailingSeparator;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
@@ -5823,7 +5856,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
@@ -5848,7 +5881,7 @@ class Path {
this.segments = [];
// String
if (typeof itemPath === 'string') {
assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`);
(0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`);
// Normalize slashes and trim unnecessary trailing slash
itemPath = pathHelper.safeTrimTrailingSeparator(itemPath);
// Not rooted
@@ -5875,24 +5908,24 @@ class Path {
// Array
else {
// Must not be empty
assert_1.default(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`);
(0, assert_1.default)(itemPath.length > 0, `Parameter 'itemPath' must not be an empty array`);
// Each segment
for (let i = 0; i < itemPath.length; i++) {
let segment = itemPath[i];
// Must not be empty
assert_1.default(segment, `Parameter 'itemPath' must not contain any empty segments`);
(0, assert_1.default)(segment, `Parameter 'itemPath' must not contain any empty segments`);
// Normalize slashes
segment = pathHelper.normalizeSeparators(itemPath[i]);
// Root segment
if (i === 0 && pathHelper.hasRoot(segment)) {
segment = pathHelper.safeTrimTrailingSeparator(segment);
assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`);
(0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`);
this.segments.push(segment);
}
// All other segments
else {
// Must not contain slash
assert_1.default(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`);
(0, assert_1.default)(!segment.includes(path.sep), `Parameter 'itemPath' contains unexpected path separators`);
this.segments.push(segment);
}
}
@@ -5930,7 +5963,11 @@ exports.Path = Path;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
@@ -5943,7 +5980,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
@@ -6031,7 +6068,11 @@ exports.partialMatch = partialMatch;
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
@@ -6044,7 +6085,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
@@ -6076,9 +6117,9 @@ class Pattern {
else {
// Convert to pattern
segments = segments || [];
assert_1.default(segments.length, `Parameter 'segments' must not empty`);
(0, assert_1.default)(segments.length, `Parameter 'segments' must not empty`);
const root = Pattern.getLiteral(segments[0]);
assert_1.default(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`);
(0, assert_1.default)(root && pathHelper.hasAbsoluteRoot(root), `Parameter 'segments' first element must be a root path`);
pattern = new internal_path_1.Path(segments).toString().trim();
if (patternOrNegate) {
pattern = `!${pattern}`;
@@ -6172,13 +6213,13 @@ class Pattern {
*/
static fixupPattern(pattern, homedir) {
// Empty
assert_1.default(pattern, 'pattern cannot be empty');
(0, assert_1.default)(pattern, 'pattern cannot be empty');
// Must not contain `.` segment, unless first segment
// Must not contain `..` segment
const literalSegments = new internal_path_1.Path(pattern).segments.map(x => Pattern.getLiteral(x));
assert_1.default(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`);
(0, assert_1.default)(literalSegments.every((x, i) => (x !== '.' || i === 0) && x !== '..'), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`);
// Must not contain globs in root, e.g. Windows UNC path \\foo\b*r
assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`);
(0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`);
// Normalize slashes
pattern = pathHelper.normalizeSeparators(pattern);
// Replace leading `.` segment
@@ -6188,8 +6229,8 @@ class Pattern {
// Replace leading `~` segment
else if (pattern === '~' || pattern.startsWith(`~${path.sep}`)) {
homedir = homedir || os.homedir();
assert_1.default(homedir, 'Unable to determine HOME directory');
assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`);
(0, assert_1.default)(homedir, 'Unable to determine HOME directory');
(0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`);
pattern = Pattern.globEscape(homedir) + pattern.substr(1);
}
// Replace relative drive root, e.g. pattern is C: or C:foo
@@ -82784,20 +82825,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.restoreCache = exports.STATE_CACHE_MATCHED_KEY = exports.STATE_CACHE_KEY = void 0;
exports.STATE_CACHE_MATCHED_KEY = exports.STATE_CACHE_KEY = void 0;
exports.restoreCache = restoreCache;
const cache = __importStar(__nccwpck_require__(7799));
const glob = __importStar(__nccwpck_require__(8090));
const core = __importStar(__nccwpck_require__(2186));
const path_1 = __importDefault(__nccwpck_require__(1017));
const inputs_1 = __nccwpck_require__(9378);
const platforms_1 = __nccwpck_require__(6005);
exports.STATE_CACHE_KEY = 'cache-key';
exports.STATE_CACHE_MATCHED_KEY = 'cache-matched-key';
const CACHE_VERSION = '1';
exports.STATE_CACHE_KEY = "cache-key";
exports.STATE_CACHE_MATCHED_KEY = "cache-matched-key";
const CACHE_VERSION = "1";
function restoreCache(version) {
return __awaiter(this, void 0, void 0, function* () {
const cacheKey = yield computeKeys(version);
@@ -82809,40 +82847,39 @@ function restoreCache(version) {
catch (err) {
const message = err.message;
core.warning(message);
core.setOutput('cache-hit', false);
core.setOutput("cache-hit", false);
return;
}
core.saveState(exports.STATE_CACHE_KEY, cacheKey);
handleMatchResult(matchedKey, cacheKey);
});
}
exports.restoreCache = restoreCache;
function computeKeys(version) {
return __awaiter(this, void 0, void 0, function* () {
let cacheDependencyPathHash = '-';
if (inputs_1.cacheDependencyGlob !== '') {
const fullCacheDependencyGlob = `${process.env['GITHUB_WORKSPACE']}${path_1.default.sep}${inputs_1.cacheDependencyGlob}`;
cacheDependencyPathHash += yield glob.hashFiles(fullCacheDependencyGlob);
if (cacheDependencyPathHash === '-') {
throw new Error(`No file in ${process.cwd()} matched to [${inputs_1.cacheDependencyGlob}], make sure you have checked out the target repository`);
let cacheDependencyPathHash = "-";
if (inputs_1.cacheDependencyGlob !== "") {
core.info(`Searching files using cache dependency glob: ${inputs_1.cacheDependencyGlob.split("\n").join(",")}`);
cacheDependencyPathHash += yield glob.hashFiles(inputs_1.cacheDependencyGlob, undefined, undefined, true);
if (cacheDependencyPathHash === "-") {
throw new Error(`No file in ${process.cwd()} matched to [${inputs_1.cacheDependencyGlob.split("\n").join(",")}], make sure you have checked out the target repository`);
}
}
else {
cacheDependencyPathHash += 'no-dependency-glob';
cacheDependencyPathHash += "no-dependency-glob";
}
const suffix = inputs_1.cacheSuffix ? `-${inputs_1.cacheSuffix}` : '';
const suffix = inputs_1.cacheSuffix ? `-${inputs_1.cacheSuffix}` : "";
return `setup-uv-${CACHE_VERSION}-${(0, platforms_1.getArch)()}-${(0, platforms_1.getPlatform)()}-${version}${cacheDependencyPathHash}${suffix}`;
});
}
function handleMatchResult(matchedKey, primaryKey) {
if (!matchedKey) {
core.info(`No GitHub Actions cache found for key: ${primaryKey}`);
core.setOutput('cache-hit', false);
core.setOutput("cache-hit", false);
return;
}
core.saveState(exports.STATE_CACHE_MATCHED_KEY, matchedKey);
core.info(`uv cache restored from GitHub Actions cache with key: ${matchedKey}`);
core.setOutput('cache-hit', true);
core.setOutput("cache-hit", true);
}
@@ -82886,7 +82923,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.run = void 0;
exports.run = run;
const cache = __importStar(__nccwpck_require__(7799));
const core = __importStar(__nccwpck_require__(2186));
const exec = __importStar(__nccwpck_require__(1514));
@@ -82906,13 +82943,12 @@ function run() {
process.exit(0);
});
}
exports.run = run;
function saveCache() {
return __awaiter(this, void 0, void 0, function* () {
const cacheKey = core.getState(restore_cache_1.STATE_CACHE_KEY);
const matchedKey = core.getState(restore_cache_1.STATE_CACHE_MATCHED_KEY);
if (!cacheKey) {
core.warning('Error retrieving cache key from state.');
core.warning("Error retrieving cache key from state.");
return;
}
else if (matchedKey === cacheKey) {
@@ -82928,11 +82964,11 @@ function saveCache() {
function pruneCache() {
return __awaiter(this, void 0, void 0, function* () {
const options = {
silent: !core.isDebug()
silent: !core.isDebug(),
};
const execArgs = ['cache', 'prune', '--ci'];
core.info('Pruning cache...');
yield exec.exec('uv', execArgs, options);
const execArgs = ["cache", "prune", "--ci"];
core.info("Pruning cache...");
yield exec.exec("uv", execArgs, options);
});
}
run();
@@ -82968,16 +83004,33 @@ var __importStar = (this && this.__importStar) || function (mod) {
__setModuleDefault(result, mod);
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.cacheDependencyGlob = exports.githubToken = exports.cacheLocalPath = exports.cacheSuffix = exports.enableCache = exports.checkSum = exports.version = void 0;
const core = __importStar(__nccwpck_require__(2186));
exports.version = core.getInput('version');
exports.checkSum = core.getInput('checksum');
exports.enableCache = core.getInput('enable-cache') === 'true';
exports.cacheSuffix = core.getInput('cache-suffix') || '';
exports.cacheLocalPath = core.getInput('cache-local-path');
exports.githubToken = core.getInput('github-token');
exports.cacheDependencyGlob = core.getInput('cache-dependency-glob');
const path_1 = __importDefault(__nccwpck_require__(1017));
exports.version = core.getInput("version");
exports.checkSum = core.getInput("checksum");
exports.enableCache = core.getInput("enable-cache") === "true";
exports.cacheSuffix = core.getInput("cache-suffix") || "";
exports.cacheLocalPath = getCacheLocalPath();
exports.githubToken = core.getInput("github-token");
exports.cacheDependencyGlob = core.getInput("cache-dependency-glob");
function getCacheLocalPath() {
const cacheLocalPathInput = core.getInput("cache-local-path");
if (cacheLocalPathInput !== "") {
return cacheLocalPathInput;
}
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${path_1.default.sep}setup-uv-cache`;
}
if (process.platform === "win32") {
return "D:\\a\\_temp\\setup-uv-cache";
}
return "/tmp/setup-uv-cache";
}
/***/ }),
@@ -82988,31 +83041,30 @@ exports.cacheDependencyGlob = core.getInput('cache-dependency-glob');
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.getPlatform = exports.getArch = void 0;
exports.getArch = getArch;
exports.getPlatform = getPlatform;
function getArch() {
const arch = process.arch;
const archMapping = {
ia32: 'i686',
x64: 'x86_64',
arm64: 'aarch64'
ia32: "i686",
x64: "x86_64",
arm64: "aarch64",
};
if (arch in archMapping) {
return archMapping[arch];
}
}
exports.getArch = getArch;
function getPlatform() {
const platform = process.platform;
const platformMapping = {
linux: 'unknown-linux-gnu',
darwin: 'apple-darwin',
win32: 'pc-windows-msvc'
linux: "unknown-linux-gnu",
darwin: "apple-darwin",
win32: "pc-windows-msvc",
};
if (platform in platformMapping) {
return platformMapping[platform];
}
}
exports.getPlatform = getPlatform;
/***/ }),

1
dist/save-cache/index.js.map generated vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

453
dist/setup/37.index.js generated vendored
View File

@@ -1,453 +0,0 @@
"use strict";
exports.id = 37;
exports.ids = [37];
exports.modules = {
/***/ 4037:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "toFormData": () => (/* binding */ toFormData)
/* harmony export */ });
/* harmony import */ var fetch_blob_from_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2777);
/* harmony import */ var formdata_polyfill_esm_min_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8010);
let s = 0;
const S = {
START_BOUNDARY: s++,
HEADER_FIELD_START: s++,
HEADER_FIELD: s++,
HEADER_VALUE_START: s++,
HEADER_VALUE: s++,
HEADER_VALUE_ALMOST_DONE: s++,
HEADERS_ALMOST_DONE: s++,
PART_DATA_START: s++,
PART_DATA: s++,
END: s++
};
let f = 1;
const F = {
PART_BOUNDARY: f,
LAST_BOUNDARY: f *= 2
};
const LF = 10;
const CR = 13;
const SPACE = 32;
const HYPHEN = 45;
const COLON = 58;
const A = 97;
const Z = 122;
const lower = c => c | 0x20;
const noop = () => {};
class MultipartParser {
/**
* @param {string} boundary
*/
constructor(boundary) {
this.index = 0;
this.flags = 0;
this.onHeaderEnd = noop;
this.onHeaderField = noop;
this.onHeadersEnd = noop;
this.onHeaderValue = noop;
this.onPartBegin = noop;
this.onPartData = noop;
this.onPartEnd = noop;
this.boundaryChars = {};
boundary = '\r\n--' + boundary;
const ui8a = new Uint8Array(boundary.length);
for (let i = 0; i < boundary.length; i++) {
ui8a[i] = boundary.charCodeAt(i);
this.boundaryChars[ui8a[i]] = true;
}
this.boundary = ui8a;
this.lookbehind = new Uint8Array(this.boundary.length + 8);
this.state = S.START_BOUNDARY;
}
/**
* @param {Uint8Array} data
*/
write(data) {
let i = 0;
const length_ = data.length;
let previousIndex = this.index;
let {lookbehind, boundary, boundaryChars, index, state, flags} = this;
const boundaryLength = this.boundary.length;
const boundaryEnd = boundaryLength - 1;
const bufferLength = data.length;
let c;
let cl;
const mark = name => {
this[name + 'Mark'] = i;
};
const clear = name => {
delete this[name + 'Mark'];
};
const callback = (callbackSymbol, start, end, ui8a) => {
if (start === undefined || start !== end) {
this[callbackSymbol](ui8a && ui8a.subarray(start, end));
}
};
const dataCallback = (name, clear) => {
const markSymbol = name + 'Mark';
if (!(markSymbol in this)) {
return;
}
if (clear) {
callback(name, this[markSymbol], i, data);
delete this[markSymbol];
} else {
callback(name, this[markSymbol], data.length, data);
this[markSymbol] = 0;
}
};
for (i = 0; i < length_; i++) {
c = data[i];
switch (state) {
case S.START_BOUNDARY:
if (index === boundary.length - 2) {
if (c === HYPHEN) {
flags |= F.LAST_BOUNDARY;
} else if (c !== CR) {
return;
}
index++;
break;
} else if (index - 1 === boundary.length - 2) {
if (flags & F.LAST_BOUNDARY && c === HYPHEN) {
state = S.END;
flags = 0;
} else if (!(flags & F.LAST_BOUNDARY) && c === LF) {
index = 0;
callback('onPartBegin');
state = S.HEADER_FIELD_START;
} else {
return;
}
break;
}
if (c !== boundary[index + 2]) {
index = -2;
}
if (c === boundary[index + 2]) {
index++;
}
break;
case S.HEADER_FIELD_START:
state = S.HEADER_FIELD;
mark('onHeaderField');
index = 0;
// falls through
case S.HEADER_FIELD:
if (c === CR) {
clear('onHeaderField');
state = S.HEADERS_ALMOST_DONE;
break;
}
index++;
if (c === HYPHEN) {
break;
}
if (c === COLON) {
if (index === 1) {
// empty header field
return;
}
dataCallback('onHeaderField', true);
state = S.HEADER_VALUE_START;
break;
}
cl = lower(c);
if (cl < A || cl > Z) {
return;
}
break;
case S.HEADER_VALUE_START:
if (c === SPACE) {
break;
}
mark('onHeaderValue');
state = S.HEADER_VALUE;
// falls through
case S.HEADER_VALUE:
if (c === CR) {
dataCallback('onHeaderValue', true);
callback('onHeaderEnd');
state = S.HEADER_VALUE_ALMOST_DONE;
}
break;
case S.HEADER_VALUE_ALMOST_DONE:
if (c !== LF) {
return;
}
state = S.HEADER_FIELD_START;
break;
case S.HEADERS_ALMOST_DONE:
if (c !== LF) {
return;
}
callback('onHeadersEnd');
state = S.PART_DATA_START;
break;
case S.PART_DATA_START:
state = S.PART_DATA;
mark('onPartData');
// falls through
case S.PART_DATA:
previousIndex = index;
if (index === 0) {
// boyer-moore derrived algorithm to safely skip non-boundary data
i += boundaryEnd;
while (i < bufferLength && !(data[i] in boundaryChars)) {
i += boundaryLength;
}
i -= boundaryEnd;
c = data[i];
}
if (index < boundary.length) {
if (boundary[index] === c) {
if (index === 0) {
dataCallback('onPartData', true);
}
index++;
} else {
index = 0;
}
} else if (index === boundary.length) {
index++;
if (c === CR) {
// CR = part boundary
flags |= F.PART_BOUNDARY;
} else if (c === HYPHEN) {
// HYPHEN = end boundary
flags |= F.LAST_BOUNDARY;
} else {
index = 0;
}
} else if (index - 1 === boundary.length) {
if (flags & F.PART_BOUNDARY) {
index = 0;
if (c === LF) {
// unset the PART_BOUNDARY flag
flags &= ~F.PART_BOUNDARY;
callback('onPartEnd');
callback('onPartBegin');
state = S.HEADER_FIELD_START;
break;
}
} else if (flags & F.LAST_BOUNDARY) {
if (c === HYPHEN) {
callback('onPartEnd');
state = S.END;
flags = 0;
} else {
index = 0;
}
} else {
index = 0;
}
}
if (index > 0) {
// when matching a possible boundary, keep a lookbehind reference
// in case it turns out to be a false lead
lookbehind[index - 1] = c;
} else if (previousIndex > 0) {
// if our boundary turned out to be rubbish, the captured lookbehind
// belongs to partData
const _lookbehind = new Uint8Array(lookbehind.buffer, lookbehind.byteOffset, lookbehind.byteLength);
callback('onPartData', 0, previousIndex, _lookbehind);
previousIndex = 0;
mark('onPartData');
// reconsider the current character even so it interrupted the sequence
// it could be the beginning of a new sequence
i--;
}
break;
case S.END:
break;
default:
throw new Error(`Unexpected state entered: ${state}`);
}
}
dataCallback('onHeaderField');
dataCallback('onHeaderValue');
dataCallback('onPartData');
// Update properties for the next call
this.index = index;
this.state = state;
this.flags = flags;
}
end() {
if ((this.state === S.HEADER_FIELD_START && this.index === 0) ||
(this.state === S.PART_DATA && this.index === this.boundary.length)) {
this.onPartEnd();
} else if (this.state !== S.END) {
throw new Error('MultipartParser.end(): stream ended unexpectedly');
}
}
}
function _fileName(headerValue) {
// matches either a quoted-string or a token (RFC 2616 section 19.5.1)
const m = headerValue.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);
if (!m) {
return;
}
const match = m[2] || m[3] || '';
let filename = match.slice(match.lastIndexOf('\\') + 1);
filename = filename.replace(/%22/g, '"');
filename = filename.replace(/&#(\d{4});/g, (m, code) => {
return String.fromCharCode(code);
});
return filename;
}
async function toFormData(Body, ct) {
if (!/multipart/i.test(ct)) {
throw new TypeError('Failed to fetch');
}
const m = ct.match(/boundary=(?:"([^"]+)"|([^;]+))/i);
if (!m) {
throw new TypeError('no or bad content-type header, no multipart boundary');
}
const parser = new MultipartParser(m[1] || m[2]);
let headerField;
let headerValue;
let entryValue;
let entryName;
let contentType;
let filename;
const entryChunks = [];
const formData = new formdata_polyfill_esm_min_js__WEBPACK_IMPORTED_MODULE_1__/* .FormData */ .Ct();
const onPartData = ui8a => {
entryValue += decoder.decode(ui8a, {stream: true});
};
const appendToFile = ui8a => {
entryChunks.push(ui8a);
};
const appendFileToFormData = () => {
const file = new fetch_blob_from_js__WEBPACK_IMPORTED_MODULE_0__/* .File */ .$B(entryChunks, filename, {type: contentType});
formData.append(entryName, file);
};
const appendEntryToFormData = () => {
formData.append(entryName, entryValue);
};
const decoder = new TextDecoder('utf-8');
decoder.decode();
parser.onPartBegin = function () {
parser.onPartData = onPartData;
parser.onPartEnd = appendEntryToFormData;
headerField = '';
headerValue = '';
entryValue = '';
entryName = '';
contentType = '';
filename = null;
entryChunks.length = 0;
};
parser.onHeaderField = function (ui8a) {
headerField += decoder.decode(ui8a, {stream: true});
};
parser.onHeaderValue = function (ui8a) {
headerValue += decoder.decode(ui8a, {stream: true});
};
parser.onHeaderEnd = function () {
headerValue += decoder.decode();
headerField = headerField.toLowerCase();
if (headerField === 'content-disposition') {
// matches either a quoted-string or a token (RFC 2616 section 19.5.1)
const m = headerValue.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);
if (m) {
entryName = m[2] || m[3] || '';
}
filename = _fileName(headerValue);
if (filename) {
parser.onPartData = appendToFile;
parser.onPartEnd = appendFileToFormData;
}
} else if (headerField === 'content-type') {
contentType = headerValue;
}
headerValue = '';
headerField = '';
};
for await (const chunk of Body) {
parser.write(chunk);
}
parser.end();
return formData;
}
/***/ })
};
;
//# sourceMappingURL=37.index.js.map

1
dist/setup/37.index.js.map generated vendored

File diff suppressed because one or more lines are too long

3736
dist/setup/index.js generated vendored

File diff suppressed because it is too large Load Diff

1
dist/setup/index.js.map generated vendored

File diff suppressed because one or more lines are too long

1056
dist/setup/licenses.txt generated vendored

File diff suppressed because it is too large Load Diff

1
dist/setup/sourcemap-register.js generated vendored

File diff suppressed because one or more lines are too long

35031
dist/update-checksums/index.js generated vendored

File diff suppressed because one or more lines are too long

1
dist/update-checksums/index.js.map generated vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -32707,40 +32707,39 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.updateChecksums = void 0;
exports.updateChecksums = updateChecksums;
const fs_1 = __nccwpck_require__(7147);
const tc = __importStar(__nccwpck_require__(7784));
function updateChecksums(filePath, downloadUrls) {
return __awaiter(this, void 0, void 0, function* () {
yield fs_1.promises.rm(filePath);
yield fs_1.promises.appendFile(filePath, '// AUTOGENERATED_DO_NOT_EDIT\nexport const KNOWN_CHECKSUMS: {[key: string]: string} = {\n');
yield 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 content = yield downloadAssetContent(downloadUrl);
const checksum = content.split(' ')[0].trim();
const checksum = content.split(" ")[0].trim();
const key = getKey(downloadUrl);
if (!firstLine) {
yield fs_1.promises.appendFile(filePath, ',\n');
yield fs_1.promises.appendFile(filePath, ",\n");
}
yield fs_1.promises.appendFile(filePath, ` '${key}':\n '${checksum}'`);
firstLine = false;
}
yield fs_1.promises.appendFile(filePath, '}\n');
yield fs_1.promises.appendFile(filePath, "}\n");
});
}
exports.updateChecksums = updateChecksums;
function getKey(downloadUrl) {
// https://github.com/astral-sh/uv/releases/download/0.3.2/uv-aarch64-apple-darwin.tar.gz.sha256
const parts = downloadUrl.split('/');
const parts = downloadUrl.split("/");
const fileName = parts[parts.length - 1];
const name = fileName.split('.')[0].split('uv-')[1];
const name = fileName.split(".")[0].split("uv-")[1];
const version = parts[parts.length - 2];
return `${name}-${version}`;
}
function downloadAssetContent(downloadUrl) {
return __awaiter(this, void 0, void 0, function* () {
const downloadPath = yield tc.downloadTool(downloadUrl);
const content = yield fs_1.promises.readFile(downloadPath, 'utf8');
const content = yield fs_1.promises.readFile(downloadPath, "utf8");
return content;
});
}
@@ -32748,7 +32747,7 @@ function downloadAssetContent(downloadUrl) {
/***/ }),
/***/ 4721:
/***/ 1265:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
@@ -32785,75 +32784,29 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __asyncValues = (this && this.__asyncValues) || function (o) {
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
var m = o[Symbol.asyncIterator], i;
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const github = __importStar(__nccwpck_require__(5438));
const core = __importStar(__nccwpck_require__(2186));
const utils_1 = __nccwpck_require__(239);
const fs_1 = __nccwpck_require__(7147);
const readline = __importStar(__nccwpck_require__(4521));
const constants_1 = __nccwpck_require__(8593);
const semver = __importStar(__nccwpck_require__(5911));
const update_known_checksums_1 = __nccwpck_require__(7554);
function run() {
return __awaiter(this, void 0, void 0, function* () {
const checksumFilePath = process.argv.slice(2)[0];
const defaultVersionFilePath = process.argv.slice(2)[1];
const github_token = process.argv.slice(2)[2];
const github_token = process.argv.slice(2)[1];
const octokit = github.getOctokit(github_token);
const response = yield octokit.paginate(octokit.rest.repos.listReleases, {
owner: utils_1.OWNER,
repo: utils_1.REPO
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));
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);
const latestVersion = response
.map(release => release.tag_name)
.map((release) => release.tag_name)
.sort(semver.rcompare)[0];
core.setOutput('latest-version', latestVersion);
yield updateDefaultVersion(defaultVersionFilePath, latestVersion);
});
}
function updateDefaultVersion(filePath, latestVersion) {
return __awaiter(this, void 0, void 0, function* () {
var _a, e_1, _b, _c;
const fileStream = (0, fs_1.createReadStream)(filePath);
const rl = readline.createInterface({
input: fileStream
});
let foundDescription = false;
const lines = [];
try {
for (var _d = true, rl_1 = __asyncValues(rl), rl_1_1; rl_1_1 = yield rl_1.next(), _a = rl_1_1.done, !_a; _d = true) {
_c = rl_1_1.value;
_d = false;
let line = _c;
if (!foundDescription &&
line.includes("description: 'The version of uv to install'")) {
foundDescription = true;
}
else if (foundDescription && line.includes('default: ')) {
line = line.replace(/'[^']*'/, `'${latestVersion}'`);
foundDescription = false;
}
lines.push(line);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (!_d && !_a && (_b = rl_1.return)) yield _b.call(rl_1);
}
finally { if (e_1) throw e_1.error; }
}
yield fs_1.promises.writeFile(filePath, lines.join('\n'));
core.setOutput("latest-version", latestVersion);
});
}
run();
@@ -32861,16 +32814,16 @@ run();
/***/ }),
/***/ 239:
/***/ 8593:
/***/ ((__unused_webpack_module, exports) => {
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
exports.REPO = 'uv';
exports.OWNER = 'astral-sh';
exports.TOOL_CACHE_NAME = 'uv';
exports.REPO = "uv";
exports.OWNER = "astral-sh";
exports.TOOL_CACHE_NAME = "uv";
/***/ }),
@@ -33035,14 +32988,6 @@ module.exports = require("querystring");
/***/ }),
/***/ 4521:
/***/ ((module) => {
"use strict";
module.exports = require("readline");
/***/ }),
/***/ 2781:
/***/ ((module) => {
@@ -34784,7 +34729,7 @@ module.exports = parseParams
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module is referenced by other modules so it can't be inlined
/******/ var __webpack_exports__ = __nccwpck_require__(4721);
/******/ var __webpack_exports__ = __nccwpck_require__(1265);
/******/ module.exports = __webpack_exports__;
/******/
/******/ })()

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -1,15 +0,0 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="545" height="153" viewBox="0 0 545 153">
<defs>
<style>
.cls-1{fill:#009ee3;}.cls-1,.cls-2,.cls-3{fill-rule:evenodd;}.cls-2{fill:#113984;}.cls-3{fill:#172c70;}</style>
</defs>
<title>paypal-seeklogo.com</title>
<path transform="scale(1, 1)" d="M0 24.48C0 10.9601 10.9601 0 24.48 0H520.2C533.72 0 544.68 10.9601 544.68 24.48V128.52C544.68 142.04 533.72 153 520.2 153H24.48C10.9601 153 0 142.04 0 128.52V24.48Z" fill="#ebf2ff"/>
<g transform="scale(0.8, 0.8) translate(45, 25)">
<path class="cls-1" d="M192.95,386.87h38.74c20.8,0,28.63,10.53,27.42,26-2,25.54-17.44,39.67-37.92,39.67H210.85c-2.81,0-4.7,1.86-5.46,6.9L201,488.74c-0.29,1.9-1.29,3-2.79,3.15H173.87c-2.29,0-3.1-1.75-2.5-5.54l14.84-93.93C186.79,388.66,188.85,386.87,192.95,386.87Z" transform="translate(-143.48 -354.54)"/>
<path class="cls-2" d="M361.14,385.13c13.07,0,25.13,7.09,23.48,24.76-2,21-13.25,32.62-31,32.67H338.11c-2.23,0-3.31,1.82-3.89,5.55l-3,19.07c-0.45,2.88-1.93,4.3-4.11,4.3H312.68c-2.3,0-3.1-1.47-2.59-4.76L322,390.29c0.59-3.76,2-5.16,4.57-5.16h34.54Zm-23.5,40.92h11.75c7.35-.28,12.23-5.37,12.72-14.55,0.3-5.67-3.53-9.73-9.62-9.7l-11.06.05-3.79,24.2h0Zm86.21,39.58c1.32-1.2,2.66-1.82,2.47-.34l-0.47,3.54c-0.24,1.85.49,2.83,2.21,2.83h12.82c2.16,0,3.21-.87,3.74-4.21l7.9-49.58c0.4-2.49-.21-3.71-2.1-3.71H436.32c-1.27,0-1.89.71-2.22,2.65l-0.52,3.05c-0.27,1.59-1,1.87-1.68.27-2.39-5.66-8.49-8.2-17-8-19.77.41-33.1,15.42-34.53,34.66-1.1,14.88,9.56,26.57,23.62,26.57,10.2,0,14.76-3,19.9-7.7h0ZM413.11,458c-8.51,0-14.44-6.79-13.21-15.11s9.19-15.11,17.7-15.11,14.44,6.79,13.21,15.11S421.63,458,413.11,458h0Zm64.5-44h-13c-2.68,0-3.77,2-2.92,4.46l16.14,47.26L462,488.21c-1.33,1.88-.3,3.59,1.57,3.59h14.61a4.47,4.47,0,0,0,4.34-2.13l49.64-71.2c1.53-2.19.81-4.49-1.7-4.49H516.63c-2.37,0-3.32.94-4.68,2.91l-20.7,30L482,416.82C481.46,415,480.11,414,477.62,414Z" transform="translate(-143.48 -354.54)"/>
<path class="cls-1" d="M583.8,385.13c13.07,0,25.13,7.09,23.48,24.76-2,21-13.25,32.62-31,32.67H560.78c-2.23,0-3.31,1.82-3.89,5.55l-3,19.07c-0.45,2.88-1.93,4.3-4.11,4.3H535.35c-2.3,0-3.1-1.47-2.59-4.76l11.93-76.45c0.59-3.76,2-5.16,4.57-5.16H583.8Zm-23.5,40.92h11.75c7.35-.28,12.23-5.37,12.72-14.55,0.3-5.67-3.53-9.73-9.62-9.7l-11.06.05-3.79,24.2h0Zm86.21,39.58c1.32-1.2,2.66-1.82,2.47-.34l-0.47,3.54c-0.24,1.85.49,2.83,2.21,2.83h12.82c2.16,0,3.21-.87,3.74-4.21l7.9-49.58c0.4-2.49-.21-3.71-2.1-3.71H659c-1.27,0-1.89.71-2.22,2.65l-0.52,3.05c-0.27,1.59-1,1.87-1.68.27-2.39-5.66-8.49-8.2-17-8-19.77.41-33.1,15.42-34.53,34.66-1.1,14.88,9.56,26.57,23.62,26.57,10.2,0,14.76-3,19.9-7.7h0ZM635.78,458c-8.51,0-14.44-6.79-13.21-15.11s9.19-15.11,17.7-15.11,14.44,6.79,13.21,15.11S644.29,458,635.78,458h0Zm59.13,13.74h-14.8a1.75,1.75,0,0,1-1.81-2l13-82.36a2.55,2.55,0,0,1,2.46-2h14.8a1.75,1.75,0,0,1,1.81,2l-13,82.36A2.55,2.55,0,0,1,694.91,471.76Z" transform="translate(-143.48 -354.54)"/>
<path class="cls-2" d="M168.72,354.54h38.78c10.92,0,23.88.35,32.54,8,5.79,5.11,8.83,13.24,8.13,22-2.38,29.61-20.09,46.2-43.85,46.2H185.2c-3.26,0-5.41,2.16-6.33,8l-5.34,34c-0.35,2.2-1.3,3.5-3,3.66H146.6c-2.65,0-3.59-2-2.9-6.42L160.9,361C161.59,356.62,164,354.54,168.72,354.54Z" transform="translate(-143.48 -354.54)"/>
<path class="cls-3" d="M179.43,435.29l6.77-42.87c0.59-3.76,2.65-5.56,6.75-5.56h38.74c6.41,0,11.6,1,15.66,2.85-3.89,26.36-20.94,41-43.26,41H185C182.44,430.72,180.56,432,179.43,435.29Z" transform="translate(-143.48 -354.54)"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.4 KiB

View File

@@ -1,9 +1,9 @@
module.exports = {
clearMocks: true,
moduleFileExtensions: ['js', 'ts'],
testMatch: ['**/*.test.ts'],
moduleFileExtensions: ["js", "ts"],
testMatch: ["**/*.test.ts"],
transform: {
'^.+\\.ts$': 'ts-jest'
"^.+\\.ts$": "ts-jest",
},
verbose: true
}
verbose: true,
};

523
package-lock.json generated
View File

@@ -13,27 +13,27 @@
"@actions/core": "^1.10.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
"@actions/glob": "^0.4.0",
"@actions/glob": "^0.5.0",
"@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.1",
"@octokit/rest": "^21.0.2"
},
"devDependencies": {
"@types/node": "^20.14.9",
"@types/node": "^22.5.5",
"@types/semver": "^7.5.8",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/parser": "^7.18.0",
"@vercel/ncc": "^0.38.1",
"eslint": "^8.57.0",
"eslint-plugin-github": "^5.0.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^28.8.2",
"eslint-plugin-github": "^5.0.2",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-jest": "^28.8.3",
"eslint-plugin-prettier": "^5.2.1",
"jest": "^29.7.0",
"js-yaml": "^4.1.0",
"prettier": "^3.3.3",
"ts-jest": "^29.2.5",
"typescript": "^5.4.5"
"typescript": "^5.6.2"
}
},
"node_modules/@aashutoshrathi/word-wrap": {
@@ -108,9 +108,9 @@
}
},
"node_modules/@actions/glob": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.4.0.tgz",
"integrity": "sha512-+eKIGFhsFa4EBwaf/GMyzCdWrXWymGXfFmZU3FHQvYS8mPcHtTtZONbkcqqUMzw9mJ/pImEBFET1JNifhqGsAQ==",
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.5.0.tgz",
"integrity": "sha512-tST2rjPvJLRZLuT9NMUtyBjvj9Yo0MiJS3ow004slMvm8GFM+Zv9HvMJ7HWzfUyJnGrJvDsYkWBaaG3YKXRtCw==",
"dependencies": {
"@actions/core": "^1.9.1",
"minimatch": "^3.0.4"
@@ -1988,6 +1988,12 @@
"url": "https://opencollective.com/unts"
}
},
"node_modules/@rtsao/scc": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz",
"integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==",
"dev": true
},
"node_modules/@sinclair/typebox": {
"version": "0.27.8",
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
@@ -2093,11 +2099,11 @@
"dev": true
},
"node_modules/@types/node": {
"version": "20.14.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.9.tgz",
"integrity": "sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==",
"version": "22.5.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.5.tgz",
"integrity": "sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==",
"dependencies": {
"undici-types": "~5.26.4"
"undici-types": "~6.19.2"
}
},
"node_modules/@types/node-fetch": {
@@ -3702,9 +3708,9 @@
}
},
"node_modules/eslint-module-utils": {
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz",
"integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==",
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.9.0.tgz",
"integrity": "sha512-McVbYmwA3NEKwRQY5g4aWMdcZE5xZxV8i8l7CqJSrameuGSQJtSWaL/LxTEzSKKaCcOhlpDR8XEfYXWPrdo/ZQ==",
"dev": true,
"dependencies": {
"debug": "^3.2.7"
@@ -3774,14 +3780,14 @@
}
},
"node_modules/eslint-plugin-github": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-5.0.1.tgz",
"integrity": "sha512-qbXG3wL5Uh2JB92EKeX2hPtO9c/t75qVxQjVLYuTFfhHifLZzv9CBvLCvoaBhLrAC/xTMVht7DK/NofYK8X4Dg==",
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-5.0.2.tgz",
"integrity": "sha512-nMdzWJQ5CimjQDY6SFeJ0KIXuNFf0dgDWEd4eP3UWfuTuP/dXcZJDg7MQRvAFt743T1zUi4+/HdOihfu8xJkLA==",
"dev": true,
"dependencies": {
"@github/browserslist-config": "^1.0.0",
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.1",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"aria-query": "^5.3.0",
"eslint-config-prettier": ">=8.0.0",
"eslint-plugin-escompat": "^3.3.3",
@@ -3804,6 +3810,197 @@
"eslint": "^8.0.1"
}
},
"node_modules/eslint-plugin-github/node_modules/@typescript-eslint/eslint-plugin": {
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.5.0.tgz",
"integrity": "sha512-lHS5hvz33iUFQKuPFGheAB84LwcJ60G8vKnEhnfcK1l8kGVLro2SFYW6K0/tj8FUhRJ0VHyg1oAfg50QGbPPHw==",
"dev": true,
"dependencies": {
"@eslint-community/regexpp": "^4.10.0",
"@typescript-eslint/scope-manager": "8.5.0",
"@typescript-eslint/type-utils": "8.5.0",
"@typescript-eslint/utils": "8.5.0",
"@typescript-eslint/visitor-keys": "8.5.0",
"graphemer": "^1.4.0",
"ignore": "^5.3.1",
"natural-compare": "^1.4.0",
"ts-api-utils": "^1.3.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
"@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0",
"eslint": "^8.57.0 || ^9.0.0"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
}
},
"node_modules/eslint-plugin-github/node_modules/@typescript-eslint/parser": {
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.5.0.tgz",
"integrity": "sha512-gF77eNv0Xz2UJg/NbpWJ0kqAm35UMsvZf1GHj8D9MRFTj/V3tAciIWXfmPLsAAF/vUlpWPvUDyH1jjsr0cMVWw==",
"dev": true,
"dependencies": {
"@typescript-eslint/scope-manager": "8.5.0",
"@typescript-eslint/types": "8.5.0",
"@typescript-eslint/typescript-estree": "8.5.0",
"@typescript-eslint/visitor-keys": "8.5.0",
"debug": "^4.3.4"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
}
},
"node_modules/eslint-plugin-github/node_modules/@typescript-eslint/scope-manager": {
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.5.0.tgz",
"integrity": "sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "8.5.0",
"@typescript-eslint/visitor-keys": "8.5.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/eslint-plugin-github/node_modules/@typescript-eslint/type-utils": {
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.5.0.tgz",
"integrity": "sha512-N1K8Ix+lUM+cIDhL2uekVn/ZD7TZW+9/rwz8DclQpcQ9rk4sIL5CAlBC0CugWKREmDjBzI/kQqU4wkg46jWLYA==",
"dev": true,
"dependencies": {
"@typescript-eslint/typescript-estree": "8.5.0",
"@typescript-eslint/utils": "8.5.0",
"debug": "^4.3.4",
"ts-api-utils": "^1.3.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
}
},
"node_modules/eslint-plugin-github/node_modules/@typescript-eslint/types": {
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.5.0.tgz",
"integrity": "sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==",
"dev": true,
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/eslint-plugin-github/node_modules/@typescript-eslint/typescript-estree": {
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.5.0.tgz",
"integrity": "sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "8.5.0",
"@typescript-eslint/visitor-keys": "8.5.0",
"debug": "^4.3.4",
"fast-glob": "^3.3.2",
"is-glob": "^4.0.3",
"minimatch": "^9.0.4",
"semver": "^7.6.0",
"ts-api-utils": "^1.3.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
}
},
"node_modules/eslint-plugin-github/node_modules/@typescript-eslint/utils": {
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.5.0.tgz",
"integrity": "sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
"@typescript-eslint/scope-manager": "8.5.0",
"@typescript-eslint/types": "8.5.0",
"@typescript-eslint/typescript-estree": "8.5.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
"eslint": "^8.57.0 || ^9.0.0"
}
},
"node_modules/eslint-plugin-github/node_modules/@typescript-eslint/visitor-keys": {
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.5.0.tgz",
"integrity": "sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "8.5.0",
"eslint-visitor-keys": "^3.4.3"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/eslint-plugin-github/node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/eslint-plugin-github/node_modules/emoji-regex": {
"version": "9.2.2",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
@@ -3862,6 +4059,33 @@
"node": "*"
}
},
"node_modules/eslint-plugin-github/node_modules/minimatch": {
"version": "9.0.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
"integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
"dev": true,
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
"node": ">=16 || 14 >=14.17"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/eslint-plugin-github/node_modules/semver": {
"version": "7.6.3",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
"dev": true,
"bin": {
"semver": "bin/semver.js"
},
"engines": {
"node": ">=10"
}
},
"node_modules/eslint-plugin-i18n-text": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-i18n-text/-/eslint-plugin-i18n-text-1.0.1.tgz",
@@ -3872,26 +4096,27 @@
}
},
"node_modules/eslint-plugin-import": {
"version": "2.29.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz",
"integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==",
"version": "2.30.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.30.0.tgz",
"integrity": "sha512-/mHNE9jINJfiD2EKkg1BKyPyUk4zdnT54YgbOgfjSakWT5oyX/qQLVNTkehyfpcMxZXMy1zyonZ2v7hZTX43Yw==",
"dev": true,
"dependencies": {
"array-includes": "^3.1.7",
"array.prototype.findlastindex": "^1.2.3",
"@rtsao/scc": "^1.1.0",
"array-includes": "^3.1.8",
"array.prototype.findlastindex": "^1.2.5",
"array.prototype.flat": "^1.3.2",
"array.prototype.flatmap": "^1.3.2",
"debug": "^3.2.7",
"doctrine": "^2.1.0",
"eslint-import-resolver-node": "^0.3.9",
"eslint-module-utils": "^2.8.0",
"hasown": "^2.0.0",
"is-core-module": "^2.13.1",
"eslint-module-utils": "^2.9.0",
"hasown": "^2.0.2",
"is-core-module": "^2.15.1",
"is-glob": "^4.0.3",
"minimatch": "^3.1.2",
"object.fromentries": "^2.0.7",
"object.groupby": "^1.0.1",
"object.values": "^1.1.7",
"object.fromentries": "^2.0.8",
"object.groupby": "^1.0.3",
"object.values": "^1.2.0",
"semver": "^6.3.1",
"tsconfig-paths": "^3.15.0"
},
@@ -3912,9 +4137,9 @@
}
},
"node_modules/eslint-plugin-jest": {
"version": "28.8.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.8.2.tgz",
"integrity": "sha512-mC3OyklHmS5i7wYU1rGId9EnxRI8TVlnFG56AE+8U9iRy6zwaNygZR+DsdZuCL0gRG0wVeyzq+uWcPt6yJrrMA==",
"version": "28.8.3",
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.8.3.tgz",
"integrity": "sha512-HIQ3t9hASLKm2IhIOqnu+ifw7uLZkIlR7RYNv7fMcEi/p0CIiJmfriStQS2LDkgtY4nyLbIZAD+JL347Yc2ETQ==",
"dev": true,
"dependencies": {
"@typescript-eslint/utils": "^6.0.0 || ^7.0.0 || ^8.0.0"
@@ -4994,12 +5219,15 @@
}
},
"node_modules/is-core-module": {
"version": "2.13.1",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz",
"integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==",
"version": "2.15.1",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz",
"integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==",
"dev": true,
"dependencies": {
"hasown": "^2.0.0"
"hasown": "^2.0.2"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -7548,9 +7776,9 @@
}
},
"node_modules/typescript": {
"version": "5.4.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz",
"integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
"version": "5.6.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz",
"integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
@@ -7587,9 +7815,9 @@
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw=="
},
"node_modules/universal-user-agent": {
"version": "6.0.1",
@@ -7958,9 +8186,9 @@
}
},
"@actions/glob": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.4.0.tgz",
"integrity": "sha512-+eKIGFhsFa4EBwaf/GMyzCdWrXWymGXfFmZU3FHQvYS8mPcHtTtZONbkcqqUMzw9mJ/pImEBFET1JNifhqGsAQ==",
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/@actions/glob/-/glob-0.5.0.tgz",
"integrity": "sha512-tST2rjPvJLRZLuT9NMUtyBjvj9Yo0MiJS3ow004slMvm8GFM+Zv9HvMJ7HWzfUyJnGrJvDsYkWBaaG3YKXRtCw==",
"requires": {
"@actions/core": "^1.9.1",
"minimatch": "^3.0.4"
@@ -9446,6 +9674,12 @@
"integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==",
"dev": true
},
"@rtsao/scc": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz",
"integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==",
"dev": true
},
"@sinclair/typebox": {
"version": "0.27.8",
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
@@ -9551,11 +9785,11 @@
"dev": true
},
"@types/node": {
"version": "20.14.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.9.tgz",
"integrity": "sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==",
"version": "22.5.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.5.tgz",
"integrity": "sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==",
"requires": {
"undici-types": "~5.26.4"
"undici-types": "~6.19.2"
}
},
"@types/node-fetch": {
@@ -10775,9 +11009,9 @@
}
},
"eslint-module-utils": {
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz",
"integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==",
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.9.0.tgz",
"integrity": "sha512-McVbYmwA3NEKwRQY5g4aWMdcZE5xZxV8i8l7CqJSrameuGSQJtSWaL/LxTEzSKKaCcOhlpDR8XEfYXWPrdo/ZQ==",
"dev": true,
"requires": {
"debug": "^3.2.7"
@@ -10826,14 +11060,14 @@
}
},
"eslint-plugin-github": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-5.0.1.tgz",
"integrity": "sha512-qbXG3wL5Uh2JB92EKeX2hPtO9c/t75qVxQjVLYuTFfhHifLZzv9CBvLCvoaBhLrAC/xTMVht7DK/NofYK8X4Dg==",
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-github/-/eslint-plugin-github-5.0.2.tgz",
"integrity": "sha512-nMdzWJQ5CimjQDY6SFeJ0KIXuNFf0dgDWEd4eP3UWfuTuP/dXcZJDg7MQRvAFt743T1zUi4+/HdOihfu8xJkLA==",
"dev": true,
"requires": {
"@github/browserslist-config": "^1.0.0",
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.1",
"@typescript-eslint/eslint-plugin": "^8.0.0",
"@typescript-eslint/parser": "^8.0.0",
"aria-query": "^5.3.0",
"eslint-config-prettier": ">=8.0.0",
"eslint-plugin-escompat": "^3.3.3",
@@ -10850,6 +11084,111 @@
"svg-element-attributes": "^1.3.1"
},
"dependencies": {
"@typescript-eslint/eslint-plugin": {
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.5.0.tgz",
"integrity": "sha512-lHS5hvz33iUFQKuPFGheAB84LwcJ60G8vKnEhnfcK1l8kGVLro2SFYW6K0/tj8FUhRJ0VHyg1oAfg50QGbPPHw==",
"dev": true,
"requires": {
"@eslint-community/regexpp": "^4.10.0",
"@typescript-eslint/scope-manager": "8.5.0",
"@typescript-eslint/type-utils": "8.5.0",
"@typescript-eslint/utils": "8.5.0",
"@typescript-eslint/visitor-keys": "8.5.0",
"graphemer": "^1.4.0",
"ignore": "^5.3.1",
"natural-compare": "^1.4.0",
"ts-api-utils": "^1.3.0"
}
},
"@typescript-eslint/parser": {
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.5.0.tgz",
"integrity": "sha512-gF77eNv0Xz2UJg/NbpWJ0kqAm35UMsvZf1GHj8D9MRFTj/V3tAciIWXfmPLsAAF/vUlpWPvUDyH1jjsr0cMVWw==",
"dev": true,
"requires": {
"@typescript-eslint/scope-manager": "8.5.0",
"@typescript-eslint/types": "8.5.0",
"@typescript-eslint/typescript-estree": "8.5.0",
"@typescript-eslint/visitor-keys": "8.5.0",
"debug": "^4.3.4"
}
},
"@typescript-eslint/scope-manager": {
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.5.0.tgz",
"integrity": "sha512-06JOQ9Qgj33yvBEx6tpC8ecP9o860rsR22hWMEd12WcTRrfaFgHr2RB/CA/B+7BMhHkXT4chg2MyboGdFGawYg==",
"dev": true,
"requires": {
"@typescript-eslint/types": "8.5.0",
"@typescript-eslint/visitor-keys": "8.5.0"
}
},
"@typescript-eslint/type-utils": {
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.5.0.tgz",
"integrity": "sha512-N1K8Ix+lUM+cIDhL2uekVn/ZD7TZW+9/rwz8DclQpcQ9rk4sIL5CAlBC0CugWKREmDjBzI/kQqU4wkg46jWLYA==",
"dev": true,
"requires": {
"@typescript-eslint/typescript-estree": "8.5.0",
"@typescript-eslint/utils": "8.5.0",
"debug": "^4.3.4",
"ts-api-utils": "^1.3.0"
}
},
"@typescript-eslint/types": {
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.5.0.tgz",
"integrity": "sha512-qjkormnQS5wF9pjSi6q60bKUHH44j2APxfh9TQRXK8wbYVeDYYdYJGIROL87LGZZ2gz3Rbmjc736qyL8deVtdw==",
"dev": true
},
"@typescript-eslint/typescript-estree": {
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.5.0.tgz",
"integrity": "sha512-vEG2Sf9P8BPQ+d0pxdfndw3xIXaoSjliG0/Ejk7UggByZPKXmJmw3GW5jV2gHNQNawBUyfahoSiCFVov0Ruf7Q==",
"dev": true,
"requires": {
"@typescript-eslint/types": "8.5.0",
"@typescript-eslint/visitor-keys": "8.5.0",
"debug": "^4.3.4",
"fast-glob": "^3.3.2",
"is-glob": "^4.0.3",
"minimatch": "^9.0.4",
"semver": "^7.6.0",
"ts-api-utils": "^1.3.0"
}
},
"@typescript-eslint/utils": {
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.5.0.tgz",
"integrity": "sha512-6yyGYVL0e+VzGYp60wvkBHiqDWOpT63pdMV2CVG4LVDd5uR6q1qQN/7LafBZtAtNIn/mqXjsSeS5ggv/P0iECw==",
"dev": true,
"requires": {
"@eslint-community/eslint-utils": "^4.4.0",
"@typescript-eslint/scope-manager": "8.5.0",
"@typescript-eslint/types": "8.5.0",
"@typescript-eslint/typescript-estree": "8.5.0"
}
},
"@typescript-eslint/visitor-keys": {
"version": "8.5.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.5.0.tgz",
"integrity": "sha512-yTPqMnbAZJNy2Xq2XU8AdtOW9tJIr+UQb64aXB9f3B1498Zx9JorVgFJcZpEc9UBuCCrdzKID2RGAMkYcDtZOw==",
"dev": true,
"requires": {
"@typescript-eslint/types": "8.5.0",
"eslint-visitor-keys": "^3.4.3"
}
},
"brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0"
}
},
"emoji-regex": {
"version": "9.2.2",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
@@ -10900,6 +11239,21 @@
}
}
}
},
"minimatch": {
"version": "9.0.5",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
"integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
"dev": true,
"requires": {
"brace-expansion": "^2.0.1"
}
},
"semver": {
"version": "7.6.3",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz",
"integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==",
"dev": true
}
}
},
@@ -10911,26 +11265,27 @@
"requires": {}
},
"eslint-plugin-import": {
"version": "2.29.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz",
"integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==",
"version": "2.30.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.30.0.tgz",
"integrity": "sha512-/mHNE9jINJfiD2EKkg1BKyPyUk4zdnT54YgbOgfjSakWT5oyX/qQLVNTkehyfpcMxZXMy1zyonZ2v7hZTX43Yw==",
"dev": true,
"requires": {
"array-includes": "^3.1.7",
"array.prototype.findlastindex": "^1.2.3",
"@rtsao/scc": "^1.1.0",
"array-includes": "^3.1.8",
"array.prototype.findlastindex": "^1.2.5",
"array.prototype.flat": "^1.3.2",
"array.prototype.flatmap": "^1.3.2",
"debug": "^3.2.7",
"doctrine": "^2.1.0",
"eslint-import-resolver-node": "^0.3.9",
"eslint-module-utils": "^2.8.0",
"hasown": "^2.0.0",
"is-core-module": "^2.13.1",
"eslint-module-utils": "^2.9.0",
"hasown": "^2.0.2",
"is-core-module": "^2.15.1",
"is-glob": "^4.0.3",
"minimatch": "^3.1.2",
"object.fromentries": "^2.0.7",
"object.groupby": "^1.0.1",
"object.values": "^1.1.7",
"object.fromentries": "^2.0.8",
"object.groupby": "^1.0.3",
"object.values": "^1.2.0",
"semver": "^6.3.1",
"tsconfig-paths": "^3.15.0"
},
@@ -10947,9 +11302,9 @@
}
},
"eslint-plugin-jest": {
"version": "28.8.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.8.2.tgz",
"integrity": "sha512-mC3OyklHmS5i7wYU1rGId9EnxRI8TVlnFG56AE+8U9iRy6zwaNygZR+DsdZuCL0gRG0wVeyzq+uWcPt6yJrrMA==",
"version": "28.8.3",
"resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.8.3.tgz",
"integrity": "sha512-HIQ3t9hASLKm2IhIOqnu+ifw7uLZkIlR7RYNv7fMcEi/p0CIiJmfriStQS2LDkgtY4nyLbIZAD+JL347Yc2ETQ==",
"dev": true,
"requires": {
"@typescript-eslint/utils": "^6.0.0 || ^7.0.0 || ^8.0.0"
@@ -11616,12 +11971,12 @@
"dev": true
},
"is-core-module": {
"version": "2.13.1",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz",
"integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==",
"version": "2.15.1",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz",
"integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==",
"dev": true,
"requires": {
"hasown": "^2.0.0"
"hasown": "^2.0.2"
}
},
"is-data-view": {
@@ -13455,9 +13810,9 @@
}
},
"typescript": {
"version": "5.4.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz",
"integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==",
"version": "5.6.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz",
"integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==",
"dev": true
},
"unbox-primitive": {
@@ -13481,9 +13836,9 @@
}
},
"undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw=="
},
"universal-user-agent": {
"version": "6.0.1",

View File

@@ -6,18 +6,18 @@
"main": "dist/index.js",
"scripts": {
"build": "tsc",
"format": "prettier --write '**/*.ts'",
"format-check": "prettier --check '**/*.ts'",
"format": "prettier --write .",
"format-check": "prettier --check .",
"lint": "eslint src/**/*.ts --fix",
"package": "ncc build -o dist/setup src/setup-uv.ts && ncc build -o dist/save-cache src/save-cache.ts && ncc build -o dist/update-default-version src/update-default-version.ts",
"package": "ncc build -o dist/setup src/setup-uv.ts && ncc build -o dist/save-cache src/save-cache.ts && ncc build -o dist/update-known-checksums src/update-known-checksums.ts",
"test": "jest",
"act": "act pull_request -W .github/workflows/test.yml --container-architecture linux/amd64 -s GITHUB_TOKEN=\"$(gh auth token)\"",
"update-default-version": "node dist/update-default-version/index.js src/download/checksum/known-checksums.ts action.yml \"$(gh auth token)\"",
"update-known-checksums": "node dist/update-known-checksums/index.js src/download/checksum/known-checksums.ts \"$(gh auth token)\"",
"all": "npm run build && npm run format && npm run lint && npm run package && npm test"
},
"repository": {
"type": "git",
"url": "git+https://github.com/eifinger/setup-uv.git"
"url": "git+https://github.com/astral-sh/setup-uv.git"
},
"keywords": [
"actions",
@@ -32,26 +32,26 @@
"@actions/core": "^1.10.1",
"@actions/exec": "^1.1.1",
"@actions/github": "^6.0.0",
"@actions/glob": "^0.4.0",
"@actions/glob": "^0.5.0",
"@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.1",
"@octokit/rest": "^21.0.2"
},
"devDependencies": {
"@types/node": "^20.14.9",
"@types/node": "^22.5.5",
"@types/semver": "^7.5.8",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/parser": "^7.18.0",
"@vercel/ncc": "^0.38.1",
"eslint": "^8.57.0",
"eslint-plugin-github": "^5.0.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^28.8.2",
"eslint-plugin-github": "^5.0.2",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-jest": "^28.8.3",
"eslint-plugin-prettier": "^5.2.1",
"jest": "^29.7.0",
"js-yaml": "^4.1.0",
"prettier": "^3.3.3",
"ts-jest": "^29.2.5",
"typescript": "^5.4.5"
"typescript": "^5.6.2"
}
}

View File

@@ -1,65 +1,75 @@
import * as cache from '@actions/cache'
import * as glob from '@actions/glob'
import * as core from '@actions/core'
import path from 'path'
import {cacheDependencyGlob, cacheLocalPath, cacheSuffix} from '../utils/inputs'
import {getArch, getPlatform} from '../utils/platforms'
import * as cache from "@actions/cache";
import * as glob from "@actions/glob";
import * as core from "@actions/core";
import {
cacheDependencyGlob,
cacheLocalPath,
cacheSuffix,
} from "../utils/inputs";
import { getArch, getPlatform } from "../utils/platforms";
export const STATE_CACHE_KEY = 'cache-key'
export const STATE_CACHE_MATCHED_KEY = 'cache-matched-key'
const CACHE_VERSION = '1'
export const STATE_CACHE_KEY = "cache-key";
export const STATE_CACHE_MATCHED_KEY = "cache-matched-key";
const CACHE_VERSION = "1";
export async function restoreCache(version: string): Promise<void> {
const cacheKey = await computeKeys(version)
const cacheKey = await computeKeys(version);
let matchedKey: string | undefined
let matchedKey: string | undefined;
core.info(
`Trying to restore uv cache from GitHub Actions cache with key: ${cacheKey}`
)
`Trying to restore uv cache from GitHub Actions cache with key: ${cacheKey}`,
);
try {
matchedKey = await cache.restoreCache([cacheLocalPath], cacheKey)
matchedKey = await cache.restoreCache([cacheLocalPath], cacheKey);
} catch (err) {
const message = (err as Error).message
core.warning(message)
core.setOutput('cache-hit', false)
return
const message = (err as Error).message;
core.warning(message);
core.setOutput("cache-hit", false);
return;
}
core.saveState(STATE_CACHE_KEY, cacheKey)
core.saveState(STATE_CACHE_KEY, cacheKey);
handleMatchResult(matchedKey, cacheKey)
handleMatchResult(matchedKey, cacheKey);
}
async function computeKeys(version: string): Promise<string> {
let cacheDependencyPathHash = '-'
if (cacheDependencyGlob !== '') {
const fullCacheDependencyGlob = `${process.env['GITHUB_WORKSPACE']}${path.sep}${cacheDependencyGlob}`
cacheDependencyPathHash += await glob.hashFiles(fullCacheDependencyGlob)
if (cacheDependencyPathHash === '-') {
let cacheDependencyPathHash = "-";
if (cacheDependencyGlob !== "") {
core.info(
`Searching files using cache dependency glob: ${cacheDependencyGlob.split("\n").join(",")}`,
);
cacheDependencyPathHash += await glob.hashFiles(
cacheDependencyGlob,
undefined,
undefined,
true,
);
if (cacheDependencyPathHash === "-") {
throw new Error(
`No file in ${process.cwd()} matched to [${cacheDependencyGlob}], make sure you have checked out the target repository`
)
`No file in ${process.cwd()} matched to [${cacheDependencyGlob.split("\n").join(",")}], make sure you have checked out the target repository`,
);
}
} else {
cacheDependencyPathHash += 'no-dependency-glob'
cacheDependencyPathHash += "no-dependency-glob";
}
const suffix = cacheSuffix ? `-${cacheSuffix}` : ''
return `setup-uv-${CACHE_VERSION}-${getArch()}-${getPlatform()}-${version}${cacheDependencyPathHash}${suffix}`
const suffix = cacheSuffix ? `-${cacheSuffix}` : "";
return `setup-uv-${CACHE_VERSION}-${getArch()}-${getPlatform()}-${version}${cacheDependencyPathHash}${suffix}`;
}
function handleMatchResult(
matchedKey: string | undefined,
primaryKey: string
primaryKey: string,
): void {
if (!matchedKey) {
core.info(`No GitHub Actions cache found for key: ${primaryKey}`)
core.setOutput('cache-hit', false)
return
core.info(`No GitHub Actions cache found for key: ${primaryKey}`);
core.setOutput("cache-hit", false);
return;
}
core.saveState(STATE_CACHE_MATCHED_KEY, matchedKey)
core.saveState(STATE_CACHE_MATCHED_KEY, matchedKey);
core.info(
`uv cache restored from GitHub Actions cache with key: ${matchedKey}`
)
core.setOutput('cache-hit', true)
`uv cache restored from GitHub Actions cache with key: ${matchedKey}`,
);
core.setOutput("cache-hit", true);
}

View File

@@ -1,55 +1,55 @@
import * as fs from 'fs'
import * as crypto from 'crypto'
import * as fs from "fs";
import * as crypto from "crypto";
import * as core from '@actions/core'
import {KNOWN_CHECKSUMS} from './known-checksums'
import {Architecture, Platform} from '../../utils/platforms'
import * as core from "@actions/core";
import { KNOWN_CHECKSUMS } from "./known-checksums";
import { Architecture, Platform } from "../../utils/platforms";
export async function validateChecksum(
checkSum: string | undefined,
downloadPath: string,
arch: Architecture,
platform: Platform,
version: string
version: string,
): Promise<void> {
let isValid = true
if (checkSum !== undefined && checkSum !== '') {
isValid = await validateFileCheckSum(downloadPath, checkSum)
let isValid = true;
if (checkSum !== undefined && checkSum !== "") {
isValid = await validateFileCheckSum(downloadPath, checkSum);
} else {
core.debug(`Checksum not provided. Checking known checksums.`)
const key = `${arch}-${platform}-${version}`
core.debug(`Checksum not provided. Checking known checksums.`);
const key = `${arch}-${platform}-${version}`;
if (key in KNOWN_CHECKSUMS) {
const knownChecksum = KNOWN_CHECKSUMS[`${arch}-${platform}-${version}`]
core.debug(`Checking checksum for ${arch}-${platform}-${version}.`)
isValid = await validateFileCheckSum(downloadPath, knownChecksum)
const knownChecksum = KNOWN_CHECKSUMS[`${arch}-${platform}-${version}`];
core.debug(`Checking checksum for ${arch}-${platform}-${version}.`);
isValid = await validateFileCheckSum(downloadPath, knownChecksum);
} else {
core.debug(`No known checksum found for ${key}.`)
core.debug(`No known checksum found for ${key}.`);
}
}
if (!isValid) {
throw new Error(`Checksum for ${downloadPath} did not match ${checkSum}.`)
throw new Error(`Checksum for ${downloadPath} did not match ${checkSum}.`);
}
core.debug(`Checksum for ${downloadPath} is valid.`)
core.debug(`Checksum for ${downloadPath} is valid.`);
}
async function validateFileCheckSum(
filePath: string,
expected: string
expected: string,
): Promise<boolean> {
return new Promise((resolve, reject) => {
const hash = crypto.createHash('sha256')
const stream = fs.createReadStream(filePath)
stream.on('error', err => reject(err))
stream.on('data', chunk => hash.update(chunk))
stream.on('end', () => {
const actual = hash.digest('hex')
resolve(actual === expected)
})
})
const hash = crypto.createHash("sha256");
const stream = fs.createReadStream(filePath);
stream.on("error", (err) => reject(err));
stream.on("data", (chunk) => hash.update(chunk));
stream.on("end", () => {
const actual = hash.digest("hex");
resolve(actual === expected);
});
});
}
export function isknownVersion(version: string): boolean {
const pattern = new RegExp(`^.*-.*-${version}$`)
return Object.keys(KNOWN_CHECKSUMS).some(key => pattern.test(key))
const pattern = new RegExp(`^.*-.*-${version}$`);
return Object.keys(KNOWN_CHECKSUMS).some((key) => pattern.test(key));
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,39 +1,39 @@
import {promises as fs} from 'fs'
import * as tc from '@actions/tool-cache'
import { promises as fs } from "fs";
import * as tc from "@actions/tool-cache";
export async function updateChecksums(
filePath: string,
downloadUrls: string[]
downloadUrls: string[],
): Promise<void> {
await fs.rm(filePath)
await fs.rm(filePath);
await fs.appendFile(
filePath,
'// AUTOGENERATED_DO_NOT_EDIT\nexport const KNOWN_CHECKSUMS: {[key: string]: string} = {\n'
)
let firstLine = true
"// AUTOGENERATED_DO_NOT_EDIT\nexport const KNOWN_CHECKSUMS: {[key: string]: string} = {\n",
);
let firstLine = true;
for (const downloadUrl of downloadUrls) {
const content = await downloadAssetContent(downloadUrl)
const checksum = content.split(' ')[0].trim()
const key = getKey(downloadUrl)
const content = await downloadAssetContent(downloadUrl);
const checksum = content.split(" ")[0].trim();
const key = getKey(downloadUrl);
if (!firstLine) {
await fs.appendFile(filePath, ',\n')
await fs.appendFile(filePath, ",\n");
}
await fs.appendFile(filePath, ` '${key}':\n '${checksum}'`)
firstLine = false
await fs.appendFile(filePath, ` '${key}':\n '${checksum}'`);
firstLine = false;
}
await fs.appendFile(filePath, '}\n')
await fs.appendFile(filePath, "}\n");
}
function getKey(downloadUrl: string): string {
// https://github.com/astral-sh/uv/releases/download/0.3.2/uv-aarch64-apple-darwin.tar.gz.sha256
const parts = downloadUrl.split('/')
const fileName = parts[parts.length - 1]
const name = fileName.split('.')[0].split('uv-')[1]
const version = parts[parts.length - 2]
return `${name}-${version}`
const parts = downloadUrl.split("/");
const fileName = parts[parts.length - 1];
const name = fileName.split(".")[0].split("uv-")[1];
const version = parts[parts.length - 2];
return `${name}-${version}`;
}
async function downloadAssetContent(downloadUrl: string): Promise<string> {
const downloadPath = await tc.downloadTool(downloadUrl)
const content = await fs.readFile(downloadPath, 'utf8')
return content
const downloadPath = await tc.downloadTool(downloadUrl);
const content = await fs.readFile(downloadPath, "utf8");
return content;
}

View File

@@ -1,47 +1,52 @@
import * as core from '@actions/core'
import * as tc from '@actions/tool-cache'
import * as exec from '@actions/exec'
import * as path from 'path'
import {Architecture, Platform} from '../utils/platforms'
import {validateChecksum} from './checksum/checksum'
import {OWNER, REPO, TOOL_CACHE_NAME} from '../utils/utils'
import * as core from "@actions/core";
import * as tc from "@actions/tool-cache";
import * as exec from "@actions/exec";
import * as path from "path";
import { Architecture, Platform } from "../utils/platforms";
import { validateChecksum } from "./checksum/checksum";
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
export async function downloadLatest(
platform: Platform,
arch: Architecture,
checkSum: string | undefined,
githubToken: string | undefined
): Promise<{cachedToolDir: string; version: string}> {
const artifact = `uv-${arch}-${platform}`
let downloadUrl = `https://github.com/${OWNER}/${REPO}/releases/latest/download/${artifact}`
if (platform === 'pc-windows-msvc') {
downloadUrl += '.zip'
githubToken: string | undefined,
): Promise<{ cachedToolDir: string; version: string }> {
const artifact = `uv-${arch}-${platform}`;
let downloadUrl = `https://github.com/${OWNER}/${REPO}/releases/latest/download/${artifact}`;
if (platform === "pc-windows-msvc") {
downloadUrl += ".zip";
} else {
downloadUrl += '.tar.gz'
downloadUrl += ".tar.gz";
}
core.info(`Downloading uv from "${downloadUrl}" ...`)
core.info(`Downloading uv from "${downloadUrl}" ...`);
const downloadPath = await tc.downloadTool(
downloadUrl,
undefined,
githubToken
)
let uvExecutablePath: string
let uvDir: string
if (platform === 'pc-windows-msvc') {
uvDir = await tc.extractZip(downloadPath)
githubToken,
);
let uvExecutablePath: string;
let uvDir: string;
if (platform === "pc-windows-msvc") {
uvDir = await tc.extractZip(downloadPath);
// On windows extracting the zip does not create an intermediate directory
uvExecutablePath = path.join(uvDir, 'uv.exe')
uvExecutablePath = path.join(uvDir, "uv.exe");
} else {
const extractedDir = await tc.extractTar(downloadPath)
uvDir = path.join(extractedDir, artifact)
uvExecutablePath = path.join(uvDir, 'uv')
const extractedDir = await tc.extractTar(downloadPath);
uvDir = path.join(extractedDir, artifact);
uvExecutablePath = path.join(uvDir, "uv");
}
const version = await getVersion(uvExecutablePath)
await validateChecksum(checkSum, downloadPath, arch, platform, version)
const cachedToolDir = await tc.cacheDir(uvDir, TOOL_CACHE_NAME, version, arch)
const version = await getVersion(uvExecutablePath);
await validateChecksum(checkSum, downloadPath, arch, platform, version);
const cachedToolDir = await tc.cacheDir(
uvDir,
TOOL_CACHE_NAME,
version,
arch,
);
return {cachedToolDir, version}
return { cachedToolDir, version };
}
async function getVersion(uvExecutablePath: string): Promise<string> {
@@ -50,17 +55,17 @@ async function getVersion(uvExecutablePath: string): Promise<string> {
// uv 0.3.1 (be17d132a 2024-08-21)
const options: exec.ExecOptions = {
silent: !core.isDebug()
}
const execArgs = ['--version']
silent: !core.isDebug(),
};
const execArgs = ["--version"];
let output = ''
let output = "";
options.listeners = {
stdout: (data: Buffer) => {
output += data.toString()
}
}
await exec.exec(uvExecutablePath, execArgs, options)
const parts = output.split(' ')
return parts[1]
output += data.toString();
},
};
await exec.exec(uvExecutablePath, execArgs, options);
const parts = output.split(" ");
return parts[1];
}

View File

@@ -1,18 +1,18 @@
import * as core from '@actions/core'
import * as tc from '@actions/tool-cache'
import * as path from 'path'
import {OWNER, REPO, TOOL_CACHE_NAME} from '../utils/utils'
import {Architecture, Platform} from '../utils/platforms'
import {validateChecksum} from './checksum/checksum'
import * as core from "@actions/core";
import * as tc from "@actions/tool-cache";
import * as path from "path";
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
import { Architecture, Platform } from "../utils/platforms";
import { validateChecksum } from "./checksum/checksum";
export function tryGetFromToolCache(
arch: Architecture,
version: string
version: string,
): string | undefined {
core.debug(`Trying to get uv from tool cache for ${version}...`)
const cachedVersions = tc.findAllVersions(TOOL_CACHE_NAME, arch)
core.debug(`Cached versions: ${cachedVersions}`)
return tc.find(TOOL_CACHE_NAME, version, arch)
core.debug(`Trying to get uv from tool cache for ${version}...`);
const cachedVersions = tc.findAllVersions(TOOL_CACHE_NAME, arch);
core.debug(`Cached versions: ${cachedVersions}`);
return tc.find(TOOL_CACHE_NAME, version, arch);
}
export async function downloadVersion(
@@ -20,32 +20,32 @@ export async function downloadVersion(
arch: Architecture,
version: string,
checkSum: string | undefined,
githubToken: string | undefined
githubToken: string | undefined,
): Promise<string> {
const artifact = `uv-${arch}-${platform}`
let downloadUrl = `https://github.com/${OWNER}/${REPO}/releases/download/${version}/${artifact}`
if (platform === 'pc-windows-msvc') {
downloadUrl += '.zip'
const artifact = `uv-${arch}-${platform}`;
let downloadUrl = `https://github.com/${OWNER}/${REPO}/releases/download/${version}/${artifact}`;
if (platform === "pc-windows-msvc") {
downloadUrl += ".zip";
} else {
downloadUrl += '.tar.gz'
downloadUrl += ".tar.gz";
}
core.info(`Downloading uv from "${downloadUrl}" ...`)
core.info(`Downloading uv from "${downloadUrl}" ...`);
const downloadPath = await tc.downloadTool(
downloadUrl,
undefined,
githubToken
)
await validateChecksum(checkSum, downloadPath, arch, platform, version)
githubToken,
);
await validateChecksum(checkSum, downloadPath, arch, platform, version);
let uvDir: string
if (platform === 'pc-windows-msvc') {
uvDir = await tc.extractZip(downloadPath)
let uvDir: string;
if (platform === "pc-windows-msvc") {
uvDir = await tc.extractZip(downloadPath);
// On windows extracting the zip does not create an intermediate directory
} else {
const extractedDir = await tc.extractTar(downloadPath)
uvDir = path.join(extractedDir, artifact)
const extractedDir = await tc.extractTar(downloadPath);
uvDir = path.join(extractedDir, artifact);
}
return await tc.cacheDir(uvDir, TOOL_CACHE_NAME, version, arch)
return await tc.cacheDir(uvDir, TOOL_CACHE_NAME, version, arch);
}

View File

@@ -1,49 +1,52 @@
import * as cache from '@actions/cache'
import * as core from '@actions/core'
import * as exec from '@actions/exec'
import {STATE_CACHE_MATCHED_KEY, STATE_CACHE_KEY} from './cache/restore-cache'
import {cacheLocalPath, enableCache} from './utils/inputs'
import * as cache from "@actions/cache";
import * as core from "@actions/core";
import * as exec from "@actions/exec";
import {
STATE_CACHE_MATCHED_KEY,
STATE_CACHE_KEY,
} from "./cache/restore-cache";
import { cacheLocalPath, enableCache } from "./utils/inputs";
export async function run(): Promise<void> {
try {
if (enableCache) {
await saveCache()
await saveCache();
}
} catch (error) {
const err = error as Error
core.setFailed(err.message)
const err = error as Error;
core.setFailed(err.message);
}
process.exit(0)
process.exit(0);
}
async function saveCache(): Promise<void> {
const cacheKey = core.getState(STATE_CACHE_KEY)
const matchedKey = core.getState(STATE_CACHE_MATCHED_KEY)
const cacheKey = core.getState(STATE_CACHE_KEY);
const matchedKey = core.getState(STATE_CACHE_MATCHED_KEY);
if (!cacheKey) {
core.warning('Error retrieving cache key from state.')
return
core.warning("Error retrieving cache key from state.");
return;
} else if (matchedKey === cacheKey) {
core.info(`Cache hit occurred on key ${cacheKey}, not saving cache.`)
return
core.info(`Cache hit occurred on key ${cacheKey}, not saving cache.`);
return;
}
await pruneCache()
await pruneCache();
core.info(`Saving cache path: ${cacheLocalPath}`)
await cache.saveCache([cacheLocalPath], cacheKey)
core.info(`Saving cache path: ${cacheLocalPath}`);
await cache.saveCache([cacheLocalPath], cacheKey);
core.info(`cache saved with the key: ${cacheKey}`)
core.info(`cache saved with the key: ${cacheKey}`);
}
async function pruneCache(): Promise<void> {
const options: exec.ExecOptions = {
silent: !core.isDebug()
}
const execArgs = ['cache', 'prune', '--ci']
silent: !core.isDebug(),
};
const execArgs = ["cache", "prune", "--ci"];
core.info('Pruning cache...')
await exec.exec('uv', execArgs, options)
core.info("Pruning cache...");
await exec.exec("uv", execArgs, options);
}
run()
run();

View File

@@ -1,51 +1,59 @@
import * as core from '@actions/core'
import * as path from 'path'
import {downloadVersion, tryGetFromToolCache} from './download/download-version'
import {restoreCache} from './cache/restore-cache'
import * as core from "@actions/core";
import * as path from "path";
import {
downloadVersion,
tryGetFromToolCache,
} from "./download/download-version";
import { restoreCache } from "./cache/restore-cache";
import {downloadLatest} from './download/download-latest'
import {Architecture, getArch, getPlatform, Platform} from './utils/platforms'
import { downloadLatest } from "./download/download-latest";
import {
Architecture,
getArch,
getPlatform,
Platform,
} from "./utils/platforms";
import {
cacheLocalPath,
checkSum,
enableCache,
githubToken,
version
} from './utils/inputs'
version,
} from "./utils/inputs";
async function run(): Promise<void> {
const platform = getPlatform()
const arch = getArch()
const platform = getPlatform();
const arch = getArch();
try {
if (platform === undefined) {
throw new Error(`Unsupported platform: ${process.platform}`)
throw new Error(`Unsupported platform: ${process.platform}`);
}
if (arch === undefined) {
throw new Error(`Unsupported architecture: ${process.arch}`)
throw new Error(`Unsupported architecture: ${process.arch}`);
}
const setupResult = await setupUv(
platform,
arch,
version,
checkSum,
githubToken
)
githubToken,
);
addUvToPath(setupResult.uvDir)
core.setOutput('uv-version', version)
core.info(`Successfully installed uv version ${version}`)
addUvToPath(setupResult.uvDir);
core.setOutput("uv-version", version);
core.info(`Successfully installed uv version ${version}`);
addMatchers()
setCacheDir(cacheLocalPath)
addMatchers();
setCacheDir(cacheLocalPath);
if (enableCache) {
await restoreCache(setupResult.version)
await restoreCache(setupResult.version);
}
} catch (err) {
core.setFailed((err as Error).message)
core.setFailed((err as Error).message);
}
process.exit(0)
process.exit(0);
}
async function setupUv(
@@ -53,47 +61,47 @@ async function setupUv(
arch: Architecture,
versionInput: string,
checkSum: string | undefined,
githubToken: string | undefined
): Promise<{uvDir: string; version: string}> {
let installedPath: string | undefined
let cachedToolDir: string
let version: string
if (versionInput === 'latest') {
const result = await downloadLatest(platform, arch, checkSum, githubToken)
version = result.version
cachedToolDir = result.cachedToolDir
githubToken: string | undefined,
): Promise<{ uvDir: string; version: string }> {
let installedPath: string | undefined;
let cachedToolDir: string;
let version: string;
if (versionInput === "latest") {
const result = await downloadLatest(platform, arch, checkSum, githubToken);
version = result.version;
cachedToolDir = result.cachedToolDir;
} else {
version = versionInput
installedPath = tryGetFromToolCache(arch, versionInput)
version = versionInput;
installedPath = tryGetFromToolCache(arch, versionInput);
if (installedPath) {
core.info(`Found uv in tool-cache for ${versionInput}`)
return {uvDir: installedPath, version}
core.info(`Found uv in tool-cache for ${versionInput}`);
return { uvDir: installedPath, version };
}
cachedToolDir = await downloadVersion(
platform,
arch,
versionInput,
checkSum,
githubToken
)
githubToken,
);
}
return {uvDir: cachedToolDir, version}
return { uvDir: cachedToolDir, version };
}
function addUvToPath(cachedPath: string): void {
core.addPath(cachedPath)
core.info(`Added ${cachedPath} to the path`)
core.addPath(cachedPath);
core.info(`Added ${cachedPath} to the path`);
}
function setCacheDir(cacheLocalPath: string): void {
core.exportVariable('UV_CACHE_DIR', cacheLocalPath)
core.info(`Set UV_CACHE_DIR to ${cacheLocalPath}`)
core.exportVariable("UV_CACHE_DIR", cacheLocalPath);
core.info(`Set UV_CACHE_DIR to ${cacheLocalPath}`);
}
function addMatchers(): void {
const matchersPath = path.join(__dirname, `..${path.sep}..`, '.github')
core.info(`##[add-matcher]${path.join(matchersPath, 'python.json')}`)
const matchersPath = path.join(__dirname, `..${path.sep}..`, ".github");
core.info(`##[add-matcher]${path.join(matchersPath, "python.json")}`);
}
run()
run();

View File

@@ -1,65 +0,0 @@
import * as github from '@actions/github'
import * as core from '@actions/core'
import {OWNER, REPO} from './utils/utils'
import {createReadStream, promises as fs} from 'fs'
import * as readline from 'readline'
import * as semver from 'semver'
import {updateChecksums} from './download/checksum/update-known-checksums'
async function run(): Promise<void> {
const checksumFilePath = process.argv.slice(2)[0]
const defaultVersionFilePath = process.argv.slice(2)[1]
const github_token = process.argv.slice(2)[2]
const octokit = github.getOctokit(github_token)
const response = await octokit.paginate(octokit.rest.repos.listReleases, {
owner: OWNER,
repo: REPO
})
const downloadUrls: string[] = response.flatMap(release =>
release.assets
.filter(asset => asset.name.endsWith('.sha256'))
.map(asset => asset.browser_download_url)
)
await updateChecksums(checksumFilePath, downloadUrls)
const latestVersion = response
.map(release => release.tag_name)
.sort(semver.rcompare)[0]
core.setOutput('latest-version', latestVersion)
await updateDefaultVersion(defaultVersionFilePath, latestVersion)
}
async function updateDefaultVersion(
filePath: string,
latestVersion: string
): Promise<void> {
const fileStream = createReadStream(filePath)
const rl = readline.createInterface({
input: fileStream
})
let foundDescription = false
const lines = []
for await (let line of rl) {
if (
!foundDescription &&
line.includes("description: 'The version of uv to install'")
) {
foundDescription = true
} else if (foundDescription && line.includes('default: ')) {
line = line.replace(/'[^']*'/, `'${latestVersion}'`)
foundDescription = false
}
lines.push(line)
}
await fs.writeFile(filePath, lines.join('\n'))
}
run()

View File

@@ -0,0 +1,32 @@
import * as github from "@actions/github";
import * as core from "@actions/core";
import { OWNER, REPO } from "./utils/constants";
import * as semver from "semver";
import { updateChecksums } from "./download/checksum/update-known-checksums";
async function run(): Promise<void> {
const checksumFilePath = process.argv.slice(2)[0];
const github_token = process.argv.slice(2)[1];
const octokit = github.getOctokit(github_token);
const response = await octokit.paginate(octokit.rest.repos.listReleases, {
owner: OWNER,
repo: REPO,
});
const downloadUrls: string[] = response.flatMap((release) =>
release.assets
.filter((asset) => asset.name.endsWith(".sha256"))
.map((asset) => asset.browser_download_url),
);
await updateChecksums(checksumFilePath, downloadUrls);
const latestVersion = response
.map((release) => release.tag_name)
.sort(semver.rcompare)[0];
core.setOutput("latest-version", latestVersion);
}
run();

3
src/utils/constants.ts Normal file
View File

@@ -0,0 +1,3 @@
export const REPO = "uv";
export const OWNER = "astral-sh";
export const TOOL_CACHE_NAME = "uv";

View File

@@ -1,9 +1,24 @@
import * as core from '@actions/core'
import * as core from "@actions/core";
import path from "path";
export const version = core.getInput('version')
export const checkSum = core.getInput('checksum')
export const enableCache = core.getInput('enable-cache') === 'true'
export const cacheSuffix = core.getInput('cache-suffix') || ''
export const cacheLocalPath = core.getInput('cache-local-path')
export const githubToken = core.getInput('github-token')
export const cacheDependencyGlob = core.getInput('cache-dependency-glob')
export const version = core.getInput("version");
export const checkSum = core.getInput("checksum");
export const enableCache = core.getInput("enable-cache") === "true";
export const cacheSuffix = core.getInput("cache-suffix") || "";
export const cacheLocalPath = getCacheLocalPath();
export const githubToken = core.getInput("github-token");
export const cacheDependencyGlob = core.getInput("cache-dependency-glob");
function getCacheLocalPath(): string {
const cacheLocalPathInput = core.getInput("cache-local-path");
if (cacheLocalPathInput !== "") {
return cacheLocalPathInput;
}
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${path.sep}setup-uv-cache`;
}
if (process.platform === "win32") {
return "D:\\a\\_temp\\setup-uv-cache";
}
return "/tmp/setup-uv-cache";
}

View File

@@ -1,33 +1,33 @@
export type Platform =
| 'unknown-linux-gnu'
| 'unknown-linux-musl'
| 'unknown-linux-musleabihf'
| 'apple-darwin'
| 'pc-windows-msvc'
export type Architecture = 'i686' | 'x86_64' | 'aarch64'
| "unknown-linux-gnu"
| "unknown-linux-musl"
| "unknown-linux-musleabihf"
| "apple-darwin"
| "pc-windows-msvc";
export type Architecture = "i686" | "x86_64" | "aarch64";
export function getArch(): Architecture | undefined {
const arch = process.arch
const archMapping: {[key: string]: Architecture} = {
ia32: 'i686',
x64: 'x86_64',
arm64: 'aarch64'
}
const arch = process.arch;
const archMapping: { [key: string]: Architecture } = {
ia32: "i686",
x64: "x86_64",
arm64: "aarch64",
};
if (arch in archMapping) {
return archMapping[arch]
return archMapping[arch];
}
}
export function getPlatform(): Platform | undefined {
const platform = process.platform
const platformMapping: {[key: string]: Platform} = {
linux: 'unknown-linux-gnu',
darwin: 'apple-darwin',
win32: 'pc-windows-msvc'
}
const platform = process.platform;
const platformMapping: { [key: string]: Platform } = {
linux: "unknown-linux-gnu",
darwin: "apple-darwin",
win32: "pc-windows-msvc",
};
if (platform in platformMapping) {
return platformMapping[platform]
return platformMapping[platform];
}
}

View File

@@ -1,3 +0,0 @@
export const REPO = 'uv'
export const OWNER = 'astral-sh'
export const TOOL_CACHE_NAME = 'uv'

View File

@@ -1,12 +1,12 @@
{
"compilerOptions": {
"target": "es6", /* 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. */
"strict": true, /* Enable all strict type-checking options. */
"noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
"target": "es6" /* 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. */,
"strict": true /* Enable all strict type-checking options. */,
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
},
"exclude": ["node_modules", "**/*.test.ts"]
}