From b981b1dd7b474d9634107a75f8dc88e83dcdfd8a Mon Sep 17 00:00:00 2001 From: Viktor Pasynok Date: Wed, 24 Jun 2026 01:11:17 +0700 Subject: [PATCH 1/2] perf: use tsgo for typechecking in build and vitest Swap tsc -> tsgo (@typescript/native-preview) for the --noEmit typecheck step in all package build scripts and as vitest's typecheck.checker. ~45% faster typecheck and ~27% faster full build per package; vitest typecheck phase ~210ms -> ~70ms. All test suites still pass and the checker still reports type errors. Co-Authored-By: Claude Opus 4.8 (1M context) --- packages/coda/package.json | 2 +- packages/coda/vitest.config.ts | 2 +- packages/core/package.json | 2 +- packages/core/vitest.config.ts | 2 +- packages/eslint-plugin/package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/coda/package.json b/packages/coda/package.json index 063601c9..a881112e 100644 --- a/packages/coda/package.json +++ b/packages/coda/package.json @@ -54,7 +54,7 @@ "access": "public" }, "scripts": { - "build": "tsc --noEmit -p tsconfig.json && tsdown", + "build": "tsgo --noEmit -p tsconfig.json && tsdown", "dev": "tsdown --watch", "prepack": "pnpm build", "bench": "vitest bench", diff --git a/packages/coda/vitest.config.ts b/packages/coda/vitest.config.ts index 6e0e0df1..fd28dfa7 100644 --- a/packages/coda/vitest.config.ts +++ b/packages/coda/vitest.config.ts @@ -2,7 +2,7 @@ import { defineConfig } from "vitest/config" export default defineConfig({ test: { - typecheck: { enabled: true }, + typecheck: { enabled: true, checker: "tsgo" }, restoreMocks: true, }, }) diff --git a/packages/core/package.json b/packages/core/package.json index 5f1fc068..d08959ff 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -58,7 +58,7 @@ "access": "public" }, "scripts": { - "build": "tsc --noEmit -p tsconfig.json && tsdown", + "build": "tsgo --noEmit -p tsconfig.json && tsdown", "dev": "tsdown --watch", "prepack": "pnpm build", "bench": "vitest bench", diff --git a/packages/core/vitest.config.ts b/packages/core/vitest.config.ts index 01f0e8c2..2897ae9b 100644 --- a/packages/core/vitest.config.ts +++ b/packages/core/vitest.config.ts @@ -2,7 +2,7 @@ import { defineConfig } from "vitest/config" export default defineConfig({ test: { - typecheck: { enabled: true }, + typecheck: { enabled: true, checker: "tsgo" }, }, resolve: { diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 902188cb..2b6362a5 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -51,7 +51,7 @@ "access": "public" }, "scripts": { - "build": "tsc --noEmit -p tsconfig.json && tsdown", + "build": "tsgo --noEmit -p tsconfig.json && tsdown", "dev": "tsdown --watch", "prepack": "pnpm build", "test": "vitest run", From d1daeaade0a8df0fba27dc4845e66473a8131b59 Mon Sep 17 00:00:00 2001 From: Viktor Pasynok Date: Wed, 24 Jun 2026 01:20:55 +0700 Subject: [PATCH 2/2] fix: ignore tsgo binary in knip configs The tsc->tsgo build swap left knip flagging tsgo as an unlisted binary (it resolves from the root @typescript/native-preview dep, not per-package), failing pnpm lint. Ignore tsgo in each package's knip.json, matching how tsdown/vitest/knip/oxlint are handled; drop the now-stale tsc ignore in core/coda. Co-Authored-By: Claude Opus 4.8 (1M context) --- packages/coda/knip.json | 2 +- packages/core/knip.json | 2 +- packages/eslint-plugin/knip.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/coda/knip.json b/packages/coda/knip.json index 6e7a2d46..0afea654 100644 --- a/packages/coda/knip.json +++ b/packages/coda/knip.json @@ -2,6 +2,6 @@ "$schema": "https://unpkg.com/knip@6/schema.json", "ignore": ["**/__tests__/**", "*.config.ts"], "entry": ["./src/index.ts!"], - "ignoreBinaries": ["tsdown", "knip", "oxlint", "vitest", "tsc"], + "ignoreBinaries": ["tsdown", "knip", "oxlint", "vitest", "tsgo"], "vitest": { "config": "vitest.config.ts", "entry": "src/**/*.{test,test-d,bench}.ts" } } diff --git a/packages/core/knip.json b/packages/core/knip.json index 6e7a2d46..0afea654 100644 --- a/packages/core/knip.json +++ b/packages/core/knip.json @@ -2,6 +2,6 @@ "$schema": "https://unpkg.com/knip@6/schema.json", "ignore": ["**/__tests__/**", "*.config.ts"], "entry": ["./src/index.ts!"], - "ignoreBinaries": ["tsdown", "knip", "oxlint", "vitest", "tsc"], + "ignoreBinaries": ["tsdown", "knip", "oxlint", "vitest", "tsgo"], "vitest": { "config": "vitest.config.ts", "entry": "src/**/*.{test,test-d,bench}.ts" } } diff --git a/packages/eslint-plugin/knip.json b/packages/eslint-plugin/knip.json index 4cf16d73..52f6fe3b 100644 --- a/packages/eslint-plugin/knip.json +++ b/packages/eslint-plugin/knip.json @@ -2,7 +2,7 @@ "$schema": "https://unpkg.com/knip@6/schema.json", "ignore": ["*.config.ts"], "entry": ["./src/index.ts!"], - "ignoreBinaries": ["tsdown", "knip", "oxlint", "vitest"], + "ignoreBinaries": ["tsdown", "knip", "oxlint", "vitest", "tsgo"], "ignoreDependencies": ["@app-compose/coda", "@app-compose/core", "vitest"], "vitest": { "config": "vitest.config.ts", "entry": "src/**/*.test.ts" } }