Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(utils): types for /utils entry point #18

Merged
merged 1 commit into from
Jan 16, 2023
Merged

Conversation

arjunvegda
Copy link
Member

@arjunvegda arjunvegda commented Jan 15, 2023

  • fix types for import { useAtomsSnapshot } from 'jotai-devtools/utils for when moduleResolution is set to node for our users

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 15, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit c788cd8:

Sandbox Source
React Configuration
React Typescript Configuration

@arjunvegda arjunvegda force-pushed the fix-multi-entry-types branch 6 times, most recently from c1b14f1 to 7bb4570 Compare January 16, 2023 00:07
@arjunvegda arjunvegda marked this pull request as ready for review January 16, 2023 01:17
@arjunvegda arjunvegda changed the title fix(utils): export types order fix(utils): types for /utils entry point Jan 16, 2023
Copy link
Member

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, the issue was nested "default"s in "exports"?

@arjunvegda
Copy link
Member Author

So, the issue was nested "default"s in "exports"?

The issue was that Typescript doesn't support exports property in package.json if moduleResolution is set to node on userland 😅. Based on this issue , anyone using Node 12 or 14 should use --moduleResolution node16 that supports package.json's exports property.

However, the workaround to support --moduleResolution node is to have typesVersions mirror exports property.

"default"s in "exports"
I updated this to keep it consistent with jotai

@arjunvegda arjunvegda merged commit 743d984 into main Jan 16, 2023
@arjunvegda arjunvegda deleted the fix-multi-entry-types branch January 16, 2023 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants