TypeScript ^5.7.3 -> ^6.0.3 (fleet TypeScript-6 sweep). TS 7.0.2 is
blocked fleet-wide: typescript-eslint hard-errors "does not support
TS 7.0" (canaried 2026-08-31). 6.0.3 is the blessed major, proven
in-fleet with Next 16.
One TS-6 fix: drop the deprecated "baseUrl" from tsconfig.json
(TS5101 hard-errors on it under 6.0). The "@/*" paths mapping
resolves relative to the tsconfig dir without it. Full verify
(format, lint, typecheck, selfhost check, tests, build) green.
Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn
Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Jest is CJS-rooted, needs transform configuration for ESM and TypeScript, and
every shared CI template has to accommodate its dialect. vitest is ESM/TS
native and jest-compatible at the API level.
`globals: true` keeps describe/it/expect/beforeEach/vi available without
imports, so the diff is the jest.* API names and nothing else. Only TYPES had
to be imported, because a type cannot come from a global.
next/jest supplied the path alias, the next/server mock and the jsdom
environment implicitly; vitest.config.ts states them, so they are visible
rather than inherited. The transformIgnorePatterns override for ESM-only
packages (ai-kit) is DELETED rather than translated — jest ran CJS and died on
`Unexpected token export`, which is the entire reason that workaround existed.
vitest loads ESM natively.
Three things only running the suite could have found:
* __mocks__/next/server.ts was outside the first rewrite pass, so every test
importing it died with `jest is not defined`.
* vitest builds a mocked constructor with Reflect.construct, and an ARROW
function is not constructible — `vi.fn().mockImplementation(() => ({...}))`
threw "is not a constructor" the moment the code did `new SESClient()`.
jest tolerated it. Two mocks needed function expressions.
* removing @types/jest took the global describe/it/expect declarations with
it; tsconfig now carries "types": ["vitest/globals"].
Verified locally before pushing: 272 passed, 2 skipped, 23 files.
Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* ci: strict verify gate + verify SSOT script
Reconciles PR #109's intent onto post-#120 main (self-hosted, no Vercel):
- add "verify" script (format:check && lint && test && build) — one
definition of "green", run identically locally and in CI
- ci.yml runs `npm ci` then a single `npm run verify` step (no --if-present:
a missing/renamed gate script fails loudly) instead of the old split steps
- add AGENTS.md, corrected to the real stack (Next.js 16 / React 19) and
self-hosted Hetzner deploy referencing ci.yml — NOT the stale Vercel/Next14
draft from #109 that would have re-added Vercel
Supersedes #109 (which conflicted on the workflow #120 renamed).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* style: prettier --write repo to make the verify gate green
The strict verify gate surfaced pre-existing format debt that main's long-red
CI (blocked-Vercel deploy step) had masked. prettier --write is mechanical and
content-preserving — the executive-docs keep their text (incl. the separate
Vercel-in-financials follow-up), only whitespace is normalised. Also excludes
the auto-generated next-env.d.ts from prettier. Build/lint/test already pass;
this clears format:check so verify is truly green (and un-reds main on merge).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* style: reformat with the repo-pinned prettier config (printWidth 100)
Prior format commit used a prettier invocation that didn't resolve .prettierrc
(fell back to printWidth 80); the pinned config (printWidth 100) rejected it.
Re-run with the repo's own prettier so format:check matches CI exactly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
- Add @~/.claude/CLAUDE.md import for global engineering standards
- Update Last Updated date to 2026-01-23
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>