-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
chore: reduce reliance on esModuleInterop #8842
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.
LGTM other than red CI, didn't find any surprises ;)
For modules like path
that are collections of functions, import * as
makes more sense to me anyway.
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
In order for our own types to be as consumable as possible, we should avoid relying on
esModuleInterop
(as that will force our consumers to also use that flag). This PR removes about 2/3 of our usage of it. Removing all will be a breaking change since it will removeexport =
, which means we must either use default or named exports. Also, we have to update some upstream libraries that only support node 8 so that they work without it. So at least one more PR will come when we drop node 6 and bump some libs. But this is a good startDefinitelyTyped/DefinitelyTyped#33705 (comment)
Test plan
Green CI as this just changes how we import modules