Skip to content

fix: improve Turborepo configuration#2556

Open
anthonyshew wants to merge 2 commits intoakash-network:mainfrom
anthonyshew:fix/turborepo-config-improvements
Open

fix: improve Turborepo configuration#2556
anthonyshew wants to merge 2 commits intoakash-network:mainfrom
anthonyshew:fix/turborepo-config-improvements

Conversation

@anthonyshew
Copy link

@anthonyshew anthonyshew commented Jan 22, 2026

Summary

  • Add missing build, lint, and test tasks to turbo.json for proper caching and parallelization
  • Implement transit node pattern so lint/test tasks run in parallel while still invalidating cache when dependency source changes
  • Fix root lint scripts to delegate to turbo run lint instead of running eslint . directly
  • Remove duplicate dependencies from root package.json that already exist in the apps that use them (drizzle-orm, pg, nock, @interchain-ui/react)

Why

The previous configuration was missing task definitions for common scripts (build, lint, test) that exist across multiple packages. This meant:

  1. Running turbo run build/lint/test wouldn't benefit from Turborepo's caching or parallelization
  2. The root lint script bypassed Turborepo entirely, defeating the purpose of the monorepo setup
  3. Root dependencies were duplicated from apps, adding unnecessary entries to the root package.json

AI Usage

Chat transcript: https://opncd.ai/share/IwyhgsPI

Summary by CodeRabbit

  • Chores
    • Redesigned build system to leverage monorepo orchestration for consistent builds and improved performance across all projects
    • Refactored build, linting, and testing infrastructure with improved task management and caching strategies
    • Updated build and linting scripts for streamlined monorepo workflow
    • Removed unused package dependencies

✏️ Tip: You can customize this high-level summary in your review settings.

- Add missing build, lint, and test tasks to turbo.json
- Add transit node pattern for parallel lint/test with correct cache invalidation
- Fix root lint scripts to delegate to turbo run instead of running eslint directly
- Remove duplicate dependencies from root package.json (already in apps that use them)
@anthonyshew anthonyshew requested a review from a team as a code owner January 22, 2026 14:42
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

The project is migrated to use Turbo for task orchestration. Lint scripts now invoke Turbo instead of directly calling eslint. Four unused root-level dependencies are removed, and Turbo is configured with four new tasks establishing a dependency graph for build, lint, test, and transit operations.

Changes

Cohort / File(s) Summary
Script Migration & Dependency Cleanup
package.json
Updated lint and lint:fix scripts to use turbo run lint for task orchestration; removed four unused root dependencies: @interchain-ui/react, drizzle-orm, nock, pg
Turbo Task Configuration
turbo.json
Added four new Turbo tasks with dependency graph: transit (no dependencies), build (depends on ^build, caches dist/**, .next/** excluding .next/cache/**), lint and test (both depend on transit)

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 Turbo spins up, tasks dance in a row,
Dependencies pruned, the scripts now flow,
Lint rides the pipeline, swift and so clean,
The fastest rabbit workspace you've ever seen!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix: improve Turborepo configuration' accurately reflects the main changes: updating turbo.json with new task definitions and improving the root package.json configuration to better align with Turborepo best practices.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@@ -9,12 +9,6 @@
"./packages/*",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔄 Carefully review the package-lock.json diff

Resolve the comment if everything is ok

- node_modules/@mswjs/interceptors/node_modules/agent-base                                 7.1.3   
- node_modules/@mswjs/interceptors/node_modules/cssstyle                                   4.3.1   
- node_modules/@mswjs/interceptors/node_modules/data-urls                                  5.0.0   
- node_modules/@mswjs/interceptors/node_modules/html-encoding-sniffer                      4.0.0   
- node_modules/@mswjs/interceptors/node_modules/https-proxy-agent                          7.0.6   
- node_modules/@mswjs/interceptors/node_modules/iconv-lite                                 0.6.3   
- node_modules/@mswjs/interceptors/node_modules/jsdom                                      26.1.0  
- node_modules/@mswjs/interceptors/node_modules/tough-cookie                               5.1.2   
- node_modules/@mswjs/interceptors/node_modules/tr46                                       5.1.1   
- node_modules/@mswjs/interceptors/node_modules/w3c-xmlserializer                          5.0.0   
- node_modules/@mswjs/interceptors/node_modules/webidl-conversions                         7.0.0   
- node_modules/@mswjs/interceptors/node_modules/whatwg-encoding                            3.1.1   
- node_modules/@mswjs/interceptors/node_modules/whatwg-mimetype                            4.0.0   
- node_modules/@mswjs/interceptors/node_modules/whatwg-url                                 14.2.0  
- node_modules/@mswjs/interceptors/node_modules/xml-name-validator                         5.0.0   
- node_modules/@mswjs/interceptors                                                         0.38.5  
- node_modules/@open-draft/deferred-promise                                                2.2.0   
- node_modules/@open-draft/logger                                                          0.3.0   
- node_modules/@open-draft/until                                                           2.1.0   
- node_modules/is-node-process                                                             1.2.0   
- node_modules/nock                                                                        14.0.4  
- node_modules/outvariant                                                                  1.4.3   
- node_modules/strict-event-emitter                                                        0.5.1   

"npm run validate:types -w apps/indexer"
]
},
"dependencies": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stalniy @ygrishajev do you remember why we had dependencies at the root package?

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.

2 participants