这是indexloc提供的服务,不要输入任何密码
Skip to content

refactor: consolidate configuration file resolving #10619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 7, 2025

Conversation

anthonyshew
Copy link
Contributor

Description

This PR refactors the codebase to deduplicate the logic for resolving turbo.json and turbo.jsonc configuration files.

  • Introduced resolve_turbo_config_path in Rust (crates/turborepo-lib/src/turbo_json/mod.rs) and resolveTurboConfigPath in TypeScript (packages/turbo-utils/src/getTurboConfigs.ts).
  • Replaced duplicated file existence checks and conflict resolution with calls to these new utility functions.
  • Ensures that the behavior for handling turbo.json and turbo.jsonc (precedence, error on both existing) remains unchanged.

Testing Instructions

  • The refactor is purely internal, and existing tests cover the behavior.
  • Run cargo test in the Rust workspace.
  • Run pnpm check-types in the root to verify TypeScript changes.

Co-authored-by: anthony.shew <anthony.shew@vercel.com>
@anthonyshew anthonyshew requested a review from a team as a code owner July 1, 2025 12:01
Copy link

vercel bot commented Jul 1, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-basic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 7, 2025 4:23pm
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 7, 2025 4:23pm
examples-gatsby-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 7, 2025 4:23pm
examples-kitchensink-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 7, 2025 4:23pm
examples-native-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 7, 2025 4:23pm
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 7, 2025 4:23pm
examples-svelte-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 7, 2025 4:23pm
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 7, 2025 4:23pm
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 7, 2025 4:23pm
turbo-site ❌ Failed (Inspect) Jul 7, 2025 4:23pm

@anthonyshew anthonyshew changed the title Consolidate configuration file checks refactor: consolidate configuration file resolving Jul 1, 2025
cursoragent and others added 2 commits July 1, 2025 14:00
…sing

Co-authored-by: anthony.shew <anthony.shew@vercel.com>
Co-authored-by: anthony.shew <anthony.shew@vercel.com>
Copy link
Member

@chris-olszewski chris-olszewski left a comment

Choose a reason for hiding this comment

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

Fix lints, but otherwise LGTM

@anthonyshew anthonyshew enabled auto-merge (squash) July 7, 2025 16:23
@anthonyshew anthonyshew merged commit ca14867 into main Jul 7, 2025
40 of 48 checks passed
@anthonyshew anthonyshew deleted the cursor/consolidate-configuration-file-checks-e0df branch July 7, 2025 16:44
anthonyshew added a commit that referenced this pull request Jul 15, 2025
### Description

#10619 put this logic in a
shared place, but looks like I missed this spot.

### Testing Instructions

This should be a pure refactor, so CI should catch regressions.
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.

3 participants