Skip to content

Commit

Permalink
tsconfig: composite implies incremental
Browse files Browse the repository at this point in the history
fix: #82
  • Loading branch information
isaacs committed Jul 8, 2024
1 parent ff63bc0 commit 4e8ca5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/clean-build-tmp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ const cleanRemovedOutputs = (path: string, root: string) => {

export default () => {
const config = readTypescriptConfig()
if (config.options.incremental !== true) {
if (
config.options.incremental !== true &&
config.options.composite !== true
) {
return rimrafSync('.tshy-build')
}

Expand Down
4 changes: 3 additions & 1 deletion test/clean-build-tmp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import readTypescriptConfig from '../src/read-typescript-config.js'

t.test('no incremental build, just delete it', t => {
readTypescriptConfig().options.incremental = false
readTypescriptConfig().options.composite = false
t.chdir(
t.testdir({
'.tshy-build': {},
Expand All @@ -17,6 +18,7 @@ t.test('no incremental build, just delete it', t => {

t.test('no tsbuildinfo, just delete it', t => {
readTypescriptConfig().options.incremental = true
readTypescriptConfig().options.composite = true
t.chdir(
t.testdir({
'.tshy-build': {},
Expand All @@ -28,7 +30,7 @@ t.test('no tsbuildinfo, just delete it', t => {
})

t.test('remove files not found in src', t => {
readTypescriptConfig().options.incremental = true
readTypescriptConfig().options.composite = true
t.chdir(
t.testdir({
'.tshy-build': {
Expand Down

0 comments on commit 4e8ca5e

Please sign in to comment.