chore(build): type-check what ships (tsconfig.build.json) and move to Next 16.3.1 (#1750)

* chore(build): type-check what ships (tsconfig.build.json) and move to Next 16.3.1

Groundwork for the 2026 shape of the build, companion to #1749.

- tsconfig.build.json extends tsconfig.json and excludes tests/, __tests__,
  __mocks__ and *.test.ts(x); next.config.ts selects it via
  typescript.tsconfigPath. tsconfig.json is untouched and stays the
  editor/ESLint view of the whole repo.
- next 16.2.12 -> 16.3.1 (+ eslint-config-next). 16.3 runs the project-local
  tsc CLI by default, which is what lets typescript@^7 (native) slot in once
  typescript-eslint supports the TS 7.1 API, and turns on Turbopack's on-disk
  cache for next build.

The split has to land with the bump: the 16.3 CLI checker checks the
complete project it is given, while the old API checker silently dropped
diagnostics from test files. A full tsc --noEmit of main reports 493 type
errors, all in tests (mostly route handlers called without the ctx
argument); vitest never type-checks, so nothing caught them. Excluding tests
from the build keeps that debt where it was instead of turning it into a
red deploy; a tests type-check job is the follow-up. Measured: tests are
~10% of the check's memory, so this is correctness, not the memory fix.

Lockfile regenerated with npm 10 (CI pins node 20); the only structural
change is npm 10 de-nesting next-intl/node_modules/@swc/helpers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(build): only write standalone output off-Vercel; Vercel's 16.3 adapter owns tracing

The #1750 preview failed after a green compile and type-check with
ENOENT .next/next-server.js.nft.json right after "Running onBuildComplete
from Vercel": writeStandaloneDirectory copies from that trace file, and on
Vercel (adapterPath set) Next 16.3 no longer produces it; the adapter traces
and packages functions itself. Vercel never reads .next/standalone; the
Docker image does. Keep standalone for every non-Vercel build.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Jakob Wennberg <311770904+jakobwennberg-oss@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Jakob Wennberg
2026-08-20 15:27:13 +02:00
committed by GitHub
co-authored by Claude Fable 5 Jakob Wennberg
parent 051f467406
commit fbf47649f2
5 changed files with 95 additions and 68 deletions
+2 -2
View File
@@ -60,7 +60,7 @@
"jszip": "^3.10.1",
"lucide-react": "^1.24.0",
"mailparser": "^3.9.14",
"next": "16.2.12",
"next": "16.3.1",
"next-intl": "^4.13.2",
"next-themes": "^0.4.6",
"pdf-lib": "^1.17.1",
@@ -96,7 +96,7 @@
"@types/web-push": "^3.6.4",
"dotenv": "^17.4.2",
"eslint": "^9",
"eslint-config-next": "16.2.12",
"eslint-config-next": "16.3.1",
"pg": "^8.22.0",
"tailwindcss": "^4",
"typescript": "^5",