Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions __test__/installers.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { describe, expect, test } from "vitest";
import { InstallerFactory } from "../src/installers";
import { LinuxInstaller } from "../src/LinuxInstaller";
import { MacOSInstaller } from "../src/MacOSInstaller";
import { WindowsInstaller } from "../src/WindowsInstaller";
import { InstallerFactory } from "../src/installers";
import { Arch, OS } from "../src/platform";
import { WindowsInstaller } from "../src/WindowsInstaller";

describe("InstallerFactory", () => {
describe.each([
Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"files": {
"ignore": ["package.json"]
"includes": ["**", "!**/package.json", "!dist"]
},
"linter": {
"enabled": true,
Expand Down
21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,26 @@
"engines": {
"node": ">=24.0.0"
},
"type": "module",
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/exec": "^1.1.1",
"@actions/io": "^1.1.3",
"@actions/tool-cache": "^2.0.1"
"@actions/core": "^3.0.1",
"@actions/exec": "^3.0.0",
"@actions/io": "^3.0.2",
"@actions/tool-cache": "^4.0.0"
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@types/node": "^20.6.2",
"@vercel/ncc": "^0.38.0",
"typescript": "^5.2.2",
"vitest": "^2.0.2"
"@biomejs/biome": "^2.4.14",
"@types/node": "^25.6.0",
"@vercel/ncc": "^0.38.4",
"typescript": "^6.0.3",
"vitest": "^4.1.5"
},
"scripts": {
"build": "ncc build src/index.ts",
"test": "vitest",
"package": "cp action.yml README.md dist/",
"lint": "biome ci .",
"lint:fix": "biome check --apply ."
"lint:fix": "biome check --write ."
},
"repository": {
"type": "git",
Expand Down
1,379 changes: 704 additions & 675 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/LinuxInstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as core from "@actions/core";
import * as tc from "@actions/tool-cache";
import { DownloadURLFactory } from "./DownloadURLFactory";
import { testBinaryVersion } from "./firefoxUtils";
import type { InstallResult, InstallSpec, Installer } from "./installers";
import type { Installer, InstallResult, InstallSpec } from "./installers";

export class LinuxInstaller implements Installer {
async install({
Expand Down
2 changes: 1 addition & 1 deletion src/MacOSInstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as exec from "@actions/exec";
import * as tc from "@actions/tool-cache";
import { DownloadURLFactory } from "./DownloadURLFactory";
import { testBinaryVersion } from "./firefoxUtils";
import type { InstallResult, InstallSpec, Installer } from "./installers";
import type { Installer, InstallResult, InstallSpec } from "./installers";
import { LatestVersion } from "./versions";

export class MacOSInstaller implements Installer {
Expand Down
4 changes: 2 additions & 2 deletions src/WindowsInstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as io from "@actions/io";
import * as tc from "@actions/tool-cache";
import { DownloadURLFactory } from "./DownloadURLFactory";
import { testBinaryVersion } from "./firefoxUtils";
import type { InstallResult, InstallSpec, Installer } from "./installers";
import type { Installer, InstallResult, InstallSpec } from "./installers";

export class WindowsInstaller implements Installer {
async install({
Expand Down Expand Up @@ -59,7 +59,7 @@ export class WindowsInstaller implements Installer {
private async checkInstall(dir: string): Promise<boolean> {
try {
await fs.promises.access(dir, fs.constants.F_OK);
} catch (err) {
} catch (_err) {
return false;
}
return true;
Expand Down
4 changes: 2 additions & 2 deletions src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import type { Platform } from "./platform";

export class UnsupportedPlatformError extends Error {
constructor(
private readonly platform: Platform,
private readonly version?: string,
readonly platform: Platform,
readonly version?: string,
) {
super(
version
Expand Down
2 changes: 1 addition & 1 deletion src/installers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { LinuxInstaller } from "./LinuxInstaller";
import { MacOSInstaller } from "./MacOSInstaller";
import { WindowsInstaller } from "./WindowsInstaller";
import { OS, type Platform } from "./platform";
import { WindowsInstaller } from "./WindowsInstaller";

export type InstallSpec = {
version: string;
Expand Down
9 changes: 5 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"target": "ES2022",
"module": "preserve",
"moduleResolution": "bundler",
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"noImplicitAny": true,
"esModuleInterop": true
"esModuleInterop": true,
"types": ["node"]
},
"exclude": ["node_modules", "**/*.test.ts"]
}
Loading