TS 6.0 changes the default of compilerOptions.types from "all packages
under node_modules/@types" to []. Globals from @types/node (Buffer,
NodeJS.*, process typed as never-returning on exit) and @types/jest
(it, expect) were no longer resolved, producing 20 typecheck errors.
Declare the two packages explicitly and add @types/node as a direct
devDependency (it was previously only hoisted transitively).
TS 6.0 also enables pretty diagnostics even when piped, which broke the
line-based error parser in scripts/typecheck.js; force --pretty false.