Remove tsx dependency (#32967)

* Remove tsx dependency

* Iterate

* Iterate

* Iterate
This commit is contained in:
Michael Telatynski
2026-03-30 15:17:36 +00:00
committed by GitHub
parent dda9ec061b
commit 0d1d889c28
21 changed files with 48 additions and 48 deletions
+2 -2
View File
@@ -6,8 +6,8 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details.
*/
import type { DependencyInfo } from "./dep.js";
import type HakEnv from "./hakEnv.js";
import type { DependencyInfo } from "./dep.ts";
import type HakEnv from "./hakEnv.ts";
export default async function build(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
await moduleInfo.scripts.build(hakEnv, moduleInfo);
+2 -2
View File
@@ -6,8 +6,8 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details.
*/
import type { DependencyInfo } from "./dep.js";
import type HakEnv from "./hakEnv.js";
import type { DependencyInfo } from "./dep.ts";
import type HakEnv from "./hakEnv.ts";
export default async function check(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
await moduleInfo.scripts.check?.(hakEnv, moduleInfo);
+2 -2
View File
@@ -9,8 +9,8 @@ Please see LICENSE files in the repository root for full details.
import path from "node:path";
import { rimraf } from "rimraf";
import type { DependencyInfo } from "./dep.js";
import type HakEnv from "./hakEnv.js";
import type { DependencyInfo } from "./dep.ts";
import type HakEnv from "./hakEnv.ts";
export default async function clean(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
await rimraf(moduleInfo.moduleDotHakDir);
+2 -2
View File
@@ -12,8 +12,8 @@ import childProcess from "node:child_process";
import { glob } from "glob";
import { mkdirp } from "mkdirp";
import type HakEnv from "./hakEnv.js";
import type { DependencyInfo } from "./dep.js";
import type HakEnv from "./hakEnv.ts";
import type { DependencyInfo } from "./dep.ts";
export default async function copy(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
if (moduleInfo.cfg.copy) {
+1 -1
View File
@@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details.
*/
import type HakEnv from "./hakEnv.js";
import type HakEnv from "./hakEnv.ts";
export interface DependencyInfo {
name: string;
+2 -2
View File
@@ -10,8 +10,8 @@ import fsProm from "node:fs/promises";
import pacote from "pacote";
import path from "node:path";
import type HakEnv from "./hakEnv.js";
import type { DependencyInfo } from "./dep.js";
import type HakEnv from "./hakEnv.ts";
import type { DependencyInfo } from "./dep.ts";
export default async function fetch(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
let haveModuleBuildDir;
+4 -5
View File
@@ -11,7 +11,7 @@ import os from "node:os";
import { getElectronVersionFromInstalled } from "app-builder-lib/out/electron/electronVersion.js";
import childProcess, { type SpawnOptions } from "node:child_process";
import { type Arch, type Target, TARGETS, getHost, isHostId, type TargetId } from "./target.js";
import { type Arch, type Target, TARGETS, getHost, isHostId, type TargetId } from "./target.ts";
async function getRuntimeVersion(projectRoot: string): Promise<string> {
const electronVersion = await getElectronVersionFromInstalled(path.join(projectRoot, "..", ".."));
@@ -28,11 +28,10 @@ export default class HakEnv {
public runtime: string = "electron";
public runtimeVersion?: string;
public dotHakDir: string;
public readonly projectRoot: string;
public constructor(
public readonly projectRoot: string,
targetId: TargetId | null,
) {
public constructor(projectRoot: string, targetId: TargetId | null) {
this.projectRoot = projectRoot;
const target = targetId ? TARGETS[targetId] : getHost();
if (!target) {
+6 -6
View File
@@ -9,11 +9,11 @@ Please see LICENSE files in the repository root for full details.
import path, { dirname } from "node:path";
import { fileURLToPath } from "node:url";
import HakEnv from "./hakEnv.js";
import type { TargetId } from "./target.js";
import type { DependencyInfo } from "./dep.js";
import { loadJsonFile } from "../../src/utils.js";
import packageJson from "../../package.json";
import HakEnv from "./hakEnv.ts";
import type { TargetId } from "./target.ts";
import type { DependencyInfo } from "./dep.ts";
import { loadJsonFile } from "../../src/utils.ts";
import packageJson from "../../package.json" with { type: "json" };
// These can only be run on specific modules
const MODULECOMMANDS = ["check", "fetch", "link", "build", "copy", "clean"];
@@ -127,7 +127,7 @@ async function main(): Promise<void> {
process.exit(1);
}
const cmdFunc = (await import("./" + cmd)).default;
const cmdFunc = (await import(`./${cmd}.ts`)).default;
for (const mod of modules) {
const depInfo = deps[mod];
+2 -2
View File
@@ -6,8 +6,8 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Com
Please see LICENSE files in the repository root for full details.
*/
import type HakEnv from "./hakEnv.js";
import { type DependencyInfo } from "./dep.js";
import type HakEnv from "./hakEnv.ts";
import { type DependencyInfo } from "./dep.ts";
export default async function link(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
await hakEnv.spawn("pnpm", ["link", moduleInfo.moduleOutDir], {