refs https://ghost.slack.com/archives/C02G9E68C/p1691403750186279
- we keep seeing strange things from incremental TS builds, and it's
causing random/spurious test failures for developers
- this commit disables that
- also adds cleaning up of TS incremental build artifacts to the
`build:clean` command
refs https://github.com/TryGhost/DevOps/issues/45
- by default, `tsconfig` will load all `@types` packages
- this can slow down the build because it's loading unneeded files
- adding a value to `types` overrides "all", but we still want `node` to
allow Node globals to be found with no extra effort
- similarly, we can limit `lib` to `es2022` to remove an extra 5 files
- this makes a `tsc` roughly 2x faster
refs https://ghost.slack.com/archives/C05DUT549JR/p1689604345421799
- this enables sourcemap creation in our tsconfig setup so breakpoints
work correctly in a debugger
- this should eventually be switched out for a CLI flag as we don't want
to produce sourcemaps all the time (for example during release)
refs https://github.com/TryGhost/DevOps/issues/45
- this moves the bulk of the tsconfig file to the `ghost/` folder and
simply extends this file in each of the TS lib packages we currently
have
- this makes it a lot easier to make single changes to our TS config