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

Use named exports for jest-diff #11371

Merged
merged 2 commits into from May 4, 2021
Merged

Use named exports for jest-diff #11371

merged 2 commits into from May 4, 2021

Conversation

IanVS
Copy link
Contributor

@IanVS IanVS commented May 3, 2021

Summary

Similar to #11359 and #11360, I had problems when using jest-diff together with rollup's plugin-commonjs that turns cjs back into esm. It appears that there was originally a desire to use all named exports for jest-diff, but the move was delayed originally. This PR removes the default export for jest-diff and exposes diff() as a named export. I also did my best to find any usages of the default export in the documentation.

Test plan

I tested this in my own snowpack app by building jest from my branch and replacing files in my node_modules.

@codecov-commenter
Copy link

Codecov Report

Merging #11371 (d4c588b) into master (3f6b420) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #11371   +/-   ##
=======================================
  Coverage   64.19%   64.19%           
=======================================
  Files         308      308           
  Lines       13519    13519           
  Branches     3293     3293           
=======================================
  Hits         8678     8678           
  Misses       4126     4126           
  Partials      715      715           
Impacted Files Coverage Δ
packages/jest-diff/src/index.ts 82.75% <ø> (ø)
packages/jest-matcher-utils/src/index.ts 86.81% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f6b420...d4c588b. Read the comment docs.

@IanVS
Copy link
Contributor Author

IanVS commented May 3, 2021

It looks like one test died out. :(

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.

Thanks!

@SimenB SimenB merged commit 92095ab into jestjs:master May 4, 2021
@SimenB
Copy link
Member

SimenB commented May 4, 2021

Published as next.9

@IanVS IanVS deleted the jest-diff-named branch May 4, 2021 12:59
@github-actions
Copy link

github-actions bot commented Jun 4, 2021

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 Jun 4, 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