diff --git a/e2e.config.ts b/e2e.config.ts index 07d87728..f4d04faa 100644 --- a/e2e.config.ts +++ b/e2e.config.ts @@ -51,8 +51,8 @@ export default { url: "http://127.0.0.1:3000", readyUrl: "http://127.0.0.1:3000", command: { - executable: "node", - args: ["--import", "tsx", "scripts/e2e/stack.ts"], + executable: "nub", + args: ["scripts/e2e/stack.ts"], env: inherited, startupTimeout: 300_000, shutdownTimeout: 60_000, diff --git a/package.json b/package.json index 352594f0..66286b0f 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ ".": "./src/index.ts" }, "scripts": { - "cli": "tsx ./src/index.ts", + "cli": "nub ./src/index.ts", "prepare": "lefthook install", "dev": "nub run --cwd packages/infra dev", "typecheck": "tsrs --pretty false --noEmit --incremental false && tsrs --pretty false --noEmit --incremental false -p packages/common && tsrs --pretty false --noEmit --incremental false -p packages/api && tsrs --pretty false --noEmit --incremental false -p packages/app && tsrs --pretty false --noEmit --incremental false -p packages/infra && nub run typecheck:e2e", @@ -47,7 +47,7 @@ "format": "oxfmt --check .", "format:fix": "oxfmt .", "test": "nub run test:e2e", - "tegami": "tsx scripts/tegami.mts", + "tegami": "nub scripts/tegami.mts", "clean": "rm -rf ./node_modules/ ./packages/*/node_modules/ ./dist/ ./packages/*/dist/", "clean:builds": "rm -rf ./dist/ ./packages/*/dist/", "build": "nub run typecheck", diff --git a/src/index.ts b/src/index.ts index 8de55fc7..95d0c805 100755 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env tsx +#!/usr/bin/env nub import { execFileSync } from "node:child_process" import { randomBytes } from "node:crypto" diff --git a/tests/cli.e2e.ts b/tests/cli.e2e.ts index e6a27e03..091d2c33 100644 --- a/tests/cli.e2e.ts +++ b/tests/cli.e2e.ts @@ -5,7 +5,7 @@ test( "prints Effect 4 CLI help without an Effect 3 @effect/cli peer", { platforms: ["cli"] }, async () => { - const result = spawnSync(process.execPath, ["--import", "tsx", "src/index.ts", "--help"], { + const result = spawnSync("nub", ["src/index.ts", "--help"], { encoding: "utf8", env: process.env, timeout: 30_000,