Skip to content

fix(compiler): support synthetic module specifiers#3453

Merged
kamilmysliwiec merged 1 commit into
nestjs:masterfrom
orgads:synthetic-modules
Jun 4, 2026
Merged

fix(compiler): support synthetic module specifiers#3453
kamilmysliwiec merged 1 commit into
nestjs:masterfrom
orgads:synthetic-modules

Conversation

@orgads

@orgads orgads commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[X] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior?

Typia can produce synthetic import and export string literals during TypeScript 6 transforms. The tsconfig-paths hook called getText() on the module specifier, which asserts on nodes without real source positions and stops debuggers on the caught exception.

What is the new behavior?

Read moduleSpecifier.text when it is available, fall back to getText(sourceFile) for source-backed nodes, and cover the behavior with a regression test for synthetic literals.

Does this PR introduce a breaking change?

[ ] Yes
[X] No

Other information

Typia can produce synthetic import and export string literals during
TypeScript 6 transforms. The tsconfig-paths hook called getText() on
the module specifier, which asserts on nodes without real source
positions and stops debuggers on the caught exception.

Read moduleSpecifier.text when it is available, fall back to
getText(sourceFile) for source-backed nodes, and cover the behavior
with a regression test for synthetic literals.
@kamilmysliwiec kamilmysliwiec merged commit 2a9589d into nestjs:master Jun 4, 2026
1 check passed
@orgads orgads deleted the synthetic-modules branch June 4, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants