Skip to content

fix: preserve exact TypeScript path alias boundaries - #8

Open
everton-dgn wants to merge 1 commit into
webpro-nl:mainfrom
everton-dgn:fix/preserve-exact-path-alias-boundaries
Open

everton-dgn wants to merge 1 commit into
webpro-nl:mainfrom
everton-dgn:fix/preserve-exact-path-alias-boundaries

Conversation

@everton-dgn

Copy link
Copy Markdown

An exact paths mapping such as @utils must not become @utils/value unless a matching wildcard resolves to that file. Verify alias candidates against the destination and use a relative import when the alias cannot represent it. Paired exact and wildcard mappings keep working.

The 33 regression cases check TypeScript diagnostics, resolved targets and executed consumers before and after rewriting. All 214 tests passed on Node 24, along with build, typecheck, lint and formatting. Four additional cases exercised the compiled API on Node 20 with a TypeScript resolver loader for the fixture aliases.

An exact paths mapping such as @utils must not become @utils/value unless a matching wildcard resolves to that file. Verify alias candidates against the destination and use a relative import when the alias cannot represent it. Paired exact and wildcard mappings keep working.

The 33 regression cases check TypeScript diagnostics, resolved targets and executed consumers before and after rewriting. All 214 tests passed on Node 24, along with build, typecheck, lint and formatting. Four additional cases exercised the compiled API on Node 20 with a TypeScript resolver loader for the fixture aliases.
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.

1 participant