-
-
Notifications
You must be signed in to change notification settings - Fork 33
feat(tsconfig): implement solution-style tsconfig resolution #815
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
base: main
Are you sure you want to change the base?
feat(tsconfig): implement solution-style tsconfig resolution #815
Conversation
How to use the Graphite Merge QueueAdd the label merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #815 +/- ##
==========================================
- Coverage 93.93% 93.82% -0.12%
==========================================
Files 17 17
Lines 3098 3172 +74
==========================================
+ Hits 2910 2976 +66
- Misses 188 196 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
817c769 to
8c5e2e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements solution-style TypeScript configuration resolution for monorepo projects with project references. The implementation follows similar logic to tsconfck's resolveSolutionTSConfig, ensuring that files are resolved against the correct tsconfig in a multi-project setup.
Key changes:
- Added
resolve_for_filemethod to determine the correct tsconfig for a file in a solution-style project - Implemented file inclusion/exclusion logic with
is_file_includedandis_glob_matchmethods - Integrated the new resolution logic into the main resolver workflow
Reviewed Changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/tsconfig.rs | Added solution-style tsconfig resolution with file inclusion/exclusion pattern matching |
| src/lib.rs | Integrated resolve_for_file into the tsconfig resolution workflow |
| src/tests/tsconfig_solution_style.rs | Comprehensive test suite for solution-style resolution scenarios |
| src/tests/mod.rs | Registered new test module |
| Cargo.toml | Added fast-glob dependency for glob pattern matching |
| Cargo.lock | Updated lock file with new dependencies |
| fixtures/tsconfig/cases/solution_style/* | Test fixtures for solution-style resolution scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CodSpeed Performance ReportMerging #815 will not alter performanceComparing Summary
Footnotes
|
8c5e2e0 to
b7b4cf2
Compare
b7b4cf2 to
521372f
Compare

closes #790
Implement solution-style tsconfig resolution similar to tsconfck'
resolveSolutionTSConfig. This automatically selects the correct tsconfig for a file in monorepo/solution-style projects with project references.Changes:
TsConfig::resolve_for_filemethod to resolve the appropriate tsconfig based on file inclusion patternsTsConfig::is_file_includedto check if files match tsconfig's include/exclude/files patternsTsConfig::is_glob_matchfor glob pattern matching with support for TypeScript's pattern normalizationTsconfigDiscovery::Automodefast-globdependency for efficient pattern matchingexclude patterns, allowJs, extensions, and edge cases
The implementation respects TypeScript's file inclusion rules including:
filesarray (highest priority)includepatterns with implicit**/*globstarexcludepatternsallowJsconfiguration for JavaScript filests,tsx,mts,cts,js,jsx,mjs,cjs)I’ll add more tests for the
is_file_includedandis_glob_matchmethods in the next PRs.