-
Notifications
You must be signed in to change notification settings - Fork 27
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: Incorrect exports #87
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intention of this test is to verify that we can load modules like got
. Can you clarify the reasoning behind removal of the removed code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's adding exports that don't exist when the loader is not in use. When testing Node without the loader, only the root default export is exposed. export * from
does not include default exports.
We probably just need to add a load of troublesome libraries to devDependencies
and actually test them in the tests rather than rely on synthetic test cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably just need to add a load of troublesome libraries to
devDependencies
and actually test them in the tests rather than rely on synthetic test cases.
Agreed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Closing in favour of #85 which removes more redundant code |
Closes #68, Closes #77, Closes #62, Closes #60...
We need to mimic the behaviour of Node ESM resolution and my testing so far without the loader suggests that:
export * from
only exports named exports and we don't need to pass through default exportsIdeally we should have tests that ensure that module exports are identical both with and without the loader hook because currently this isn't the case.
To accomplish the above:
mapExcludingDuplicates
forsetters
which does as it suggestsrenamedExport
handling incorrectly adds ES module exports #68)_
if there a corresponding key inset
. Without this, the exports passed toHook
don't match the final module exports