Repository navigation
fix: strip TypeScript before export discovery - #297
tayfuryldz wants to merge 2 commits into
Conversation
Signed-off-by: TayfurYldz <238304586+TayfurYldz@users.noreply.github.com>
9531ac5 to
e75cb45
Compare
BridgeAR
left a comment
There was a problem hiding this comment.
A new es-module-lexer was just published that should fix the issues and it will automatically be pulled in for new installs, since we use a open range in iitm.
Mind trying that and just updating the minimum version here afterwards? That way we can keep the speedups.
Signed-off-by: TayfurYldz <238304586+TayfurYldz@users.noreply.github.com>
|
Tried es-module-lexer 3.0.3 as suggested, raised the minimum to ^3.0.3, and removed the ESM TypeScript stripping workaround to retain the faster lexer path. Added a runtime-independent regression asserting the fixture’s six value exports and three type-only exports. That regression and ESLint pass locally. The full test suite hits ERR_NO_TYPESCRIPT because the locally installed Node 24.15.0 build lacks TypeScript support, so the .mts integration suite still needs normal CI verification. |
Closes #296
TypeScript module formats are now stripped before runtime export discovery, preventing type arguments from being misidentified as value exports.
Regression coverage adds two generic-cast exports with the same trailing type argument; current main fails with a duplicate phantom export, while the patched path loads and instruments the module correctly.
Validation: