Skip to content

Conversation

@anthonyshew
Copy link

@anthonyshew anthonyshew commented Jan 21, 2026

Summary

  • Replace relative path traversal (../tsconfig.json, ../README.md) with $TURBO_ROOT$ references in all package build task inputs
  • Add a transit task to enable parallel execution of test:types while maintaining correct cache invalidation
  • Simplified configuration by ~190 lines

Why

$TURBO_ROOT$ references: Using ../ to traverse out of a package in inputs is an anti-pattern in Turborepo. The $TURBO_ROOT$ variable is the recommended way to reference files at the repository root, providing clearer intent and better compatibility with Turborepo's internals.

Transit node: The test:types task previously used dependsOn: ["^test:types", ...] which forces sequential execution across packages. However, type checking doesn't need built output from dependencies - it only needs the source types. The transit node pattern creates the dependency graph relationship for correct cache invalidation without forcing sequential execution, allowing test:types tasks to run in parallel.

Notes

  • When reviewing please ensure that all workflows are working as expected. Most importantly, the configuration for build has been collapsed into one definition. There were some nuances that the LLM appears to have taken care of, and I've reviewed carefully - but I am paranoid that I may have missed something.
  • Chat transcript: https://opncd.ai/share/40HTubnr

… node

- Replace '../tsconfig.json' and '../README.md' with '$TURBO_ROOT$/tsconfig.json' and '$TURBO_ROOT$/README.md' across all package build tasks
- Add transit node task to enable parallel execution of test:types while maintaining correct cache invalidation
- Change test:types to depend on transit instead of ^test:types for better parallelization
Reduces config from 192 to 58 lines by using a base 'build' task that defines common inputs/outputs. Package-specific tasks only override dependsOn when needed.
@anthonyshew anthonyshew changed the title fix(turbo): use $TURBO_ROOT$ for root file references and add transit node ci(turbo): use $TURBO_ROOT$ for root file references and add transit node Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant