Migrate module resolution to NodeNext#3
Closed
inakineitor wants to merge 10 commits intoanomalyco:mainfrom
Closed
Conversation
- Change moduleResolution and module to NodeNext in tsconfig.json - Remove allowImportingTsExtensions (incompatible with NodeNext) - Add explicit "types": ["bun"] for proper type resolution - Update all relative imports to use .js extensions across src, tests, examples, and bench files https://claude.ai/code/session_01Sei5cqkt33RLgNbWcKvsrw
Adds "exports" field with types and import conditions for proper NodeNext resolution by downstream consumers. Updates build script to rewrite dist paths accordingly. https://claude.ai/code/session_01Sei5cqkt33RLgNbWcKvsrw
Lets Bun resolve directly to the TypeScript source, skipping the compiled dist output for faster dev and native TS support. https://claude.ai/code/session_01Sei5cqkt33RLgNbWcKvsrw
Points to the TypeScript source for tools and bundlers that support the source condition for development builds. https://claude.ai/code/session_01Sei5cqkt33RLgNbWcKvsrw
These legacy fields now match the exports map, pointing to the built dist output instead of src. Simplifies the build script sed rewrites to just strip the dist/ and src/ prefixes. https://claude.ai/code/session_01Sei5cqkt33RLgNbWcKvsrw
Add "files" field to whitelist dist/ and src/ for publishing, removing the need to copy and rewrite package.json into dist/. https://claude.ai/code/session_01Sei5cqkt33RLgNbWcKvsrw
3 tasks
- Install publint as dev dependency - Add `publint` script - Fix repository URL to use git+ prefix per publint suggestion https://claude.ai/code/session_01Sei5cqkt33RLgNbWcKvsrw
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 packages simplifies the build process by setting up the modern version of the package.json export fields. @kommander I tried to replicate the current functionality since it looks like you probably use it directly from source while debugging. The new build should support that out of the box plus build correctly for NodeNext when publishing.
Key Changes
https://claude.ai/code/session_01Sei5cqkt33RLgNbWcKvsrw