Bump TypeScript to 7 7️⃣✅
Stacked on #105 — merge that first.
Now that oxlint has replaced ESLint, nothing pins the project to TypeScript 6 any more, so this is just the bump:
- "typescript": "^6.0.3",
+ "typescript": "^7.0.2",
Next.js 16.3 shells out to the project-local tsc instead of loading the TypeScript compiler API, so next build picks this up automatically. Its type check drops from 3.1s to ~0.6s.
What else is here
pnpm test:types→NODE_ENV=development next typegen && tsc --noEmit, plus a Type Checking CI job alongside Formatting / Linting / Tests. Thetypegenstep generates.next/types(route types, root params,cache-life) thattsconfig.jsonalready includes;NODE_ENV=developmentis what letsenv.tsfall back to its dev default forINTERNAL_API_SECRETinstead of demanding a real one. This gives a fast standalone signal in CI that doesn't wait on a full build.- Stopped tracking
next-env.d.ts. It's already in.gitignore(line 38) but was tracked anyway, and it flip-flopped betweenimport "./.next/dev/types/routes.d.ts"(afternext dev) andimport "./.next/types/routes.d.ts"(afternext build/typegen) on basically every command.
Standalone tsc --noEmit: 2.49s → 0.43s.
History
Earlier revisions of this PR carried a workaround — TypeScript 7 installed under a typescript-7 alias, invoked by path, with the root left on 6 — because typescript-eslint reads ts.ModuleKind.Cjs at module load and TS 7's JS shim doesn't expose it, so eslint . died before parsing a single file. That's gone now; #105 removed the constraint entirely. The intermediate commits are kept for the record.
Verification
pnpm test:types, pnpm lint, pnpm test (211 passing), pnpm test:format, and pnpm build all pass on TypeScript 7.0.2.
🤖 Generated with Claude Code