Conversation
RobinTail
commented
Mar 24, 2025
RobinTail
commented
Mar 24, 2025
47b3511 to
c2964f2
Compare
RobinTail
added a commit
that referenced
this pull request
Oct 4, 2025
`module: node20` introduced in Typescript 5.9 as a stable replacement for `nodenext`: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-9.html#support-for---module-node20 The recommended combination is with `moduleResolution: node16`: microsoft/TypeScript#61805 That change implies relative imports to have extensions, however, it's possible to change them directly to `.ts`, which will also reiterate and resolve #2289 . It will enable running typescript natively by Node.js without `tsx`. It may also come handy if I decide to publish to JSR. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - Chores - Project build and compiler settings standardized; JSON imports made explicit and some tooling switched to static JSON imports. - Refactor - Internal module references normalized to explicit TypeScript entries; some runtime identifiers now derive from environment-provided build metadata. - Tests - Test imports updated for explicit module resolution; migration tests expanded with additional valid cases. - Style - New lint rules encourage .ts extensions for local imports and discourage direct package.json imports. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
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.
This will come handy for JSR and Node 24 bare typescript running (early available without flags in 23.6):
https://nodejs.org/api/typescript.html#type-stripping
For typescript running will also need
verbatimModuleSyntaxUPD:
erasableSyntaxOnlyfrom TS 5.8 can be used to ensure base typescript running