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

Compare commits

...

5 Commits

Author SHA1 Message Date
dependabot[bot]
ed21f2f24f Bump peter-evans/create-pull-request from 7.0.8 to 7.0.9 (#695)
Bumps
[peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request)
from 7.0.8 to 7.0.9.
<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.9</h2>
<p>⚙️ Fixes an <a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4228">incompatibility</a>
with the recently released <code>actions/checkout@v6</code>.</p>
<h2>What's Changed</h2>
<ul>
<li>~70 dependency updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a></li>
<li>docs: fix workaround description about <code>ready_for_review</code>
by <a href="https://github.com/ybiquitous"><code>@​ybiquitous</code></a>
in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3939">peter-evans/create-pull-request#3939</a></li>
<li>Docs: <code>add-paths</code> default behavior by <a
href="https://github.com/joeflack4"><code>@​joeflack4</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3928">peter-evans/create-pull-request#3928</a></li>
<li>docs: update to create-github-app-token v2 by <a
href="https://github.com/Goooler"><code>@​Goooler</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4063">peter-evans/create-pull-request#4063</a></li>
<li>Fix compatibility with actions/checkout@v6 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4230">peter-evans/create-pull-request#4230</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/joeflack4"><code>@​joeflack4</code></a>
made their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3928">peter-evans/create-pull-request#3928</a></li>
<li><a href="https://github.com/Goooler"><code>@​Goooler</code></a> made
their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4063">peter-evans/create-pull-request#4063</a></li>
<li><a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> made
their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/4230">peter-evans/create-pull-request#4230</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v7.0.8...v7.0.9">https://github.com/peter-evans/create-pull-request/compare/v7.0.8...v7.0.9</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="84ae59a2cd"><code>84ae59a</code></a>
fix: compatibility with actions/checkout@v6 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4230">#4230</a>)</li>
<li><a
href="b4733b9419"><code>b4733b9</code></a>
build(deps-dev): bump js-yaml from 4.1.0 to 4.1.1 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4222">#4222</a>)</li>
<li><a
href="0edc001d28"><code>0edc001</code></a>
build(deps-dev): bump the npm group with 2 updates (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4201">#4201</a>)</li>
<li><a
href="430aea0fb1"><code>430aea0</code></a>
build(deps): bump the github-actions group with 3 updates (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4200">#4200</a>)</li>
<li><a
href="46cdba753c"><code>46cdba7</code></a>
build(deps-dev): bump the npm group with 3 updates (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4185">#4185</a>)</li>
<li><a
href="b937339b17"><code>b937339</code></a>
build(deps): bump the github-actions group with 2 updates (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4184">#4184</a>)</li>
<li><a
href="e9af275c37"><code>e9af275</code></a>
ci: update dependabot config</li>
<li><a
href="d3e081a03a"><code>d3e081a</code></a>
build(deps-dev): bump <code>@​types/node</code> from 18.19.127 to
18.19.128 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4178">#4178</a>)</li>
<li><a
href="9ec683ee07"><code>9ec683e</code></a>
build(deps-dev): bump <code>@​types/node</code> from 18.19.125 to
18.19.127 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4165">#4165</a>)</li>
<li><a
href="65d8d10bf7"><code>65d8d10</code></a>
build(deps-dev): bump ts-jest from 29.4.2 to 29.4.4 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/4163">#4163</a>)</li>
<li>Additional commits viewable in <a
href="271a8d0340...84ae59a2cd">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.8&new-version=7.0.9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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

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

---

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

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


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-07 18:56:50 +01:00
Kevin Stillhammer
93202d8fbe bump dependencies (#709) 2025-12-07 18:56:35 +01:00
Kevin Stillhammer
5ce090076d set biome files.maxSize to 2MiB (#708)
Account for large known checksums
2025-12-07 17:54:20 +01:00
Kevin Stillhammer
4180991cd9 allow cache-local-path w/o enable-cache (#707)
Fixes: #705
2025-12-07 17:52:54 +01:00
dependabot[bot]
0439606c8e Bump github/codeql-action from 4.30.9 to 4.31.6 (#698)
Bumps [github/codeql-action](https://github.com/github/codeql-action)
from 4.30.9 to 4.31.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/github/codeql-action/releases">github/codeql-action's
releases</a>.</em></p>
<blockquote>
<h2>v4.31.6</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>4.31.6 - 01 Dec 2025</h2>
<p>No user facing changes.</p>
<p>See the full <a
href="https://github.com/github/codeql-action/blob/v4.31.6/CHANGELOG.md">CHANGELOG.md</a>
for more information.</p>
<h2>v4.31.5</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>4.31.5 - 24 Nov 2025</h2>
<ul>
<li>Update default CodeQL bundle version to 2.23.6. <a
href="https://redirect.github.com/github/codeql-action/pull/3321">#3321</a></li>
</ul>
<p>See the full <a
href="https://github.com/github/codeql-action/blob/v4.31.5/CHANGELOG.md">CHANGELOG.md</a>
for more information.</p>
<h2>v4.31.4</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>4.31.4 - 18 Nov 2025</h2>
<p>No user facing changes.</p>
<p>See the full <a
href="https://github.com/github/codeql-action/blob/v4.31.4/CHANGELOG.md">CHANGELOG.md</a>
for more information.</p>
<h2>v4.31.3</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>4.31.3 - 13 Nov 2025</h2>
<ul>
<li>CodeQL Action v3 will be deprecated in December 2026. The Action now
logs a warning for customers who are running v3 but could be running v4.
For more information, see <a
href="https://github.blog/changelog/2025-10-28-upcoming-deprecation-of-codeql-action-v3/">Upcoming
deprecation of CodeQL Action v3</a>.</li>
<li>Update default CodeQL bundle version to 2.23.5. <a
href="https://redirect.github.com/github/codeql-action/pull/3288">#3288</a></li>
</ul>
<p>See the full <a
href="https://github.com/github/codeql-action/blob/v4.31.3/CHANGELOG.md">CHANGELOG.md</a>
for more information.</p>
<h2>v4.31.2</h2>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/github/codeql-action/blob/main/CHANGELOG.md">github/codeql-action's
changelog</a>.</em></p>
<blockquote>
<h1>CodeQL Action Changelog</h1>
<p>See the <a
href="https://github.com/github/codeql-action/releases">releases
page</a> for the relevant changes to the CodeQL CLI and language
packs.</p>
<h2>[UNRELEASED]</h2>
<p>No user facing changes.</p>
<h2>4.31.6 - 01 Dec 2025</h2>
<p>No user facing changes.</p>
<h2>4.31.5 - 24 Nov 2025</h2>
<ul>
<li>Update default CodeQL bundle version to 2.23.6. <a
href="https://redirect.github.com/github/codeql-action/pull/3321">#3321</a></li>
</ul>
<h2>4.31.4 - 18 Nov 2025</h2>
<p>No user facing changes.</p>
<h2>4.31.3 - 13 Nov 2025</h2>
<ul>
<li>CodeQL Action v3 will be deprecated in December 2026. The Action now
logs a warning for customers who are running v3 but could be running v4.
For more information, see <a
href="https://github.blog/changelog/2025-10-28-upcoming-deprecation-of-codeql-action-v3/">Upcoming
deprecation of CodeQL Action v3</a>.</li>
<li>Update default CodeQL bundle version to 2.23.5. <a
href="https://redirect.github.com/github/codeql-action/pull/3288">#3288</a></li>
</ul>
<h2>4.31.2 - 30 Oct 2025</h2>
<p>No user facing changes.</p>
<h2>4.31.1 - 30 Oct 2025</h2>
<ul>
<li>The <code>add-snippets</code> input has been removed from the
<code>analyze</code> action. This input has been deprecated since CodeQL
Action 3.26.4 in August 2024 when this removal was announced.</li>
</ul>
<h2>4.31.0 - 24 Oct 2025</h2>
<ul>
<li>Bump minimum CodeQL bundle version to 2.17.6. <a
href="https://redirect.github.com/github/codeql-action/pull/3223">#3223</a></li>
<li>When SARIF files are uploaded by the <code>analyze</code> or
<code>upload-sarif</code> actions, the CodeQL Action automatically
performs post-processing steps to prepare the data for the upload.
Previously, these post-processing steps were only performed before an
upload took place. We are now changing this so that the post-processing
steps will always be performed, even when the SARIF files are not
uploaded. This does not change anything for the
<code>upload-sarif</code> action. For <code>analyze</code>, this may
affect Advanced Setup for CodeQL users who specify a value other than
<code>always</code> for the <code>upload</code> input. <a
href="https://redirect.github.com/github/codeql-action/pull/3222">#3222</a></li>
</ul>
<h2>4.30.9 - 17 Oct 2025</h2>
<ul>
<li>Update default CodeQL bundle version to 2.23.3. <a
href="https://redirect.github.com/github/codeql-action/pull/3205">#3205</a></li>
<li>Experimental: A new <code>setup-codeql</code> action has been added
which is similar to <code>init</code>, except it only installs the
CodeQL CLI and does not initialize a database. Do not use this in
production as it is part of an internal experiment and subject to change
at any time. <a
href="https://redirect.github.com/github/codeql-action/pull/3204">#3204</a></li>
</ul>
<h2>4.30.8 - 10 Oct 2025</h2>
<p>No user facing changes.</p>
<h2>4.30.7 - 06 Oct 2025</h2>
<ul>
<li>[v4+ only] The CodeQL Action now runs on Node.js v24. <a
href="https://redirect.github.com/github/codeql-action/pull/3169">#3169</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="fe4161a26a"><code>fe4161a</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/3336">#3336</a>
from github/update-v4.31.6-ecec1f887</li>
<li><a
href="88c2ab5eee"><code>88c2ab5</code></a>
Update changelog for v4.31.6</li>
<li><a
href="ecec1f8876"><code>ecec1f8</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/3335">#3335</a>
from github/mbg/ci/run-codeql-on-all-prs</li>
<li><a
href="23da732778"><code>23da732</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/3334">#3334</a>
from github/kaspersv/overlay-minor-comments</li>
<li><a
href="f7abc748a3"><code>f7abc74</code></a>
Remove branch filter for PR event in CodeQL workflow</li>
<li><a
href="32ada5e061"><code>32ada5e</code></a>
Merge branch 'main' into kaspersv/overlay-minor-comments</li>
<li><a
href="75b2f49aea"><code>75b2f49</code></a>
Merge pull request <a
href="https://redirect.github.com/github/codeql-action/issues/3333">#3333</a>
from github/kaspersv/overlay-no-resource-checks-option</li>
<li><a
href="f036b1cb78"><code>f036b1c</code></a>
Merge branch 'main' into kaspersv/overlay-no-resource-checks-option</li>
<li><a
href="58c5954801"><code>58c5954</code></a>
Add comment to runnerSupportsOverlayAnalysis</li>
<li><a
href="b02fa13292"><code>b02fa13</code></a>
Order feature flags alphabetically</li>
<li>Additional commits viewable in <a
href="16140ae1a1...fe4161a26a">compare
view</a></li>
</ul>
</details>
<br />


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

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

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

---

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

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


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-07 17:13:22 +01:00
15 changed files with 675 additions and 336 deletions

View File

@@ -47,7 +47,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@16140ae1a102900babc80a33c44059580f687047 # v4.30.9
uses: github/codeql-action/init@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6
with:
languages: ${{ matrix.language }}
source-root: src
@@ -59,7 +59,7 @@ jobs:
# 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@16140ae1a102900babc80a33c44059580f687047 # v4.30.9
uses: github/codeql-action/autobuild@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -73,4 +73,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@16140ae1a102900babc80a33c44059580f687047 # v4.30.9
uses: github/codeql-action/analyze@fe4161a26a8629af62121b670040955b330f9af2 # v4.31.6

View File

@@ -649,6 +649,26 @@ jobs:
fi
shell: bash
test-cache-local-cache-disabled-but-explicit-path:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Setup without cache
uses: ./
with:
enable-cache: false
cache-local-path: /tmp/uv-cache-disabled
- name: Check UV_CACHE_DIR is set
run: |
if [ "$UV_CACHE_DIR" != "/tmp/uv-cache-disabled" ]; then
echo "UV_CACHE_DIR should be set when cache is disabled but explicit path is provided"
exit 1
fi
shell: bash
test-setup-cache-local:
runs-on: selfhosted-ubuntu-arm64
steps:
@@ -984,6 +1004,7 @@ jobs:
- test-musl
- test-cache-local
- test-cache-local-cache-disabled
- test-cache-local-cache-disabled-but-explicit-path
- test-setup-cache
- test-restore-cache
- test-setup-cache-requirements-txt

View File

@@ -55,7 +55,7 @@ jobs:
- name: Create Pull Request
if: ${{ steps.changes-exist.outputs.changes-exist == 'true' && steps.commit-and-push.outcome != 'success' }}
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
uses: peter-evans/create-pull-request@84ae59a2cdc2258d6fa0732dd66352dddae2a412 # v7.0.9
with:
commit-message: "chore: update known checksums"
title:

View File

@@ -29,9 +29,9 @@ it.each<KnownVersionFixture>([
known: false,
version: "0.0.15",
},
])(
"isknownVersion should return $known for version $version",
({ version, known }) => {
expect(isknownVersion(version)).toBe(known);
},
);
])("isknownVersion should return $known for version $version", ({
version,
known,
}) => {
expect(isknownVersion(version)).toBe(known);
});

View File

@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/2.3.0/schema.json",
"$schema": "https://biomejs.dev/schemas/2.3.7/schema.json",
"assist": {
"actions": {
"source": {
@@ -18,7 +18,8 @@
"!**/node_modules",
"!**/package*.json",
"!**/known-checksums.*"
]
],
"maxSize": 2097152
},
"formatter": {
"enabled": true,

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

@@ -90619,7 +90619,10 @@ async function restoreCache() {
}
let matchedKey;
core.info(`Trying to restore uv cache from GitHub Actions cache with key: ${cacheKey}`);
const cachePaths = [inputs_1.cacheLocalPath];
if (inputs_1.cacheLocalPath === undefined) {
throw new Error("cache-local-path is not set. Cannot restore cache without a valid cache path.");
}
const cachePaths = [inputs_1.cacheLocalPath.path];
if (inputs_1.cachePython) {
cachePaths.push(inputs_1.pythonDir);
}
@@ -90868,9 +90871,13 @@ async function saveCache() {
if (inputs_1.pruneCache) {
await pruneCache();
}
let actualCachePath = inputs_1.cacheLocalPath;
if (process.env.UV_CACHE_DIR && process.env.UV_CACHE_DIR !== inputs_1.cacheLocalPath) {
core.warning(`The environment variable UV_CACHE_DIR has been changed to "${process.env.UV_CACHE_DIR}", by an action or step running after astral-sh/setup-uv. This can lead to unexpected behavior. If you expected this to happen set the cache-local-path input to "${process.env.UV_CACHE_DIR}" instead of "${inputs_1.cacheLocalPath}".`);
if (inputs_1.cacheLocalPath === undefined) {
throw new Error("cache-local-path is not set. Cannot save cache without a valid cache path.");
}
let actualCachePath = inputs_1.cacheLocalPath.path;
if (process.env.UV_CACHE_DIR &&
process.env.UV_CACHE_DIR !== inputs_1.cacheLocalPath.path) {
core.warning(`The environment variable UV_CACHE_DIR has been changed to "${process.env.UV_CACHE_DIR}", by an action or step running after astral-sh/setup-uv. This can lead to unexpected behavior. If you expected this to happen set the cache-local-path input to "${process.env.UV_CACHE_DIR}" instead of "${inputs_1.cacheLocalPath.path}".`);
actualCachePath = process.env.UV_CACHE_DIR;
}
core.info(`Saving cache path: ${actualCachePath}`);
@@ -91038,11 +91045,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.resolutionStrategy = exports.addProblemMatchers = exports.manifestFile = exports.githubToken = exports.pythonDir = exports.toolDir = exports.toolBinDir = exports.ignoreEmptyWorkdir = exports.ignoreNothingToCache = exports.cachePython = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.saveCache = exports.restoreCache = exports.enableCache = exports.checkSum = exports.activateEnvironment = exports.pythonVersion = exports.versionFile = exports.version = exports.workingDirectory = void 0;
exports.resolutionStrategy = exports.addProblemMatchers = exports.manifestFile = exports.githubToken = exports.pythonDir = exports.toolDir = exports.toolBinDir = exports.ignoreEmptyWorkdir = exports.ignoreNothingToCache = exports.cachePython = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.saveCache = exports.restoreCache = exports.enableCache = exports.checkSum = exports.activateEnvironment = exports.pythonVersion = exports.versionFile = exports.version = exports.workingDirectory = exports.CacheLocalSource = void 0;
exports.getUvPythonDir = getUvPythonDir;
const node_path_1 = __importDefault(__nccwpck_require__(6760));
const core = __importStar(__nccwpck_require__(7484));
const config_file_1 = __nccwpck_require__(7846);
var CacheLocalSource;
(function (CacheLocalSource) {
CacheLocalSource[CacheLocalSource["Input"] = 0] = "Input";
CacheLocalSource[CacheLocalSource["Config"] = 1] = "Config";
CacheLocalSource[CacheLocalSource["Env"] = 2] = "Env";
CacheLocalSource[CacheLocalSource["Default"] = 3] = "Default";
})(CacheLocalSource || (exports.CacheLocalSource = CacheLocalSource = {}));
exports.workingDirectory = core.getInput("working-directory");
exports.version = core.getInput("version");
exports.versionFile = getVersionFile();
@@ -91113,26 +91127,40 @@ function getCacheLocalPath() {
const cacheLocalPathInput = core.getInput("cache-local-path");
if (cacheLocalPathInput !== "") {
const tildeExpanded = expandTilde(cacheLocalPathInput);
return resolveRelativePath(tildeExpanded);
return {
path: resolveRelativePath(tildeExpanded),
source: CacheLocalSource.Input,
};
}
const cacheDirFromConfig = getCacheDirFromConfig();
if (cacheDirFromConfig !== undefined) {
return cacheDirFromConfig;
return { path: cacheDirFromConfig, source: CacheLocalSource.Config };
}
if (process.env.UV_CACHE_DIR !== undefined) {
core.info(`UV_CACHE_DIR is already set to ${process.env.UV_CACHE_DIR}`);
return process.env.UV_CACHE_DIR;
return { path: process.env.UV_CACHE_DIR, source: CacheLocalSource.Env };
}
if (process.env.RUNNER_ENVIRONMENT === "github-hosted") {
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${node_path_1.default.sep}setup-uv-cache`;
if (getEnableCache()) {
if (process.env.RUNNER_ENVIRONMENT === "github-hosted") {
if (process.env.RUNNER_TEMP !== undefined) {
return {
path: `${process.env.RUNNER_TEMP}${node_path_1.default.sep}setup-uv-cache`,
source: CacheLocalSource.Default,
};
}
throw Error("Could not determine UV_CACHE_DIR. Please make sure RUNNER_TEMP is set or provide the cache-local-path input");
}
throw Error("Could not determine UV_CACHE_DIR. Please make sure RUNNER_TEMP is set or provide the cache-local-path input");
if (process.platform === "win32") {
return {
path: `${process.env.APPDATA}${node_path_1.default.sep}uv${node_path_1.default.sep}cache`,
source: CacheLocalSource.Default,
};
}
return {
path: `${process.env.HOME}${node_path_1.default.sep}.cache${node_path_1.default.sep}uv`,
source: CacheLocalSource.Default,
};
}
if (process.platform === "win32") {
return `${process.env.APPDATA}${node_path_1.default.sep}uv${node_path_1.default.sep}cache`;
}
return `${process.env.HOME}${node_path_1.default.sep}.cache${node_path_1.default.sep}uv`;
}
function getCacheDirFromConfig() {
for (const filePath of [exports.versionFile, "uv.toml", "pyproject.toml"]) {

266
dist/setup/index.js generated vendored
View File

@@ -91522,7 +91522,10 @@ async function restoreCache() {
}
let matchedKey;
core.info(`Trying to restore uv cache from GitHub Actions cache with key: ${cacheKey}`);
const cachePaths = [inputs_1.cacheLocalPath];
if (inputs_1.cacheLocalPath === undefined) {
throw new Error("cache-local-path is not set. Cannot restore cache without a valid cache path.");
}
const cachePaths = [inputs_1.cacheLocalPath.path];
if (inputs_1.cachePython) {
cachePaths.push(inputs_1.pythonDir);
}
@@ -96168,7 +96171,6 @@ const core = __importStar(__nccwpck_require__(7484));
const exec = __importStar(__nccwpck_require__(5236));
const restore_cache_1 = __nccwpck_require__(5391);
const download_version_1 = __nccwpck_require__(8255);
const config_file_1 = __nccwpck_require__(7846);
const constants_1 = __nccwpck_require__(6156);
const inputs_1 = __nccwpck_require__(9612);
const platforms_1 = __nccwpck_require__(8361);
@@ -96336,14 +96338,13 @@ async function activateEnvironment() {
}
}
function setCacheDir() {
if (inputs_1.enableCache) {
const cacheDirFromConfig = (0, config_file_1.getConfigValueFromTomlFile)("", "cache-dir");
if (cacheDirFromConfig !== undefined) {
if (inputs_1.cacheLocalPath !== undefined) {
if (inputs_1.cacheLocalPath.source === inputs_1.CacheLocalSource.Config) {
core.info("Using cache-dir from uv config file, not modifying UV_CACHE_DIR");
return;
}
core.exportVariable("UV_CACHE_DIR", inputs_1.cacheLocalPath);
core.info(`Set UV_CACHE_DIR to ${inputs_1.cacheLocalPath}`);
core.exportVariable("UV_CACHE_DIR", inputs_1.cacheLocalPath.path);
core.info(`Set UV_CACHE_DIR to ${inputs_1.cacheLocalPath.path}`);
}
}
function addMatchers() {
@@ -96505,11 +96506,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.resolutionStrategy = exports.addProblemMatchers = exports.manifestFile = exports.githubToken = exports.pythonDir = exports.toolDir = exports.toolBinDir = exports.ignoreEmptyWorkdir = exports.ignoreNothingToCache = exports.cachePython = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.saveCache = exports.restoreCache = exports.enableCache = exports.checkSum = exports.activateEnvironment = exports.pythonVersion = exports.versionFile = exports.version = exports.workingDirectory = void 0;
exports.resolutionStrategy = exports.addProblemMatchers = exports.manifestFile = exports.githubToken = exports.pythonDir = exports.toolDir = exports.toolBinDir = exports.ignoreEmptyWorkdir = exports.ignoreNothingToCache = exports.cachePython = exports.pruneCache = exports.cacheDependencyGlob = exports.cacheLocalPath = exports.cacheSuffix = exports.saveCache = exports.restoreCache = exports.enableCache = exports.checkSum = exports.activateEnvironment = exports.pythonVersion = exports.versionFile = exports.version = exports.workingDirectory = exports.CacheLocalSource = void 0;
exports.getUvPythonDir = getUvPythonDir;
const node_path_1 = __importDefault(__nccwpck_require__(6760));
const core = __importStar(__nccwpck_require__(7484));
const config_file_1 = __nccwpck_require__(7846);
var CacheLocalSource;
(function (CacheLocalSource) {
CacheLocalSource[CacheLocalSource["Input"] = 0] = "Input";
CacheLocalSource[CacheLocalSource["Config"] = 1] = "Config";
CacheLocalSource[CacheLocalSource["Env"] = 2] = "Env";
CacheLocalSource[CacheLocalSource["Default"] = 3] = "Default";
})(CacheLocalSource || (exports.CacheLocalSource = CacheLocalSource = {}));
exports.workingDirectory = core.getInput("working-directory");
exports.version = core.getInput("version");
exports.versionFile = getVersionFile();
@@ -96580,26 +96588,40 @@ function getCacheLocalPath() {
const cacheLocalPathInput = core.getInput("cache-local-path");
if (cacheLocalPathInput !== "") {
const tildeExpanded = expandTilde(cacheLocalPathInput);
return resolveRelativePath(tildeExpanded);
return {
path: resolveRelativePath(tildeExpanded),
source: CacheLocalSource.Input,
};
}
const cacheDirFromConfig = getCacheDirFromConfig();
if (cacheDirFromConfig !== undefined) {
return cacheDirFromConfig;
return { path: cacheDirFromConfig, source: CacheLocalSource.Config };
}
if (process.env.UV_CACHE_DIR !== undefined) {
core.info(`UV_CACHE_DIR is already set to ${process.env.UV_CACHE_DIR}`);
return process.env.UV_CACHE_DIR;
return { path: process.env.UV_CACHE_DIR, source: CacheLocalSource.Env };
}
if (process.env.RUNNER_ENVIRONMENT === "github-hosted") {
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${node_path_1.default.sep}setup-uv-cache`;
if (getEnableCache()) {
if (process.env.RUNNER_ENVIRONMENT === "github-hosted") {
if (process.env.RUNNER_TEMP !== undefined) {
return {
path: `${process.env.RUNNER_TEMP}${node_path_1.default.sep}setup-uv-cache`,
source: CacheLocalSource.Default,
};
}
throw Error("Could not determine UV_CACHE_DIR. Please make sure RUNNER_TEMP is set or provide the cache-local-path input");
}
throw Error("Could not determine UV_CACHE_DIR. Please make sure RUNNER_TEMP is set or provide the cache-local-path input");
if (process.platform === "win32") {
return {
path: `${process.env.APPDATA}${node_path_1.default.sep}uv${node_path_1.default.sep}cache`,
source: CacheLocalSource.Default,
};
}
return {
path: `${process.env.HOME}${node_path_1.default.sep}.cache${node_path_1.default.sep}uv`,
source: CacheLocalSource.Default,
};
}
if (process.platform === "win32") {
return `${process.env.APPDATA}${node_path_1.default.sep}uv${node_path_1.default.sep}cache`;
}
return `${process.env.HOME}${node_path_1.default.sep}.cache${node_path_1.default.sep}uv`;
}
function getCacheDirFromConfig() {
for (const filePath of [exports.versionFile, "uv.toml", "pyproject.toml"]) {
@@ -100568,12 +100590,13 @@ class RequestError extends Error {
*/
response;
constructor(message, statusCode, options) {
super(message);
super(message, { cause: options.cause });
this.name = "HttpError";
this.status = Number.parseInt(statusCode);
if (Number.isNaN(this.status)) {
this.status = 0;
}
/* v8 ignore else -- @preserve -- Bug with vitest coverage where it sees an else branch that doesn't exist */
if ("response" in options) {
this.response = options.response;
}
@@ -100600,7 +100623,7 @@ class RequestError extends Error {
// pkg/dist-src/version.js
var dist_bundle_VERSION = "10.0.5";
var dist_bundle_VERSION = "10.0.7";
// pkg/dist-src/defaults.js
var defaults_default = {
@@ -100624,6 +100647,7 @@ function dist_bundle_isPlainObject(value) {
// pkg/dist-src/fetch-wrapper.js
var noop = () => "";
async function fetchWrapper(requestOptions) {
const fetch = requestOptions.request?.fetch || globalThis.fetch;
if (!fetch) {
@@ -100725,7 +100749,7 @@ async function fetchWrapper(requestOptions) {
async function getResponseData(response) {
const contentType = response.headers.get("content-type");
if (!contentType) {
return response.text().catch(() => "");
return response.text().catch(noop);
}
const mimetype = (0,fast_content_type_parse/* safeParse */.xL)(contentType);
if (isJSONResponse(mimetype)) {
@@ -100737,9 +100761,12 @@ async function getResponseData(response) {
return text;
}
} else if (mimetype.type.startsWith("text/") || mimetype.parameters.charset?.toLowerCase() === "utf-8") {
return response.text().catch(() => "");
return response.text().catch(noop);
} else {
return response.arrayBuffer().catch(() => new ArrayBuffer(0));
return response.arrayBuffer().catch(
/* v8 ignore next -- @preserve */
() => new ArrayBuffer(0)
);
}
}
function isJSONResponse(mimetype) {
@@ -100787,6 +100814,8 @@ function dist_bundle_withDefaults(oldEndpoint, newDefaults) {
// pkg/dist-src/index.js
var request = dist_bundle_withDefaults(endpoint, defaults_default);
/* v8 ignore next -- @preserve */
/* v8 ignore else -- @preserve */
;// CONCATENATED MODULE: ./node_modules/@octokit/graphql/dist-bundle/index.js
// pkg/dist-src/index.js
@@ -100971,7 +101000,7 @@ var createTokenAuth = function createTokenAuth2(token) {
;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/version.js
const version_VERSION = "7.0.5";
const version_VERSION = "7.0.6";
;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/index.js
@@ -100981,16 +101010,16 @@ const version_VERSION = "7.0.5";
const noop = () => {
const dist_src_noop = () => {
};
const consoleWarn = console.warn.bind(console);
const consoleError = console.error.bind(console);
function createLogger(logger = {}) {
if (typeof logger.debug !== "function") {
logger.debug = noop;
logger.debug = dist_src_noop;
}
if (typeof logger.info !== "function") {
logger.info = noop;
logger.info = dist_src_noop;
}
if (typeof logger.warn !== "function") {
logger.warn = consoleWarn;
@@ -101257,7 +101286,9 @@ var paginatingEndpoints = [
"GET /enterprises/{enterprise}/code-security/configurations",
"GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories",
"GET /enterprises/{enterprise}/dependabot/alerts",
"GET /enterprises/{enterprise}/secret-scanning/alerts",
"GET /enterprises/{enterprise}/teams",
"GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships",
"GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations",
"GET /events",
"GET /gists",
"GET /gists/public",
@@ -101289,6 +101320,7 @@ var paginatingEndpoints = [
"GET /orgs/{org}/actions/secrets/{secret_name}/repositories",
"GET /orgs/{org}/actions/variables",
"GET /orgs/{org}/actions/variables/{name}/repositories",
"GET /orgs/{org}/attestations/repositories",
"GET /orgs/{org}/attestations/{subject_digest}",
"GET /orgs/{org}/blocks",
"GET /orgs/{org}/campaigns",
@@ -101340,6 +101372,7 @@ var paginatingEndpoints = [
"GET /orgs/{org}/rulesets/{ruleset_id}/history",
"GET /orgs/{org}/secret-scanning/alerts",
"GET /orgs/{org}/security-advisories",
"GET /orgs/{org}/settings/immutable-releases/repositories",
"GET /orgs/{org}/settings/network-configurations",
"GET /orgs/{org}/team/{team_slug}/copilot/metrics",
"GET /orgs/{org}/teams",
@@ -101353,7 +101386,6 @@ var paginatingEndpoints = [
"GET /orgs/{org}/teams/{team_slug}/repos",
"GET /orgs/{org}/teams/{team_slug}/teams",
"GET /projects/{project_id}/collaborators",
"GET /projects/{project_id}/columns",
"GET /repos/{owner}/{repo}/actions/artifacts",
"GET /repos/{owner}/{repo}/actions/caches",
"GET /repos/{owner}/{repo}/actions/organization-secrets",
@@ -101493,8 +101525,6 @@ var paginatingEndpoints = [
"GET /user/subscriptions",
"GET /user/teams",
"GET /users",
"GET /users/{user_id}/projectsV2/{project_number}/fields",
"GET /users/{user_id}/projectsV2/{project_number}/items",
"GET /users/{username}/attestations/{subject_digest}",
"GET /users/{username}/events",
"GET /users/{username}/events/orgs/{org}",
@@ -101508,6 +101538,8 @@ var paginatingEndpoints = [
"GET /users/{username}/packages",
"GET /users/{username}/projects",
"GET /users/{username}/projectsV2",
"GET /users/{username}/projectsV2/{project_number}/fields",
"GET /users/{username}/projectsV2/{project_number}/items",
"GET /users/{username}/received_events",
"GET /users/{username}/received_events/public",
"GET /users/{username}/repos",
@@ -101554,7 +101586,7 @@ __nccwpck_require__.d(__webpack_exports__, {
});
;// CONCATENATED MODULE: ./node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js
const VERSION = "16.1.1";
const VERSION = "17.0.0";
//# sourceMappingURL=version.js.map
@@ -101617,6 +101649,12 @@ const Endpoints = {
deleteArtifact: [
"DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"
],
deleteCustomImageFromOrg: [
"DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}"
],
deleteCustomImageVersionFromOrg: [
"DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}"
],
deleteEnvironmentSecret: [
"DELETE /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"
],
@@ -101690,6 +101728,12 @@ const Endpoints = {
"GET /repos/{owner}/{repo}/actions/permissions/selected-actions"
],
getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],
getCustomImageForOrg: [
"GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}"
],
getCustomImageVersionForOrg: [
"GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}"
],
getCustomOidcSubClaimForRepo: [
"GET /repos/{owner}/{repo}/actions/oidc/customization/sub"
],
@@ -101769,6 +101813,12 @@ const Endpoints = {
"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"
],
listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"],
listCustomImageVersionsForOrg: [
"GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions"
],
listCustomImagesForOrg: [
"GET /orgs/{org}/actions/hosted-runners/images/custom"
],
listEnvironmentSecrets: [
"GET /repos/{owner}/{repo}/environments/{environment_name}/secrets"
],
@@ -102027,6 +102077,12 @@ const Endpoints = {
getGithubActionsBillingUser: [
"GET /users/{username}/settings/billing/actions"
],
getGithubBillingPremiumRequestUsageReportOrg: [
"GET /organizations/{org}/settings/billing/premium_request/usage"
],
getGithubBillingPremiumRequestUsageReportUser: [
"GET /users/{username}/settings/billing/premium_request/usage"
],
getGithubBillingUsageReportOrg: [
"GET /organizations/{org}/settings/billing/usage"
],
@@ -102394,6 +102450,51 @@ const Endpoints = {
exportSbom: ["GET /repos/{owner}/{repo}/dependency-graph/sbom"]
},
emojis: { get: ["GET /emojis"] },
enterpriseTeamMemberships: {
add: [
"PUT /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}"
],
bulkAdd: [
"POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/add"
],
bulkRemove: [
"POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/remove"
],
get: [
"GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}"
],
list: ["GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships"],
remove: [
"DELETE /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}"
]
},
enterpriseTeamOrganizations: {
add: [
"PUT /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}"
],
bulkAdd: [
"POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add"
],
bulkRemove: [
"POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove"
],
delete: [
"DELETE /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}"
],
getAssignment: [
"GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}"
],
getAssignments: [
"GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations"
]
},
enterpriseTeams: {
create: ["POST /enterprises/{enterprise}/teams"],
delete: ["DELETE /enterprises/{enterprise}/teams/{team_slug}"],
get: ["GET /enterprises/{enterprise}/teams/{team_slug}"],
list: ["GET /enterprises/{enterprise}/teams"],
update: ["PATCH /enterprises/{enterprise}/teams/{team_slug}"]
},
gists: {
checkIsStarred: ["GET /gists/{gist_id}/star"],
create: ["POST /gists"],
@@ -102663,14 +102764,34 @@ const Endpoints = {
],
createInvitation: ["POST /orgs/{org}/invitations"],
createIssueType: ["POST /orgs/{org}/issue-types"],
createOrUpdateCustomProperties: ["PATCH /orgs/{org}/properties/schema"],
createOrUpdateCustomPropertiesValuesForRepos: [
"PATCH /orgs/{org}/properties/values"
createWebhook: ["POST /orgs/{org}/hooks"],
customPropertiesForOrgsCreateOrUpdateOrganizationValues: [
"PATCH /organizations/{org}/org-properties/values"
],
createOrUpdateCustomProperty: [
customPropertiesForOrgsGetOrganizationValues: [
"GET /organizations/{org}/org-properties/values"
],
customPropertiesForReposCreateOrUpdateOrganizationDefinition: [
"PUT /orgs/{org}/properties/schema/{custom_property_name}"
],
createWebhook: ["POST /orgs/{org}/hooks"],
customPropertiesForReposCreateOrUpdateOrganizationDefinitions: [
"PATCH /orgs/{org}/properties/schema"
],
customPropertiesForReposCreateOrUpdateOrganizationValues: [
"PATCH /orgs/{org}/properties/values"
],
customPropertiesForReposDeleteOrganizationDefinition: [
"DELETE /orgs/{org}/properties/schema/{custom_property_name}"
],
customPropertiesForReposGetOrganizationDefinition: [
"GET /orgs/{org}/properties/schema/{custom_property_name}"
],
customPropertiesForReposGetOrganizationDefinitions: [
"GET /orgs/{org}/properties/schema"
],
customPropertiesForReposGetOrganizationValues: [
"GET /orgs/{org}/properties/values"
],
delete: ["DELETE /orgs/{org}"],
deleteAttestationsBulk: ["POST /orgs/{org}/attestations/delete-request"],
deleteAttestationsById: [
@@ -102681,10 +102802,18 @@ const Endpoints = {
],
deleteIssueType: ["DELETE /orgs/{org}/issue-types/{issue_type_id}"],
deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"],
disableSelectedRepositoryImmutableReleasesOrganization: [
"DELETE /orgs/{org}/settings/immutable-releases/repositories/{repository_id}"
],
enableSelectedRepositoryImmutableReleasesOrganization: [
"PUT /orgs/{org}/settings/immutable-releases/repositories/{repository_id}"
],
get: ["GET /orgs/{org}"],
getAllCustomProperties: ["GET /orgs/{org}/properties/schema"],
getCustomProperty: [
"GET /orgs/{org}/properties/schema/{custom_property_name}"
getImmutableReleasesSettings: [
"GET /orgs/{org}/settings/immutable-releases"
],
getImmutableReleasesSettingsRepositories: [
"GET /orgs/{org}/settings/immutable-releases/repositories"
],
getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"],
getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"],
@@ -102703,12 +102832,12 @@ const Endpoints = {
listArtifactStorageRecords: [
"GET /orgs/{org}/artifacts/{subject_digest}/metadata/storage-records"
],
listAttestationRepositories: ["GET /orgs/{org}/attestations/repositories"],
listAttestations: ["GET /orgs/{org}/attestations/{subject_digest}"],
listAttestationsBulk: [
"POST /orgs/{org}/attestations/bulk-list{?per_page,before,after}"
],
listBlockedUsers: ["GET /orgs/{org}/blocks"],
listCustomPropertiesValuesForRepos: ["GET /orgs/{org}/properties/values"],
listFailedInvitations: ["GET /orgs/{org}/failed_invitations"],
listForAuthenticatedUser: ["GET /user/orgs"],
listForUser: ["GET /users/{username}/orgs"],
@@ -102746,9 +102875,6 @@ const Endpoints = {
redeliverWebhookDelivery: [
"POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"
],
removeCustomProperty: [
"DELETE /orgs/{org}/properties/schema/{custom_property_name}"
],
removeMember: ["DELETE /orgs/{org}/members/{username}"],
removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"],
removeOutsideCollaborator: [
@@ -102782,6 +102908,12 @@ const Endpoints = {
revokeOrgRoleUser: [
"DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}"
],
setImmutableReleasesSettings: [
"PUT /orgs/{org}/settings/immutable-releases"
],
setImmutableReleasesSettingsRepositories: [
"PUT /orgs/{org}/settings/immutable-releases/repositories"
],
setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"],
setPublicMembershipForAuthenticatedUser: [
"PUT /orgs/{org}/public_members/{username}"
@@ -102903,40 +103035,42 @@ const Endpoints = {
},
projects: {
addItemForOrg: ["POST /orgs/{org}/projectsV2/{project_number}/items"],
addItemForUser: ["POST /users/{user_id}/projectsV2/{project_number}/items"],
addItemForUser: [
"POST /users/{username}/projectsV2/{project_number}/items"
],
deleteItemForOrg: [
"DELETE /orgs/{org}/projectsV2/{project_number}/items/{item_id}"
],
deleteItemForUser: [
"DELETE /users/{user_id}/projectsV2/{project_number}/items/{item_id}"
"DELETE /users/{username}/projectsV2/{project_number}/items/{item_id}"
],
getFieldForOrg: [
"GET /orgs/{org}/projectsV2/{project_number}/fields/{field_id}"
],
getFieldForUser: [
"GET /users/{user_id}/projectsV2/{project_number}/fields/{field_id}"
"GET /users/{username}/projectsV2/{project_number}/fields/{field_id}"
],
getForOrg: ["GET /orgs/{org}/projectsV2/{project_number}"],
getForUser: ["GET /users/{user_id}/projectsV2/{project_number}"],
getForUser: ["GET /users/{username}/projectsV2/{project_number}"],
getOrgItem: ["GET /orgs/{org}/projectsV2/{project_number}/items/{item_id}"],
getUserItem: [
"GET /users/{user_id}/projectsV2/{project_number}/items/{item_id}"
"GET /users/{username}/projectsV2/{project_number}/items/{item_id}"
],
listFieldsForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/fields"],
listFieldsForUser: [
"GET /users/{user_id}/projectsV2/{project_number}/fields"
"GET /users/{username}/projectsV2/{project_number}/fields"
],
listForOrg: ["GET /orgs/{org}/projectsV2"],
listForUser: ["GET /users/{username}/projectsV2"],
listItemsForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/items"],
listItemsForUser: [
"GET /users/{user_id}/projectsV2/{project_number}/items"
"GET /users/{username}/projectsV2/{project_number}/items"
],
updateItemForOrg: [
"PATCH /orgs/{org}/projectsV2/{project_number}/items/{item_id}"
],
updateItemForUser: [
"PATCH /users/{user_id}/projectsV2/{project_number}/items/{item_id}"
"PATCH /users/{username}/projectsV2/{project_number}/items/{item_id}"
]
},
pulls: {
@@ -103099,6 +103233,7 @@ const Endpoints = {
"GET /repos/{owner}/{repo}/automated-security-fixes"
],
checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"],
checkImmutableReleases: ["GET /repos/{owner}/{repo}/immutable-releases"],
checkPrivateVulnerabilityReporting: [
"GET /repos/{owner}/{repo}/private-vulnerability-reporting"
],
@@ -103134,9 +103269,6 @@ const Endpoints = {
createForAuthenticatedUser: ["POST /user/repos"],
createFork: ["POST /repos/{owner}/{repo}/forks"],
createInOrg: ["POST /orgs/{org}/repos"],
createOrUpdateCustomPropertiesValues: [
"PATCH /repos/{owner}/{repo}/properties/values"
],
createOrUpdateEnvironment: [
"PUT /repos/{owner}/{repo}/environments/{environment_name}"
],
@@ -103150,6 +103282,12 @@ const Endpoints = {
"POST /repos/{template_owner}/{template_repo}/generate"
],
createWebhook: ["POST /repos/{owner}/{repo}/hooks"],
customPropertiesForReposCreateOrUpdateRepositoryValues: [
"PATCH /repos/{owner}/{repo}/properties/values"
],
customPropertiesForReposGetRepositoryValues: [
"GET /repos/{owner}/{repo}/properties/values"
],
declineInvitation: [
"DELETE /user/repository_invitations/{invitation_id}",
{},
@@ -103204,6 +103342,9 @@ const Endpoints = {
disableDeploymentProtectionRule: [
"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"
],
disableImmutableReleases: [
"DELETE /repos/{owner}/{repo}/immutable-releases"
],
disablePrivateVulnerabilityReporting: [
"DELETE /repos/{owner}/{repo}/private-vulnerability-reporting"
],
@@ -103220,6 +103361,7 @@ const Endpoints = {
enableAutomatedSecurityFixes: [
"PUT /repos/{owner}/{repo}/automated-security-fixes"
],
enableImmutableReleases: ["PUT /repos/{owner}/{repo}/immutable-releases"],
enablePrivateVulnerabilityReporting: [
"PUT /repos/{owner}/{repo}/private-vulnerability-reporting"
],
@@ -103271,7 +103413,6 @@ const Endpoints = {
getCustomDeploymentProtectionRule: [
"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"
],
getCustomPropertiesValues: ["GET /repos/{owner}/{repo}/properties/values"],
getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"],
getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"],
getDeploymentBranchPolicy: [
@@ -103489,13 +103630,7 @@ const Endpoints = {
search: {
code: ["GET /search/code"],
commits: ["GET /search/commits"],
issuesAndPullRequests: [
"GET /search/issues",
{},
{
deprecated: "octokit.rest.search.issuesAndPullRequests() is deprecated, see https://docs.github.com/rest/search/search#search-issues-and-pull-requests"
}
],
issuesAndPullRequests: ["GET /search/issues"],
labels: ["GET /search/labels"],
repos: ["GET /search/repositories"],
topics: ["GET /search/topics"],
@@ -103509,9 +103644,6 @@ const Endpoints = {
"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"
],
getScanHistory: ["GET /repos/{owner}/{repo}/secret-scanning/scan-history"],
listAlertsForEnterprise: [
"GET /enterprises/{enterprise}/secret-scanning/alerts"
],
listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"],
listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"],
listLocationsForAlert: [

206
dist/update-known-versions/index.js generated vendored
View File

@@ -35143,12 +35143,13 @@ class RequestError extends Error {
*/
response;
constructor(message, statusCode, options) {
super(message);
super(message, { cause: options.cause });
this.name = "HttpError";
this.status = Number.parseInt(statusCode);
if (Number.isNaN(this.status)) {
this.status = 0;
}
/* v8 ignore else -- @preserve -- Bug with vitest coverage where it sees an else branch that doesn't exist */
if ("response" in options) {
this.response = options.response;
}
@@ -35175,7 +35176,7 @@ class RequestError extends Error {
// pkg/dist-src/version.js
var dist_bundle_VERSION = "10.0.5";
var dist_bundle_VERSION = "10.0.7";
// pkg/dist-src/defaults.js
var defaults_default = {
@@ -35199,6 +35200,7 @@ function dist_bundle_isPlainObject(value) {
// pkg/dist-src/fetch-wrapper.js
var noop = () => "";
async function fetchWrapper(requestOptions) {
const fetch = requestOptions.request?.fetch || globalThis.fetch;
if (!fetch) {
@@ -35300,7 +35302,7 @@ async function fetchWrapper(requestOptions) {
async function getResponseData(response) {
const contentType = response.headers.get("content-type");
if (!contentType) {
return response.text().catch(() => "");
return response.text().catch(noop);
}
const mimetype = (0,fast_content_type_parse/* safeParse */.xL)(contentType);
if (isJSONResponse(mimetype)) {
@@ -35312,9 +35314,12 @@ async function getResponseData(response) {
return text;
}
} else if (mimetype.type.startsWith("text/") || mimetype.parameters.charset?.toLowerCase() === "utf-8") {
return response.text().catch(() => "");
return response.text().catch(noop);
} else {
return response.arrayBuffer().catch(() => new ArrayBuffer(0));
return response.arrayBuffer().catch(
/* v8 ignore next -- @preserve */
() => new ArrayBuffer(0)
);
}
}
function isJSONResponse(mimetype) {
@@ -35362,6 +35367,8 @@ function dist_bundle_withDefaults(oldEndpoint, newDefaults) {
// pkg/dist-src/index.js
var request = dist_bundle_withDefaults(endpoint, defaults_default);
/* v8 ignore next -- @preserve */
/* v8 ignore else -- @preserve */
;// CONCATENATED MODULE: ./node_modules/@octokit/graphql/dist-bundle/index.js
// pkg/dist-src/index.js
@@ -35546,7 +35553,7 @@ var createTokenAuth = function createTokenAuth2(token) {
;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/version.js
const version_VERSION = "7.0.5";
const version_VERSION = "7.0.6";
;// CONCATENATED MODULE: ./node_modules/@octokit/core/dist-src/index.js
@@ -35556,16 +35563,16 @@ const version_VERSION = "7.0.5";
const noop = () => {
const dist_src_noop = () => {
};
const consoleWarn = console.warn.bind(console);
const consoleError = console.error.bind(console);
function createLogger(logger = {}) {
if (typeof logger.debug !== "function") {
logger.debug = noop;
logger.debug = dist_src_noop;
}
if (typeof logger.info !== "function") {
logger.info = noop;
logger.info = dist_src_noop;
}
if (typeof logger.warn !== "function") {
logger.warn = consoleWarn;
@@ -35832,7 +35839,9 @@ var paginatingEndpoints = [
"GET /enterprises/{enterprise}/code-security/configurations",
"GET /enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories",
"GET /enterprises/{enterprise}/dependabot/alerts",
"GET /enterprises/{enterprise}/secret-scanning/alerts",
"GET /enterprises/{enterprise}/teams",
"GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships",
"GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations",
"GET /events",
"GET /gists",
"GET /gists/public",
@@ -35864,6 +35873,7 @@ var paginatingEndpoints = [
"GET /orgs/{org}/actions/secrets/{secret_name}/repositories",
"GET /orgs/{org}/actions/variables",
"GET /orgs/{org}/actions/variables/{name}/repositories",
"GET /orgs/{org}/attestations/repositories",
"GET /orgs/{org}/attestations/{subject_digest}",
"GET /orgs/{org}/blocks",
"GET /orgs/{org}/campaigns",
@@ -35915,6 +35925,7 @@ var paginatingEndpoints = [
"GET /orgs/{org}/rulesets/{ruleset_id}/history",
"GET /orgs/{org}/secret-scanning/alerts",
"GET /orgs/{org}/security-advisories",
"GET /orgs/{org}/settings/immutable-releases/repositories",
"GET /orgs/{org}/settings/network-configurations",
"GET /orgs/{org}/team/{team_slug}/copilot/metrics",
"GET /orgs/{org}/teams",
@@ -35928,7 +35939,6 @@ var paginatingEndpoints = [
"GET /orgs/{org}/teams/{team_slug}/repos",
"GET /orgs/{org}/teams/{team_slug}/teams",
"GET /projects/{project_id}/collaborators",
"GET /projects/{project_id}/columns",
"GET /repos/{owner}/{repo}/actions/artifacts",
"GET /repos/{owner}/{repo}/actions/caches",
"GET /repos/{owner}/{repo}/actions/organization-secrets",
@@ -36068,8 +36078,6 @@ var paginatingEndpoints = [
"GET /user/subscriptions",
"GET /user/teams",
"GET /users",
"GET /users/{user_id}/projectsV2/{project_number}/fields",
"GET /users/{user_id}/projectsV2/{project_number}/items",
"GET /users/{username}/attestations/{subject_digest}",
"GET /users/{username}/events",
"GET /users/{username}/events/orgs/{org}",
@@ -36083,6 +36091,8 @@ var paginatingEndpoints = [
"GET /users/{username}/packages",
"GET /users/{username}/projects",
"GET /users/{username}/projectsV2",
"GET /users/{username}/projectsV2/{project_number}/fields",
"GET /users/{username}/projectsV2/{project_number}/items",
"GET /users/{username}/received_events",
"GET /users/{username}/received_events/public",
"GET /users/{username}/repos",
@@ -36129,7 +36139,7 @@ __nccwpck_require__.d(__webpack_exports__, {
});
;// CONCATENATED MODULE: ./node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js
const VERSION = "16.1.1";
const VERSION = "17.0.0";
//# sourceMappingURL=version.js.map
@@ -36192,6 +36202,12 @@ const Endpoints = {
deleteArtifact: [
"DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"
],
deleteCustomImageFromOrg: [
"DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}"
],
deleteCustomImageVersionFromOrg: [
"DELETE /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}"
],
deleteEnvironmentSecret: [
"DELETE /repos/{owner}/{repo}/environments/{environment_name}/secrets/{secret_name}"
],
@@ -36265,6 +36281,12 @@ const Endpoints = {
"GET /repos/{owner}/{repo}/actions/permissions/selected-actions"
],
getArtifact: ["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],
getCustomImageForOrg: [
"GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}"
],
getCustomImageVersionForOrg: [
"GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}"
],
getCustomOidcSubClaimForRepo: [
"GET /repos/{owner}/{repo}/actions/oidc/customization/sub"
],
@@ -36344,6 +36366,12 @@ const Endpoints = {
"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"
],
listArtifactsForRepo: ["GET /repos/{owner}/{repo}/actions/artifacts"],
listCustomImageVersionsForOrg: [
"GET /orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions"
],
listCustomImagesForOrg: [
"GET /orgs/{org}/actions/hosted-runners/images/custom"
],
listEnvironmentSecrets: [
"GET /repos/{owner}/{repo}/environments/{environment_name}/secrets"
],
@@ -36602,6 +36630,12 @@ const Endpoints = {
getGithubActionsBillingUser: [
"GET /users/{username}/settings/billing/actions"
],
getGithubBillingPremiumRequestUsageReportOrg: [
"GET /organizations/{org}/settings/billing/premium_request/usage"
],
getGithubBillingPremiumRequestUsageReportUser: [
"GET /users/{username}/settings/billing/premium_request/usage"
],
getGithubBillingUsageReportOrg: [
"GET /organizations/{org}/settings/billing/usage"
],
@@ -36969,6 +37003,51 @@ const Endpoints = {
exportSbom: ["GET /repos/{owner}/{repo}/dependency-graph/sbom"]
},
emojis: { get: ["GET /emojis"] },
enterpriseTeamMemberships: {
add: [
"PUT /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}"
],
bulkAdd: [
"POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/add"
],
bulkRemove: [
"POST /enterprises/{enterprise}/teams/{enterprise-team}/memberships/remove"
],
get: [
"GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}"
],
list: ["GET /enterprises/{enterprise}/teams/{enterprise-team}/memberships"],
remove: [
"DELETE /enterprises/{enterprise}/teams/{enterprise-team}/memberships/{username}"
]
},
enterpriseTeamOrganizations: {
add: [
"PUT /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}"
],
bulkAdd: [
"POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/add"
],
bulkRemove: [
"POST /enterprises/{enterprise}/teams/{enterprise-team}/organizations/remove"
],
delete: [
"DELETE /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}"
],
getAssignment: [
"GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations/{org}"
],
getAssignments: [
"GET /enterprises/{enterprise}/teams/{enterprise-team}/organizations"
]
},
enterpriseTeams: {
create: ["POST /enterprises/{enterprise}/teams"],
delete: ["DELETE /enterprises/{enterprise}/teams/{team_slug}"],
get: ["GET /enterprises/{enterprise}/teams/{team_slug}"],
list: ["GET /enterprises/{enterprise}/teams"],
update: ["PATCH /enterprises/{enterprise}/teams/{team_slug}"]
},
gists: {
checkIsStarred: ["GET /gists/{gist_id}/star"],
create: ["POST /gists"],
@@ -37238,14 +37317,34 @@ const Endpoints = {
],
createInvitation: ["POST /orgs/{org}/invitations"],
createIssueType: ["POST /orgs/{org}/issue-types"],
createOrUpdateCustomProperties: ["PATCH /orgs/{org}/properties/schema"],
createOrUpdateCustomPropertiesValuesForRepos: [
"PATCH /orgs/{org}/properties/values"
createWebhook: ["POST /orgs/{org}/hooks"],
customPropertiesForOrgsCreateOrUpdateOrganizationValues: [
"PATCH /organizations/{org}/org-properties/values"
],
createOrUpdateCustomProperty: [
customPropertiesForOrgsGetOrganizationValues: [
"GET /organizations/{org}/org-properties/values"
],
customPropertiesForReposCreateOrUpdateOrganizationDefinition: [
"PUT /orgs/{org}/properties/schema/{custom_property_name}"
],
createWebhook: ["POST /orgs/{org}/hooks"],
customPropertiesForReposCreateOrUpdateOrganizationDefinitions: [
"PATCH /orgs/{org}/properties/schema"
],
customPropertiesForReposCreateOrUpdateOrganizationValues: [
"PATCH /orgs/{org}/properties/values"
],
customPropertiesForReposDeleteOrganizationDefinition: [
"DELETE /orgs/{org}/properties/schema/{custom_property_name}"
],
customPropertiesForReposGetOrganizationDefinition: [
"GET /orgs/{org}/properties/schema/{custom_property_name}"
],
customPropertiesForReposGetOrganizationDefinitions: [
"GET /orgs/{org}/properties/schema"
],
customPropertiesForReposGetOrganizationValues: [
"GET /orgs/{org}/properties/values"
],
delete: ["DELETE /orgs/{org}"],
deleteAttestationsBulk: ["POST /orgs/{org}/attestations/delete-request"],
deleteAttestationsById: [
@@ -37256,10 +37355,18 @@ const Endpoints = {
],
deleteIssueType: ["DELETE /orgs/{org}/issue-types/{issue_type_id}"],
deleteWebhook: ["DELETE /orgs/{org}/hooks/{hook_id}"],
disableSelectedRepositoryImmutableReleasesOrganization: [
"DELETE /orgs/{org}/settings/immutable-releases/repositories/{repository_id}"
],
enableSelectedRepositoryImmutableReleasesOrganization: [
"PUT /orgs/{org}/settings/immutable-releases/repositories/{repository_id}"
],
get: ["GET /orgs/{org}"],
getAllCustomProperties: ["GET /orgs/{org}/properties/schema"],
getCustomProperty: [
"GET /orgs/{org}/properties/schema/{custom_property_name}"
getImmutableReleasesSettings: [
"GET /orgs/{org}/settings/immutable-releases"
],
getImmutableReleasesSettingsRepositories: [
"GET /orgs/{org}/settings/immutable-releases/repositories"
],
getMembershipForAuthenticatedUser: ["GET /user/memberships/orgs/{org}"],
getMembershipForUser: ["GET /orgs/{org}/memberships/{username}"],
@@ -37278,12 +37385,12 @@ const Endpoints = {
listArtifactStorageRecords: [
"GET /orgs/{org}/artifacts/{subject_digest}/metadata/storage-records"
],
listAttestationRepositories: ["GET /orgs/{org}/attestations/repositories"],
listAttestations: ["GET /orgs/{org}/attestations/{subject_digest}"],
listAttestationsBulk: [
"POST /orgs/{org}/attestations/bulk-list{?per_page,before,after}"
],
listBlockedUsers: ["GET /orgs/{org}/blocks"],
listCustomPropertiesValuesForRepos: ["GET /orgs/{org}/properties/values"],
listFailedInvitations: ["GET /orgs/{org}/failed_invitations"],
listForAuthenticatedUser: ["GET /user/orgs"],
listForUser: ["GET /users/{username}/orgs"],
@@ -37321,9 +37428,6 @@ const Endpoints = {
redeliverWebhookDelivery: [
"POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts"
],
removeCustomProperty: [
"DELETE /orgs/{org}/properties/schema/{custom_property_name}"
],
removeMember: ["DELETE /orgs/{org}/members/{username}"],
removeMembershipForUser: ["DELETE /orgs/{org}/memberships/{username}"],
removeOutsideCollaborator: [
@@ -37357,6 +37461,12 @@ const Endpoints = {
revokeOrgRoleUser: [
"DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}"
],
setImmutableReleasesSettings: [
"PUT /orgs/{org}/settings/immutable-releases"
],
setImmutableReleasesSettingsRepositories: [
"PUT /orgs/{org}/settings/immutable-releases/repositories"
],
setMembershipForUser: ["PUT /orgs/{org}/memberships/{username}"],
setPublicMembershipForAuthenticatedUser: [
"PUT /orgs/{org}/public_members/{username}"
@@ -37478,40 +37588,42 @@ const Endpoints = {
},
projects: {
addItemForOrg: ["POST /orgs/{org}/projectsV2/{project_number}/items"],
addItemForUser: ["POST /users/{user_id}/projectsV2/{project_number}/items"],
addItemForUser: [
"POST /users/{username}/projectsV2/{project_number}/items"
],
deleteItemForOrg: [
"DELETE /orgs/{org}/projectsV2/{project_number}/items/{item_id}"
],
deleteItemForUser: [
"DELETE /users/{user_id}/projectsV2/{project_number}/items/{item_id}"
"DELETE /users/{username}/projectsV2/{project_number}/items/{item_id}"
],
getFieldForOrg: [
"GET /orgs/{org}/projectsV2/{project_number}/fields/{field_id}"
],
getFieldForUser: [
"GET /users/{user_id}/projectsV2/{project_number}/fields/{field_id}"
"GET /users/{username}/projectsV2/{project_number}/fields/{field_id}"
],
getForOrg: ["GET /orgs/{org}/projectsV2/{project_number}"],
getForUser: ["GET /users/{user_id}/projectsV2/{project_number}"],
getForUser: ["GET /users/{username}/projectsV2/{project_number}"],
getOrgItem: ["GET /orgs/{org}/projectsV2/{project_number}/items/{item_id}"],
getUserItem: [
"GET /users/{user_id}/projectsV2/{project_number}/items/{item_id}"
"GET /users/{username}/projectsV2/{project_number}/items/{item_id}"
],
listFieldsForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/fields"],
listFieldsForUser: [
"GET /users/{user_id}/projectsV2/{project_number}/fields"
"GET /users/{username}/projectsV2/{project_number}/fields"
],
listForOrg: ["GET /orgs/{org}/projectsV2"],
listForUser: ["GET /users/{username}/projectsV2"],
listItemsForOrg: ["GET /orgs/{org}/projectsV2/{project_number}/items"],
listItemsForUser: [
"GET /users/{user_id}/projectsV2/{project_number}/items"
"GET /users/{username}/projectsV2/{project_number}/items"
],
updateItemForOrg: [
"PATCH /orgs/{org}/projectsV2/{project_number}/items/{item_id}"
],
updateItemForUser: [
"PATCH /users/{user_id}/projectsV2/{project_number}/items/{item_id}"
"PATCH /users/{username}/projectsV2/{project_number}/items/{item_id}"
]
},
pulls: {
@@ -37674,6 +37786,7 @@ const Endpoints = {
"GET /repos/{owner}/{repo}/automated-security-fixes"
],
checkCollaborator: ["GET /repos/{owner}/{repo}/collaborators/{username}"],
checkImmutableReleases: ["GET /repos/{owner}/{repo}/immutable-releases"],
checkPrivateVulnerabilityReporting: [
"GET /repos/{owner}/{repo}/private-vulnerability-reporting"
],
@@ -37709,9 +37822,6 @@ const Endpoints = {
createForAuthenticatedUser: ["POST /user/repos"],
createFork: ["POST /repos/{owner}/{repo}/forks"],
createInOrg: ["POST /orgs/{org}/repos"],
createOrUpdateCustomPropertiesValues: [
"PATCH /repos/{owner}/{repo}/properties/values"
],
createOrUpdateEnvironment: [
"PUT /repos/{owner}/{repo}/environments/{environment_name}"
],
@@ -37725,6 +37835,12 @@ const Endpoints = {
"POST /repos/{template_owner}/{template_repo}/generate"
],
createWebhook: ["POST /repos/{owner}/{repo}/hooks"],
customPropertiesForReposCreateOrUpdateRepositoryValues: [
"PATCH /repos/{owner}/{repo}/properties/values"
],
customPropertiesForReposGetRepositoryValues: [
"GET /repos/{owner}/{repo}/properties/values"
],
declineInvitation: [
"DELETE /user/repository_invitations/{invitation_id}",
{},
@@ -37779,6 +37895,9 @@ const Endpoints = {
disableDeploymentProtectionRule: [
"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"
],
disableImmutableReleases: [
"DELETE /repos/{owner}/{repo}/immutable-releases"
],
disablePrivateVulnerabilityReporting: [
"DELETE /repos/{owner}/{repo}/private-vulnerability-reporting"
],
@@ -37795,6 +37914,7 @@ const Endpoints = {
enableAutomatedSecurityFixes: [
"PUT /repos/{owner}/{repo}/automated-security-fixes"
],
enableImmutableReleases: ["PUT /repos/{owner}/{repo}/immutable-releases"],
enablePrivateVulnerabilityReporting: [
"PUT /repos/{owner}/{repo}/private-vulnerability-reporting"
],
@@ -37846,7 +37966,6 @@ const Endpoints = {
getCustomDeploymentProtectionRule: [
"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}"
],
getCustomPropertiesValues: ["GET /repos/{owner}/{repo}/properties/values"],
getDeployKey: ["GET /repos/{owner}/{repo}/keys/{key_id}"],
getDeployment: ["GET /repos/{owner}/{repo}/deployments/{deployment_id}"],
getDeploymentBranchPolicy: [
@@ -38064,13 +38183,7 @@ const Endpoints = {
search: {
code: ["GET /search/code"],
commits: ["GET /search/commits"],
issuesAndPullRequests: [
"GET /search/issues",
{},
{
deprecated: "octokit.rest.search.issuesAndPullRequests() is deprecated, see https://docs.github.com/rest/search/search#search-issues-and-pull-requests"
}
],
issuesAndPullRequests: ["GET /search/issues"],
labels: ["GET /search/labels"],
repos: ["GET /search/repositories"],
topics: ["GET /search/topics"],
@@ -38084,9 +38197,6 @@ const Endpoints = {
"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"
],
getScanHistory: ["GET /repos/{owner}/{repo}/secret-scanning/scan-history"],
listAlertsForEnterprise: [
"GET /enterprises/{enterprise}/secret-scanning/alerts"
],
listAlertsForOrg: ["GET /orgs/{org}/secret-scanning/alerts"],
listAlertsForRepo: ["GET /repos/{owner}/{repo}/secret-scanning/alerts"],
listLocationsForAlert: [

View File

@@ -134,6 +134,10 @@ It defaults to `setup-uv-cache` in the `TMP` dir, `D:\a\_temp\setup-uv-cache` on
> If you configured [cache-dir](https://docs.astral.sh/uv/reference/settings/#cache-dir) in your
> config file then it is also respected and this action will not set `UV_CACHE_DIR`.
> [!NOTE]
> If caching is disabled, you can still use `cache-local-path` so this action sets `UV_CACHE_DIR`
> to your desired path.
```yaml
- name: Define a custom uv cache path
uses: astral-sh/setup-uv@v7

326
package-lock.json generated
View File

@@ -15,17 +15,17 @@
"@actions/glob": "^0.5.0",
"@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.2",
"@octokit/core": "^7.0.5",
"@octokit/plugin-paginate-rest": "^13.2.1",
"@octokit/plugin-rest-endpoint-methods": "^16.1.1",
"@octokit/core": "^7.0.6",
"@octokit/plugin-paginate-rest": "^14.0.0",
"@octokit/plugin-rest-endpoint-methods": "^17.0.0",
"@renovatebot/pep440": "^4.2.1",
"smol-toml": "^1.4.2",
"undici": "5.28.5"
},
"devDependencies": {
"@biomejs/biome": "2.3.0",
"@biomejs/biome": "2.3.7",
"@types/js-yaml": "^4.0.9",
"@types/node": "^24.9.1",
"@types/node": "^24.10.1",
"@types/semver": "^7.7.1",
"@vercel/ncc": "^0.38.4",
"jest": "^30.2.0",
@@ -890,9 +890,9 @@
"license": "MIT"
},
"node_modules/@biomejs/biome": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.3.0.tgz",
"integrity": "sha512-shdUY5H3S3tJVUWoVWo5ua+GdPW5lRHf+b0IwZ4OC1o2zOKQECZ6l2KbU6t89FNhtd3Qx5eg5N7/UsQWGQbAFw==",
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.3.7.tgz",
"integrity": "sha512-CTbAS/jNAiUc6rcq94BrTB8z83O9+BsgWj2sBCQg9rD6Wkh2gjfR87usjx0Ncx0zGXP1NKgT7JNglay5Zfs9jw==",
"dev": true,
"license": "MIT OR Apache-2.0",
"bin": {
@@ -906,20 +906,20 @@
"url": "https://opencollective.com/biome"
},
"optionalDependencies": {
"@biomejs/cli-darwin-arm64": "2.3.0",
"@biomejs/cli-darwin-x64": "2.3.0",
"@biomejs/cli-linux-arm64": "2.3.0",
"@biomejs/cli-linux-arm64-musl": "2.3.0",
"@biomejs/cli-linux-x64": "2.3.0",
"@biomejs/cli-linux-x64-musl": "2.3.0",
"@biomejs/cli-win32-arm64": "2.3.0",
"@biomejs/cli-win32-x64": "2.3.0"
"@biomejs/cli-darwin-arm64": "2.3.7",
"@biomejs/cli-darwin-x64": "2.3.7",
"@biomejs/cli-linux-arm64": "2.3.7",
"@biomejs/cli-linux-arm64-musl": "2.3.7",
"@biomejs/cli-linux-x64": "2.3.7",
"@biomejs/cli-linux-x64-musl": "2.3.7",
"@biomejs/cli-win32-arm64": "2.3.7",
"@biomejs/cli-win32-x64": "2.3.7"
}
},
"node_modules/@biomejs/cli-darwin-arm64": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.3.0.tgz",
"integrity": "sha512-3cJVT0Z5pbTkoBmbjmDZTDFYxIkRcrs9sYVJbIBHU8E6qQxgXAaBfSVjjCreG56rfDuQBr43GzwzmaHPcu4vlw==",
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.3.7.tgz",
"integrity": "sha512-LirkamEwzIUULhXcf2D5b+NatXKeqhOwilM+5eRkbrnr6daKz9rsBL0kNZ16Hcy4b8RFq22SG4tcLwM+yx/wFA==",
"cpu": [
"arm64"
],
@@ -934,9 +934,9 @@
}
},
"node_modules/@biomejs/cli-darwin-x64": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.3.0.tgz",
"integrity": "sha512-6LIkhglh3UGjuDqJXsK42qCA0XkD1Ke4K/raFOii7QQPbM8Pia7Qj2Hji4XuF2/R78hRmEx7uKJH3t/Y9UahtQ==",
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.3.7.tgz",
"integrity": "sha512-Q4TO633kvrMQkKIV7wmf8HXwF0dhdTD9S458LGE24TYgBjSRbuhvio4D5eOQzirEYg6eqxfs53ga/rbdd8nBKg==",
"cpu": [
"x64"
],
@@ -951,9 +951,9 @@
}
},
"node_modules/@biomejs/cli-linux-arm64": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.3.0.tgz",
"integrity": "sha512-uhAsbXySX7xsXahegDg5h3CDgfMcRsJvWLFPG0pjkylgBb9lErbK2C0UINW52zhwg0cPISB09lxHPxCau4e2xA==",
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.3.7.tgz",
"integrity": "sha512-inHOTdlstUBzgjDcx0ge71U4SVTbwAljmkfi3MC5WzsYCRhancqfeL+sa4Ke6v2ND53WIwCFD5hGsYExoI3EZQ==",
"cpu": [
"arm64"
],
@@ -968,9 +968,9 @@
}
},
"node_modules/@biomejs/cli-linux-arm64-musl": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.3.0.tgz",
"integrity": "sha512-nDksoFdwZ2YrE7NiYDhtMhL2UgFn8Kb7Y0bYvnTAakHnqEdb4lKindtBc1f+xg2Snz0JQhJUYO7r9CDBosRU5w==",
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.3.7.tgz",
"integrity": "sha512-/afy8lto4CB8scWfMdt+NoCZtatBUF62Tk3ilWH2w8ENd5spLhM77zKlFZEvsKJv9AFNHknMl03zO67CiklL2Q==",
"cpu": [
"arm64"
],
@@ -985,9 +985,9 @@
}
},
"node_modules/@biomejs/cli-linux-x64": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.3.0.tgz",
"integrity": "sha512-uxa8reA2s1VgoH8MhbGlCmMOt3JuSE1vJBifkh1ulaPiuk0SPx8cCdpnm9NWnTe2x/LfWInWx4sZ7muaXTPGGw==",
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.3.7.tgz",
"integrity": "sha512-fJMc3ZEuo/NaMYo5rvoWjdSS5/uVSW+HPRQujucpZqm2ZCq71b8MKJ9U4th9yrv2L5+5NjPF0nqqILCl8HY/fg==",
"cpu": [
"x64"
],
@@ -1002,9 +1002,9 @@
}
},
"node_modules/@biomejs/cli-linux-x64-musl": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.3.0.tgz",
"integrity": "sha512-+i9UcJwl99uAhtRQDz9jUAh+Xkb097eekxs/D9j4deWDg5/yB/jPWzISe1nBHvlzTXsdUSj0VvB4Go2DSpKIMw==",
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.3.7.tgz",
"integrity": "sha512-CQUtgH1tIN6e5wiYSJqzSwJumHYolNtaj1dwZGCnZXm2PZU1jOJof9TsyiP3bXNDb+VOR7oo7ZvY01If0W3iFQ==",
"cpu": [
"x64"
],
@@ -1019,9 +1019,9 @@
}
},
"node_modules/@biomejs/cli-win32-arm64": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.3.0.tgz",
"integrity": "sha512-ynjmsJLIKrAjC3CCnKMMhzcnNy8dbQWjKfSU5YA0mIruTxBNMbkAJp+Pr2iV7/hFou+66ZSD/WV8hmLEmhUaXA==",
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.3.7.tgz",
"integrity": "sha512-aJAE8eCNyRpcfx2JJAtsPtISnELJ0H4xVVSwnxm13bzI8RwbXMyVtxy2r5DV1xT3WiSP+7LxORcApWw0LM8HiA==",
"cpu": [
"arm64"
],
@@ -1036,9 +1036,9 @@
}
},
"node_modules/@biomejs/cli-win32-x64": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.3.0.tgz",
"integrity": "sha512-zOCYmCRVkWXc9v8P7OLbLlGGMxQTKMvi+5IC4v7O8DkjLCOHRzRVK/Lno2pGZNo0lzKM60pcQOhH8HVkXMQdFg==",
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.3.7.tgz",
"integrity": "sha512-pulzUshqv9Ed//MiE8MOUeeEkbkSHVDVY5Cz5wVAnH1DUqliCQG3j6s1POaITTFqFfo7AVIx2sWdKpx/GS+Nqw==",
"cpu": [
"x64"
],
@@ -1600,17 +1600,17 @@
}
},
"node_modules/@octokit/core": {
"version": "7.0.5",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.5.tgz",
"integrity": "sha512-t54CUOsFMappY1Jbzb7fetWeO0n6K0k/4+/ZpkS+3Joz8I4VcvY9OiEBFRYISqaI2fq5sCiPtAjRDOzVYG8m+Q==",
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.6.tgz",
"integrity": "sha512-DhGl4xMVFGVIyMwswXeyzdL4uXD5OGILGX5N8Y+f6W7LhC1Ze2poSNrkF/fedpVDHEEZ+PHFW0vL14I+mm8K3Q==",
"license": "MIT",
"peer": true,
"dependencies": {
"@octokit/auth-token": "^6.0.0",
"@octokit/graphql": "^9.0.2",
"@octokit/request": "^10.0.4",
"@octokit/request-error": "^7.0.1",
"@octokit/types": "^15.0.0",
"@octokit/graphql": "^9.0.3",
"@octokit/request": "^10.0.6",
"@octokit/request-error": "^7.0.2",
"@octokit/types": "^16.0.0",
"before-after-hook": "^4.0.0",
"universal-user-agent": "^7.0.0"
},
@@ -1619,12 +1619,12 @@
}
},
"node_modules/@octokit/endpoint": {
"version": "11.0.1",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.1.tgz",
"integrity": "sha512-7P1dRAZxuWAOPI7kXfio88trNi/MegQ0IJD3vfgC3b+LZo1Qe6gRJc2v0mz2USWWJOKrB2h5spXCzGbw+fAdqA==",
"version": "11.0.2",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.2.tgz",
"integrity": "sha512-4zCpzP1fWc7QlqunZ5bSEjxc6yLAlRTnDwKtgXfcI/FxxGoqedDG8V2+xJ60bV2kODqcGB+nATdtap/XYq2NZQ==",
"license": "MIT",
"dependencies": {
"@octokit/types": "^15.0.0",
"@octokit/types": "^16.0.0",
"universal-user-agent": "^7.0.2"
},
"engines": {
@@ -1632,13 +1632,13 @@
}
},
"node_modules/@octokit/graphql": {
"version": "9.0.2",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.2.tgz",
"integrity": "sha512-iz6KzZ7u95Fzy9Nt2L8cG88lGRMr/qy1Q36ih/XVzMIlPDMYwaNLE/ENhqmIzgPrlNWiYJkwmveEetvxAgFBJw==",
"version": "9.0.3",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.3.tgz",
"integrity": "sha512-grAEuupr/C1rALFnXTv6ZQhFuL1D8G5y8CN04RgrO4FIPMrtm+mcZzFG7dcBm+nq+1ppNixu+Jd78aeJOYxlGA==",
"license": "MIT",
"dependencies": {
"@octokit/request": "^10.0.4",
"@octokit/types": "^15.0.0",
"@octokit/request": "^10.0.6",
"@octokit/types": "^16.0.0",
"universal-user-agent": "^7.0.0"
},
"engines": {
@@ -1646,18 +1646,18 @@
}
},
"node_modules/@octokit/openapi-types": {
"version": "26.0.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-26.0.0.tgz",
"integrity": "sha512-7AtcfKtpo77j7Ts73b4OWhOZHTKo/gGY8bB3bNBQz4H+GRSWqx2yvj8TXRsbdTE0eRmYmXOEY66jM7mJ7LzfsA==",
"version": "27.0.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-27.0.0.tgz",
"integrity": "sha512-whrdktVs1h6gtR+09+QsNk2+FO+49j6ga1c55YZudfEG+oKJVvJLQi3zkOm5JjiUXAagWK2tI2kTGKJ2Ys7MGA==",
"license": "MIT"
},
"node_modules/@octokit/plugin-paginate-rest": {
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-13.2.1.tgz",
"integrity": "sha512-Tj4PkZyIL6eBMYcG/76QGsedF0+dWVeLhYprTmuFVVxzDW7PQh23tM0TP0z+1MvSkxB29YFZwnUX+cXfTiSdyw==",
"version": "14.0.0",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-14.0.0.tgz",
"integrity": "sha512-fNVRE7ufJiAA3XUrha2omTA39M6IXIc6GIZLvlbsm8QOQCYvpq/LkMNGyFlB1d8hTDzsAXa3OKtybdMAYsV/fw==",
"license": "MIT",
"dependencies": {
"@octokit/types": "^15.0.1"
"@octokit/types": "^16.0.0"
},
"engines": {
"node": ">= 20"
@@ -1667,12 +1667,12 @@
}
},
"node_modules/@octokit/plugin-rest-endpoint-methods": {
"version": "16.1.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-16.1.1.tgz",
"integrity": "sha512-VztDkhM0ketQYSh5Im3IcKWFZl7VIrrsCaHbDINkdYeiiAsJzjhS2xRFCSJgfN6VOcsoW4laMtsmf3HcNqIimg==",
"version": "17.0.0",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-17.0.0.tgz",
"integrity": "sha512-B5yCyIlOJFPqUUeiD0cnBJwWJO8lkJs5d8+ze9QDP6SvfiXSz1BF+91+0MeI1d2yxgOhU/O+CvtiZ9jSkHhFAw==",
"license": "MIT",
"dependencies": {
"@octokit/types": "^15.0.1"
"@octokit/types": "^16.0.0"
},
"engines": {
"node": ">= 20"
@@ -1682,14 +1682,14 @@
}
},
"node_modules/@octokit/request": {
"version": "10.0.5",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.5.tgz",
"integrity": "sha512-TXnouHIYLtgDhKo+N6mXATnDBkV05VwbR0TtMWpgTHIoQdRQfCSzmy/LGqR1AbRMbijq/EckC/E3/ZNcU92NaQ==",
"version": "10.0.7",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.7.tgz",
"integrity": "sha512-v93h0i1yu4idj8qFPZwjehoJx4j3Ntn+JhXsdJrG9pYaX6j/XRz2RmasMUHtNgQD39nrv/VwTWSqK0RNXR8upA==",
"license": "MIT",
"dependencies": {
"@octokit/endpoint": "^11.0.1",
"@octokit/request-error": "^7.0.1",
"@octokit/types": "^15.0.0",
"@octokit/endpoint": "^11.0.2",
"@octokit/request-error": "^7.0.2",
"@octokit/types": "^16.0.0",
"fast-content-type-parse": "^3.0.0",
"universal-user-agent": "^7.0.2"
},
@@ -1698,24 +1698,24 @@
}
},
"node_modules/@octokit/request-error": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.0.1.tgz",
"integrity": "sha512-CZpFwV4+1uBrxu7Cw8E5NCXDWFNf18MSY23TdxCBgjw1tXXHvTrZVsXlW8hgFTOLw8RQR1BBrMvYRtuyaijHMA==",
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.1.0.tgz",
"integrity": "sha512-KMQIfq5sOPpkQYajXHwnhjCC0slzCNScLHs9JafXc4RAJI+9f+jNDlBNaIMTvazOPLgb4BnlhGJOTbnN0wIjPw==",
"license": "MIT",
"dependencies": {
"@octokit/types": "^15.0.0"
"@octokit/types": "^16.0.0"
},
"engines": {
"node": ">= 20"
}
},
"node_modules/@octokit/types": {
"version": "15.0.1",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-15.0.1.tgz",
"integrity": "sha512-sdiirM93IYJ9ODDCBgmRPIboLbSkpLa5i+WLuXH8b8Atg+YMLAyLvDDhNWLV4OYd08tlvYfVm/dw88cqHWtw1Q==",
"version": "16.0.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-16.0.0.tgz",
"integrity": "sha512-sKq+9r1Mm4efXW1FCk7hFSeJo4QKreL/tTbR0rz/qx/r1Oa2VV83LTA/H/MuCOX7uCIJmQVRKBcbmWoySjAnSg==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^26.0.0"
"@octokit/openapi-types": "^27.0.0"
}
},
"node_modules/@opentelemetry/api": {
@@ -1900,9 +1900,9 @@
"license": "MIT"
},
"node_modules/@types/node": {
"version": "24.9.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.9.1.tgz",
"integrity": "sha512-QoiaXANRkSXK6p0Duvt56W208du4P9Uye9hWLWgGMDTEoKPhuenzNcC4vGUmrNkiOKTlIrBoyNQYNpSwfEZXSg==",
"version": "24.10.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz",
"integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==",
"license": "MIT",
"dependencies": {
"undici-types": "~7.16.0"
@@ -6395,74 +6395,74 @@
"dev": true
},
"@biomejs/biome": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.3.0.tgz",
"integrity": "sha512-shdUY5H3S3tJVUWoVWo5ua+GdPW5lRHf+b0IwZ4OC1o2zOKQECZ6l2KbU6t89FNhtd3Qx5eg5N7/UsQWGQbAFw==",
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.3.7.tgz",
"integrity": "sha512-CTbAS/jNAiUc6rcq94BrTB8z83O9+BsgWj2sBCQg9rD6Wkh2gjfR87usjx0Ncx0zGXP1NKgT7JNglay5Zfs9jw==",
"dev": true,
"requires": {
"@biomejs/cli-darwin-arm64": "2.3.0",
"@biomejs/cli-darwin-x64": "2.3.0",
"@biomejs/cli-linux-arm64": "2.3.0",
"@biomejs/cli-linux-arm64-musl": "2.3.0",
"@biomejs/cli-linux-x64": "2.3.0",
"@biomejs/cli-linux-x64-musl": "2.3.0",
"@biomejs/cli-win32-arm64": "2.3.0",
"@biomejs/cli-win32-x64": "2.3.0"
"@biomejs/cli-darwin-arm64": "2.3.7",
"@biomejs/cli-darwin-x64": "2.3.7",
"@biomejs/cli-linux-arm64": "2.3.7",
"@biomejs/cli-linux-arm64-musl": "2.3.7",
"@biomejs/cli-linux-x64": "2.3.7",
"@biomejs/cli-linux-x64-musl": "2.3.7",
"@biomejs/cli-win32-arm64": "2.3.7",
"@biomejs/cli-win32-x64": "2.3.7"
}
},
"@biomejs/cli-darwin-arm64": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.3.0.tgz",
"integrity": "sha512-3cJVT0Z5pbTkoBmbjmDZTDFYxIkRcrs9sYVJbIBHU8E6qQxgXAaBfSVjjCreG56rfDuQBr43GzwzmaHPcu4vlw==",
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.3.7.tgz",
"integrity": "sha512-LirkamEwzIUULhXcf2D5b+NatXKeqhOwilM+5eRkbrnr6daKz9rsBL0kNZ16Hcy4b8RFq22SG4tcLwM+yx/wFA==",
"dev": true,
"optional": true
},
"@biomejs/cli-darwin-x64": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.3.0.tgz",
"integrity": "sha512-6LIkhglh3UGjuDqJXsK42qCA0XkD1Ke4K/raFOii7QQPbM8Pia7Qj2Hji4XuF2/R78hRmEx7uKJH3t/Y9UahtQ==",
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.3.7.tgz",
"integrity": "sha512-Q4TO633kvrMQkKIV7wmf8HXwF0dhdTD9S458LGE24TYgBjSRbuhvio4D5eOQzirEYg6eqxfs53ga/rbdd8nBKg==",
"dev": true,
"optional": true
},
"@biomejs/cli-linux-arm64": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.3.0.tgz",
"integrity": "sha512-uhAsbXySX7xsXahegDg5h3CDgfMcRsJvWLFPG0pjkylgBb9lErbK2C0UINW52zhwg0cPISB09lxHPxCau4e2xA==",
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.3.7.tgz",
"integrity": "sha512-inHOTdlstUBzgjDcx0ge71U4SVTbwAljmkfi3MC5WzsYCRhancqfeL+sa4Ke6v2ND53WIwCFD5hGsYExoI3EZQ==",
"dev": true,
"optional": true
},
"@biomejs/cli-linux-arm64-musl": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.3.0.tgz",
"integrity": "sha512-nDksoFdwZ2YrE7NiYDhtMhL2UgFn8Kb7Y0bYvnTAakHnqEdb4lKindtBc1f+xg2Snz0JQhJUYO7r9CDBosRU5w==",
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.3.7.tgz",
"integrity": "sha512-/afy8lto4CB8scWfMdt+NoCZtatBUF62Tk3ilWH2w8ENd5spLhM77zKlFZEvsKJv9AFNHknMl03zO67CiklL2Q==",
"dev": true,
"optional": true
},
"@biomejs/cli-linux-x64": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.3.0.tgz",
"integrity": "sha512-uxa8reA2s1VgoH8MhbGlCmMOt3JuSE1vJBifkh1ulaPiuk0SPx8cCdpnm9NWnTe2x/LfWInWx4sZ7muaXTPGGw==",
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.3.7.tgz",
"integrity": "sha512-fJMc3ZEuo/NaMYo5rvoWjdSS5/uVSW+HPRQujucpZqm2ZCq71b8MKJ9U4th9yrv2L5+5NjPF0nqqILCl8HY/fg==",
"dev": true,
"optional": true
},
"@biomejs/cli-linux-x64-musl": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.3.0.tgz",
"integrity": "sha512-+i9UcJwl99uAhtRQDz9jUAh+Xkb097eekxs/D9j4deWDg5/yB/jPWzISe1nBHvlzTXsdUSj0VvB4Go2DSpKIMw==",
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.3.7.tgz",
"integrity": "sha512-CQUtgH1tIN6e5wiYSJqzSwJumHYolNtaj1dwZGCnZXm2PZU1jOJof9TsyiP3bXNDb+VOR7oo7ZvY01If0W3iFQ==",
"dev": true,
"optional": true
},
"@biomejs/cli-win32-arm64": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.3.0.tgz",
"integrity": "sha512-ynjmsJLIKrAjC3CCnKMMhzcnNy8dbQWjKfSU5YA0mIruTxBNMbkAJp+Pr2iV7/hFou+66ZSD/WV8hmLEmhUaXA==",
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.3.7.tgz",
"integrity": "sha512-aJAE8eCNyRpcfx2JJAtsPtISnELJ0H4xVVSwnxm13bzI8RwbXMyVtxy2r5DV1xT3WiSP+7LxORcApWw0LM8HiA==",
"dev": true,
"optional": true
},
"@biomejs/cli-win32-x64": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.3.0.tgz",
"integrity": "sha512-zOCYmCRVkWXc9v8P7OLbLlGGMxQTKMvi+5IC4v7O8DkjLCOHRzRVK/Lno2pGZNo0lzKM60pcQOhH8HVkXMQdFg==",
"version": "2.3.7",
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.3.7.tgz",
"integrity": "sha512-pulzUshqv9Ed//MiE8MOUeeEkbkSHVDVY5Cz5wVAnH1DUqliCQG3j6s1POaITTFqFfo7AVIx2sWdKpx/GS+Nqw==",
"dev": true,
"optional": true
},
@@ -6893,86 +6893,86 @@
"integrity": "sha512-P4YJBPdPSpWTQ1NU4XYdvHvXJJDxM6YwpS0FZHRgP7YFkdVxsWcpWGy/NVqlAA7PcPCnMacXlRm1y2PFZRWL/w=="
},
"@octokit/core": {
"version": "7.0.5",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.5.tgz",
"integrity": "sha512-t54CUOsFMappY1Jbzb7fetWeO0n6K0k/4+/ZpkS+3Joz8I4VcvY9OiEBFRYISqaI2fq5sCiPtAjRDOzVYG8m+Q==",
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.6.tgz",
"integrity": "sha512-DhGl4xMVFGVIyMwswXeyzdL4uXD5OGILGX5N8Y+f6W7LhC1Ze2poSNrkF/fedpVDHEEZ+PHFW0vL14I+mm8K3Q==",
"peer": true,
"requires": {
"@octokit/auth-token": "^6.0.0",
"@octokit/graphql": "^9.0.2",
"@octokit/request": "^10.0.4",
"@octokit/request-error": "^7.0.1",
"@octokit/types": "^15.0.0",
"@octokit/graphql": "^9.0.3",
"@octokit/request": "^10.0.6",
"@octokit/request-error": "^7.0.2",
"@octokit/types": "^16.0.0",
"before-after-hook": "^4.0.0",
"universal-user-agent": "^7.0.0"
}
},
"@octokit/endpoint": {
"version": "11.0.1",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.1.tgz",
"integrity": "sha512-7P1dRAZxuWAOPI7kXfio88trNi/MegQ0IJD3vfgC3b+LZo1Qe6gRJc2v0mz2USWWJOKrB2h5spXCzGbw+fAdqA==",
"version": "11.0.2",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.2.tgz",
"integrity": "sha512-4zCpzP1fWc7QlqunZ5bSEjxc6yLAlRTnDwKtgXfcI/FxxGoqedDG8V2+xJ60bV2kODqcGB+nATdtap/XYq2NZQ==",
"requires": {
"@octokit/types": "^15.0.0",
"@octokit/types": "^16.0.0",
"universal-user-agent": "^7.0.2"
}
},
"@octokit/graphql": {
"version": "9.0.2",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.2.tgz",
"integrity": "sha512-iz6KzZ7u95Fzy9Nt2L8cG88lGRMr/qy1Q36ih/XVzMIlPDMYwaNLE/ENhqmIzgPrlNWiYJkwmveEetvxAgFBJw==",
"version": "9.0.3",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.3.tgz",
"integrity": "sha512-grAEuupr/C1rALFnXTv6ZQhFuL1D8G5y8CN04RgrO4FIPMrtm+mcZzFG7dcBm+nq+1ppNixu+Jd78aeJOYxlGA==",
"requires": {
"@octokit/request": "^10.0.4",
"@octokit/types": "^15.0.0",
"@octokit/request": "^10.0.6",
"@octokit/types": "^16.0.0",
"universal-user-agent": "^7.0.0"
}
},
"@octokit/openapi-types": {
"version": "26.0.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-26.0.0.tgz",
"integrity": "sha512-7AtcfKtpo77j7Ts73b4OWhOZHTKo/gGY8bB3bNBQz4H+GRSWqx2yvj8TXRsbdTE0eRmYmXOEY66jM7mJ7LzfsA=="
"version": "27.0.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-27.0.0.tgz",
"integrity": "sha512-whrdktVs1h6gtR+09+QsNk2+FO+49j6ga1c55YZudfEG+oKJVvJLQi3zkOm5JjiUXAagWK2tI2kTGKJ2Ys7MGA=="
},
"@octokit/plugin-paginate-rest": {
"version": "13.2.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-13.2.1.tgz",
"integrity": "sha512-Tj4PkZyIL6eBMYcG/76QGsedF0+dWVeLhYprTmuFVVxzDW7PQh23tM0TP0z+1MvSkxB29YFZwnUX+cXfTiSdyw==",
"version": "14.0.0",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-14.0.0.tgz",
"integrity": "sha512-fNVRE7ufJiAA3XUrha2omTA39M6IXIc6GIZLvlbsm8QOQCYvpq/LkMNGyFlB1d8hTDzsAXa3OKtybdMAYsV/fw==",
"requires": {
"@octokit/types": "^15.0.1"
"@octokit/types": "^16.0.0"
}
},
"@octokit/plugin-rest-endpoint-methods": {
"version": "16.1.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-16.1.1.tgz",
"integrity": "sha512-VztDkhM0ketQYSh5Im3IcKWFZl7VIrrsCaHbDINkdYeiiAsJzjhS2xRFCSJgfN6VOcsoW4laMtsmf3HcNqIimg==",
"version": "17.0.0",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-17.0.0.tgz",
"integrity": "sha512-B5yCyIlOJFPqUUeiD0cnBJwWJO8lkJs5d8+ze9QDP6SvfiXSz1BF+91+0MeI1d2yxgOhU/O+CvtiZ9jSkHhFAw==",
"requires": {
"@octokit/types": "^15.0.1"
"@octokit/types": "^16.0.0"
}
},
"@octokit/request": {
"version": "10.0.5",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.5.tgz",
"integrity": "sha512-TXnouHIYLtgDhKo+N6mXATnDBkV05VwbR0TtMWpgTHIoQdRQfCSzmy/LGqR1AbRMbijq/EckC/E3/ZNcU92NaQ==",
"version": "10.0.7",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.7.tgz",
"integrity": "sha512-v93h0i1yu4idj8qFPZwjehoJx4j3Ntn+JhXsdJrG9pYaX6j/XRz2RmasMUHtNgQD39nrv/VwTWSqK0RNXR8upA==",
"requires": {
"@octokit/endpoint": "^11.0.1",
"@octokit/request-error": "^7.0.1",
"@octokit/types": "^15.0.0",
"@octokit/endpoint": "^11.0.2",
"@octokit/request-error": "^7.0.2",
"@octokit/types": "^16.0.0",
"fast-content-type-parse": "^3.0.0",
"universal-user-agent": "^7.0.2"
}
},
"@octokit/request-error": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.0.1.tgz",
"integrity": "sha512-CZpFwV4+1uBrxu7Cw8E5NCXDWFNf18MSY23TdxCBgjw1tXXHvTrZVsXlW8hgFTOLw8RQR1BBrMvYRtuyaijHMA==",
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.1.0.tgz",
"integrity": "sha512-KMQIfq5sOPpkQYajXHwnhjCC0slzCNScLHs9JafXc4RAJI+9f+jNDlBNaIMTvazOPLgb4BnlhGJOTbnN0wIjPw==",
"requires": {
"@octokit/types": "^15.0.0"
"@octokit/types": "^16.0.0"
}
},
"@octokit/types": {
"version": "15.0.1",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-15.0.1.tgz",
"integrity": "sha512-sdiirM93IYJ9ODDCBgmRPIboLbSkpLa5i+WLuXH8b8Atg+YMLAyLvDDhNWLV4OYd08tlvYfVm/dw88cqHWtw1Q==",
"version": "16.0.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-16.0.0.tgz",
"integrity": "sha512-sKq+9r1Mm4efXW1FCk7hFSeJo4QKreL/tTbR0rz/qx/r1Oa2VV83LTA/H/MuCOX7uCIJmQVRKBcbmWoySjAnSg==",
"requires": {
"@octokit/openapi-types": "^26.0.0"
"@octokit/openapi-types": "^27.0.0"
}
},
"@opentelemetry/api": {
@@ -7126,9 +7126,9 @@
"dev": true
},
"@types/node": {
"version": "24.9.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.9.1.tgz",
"integrity": "sha512-QoiaXANRkSXK6p0Duvt56W208du4P9Uye9hWLWgGMDTEoKPhuenzNcC4vGUmrNkiOKTlIrBoyNQYNpSwfEZXSg==",
"version": "24.10.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz",
"integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==",
"requires": {
"undici-types": "~7.16.0"
}

View File

@@ -17,7 +17,12 @@
"type": "git",
"url": "git+https://github.com/astral-sh/setup-uv.git"
},
"keywords": ["actions", "python", "setup", "uv"],
"keywords": [
"actions",
"python",
"setup",
"uv"
],
"author": "@eifinger",
"license": "MIT",
"dependencies": {
@@ -27,17 +32,17 @@
"@actions/glob": "^0.5.0",
"@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.2",
"@octokit/core": "^7.0.5",
"@octokit/plugin-paginate-rest": "^13.2.1",
"@octokit/plugin-rest-endpoint-methods": "^16.1.1",
"@octokit/core": "^7.0.6",
"@octokit/plugin-paginate-rest": "^14.0.0",
"@octokit/plugin-rest-endpoint-methods": "^17.0.0",
"@renovatebot/pep440": "^4.2.1",
"smol-toml": "^1.4.2",
"undici": "5.28.5"
},
"devDependencies": {
"@biomejs/biome": "2.3.0",
"@biomejs/biome": "2.3.7",
"@types/js-yaml": "^4.0.9",
"@types/node": "^24.9.1",
"@types/node": "^24.10.1",
"@types/semver": "^7.7.1",
"@vercel/ncc": "^0.38.4",
"jest": "^30.2.0",

View File

@@ -32,7 +32,12 @@ export async function restoreCache(): Promise<void> {
core.info(
`Trying to restore uv cache from GitHub Actions cache with key: ${cacheKey}`,
);
const cachePaths = [cacheLocalPath];
if (cacheLocalPath === undefined) {
throw new Error(
"cache-local-path is not set. Cannot restore cache without a valid cache path.",
);
}
const cachePaths = [cacheLocalPath.path];
if (cachePython) {
cachePaths.push(pythonDir);
}

View File

@@ -59,10 +59,18 @@ async function saveCache(): Promise<void> {
await pruneCache();
}
let actualCachePath = cacheLocalPath;
if (process.env.UV_CACHE_DIR && process.env.UV_CACHE_DIR !== cacheLocalPath) {
if (cacheLocalPath === undefined) {
throw new Error(
"cache-local-path is not set. Cannot save cache without a valid cache path.",
);
}
let actualCachePath = cacheLocalPath.path;
if (
process.env.UV_CACHE_DIR &&
process.env.UV_CACHE_DIR !== cacheLocalPath.path
) {
core.warning(
`The environment variable UV_CACHE_DIR has been changed to "${process.env.UV_CACHE_DIR}", by an action or step running after astral-sh/setup-uv. This can lead to unexpected behavior. If you expected this to happen set the cache-local-path input to "${process.env.UV_CACHE_DIR}" instead of "${cacheLocalPath}".`,
`The environment variable UV_CACHE_DIR has been changed to "${process.env.UV_CACHE_DIR}", by an action or step running after astral-sh/setup-uv. This can lead to unexpected behavior. If you expected this to happen set the cache-local-path input to "${process.env.UV_CACHE_DIR}" instead of "${cacheLocalPath.path}".`,
);
actualCachePath = process.env.UV_CACHE_DIR;
}

View File

@@ -8,11 +8,11 @@ import {
resolveVersion,
tryGetFromToolCache,
} from "./download/download-version";
import { getConfigValueFromTomlFile } from "./utils/config-file";
import { STATE_UV_PATH, STATE_UV_VERSION } from "./utils/constants";
import {
activateEnvironment as activateEnvironmentInput,
addProblemMatchers,
CacheLocalSource,
cacheLocalPath,
checkSum,
enableCache,
@@ -252,16 +252,15 @@ async function activateEnvironment(): Promise<void> {
}
function setCacheDir(): void {
if (enableCache) {
const cacheDirFromConfig = getConfigValueFromTomlFile("", "cache-dir");
if (cacheDirFromConfig !== undefined) {
if (cacheLocalPath !== undefined) {
if (cacheLocalPath.source === CacheLocalSource.Config) {
core.info(
"Using cache-dir from uv config file, not modifying UV_CACHE_DIR",
);
return;
}
core.exportVariable("UV_CACHE_DIR", cacheLocalPath);
core.info(`Set UV_CACHE_DIR to ${cacheLocalPath}`);
core.exportVariable("UV_CACHE_DIR", cacheLocalPath.path);
core.info(`Set UV_CACHE_DIR to ${cacheLocalPath.path}`);
}
}

View File

@@ -2,6 +2,13 @@ import path from "node:path";
import * as core from "@actions/core";
import { getConfigValueFromTomlFile } from "./config-file";
export enum CacheLocalSource {
Input,
Config,
Env,
Default,
}
export const workingDirectory = core.getInput("working-directory");
export const version = core.getInput("version");
export const versionFile = getVersionFile();
@@ -80,32 +87,51 @@ function getToolDir(): string | undefined {
return undefined;
}
function getCacheLocalPath(): string {
function getCacheLocalPath():
| {
path: string;
source: CacheLocalSource;
}
| undefined {
const cacheLocalPathInput = core.getInput("cache-local-path");
if (cacheLocalPathInput !== "") {
const tildeExpanded = expandTilde(cacheLocalPathInput);
return resolveRelativePath(tildeExpanded);
return {
path: resolveRelativePath(tildeExpanded),
source: CacheLocalSource.Input,
};
}
const cacheDirFromConfig = getCacheDirFromConfig();
if (cacheDirFromConfig !== undefined) {
return cacheDirFromConfig;
return { path: cacheDirFromConfig, source: CacheLocalSource.Config };
}
if (process.env.UV_CACHE_DIR !== undefined) {
core.info(`UV_CACHE_DIR is already set to ${process.env.UV_CACHE_DIR}`);
return process.env.UV_CACHE_DIR;
return { path: process.env.UV_CACHE_DIR, source: CacheLocalSource.Env };
}
if (process.env.RUNNER_ENVIRONMENT === "github-hosted") {
if (process.env.RUNNER_TEMP !== undefined) {
return `${process.env.RUNNER_TEMP}${path.sep}setup-uv-cache`;
if (getEnableCache()) {
if (process.env.RUNNER_ENVIRONMENT === "github-hosted") {
if (process.env.RUNNER_TEMP !== undefined) {
return {
path: `${process.env.RUNNER_TEMP}${path.sep}setup-uv-cache`,
source: CacheLocalSource.Default,
};
}
throw Error(
"Could not determine UV_CACHE_DIR. Please make sure RUNNER_TEMP is set or provide the cache-local-path input",
);
}
throw Error(
"Could not determine UV_CACHE_DIR. Please make sure RUNNER_TEMP is set or provide the cache-local-path input",
);
if (process.platform === "win32") {
return {
path: `${process.env.APPDATA}${path.sep}uv${path.sep}cache`,
source: CacheLocalSource.Default,
};
}
return {
path: `${process.env.HOME}${path.sep}.cache${path.sep}uv`,
source: CacheLocalSource.Default,
};
}
if (process.platform === "win32") {
return `${process.env.APPDATA}${path.sep}uv${path.sep}cache`;
}
return `${process.env.HOME}${path.sep}.cache${path.sep}uv`;
}
function getCacheDirFromConfig(): string | undefined {