From 1371610db05d2797ca3795bc8e8647551f980ff6 Mon Sep 17 00:00:00 2001 From: Max schwenk Date: Tue, 24 Sep 2024 14:08:01 -0400 Subject: [PATCH 1/3] Clairification on Transit Nodes --- .../configuring-tasks.mdx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/repo-docs/crafting-your-repository/configuring-tasks.mdx b/docs/repo-docs/crafting-your-repository/configuring-tasks.mdx index 341915773f50a..65c8761ec5fc7 100644 --- a/docs/repo-docs/crafting-your-repository/configuring-tasks.mdx +++ b/docs/repo-docs/crafting-your-repository/configuring-tasks.mdx @@ -326,12 +326,12 @@ Some tasks should always be ran no matter what, like a deployment script after a Some tasks can be ran in parallel despite being dependent on other packages. An example of tasks that fit this description are linters, since a linter doesn't need to wait for outputs in dependencies to run successfully. -Because of this, you may be tempted to define your `check-types` task like this: +Because of this, you may be tempted to define your `lint` task like this: ```json title="./turbo.json" { "tasks": { - "check-types": {} // Incorrect! // [!code highlight] + "lint": {} // Incorrect! // [!code highlight] } } ``` @@ -339,17 +339,17 @@ Because of this, you may be tempted to define your `check-types` task like this: This runs your tasks in parallel - but doesn't account for source code changes in dependencies. This means you can: 1. Make a breaking change to the interface of your `ui` package. -2. Run `turbo check-types`, hitting cache in an application package that depends on `ui`. +2. Run `turbo lint`, hitting cache in an application package that depends on `ui`. This is incorrect, since the application package will show a successful cache hit, despite not being updated to use the new interface. Checking for TypeScript errors in your application package manually in your editor is likely to reveal errors. -Because of this, you make a small change to your `check-types` task definition: +Because of this, you make a small change to your `lint` task definition: ```json title="./turbo.json" { "tasks": { - "check-types": { - "dependsOn": ["^check-types"] // This works...but could be faster! // [!code highlight] + "lint": { + "dependsOn": ["^lint"] // This works...but could be faster! // [!code highlight] } } } @@ -365,10 +365,10 @@ To meet both requirements (correctness and parallelism), you can introduce [Tran "transit": { "dependsOn": ["^transit"] }, - "check-types": { + "lint": { "dependsOn": ["transit"] - }, - }, + } + } } ``` From cf5ac268bf823dc41bc2a2990ff0e1c571623b03 Mon Sep 17 00:00:00 2001 From: Anthony Shew Date: Tue, 30 Sep 2025 19:26:31 -0700 Subject: [PATCH 2/3] cleanup --- .../configuring-tasks.mdx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/repo-docs/crafting-your-repository/configuring-tasks.mdx b/docs/repo-docs/crafting-your-repository/configuring-tasks.mdx index 65c8761ec5fc7..3030dfee0580f 100644 --- a/docs/repo-docs/crafting-your-repository/configuring-tasks.mdx +++ b/docs/repo-docs/crafting-your-repository/configuring-tasks.mdx @@ -324,14 +324,14 @@ Some tasks should always be ran no matter what, like a deployment script after a ### Dependent tasks that can be ran in parallel -Some tasks can be ran in parallel despite being dependent on other packages. An example of tasks that fit this description are linters, since a linter doesn't need to wait for outputs in dependencies to run successfully. +Some tasks can be ran in parallel despite being dependent on other packages. An example of tasks that fit this description are type checkers, since a type checker doesn't need to wait for outputs in dependencies to run successfully. -Because of this, you may be tempted to define your `lint` task like this: +Because of this, you may be tempted to define your `check-types` task like this: ```json title="./turbo.json" { "tasks": { - "lint": {} // Incorrect! // [!code highlight] + "check-types": {} // Incorrect! // [!code highlight] } } ``` @@ -339,17 +339,17 @@ Because of this, you may be tempted to define your `lint` task like this: This runs your tasks in parallel - but doesn't account for source code changes in dependencies. This means you can: 1. Make a breaking change to the interface of your `ui` package. -2. Run `turbo lint`, hitting cache in an application package that depends on `ui`. +2. Run `turbo check-types`, hitting cache in an application package that depends on `ui`. This is incorrect, since the application package will show a successful cache hit, despite not being updated to use the new interface. Checking for TypeScript errors in your application package manually in your editor is likely to reveal errors. -Because of this, you make a small change to your `lint` task definition: +Because of this, you make a small change to your `check-types` task definition: ```json title="./turbo.json" { "tasks": { - "lint": { - "dependsOn": ["^lint"] // This works...but could be faster! // [!code highlight] + "check-types": { + "dependsOn": ["^check-types"] // This works...but could be faster! // [!code highlight] } } } @@ -365,7 +365,7 @@ To meet both requirements (correctness and parallelism), you can introduce [Tran "transit": { "dependsOn": ["^transit"] }, - "lint": { + "check-types": { "dependsOn": ["transit"] } } From 1fb3682db45320f871c153d82e7eb7dc80806d55 Mon Sep 17 00:00:00 2001 From: Anthony Shew Date: Tue, 30 Sep 2025 19:29:14 -0700 Subject: [PATCH 3/3] Update docs/site/content/docs/crafting-your-repository/configuring-tasks.mdx --- .../content/docs/crafting-your-repository/configuring-tasks.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/site/content/docs/crafting-your-repository/configuring-tasks.mdx b/docs/site/content/docs/crafting-your-repository/configuring-tasks.mdx index 8a1e6d982b771..54e1506a0426e 100644 --- a/docs/site/content/docs/crafting-your-repository/configuring-tasks.mdx +++ b/docs/site/content/docs/crafting-your-repository/configuring-tasks.mdx @@ -344,7 +344,7 @@ Some tasks should always be run no matter what, like a deployment script after a ### Dependent tasks that can be run in parallel -Some tasks can be ran in parallel despite being dependent on other packages. An example of tasks that fit this description are type checkers, since a type checker doesn't need to wait for outputs in dependencies to run successfully. +Some tasks can be run in parallel despite being dependent on other packages. An example of tasks that fit this description are type checkers, since a type checker doesn't need to wait for outputs in dependencies to run successfully. Because of this, you may be tempted to define your `check-types` task like this: