diff --git a/.taprc b/.taprc index 4fbafbf..bae3d59 100644 --- a/.taprc +++ b/.taprc @@ -1,7 +1,7 @@ # vim: set filetype=yaml : disable-coverage: false -allow-empty-coverage: true -allow-incomplete-coverage: true +allow-empty-coverage: false +allow-incomplete-coverage: false plugin: - "@tapjs/sinon" - "!@tapjs/intercept" diff --git a/lib/content/clean.ts b/lib/content/clean.ts index 9613424..f9c08ba 100755 --- a/lib/content/clean.ts +++ b/lib/content/clean.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env ts-node +#!/usr/bin/env tsx // This file is managed by code-skeleton. Do not make changes. import { rmSync } from "node:fs"; diff --git a/lib/content/update-shebang.ts b/lib/content/update-shebang.ts index 445dd77..9bfe153 100755 --- a/lib/content/update-shebang.ts +++ b/lib/content/update-shebang.ts @@ -1,11 +1,11 @@ -#!/usr/bin/env ts-node +#!/usr/bin/env tsx import { spawnSync } from "node:child_process"; import { readFile, writeFile } from "node:fs/promises"; import { dirname, resolve } from "node:path"; const ROOT = dirname(__dirname); -const tsShebang = "#!/usr/bin/env ts-node"; +const tsShebang = "#!/usr/bin/env tsx"; const jsShebang = "#!/usr/bin/env node"; async function updateShebang (path: string) { diff --git a/lib/index.ts b/lib/index.ts index bd50280..49d4057 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -76,9 +76,16 @@ export default async function (root: string, variables: Variables) { "@typescript-eslint/parser": "^6.0.0", "eslint": "^8.0.0", "tap": "^18.7.0", - "ts-node": "^10.0.0", + "tsx": "4.2.1", "typescript": "^5.0.0" }, + "overrides": { + // Needed with the 4.2.1 tsx version lock to fix code coverage + // https://github.com/privatenumber/tsx/issues/433 + "@tapjs/tsx": { + "tsx": "$tsx" + } + }, removeDependencies: [ "@types/tap", "@tsconfig/node18" diff --git a/package.json b/package.json index 68f06de..d289588 100644 --- a/package.json +++ b/package.json @@ -33,12 +33,17 @@ "@typescript-eslint/parser": "^6.0.0", "eslint": "^8.0.0", "tap": "^18.7.0", - "ts-node": "^10.0.0", - "typescript": "5.2.2" + "tsx": "4.2.1", + "typescript": "^5.0.0" }, "peerDependencies": { "code-skeleton": "^2.0.0" }, + "overrides": { + "@tapjs/tsx": { + "tsx": "$tsx" + } + }, "skeleton": { "module": ".", "variables": { diff --git a/scripts/clean.ts b/scripts/clean.ts index 9613424..f9c08ba 100755 --- a/scripts/clean.ts +++ b/scripts/clean.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env ts-node +#!/usr/bin/env tsx // This file is managed by code-skeleton. Do not make changes. import { rmSync } from "node:fs"; diff --git a/scripts/update-shebang.ts b/scripts/update-shebang.ts index 445dd77..9bfe153 100755 --- a/scripts/update-shebang.ts +++ b/scripts/update-shebang.ts @@ -1,11 +1,11 @@ -#!/usr/bin/env ts-node +#!/usr/bin/env tsx import { spawnSync } from "node:child_process"; import { readFile, writeFile } from "node:fs/promises"; import { dirname, resolve } from "node:path"; const ROOT = dirname(__dirname); -const tsShebang = "#!/usr/bin/env ts-node"; +const tsShebang = "#!/usr/bin/env tsx"; const jsShebang = "#!/usr/bin/env node"; async function updateShebang (path: string) {