Commit Graph

5 Commits

Author SHA1 Message Date
Daniel Lockyer
c032bcebde Disabled TypeScript incremental building
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
2023-08-09 18:27:56 +02:00
Daniel Lockyer
10b59adbbb Removed jest from tsconfig types array
refs https://github.com/TryGhost/DevOps/issues/45

- this was a mistake resulting from a copy+paste, we don't even use Jest :P
2023-07-21 14:50:52 +02:00
Daniel Lockyer
804c1e4cbb Configured imported types in tsconfig
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
2023-07-21 14:17:21 +02:00
Daniel Lockyer
60e478ff90 Enabled sourcemaps in tsconfig
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)
2023-07-17 17:41:57 +02:00
Daniel Lockyer
e893c92074 Deduplicated tsconfig.json files
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
2023-07-12 09:34:00 +02:00