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

Revert ESM exports #7602

Merged
merged 1 commit into from Jan 10, 2019
Merged

Revert ESM exports #7602

merged 1 commit into from Jan 10, 2019

Conversation

rubennorte
Copy link
Contributor

Summary

This reverts #7548, which converted all exports to ESM. That change makes Jest more verbose to use for CommonJS users (requiring .default in most cases) and breaks the use of some of its packages (e.g.: jest-phabricator) out of the box, while not providing much additional value. We should revisit this once ESM has settled in Node (and also implemented support for ESM in modules specified in the config).

Test plan

Unit, integration and e2e tests have been updated as well.

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

Makes me sad, but I understand the need. Anything to let 24 get out the door 😀

Will be revisited together with #7554

@rubennorte
Copy link
Contributor Author

@SimenB it makes me sad that it makes you sad ;)

@rubennorte rubennorte merged commit 6a066c6 into jestjs:master Jan 10, 2019
@rubennorte rubennorte deleted the revert-esm-exports branch January 10, 2019 18:15
@TrySound
Copy link
Contributor

Rollup is able to write default export to module.exports if module does not have any named exports.

@SimenB
Copy link
Member

SimenB commented Jan 11, 2019

We use Babel, but we could use https://github.com/59naga/babel-plugin-add-module-exports.

Rollup is used for the browser builds, though

@TrySound
Copy link
Contributor

It can be used to bundle all package files too. It will probably speed up startup time which is quite long now. It takes around 3-4 seconds on my macbook air. Sometimes more.

captain-yossarian pushed a commit to captain-yossarian/jest that referenced this pull request Jul 18, 2019
@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 12, 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.

None yet

4 participants