mirror of
https://github.com/astral-sh/ruff-action.git
synced 2026-08-08 02:07:02 +00:00
Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39f75e526a | ||
|
|
e0aedf576b | ||
|
|
160796f1a1 | ||
|
|
a7b1296fb5 | ||
|
|
097d5252c8 | ||
|
|
5f8cbe30d7 | ||
|
|
d8f577dec4 | ||
|
|
f173943ec8 | ||
|
|
d34edb0565 | ||
|
|
f14634c415 | ||
|
|
47de3deae8 | ||
|
|
d8281c74d4 | ||
|
|
a634044659 |
@@ -35,7 +35,7 @@ jobs:
|
|||||||
- name: Compare the expected and actual dist/ directories
|
- name: Compare the expected and actual dist/ directories
|
||||||
run: |
|
run: |
|
||||||
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
|
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
|
||||||
echo "Detected uncommitted changes after build. See status below:"
|
echo "::error::Detected uncommitted changes after build. Run 'npm run build' and commit the changes."
|
||||||
git diff --text -v
|
git diff --text -v
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Actionlint
|
- name: Actionlint
|
||||||
uses: eifinger/actionlint-action@8ebeb40569f3c15ca66fe36d1b75f9b70c6c4f6e # v1.9.0
|
uses: eifinger/actionlint-action@23c85443d840cd73bbecb9cddfc933cc21649a38 # v1.9.1
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "20"
|
node-version: "20"
|
||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
npm run all
|
npm run all
|
||||||
- name: Make sure no changes from linters are detected
|
- name: Make sure no changes from linters are detected
|
||||||
run: |
|
run: |
|
||||||
git diff --exit-code
|
git diff --exit-code || (echo "::error::Please run 'npm run all' to fix the issues" && exit 1)
|
||||||
test-latest-version:
|
test-latest-version:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
@@ -51,6 +51,23 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.ruff-version }}
|
version: ${{ matrix.ruff-version }}
|
||||||
src: __tests__/fixtures/python-project
|
src: __tests__/fixtures/python-project
|
||||||
|
test-version-from-version-file-pyproject:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Use version from pyproject.toml
|
||||||
|
id: ruff-action
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
src: __tests__/fixtures/python-project
|
||||||
|
version-file: __tests__/fixtures/pyproject.toml
|
||||||
|
- name: Correct version gets installed
|
||||||
|
run: |
|
||||||
|
if [ "$RUFF_VERSION" != "0.9.3" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
|
||||||
test-default-version-from-pyproject:
|
test-default-version-from-pyproject:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -84,6 +101,57 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
env:
|
env:
|
||||||
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
|
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
|
||||||
|
test-default-version-from-pyproject-dependency-groups:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Use default version from pyproject.toml dependency groups
|
||||||
|
id: ruff-action
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
src: __tests__/fixtures/pyproject-dependency-groups-project
|
||||||
|
version-file: __tests__/fixtures/pyproject-dependency-groups-project/pyproject.toml
|
||||||
|
- name: Correct version gets installed
|
||||||
|
run: |
|
||||||
|
if [ "$RUFF_VERSION" != "0.8.3" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
|
||||||
|
test-default-version-from-pyproject-optional-dependencies:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Use default version from pyproject.toml optional dependencies
|
||||||
|
id: ruff-action
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
src: __tests__/fixtures/pyproject-optional-dependencies-project
|
||||||
|
version-file: __tests__/fixtures/pyproject-optional-dependencies-project/pyproject.toml
|
||||||
|
- name: Correct version gets installed
|
||||||
|
run: |
|
||||||
|
if [ "$RUFF_VERSION" != "0.8.3" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
|
||||||
|
test-default-version-from-requirements:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Use default version from requirements.txt
|
||||||
|
id: ruff-action
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
src: __tests__/fixtures/python-project
|
||||||
|
version-file: __tests__/fixtures/requirements.txt
|
||||||
|
- name: Correct version gets installed
|
||||||
|
run: |
|
||||||
|
if [ "$RUFF_VERSION" != "0.9.0" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
|
||||||
test-semver-range:
|
test-semver-range:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
name: "Update known checksums"
|
name: "Update known checksums"
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 4 * * *" # Run every day at 4am UTC
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -81,7 +81,8 @@ This action adds ruff to the PATH, so you can use it in subsequent steps.
|
|||||||
|
|
||||||
By default this action looks for a pyproject.toml file in the root of the repository to determine
|
By default this action looks for a pyproject.toml file in the root of the repository to determine
|
||||||
the ruff version to install. If no pyproject.toml file is found, or no ruff version is defined in
|
the ruff version to install. If no pyproject.toml file is found, or no ruff version is defined in
|
||||||
either `dependencies` or `dependency-groups.dev` the latest version is installed.
|
`project.dependencies`, `project.optional-dependencies`, or `dependency-groups`,
|
||||||
|
the latest version is installed.
|
||||||
|
|
||||||
#### Install the latest version
|
#### Install the latest version
|
||||||
|
|
||||||
@@ -123,13 +124,13 @@ to install the latest version that satisfies the range.
|
|||||||
#### Install a version from a specified version file
|
#### Install a version from a specified version file
|
||||||
|
|
||||||
You can specify a file to read the version from.
|
You can specify a file to read the version from.
|
||||||
Currently `pyproject.toml` is supported.
|
Currently `pyproject.toml` and `requirements.txt` are supported.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Install a version from a specified version file
|
- name: Install a version from a specified version file
|
||||||
uses: astral-sh/ruff-action@v3
|
uses: astral-sh/ruff-action@v3
|
||||||
with:
|
with:
|
||||||
version-file: "my-path/to/pyproject.toml"
|
version-file: "my-path/to/pyproject.toml-or-requirements.txt"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Validate checksum
|
### Validate checksum
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
[project]
|
||||||
|
name = "pyproject-dependency-groups-project"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = "Add your description here"
|
||||||
|
readme = "README.md"
|
||||||
|
requires-python = ">=3.12"
|
||||||
|
|
||||||
|
[dependency-groups]
|
||||||
|
dev = [
|
||||||
|
{ include-group = "docs" },
|
||||||
|
{ include-group = "lint" },
|
||||||
|
]
|
||||||
|
docs = [
|
||||||
|
"sphinx",
|
||||||
|
]
|
||||||
|
lint = [
|
||||||
|
"ruff==0.8.3",
|
||||||
|
]
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = ["hatchling"]
|
||||||
|
build-backend = "hatchling.build"
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
def hello() -> str:
|
||||||
|
return "Hello from python-project!"
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
print("Hello world!")
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
[project]
|
||||||
|
name = "pyproject-optional-dependencies-project"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = "Add your description here"
|
||||||
|
readme = "README.md"
|
||||||
|
requires-python = ">=3.12"
|
||||||
|
|
||||||
|
[project.optional-dependencies]
|
||||||
|
lint = [
|
||||||
|
"ruff==0.8.3",
|
||||||
|
]
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = ["hatchling"]
|
||||||
|
build-backend = "hatchling.build"
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
def hello() -> str:
|
||||||
|
return "Hello from python-project!"
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
print("Hello world!")
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
[project]
|
||||||
|
name = "pyython-project"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = "Add your description here"
|
||||||
|
readme = "README.md"
|
||||||
|
requires-python = ">=3.12"
|
||||||
|
dependencies = [
|
||||||
|
"ruff==0.9.3",
|
||||||
|
]
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = ["hatchling"]
|
||||||
|
build-backend = "hatchling.build"
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
ruff==0.9.0
|
||||||
+4098
-4420
File diff suppressed because it is too large
Load Diff
+4028
-4392
File diff suppressed because it is too large
Load Diff
Generated
+89
-139
@@ -11,13 +11,15 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.11.1",
|
"@actions/core": "^1.11.1",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.1.1",
|
||||||
"@actions/github": "^6.0.0",
|
"@actions/tool-cache": "^2.0.2",
|
||||||
"@actions/tool-cache": "^2.0.1",
|
"@octokit/core": "^6.1.4",
|
||||||
|
"@octokit/plugin-paginate-rest": "^11.4.2",
|
||||||
|
"@octokit/plugin-rest-endpoint-methods": "^13.3.1",
|
||||||
"smol-toml": "^1.3.1"
|
"smol-toml": "^1.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "1.9.4",
|
"@biomejs/biome": "1.9.4",
|
||||||
"@types/node": "^22.10.10",
|
"@types/node": "^22.13.4",
|
||||||
"@types/semver": "^7.5.8",
|
"@types/semver": "^7.5.8",
|
||||||
"@vercel/ncc": "^0.38.3",
|
"@vercel/ncc": "^0.38.3",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
@@ -41,17 +43,6 @@
|
|||||||
"@actions/io": "^1.0.1"
|
"@actions/io": "^1.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@actions/github": {
|
|
||||||
"version": "6.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.0.tgz",
|
|
||||||
"integrity": "sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==",
|
|
||||||
"dependencies": {
|
|
||||||
"@actions/http-client": "^2.2.0",
|
|
||||||
"@octokit/core": "^5.0.1",
|
|
||||||
"@octokit/plugin-paginate-rest": "^9.0.0",
|
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^10.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@actions/http-client": {
|
"node_modules/@actions/http-client": {
|
||||||
"version": "2.2.3",
|
"version": "2.2.3",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz",
|
||||||
@@ -67,16 +58,15 @@
|
|||||||
"integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q=="
|
"integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q=="
|
||||||
},
|
},
|
||||||
"node_modules/@actions/tool-cache": {
|
"node_modules/@actions/tool-cache": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-2.0.2.tgz",
|
||||||
"integrity": "sha512-iPU+mNwrbA8jodY8eyo/0S/QqCKDajiR8OxWTnSk/SnYg0sj8Hp4QcUEVC1YFpHWXtrfbQrE13Jz4k4HXJQKcA==",
|
"integrity": "sha512-fBhNNOWxuoLxztQebpOaWu6WeVmuwa77Z+DxIZ1B+OYvGkGQon6kTVg6Z32Cb13WCuw0szqonK+hh03mJV7Z6w==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.11.1",
|
||||||
"@actions/exec": "^1.0.0",
|
"@actions/exec": "^1.0.0",
|
||||||
"@actions/http-client": "^2.0.1",
|
"@actions/http-client": "^2.0.1",
|
||||||
"@actions/io": "^1.1.1",
|
"@actions/io": "^1.1.1",
|
||||||
"semver": "^6.1.0",
|
"semver": "^6.1.0"
|
||||||
"uuid": "^3.3.2"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@biomejs/biome": {
|
"node_modules/@biomejs/biome": {
|
||||||
@@ -243,155 +233,127 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/auth-token": {
|
"node_modules/@octokit/auth-token": {
|
||||||
"version": "4.0.0",
|
"version": "5.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.2.tgz",
|
||||||
"integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==",
|
"integrity": "sha512-JcQDsBdg49Yky2w2ld20IHAlwr8d/d8N6NiOXbtuoPCqzbsiJgF633mVUw3x4mo0H5ypataQIX7SFu3yy44Mpw==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/core": {
|
"node_modules/@octokit/core": {
|
||||||
"version": "5.2.0",
|
"version": "6.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.4.tgz",
|
||||||
"integrity": "sha512-1LFfa/qnMQvEOAdzlQymH0ulepxbxnCYAKJZfMci/5XJyIHWgEYnDmgnKakbTh7CH2tFQ5O60oYDvns4i9RAIg==",
|
"integrity": "sha512-lAS9k7d6I0MPN+gb9bKDt7X8SdxknYqAMh44S5L+lNqIN2NuV8nvv3g8rPp7MuRxcOpxpUIATWprO0C34a8Qmg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/auth-token": "^4.0.0",
|
"@octokit/auth-token": "^5.0.0",
|
||||||
"@octokit/graphql": "^7.1.0",
|
"@octokit/graphql": "^8.1.2",
|
||||||
"@octokit/request": "^8.3.1",
|
"@octokit/request": "^9.2.1",
|
||||||
"@octokit/request-error": "^5.1.0",
|
"@octokit/request-error": "^6.1.7",
|
||||||
"@octokit/types": "^13.0.0",
|
"@octokit/types": "^13.6.2",
|
||||||
"before-after-hook": "^2.2.0",
|
"before-after-hook": "^3.0.2",
|
||||||
"universal-user-agent": "^6.0.0"
|
"universal-user-agent": "^7.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/endpoint": {
|
"node_modules/@octokit/endpoint": {
|
||||||
"version": "9.0.5",
|
"version": "10.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.3.tgz",
|
||||||
"integrity": "sha512-ekqR4/+PCLkEBF6qgj8WqJfvDq65RH85OAgrtnVp1mSxaXF03u2xW/hUdweGS5654IlC0wkNYC18Z50tSYTAFw==",
|
"integrity": "sha512-nBRBMpKPhQUxCsQQeW+rCJ/OPSMcj3g0nfHn01zGYZXuNDvvXudF/TYY6APj5THlurerpFN4a/dQAIAaM6BYhA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^13.1.0",
|
"@octokit/types": "^13.6.2",
|
||||||
"universal-user-agent": "^6.0.0"
|
"universal-user-agent": "^7.0.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/graphql": {
|
"node_modules/@octokit/graphql": {
|
||||||
"version": "7.1.0",
|
"version": "8.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-8.1.2.tgz",
|
||||||
"integrity": "sha512-r+oZUH7aMFui1ypZnAvZmn0KSqAUgE1/tUXIWaqUCa1758ts/Jio84GZuzsvUkme98kv0WFY8//n0J1Z+vsIsQ==",
|
"integrity": "sha512-bdlj/CJVjpaz06NBpfHhp4kGJaRZfz7AzC+6EwUImRtrwIw8dIgJ63Xg0OzV9pRn3rIzrt5c2sa++BL0JJ8GLw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/request": "^8.3.0",
|
"@octokit/request": "^9.1.4",
|
||||||
"@octokit/types": "^13.0.0",
|
"@octokit/types": "^13.6.2",
|
||||||
"universal-user-agent": "^6.0.0"
|
"universal-user-agent": "^7.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/openapi-types": {
|
"node_modules/@octokit/openapi-types": {
|
||||||
"version": "22.2.0",
|
"version": "23.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-23.0.1.tgz",
|
||||||
"integrity": "sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg=="
|
"integrity": "sha512-izFjMJ1sir0jn0ldEKhZ7xegCTj/ObmEDlEfpFrx4k/JyZSMRHbO3/rBwgE7f3m2DHt+RrNGIVw4wSmwnm3t/g=="
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/plugin-paginate-rest": {
|
"node_modules/@octokit/plugin-paginate-rest": {
|
||||||
"version": "9.2.1",
|
"version": "11.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-9.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.4.2.tgz",
|
||||||
"integrity": "sha512-wfGhE/TAkXZRLjksFXuDZdmGnJQHvtU/joFQdweXUgzo1XwvBCD4o4+75NtFfjfLK5IwLf9vHTfSiU3sLRYpRw==",
|
"integrity": "sha512-BXJ7XPCTDXFF+wxcg/zscfgw2O/iDPtNSkwwR1W1W5c4Mb3zav/M2XvxQ23nVmKj7jpweB4g8viMeCQdm7LMVA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^12.6.0"
|
"@octokit/types": "^13.7.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@octokit/core": "5"
|
"@octokit/core": ">=6"
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "20.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
|
|
||||||
"integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA=="
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": {
|
|
||||||
"version": "12.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
|
|
||||||
"integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^20.0.0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods": {
|
"node_modules/@octokit/plugin-rest-endpoint-methods": {
|
||||||
"version": "10.4.1",
|
"version": "13.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-10.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.3.1.tgz",
|
||||||
"integrity": "sha512-xV1b+ceKV9KytQe3zCVqjg+8GTGfDYwaT1ATU5isiUyVtlVAO3HNdzpS4sr4GBx4hxQ46s7ITtZrAsxG22+rVg==",
|
"integrity": "sha512-o8uOBdsyR+WR8MK9Cco8dCgvG13H1RlM1nWnK/W7TEACQBFux/vPREgKucxUfuDQ5yi1T3hGf4C5ZmZXAERgwQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^12.6.0"
|
"@octokit/types": "^13.8.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@octokit/core": "5"
|
"@octokit/core": ">=6"
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "20.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-20.0.0.tgz",
|
|
||||||
"integrity": "sha512-EtqRBEjp1dL/15V7WiX5LJMIxxkdiGJnabzYx5Apx4FkQIFgAfKumXeYAqqJCj1s+BMX4cPFIFC4OLCR6stlnA=="
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": {
|
|
||||||
"version": "12.6.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.6.0.tgz",
|
|
||||||
"integrity": "sha512-1rhSOfRa6H9w4YwK0yrf5faDaDTb+yLyBUKOCV4xtCDB5VmIPqd/v9yr9o6SAzOAlRxMiRiCic6JVM1/kunVkw==",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^20.0.0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/request": {
|
"node_modules/@octokit/request": {
|
||||||
"version": "8.4.0",
|
"version": "9.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.2.2.tgz",
|
||||||
"integrity": "sha512-9Bb014e+m2TgBeEJGEbdplMVWwPmL1FPtggHQRkV+WVsMggPtEkLKPlcVYm/o8xKLkpJ7B+6N8WfQMtDLX2Dpw==",
|
"integrity": "sha512-dZl0ZHx6gOQGcffgm1/Sf6JfEpmh34v3Af2Uci02vzUYz6qEN6zepoRtmybWXIGXFIK8K9ylE3b+duCWqhArtg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/endpoint": "^9.0.1",
|
"@octokit/endpoint": "^10.1.3",
|
||||||
"@octokit/request-error": "^5.1.0",
|
"@octokit/request-error": "^6.1.7",
|
||||||
"@octokit/types": "^13.1.0",
|
"@octokit/types": "^13.6.2",
|
||||||
"universal-user-agent": "^6.0.0"
|
"fast-content-type-parse": "^2.0.0",
|
||||||
|
"universal-user-agent": "^7.0.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/request-error": {
|
"node_modules/@octokit/request-error": {
|
||||||
"version": "5.1.0",
|
"version": "6.1.7",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.7.tgz",
|
||||||
"integrity": "sha512-GETXfE05J0+7H2STzekpKObFe765O5dlAKUTLNGeH+x47z7JjXHfsHKo5z21D/o/IOZTUEI6nyWyR+bZVP/n5Q==",
|
"integrity": "sha512-69NIppAwaauwZv6aOzb+VVLwt+0havz9GT5YplkeJv7fG7a40qpLt/yZKyiDxAhgz0EtgNdNcb96Z0u+Zyuy2g==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^13.1.0",
|
"@octokit/types": "^13.6.2"
|
||||||
"deprecation": "^2.0.0",
|
|
||||||
"once": "^1.4.0"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/types": {
|
"node_modules/@octokit/types": {
|
||||||
"version": "13.6.1",
|
"version": "13.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
|
||||||
"integrity": "sha512-PHZE9Z+kWXb23Ndik8MKPirBPziOc0D2/3KH1P+6jK5nGWe96kadZuE4jev2/Jq7FvIfTlT2Ltg8Fv2x1v0a5g==",
|
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/openapi-types": "^22.2.0"
|
"@octokit/openapi-types": "^23.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "22.10.10",
|
"version": "22.13.4",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.10.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.4.tgz",
|
||||||
"integrity": "sha512-X47y/mPNzxviAGY5TcYPtYL8JsY3kAq2n8fMmKoRCxq/c4v4pyGNCzM2R6+M5/umG4ZfHuT+sgqDYqWc9rJ6ww==",
|
"integrity": "sha512-ywP2X0DYtX3y08eFVx5fNIw7/uIv8hYUKgXoK8oayJlLnKcRfEYCxWMVE1XagUdVtCJlZT1AU4LXEABW+L1Peg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~6.20.0"
|
"undici-types": "~6.20.0"
|
||||||
}
|
}
|
||||||
@@ -418,14 +380,24 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/before-after-hook": {
|
"node_modules/before-after-hook": {
|
||||||
"version": "2.2.3",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-3.0.2.tgz",
|
||||||
"integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
|
"integrity": "sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A=="
|
||||||
},
|
},
|
||||||
"node_modules/deprecation": {
|
"node_modules/fast-content-type-parse": {
|
||||||
"version": "2.3.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-2.0.1.tgz",
|
||||||
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
|
"integrity": "sha512-nGqtvLrj5w0naR6tDPfB4cUmYCqouzyQiz6C5y/LtcDllJdrcc6WaWW6iXyIIOErTa/XRybj28aasdn4LkVk6Q==",
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/fastify"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/fastify"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"node_modules/js-yaml": {
|
"node_modules/js-yaml": {
|
||||||
"version": "4.1.0",
|
"version": "4.1.0",
|
||||||
@@ -439,14 +411,6 @@
|
|||||||
"js-yaml": "bin/js-yaml.js"
|
"js-yaml": "bin/js-yaml.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/once": {
|
|
||||||
"version": "1.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
|
||||||
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
|
||||||
"dependencies": {
|
|
||||||
"wrappy": "1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/semver": {
|
"node_modules/semver": {
|
||||||
"version": "6.3.1",
|
"version": "6.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||||
@@ -488,9 +452,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici": {
|
"node_modules/undici": {
|
||||||
"version": "5.28.4",
|
"version": "5.28.5",
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz",
|
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz",
|
||||||
"integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==",
|
"integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fastify/busboy": "^2.0.0"
|
"@fastify/busboy": "^2.0.0"
|
||||||
},
|
},
|
||||||
@@ -506,23 +470,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/universal-user-agent": {
|
"node_modules/universal-user-agent": {
|
||||||
"version": "6.0.1",
|
"version": "7.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz",
|
||||||
"integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ=="
|
"integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q=="
|
||||||
},
|
|
||||||
"node_modules/uuid": {
|
|
||||||
"version": "3.4.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
|
|
||||||
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
|
|
||||||
"deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.",
|
|
||||||
"bin": {
|
|
||||||
"uuid": "bin/uuid"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/wrappy": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
|
||||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-4
@@ -12,7 +12,7 @@
|
|||||||
"package": "ncc build -o dist/ruff-action src/ruff-action.ts && ncc build -o dist/update-known-checksums src/update-known-checksums.ts",
|
"package": "ncc build -o dist/ruff-action src/ruff-action.ts && ncc build -o dist/update-known-checksums src/update-known-checksums.ts",
|
||||||
"act": "act pull_request -W .github/workflows/test.yml --container-architecture linux/amd64 -s GITHUB_TOKEN=\"$(gh auth token)\"",
|
"act": "act pull_request -W .github/workflows/test.yml --container-architecture linux/amd64 -s GITHUB_TOKEN=\"$(gh auth token)\"",
|
||||||
"update-known-checksums": "RUNNER_TEMP=known_checksums node dist/update-known-checksums/index.js src/download/checksum/known-checksums.ts \"$(gh auth token)\"",
|
"update-known-checksums": "RUNNER_TEMP=known_checksums node dist/update-known-checksums/index.js src/download/checksum/known-checksums.ts \"$(gh auth token)\"",
|
||||||
"all": "npm run build && npm run format && npm run lint && npm run package"
|
"all": "npm install && npm run build && npm run format && npm run lint && npm run package"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -24,13 +24,15 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.11.1",
|
"@actions/core": "^1.11.1",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.1.1",
|
||||||
"@actions/github": "^6.0.0",
|
"@actions/tool-cache": "^2.0.2",
|
||||||
"@actions/tool-cache": "^2.0.1",
|
"@octokit/core": "^6.1.4",
|
||||||
|
"@octokit/plugin-paginate-rest": "^11.4.2",
|
||||||
|
"@octokit/plugin-rest-endpoint-methods": "^13.3.1",
|
||||||
"smol-toml": "^1.3.1"
|
"smol-toml": "^1.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "1.9.4",
|
"@biomejs/biome": "1.9.4",
|
||||||
"@types/node": "^22.10.10",
|
"@types/node": "^22.13.4",
|
||||||
"@types/semver": "^7.5.8",
|
"@types/semver": "^7.5.8",
|
||||||
"@vercel/ncc": "^0.38.3",
|
"@vercel/ncc": "^0.38.3",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
|
|||||||
@@ -1,5 +1,107 @@
|
|||||||
// AUTOGENERATED_DO_NOT_EDIT
|
// AUTOGENERATED_DO_NOT_EDIT
|
||||||
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
|
export const KNOWN_CHECKSUMS: { [key: string]: string } = {
|
||||||
|
"aarch64-apple-darwin-0.9.6":
|
||||||
|
"a3132eb5e3d95f36d378144082276fbed0309789dadb19d8a4c41ec5e80451fb",
|
||||||
|
"aarch64-pc-windows-msvc-0.9.6":
|
||||||
|
"7c397ec18e458c7a7e49277d7d719b0b6bf2f459f570e01a9f1d1906d678190e",
|
||||||
|
"aarch64-unknown-linux-gnu-0.9.6":
|
||||||
|
"cf796c953def5a7102002372893942fac875ac718355698a4a70405104dfbb6c",
|
||||||
|
"aarch64-unknown-linux-musl-0.9.6":
|
||||||
|
"8f64e97deae1c12f659fd13e6e14d78cf15ed876d1548ac76b235f78ab5803e1",
|
||||||
|
"arm-unknown-linux-musleabihf-0.9.6":
|
||||||
|
"ec72087fa80aff95871aac0f8aa8ca708a82c6789641ac8362fb58212cfc5410",
|
||||||
|
"armv7-unknown-linux-gnueabihf-0.9.6":
|
||||||
|
"fba48ab2b77a358c2600d5636759ed779b29bebcc8de66e331c00d7704c41d1c",
|
||||||
|
"armv7-unknown-linux-musleabihf-0.9.6":
|
||||||
|
"4944aafeab7ce9cb5a000bdaf71e38a917b506574f859d333bd4698efd5fd3bc",
|
||||||
|
"i686-pc-windows-msvc-0.9.6":
|
||||||
|
"05c50165f1330d797de444d99c1c9230dcb2377c2a7ff9b9f8718dc5617c1d4b",
|
||||||
|
"i686-unknown-linux-gnu-0.9.6":
|
||||||
|
"508a2f35904b986bf7cf7e2a73d138b1ca590daf4ee562c4630c60aa5ba39922",
|
||||||
|
"i686-unknown-linux-musl-0.9.6":
|
||||||
|
"16acf21b61fa006b5642443bba4c52e84d2ce2b15cba1f616a856956c5a2ea49",
|
||||||
|
"powerpc64-unknown-linux-gnu-0.9.6":
|
||||||
|
"1309f5489bccfb99084f9686ec20ca1295d7aa976a2c3e6dbeb822564269cbfb",
|
||||||
|
"powerpc64le-unknown-linux-gnu-0.9.6":
|
||||||
|
"ff0e02c901869fef9c7434be347959ddca64f585a089ac6485592c91c279c803",
|
||||||
|
"s390x-unknown-linux-gnu-0.9.6":
|
||||||
|
"c5ce85e5913c2d34d3332452e01c12e28a45c15ff33c8e8d30572070979230ba",
|
||||||
|
"x86_64-apple-darwin-0.9.6":
|
||||||
|
"ec88c095036b25e95391ea202fcc9496d565f4e43152db10785eb9757ea0815d",
|
||||||
|
"x86_64-pc-windows-msvc-0.9.6":
|
||||||
|
"51f492e46d967c6a3bb63d5e245e8f454ccf6f5207b6f3c4f1b63a8bec30d954",
|
||||||
|
"x86_64-unknown-linux-gnu-0.9.6":
|
||||||
|
"bed850f15d4d5aaaef2b6a131bfecd5b9d7d3191596249d07e576bd9fd37078e",
|
||||||
|
"x86_64-unknown-linux-musl-0.9.6":
|
||||||
|
"c725f57aa11d636f1d7f0f378c604d4db29c4dbb5ff0578f9fbbc578364875df",
|
||||||
|
"aarch64-apple-darwin-0.9.5":
|
||||||
|
"8c9ae3e71317b67f46752a239f8d1044c60ba9d1748d3146af6ed26679eb697f",
|
||||||
|
"aarch64-pc-windows-msvc-0.9.5":
|
||||||
|
"75882eebde374c8f6016f3501c4a769ec1d13cb07798de77187542f9928eba44",
|
||||||
|
"aarch64-unknown-linux-gnu-0.9.5":
|
||||||
|
"e637a06d4b8b9f5cced6ad6f1f0a6ec5c1f632db7a3413cac76b61e670409afa",
|
||||||
|
"aarch64-unknown-linux-musl-0.9.5":
|
||||||
|
"3c5085b2b410ac9449c72d659ac9812eb75cf2619253e53915507a7fec5267f0",
|
||||||
|
"arm-unknown-linux-musleabihf-0.9.5":
|
||||||
|
"d92bd2ca743d7e5cad0c63597f05c5e97f92940e8fe2e9f388185e7c5ebedd31",
|
||||||
|
"armv7-unknown-linux-gnueabihf-0.9.5":
|
||||||
|
"61cef37c13e16eb3ac06c46e9d80a8da21a08882d3bd9171a3aaa17f770c23aa",
|
||||||
|
"armv7-unknown-linux-musleabihf-0.9.5":
|
||||||
|
"167fc22a232f37d77f1bcb580ebe26f13b57130d656c5970ceadc7f356dcbe5a",
|
||||||
|
"i686-pc-windows-msvc-0.9.5":
|
||||||
|
"6ea88e4aab7c4bc3e8c6f580b814d3a5aa05795e10c9b01e467ecfa8fdc58823",
|
||||||
|
"i686-unknown-linux-gnu-0.9.5":
|
||||||
|
"3ba63fab8cb42b689543eb560e3301dff320f01f24603cc09552b644266a081d",
|
||||||
|
"i686-unknown-linux-musl-0.9.5":
|
||||||
|
"307a970b43dfaa419d2baf340555a3ee78eaa65d940797a6d469ee10da3581a6",
|
||||||
|
"powerpc64-unknown-linux-gnu-0.9.5":
|
||||||
|
"9b64bc415661b503b0ae6716bd8203cbf54342c60a8d75ceed5a0b7c48a5a038",
|
||||||
|
"powerpc64le-unknown-linux-gnu-0.9.5":
|
||||||
|
"8faeaec0843bf19de8a6e64289ce1dcb4205c82b4a4d189e121137b194c15a5b",
|
||||||
|
"s390x-unknown-linux-gnu-0.9.5":
|
||||||
|
"b0506369986af415dde8568d5433f9bc801bed310162221677a6ba076d30f26f",
|
||||||
|
"x86_64-apple-darwin-0.9.5":
|
||||||
|
"4b141507ddadaa524af4ca19eff0fe7fe7a50c45e61e217ff6721a6be9796634",
|
||||||
|
"x86_64-pc-windows-msvc-0.9.5":
|
||||||
|
"48d096bc53e4c0d7434965c6b4bff911e53250cf8da8866a95b85ed4107259bf",
|
||||||
|
"x86_64-unknown-linux-gnu-0.9.5":
|
||||||
|
"88ac7931cffa4e247e465b2aa4ed890af7a134e18a422f5f79041a792aa1559b",
|
||||||
|
"x86_64-unknown-linux-musl-0.9.5":
|
||||||
|
"ef73516d8b7b284cd1a6b8ae33cad373516c29ce3e0eb82744d73def5e516832",
|
||||||
|
"aarch64-apple-darwin-0.9.4":
|
||||||
|
"48927361be76a93dbded0555d374af3172fc4010b54d97347957f6ab509d7e33",
|
||||||
|
"aarch64-pc-windows-msvc-0.9.4":
|
||||||
|
"3c14b5fcfae80d22532f895fec0c84dbc9c387a766368b460c3c96aa62b83562",
|
||||||
|
"aarch64-unknown-linux-gnu-0.9.4":
|
||||||
|
"b165463041685c958a978f0f4e78fb4afd9aa7729508c4eeaee703b0411bd6fe",
|
||||||
|
"aarch64-unknown-linux-musl-0.9.4":
|
||||||
|
"a9e880d819f290fc602768d25065c1316401229d04f0efaa7440017459968b11",
|
||||||
|
"arm-unknown-linux-musleabihf-0.9.4":
|
||||||
|
"0f1d4df0f31f9d874e59668d648126c6bbc796a22c65127dd2a4759de02879f7",
|
||||||
|
"armv7-unknown-linux-gnueabihf-0.9.4":
|
||||||
|
"cb8e19d7ad75c7eb136e2b3ae47d576d9f57c86a6e005b84db2da4cdd2d5f3e5",
|
||||||
|
"armv7-unknown-linux-musleabihf-0.9.4":
|
||||||
|
"4f2c10151af528935d56ad216125feef7cff4784619f6d62ea749ce037793285",
|
||||||
|
"i686-pc-windows-msvc-0.9.4":
|
||||||
|
"dae8a08a794ba0716cd4d48a84a3605f5049cef1a70381906b7ec9731915478a",
|
||||||
|
"i686-unknown-linux-gnu-0.9.4":
|
||||||
|
"2aaa7c5d8d6735e09121a9a4d20161cf9c6f6b9ada0aa433c71c33d2ecd22318",
|
||||||
|
"i686-unknown-linux-musl-0.9.4":
|
||||||
|
"b1c8d20e12ed41abc38e46f66b397ea6bdcdd59ecae801e81e93eaa239c9f53c",
|
||||||
|
"powerpc64-unknown-linux-gnu-0.9.4":
|
||||||
|
"e8a89325ae24e42d0c73780bdf448f25871d3657e9df31aa9547e8c2720e45b9",
|
||||||
|
"powerpc64le-unknown-linux-gnu-0.9.4":
|
||||||
|
"f361098f627e1f920b855bd2e709f420c5f107619f8c8533347ae6ad3e43128d",
|
||||||
|
"s390x-unknown-linux-gnu-0.9.4":
|
||||||
|
"a2b38dd0babe9af97977e49db895a8ee89bd3ea54d27e28e47d5c7e0f93a32c2",
|
||||||
|
"x86_64-apple-darwin-0.9.4":
|
||||||
|
"7abe5ec80ae556fcf445be65825a340df32a8404a28332a988cb97dc65fe60c4",
|
||||||
|
"x86_64-pc-windows-msvc-0.9.4":
|
||||||
|
"45f4b700e864520fdc051b0631df4f07a2f65bcdf51fc01ee07769fd8257d092",
|
||||||
|
"x86_64-unknown-linux-gnu-0.9.4":
|
||||||
|
"c55b088472c2c6a030bf29f414c6e38028145a32b3c3da2036347f0fc9de6360",
|
||||||
|
"x86_64-unknown-linux-musl-0.9.4":
|
||||||
|
"c49af645ed618e660c64cd253892039ff30645e1f1563bc7842918f7cd74d596",
|
||||||
"aarch64-apple-darwin-0.9.3":
|
"aarch64-apple-darwin-0.9.3":
|
||||||
"4dccd7ca0def1bdf45acac18cf5f1d1cda0cfd6b039a6db1e87a93fdd10ed530",
|
"4dccd7ca0def1bdf45acac18cf5f1d1cda0cfd6b039a6db1e87a93fdd10ed530",
|
||||||
"aarch64-pc-windows-msvc-0.9.3":
|
"aarch64-pc-windows-msvc-0.9.3":
|
||||||
|
|||||||
@@ -5,7 +5,11 @@ import { promises as fs } from "node:fs";
|
|||||||
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
|
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
|
||||||
import type { Architecture, Platform } from "../utils/platforms";
|
import type { Architecture, Platform } from "../utils/platforms";
|
||||||
import { validateChecksum } from "./checksum/checksum";
|
import { validateChecksum } from "./checksum/checksum";
|
||||||
import * as github from "@actions/github";
|
import { Octokit } from "@octokit/core";
|
||||||
|
import { paginateRest } from "@octokit/plugin-paginate-rest";
|
||||||
|
import { restEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";
|
||||||
|
|
||||||
|
const PaginatingOctokit = Octokit.plugin(paginateRest, restEndpointMethods);
|
||||||
|
|
||||||
export function tryGetFromToolCache(
|
export function tryGetFromToolCache(
|
||||||
arch: Architecture,
|
arch: Architecture,
|
||||||
@@ -67,6 +71,7 @@ export async function resolveVersion(
|
|||||||
versionInput: string,
|
versionInput: string,
|
||||||
githubToken: string,
|
githubToken: string,
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
|
core.debug(`Resolving ${versionInput}...`);
|
||||||
const version =
|
const version =
|
||||||
versionInput === "latest"
|
versionInput === "latest"
|
||||||
? await getLatestVersion(githubToken)
|
? await getLatestVersion(githubToken)
|
||||||
@@ -80,12 +85,31 @@ export async function resolveVersion(
|
|||||||
if (resolvedVersion === "") {
|
if (resolvedVersion === "") {
|
||||||
throw new Error(`No version found for ${version}`);
|
throw new Error(`No version found for ${version}`);
|
||||||
}
|
}
|
||||||
|
core.debug(`Resolved version: ${resolvedVersion}`);
|
||||||
return resolvedVersion;
|
return resolvedVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getAvailableVersions(githubToken: string): Promise<string[]> {
|
async function getAvailableVersions(githubToken: string): Promise<string[]> {
|
||||||
const octokit = github.getOctokit(githubToken);
|
try {
|
||||||
|
const octokit = new PaginatingOctokit({
|
||||||
|
auth: githubToken,
|
||||||
|
});
|
||||||
|
return await getReleaseTagNames(octokit);
|
||||||
|
} catch (err) {
|
||||||
|
if ((err as Error).message.includes("Bad credentials")) {
|
||||||
|
core.info(
|
||||||
|
"No (valid) GitHub token provided. Falling back to anonymous. Requests might be rate limited.",
|
||||||
|
);
|
||||||
|
const octokit = new PaginatingOctokit();
|
||||||
|
return await getReleaseTagNames(octokit);
|
||||||
|
}
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getReleaseTagNames(
|
||||||
|
octokit: InstanceType<typeof PaginatingOctokit>,
|
||||||
|
): Promise<string[]> {
|
||||||
const response = await octokit.paginate(octokit.rest.repos.listReleases, {
|
const response = await octokit.paginate(octokit.rest.repos.listReleases, {
|
||||||
owner: OWNER,
|
owner: OWNER,
|
||||||
repo: REPO,
|
repo: REPO,
|
||||||
@@ -94,15 +118,37 @@ async function getAvailableVersions(githubToken: string): Promise<string[]> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function getLatestVersion(githubToken: string) {
|
async function getLatestVersion(githubToken: string) {
|
||||||
const octokit = github.getOctokit(githubToken);
|
const octokit = new PaginatingOctokit({
|
||||||
|
auth: githubToken,
|
||||||
const { data: latestRelease } = await octokit.rest.repos.getLatestRelease({
|
|
||||||
owner: OWNER,
|
|
||||||
repo: REPO,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let latestRelease: { tag_name: string } | undefined;
|
||||||
|
try {
|
||||||
|
latestRelease = await getLatestRelease(octokit);
|
||||||
|
} catch (err) {
|
||||||
|
if ((err as Error).message.includes("Bad credentials")) {
|
||||||
|
core.info(
|
||||||
|
"No (valid) GitHub token provided. Falling back to anonymous. Requests might be rate limited.",
|
||||||
|
);
|
||||||
|
const octokit = new PaginatingOctokit();
|
||||||
|
latestRelease = await getLatestRelease(octokit);
|
||||||
|
} else {
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!latestRelease) {
|
if (!latestRelease) {
|
||||||
throw new Error("Could not determine latest release.");
|
throw new Error("Could not determine latest release.");
|
||||||
}
|
}
|
||||||
return latestRelease.tag_name;
|
return latestRelease.tag_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async function getLatestRelease(
|
||||||
|
octokit: InstanceType<typeof PaginatingOctokit>,
|
||||||
|
) {
|
||||||
|
const { data: latestRelease } = await octokit.rest.repos.getLatestRelease({
|
||||||
|
owner: OWNER,
|
||||||
|
repo: REPO,
|
||||||
|
});
|
||||||
|
return latestRelease;
|
||||||
|
}
|
||||||
|
|||||||
+13
-5
@@ -21,7 +21,7 @@ import {
|
|||||||
version,
|
version,
|
||||||
versionFile as versionFileInput,
|
versionFile as versionFileInput,
|
||||||
} from "./utils/inputs";
|
} from "./utils/inputs";
|
||||||
import { getRuffVersionFromPyproject } from "./utils/pyproject";
|
import { getRuffVersionFromRequirementsFile } from "./utils/pyproject";
|
||||||
import * as fs from "node:fs";
|
import * as fs from "node:fs";
|
||||||
|
|
||||||
async function run(): Promise<void> {
|
async function run(): Promise<void> {
|
||||||
@@ -93,19 +93,27 @@ async function determineVersion(): Promise<string> {
|
|||||||
return await resolveVersion(version, githubToken);
|
return await resolveVersion(version, githubToken);
|
||||||
}
|
}
|
||||||
if (versionFileInput !== "") {
|
if (versionFileInput !== "") {
|
||||||
const versionFromPyproject = getRuffVersionFromPyproject(versionFileInput);
|
const versionFromPyproject =
|
||||||
|
getRuffVersionFromRequirementsFile(versionFileInput);
|
||||||
if (versionFromPyproject === undefined) {
|
if (versionFromPyproject === undefined) {
|
||||||
core.warning(
|
core.warning(
|
||||||
"Could not parse version from supplied pyproject.toml. Using latest version.",
|
`Could not parse version from ${versionFileInput}. Using latest version.`,
|
||||||
);
|
);
|
||||||
return await resolveVersion("latest", githubToken);
|
|
||||||
}
|
}
|
||||||
|
return await resolveVersion(versionFromPyproject || "latest", githubToken);
|
||||||
}
|
}
|
||||||
const pyProjectPath = path.join(src, "pyproject.toml");
|
const pyProjectPath = path.join(src, "pyproject.toml");
|
||||||
if (!fs.existsSync(pyProjectPath)) {
|
if (!fs.existsSync(pyProjectPath)) {
|
||||||
|
core.info(`Could not find ${pyProjectPath}. Using latest version.`);
|
||||||
return await resolveVersion("latest", githubToken);
|
return await resolveVersion("latest", githubToken);
|
||||||
}
|
}
|
||||||
const versionFromPyproject = getRuffVersionFromPyproject(pyProjectPath);
|
const versionFromPyproject =
|
||||||
|
getRuffVersionFromRequirementsFile(pyProjectPath);
|
||||||
|
if (versionFromPyproject === undefined) {
|
||||||
|
core.warning(
|
||||||
|
`Could not parse version from ${pyProjectPath}. Using latest version.`,
|
||||||
|
);
|
||||||
|
}
|
||||||
return await resolveVersion(versionFromPyproject || "latest", githubToken);
|
return await resolveVersion(versionFromPyproject || "latest", githubToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,20 @@
|
|||||||
import * as github from "@actions/github";
|
import { Octokit } from "@octokit/core";
|
||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
|
import { paginateRest } from "@octokit/plugin-paginate-rest";
|
||||||
|
import { restEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";
|
||||||
|
|
||||||
import { OWNER, REPO } from "./utils/constants";
|
import { OWNER, REPO } from "./utils/constants";
|
||||||
import * as semver from "semver";
|
import * as semver from "semver";
|
||||||
|
|
||||||
import { updateChecksums } from "./download/checksum/update-known-checksums";
|
import { updateChecksums } from "./download/checksum/update-known-checksums";
|
||||||
|
|
||||||
|
const PaginatingOctokit = Octokit.plugin(paginateRest, restEndpointMethods);
|
||||||
|
|
||||||
async function run(): Promise<void> {
|
async function run(): Promise<void> {
|
||||||
const checksumFilePath = process.argv.slice(2)[0];
|
const checksumFilePath = process.argv.slice(2)[0];
|
||||||
const github_token = process.argv.slice(2)[1];
|
const github_token = process.argv.slice(2)[1];
|
||||||
|
|
||||||
const octokit = github.getOctokit(github_token);
|
const octokit = new PaginatingOctokit({ auth: github_token });
|
||||||
|
|
||||||
const response = await octokit.paginate(octokit.rest.repos.listReleases, {
|
const response = await octokit.paginate(octokit.rest.repos.listReleases, {
|
||||||
owner: OWNER,
|
owner: OWNER,
|
||||||
|
|||||||
+47
-27
@@ -2,34 +2,12 @@ import * as fs from "node:fs";
|
|||||||
import * as core from "@actions/core";
|
import * as core from "@actions/core";
|
||||||
import * as toml from "smol-toml";
|
import * as toml from "smol-toml";
|
||||||
|
|
||||||
export function getRuffVersionFromPyproject(
|
function getRuffVersionFromAllDependencies(
|
||||||
filePath: string,
|
allDependencies: string[],
|
||||||
): string | undefined {
|
): string | undefined {
|
||||||
if (!fs.existsSync(filePath)) {
|
const ruffVersionDefinition = allDependencies.find((dep: string) =>
|
||||||
core.warning(`Could not find file: ${filePath}`);
|
dep.startsWith("ruff"),
|
||||||
return undefined;
|
);
|
||||||
}
|
|
||||||
const pyprojectContent = fs.readFileSync(filePath, "utf-8");
|
|
||||||
let pyproject:
|
|
||||||
| {
|
|
||||||
project?: { dependencies?: string[] };
|
|
||||||
"dependency-groups"?: { dev?: string[] };
|
|
||||||
}
|
|
||||||
| undefined;
|
|
||||||
try {
|
|
||||||
pyproject = toml.parse(pyprojectContent);
|
|
||||||
} catch (err) {
|
|
||||||
const message = (err as Error).message;
|
|
||||||
core.warning(`Error while parsing ${filePath}: ${message}`);
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
const dependencies: string[] = pyproject?.project?.dependencies || [];
|
|
||||||
const devDependencies: string[] = pyproject?.["dependency-groups"]?.dev || [];
|
|
||||||
|
|
||||||
const ruffVersionDefinition =
|
|
||||||
dependencies.find((dep: string) => dep.startsWith("ruff")) ||
|
|
||||||
devDependencies.find((dep: string) => dep.startsWith("ruff"));
|
|
||||||
|
|
||||||
if (ruffVersionDefinition) {
|
if (ruffVersionDefinition) {
|
||||||
const ruffVersion = ruffVersionDefinition
|
const ruffVersion = ruffVersionDefinition
|
||||||
@@ -44,3 +22,45 @@ export function getRuffVersionFromPyproject(
|
|||||||
|
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function parsePyproject(pyprojectContent: string): string | undefined {
|
||||||
|
const pyproject: {
|
||||||
|
project?: {
|
||||||
|
dependencies?: string[];
|
||||||
|
"optional-dependencies"?: Map<string, string[]>;
|
||||||
|
};
|
||||||
|
"dependency-groups"?: Map<string, Array<string | object>>;
|
||||||
|
} = toml.parse(pyprojectContent);
|
||||||
|
const dependencies: string[] = pyproject?.project?.dependencies || [];
|
||||||
|
const optionalDependencies: string[] = Object.values(
|
||||||
|
pyproject?.project?.["optional-dependencies"] || {},
|
||||||
|
).flat();
|
||||||
|
const devDependencies: string[] = Object.values(
|
||||||
|
pyproject?.["dependency-groups"] || {},
|
||||||
|
)
|
||||||
|
.flat()
|
||||||
|
.filter((item: string | object) => typeof item === "string");
|
||||||
|
return getRuffVersionFromAllDependencies(
|
||||||
|
dependencies.concat(optionalDependencies, devDependencies),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getRuffVersionFromRequirementsFile(
|
||||||
|
filePath: string,
|
||||||
|
): string | undefined {
|
||||||
|
if (!fs.existsSync(filePath)) {
|
||||||
|
core.warning(`Could not find file: ${filePath}`);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
const pyprojectContent = fs.readFileSync(filePath, "utf-8");
|
||||||
|
if (filePath.endsWith(".txt")) {
|
||||||
|
return getRuffVersionFromAllDependencies(pyprojectContent.split("\n"));
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return parsePyproject(pyprojectContent);
|
||||||
|
} catch (err) {
|
||||||
|
const message = (err as Error).message;
|
||||||
|
core.warning(`Error while parsing ${filePath}: ${message}`);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user