-
-
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
Use ES module exports #4454
Use ES module exports #4454
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4454 +/- ##
==========================================
+ Coverage 56.74% 56.86% +0.11%
==========================================
Files 189 186 -3
Lines 6485 6294 -191
Branches 3 3
==========================================
- Hits 3680 3579 -101
+ Misses 2804 2714 -90
Partials 1 1
Continue to review full report at Codecov.
|
Woah, nice work @SimenB. Thank you for your continued efforts to modernize the codebase. |
* Use ESM exports in jest-config * Use ESM exports in eslint-plugin-jest * Use ESM exports in jest-changed-files * Use ESM exports in jest-circus * Use ESM exports in jest-diff * Use ESM exports in jest-editor-support * Use ESM exports in jest-haste-map * Use ESM exports in jest-jasmine2 * Use ESM exports in jest-message-util * Use ESM exports in jest-regex-util * Use ESM exports in jest-repl * Use ESM exports in jest-resolve * Use ESM exports in jest-runner * Use ESM exports in jest-runtime * Use ESM exports in jest-snapshot * Use ESM exports in jest-test-typescript-parser * Use ESM exports in jest-util * Use ESM exports in jest-validate * Fix flow errors * Activate eslint plugin to enforce correct ESM usage * Use ESM exports in jest-cli
* Use ESM exports in jest-config * Use ESM exports in eslint-plugin-jest * Use ESM exports in jest-changed-files * Use ESM exports in jest-circus * Use ESM exports in jest-diff * Use ESM exports in jest-editor-support * Use ESM exports in jest-haste-map * Use ESM exports in jest-jasmine2 * Use ESM exports in jest-message-util * Use ESM exports in jest-regex-util * Use ESM exports in jest-repl * Use ESM exports in jest-resolve * Use ESM exports in jest-runner * Use ESM exports in jest-runtime * Use ESM exports in jest-snapshot * Use ESM exports in jest-test-typescript-parser * Use ESM exports in jest-util * Use ESM exports in jest-validate * Fix flow errors * Activate eslint plugin to enforce correct ESM usage * Use ESM exports in jest-cli
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
This converts most of the commonjs usage into ESM exports.
I took care to not change to
default export
for entrypoints, meaning that those importing individual modules can still userequire
without issue.Might consider adding
no-commonjs
lint rule (https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-commonjs.md), but there are still lots of places we have to use CJS?Test plan
./jest