Skip to content

Commit aa48bdd

Browse files
thebenternclaude
andcommitted
fix(v2): scope the tools typecheck to the two src/lib files it imports
tools/tsconfig.json included ../src/lib/**/*.ts, which drags in prisma.ts, redis.ts and mqtt.ts -- the tinyhttp server's infrastructure. prisma.ts needs types that exist only after `prisma generate`, so typecheck:v2 still failed on the legacy server's codegen even after CI stopped running the root tsc. Same coupling, one layer down. The tooling imports exactly two files from src/lib: resource.ts (the hardware list) and deviceLinks.ts. The include now names them. Verified by moving the generated Prisma client aside and re-running: typecheck:v2 passes without it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent fb79feb commit aa48bdd

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

tools/tsconfig.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,10 @@
1010
"skipLibCheck": true,
1111
"allowImportingTsExtensions": true
1212
},
13-
"include": ["*.ts", "../src/lib/**/*.ts"]
13+
// Only the two src/lib files the build tooling actually imports. A `src/lib/**/*.ts` glob also
14+
// pulls in prisma.ts, redis.ts and mqtt.ts -- the tinyhttp server's infrastructure -- and
15+
// prisma.ts needs types that only exist after `prisma generate`. That made the v2 typecheck
16+
// depend on the legacy server's codegen, which is precisely the coupling this split removed
17+
// from CI a commit earlier.
18+
"include": ["*.ts", "../src/lib/resource.ts", "../src/lib/deviceLinks.ts"]
1419
}

0 commit comments

Comments
 (0)