From c032bcebdea464be9adf1501f0923694ff0b80bc Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Wed, 9 Aug 2023 17:08:44 +0200 Subject: [PATCH] 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 --- ghost/tsconfig.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ghost/tsconfig.json b/ghost/tsconfig.json index 8711b23ad5..aaeef10368 100644 --- a/ghost/tsconfig.json +++ b/ghost/tsconfig.json @@ -6,7 +6,7 @@ /* Visit https://aka.ms/tsconfig to read more about this file */ /* Projects */ - "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + "incremental": false, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ diff --git a/package.json b/package.json index b8b795d5fd..1c21e890ff 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "scripts": { "archive": "nx run ghost:archive", "build": "nx run-many -t build", - "build:clean": "nx reset && rimraf -g 'ghost/*/build'", + "build:clean": "nx reset && rimraf -g 'ghost/*/build' && rimraf -g 'ghost/*/tsconfig.tsbuildinfo'", "dev:debug": "DEBUG_COLORS=true DEBUG=@tryghost*,ghost:* yarn dev", "dev:admin": "node .github/scripts/dev.js --admin", "dev:ghost": "node .github/scripts/dev.js --ghost",