Export the release paths so a node10 resolver can read them - #8
Merged
Merged
Conversation
TypeScript under moduleResolution node10 reads no exports map, and ts-jest falls back to it, so a consumer that imports an artifact subpath fails to compile while the same import runs fine under Node. Rather than have each workspace work around its test runner, the package now also exports releases/* by its own path, which both resolvers accept. Bump npm to 0.2.0 alongside the gem. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
What
The npm package now also exports
./releases/*by its own path, and the version moves to 0.2.0 to match the gem.Why
TypeScript under
moduleResolution: node10reads noexportsmap. ts-jest falls back to that resolver, so incomakery-servera workspace that imports@upsideos/evm-rwa-artifacts/v5.1/abis/IdentityRegistry.jsoncompiles undertsc -band under Node, but every ts-jest suite in the workspace fails with TS2307. Four workspaces share that toolchain, and working around it in each one's Jest config is worse than letting the package answer both resolvers../releases/*maps to the same files the named exports already serve, so nothing new is exposed. The README says to prefer the named exports where the toolchain supports them.Verified
tsc --noEmitresolves@upsideos/evm-rwa-artifacts/releases/v5.1/abi/IdentityRegistry.jsonunder bothmoduleResolution: node10andmoduleResolution: NodeNext.Made with Cursor