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,4 +1,4 @@
import { fetch as undiciFetch, ProxyAgent, type RequestInit } from "undici";
import { ProxyAgent, type RequestInit, fetch as undiciFetch } from "undici";
export function getProxyAgent() {
const httpProxy = process.env.HTTP_PROXY || process.env.http_proxy;

View File

@ -1,5 +1,5 @@
import * as core from "@actions/core";
import path from "node:path";
import * as core from "@actions/core";
export const workingDirectory = core.getInput("working-directory");
export const version = core.getInput("version");

View File

@ -4,8 +4,8 @@ import type {
OctokitOptions,
} from "@octokit/core/dist-types/types";
import {
paginateRest,
type PaginateInterface,
paginateRest,
} from "@octokit/plugin-paginate-rest";
import { legacyRestEndpointMethods } from "@octokit/plugin-rest-endpoint-methods";
import { fetch as customFetch } from "./fetch";

View File

@ -1,5 +1,5 @@
import * as exec from "@actions/exec";
import * as core from "@actions/core";
import * as exec from "@actions/exec";
export type Platform =
| "unknown-linux-gnu"
| "unknown-linux-musl"
@ -16,11 +16,11 @@ export type Architecture =
export function getArch(): Architecture | undefined {
const arch = process.arch;
const archMapping: { [key: string]: Architecture } = {
ia32: "i686",
x64: "x86_64",
arm64: "aarch64",
s390x: "s390x",
ia32: "i686",
ppc64: "powerpc64le",
s390x: "s390x",
x64: "x86_64",
};
if (arch in archMapping) {
@ -31,8 +31,8 @@ export function getArch(): Architecture | undefined {
export async function getPlatform(): Promise<Platform | undefined> {
const processPlatform = process.platform;
const platformMapping: { [key: string]: Platform } = {
linux: "unknown-linux-gnu",
darwin: "apple-darwin",
linux: "unknown-linux-gnu",
win32: "pc-windows-msvc",
};
@ -50,16 +50,16 @@ async function isMuslOs(): Promise<boolean> {
let stdOutput = "";
let errOutput = "";
const options: exec.ExecOptions = {
silent: !core.isDebug(),
ignoreReturnCode: true,
listeners: {
stdout: (data: Buffer) => {
stdOutput += data.toString();
},
stderr: (data: Buffer) => {
errOutput += data.toString();
},
stdout: (data: Buffer) => {
stdOutput += data.toString();
},
},
ignoreReturnCode: true,
silent: !core.isDebug(),
};
try {