Bump biome to v2 (#515)

This commit is contained in:
Kevin Stillhammer
2025-08-12 22:12:10 +02:00
committed by GitHub
parent 1463845d3c
commit 4109b4033f
27 changed files with 13393 additions and 10945 deletions

View File

@ -1,9 +1,9 @@
import * as fs from "node:fs";
import * as crypto from "node:crypto";
import * as fs from "node:fs";
import * as core from "@actions/core";
import { KNOWN_CHECKSUMS } from "./known-checksums";
import type { Architecture, Platform } from "../../utils/platforms";
import { KNOWN_CHECKSUMS } from "./known-checksums";
export async function validateChecksum(
checkSum: string | undefined,
@ -12,7 +12,7 @@ export async function validateChecksum(
platform: Platform,
version: string,
): Promise<void> {
let isValid: boolean | undefined = undefined;
let isValid: boolean | undefined;
if (checkSum !== undefined && checkSum !== "") {
isValid = await validateFileCheckSum(downloadPath, checkSum);
} else {

View File

@ -1,12 +1,12 @@
import { promises as fs } from "node:fs";
import * as path from "node:path";
import * as core from "@actions/core";
import * as tc from "@actions/tool-cache";
import * as path from "node:path";
import * as pep440 from "@renovatebot/pep440";
import { promises as fs } from "node:fs";
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
import { Octokit } from "../utils/octokit";
import type { Architecture, Platform } from "../utils/platforms";
import { validateChecksum } from "./checksum/checksum";
import { Octokit } from "../utils/octokit";
import {
getDownloadUrl,
getLatestKnownVersion as getLatestVersionInManifest,
@ -24,7 +24,7 @@ export function tryGetFromToolCache(
resolvedVersion = version;
}
const installedPath = tc.find(TOOL_CACHE_NAME, resolvedVersion, arch);
return { version: resolvedVersion, installedPath };
return { installedPath, version: resolvedVersion };
}
export async function downloadVersionFromGithub(
@ -121,7 +121,7 @@ async function downloadVersion(
version,
arch,
);
return { version: version, cachedToolDir };
return { cachedToolDir, version: version };
}
function getExtension(platform: Platform): string {

View File

@ -1,8 +1,8 @@
import { promises as fs } from "node:fs";
import { join } from "node:path";
import * as core from "@actions/core";
import * as semver from "semver";
import { fetch } from "../utils/fetch";
import { join } from "node:path";
const localManifestFile = join(__dirname, "..", "..", "version-manifest.json");
@ -79,11 +79,11 @@ export async function updateVersionManifest(
}
const artifactParts = artifactName.split(".")[0].split("-");
manifest.push({
version: version,
artifactName: artifactName,
arch: artifactParts[1],
platform: artifactName.split(`uv-${artifactParts[1]}-`)[1].split(".")[0],
artifactName: artifactName,
downloadUrl: downloadUrl,
platform: artifactName.split(`uv-${artifactParts[1]}-`)[1].split(".")[0],
version: version,
});
}
core.debug(`Updating manifest-file: ${JSON.stringify(manifest)}`);