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: add types condition to the front of the exports #85

Merged
merged 1 commit into from
Apr 30, 2023

Conversation

Andarist
Copy link

@Andarist Andarist commented Apr 29, 2023

Reopening mysticatea#30 here as suggested by @MichaelDeBoey

I added types condition to the front. package.json#exports are order-sensitive - they are always matched from the top to the bottom. When a match is found then it should be used and no further matching should occur.

Right now, the current setup works in TypeScript but it's considered a bug and it should not be relied upon, see the thread and the comment here. For that reason, I would like to fix all popular packages that misconfigured their exports this way so the bug can be fixed in TypeScript.

⚠️ note that this doesn't fix all of the types-related problems in this package (see the reported problems here). This PR only focuses on "🐛 Used fallback condition" because that's a TypeScript bug that can't be fixed before the usage gets fixed in popular packages.

Copy link
Member

@MichaelDeBoey MichaelDeBoey left a comment

Choose a reason for hiding this comment

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

@Andarist Could you please rebase your branch onto latest main & resolve conflicts?

@MichaelDeBoey MichaelDeBoey requested a review from a team April 29, 2023 14:22
@Andarist
Copy link
Author

@MichaelDeBoey done

@MichaelDeBoey MichaelDeBoey self-assigned this Apr 29, 2023
@MichaelDeBoey MichaelDeBoey requested a review from a team April 29, 2023 14:26
@ota-meshi ota-meshi merged commit 811bcaa into eslint-community:main Apr 30, 2023
@github-actions
Copy link

🎉 This PR is included in version 4.5.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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 this pull request may close these issues.

3 participants