You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add tsconfig discovery and return from Resolution
Add automatic tsconfig.json discovery that traverses up parent directories,
similar to how package.json is discovered. The discovered tsconfig is now
returned in the Resolution struct.
Changes:
- Add `tsconfig` field to CachedPathImpl with OnceLock caching
- Add `find_tsconfig` method to CachedPath for directory traversal
- Add `get_tsconfig_for_path` to Cache for loading and caching
- Modify `load_tsconfig_paths` to support auto-discovery when no explicit
tsconfig option is provided
- Add `tsconfig` field to Resolution struct with public getter
- Update `resolve_impl` to populate tsconfig in Resolution
- Add comprehensive tests in tsconfig_discovery.rs
The implementation follows the same pattern as package.json discovery:
- Thread-safe caching using OnceLock
- Consistent with existing find_package_json/get_package_json pattern
- Auto-discovery doesn't pollute missing_dependencies
- All existing tests pass (153 total)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments