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

tooling: "exports" adjustments #2327

Merged
merged 4 commits into from
Feb 11, 2020
Merged

Conversation

guybedford
Copy link
Contributor

This PR updates the "exports" definitions to match the expectations of logical conditional exports ordering (nodejs/node#31008).

The idea there is that we can think of the "exports" object as an ordered conditional like a series of if statements, which was integrated with feedback from tooling authors.

The definitions written here though would never match the "browser" or "umd" conditions because the "require" or "import" condition would act as a catch-all, like having an if (true) with further if statements below.

The general rule is to put the most specific conditional exports first, although I can appreciate if this might seem counter-intuitive.

Further discussion / feedback welcome.

@coveralls
Copy link

coveralls commented Feb 10, 2020

Coverage Status

Coverage remained the same at 99.792% when pulling e240178 on guybedford:patch-1 into ca8eb87 on preactjs:master.

Copy link
Member

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

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

Awesome, thank you so much for your contribution 👍

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.

5 participants