Repository navigation
fix: respect explicit tsconfig files for alias resolution - #231
Closed
charan-rathore wants to merge 1 commit into
Closed
charan-rathore wants to merge 1 commit into
charan-rathore wants to merge 1 commit into
Conversation
Author
|
Closing since this has sat without activity. Glad to reopen if someone wants to take it forward. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Explicit tsconfig
filesentries are part of the project even ifincludeis empty orexcludematches them. The plugin currently checks only include/exclude globs, so it skips valid aliases from those files. Conversely, a files-only config with no include incorrectly accepts every importer.Check explicit files separately from globs. When files are specified without include, do not add the default include glob. Keep exclude filtering for files discovered through include, but do not apply it to explicitly listed files.
Three regression checks cover excluded explicit files, unlisted importers in a files-only project, and agreement with TypeScript through the real Vite resolver. They fail before the change and pass after it.
This adds the files support requested in #8. It keeps alias resolution and importer extension checks unchanged.
Validation: all 54 tests pass together with
vitest run --isolate, lint, formatting, typecheck, and build pass. The default test config setsisolate: false. When resolver.test.ts loads the shared config module before config.test.ts, the latter file's filesystem mock does not intercept its already-loaded import. Its concurrency tracker stays at zero. This reproduces with baseline source when running these two files together. Enabling Vitest isolation fixes it; the runner uses that flag without changing repository configuration.