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

Broken exports #694

Closed
RobinTail opened this issue Jul 11, 2024 · 7 comments · Fixed by #695
Closed

Broken exports #694

RobinTail opened this issue Jul 11, 2024 · 7 comments · Fixed by #695
Labels

Comments

@RobinTail
Copy link
Contributor

@thebuilder , something changed in between 9.10.3 and 9.12.0 that broke the existing imports:

Getting the following error for all my tests:

TS2307: Cannot find module 'react-intersection-observer/test-utils' or its corresponding type declarations.
Screenshot 2024-07-11 at 10 40 00
@RobinTail
Copy link
Contributor Author

Narrowed it down to 9.11.0

@RobinTail
Copy link
Contributor Author

RobinTail commented Jul 11, 2024

https://arethetypeswrong.github.io/?p=react-intersection-observer%409.11.0
@thebuilder

Resolution failed in 9.11.0 for "node10" in "/test-utils"

9.10.3 9.11.0
Screenshot 2024-07-11 at 10 58 36 Screenshot 2024-07-11 at 10 59 17

@RobinTail
Copy link
Contributor Author

RobinTail commented Jul 11, 2024

In order to fix it, tsup should be configured to build test utils as index.js inside the test-utils folder (along with "dist").
There should be a dedicated configuration for that entrypoint with its own output dir.

@RobinTail
Copy link
Contributor Author

Made a fix. I had a similar issue in my project.

@thebuilder
Copy link
Owner

Thanks a lot - ESM is the bane of my existence.

@thebuilder
Copy link
Owner

🎉 This issue has been resolved in version 9.13.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@RobinTail
Copy link
Contributor Author

I confirm all issues fixed in 9.13.0, including #689

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants