From dad381b5cedb5f86a665a68ca952959786a7a347 Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Fri, 26 Sep 2025 00:50:41 -0700 Subject: [PATCH] chore: typecheck using monorepo (#4920) --- package.json | 2 +- packages/cli/tsconfig.test.json | 15 +++++++++++++++ tsconfig.json | 10 +++++++++- turbo.json | 4 ---- 4 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 packages/cli/tsconfig.test.json diff --git a/package.json b/package.json index 0ff38929..f8f4ccae 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "test": "turbo --filter \"./packages/*\" test", "e2e:smoke": "turbo --filter \"./e2e/*\" e2e:smoke", "e2e:integration": "turbo --filter \"./e2e/*\" e2e:integration", - "typecheck": "turbo --filter \"./packages/*\" typecheck" + "typecheck": "tsc -b --verbose --diagnostics" }, "devDependencies": { "@biomejs/biome": "2.2.4", diff --git a/packages/cli/tsconfig.test.json b/packages/cli/tsconfig.test.json new file mode 100644 index 00000000..ee4e73c2 --- /dev/null +++ b/packages/cli/tsconfig.test.json @@ -0,0 +1,15 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "./node_modules/.cache/test", + "tsBuildInfoFile": "tsconfig.test.tsbuildinfo", + "lib": ["esnext", "dom", "dom.iterable"] + }, + "references": [ + { + "path": "../better-auth/tsconfig.json" + } + ], + "include": ["test", "src"] +} diff --git a/tsconfig.json b/tsconfig.json index 56d16355..f54afe9b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "baseUrl": ".", "strict": true, "target": "esnext", "downlevelIteration": true, @@ -17,7 +18,11 @@ "composite": true, "incremental": true, "noErrorTruncation": true, - "types": ["node"] + "types": ["node"], + "paths": { + "better-auth": ["./packages/better-auth/src"], + "better-auth/*": ["./packages/better-auth/src/*"] + } }, "references": [ { @@ -26,6 +31,9 @@ { "path": "./packages/cli" }, + { + "path": "./packages/cli/tsconfig.test.json" + }, { "path": "./packages/expo" }, diff --git a/turbo.json b/turbo.json index 2eab7451..f076aaaf 100644 --- a/turbo.json +++ b/turbo.json @@ -37,10 +37,6 @@ "dependsOn": ["^build"], "outputs": [] }, - "typecheck": { - "outputs": [".tsbuildinfo", "dist/**"], - "cache": true - }, "deploy": { "cache": false },