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

chore: reduce reliance on esModuleInterop #8842

Merged
merged 10 commits into from
Aug 18, 2019

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Aug 17, 2019

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 remove export =, 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 start

DefinitelyTyped/DefinitelyTyped#33705 (comment)

Test plan

Green CI as this just changes how we import modules

Copy link
Contributor

@jeysal jeysal left a 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.

@SimenB SimenB merged commit 0e5b363 into jestjs:master Aug 18, 2019
@SimenB SimenB deleted the less-ts-module-interop branch August 18, 2019 10:16
@github-actions
Copy link

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants