mirror of
https://github.com/astral-sh/setup-uv.git
synced 2025-05-17 22:54:45 +00:00
Migrate to Biome for linting and formatting (#107)
This commit is contained in:
parent
023eb7875f
commit
c11f8674f8
17 changed files with 331 additions and 5772 deletions
|
@ -1,9 +1,9 @@
|
|||
import * as fs from "fs";
|
||||
import * as crypto from "crypto";
|
||||
import * as fs from "node:fs";
|
||||
import * as crypto from "node:crypto";
|
||||
|
||||
import * as core from "@actions/core";
|
||||
import { KNOWN_CHECKSUMS } from "./known-checksums";
|
||||
import { Architecture, Platform } from "../../utils/platforms";
|
||||
import type { Architecture, Platform } from "../../utils/platforms";
|
||||
|
||||
export async function validateChecksum(
|
||||
checkSum: string | undefined,
|
||||
|
@ -16,7 +16,7 @@ export async function validateChecksum(
|
|||
if (checkSum !== undefined && checkSum !== "") {
|
||||
isValid = await validateFileCheckSum(downloadPath, checkSum);
|
||||
} else {
|
||||
core.debug(`Checksum not provided. Checking known checksums.`);
|
||||
core.debug("Checksum not provided. Checking known checksums.");
|
||||
const key = `${arch}-${platform}-${version}`;
|
||||
if (key in KNOWN_CHECKSUMS) {
|
||||
const knownChecksum = KNOWN_CHECKSUMS[`${arch}-${platform}-${version}`];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { promises as fs } from "fs";
|
||||
import { promises as fs } from "node:fs";
|
||||
import * as tc from "@actions/tool-cache";
|
||||
export async function updateChecksums(
|
||||
filePath: string,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as core from "@actions/core";
|
||||
import * as tc from "@actions/tool-cache";
|
||||
import * as exec from "@actions/exec";
|
||||
import * as path from "path";
|
||||
import { Architecture, Platform } from "../utils/platforms";
|
||||
import * as path from "node:path";
|
||||
import type { Architecture, Platform } from "../utils/platforms";
|
||||
import { validateChecksum } from "./checksum/checksum";
|
||||
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as core from "@actions/core";
|
||||
import * as tc from "@actions/tool-cache";
|
||||
import * as path from "path";
|
||||
import * as path from "node:path";
|
||||
import { OWNER, REPO, TOOL_CACHE_NAME } from "../utils/constants";
|
||||
import { Architecture, Platform } from "../utils/platforms";
|
||||
import type { Architecture, Platform } from "../utils/platforms";
|
||||
import { validateChecksum } from "./checksum/checksum";
|
||||
import * as github from "@actions/github";
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ async function saveCache(): Promise<void> {
|
|||
if (!cacheKey) {
|
||||
core.warning("Error retrieving cache key from state.");
|
||||
return;
|
||||
} else if (matchedKey === cacheKey) {
|
||||
}
|
||||
if (matchedKey === cacheKey) {
|
||||
core.info(`Cache hit occurred on key ${cacheKey}, not saving cache.`);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as core from "@actions/core";
|
||||
import * as path from "path";
|
||||
import * as path from "node:path";
|
||||
import {
|
||||
downloadVersion,
|
||||
tryGetFromToolCache,
|
||||
|
@ -8,10 +8,10 @@ import { restoreCache } from "./cache/restore-cache";
|
|||
|
||||
import { downloadLatest } from "./download/download-latest";
|
||||
import {
|
||||
Architecture,
|
||||
type Architecture,
|
||||
getArch,
|
||||
getPlatform,
|
||||
Platform,
|
||||
type Platform,
|
||||
} from "./utils/platforms";
|
||||
import {
|
||||
cacheLocalPath,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as core from "@actions/core";
|
||||
import path from "path";
|
||||
import path from "node:path";
|
||||
|
||||
export const version = core.getInput("version");
|
||||
export const checkSum = core.getInput("checksum");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue