mirror of
https://github.com/astral-sh/ruff-action.git
synced 2026-08-08 10:17:03 +00:00
Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f8ec3ecee | ||
|
|
0a94239999 | ||
|
|
da0c801a2d | ||
|
|
257550e917 | ||
|
|
94b3590e87 | ||
|
|
7a9e8edffe | ||
|
|
84f83ecf9e | ||
|
|
ea12b8ac41 | ||
|
|
b259b0b299 |
@@ -0,0 +1,20 @@
|
|||||||
|
import * as fs from "node:fs";
|
||||||
|
import * as yaml from "js-yaml";
|
||||||
|
|
||||||
|
const workflow = yaml.load(
|
||||||
|
fs.readFileSync("../workflows/test.yml", "utf8"),
|
||||||
|
) as any;
|
||||||
|
const jobs = Object.keys(workflow.jobs);
|
||||||
|
const allTestsPassed = workflow.jobs["all-tests-passed"];
|
||||||
|
const needs: string[] = allTestsPassed.needs || [];
|
||||||
|
|
||||||
|
const expectedNeeds = jobs.filter((j) => j !== "all-tests-passed");
|
||||||
|
const missing = expectedNeeds.filter((j) => !needs.includes(j));
|
||||||
|
|
||||||
|
if (missing.length > 0) {
|
||||||
|
console.error(
|
||||||
|
`Missing jobs in all-tests-passed needs: ${missing.join(", ")}`,
|
||||||
|
);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
console.log("All jobs in test.yml are in the needs section of all-tests-passed.");
|
||||||
@@ -24,6 +24,10 @@ jobs:
|
|||||||
npm install
|
npm install
|
||||||
- run: |
|
- run: |
|
||||||
npm run all
|
npm run all
|
||||||
|
- name: Transpile scripts
|
||||||
|
run: |
|
||||||
|
tsc *.ts
|
||||||
|
working-directory: .github/scripts
|
||||||
- name: Make sure no changes from linters are detected
|
- name: Make sure no changes from linters are detected
|
||||||
run: |
|
run: |
|
||||||
git diff --exit-code || (echo "::error::Please run 'npm run all' to fix the issues" && exit 1)
|
git diff --exit-code || (echo "::error::Please run 'npm run all' to fix the issues" && exit 1)
|
||||||
@@ -40,10 +44,11 @@ jobs:
|
|||||||
src: __tests__/fixtures/python-project
|
src: __tests__/fixtures/python-project
|
||||||
version: latest
|
version: latest
|
||||||
test-specific-version:
|
test-specific-version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
ruff-version: ["0.7.4", "0.7", "0.7.x", ">=0.7.0"]
|
ruff-version: ["0.1.7", "0.1.8", "0.4.7", "0.4.10", "0.7", "0.7.x", ">=0.7.0"]
|
||||||
|
os: [ ubuntu-latest, ubuntu-24.04-arm, macos-latest, macos-14, windows-latest ]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Use version ${{ matrix.ruff-version }}
|
- name: Use version ${{ matrix.ruff-version }}
|
||||||
@@ -51,6 +56,22 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: ${{ matrix.ruff-version }}
|
version: ${{ matrix.ruff-version }}
|
||||||
src: __tests__/fixtures/python-project
|
src: __tests__/fixtures/python-project
|
||||||
|
test-unsupported-version:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Try install old version
|
||||||
|
id: install
|
||||||
|
continue-on-error: true
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
version: 0.0.246
|
||||||
|
src: __tests__/fixtures/python-project
|
||||||
|
- name: Check if the action failed
|
||||||
|
run: |
|
||||||
|
if [ ${{ steps.install.outcome }} == "success" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
test-version-from-version-file-pyproject:
|
test-version-from-version-file-pyproject:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -186,6 +207,23 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
env:
|
env:
|
||||||
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
|
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
|
||||||
|
test-pep440-version-specifier:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install version 0.11.11
|
||||||
|
id: ruff-action
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
version: ">=0.11.10,<0.12.0"
|
||||||
|
src: __tests__/fixtures/python-project
|
||||||
|
- name: Correct version gets installed
|
||||||
|
run: |
|
||||||
|
if [ "$RUFF_VERSION" != "0.11.11" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
env:
|
||||||
|
RUFF_VERSION: ${{ steps.ruff-action.outputs.ruff-version }}
|
||||||
test-checksum:
|
test-checksum:
|
||||||
runs-on: ${{ matrix.inputs.os }}
|
runs-on: ${{ matrix.inputs.os }}
|
||||||
strategy:
|
strategy:
|
||||||
@@ -272,6 +310,7 @@ jobs:
|
|||||||
- lint
|
- lint
|
||||||
- test-latest-version
|
- test-latest-version
|
||||||
- test-specific-version
|
- test-specific-version
|
||||||
|
- test-unsupported-version
|
||||||
- test-version-from-version-file-pyproject
|
- test-version-from-version-file-pyproject
|
||||||
- test-default-version-from-pyproject
|
- test-default-version-from-pyproject
|
||||||
- test-default-version-from-pyproject-dev-group
|
- test-default-version-from-pyproject-dev-group
|
||||||
@@ -280,6 +319,7 @@ jobs:
|
|||||||
- test-default-version-from-pyproject-optional-dependencies
|
- test-default-version-from-pyproject-optional-dependencies
|
||||||
- test-default-version-from-requirements
|
- test-default-version-from-requirements
|
||||||
- test-semver-range
|
- test-semver-range
|
||||||
|
- test-pep440-version-specifier
|
||||||
- test-checksum
|
- test-checksum
|
||||||
- test-with-explicit-token
|
- test-with-explicit-token
|
||||||
- test-args
|
- test-args
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ A GitHub Action to run [ruff](https://github.com/astral-sh/ruff).
|
|||||||
|
|
||||||
This action is commonly used as a pass/fail test to ensure your repository stays
|
This action is commonly used as a pass/fail test to ensure your repository stays
|
||||||
clean, abiding the [rules](https://docs.astral.sh/ruff/rules/) specified in your
|
clean, abiding the [rules](https://docs.astral.sh/ruff/rules/) specified in your
|
||||||
configuration. Though it runs `ruff`, the action can do anything `ruff` can (ex,
|
configuration. Though it runs `ruff check` by default, the action can do
|
||||||
fix).
|
anything `ruff` can (ex, fix).
|
||||||
|
|
||||||
## Contents
|
## Contents
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ fix).
|
|||||||
- [Install specific versions](#install-specific-versions)
|
- [Install specific versions](#install-specific-versions)
|
||||||
- [Install the latest version](#install-the-latest-version)
|
- [Install the latest version](#install-the-latest-version)
|
||||||
- [Install a specific version](#install-a-specific-version)
|
- [Install a specific version](#install-a-specific-version)
|
||||||
- [Install a version by supplying a semver range](#install-a-version-by-supplying-a-semver-range)
|
- [Install a version by supplying a semver range or pep440 specifier](#install-a-version-by-supplying-a-semver-range-or-pep440-specifier)
|
||||||
- [Install a version from a specified version file](#install-a-version-from-a-specified-version-file)
|
- [Install a version from a specified version file](#install-a-version-from-a-specified-version-file)
|
||||||
- [Validate checksum](#validate-checksum)
|
- [Validate checksum](#validate-checksum)
|
||||||
- [GitHub authentication token](#github-authentication-token)
|
- [GitHub authentication token](#github-authentication-token)
|
||||||
@@ -95,6 +95,9 @@ the ruff version to install. If no pyproject.toml file is found, or no ruff vers
|
|||||||
`project.dependencies`, `project.optional-dependencies`, or `dependency-groups`,
|
`project.dependencies`, `project.optional-dependencies`, or `dependency-groups`,
|
||||||
the latest version is installed.
|
the latest version is installed.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> This action does only support ruff versions v0.0.247 and above.
|
||||||
|
|
||||||
#### Install the latest version
|
#### Install the latest version
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@@ -113,9 +116,10 @@ the latest version is installed.
|
|||||||
version: "0.4.4"
|
version: "0.4.4"
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Install a version by supplying a semver range
|
#### Install a version by supplying a semver range or pep440 specifier
|
||||||
|
|
||||||
You can specify a [semver range](https://github.com/npm/node-semver?tab=readme-ov-file#ranges)
|
You can specify a [semver range](https://github.com/npm/node-semver?tab=readme-ov-file#ranges)
|
||||||
|
or [pep440 specifier](https://peps.python.org/pep-0440/#version-specifiers)
|
||||||
to install the latest version that satisfies the range.
|
to install the latest version that satisfies the range.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@@ -132,6 +136,13 @@ to install the latest version that satisfies the range.
|
|||||||
version: "0.4.x"
|
version: "0.4.x"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Install a pep440-specifier-satisfying version of ruff
|
||||||
|
uses: astral-sh/ruff-action@v3
|
||||||
|
with:
|
||||||
|
version: ">=0.11.10,<0.12.0"
|
||||||
|
```
|
||||||
|
|
||||||
#### 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.
|
||||||
|
|||||||
+894
-8
@@ -4096,6 +4096,783 @@ function _unique(values) {
|
|||||||
}
|
}
|
||||||
//# sourceMappingURL=tool-cache.js.map
|
//# sourceMappingURL=tool-cache.js.map
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 3297:
|
||||||
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
const { valid, clean, explain, parse } = __nccwpck_require__(9961);
|
||||||
|
|
||||||
|
const { lt, le, eq, ne, ge, gt, compare, rcompare } = __nccwpck_require__(9469);
|
||||||
|
|
||||||
|
const {
|
||||||
|
filter,
|
||||||
|
maxSatisfying,
|
||||||
|
minSatisfying,
|
||||||
|
RANGE_PATTERN,
|
||||||
|
satisfies,
|
||||||
|
validRange,
|
||||||
|
} = __nccwpck_require__(3185);
|
||||||
|
|
||||||
|
const { major, minor, patch, inc } = __nccwpck_require__(6829);
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
// version
|
||||||
|
valid,
|
||||||
|
clean,
|
||||||
|
explain,
|
||||||
|
parse,
|
||||||
|
|
||||||
|
// operator
|
||||||
|
lt,
|
||||||
|
le,
|
||||||
|
lte: le,
|
||||||
|
eq,
|
||||||
|
ne,
|
||||||
|
neq: ne,
|
||||||
|
ge,
|
||||||
|
gte: ge,
|
||||||
|
gt,
|
||||||
|
compare,
|
||||||
|
rcompare,
|
||||||
|
|
||||||
|
// range
|
||||||
|
filter,
|
||||||
|
maxSatisfying,
|
||||||
|
minSatisfying,
|
||||||
|
RANGE_PATTERN,
|
||||||
|
satisfies,
|
||||||
|
validRange,
|
||||||
|
|
||||||
|
// semantic
|
||||||
|
major,
|
||||||
|
minor,
|
||||||
|
patch,
|
||||||
|
inc,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 9469:
|
||||||
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
const { parse } = __nccwpck_require__(9961);
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
compare,
|
||||||
|
rcompare,
|
||||||
|
lt,
|
||||||
|
le,
|
||||||
|
eq,
|
||||||
|
ne,
|
||||||
|
ge,
|
||||||
|
gt,
|
||||||
|
'<': lt,
|
||||||
|
'<=': le,
|
||||||
|
'==': eq,
|
||||||
|
'!=': ne,
|
||||||
|
'>=': ge,
|
||||||
|
'>': gt,
|
||||||
|
'===': arbitrary,
|
||||||
|
};
|
||||||
|
|
||||||
|
function lt(version, other) {
|
||||||
|
return compare(version, other) < 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function le(version, other) {
|
||||||
|
return compare(version, other) <= 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function eq(version, other) {
|
||||||
|
return compare(version, other) === 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function ne(version, other) {
|
||||||
|
return compare(version, other) !== 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function ge(version, other) {
|
||||||
|
return compare(version, other) >= 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function gt(version, other) {
|
||||||
|
return compare(version, other) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
function arbitrary(version, other) {
|
||||||
|
return version.toLowerCase() === other.toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
|
function compare(version, other) {
|
||||||
|
const parsedVersion = parse(version);
|
||||||
|
const parsedOther = parse(other);
|
||||||
|
|
||||||
|
const keyVersion = calculateKey(parsedVersion);
|
||||||
|
const keyOther = calculateKey(parsedOther);
|
||||||
|
|
||||||
|
return pyCompare(keyVersion, keyOther);
|
||||||
|
}
|
||||||
|
|
||||||
|
function rcompare(version, other) {
|
||||||
|
return -compare(version, other);
|
||||||
|
}
|
||||||
|
|
||||||
|
// this logic is buitin in python, but we need to port it to js
|
||||||
|
// see https://stackoverflow.com/a/5292332/1438522
|
||||||
|
function pyCompare(elemIn, otherIn) {
|
||||||
|
let elem = elemIn;
|
||||||
|
let other = otherIn;
|
||||||
|
if (elem === other) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (Array.isArray(elem) !== Array.isArray(other)) {
|
||||||
|
elem = Array.isArray(elem) ? elem : [elem];
|
||||||
|
other = Array.isArray(other) ? other : [other];
|
||||||
|
}
|
||||||
|
if (Array.isArray(elem)) {
|
||||||
|
const len = Math.min(elem.length, other.length);
|
||||||
|
for (let i = 0; i < len; i += 1) {
|
||||||
|
const res = pyCompare(elem[i], other[i]);
|
||||||
|
if (res !== 0) {
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return elem.length - other.length;
|
||||||
|
}
|
||||||
|
if (elem === -Infinity || other === Infinity) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (elem === Infinity || other === -Infinity) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return elem < other ? -1 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
function calculateKey(input) {
|
||||||
|
const { epoch } = input;
|
||||||
|
let { release, pre, post, local, dev } = input;
|
||||||
|
// When we compare a release version, we want to compare it with all of the
|
||||||
|
// trailing zeros removed. So we'll use a reverse the list, drop all the now
|
||||||
|
// leading zeros until we come to something non zero, then take the rest
|
||||||
|
// re-reverse it back into the correct order and make it a tuple and use
|
||||||
|
// that for our sorting key.
|
||||||
|
release = release.concat();
|
||||||
|
release.reverse();
|
||||||
|
while (release.length && release[0] === 0) {
|
||||||
|
release.shift();
|
||||||
|
}
|
||||||
|
release.reverse();
|
||||||
|
|
||||||
|
// We need to "trick" the sorting algorithm to put 1.0.dev0 before 1.0a0.
|
||||||
|
// We'll do this by abusing the pre segment, but we _only_ want to do this
|
||||||
|
// if there is !a pre or a post segment. If we have one of those then
|
||||||
|
// the normal sorting rules will handle this case correctly.
|
||||||
|
if (!pre && !post && dev) pre = -Infinity;
|
||||||
|
// Versions without a pre-release (except as noted above) should sort after
|
||||||
|
// those with one.
|
||||||
|
else if (!pre) pre = Infinity;
|
||||||
|
|
||||||
|
// Versions without a post segment should sort before those with one.
|
||||||
|
if (!post) post = -Infinity;
|
||||||
|
|
||||||
|
// Versions without a development segment should sort after those with one.
|
||||||
|
if (!dev) dev = Infinity;
|
||||||
|
|
||||||
|
if (!local) {
|
||||||
|
// Versions without a local segment should sort before those with one.
|
||||||
|
local = -Infinity;
|
||||||
|
} else {
|
||||||
|
// Versions with a local segment need that segment parsed to implement
|
||||||
|
// the sorting rules in PEP440.
|
||||||
|
// - Alpha numeric segments sort before numeric segments
|
||||||
|
// - Alpha numeric segments sort lexicographically
|
||||||
|
// - Numeric segments sort numerically
|
||||||
|
// - Shorter versions sort before longer versions when the prefixes
|
||||||
|
// match exactly
|
||||||
|
local = local.map((i) =>
|
||||||
|
Number.isNaN(Number(i)) ? [-Infinity, i] : [Number(i), ''],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return [epoch, release, pre, post, dev, local];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 6829:
|
||||||
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
const { explain, parse, stringify } = __nccwpck_require__(9961);
|
||||||
|
|
||||||
|
// those notation are borrowed from semver
|
||||||
|
module.exports = {
|
||||||
|
major,
|
||||||
|
minor,
|
||||||
|
patch,
|
||||||
|
inc,
|
||||||
|
};
|
||||||
|
|
||||||
|
function major(input) {
|
||||||
|
const version = explain(input);
|
||||||
|
if (!version) {
|
||||||
|
throw new TypeError('Invalid Version: ' + input);
|
||||||
|
}
|
||||||
|
return version.release[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
function minor(input) {
|
||||||
|
const version = explain(input);
|
||||||
|
if (!version) {
|
||||||
|
throw new TypeError('Invalid Version: ' + input);
|
||||||
|
}
|
||||||
|
if (version.release.length < 2) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return version.release[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
function patch(input) {
|
||||||
|
const version = explain(input);
|
||||||
|
if (!version) {
|
||||||
|
throw new TypeError('Invalid Version: ' + input);
|
||||||
|
}
|
||||||
|
if (version.release.length < 3) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return version.release[2];
|
||||||
|
}
|
||||||
|
|
||||||
|
function inc(input, release, preReleaseIdentifier) {
|
||||||
|
let identifier = preReleaseIdentifier || `a`;
|
||||||
|
const version = parse(input);
|
||||||
|
|
||||||
|
if (!version) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
!['a', 'b', 'c', 'rc', 'alpha', 'beta', 'pre', 'preview'].includes(
|
||||||
|
identifier,
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (release) {
|
||||||
|
case 'premajor':
|
||||||
|
{
|
||||||
|
const [majorVersion] = version.release;
|
||||||
|
version.release.fill(0);
|
||||||
|
version.release[0] = majorVersion + 1;
|
||||||
|
}
|
||||||
|
version.pre = [identifier, 0];
|
||||||
|
delete version.post;
|
||||||
|
delete version.dev;
|
||||||
|
delete version.local;
|
||||||
|
break;
|
||||||
|
case 'preminor':
|
||||||
|
{
|
||||||
|
const [majorVersion, minorVersion = 0] = version.release;
|
||||||
|
version.release.fill(0);
|
||||||
|
version.release[0] = majorVersion;
|
||||||
|
version.release[1] = minorVersion + 1;
|
||||||
|
}
|
||||||
|
version.pre = [identifier, 0];
|
||||||
|
delete version.post;
|
||||||
|
delete version.dev;
|
||||||
|
delete version.local;
|
||||||
|
break;
|
||||||
|
case 'prepatch':
|
||||||
|
{
|
||||||
|
const [majorVersion, minorVersion = 0, patchVersion = 0] =
|
||||||
|
version.release;
|
||||||
|
version.release.fill(0);
|
||||||
|
version.release[0] = majorVersion;
|
||||||
|
version.release[1] = minorVersion;
|
||||||
|
version.release[2] = patchVersion + 1;
|
||||||
|
}
|
||||||
|
version.pre = [identifier, 0];
|
||||||
|
delete version.post;
|
||||||
|
delete version.dev;
|
||||||
|
delete version.local;
|
||||||
|
break;
|
||||||
|
case 'prerelease':
|
||||||
|
if (version.pre === null) {
|
||||||
|
const [majorVersion, minorVersion = 0, patchVersion = 0] =
|
||||||
|
version.release;
|
||||||
|
version.release.fill(0);
|
||||||
|
version.release[0] = majorVersion;
|
||||||
|
version.release[1] = minorVersion;
|
||||||
|
version.release[2] = patchVersion + 1;
|
||||||
|
version.pre = [identifier, 0];
|
||||||
|
} else {
|
||||||
|
if (preReleaseIdentifier === undefined && version.pre !== null) {
|
||||||
|
[identifier] = version.pre;
|
||||||
|
}
|
||||||
|
|
||||||
|
const [letter, number] = version.pre;
|
||||||
|
if (letter === identifier) {
|
||||||
|
version.pre = [letter, number + 1];
|
||||||
|
} else {
|
||||||
|
version.pre = [identifier, 0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
delete version.post;
|
||||||
|
delete version.dev;
|
||||||
|
delete version.local;
|
||||||
|
break;
|
||||||
|
case 'major':
|
||||||
|
if (
|
||||||
|
version.release.slice(1).some((value) => value !== 0) ||
|
||||||
|
version.pre === null
|
||||||
|
) {
|
||||||
|
const [majorVersion] = version.release;
|
||||||
|
version.release.fill(0);
|
||||||
|
version.release[0] = majorVersion + 1;
|
||||||
|
}
|
||||||
|
delete version.pre;
|
||||||
|
delete version.post;
|
||||||
|
delete version.dev;
|
||||||
|
delete version.local;
|
||||||
|
break;
|
||||||
|
case 'minor':
|
||||||
|
if (
|
||||||
|
version.release.slice(2).some((value) => value !== 0) ||
|
||||||
|
version.pre === null
|
||||||
|
) {
|
||||||
|
const [majorVersion, minorVersion = 0] = version.release;
|
||||||
|
version.release.fill(0);
|
||||||
|
version.release[0] = majorVersion;
|
||||||
|
version.release[1] = minorVersion + 1;
|
||||||
|
}
|
||||||
|
delete version.pre;
|
||||||
|
delete version.post;
|
||||||
|
delete version.dev;
|
||||||
|
delete version.local;
|
||||||
|
break;
|
||||||
|
case 'patch':
|
||||||
|
if (
|
||||||
|
version.release.slice(3).some((value) => value !== 0) ||
|
||||||
|
version.pre === null
|
||||||
|
) {
|
||||||
|
const [majorVersion, minorVersion = 0, patchVersion = 0] =
|
||||||
|
version.release;
|
||||||
|
version.release.fill(0);
|
||||||
|
version.release[0] = majorVersion;
|
||||||
|
version.release[1] = minorVersion;
|
||||||
|
version.release[2] = patchVersion + 1;
|
||||||
|
}
|
||||||
|
delete version.pre;
|
||||||
|
delete version.post;
|
||||||
|
delete version.dev;
|
||||||
|
delete version.local;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return stringify(version);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 3185:
|
||||||
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
|
// This file is dual licensed under the terms of the Apache License, Version
|
||||||
|
// 2.0, and the BSD License. See the LICENSE file in the root of this repository
|
||||||
|
// for complete details.
|
||||||
|
|
||||||
|
const { VERSION_PATTERN, explain: explainVersion } = __nccwpck_require__(9961);
|
||||||
|
|
||||||
|
const Operator = __nccwpck_require__(9469);
|
||||||
|
|
||||||
|
const RANGE_PATTERN = [
|
||||||
|
'(?<operator>(===|~=|==|!=|<=|>=|<|>))',
|
||||||
|
'\\s*',
|
||||||
|
'(',
|
||||||
|
/* */ '(?<version>(?:' + VERSION_PATTERN.replace(/\?<\w+>/g, '?:') + '))',
|
||||||
|
/* */ '(?<prefix>\\.\\*)?',
|
||||||
|
/* */ '|',
|
||||||
|
/* */ '(?<legacy>[^,;\\s)]+)',
|
||||||
|
')',
|
||||||
|
].join('');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
RANGE_PATTERN,
|
||||||
|
parse,
|
||||||
|
satisfies,
|
||||||
|
filter,
|
||||||
|
validRange,
|
||||||
|
maxSatisfying,
|
||||||
|
minSatisfying,
|
||||||
|
};
|
||||||
|
|
||||||
|
const isEqualityOperator = (op) => ['==', '!=', '==='].includes(op);
|
||||||
|
|
||||||
|
const rangeRegex = new RegExp('^' + RANGE_PATTERN + '$', 'i');
|
||||||
|
|
||||||
|
function parse(ranges) {
|
||||||
|
if (!ranges.trim()) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
const specifiers = ranges
|
||||||
|
.split(',')
|
||||||
|
.map((range) => rangeRegex.exec(range.trim()) || {})
|
||||||
|
.map(({ groups }) => {
|
||||||
|
if (!groups) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
let { ...spec } = groups;
|
||||||
|
const { operator, version, prefix, legacy } = groups;
|
||||||
|
|
||||||
|
if (version) {
|
||||||
|
spec = { ...spec, ...explainVersion(version) };
|
||||||
|
if (operator === '~=') {
|
||||||
|
if (spec.release.length < 2) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!isEqualityOperator(operator) && spec.local) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (prefix) {
|
||||||
|
if (!isEqualityOperator(operator) || spec.dev || spec.local) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (legacy && operator !== '===') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return spec;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (specifiers.filter(Boolean).length !== specifiers.length) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return specifiers;
|
||||||
|
}
|
||||||
|
|
||||||
|
function filter(versions, specifier, options = {}) {
|
||||||
|
const filtered = pick(versions, specifier, options);
|
||||||
|
if (filtered.length === 0 && options.prereleases === undefined) {
|
||||||
|
return pick(versions, specifier, { prereleases: true });
|
||||||
|
}
|
||||||
|
return filtered;
|
||||||
|
}
|
||||||
|
|
||||||
|
function maxSatisfying(versions, range, options) {
|
||||||
|
const found = filter(versions, range, options).sort(Operator.compare);
|
||||||
|
return found.length === 0 ? null : found[found.length - 1];
|
||||||
|
}
|
||||||
|
|
||||||
|
function minSatisfying(versions, range, options) {
|
||||||
|
const found = filter(versions, range, options).sort(Operator.compare);
|
||||||
|
return found.length === 0 ? null : found[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
function pick(versions, specifier, options) {
|
||||||
|
const parsed = parse(specifier);
|
||||||
|
|
||||||
|
if (!parsed) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
return versions.filter((version) => {
|
||||||
|
const explained = explainVersion(version);
|
||||||
|
|
||||||
|
if (!parsed.length) {
|
||||||
|
return explained && !(explained.is_prerelease && !options.prereleases);
|
||||||
|
}
|
||||||
|
|
||||||
|
return parsed.reduce((pass, spec) => {
|
||||||
|
if (!pass) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return contains({ ...spec, ...options }, { version, explained });
|
||||||
|
}, true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function satisfies(version, specifier, options = {}) {
|
||||||
|
const filtered = pick([version], specifier, options);
|
||||||
|
|
||||||
|
return filtered.length === 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
function arrayStartsWith(array, prefix) {
|
||||||
|
if (prefix.length > array.length) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 0; i < prefix.length; i += 1) {
|
||||||
|
if (prefix[i] !== array[i]) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function contains(specifier, input) {
|
||||||
|
const { explained } = input;
|
||||||
|
let { version } = input;
|
||||||
|
const { ...spec } = specifier;
|
||||||
|
|
||||||
|
if (spec.prereleases === undefined) {
|
||||||
|
spec.prereleases = spec.is_prerelease;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (explained && explained.is_prerelease && !spec.prereleases) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (spec.operator === '~=') {
|
||||||
|
let compatiblePrefix = spec.release.slice(0, -1).concat('*').join('.');
|
||||||
|
if (spec.epoch) {
|
||||||
|
compatiblePrefix = spec.epoch + '!' + compatiblePrefix;
|
||||||
|
}
|
||||||
|
return satisfies(version, `>=${spec.version}, ==${compatiblePrefix}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (spec.prefix) {
|
||||||
|
const isMatching =
|
||||||
|
explained.epoch === spec.epoch &&
|
||||||
|
arrayStartsWith(explained.release, spec.release);
|
||||||
|
const isEquality = spec.operator !== '!=';
|
||||||
|
return isEquality ? isMatching : !isMatching;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (explained)
|
||||||
|
if (explained.local && spec.version) {
|
||||||
|
version = explained.public;
|
||||||
|
spec.version = explainVersion(spec.version).public;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (spec.operator === '<' || spec.operator === '>') {
|
||||||
|
// simplified version of https://www.python.org/dev/peps/pep-0440/#exclusive-ordered-comparison
|
||||||
|
if (Operator.eq(spec.release.join('.'), explained.release.join('.'))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const op = Operator[spec.operator];
|
||||||
|
return op(version, spec.version || spec.legacy);
|
||||||
|
}
|
||||||
|
|
||||||
|
function validRange(specifier) {
|
||||||
|
return Boolean(parse(specifier));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
|
||||||
|
/***/ 9961:
|
||||||
|
/***/ ((module) => {
|
||||||
|
|
||||||
|
const VERSION_PATTERN = [
|
||||||
|
'v?',
|
||||||
|
'(?:',
|
||||||
|
/* */ '(?:(?<epoch>[0-9]+)!)?', // epoch
|
||||||
|
/* */ '(?<release>[0-9]+(?:\\.[0-9]+)*)', // release segment
|
||||||
|
/* */ '(?<pre>', // pre-release
|
||||||
|
/* */ '[-_\\.]?',
|
||||||
|
/* */ '(?<pre_l>(a|b|c|rc|alpha|beta|pre|preview))',
|
||||||
|
/* */ '[-_\\.]?',
|
||||||
|
/* */ '(?<pre_n>[0-9]+)?',
|
||||||
|
/* */ ')?',
|
||||||
|
/* */ '(?<post>', // post release
|
||||||
|
/* */ '(?:-(?<post_n1>[0-9]+))',
|
||||||
|
/* */ '|',
|
||||||
|
/* */ '(?:',
|
||||||
|
/* */ '[-_\\.]?',
|
||||||
|
/* */ '(?<post_l>post|rev|r)',
|
||||||
|
/* */ '[-_\\.]?',
|
||||||
|
/* */ '(?<post_n2>[0-9]+)?',
|
||||||
|
/* */ ')',
|
||||||
|
/* */ ')?',
|
||||||
|
/* */ '(?<dev>', // dev release
|
||||||
|
/* */ '[-_\\.]?',
|
||||||
|
/* */ '(?<dev_l>dev)',
|
||||||
|
/* */ '[-_\\.]?',
|
||||||
|
/* */ '(?<dev_n>[0-9]+)?',
|
||||||
|
/* */ ')?',
|
||||||
|
')',
|
||||||
|
'(?:\\+(?<local>[a-z0-9]+(?:[-_\\.][a-z0-9]+)*))?', // local version
|
||||||
|
].join('');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
VERSION_PATTERN,
|
||||||
|
valid,
|
||||||
|
clean,
|
||||||
|
explain,
|
||||||
|
parse,
|
||||||
|
stringify,
|
||||||
|
};
|
||||||
|
|
||||||
|
const validRegex = new RegExp('^' + VERSION_PATTERN + '$', 'i');
|
||||||
|
|
||||||
|
function valid(version) {
|
||||||
|
return validRegex.test(version) ? version : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const cleanRegex = new RegExp('^\\s*' + VERSION_PATTERN + '\\s*$', 'i');
|
||||||
|
function clean(version) {
|
||||||
|
return stringify(parse(version, cleanRegex));
|
||||||
|
}
|
||||||
|
|
||||||
|
function parse(version, regex) {
|
||||||
|
// Validate the version and parse it into pieces
|
||||||
|
const { groups } = (regex || validRegex).exec(version) || {};
|
||||||
|
if (!groups) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store the parsed out pieces of the version
|
||||||
|
const parsed = {
|
||||||
|
epoch: Number(groups.epoch ? groups.epoch : 0),
|
||||||
|
release: groups.release.split('.').map(Number),
|
||||||
|
pre: normalize_letter_version(groups.pre_l, groups.pre_n),
|
||||||
|
post: normalize_letter_version(
|
||||||
|
groups.post_l,
|
||||||
|
groups.post_n1 || groups.post_n2,
|
||||||
|
),
|
||||||
|
dev: normalize_letter_version(groups.dev_l, groups.dev_n),
|
||||||
|
local: parse_local_version(groups.local),
|
||||||
|
};
|
||||||
|
|
||||||
|
return parsed;
|
||||||
|
}
|
||||||
|
|
||||||
|
function stringify(parsed) {
|
||||||
|
if (!parsed) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const { epoch, release, pre, post, dev, local } = parsed;
|
||||||
|
const parts = [];
|
||||||
|
|
||||||
|
// Epoch
|
||||||
|
if (epoch !== 0) {
|
||||||
|
parts.push(`${epoch}!`);
|
||||||
|
}
|
||||||
|
// Release segment
|
||||||
|
parts.push(release.join('.'));
|
||||||
|
|
||||||
|
// Pre-release
|
||||||
|
if (pre) {
|
||||||
|
parts.push(pre.join(''));
|
||||||
|
}
|
||||||
|
// Post-release
|
||||||
|
if (post) {
|
||||||
|
parts.push('.' + post.join(''));
|
||||||
|
}
|
||||||
|
// Development release
|
||||||
|
if (dev) {
|
||||||
|
parts.push('.' + dev.join(''));
|
||||||
|
}
|
||||||
|
// Local version segment
|
||||||
|
if (local) {
|
||||||
|
parts.push(`+${local}`);
|
||||||
|
}
|
||||||
|
return parts.join('');
|
||||||
|
}
|
||||||
|
|
||||||
|
function normalize_letter_version(letterIn, numberIn) {
|
||||||
|
let letter = letterIn;
|
||||||
|
let number = numberIn;
|
||||||
|
if (letter) {
|
||||||
|
// We consider there to be an implicit 0 in a pre-release if there is
|
||||||
|
// not a numeral associated with it.
|
||||||
|
if (!number) {
|
||||||
|
number = 0;
|
||||||
|
}
|
||||||
|
// We normalize any letters to their lower case form
|
||||||
|
letter = letter.toLowerCase();
|
||||||
|
|
||||||
|
// We consider some words to be alternate spellings of other words and
|
||||||
|
// in those cases we want to normalize the spellings to our preferred
|
||||||
|
// spelling.
|
||||||
|
if (letter === 'alpha') {
|
||||||
|
letter = 'a';
|
||||||
|
} else if (letter === 'beta') {
|
||||||
|
letter = 'b';
|
||||||
|
} else if (['c', 'pre', 'preview'].includes(letter)) {
|
||||||
|
letter = 'rc';
|
||||||
|
} else if (['rev', 'r'].includes(letter)) {
|
||||||
|
letter = 'post';
|
||||||
|
}
|
||||||
|
return [letter, Number(number)];
|
||||||
|
}
|
||||||
|
if (!letter && number) {
|
||||||
|
// We assume if we are given a number, but we are not given a letter
|
||||||
|
// then this is using the implicit post release syntax (e.g. 1.0-1)
|
||||||
|
letter = 'post';
|
||||||
|
|
||||||
|
return [letter, Number(number)];
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function parse_local_version(local) {
|
||||||
|
/*
|
||||||
|
Takes a string like abc.1.twelve and turns it into("abc", 1, "twelve").
|
||||||
|
*/
|
||||||
|
if (local) {
|
||||||
|
return local
|
||||||
|
.split(/[._-]/)
|
||||||
|
.map((part) =>
|
||||||
|
Number.isNaN(Number(part)) ? part.toLowerCase() : Number(part),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function explain(version) {
|
||||||
|
const parsed = parse(version);
|
||||||
|
if (!parsed) {
|
||||||
|
return parsed;
|
||||||
|
}
|
||||||
|
const { epoch, release, pre, post, dev, local } = parsed;
|
||||||
|
|
||||||
|
let base_version = '';
|
||||||
|
if (epoch !== 0) {
|
||||||
|
base_version += epoch + '!';
|
||||||
|
}
|
||||||
|
base_version += release.join('.');
|
||||||
|
|
||||||
|
const is_prerelease = Boolean(dev || pre);
|
||||||
|
const is_devrelease = Boolean(dev);
|
||||||
|
const is_postrelease = Boolean(post);
|
||||||
|
|
||||||
|
// return
|
||||||
|
|
||||||
|
return {
|
||||||
|
epoch,
|
||||||
|
release,
|
||||||
|
pre,
|
||||||
|
post: post ? post[1] : post,
|
||||||
|
dev: dev ? dev[1] : dev,
|
||||||
|
local: local ? local.join('.') : local,
|
||||||
|
public: stringify(parsed).split('+', 1)[0],
|
||||||
|
base_version,
|
||||||
|
is_prerelease,
|
||||||
|
is_devrelease,
|
||||||
|
is_postrelease,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 9318:
|
/***/ 9318:
|
||||||
@@ -28294,6 +29071,74 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|||||||
exports.KNOWN_CHECKSUMS = void 0;
|
exports.KNOWN_CHECKSUMS = void 0;
|
||||||
// AUTOGENERATED_DO_NOT_EDIT
|
// AUTOGENERATED_DO_NOT_EDIT
|
||||||
exports.KNOWN_CHECKSUMS = {
|
exports.KNOWN_CHECKSUMS = {
|
||||||
|
"aarch64-apple-darwin-0.11.11": "814ccb26bed9c027bfc20ac88d33494ab0be62721757c73be70e26c23efbb3f7",
|
||||||
|
"aarch64-pc-windows-msvc-0.11.11": "7c43804a3a9646edbc70eda6dab061343a5545844dbaff82ba472df3be4b74e0",
|
||||||
|
"aarch64-unknown-linux-gnu-0.11.11": "26bc61fce6be2f358f656c7cc5b33725aafdc6ae6b21ee48fde10ad0d9b702ea",
|
||||||
|
"aarch64-unknown-linux-musl-0.11.11": "3ca33d9b68b8b0bc7e3673b7638910ac2f7c5399303b37bec4d13c005481a78a",
|
||||||
|
"arm-unknown-linux-musleabihf-0.11.11": "9d5cf3a8e5c495156479a7bb0a438f0f4bec6dbf69cdd48ede1cd508c41cd43b",
|
||||||
|
"armv7-unknown-linux-gnueabihf-0.11.11": "acb854e89c24333a17cc2aba7adabab7314dc16bb92b52094661f9ca5843703f",
|
||||||
|
"armv7-unknown-linux-musleabihf-0.11.11": "4e48259a71c1e806e64801bb3a55df555ee8b62360fb15f19e7ab3c496ee6f10",
|
||||||
|
"i686-pc-windows-msvc-0.11.11": "507a588d22c9eb3558c86e85d50f6cbc099d52444dc05290c61ae8454aee25de",
|
||||||
|
"i686-unknown-linux-gnu-0.11.11": "bd1e258d14a9a399bbb6fac468c3bfdc464858c028dd48ae3517f35b01a310c9",
|
||||||
|
"i686-unknown-linux-musl-0.11.11": "4de74178a1e0181ed56b623943a3198c4f7f90da918d050e846a1468050bf4ad",
|
||||||
|
"powerpc64-unknown-linux-gnu-0.11.11": "da883ef2174136c0d50570a16c01f57fd99c55e05914ba35dafd37b49e5f0331",
|
||||||
|
"powerpc64le-unknown-linux-gnu-0.11.11": "ecd54e2738005a345ecc80f834f89a3d55c791e89ad43ca24becfbed79d490a4",
|
||||||
|
"s390x-unknown-linux-gnu-0.11.11": "7a12eb9e85126cf9018842bc206b763211e9295ad6906e46c73b76ae110924ba",
|
||||||
|
"x86_64-apple-darwin-0.11.11": "8bef00e82bc07ea26b45adcffc3d55b2d0821f3a3e4d5f441f4dd4ad608fc1be",
|
||||||
|
"x86_64-pc-windows-msvc-0.11.11": "b7619ff27098a4d7f37c52fb8fc61ccfe677aaade7722a385b40f8d5273ebddd",
|
||||||
|
"x86_64-unknown-linux-gnu-0.11.11": "4883053606fc9efed6f8860145bcbf66f0f421684054c156c84b04bd9bf1638f",
|
||||||
|
"x86_64-unknown-linux-musl-0.11.11": "bb64b083767a5fd0a62e10e9a35614974ad53025e2878cf14a0c698680e6c30c",
|
||||||
|
"aarch64-apple-darwin-0.11.10": "1c4187c5ecd76535b76e991af1114d9c9947fe69e6d1a69c9ed6723d6777a53e",
|
||||||
|
"aarch64-pc-windows-msvc-0.11.10": "765234e319c8fce0b0216f570f4480b7a7b77d019347fa301536b808c245375b",
|
||||||
|
"aarch64-unknown-linux-gnu-0.11.10": "a39ff81bfe023d55008943f11221d49759d73b9fe6bf76584626cfcdd33d8684",
|
||||||
|
"aarch64-unknown-linux-musl-0.11.10": "acddbf808ba83c9dda01391ddd1c7f0c23d36f1f2cbbee6290d98363f3e4cafc",
|
||||||
|
"arm-unknown-linux-musleabihf-0.11.10": "8647e140f06719c68220157205ef21644901dfab8daefe72cf08317e45b212d4",
|
||||||
|
"armv7-unknown-linux-gnueabihf-0.11.10": "49eab0e5ec80c1d1a13737d5ad0ca69ac79227ece39750e4db38ad9f3a20f3f0",
|
||||||
|
"armv7-unknown-linux-musleabihf-0.11.10": "51bf490bd5a357d76dd5ca7d5aa6724e4445a413720e3d370cf28194f12800fc",
|
||||||
|
"i686-pc-windows-msvc-0.11.10": "e0aab393a0e9da99e7cadcfbad7bfa6abbe3de9e1fc69eb3e649ed27769fd7a1",
|
||||||
|
"i686-unknown-linux-gnu-0.11.10": "5cab3435770f98a3171e3890b870b2bf682f1639470d46e1538a2117a0072464",
|
||||||
|
"i686-unknown-linux-musl-0.11.10": "f98f40b6a9fddde57459ce635b94cacc417a6682aeab24ee1091f7486c64eaee",
|
||||||
|
"powerpc64-unknown-linux-gnu-0.11.10": "084d19d34b553212aceb988f2de97f304a214f0c93a230366bae55351d0c552c",
|
||||||
|
"powerpc64le-unknown-linux-gnu-0.11.10": "02abc4c8d4f40d4c2a02a4fe1edf6061ac724e95b0c65e5ccfd968b150d7154d",
|
||||||
|
"s390x-unknown-linux-gnu-0.11.10": "379ae3fa5b61d8e7433cf9fa5c76aec8a7e3f17e686f55100cccb13765b4c8f4",
|
||||||
|
"x86_64-apple-darwin-0.11.10": "25f0a8b819ea5c9377be02fd98c363ffb5659c35358881a1ce909f30b362cb39",
|
||||||
|
"x86_64-pc-windows-msvc-0.11.10": "d77bc4ecdb0f50f5a70422db90ec735caf71c3ea3e201e6e84a78fed695a4950",
|
||||||
|
"x86_64-unknown-linux-gnu-0.11.10": "ade458637abe06ff6780e0b3a5fdd281da552d33eb75b954fc2a27278258b856",
|
||||||
|
"x86_64-unknown-linux-musl-0.11.10": "8765d2f71c422f60a1456a2b2d9b2ee2ab286cb4859a774b5efb0a837a07f6dd",
|
||||||
|
"aarch64-apple-darwin-0.11.9": "d7955d8cf0b96471757d9733b21576b00baebecc056e3382d7023f092bfa8526",
|
||||||
|
"aarch64-pc-windows-msvc-0.11.9": "bebd2f05e37101023d32ca6b0a6ca1f619b0c5faccde7df0960d96bcc2bcf8bc",
|
||||||
|
"aarch64-unknown-linux-gnu-0.11.9": "8dffb447ee07405dcb0939666703a53ac38d6703abbe48db6d5ec8189544dd37",
|
||||||
|
"aarch64-unknown-linux-musl-0.11.9": "a3d6ee64ce182345d88ce2d1a2960d9261d2bcf6746b85be769b31e27349f6fb",
|
||||||
|
"arm-unknown-linux-musleabihf-0.11.9": "1c480bcfad71617754f9518e44db9670ff87145b79d03dec3db4b50c5a743dc3",
|
||||||
|
"armv7-unknown-linux-gnueabihf-0.11.9": "2a8739fb4544a2da95d3f64f43a01d86468dc4c72d47f0cdea4dbd36767e5b3b",
|
||||||
|
"armv7-unknown-linux-musleabihf-0.11.9": "5cfb13bad415b339162d60ca044c248130882ab014d648532fe789540f8fc80d",
|
||||||
|
"i686-pc-windows-msvc-0.11.9": "17dd0dc46c38bf1fe4af50f1cc5b128054a43182cfb643d5ab2ac0382e94719b",
|
||||||
|
"i686-unknown-linux-gnu-0.11.9": "472c13baa143869103ab40f8281d39691abc24ede7bfbcbc57bb2a796b84bb52",
|
||||||
|
"i686-unknown-linux-musl-0.11.9": "d1f795e59c2e0842352b00e8301ee8fe2fe321fd5af39f419b77534b4f6bd817",
|
||||||
|
"powerpc64-unknown-linux-gnu-0.11.9": "e5165cf2db7d74d1d05bc7fee0c36eb92578716a6b86d95d63c3a4577102350e",
|
||||||
|
"powerpc64le-unknown-linux-gnu-0.11.9": "022579b3fc348651103a2dddb21f5844dde111d9b539f6179448e076dc9979fe",
|
||||||
|
"s390x-unknown-linux-gnu-0.11.9": "f657228facc1a131a4896a028a847bba95ccf82dd6570385cacabb8f186db26d",
|
||||||
|
"x86_64-apple-darwin-0.11.9": "88d5c544ac4a420b3c58e0a858a7807c545668a6a3fb9e5403ad73aa0d55b653",
|
||||||
|
"x86_64-pc-windows-msvc-0.11.9": "b3c7144d40b3860b104cb88e5c8a95a326b81b3d305b9b6a2ce304761b8508c3",
|
||||||
|
"x86_64-unknown-linux-gnu-0.11.9": "276f6b928f61724b255e04e7e3b9e6859f86f4eec5d1b906a72983f3365b6671",
|
||||||
|
"x86_64-unknown-linux-musl-0.11.9": "7125dd1baf4f4d635a185c84fa8bef7f572a088e30d160a07f97f2c9fac70c6d",
|
||||||
|
"aarch64-apple-darwin-0.11.8": "bc3fc6693437efab1add3f288d6d16fac6926e6888c1e758ec162d5b6fe9099d",
|
||||||
|
"aarch64-pc-windows-msvc-0.11.8": "06c2152f269949390bdde0cc9f6d74eb3f4068853a3d772b9ac9baa675b63a06",
|
||||||
|
"aarch64-unknown-linux-gnu-0.11.8": "a6010d9393e254c73c81a9942fd1d49c6d1061a84bf76e024627924adfdd9e99",
|
||||||
|
"aarch64-unknown-linux-musl-0.11.8": "7a4882654cd8b7c79b0bacd0f9b2062ec08a111a7f2621c69718000a165c93b6",
|
||||||
|
"arm-unknown-linux-musleabihf-0.11.8": "e9d8c2e59d97b841273369350c64113708b402372fa6fd933aef70f2d4db9bf6",
|
||||||
|
"armv7-unknown-linux-gnueabihf-0.11.8": "1eda8253c82dfc9232508ffb52e1e7d320719c60781a95a0f0e2a4b9ac7d7829",
|
||||||
|
"armv7-unknown-linux-musleabihf-0.11.8": "cf4e4ca7426279051c4bdfb846749b8a75fe01892b9b08247dc700ece64af277",
|
||||||
|
"i686-pc-windows-msvc-0.11.8": "c9d35f023f94110fd77e0d84240b8c1daf26f923e115556d7ef1e1d3af663e83",
|
||||||
|
"i686-unknown-linux-gnu-0.11.8": "3d98524a340aede7ab974fb6f62778254aff1e9a57e565a22a348fdc02753566",
|
||||||
|
"i686-unknown-linux-musl-0.11.8": "01f5a7ac05eaa0d548792c309e75fa24d18b6685831743e984d56b0fc4514251",
|
||||||
|
"powerpc64-unknown-linux-gnu-0.11.8": "2c45c30ed216f67148ad8e96656efa0f9a4a7591c7def32fdd9db5db86a643fa",
|
||||||
|
"powerpc64le-unknown-linux-gnu-0.11.8": "85705683af19f1dfc3c90424dab2525422a1e03e487610a79b725f96e04a4953",
|
||||||
|
"s390x-unknown-linux-gnu-0.11.8": "722aa00e479f58f906e7bf697336b9ed3ccf0df939b83e10f2b778a6b136bdc6",
|
||||||
|
"x86_64-apple-darwin-0.11.8": "56eaecad5d4e41d2f799bbb705d83238436de4a547e5d04c0591ae3422ae61cc",
|
||||||
|
"x86_64-pc-windows-msvc-0.11.8": "2279f17ad7474b9a1493ec2aab404e6f1109272d3221a5d38ee06ceb0e4c6100",
|
||||||
|
"x86_64-unknown-linux-gnu-0.11.8": "8edc7a28bb958af4ebfb6a85002c8cd96d88f264dd8c080e065a6e984963ce3c",
|
||||||
|
"x86_64-unknown-linux-musl-0.11.8": "d5b331c4dd88a99b3b16babcaa8dec8b22f4004b880243f35f73c276f56684ff",
|
||||||
"aarch64-apple-darwin-0.11.7": "1c6cc5fb36fb001dfa7331892f9d808bc7ced1d45f0ec54b4caeaa571bc55495",
|
"aarch64-apple-darwin-0.11.7": "1c6cc5fb36fb001dfa7331892f9d808bc7ced1d45f0ec54b4caeaa571bc55495",
|
||||||
"aarch64-pc-windows-msvc-0.11.7": "c18bc5d87b9b582f1f9da6bdf78fa4a710f9d40f409cfae330f20bf9f16ce631",
|
"aarch64-pc-windows-msvc-0.11.7": "c18bc5d87b9b582f1f9da6bdf78fa4a710f9d40f409cfae330f20bf9f16ce631",
|
||||||
"aarch64-unknown-linux-gnu-0.11.7": "ccc11afdc3d3d3b146f972645d54a49c819034b8379d190281962bfa80c69389",
|
"aarch64-unknown-linux-gnu-0.11.7": "ccc11afdc3d3d3b146f972645d54a49c819034b8379d190281962bfa80c69389",
|
||||||
@@ -30539,6 +31384,8 @@ const core = __importStar(__nccwpck_require__(7484));
|
|||||||
const tc = __importStar(__nccwpck_require__(3472));
|
const tc = __importStar(__nccwpck_require__(3472));
|
||||||
const path = __importStar(__nccwpck_require__(6760));
|
const path = __importStar(__nccwpck_require__(6760));
|
||||||
const node_fs_1 = __nccwpck_require__(3024);
|
const node_fs_1 = __nccwpck_require__(3024);
|
||||||
|
const semver = __importStar(__nccwpck_require__(9318));
|
||||||
|
const pep440 = __importStar(__nccwpck_require__(3297));
|
||||||
const constants_1 = __nccwpck_require__(6156);
|
const constants_1 = __nccwpck_require__(6156);
|
||||||
const checksum_1 = __nccwpck_require__(5391);
|
const checksum_1 = __nccwpck_require__(5391);
|
||||||
const core_1 = __nccwpck_require__(767);
|
const core_1 = __nccwpck_require__(767);
|
||||||
@@ -30562,10 +31409,28 @@ async function downloadVersion(platform, arch, version, checkSum, githubToken) {
|
|||||||
if (platform === "pc-windows-msvc") {
|
if (platform === "pc-windows-msvc") {
|
||||||
extension = ".zip";
|
extension = ".zip";
|
||||||
}
|
}
|
||||||
const downloadUrl = `https://github.com/${constants_1.OWNER}/${constants_1.REPO}/releases/download/${version}/${artifact}${extension}`;
|
const downloadUrl = constructDownloadUrl(version, platform, arch);
|
||||||
core.info(`Downloading ruff from "${downloadUrl}" ...`);
|
core.debug(`Downloading ruff from "${downloadUrl}" ...`);
|
||||||
const downloadPath = await tc.downloadTool(downloadUrl, undefined, githubToken);
|
const downloadPath = await tc.downloadTool(downloadUrl, undefined, githubToken);
|
||||||
|
core.debug(`Downloaded ruff to "${downloadPath}"`);
|
||||||
await (0, checksum_1.validateChecksum)(checkSum, downloadPath, arch, platform, version);
|
await (0, checksum_1.validateChecksum)(checkSum, downloadPath, arch, platform, version);
|
||||||
|
const extractedDir = await extractDownloadedArtifact(version, downloadPath, extension, platform, artifact);
|
||||||
|
const cachedToolDir = await tc.cacheDir(extractedDir, constants_1.TOOL_CACHE_NAME, version, arch);
|
||||||
|
return { version: version, cachedToolDir };
|
||||||
|
}
|
||||||
|
function constructDownloadUrl(version, platform, arch) {
|
||||||
|
const artifactVersionSuffix = semver.lte(version, "v0.4.10") && semver.gte(version, "v0.1.8")
|
||||||
|
? `-${version}`
|
||||||
|
: "";
|
||||||
|
const artifact = `ruff${artifactVersionSuffix}-${arch}-${platform}`;
|
||||||
|
let extension = ".tar.gz";
|
||||||
|
if (platform === "pc-windows-msvc") {
|
||||||
|
extension = ".zip";
|
||||||
|
}
|
||||||
|
const versionPrefix = semver.lte(version, "v0.4.10") ? "v" : "";
|
||||||
|
return `https://github.com/${constants_1.OWNER}/${constants_1.REPO}/releases/download/${versionPrefix}${version}/${artifact}${extension}`;
|
||||||
|
}
|
||||||
|
async function extractDownloadedArtifact(version, downloadPath, extension, platform, artifact) {
|
||||||
let ruffDir;
|
let ruffDir;
|
||||||
if (platform === "pc-windows-msvc") {
|
if (platform === "pc-windows-msvc") {
|
||||||
const fullPathWithExtension = `${downloadPath}${extension}`;
|
const fullPathWithExtension = `${downloadPath}${extension}`;
|
||||||
@@ -30574,11 +31439,15 @@ async function downloadVersion(platform, arch, version, checkSum, githubToken) {
|
|||||||
// On windows extracting the zip does not create an intermediate directory
|
// On windows extracting the zip does not create an intermediate directory
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const extractedDir = await tc.extractTar(downloadPath);
|
ruffDir = await tc.extractTar(downloadPath);
|
||||||
ruffDir = path.join(extractedDir, artifact);
|
if (semver.gte(version, "v0.5.0")) {
|
||||||
|
// Since v0.5.0 an intermediate directory is created
|
||||||
|
ruffDir = path.join(ruffDir, artifact);
|
||||||
}
|
}
|
||||||
const cachedToolDir = await tc.cacheDir(ruffDir, constants_1.TOOL_CACHE_NAME, version, arch);
|
}
|
||||||
return { version: version, cachedToolDir };
|
const files = await node_fs_1.promises.readdir(ruffDir);
|
||||||
|
core.debug(`Contents of ${ruffDir}: ${files.join(", ")}`);
|
||||||
|
return ruffDir;
|
||||||
}
|
}
|
||||||
async function resolveVersion(versionInput, githubToken) {
|
async function resolveVersion(versionInput, githubToken) {
|
||||||
core.debug(`Resolving ${versionInput}...`);
|
core.debug(`Resolving ${versionInput}...`);
|
||||||
@@ -30590,8 +31459,8 @@ async function resolveVersion(versionInput, githubToken) {
|
|||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
const availableVersions = await getAvailableVersions(githubToken);
|
const availableVersions = await getAvailableVersions(githubToken);
|
||||||
const resolvedVersion = tc.evaluateVersions(availableVersions, version);
|
const resolvedVersion = maxSatisfying(availableVersions, version);
|
||||||
if (resolvedVersion === "") {
|
if (resolvedVersion === undefined) {
|
||||||
throw new Error(`No version found for ${version}`);
|
throw new Error(`No version found for ${version}`);
|
||||||
}
|
}
|
||||||
core.debug(`Resolved version: ${resolvedVersion}`);
|
core.debug(`Resolved version: ${resolvedVersion}`);
|
||||||
@@ -30650,6 +31519,19 @@ async function getLatestRelease(octokit) {
|
|||||||
});
|
});
|
||||||
return latestRelease;
|
return latestRelease;
|
||||||
}
|
}
|
||||||
|
function maxSatisfying(versions, version) {
|
||||||
|
const maxSemver = tc.evaluateVersions(versions, version);
|
||||||
|
if (maxSemver !== "") {
|
||||||
|
core.debug(`Found a version that satisfies the semver range: ${maxSemver}`);
|
||||||
|
return maxSemver;
|
||||||
|
}
|
||||||
|
const maxPep440 = pep440.maxSatisfying(versions, version);
|
||||||
|
if (maxPep440 !== null) {
|
||||||
|
core.debug(`Found a version that satisfies the pep440 specifier: ${maxPep440}`);
|
||||||
|
return maxPep440;
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -30701,6 +31583,7 @@ const platforms_1 = __nccwpck_require__(8361);
|
|||||||
const inputs_1 = __nccwpck_require__(9612);
|
const inputs_1 = __nccwpck_require__(9612);
|
||||||
const pyproject_1 = __nccwpck_require__(3929);
|
const pyproject_1 = __nccwpck_require__(3929);
|
||||||
const fs = __importStar(__nccwpck_require__(3024));
|
const fs = __importStar(__nccwpck_require__(3024));
|
||||||
|
const semver = __importStar(__nccwpck_require__(9318));
|
||||||
async function run() {
|
async function run() {
|
||||||
const platform = (0, platforms_1.getPlatform)();
|
const platform = (0, platforms_1.getPlatform)();
|
||||||
const arch = (0, platforms_1.getArch)();
|
const arch = (0, platforms_1.getArch)();
|
||||||
@@ -30726,6 +31609,9 @@ async function run() {
|
|||||||
}
|
}
|
||||||
async function setupRuff(platform, arch, checkSum, githubToken) {
|
async function setupRuff(platform, arch, checkSum, githubToken) {
|
||||||
const resolvedVersion = await determineVersion();
|
const resolvedVersion = await determineVersion();
|
||||||
|
if (semver.lt(resolvedVersion, "v0.0.247")) {
|
||||||
|
throw Error("This action does not support ruff versions older than 0.0.247");
|
||||||
|
}
|
||||||
const toolCacheResult = (0, download_version_1.tryGetFromToolCache)(arch, resolvedVersion);
|
const toolCacheResult = (0, download_version_1.tryGetFromToolCache)(arch, resolvedVersion);
|
||||||
if (toolCacheResult.installedPath) {
|
if (toolCacheResult.installedPath) {
|
||||||
core.info(`Found ruffDir in tool-cache for ${toolCacheResult.version}`);
|
core.info(`Found ruffDir in tool-cache for ${toolCacheResult.version}`);
|
||||||
|
|||||||
+68
@@ -28205,6 +28205,74 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|||||||
exports.KNOWN_CHECKSUMS = void 0;
|
exports.KNOWN_CHECKSUMS = void 0;
|
||||||
// AUTOGENERATED_DO_NOT_EDIT
|
// AUTOGENERATED_DO_NOT_EDIT
|
||||||
exports.KNOWN_CHECKSUMS = {
|
exports.KNOWN_CHECKSUMS = {
|
||||||
|
"aarch64-apple-darwin-0.11.11": "814ccb26bed9c027bfc20ac88d33494ab0be62721757c73be70e26c23efbb3f7",
|
||||||
|
"aarch64-pc-windows-msvc-0.11.11": "7c43804a3a9646edbc70eda6dab061343a5545844dbaff82ba472df3be4b74e0",
|
||||||
|
"aarch64-unknown-linux-gnu-0.11.11": "26bc61fce6be2f358f656c7cc5b33725aafdc6ae6b21ee48fde10ad0d9b702ea",
|
||||||
|
"aarch64-unknown-linux-musl-0.11.11": "3ca33d9b68b8b0bc7e3673b7638910ac2f7c5399303b37bec4d13c005481a78a",
|
||||||
|
"arm-unknown-linux-musleabihf-0.11.11": "9d5cf3a8e5c495156479a7bb0a438f0f4bec6dbf69cdd48ede1cd508c41cd43b",
|
||||||
|
"armv7-unknown-linux-gnueabihf-0.11.11": "acb854e89c24333a17cc2aba7adabab7314dc16bb92b52094661f9ca5843703f",
|
||||||
|
"armv7-unknown-linux-musleabihf-0.11.11": "4e48259a71c1e806e64801bb3a55df555ee8b62360fb15f19e7ab3c496ee6f10",
|
||||||
|
"i686-pc-windows-msvc-0.11.11": "507a588d22c9eb3558c86e85d50f6cbc099d52444dc05290c61ae8454aee25de",
|
||||||
|
"i686-unknown-linux-gnu-0.11.11": "bd1e258d14a9a399bbb6fac468c3bfdc464858c028dd48ae3517f35b01a310c9",
|
||||||
|
"i686-unknown-linux-musl-0.11.11": "4de74178a1e0181ed56b623943a3198c4f7f90da918d050e846a1468050bf4ad",
|
||||||
|
"powerpc64-unknown-linux-gnu-0.11.11": "da883ef2174136c0d50570a16c01f57fd99c55e05914ba35dafd37b49e5f0331",
|
||||||
|
"powerpc64le-unknown-linux-gnu-0.11.11": "ecd54e2738005a345ecc80f834f89a3d55c791e89ad43ca24becfbed79d490a4",
|
||||||
|
"s390x-unknown-linux-gnu-0.11.11": "7a12eb9e85126cf9018842bc206b763211e9295ad6906e46c73b76ae110924ba",
|
||||||
|
"x86_64-apple-darwin-0.11.11": "8bef00e82bc07ea26b45adcffc3d55b2d0821f3a3e4d5f441f4dd4ad608fc1be",
|
||||||
|
"x86_64-pc-windows-msvc-0.11.11": "b7619ff27098a4d7f37c52fb8fc61ccfe677aaade7722a385b40f8d5273ebddd",
|
||||||
|
"x86_64-unknown-linux-gnu-0.11.11": "4883053606fc9efed6f8860145bcbf66f0f421684054c156c84b04bd9bf1638f",
|
||||||
|
"x86_64-unknown-linux-musl-0.11.11": "bb64b083767a5fd0a62e10e9a35614974ad53025e2878cf14a0c698680e6c30c",
|
||||||
|
"aarch64-apple-darwin-0.11.10": "1c4187c5ecd76535b76e991af1114d9c9947fe69e6d1a69c9ed6723d6777a53e",
|
||||||
|
"aarch64-pc-windows-msvc-0.11.10": "765234e319c8fce0b0216f570f4480b7a7b77d019347fa301536b808c245375b",
|
||||||
|
"aarch64-unknown-linux-gnu-0.11.10": "a39ff81bfe023d55008943f11221d49759d73b9fe6bf76584626cfcdd33d8684",
|
||||||
|
"aarch64-unknown-linux-musl-0.11.10": "acddbf808ba83c9dda01391ddd1c7f0c23d36f1f2cbbee6290d98363f3e4cafc",
|
||||||
|
"arm-unknown-linux-musleabihf-0.11.10": "8647e140f06719c68220157205ef21644901dfab8daefe72cf08317e45b212d4",
|
||||||
|
"armv7-unknown-linux-gnueabihf-0.11.10": "49eab0e5ec80c1d1a13737d5ad0ca69ac79227ece39750e4db38ad9f3a20f3f0",
|
||||||
|
"armv7-unknown-linux-musleabihf-0.11.10": "51bf490bd5a357d76dd5ca7d5aa6724e4445a413720e3d370cf28194f12800fc",
|
||||||
|
"i686-pc-windows-msvc-0.11.10": "e0aab393a0e9da99e7cadcfbad7bfa6abbe3de9e1fc69eb3e649ed27769fd7a1",
|
||||||
|
"i686-unknown-linux-gnu-0.11.10": "5cab3435770f98a3171e3890b870b2bf682f1639470d46e1538a2117a0072464",
|
||||||
|
"i686-unknown-linux-musl-0.11.10": "f98f40b6a9fddde57459ce635b94cacc417a6682aeab24ee1091f7486c64eaee",
|
||||||
|
"powerpc64-unknown-linux-gnu-0.11.10": "084d19d34b553212aceb988f2de97f304a214f0c93a230366bae55351d0c552c",
|
||||||
|
"powerpc64le-unknown-linux-gnu-0.11.10": "02abc4c8d4f40d4c2a02a4fe1edf6061ac724e95b0c65e5ccfd968b150d7154d",
|
||||||
|
"s390x-unknown-linux-gnu-0.11.10": "379ae3fa5b61d8e7433cf9fa5c76aec8a7e3f17e686f55100cccb13765b4c8f4",
|
||||||
|
"x86_64-apple-darwin-0.11.10": "25f0a8b819ea5c9377be02fd98c363ffb5659c35358881a1ce909f30b362cb39",
|
||||||
|
"x86_64-pc-windows-msvc-0.11.10": "d77bc4ecdb0f50f5a70422db90ec735caf71c3ea3e201e6e84a78fed695a4950",
|
||||||
|
"x86_64-unknown-linux-gnu-0.11.10": "ade458637abe06ff6780e0b3a5fdd281da552d33eb75b954fc2a27278258b856",
|
||||||
|
"x86_64-unknown-linux-musl-0.11.10": "8765d2f71c422f60a1456a2b2d9b2ee2ab286cb4859a774b5efb0a837a07f6dd",
|
||||||
|
"aarch64-apple-darwin-0.11.9": "d7955d8cf0b96471757d9733b21576b00baebecc056e3382d7023f092bfa8526",
|
||||||
|
"aarch64-pc-windows-msvc-0.11.9": "bebd2f05e37101023d32ca6b0a6ca1f619b0c5faccde7df0960d96bcc2bcf8bc",
|
||||||
|
"aarch64-unknown-linux-gnu-0.11.9": "8dffb447ee07405dcb0939666703a53ac38d6703abbe48db6d5ec8189544dd37",
|
||||||
|
"aarch64-unknown-linux-musl-0.11.9": "a3d6ee64ce182345d88ce2d1a2960d9261d2bcf6746b85be769b31e27349f6fb",
|
||||||
|
"arm-unknown-linux-musleabihf-0.11.9": "1c480bcfad71617754f9518e44db9670ff87145b79d03dec3db4b50c5a743dc3",
|
||||||
|
"armv7-unknown-linux-gnueabihf-0.11.9": "2a8739fb4544a2da95d3f64f43a01d86468dc4c72d47f0cdea4dbd36767e5b3b",
|
||||||
|
"armv7-unknown-linux-musleabihf-0.11.9": "5cfb13bad415b339162d60ca044c248130882ab014d648532fe789540f8fc80d",
|
||||||
|
"i686-pc-windows-msvc-0.11.9": "17dd0dc46c38bf1fe4af50f1cc5b128054a43182cfb643d5ab2ac0382e94719b",
|
||||||
|
"i686-unknown-linux-gnu-0.11.9": "472c13baa143869103ab40f8281d39691abc24ede7bfbcbc57bb2a796b84bb52",
|
||||||
|
"i686-unknown-linux-musl-0.11.9": "d1f795e59c2e0842352b00e8301ee8fe2fe321fd5af39f419b77534b4f6bd817",
|
||||||
|
"powerpc64-unknown-linux-gnu-0.11.9": "e5165cf2db7d74d1d05bc7fee0c36eb92578716a6b86d95d63c3a4577102350e",
|
||||||
|
"powerpc64le-unknown-linux-gnu-0.11.9": "022579b3fc348651103a2dddb21f5844dde111d9b539f6179448e076dc9979fe",
|
||||||
|
"s390x-unknown-linux-gnu-0.11.9": "f657228facc1a131a4896a028a847bba95ccf82dd6570385cacabb8f186db26d",
|
||||||
|
"x86_64-apple-darwin-0.11.9": "88d5c544ac4a420b3c58e0a858a7807c545668a6a3fb9e5403ad73aa0d55b653",
|
||||||
|
"x86_64-pc-windows-msvc-0.11.9": "b3c7144d40b3860b104cb88e5c8a95a326b81b3d305b9b6a2ce304761b8508c3",
|
||||||
|
"x86_64-unknown-linux-gnu-0.11.9": "276f6b928f61724b255e04e7e3b9e6859f86f4eec5d1b906a72983f3365b6671",
|
||||||
|
"x86_64-unknown-linux-musl-0.11.9": "7125dd1baf4f4d635a185c84fa8bef7f572a088e30d160a07f97f2c9fac70c6d",
|
||||||
|
"aarch64-apple-darwin-0.11.8": "bc3fc6693437efab1add3f288d6d16fac6926e6888c1e758ec162d5b6fe9099d",
|
||||||
|
"aarch64-pc-windows-msvc-0.11.8": "06c2152f269949390bdde0cc9f6d74eb3f4068853a3d772b9ac9baa675b63a06",
|
||||||
|
"aarch64-unknown-linux-gnu-0.11.8": "a6010d9393e254c73c81a9942fd1d49c6d1061a84bf76e024627924adfdd9e99",
|
||||||
|
"aarch64-unknown-linux-musl-0.11.8": "7a4882654cd8b7c79b0bacd0f9b2062ec08a111a7f2621c69718000a165c93b6",
|
||||||
|
"arm-unknown-linux-musleabihf-0.11.8": "e9d8c2e59d97b841273369350c64113708b402372fa6fd933aef70f2d4db9bf6",
|
||||||
|
"armv7-unknown-linux-gnueabihf-0.11.8": "1eda8253c82dfc9232508ffb52e1e7d320719c60781a95a0f0e2a4b9ac7d7829",
|
||||||
|
"armv7-unknown-linux-musleabihf-0.11.8": "cf4e4ca7426279051c4bdfb846749b8a75fe01892b9b08247dc700ece64af277",
|
||||||
|
"i686-pc-windows-msvc-0.11.8": "c9d35f023f94110fd77e0d84240b8c1daf26f923e115556d7ef1e1d3af663e83",
|
||||||
|
"i686-unknown-linux-gnu-0.11.8": "3d98524a340aede7ab974fb6f62778254aff1e9a57e565a22a348fdc02753566",
|
||||||
|
"i686-unknown-linux-musl-0.11.8": "01f5a7ac05eaa0d548792c309e75fa24d18b6685831743e984d56b0fc4514251",
|
||||||
|
"powerpc64-unknown-linux-gnu-0.11.8": "2c45c30ed216f67148ad8e96656efa0f9a4a7591c7def32fdd9db5db86a643fa",
|
||||||
|
"powerpc64le-unknown-linux-gnu-0.11.8": "85705683af19f1dfc3c90424dab2525422a1e03e487610a79b725f96e04a4953",
|
||||||
|
"s390x-unknown-linux-gnu-0.11.8": "722aa00e479f58f906e7bf697336b9ed3ccf0df939b83e10f2b778a6b136bdc6",
|
||||||
|
"x86_64-apple-darwin-0.11.8": "56eaecad5d4e41d2f799bbb705d83238436de4a547e5d04c0591ae3422ae61cc",
|
||||||
|
"x86_64-pc-windows-msvc-0.11.8": "2279f17ad7474b9a1493ec2aab404e6f1109272d3221a5d38ee06ceb0e4c6100",
|
||||||
|
"x86_64-unknown-linux-gnu-0.11.8": "8edc7a28bb958af4ebfb6a85002c8cd96d88f264dd8c080e065a6e984963ce3c",
|
||||||
|
"x86_64-unknown-linux-musl-0.11.8": "d5b331c4dd88a99b3b16babcaa8dec8b22f4004b880243f35f73c276f56684ff",
|
||||||
"aarch64-apple-darwin-0.11.7": "1c6cc5fb36fb001dfa7331892f9d808bc7ced1d45f0ec54b4caeaa571bc55495",
|
"aarch64-apple-darwin-0.11.7": "1c6cc5fb36fb001dfa7331892f9d808bc7ced1d45f0ec54b4caeaa571bc55495",
|
||||||
"aarch64-pc-windows-msvc-0.11.7": "c18bc5d87b9b582f1f9da6bdf78fa4a710f9d40f409cfae330f20bf9f16ce631",
|
"aarch64-pc-windows-msvc-0.11.7": "c18bc5d87b9b582f1f9da6bdf78fa4a710f9d40f409cfae330f20bf9f16ce631",
|
||||||
"aarch64-unknown-linux-gnu-0.11.7": "ccc11afdc3d3d3b146f972645d54a49c819034b8379d190281962bfa80c69389",
|
"aarch64-unknown-linux-gnu-0.11.7": "ccc11afdc3d3d3b146f972645d54a49c819034b8379d190281962bfa80c69389",
|
||||||
|
|||||||
Generated
+19
@@ -15,10 +15,12 @@
|
|||||||
"@octokit/core": "^6.1.4",
|
"@octokit/core": "^6.1.4",
|
||||||
"@octokit/plugin-paginate-rest": "^11.4.3",
|
"@octokit/plugin-paginate-rest": "^11.4.3",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^13.3.1",
|
"@octokit/plugin-rest-endpoint-methods": "^13.3.1",
|
||||||
|
"@renovatebot/pep440": "^4.1.0",
|
||||||
"smol-toml": "^1.3.1"
|
"smol-toml": "^1.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "1.9.4",
|
"@biomejs/biome": "1.9.4",
|
||||||
|
"@types/js-yaml": "^4.0.9",
|
||||||
"@types/node": "^22.13.10",
|
"@types/node": "^22.13.10",
|
||||||
"@types/semver": "^7.5.8",
|
"@types/semver": "^7.5.8",
|
||||||
"@vercel/ncc": "^0.38.3",
|
"@vercel/ncc": "^0.38.3",
|
||||||
@@ -350,6 +352,23 @@
|
|||||||
"@octokit/openapi-types": "^23.0.1"
|
"@octokit/openapi-types": "^23.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@renovatebot/pep440": {
|
||||||
|
"version": "4.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@renovatebot/pep440/-/pep440-4.1.0.tgz",
|
||||||
|
"integrity": "sha512-mo2RxnOSp78Njt1HmgMwjl6FapP4OyIS8HypJlymCvN7AIV2Xf5PmZfl/E3O1WWZ6IjKrfsEAaPWFMi8tnkq3g==",
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"engines": {
|
||||||
|
"node": "^20.9.0 || ^22.11.0",
|
||||||
|
"pnpm": "^9.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@types/js-yaml": {
|
||||||
|
"version": "4.0.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.9.tgz",
|
||||||
|
"integrity": "sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "22.13.10",
|
"version": "22.13.10",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.10.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.10.tgz",
|
||||||
|
|||||||
@@ -28,10 +28,12 @@
|
|||||||
"@octokit/core": "^6.1.4",
|
"@octokit/core": "^6.1.4",
|
||||||
"@octokit/plugin-paginate-rest": "^11.4.3",
|
"@octokit/plugin-paginate-rest": "^11.4.3",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^13.3.1",
|
"@octokit/plugin-rest-endpoint-methods": "^13.3.1",
|
||||||
|
"@renovatebot/pep440": "^4.1.0",
|
||||||
"smol-toml": "^1.3.1"
|
"smol-toml": "^1.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "1.9.4",
|
"@biomejs/biome": "1.9.4",
|
||||||
|
"@types/js-yaml": "^4.0.9",
|
||||||
"@types/node": "^22.13.10",
|
"@types/node": "^22.13.10",
|
||||||
"@types/semver": "^7.5.8",
|
"@types/semver": "^7.5.8",
|
||||||
"@vercel/ncc": "^0.38.3",
|
"@vercel/ncc": "^0.38.3",
|
||||||
|
|||||||
@@ -1,5 +1,141 @@
|
|||||||
// 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.11.11":
|
||||||
|
"814ccb26bed9c027bfc20ac88d33494ab0be62721757c73be70e26c23efbb3f7",
|
||||||
|
"aarch64-pc-windows-msvc-0.11.11":
|
||||||
|
"7c43804a3a9646edbc70eda6dab061343a5545844dbaff82ba472df3be4b74e0",
|
||||||
|
"aarch64-unknown-linux-gnu-0.11.11":
|
||||||
|
"26bc61fce6be2f358f656c7cc5b33725aafdc6ae6b21ee48fde10ad0d9b702ea",
|
||||||
|
"aarch64-unknown-linux-musl-0.11.11":
|
||||||
|
"3ca33d9b68b8b0bc7e3673b7638910ac2f7c5399303b37bec4d13c005481a78a",
|
||||||
|
"arm-unknown-linux-musleabihf-0.11.11":
|
||||||
|
"9d5cf3a8e5c495156479a7bb0a438f0f4bec6dbf69cdd48ede1cd508c41cd43b",
|
||||||
|
"armv7-unknown-linux-gnueabihf-0.11.11":
|
||||||
|
"acb854e89c24333a17cc2aba7adabab7314dc16bb92b52094661f9ca5843703f",
|
||||||
|
"armv7-unknown-linux-musleabihf-0.11.11":
|
||||||
|
"4e48259a71c1e806e64801bb3a55df555ee8b62360fb15f19e7ab3c496ee6f10",
|
||||||
|
"i686-pc-windows-msvc-0.11.11":
|
||||||
|
"507a588d22c9eb3558c86e85d50f6cbc099d52444dc05290c61ae8454aee25de",
|
||||||
|
"i686-unknown-linux-gnu-0.11.11":
|
||||||
|
"bd1e258d14a9a399bbb6fac468c3bfdc464858c028dd48ae3517f35b01a310c9",
|
||||||
|
"i686-unknown-linux-musl-0.11.11":
|
||||||
|
"4de74178a1e0181ed56b623943a3198c4f7f90da918d050e846a1468050bf4ad",
|
||||||
|
"powerpc64-unknown-linux-gnu-0.11.11":
|
||||||
|
"da883ef2174136c0d50570a16c01f57fd99c55e05914ba35dafd37b49e5f0331",
|
||||||
|
"powerpc64le-unknown-linux-gnu-0.11.11":
|
||||||
|
"ecd54e2738005a345ecc80f834f89a3d55c791e89ad43ca24becfbed79d490a4",
|
||||||
|
"s390x-unknown-linux-gnu-0.11.11":
|
||||||
|
"7a12eb9e85126cf9018842bc206b763211e9295ad6906e46c73b76ae110924ba",
|
||||||
|
"x86_64-apple-darwin-0.11.11":
|
||||||
|
"8bef00e82bc07ea26b45adcffc3d55b2d0821f3a3e4d5f441f4dd4ad608fc1be",
|
||||||
|
"x86_64-pc-windows-msvc-0.11.11":
|
||||||
|
"b7619ff27098a4d7f37c52fb8fc61ccfe677aaade7722a385b40f8d5273ebddd",
|
||||||
|
"x86_64-unknown-linux-gnu-0.11.11":
|
||||||
|
"4883053606fc9efed6f8860145bcbf66f0f421684054c156c84b04bd9bf1638f",
|
||||||
|
"x86_64-unknown-linux-musl-0.11.11":
|
||||||
|
"bb64b083767a5fd0a62e10e9a35614974ad53025e2878cf14a0c698680e6c30c",
|
||||||
|
"aarch64-apple-darwin-0.11.10":
|
||||||
|
"1c4187c5ecd76535b76e991af1114d9c9947fe69e6d1a69c9ed6723d6777a53e",
|
||||||
|
"aarch64-pc-windows-msvc-0.11.10":
|
||||||
|
"765234e319c8fce0b0216f570f4480b7a7b77d019347fa301536b808c245375b",
|
||||||
|
"aarch64-unknown-linux-gnu-0.11.10":
|
||||||
|
"a39ff81bfe023d55008943f11221d49759d73b9fe6bf76584626cfcdd33d8684",
|
||||||
|
"aarch64-unknown-linux-musl-0.11.10":
|
||||||
|
"acddbf808ba83c9dda01391ddd1c7f0c23d36f1f2cbbee6290d98363f3e4cafc",
|
||||||
|
"arm-unknown-linux-musleabihf-0.11.10":
|
||||||
|
"8647e140f06719c68220157205ef21644901dfab8daefe72cf08317e45b212d4",
|
||||||
|
"armv7-unknown-linux-gnueabihf-0.11.10":
|
||||||
|
"49eab0e5ec80c1d1a13737d5ad0ca69ac79227ece39750e4db38ad9f3a20f3f0",
|
||||||
|
"armv7-unknown-linux-musleabihf-0.11.10":
|
||||||
|
"51bf490bd5a357d76dd5ca7d5aa6724e4445a413720e3d370cf28194f12800fc",
|
||||||
|
"i686-pc-windows-msvc-0.11.10":
|
||||||
|
"e0aab393a0e9da99e7cadcfbad7bfa6abbe3de9e1fc69eb3e649ed27769fd7a1",
|
||||||
|
"i686-unknown-linux-gnu-0.11.10":
|
||||||
|
"5cab3435770f98a3171e3890b870b2bf682f1639470d46e1538a2117a0072464",
|
||||||
|
"i686-unknown-linux-musl-0.11.10":
|
||||||
|
"f98f40b6a9fddde57459ce635b94cacc417a6682aeab24ee1091f7486c64eaee",
|
||||||
|
"powerpc64-unknown-linux-gnu-0.11.10":
|
||||||
|
"084d19d34b553212aceb988f2de97f304a214f0c93a230366bae55351d0c552c",
|
||||||
|
"powerpc64le-unknown-linux-gnu-0.11.10":
|
||||||
|
"02abc4c8d4f40d4c2a02a4fe1edf6061ac724e95b0c65e5ccfd968b150d7154d",
|
||||||
|
"s390x-unknown-linux-gnu-0.11.10":
|
||||||
|
"379ae3fa5b61d8e7433cf9fa5c76aec8a7e3f17e686f55100cccb13765b4c8f4",
|
||||||
|
"x86_64-apple-darwin-0.11.10":
|
||||||
|
"25f0a8b819ea5c9377be02fd98c363ffb5659c35358881a1ce909f30b362cb39",
|
||||||
|
"x86_64-pc-windows-msvc-0.11.10":
|
||||||
|
"d77bc4ecdb0f50f5a70422db90ec735caf71c3ea3e201e6e84a78fed695a4950",
|
||||||
|
"x86_64-unknown-linux-gnu-0.11.10":
|
||||||
|
"ade458637abe06ff6780e0b3a5fdd281da552d33eb75b954fc2a27278258b856",
|
||||||
|
"x86_64-unknown-linux-musl-0.11.10":
|
||||||
|
"8765d2f71c422f60a1456a2b2d9b2ee2ab286cb4859a774b5efb0a837a07f6dd",
|
||||||
|
"aarch64-apple-darwin-0.11.9":
|
||||||
|
"d7955d8cf0b96471757d9733b21576b00baebecc056e3382d7023f092bfa8526",
|
||||||
|
"aarch64-pc-windows-msvc-0.11.9":
|
||||||
|
"bebd2f05e37101023d32ca6b0a6ca1f619b0c5faccde7df0960d96bcc2bcf8bc",
|
||||||
|
"aarch64-unknown-linux-gnu-0.11.9":
|
||||||
|
"8dffb447ee07405dcb0939666703a53ac38d6703abbe48db6d5ec8189544dd37",
|
||||||
|
"aarch64-unknown-linux-musl-0.11.9":
|
||||||
|
"a3d6ee64ce182345d88ce2d1a2960d9261d2bcf6746b85be769b31e27349f6fb",
|
||||||
|
"arm-unknown-linux-musleabihf-0.11.9":
|
||||||
|
"1c480bcfad71617754f9518e44db9670ff87145b79d03dec3db4b50c5a743dc3",
|
||||||
|
"armv7-unknown-linux-gnueabihf-0.11.9":
|
||||||
|
"2a8739fb4544a2da95d3f64f43a01d86468dc4c72d47f0cdea4dbd36767e5b3b",
|
||||||
|
"armv7-unknown-linux-musleabihf-0.11.9":
|
||||||
|
"5cfb13bad415b339162d60ca044c248130882ab014d648532fe789540f8fc80d",
|
||||||
|
"i686-pc-windows-msvc-0.11.9":
|
||||||
|
"17dd0dc46c38bf1fe4af50f1cc5b128054a43182cfb643d5ab2ac0382e94719b",
|
||||||
|
"i686-unknown-linux-gnu-0.11.9":
|
||||||
|
"472c13baa143869103ab40f8281d39691abc24ede7bfbcbc57bb2a796b84bb52",
|
||||||
|
"i686-unknown-linux-musl-0.11.9":
|
||||||
|
"d1f795e59c2e0842352b00e8301ee8fe2fe321fd5af39f419b77534b4f6bd817",
|
||||||
|
"powerpc64-unknown-linux-gnu-0.11.9":
|
||||||
|
"e5165cf2db7d74d1d05bc7fee0c36eb92578716a6b86d95d63c3a4577102350e",
|
||||||
|
"powerpc64le-unknown-linux-gnu-0.11.9":
|
||||||
|
"022579b3fc348651103a2dddb21f5844dde111d9b539f6179448e076dc9979fe",
|
||||||
|
"s390x-unknown-linux-gnu-0.11.9":
|
||||||
|
"f657228facc1a131a4896a028a847bba95ccf82dd6570385cacabb8f186db26d",
|
||||||
|
"x86_64-apple-darwin-0.11.9":
|
||||||
|
"88d5c544ac4a420b3c58e0a858a7807c545668a6a3fb9e5403ad73aa0d55b653",
|
||||||
|
"x86_64-pc-windows-msvc-0.11.9":
|
||||||
|
"b3c7144d40b3860b104cb88e5c8a95a326b81b3d305b9b6a2ce304761b8508c3",
|
||||||
|
"x86_64-unknown-linux-gnu-0.11.9":
|
||||||
|
"276f6b928f61724b255e04e7e3b9e6859f86f4eec5d1b906a72983f3365b6671",
|
||||||
|
"x86_64-unknown-linux-musl-0.11.9":
|
||||||
|
"7125dd1baf4f4d635a185c84fa8bef7f572a088e30d160a07f97f2c9fac70c6d",
|
||||||
|
"aarch64-apple-darwin-0.11.8":
|
||||||
|
"bc3fc6693437efab1add3f288d6d16fac6926e6888c1e758ec162d5b6fe9099d",
|
||||||
|
"aarch64-pc-windows-msvc-0.11.8":
|
||||||
|
"06c2152f269949390bdde0cc9f6d74eb3f4068853a3d772b9ac9baa675b63a06",
|
||||||
|
"aarch64-unknown-linux-gnu-0.11.8":
|
||||||
|
"a6010d9393e254c73c81a9942fd1d49c6d1061a84bf76e024627924adfdd9e99",
|
||||||
|
"aarch64-unknown-linux-musl-0.11.8":
|
||||||
|
"7a4882654cd8b7c79b0bacd0f9b2062ec08a111a7f2621c69718000a165c93b6",
|
||||||
|
"arm-unknown-linux-musleabihf-0.11.8":
|
||||||
|
"e9d8c2e59d97b841273369350c64113708b402372fa6fd933aef70f2d4db9bf6",
|
||||||
|
"armv7-unknown-linux-gnueabihf-0.11.8":
|
||||||
|
"1eda8253c82dfc9232508ffb52e1e7d320719c60781a95a0f0e2a4b9ac7d7829",
|
||||||
|
"armv7-unknown-linux-musleabihf-0.11.8":
|
||||||
|
"cf4e4ca7426279051c4bdfb846749b8a75fe01892b9b08247dc700ece64af277",
|
||||||
|
"i686-pc-windows-msvc-0.11.8":
|
||||||
|
"c9d35f023f94110fd77e0d84240b8c1daf26f923e115556d7ef1e1d3af663e83",
|
||||||
|
"i686-unknown-linux-gnu-0.11.8":
|
||||||
|
"3d98524a340aede7ab974fb6f62778254aff1e9a57e565a22a348fdc02753566",
|
||||||
|
"i686-unknown-linux-musl-0.11.8":
|
||||||
|
"01f5a7ac05eaa0d548792c309e75fa24d18b6685831743e984d56b0fc4514251",
|
||||||
|
"powerpc64-unknown-linux-gnu-0.11.8":
|
||||||
|
"2c45c30ed216f67148ad8e96656efa0f9a4a7591c7def32fdd9db5db86a643fa",
|
||||||
|
"powerpc64le-unknown-linux-gnu-0.11.8":
|
||||||
|
"85705683af19f1dfc3c90424dab2525422a1e03e487610a79b725f96e04a4953",
|
||||||
|
"s390x-unknown-linux-gnu-0.11.8":
|
||||||
|
"722aa00e479f58f906e7bf697336b9ed3ccf0df939b83e10f2b778a6b136bdc6",
|
||||||
|
"x86_64-apple-darwin-0.11.8":
|
||||||
|
"56eaecad5d4e41d2f799bbb705d83238436de4a547e5d04c0591ae3422ae61cc",
|
||||||
|
"x86_64-pc-windows-msvc-0.11.8":
|
||||||
|
"2279f17ad7474b9a1493ec2aab404e6f1109272d3221a5d38ee06ceb0e4c6100",
|
||||||
|
"x86_64-unknown-linux-gnu-0.11.8":
|
||||||
|
"8edc7a28bb958af4ebfb6a85002c8cd96d88f264dd8c080e065a6e984963ce3c",
|
||||||
|
"x86_64-unknown-linux-musl-0.11.8":
|
||||||
|
"d5b331c4dd88a99b3b16babcaa8dec8b22f4004b880243f35f73c276f56684ff",
|
||||||
"aarch64-apple-darwin-0.11.7":
|
"aarch64-apple-darwin-0.11.7":
|
||||||
"1c6cc5fb36fb001dfa7331892f9d808bc7ced1d45f0ec54b4caeaa571bc55495",
|
"1c6cc5fb36fb001dfa7331892f9d808bc7ced1d45f0ec54b4caeaa571bc55495",
|
||||||
"aarch64-pc-windows-msvc-0.11.7":
|
"aarch64-pc-windows-msvc-0.11.7":
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import * as core from "@actions/core";
|
|||||||
import * as tc from "@actions/tool-cache";
|
import * as tc from "@actions/tool-cache";
|
||||||
import * as path from "node:path";
|
import * as path from "node:path";
|
||||||
import { promises as fs } from "node:fs";
|
import { promises as fs } from "node:fs";
|
||||||
|
import * as semver from "semver";
|
||||||
|
import * as pep440 from "@renovatebot/pep440";
|
||||||
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";
|
||||||
@@ -38,16 +40,59 @@ export async function downloadVersion(
|
|||||||
if (platform === "pc-windows-msvc") {
|
if (platform === "pc-windows-msvc") {
|
||||||
extension = ".zip";
|
extension = ".zip";
|
||||||
}
|
}
|
||||||
const downloadUrl = `https://github.com/${OWNER}/${REPO}/releases/download/${version}/${artifact}${extension}`;
|
const downloadUrl = constructDownloadUrl(version, platform, arch);
|
||||||
core.info(`Downloading ruff from "${downloadUrl}" ...`);
|
core.debug(`Downloading ruff from "${downloadUrl}" ...`);
|
||||||
|
|
||||||
const downloadPath = await tc.downloadTool(
|
const downloadPath = await tc.downloadTool(
|
||||||
downloadUrl,
|
downloadUrl,
|
||||||
undefined,
|
undefined,
|
||||||
githubToken,
|
githubToken,
|
||||||
);
|
);
|
||||||
|
core.debug(`Downloaded ruff to "${downloadPath}"`);
|
||||||
await validateChecksum(checkSum, downloadPath, arch, platform, version);
|
await validateChecksum(checkSum, downloadPath, arch, platform, version);
|
||||||
|
|
||||||
|
const extractedDir = await extractDownloadedArtifact(
|
||||||
|
version,
|
||||||
|
downloadPath,
|
||||||
|
extension,
|
||||||
|
platform,
|
||||||
|
artifact,
|
||||||
|
);
|
||||||
|
|
||||||
|
const cachedToolDir = await tc.cacheDir(
|
||||||
|
extractedDir,
|
||||||
|
TOOL_CACHE_NAME,
|
||||||
|
version,
|
||||||
|
arch,
|
||||||
|
);
|
||||||
|
return { version: version, cachedToolDir };
|
||||||
|
}
|
||||||
|
|
||||||
|
function constructDownloadUrl(
|
||||||
|
version: string,
|
||||||
|
platform: Platform,
|
||||||
|
arch: Architecture,
|
||||||
|
): string {
|
||||||
|
const artifactVersionSuffix =
|
||||||
|
semver.lte(version, "v0.4.10") && semver.gte(version, "v0.1.8")
|
||||||
|
? `-${version}`
|
||||||
|
: "";
|
||||||
|
const artifact = `ruff${artifactVersionSuffix}-${arch}-${platform}`;
|
||||||
|
let extension = ".tar.gz";
|
||||||
|
if (platform === "pc-windows-msvc") {
|
||||||
|
extension = ".zip";
|
||||||
|
}
|
||||||
|
const versionPrefix = semver.lte(version, "v0.4.10") ? "v" : "";
|
||||||
|
return `https://github.com/${OWNER}/${REPO}/releases/download/${versionPrefix}${version}/${artifact}${extension}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
async function extractDownloadedArtifact(
|
||||||
|
version: string,
|
||||||
|
downloadPath: string,
|
||||||
|
extension: string,
|
||||||
|
platform: Platform,
|
||||||
|
artifact: string,
|
||||||
|
): Promise<string> {
|
||||||
let ruffDir: string;
|
let ruffDir: string;
|
||||||
if (platform === "pc-windows-msvc") {
|
if (platform === "pc-windows-msvc") {
|
||||||
const fullPathWithExtension = `${downloadPath}${extension}`;
|
const fullPathWithExtension = `${downloadPath}${extension}`;
|
||||||
@@ -55,16 +100,15 @@ export async function downloadVersion(
|
|||||||
ruffDir = await tc.extractZip(fullPathWithExtension);
|
ruffDir = await tc.extractZip(fullPathWithExtension);
|
||||||
// On windows extracting the zip does not create an intermediate directory
|
// On windows extracting the zip does not create an intermediate directory
|
||||||
} else {
|
} else {
|
||||||
const extractedDir = await tc.extractTar(downloadPath);
|
ruffDir = await tc.extractTar(downloadPath);
|
||||||
ruffDir = path.join(extractedDir, artifact);
|
if (semver.gte(version, "v0.5.0")) {
|
||||||
|
// Since v0.5.0 an intermediate directory is created
|
||||||
|
ruffDir = path.join(ruffDir, artifact);
|
||||||
}
|
}
|
||||||
const cachedToolDir = await tc.cacheDir(
|
}
|
||||||
ruffDir,
|
const files = await fs.readdir(ruffDir);
|
||||||
TOOL_CACHE_NAME,
|
core.debug(`Contents of ${ruffDir}: ${files.join(", ")}`);
|
||||||
version,
|
return ruffDir;
|
||||||
arch,
|
|
||||||
);
|
|
||||||
return { version: version, cachedToolDir };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function resolveVersion(
|
export async function resolveVersion(
|
||||||
@@ -81,8 +125,8 @@ export async function resolveVersion(
|
|||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
const availableVersions = await getAvailableVersions(githubToken);
|
const availableVersions = await getAvailableVersions(githubToken);
|
||||||
const resolvedVersion = tc.evaluateVersions(availableVersions, version);
|
const resolvedVersion = maxSatisfying(availableVersions, version);
|
||||||
if (resolvedVersion === "") {
|
if (resolvedVersion === undefined) {
|
||||||
throw new Error(`No version found for ${version}`);
|
throw new Error(`No version found for ${version}`);
|
||||||
}
|
}
|
||||||
core.debug(`Resolved version: ${resolvedVersion}`);
|
core.debug(`Resolved version: ${resolvedVersion}`);
|
||||||
@@ -152,3 +196,22 @@ async function getLatestRelease(
|
|||||||
});
|
});
|
||||||
return latestRelease;
|
return latestRelease;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function maxSatisfying(
|
||||||
|
versions: string[],
|
||||||
|
version: string,
|
||||||
|
): string | undefined {
|
||||||
|
const maxSemver = tc.evaluateVersions(versions, version);
|
||||||
|
if (maxSemver !== "") {
|
||||||
|
core.debug(`Found a version that satisfies the semver range: ${maxSemver}`);
|
||||||
|
return maxSemver;
|
||||||
|
}
|
||||||
|
const maxPep440 = pep440.maxSatisfying(versions, version);
|
||||||
|
if (maxPep440 !== null) {
|
||||||
|
core.debug(
|
||||||
|
`Found a version that satisfies the pep440 specifier: ${maxPep440}`,
|
||||||
|
);
|
||||||
|
return maxPep440;
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import {
|
|||||||
} from "./utils/inputs";
|
} from "./utils/inputs";
|
||||||
import { getRuffVersionFromRequirementsFile } from "./utils/pyproject";
|
import { getRuffVersionFromRequirementsFile } from "./utils/pyproject";
|
||||||
import * as fs from "node:fs";
|
import * as fs from "node:fs";
|
||||||
|
import * as semver from "semver";
|
||||||
|
|
||||||
async function run(): Promise<void> {
|
async function run(): Promise<void> {
|
||||||
const platform = getPlatform();
|
const platform = getPlatform();
|
||||||
@@ -62,6 +63,11 @@ async function setupRuff(
|
|||||||
githubToken: string,
|
githubToken: string,
|
||||||
): Promise<{ ruffDir: string; version: string }> {
|
): Promise<{ ruffDir: string; version: string }> {
|
||||||
const resolvedVersion = await determineVersion();
|
const resolvedVersion = await determineVersion();
|
||||||
|
if (semver.lt(resolvedVersion, "v0.0.247")) {
|
||||||
|
throw Error(
|
||||||
|
"This action does not support ruff versions older than 0.0.247",
|
||||||
|
);
|
||||||
|
}
|
||||||
const toolCacheResult = tryGetFromToolCache(arch, resolvedVersion);
|
const toolCacheResult = tryGetFromToolCache(arch, resolvedVersion);
|
||||||
if (toolCacheResult.installedPath) {
|
if (toolCacheResult.installedPath) {
|
||||||
core.info(`Found ruffDir in tool-cache for ${toolCacheResult.version}`);
|
core.info(`Found ruffDir in tool-cache for ${toolCacheResult.version}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user