From ee656b6717ce0352c4bbe1b65f844b4a844dba8c Mon Sep 17 00:00:00 2001 From: Roman Filippov Date: Tue, 8 Feb 2022 08:46:24 +0700 Subject: [PATCH] fix: do not start turbo:* commands in the root build step Because it will always run in CI, and we want to be able to control that. --- src/index.ts | 16 ++++++++++------ test/__snapshots__/synth.test.ts.snap | 16 ---------------- 2 files changed, 10 insertions(+), 22 deletions(-) diff --git a/src/index.ts b/src/index.ts index 5f32ffe..3352a65 100644 --- a/src/index.ts +++ b/src/index.ts @@ -273,13 +273,17 @@ export class TurborepoProject extends typescript.TypeScriptProject { this.compileTask.reset() /** - * Turbo runs. + * Removes ESLint task from the root project */ - this.postCompileTask.prependSpawn(this.turboRunTask('compile')) - this.postCompileTask.spawn(this.turboRunTask('build')) - this.testTask.reset() // removes root eslint - this.testTask.spawn(this.turboRunTask('test')) - this.testTask.spawn(this.turboRunTask('eslint')) + this.testTask.reset() + + /** + * turbo:* commands + */ + this.turboRunTask('compile') + this.turboRunTask('build') + this.turboRunTask('test') + this.turboRunTask('eslint') /** * Adds a fake file into dist, so that artifacts download does not fail. diff --git a/test/__snapshots__/synth.test.ts.snap b/test/__snapshots__/synth.test.ts.snap index cb2e11d..172ab4c 100644 --- a/test/__snapshots__/synth.test.ts.snap +++ b/test/__snapshots__/synth.test.ts.snap @@ -83,14 +83,6 @@ Object { "post-compile": Object { "description": "Runs after successful compilation", "name": "post-compile", - "steps": Array [ - Object { - "spawn": "turbo:compile", - }, - Object { - "spawn": "turbo:build", - }, - ], }, "post-upgrade": Object { "description": "Runs after upgrading dependencies", @@ -127,14 +119,6 @@ Object { "test": Object { "description": "Run tests", "name": "test", - "steps": Array [ - Object { - "spawn": "turbo:test", - }, - Object { - "spawn": "turbo:eslint", - }, - ], }, "turbo:build": Object { "description": "Runs build in all sub-projects via turbo.",