Repository navigation
fix: resolve aliases inherited through tsconfig extends arrays - #127
Merged
haydenschmitty merged 1 commit intoNov 15, 2026
Merged
haydenschmitty merged 1 commit into
haydenschmitty merged 1 commit into
Conversation
Owner
|
Merged and released in 0.9.0. Thank you! Update with |
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.
What this changes
Fixes #126. When a local
tsconfig.jsonextends several configs, inherited aliases now resolve to the source files instead of appearing as external npm packages.Read local bases in order, with later bases overriding earlier ones and the child taking precedence. Track the origins of
pathsand legacybaseUrlseparately so inheritance through different folders keeps the correct resolution directory. An empty child paths map clears inherited aliases; a base without a paths map does not erase an earlier map. Existing cycle protection and single-string inheritance remain supported.The new tests include the issue's small TypeScript project, nested arrays, precedence, child overrides, relative directories, legacy baseUrl, string inheritance and cycles. The changelog and development test table are updated.
How I tested it
npm test: 298 tests, 297 passed, 1 platform skip, 0 failed.15f5be40331a713e50d96a7bc01ef1f875dce76e) before and after: 1,709 files, 5,819 import edges and 83 external packages in both. Import-edge and external-package lists are identical. No changes were made to that project's source.git diff --check: passed.Checklist
npm testpassesCHANGELOG.mdupdated, if people will notice the change