fix(typecheck): regenerate route types and skip stale dev validator

`npm run typecheck` failed with 8 TS2307 errors from Next's generated
route validators referencing old page paths (e.g. calendar/page.js) after
routes moved to catch-all segments. Two causes:

- The production validator (.next/types) was stale. Prepend `next typegen`
  so `tsc` always runs against freshly generated route types.
- The dev validator (.next/dev/types) is a turbopack-dev-only artifact that
  is absent from clean/CI checkouts and goes stale locally. `next typegen`
  force-re-adds it to tsconfig `include`, so exclude it instead (exclude
  overrides include), leaving route typing to the maintained .next/types.

tsc still catches real type errors; verified `npm run typecheck` is clean
and idempotent.
This commit is contained in:
Stefan Hildebrandt
2026-08-09 23:00:53 +02:00
parent 9d829d243c
commit b3d7f988fa
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -30,7 +30,7 @@
"test:translations": "vitest run --no-isolate lib/__tests__/translations.test.ts",
"test:integration": "bash integration/run-tests.sh",
"prepare": "husky",
"typecheck": "tsc --noEmit"
"typecheck": "next typegen && tsc --noEmit"
},
"dependencies": {
"@dnd-kit/core": "^6.3.1",
+2 -1
View File
@@ -39,6 +39,7 @@
"node_modules",
"repos",
"examples",
"integration"
"integration",
".next/dev/types"
]
}