Skip to content

Conversation

@billyjanitsch
Copy link
Contributor

What:

@emotion/jest is currently only compatible with Jest 26 when using TypeScript because it optionally peer-depends on @types/jest@26:

"peerDependencies": {
"@types/jest": "^26.0.14",

This PR widens the peer dependency range from ^26.0.14 to ^26.0.14 || ^27.0.0 such that both 26 and 27 are supported.

Why:

See above.

How:

See above.

Checklist:

  • Documentation N/A
  • Tests N/A
  • Code complete
  • Changeset

@changeset-bot
Copy link

changeset-bot bot commented Aug 16, 2021

🦋 Changeset detected

Latest commit: b0a0436

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@emotion/jest Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codesandbox-ci
Copy link

codesandbox-ci bot commented Aug 16, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit b0a0436:

Sandbox Source
Emotion Configuration

@kazu69
Copy link

kazu69 commented Oct 6, 2021

When will this change be released ? I am looking forward to this change 😄

@chyzwar
Copy link

chyzwar commented Oct 6, 2021

I am npm user but this would work with npn7? We would also want to see these relesead, @billyjanitsch if your are busy we caise another pr, rebased with master?

@billyjanitsch
Copy link
Contributor Author

I am npm user but this would work with npn7?

Yes, this change will remove the peer dependency install error that currently prevents you from running npm i @emotion/jest@11.3.0 jest@27 @types/jest@27.

@billyjanitsch if your are busy we caise another pr, rebased with master?

There's no reason to rebase the branch now. It can be done by a maintainer before merge. This PR is just awaiting review. Please be patient as this project is a volunteer effort.


@Andarist whenever you have a moment, could you let me know if you see anything that prevents this from being an easy merge? I don't believe there were any changes to the v27 typings that would affect @emotion/jest. But if you have any concerns, I'm happy to look into them to reduce the burden for you.

@codecov
Copy link

codecov bot commented Oct 7, 2021

Codecov Report

Merging #2456 (b0a0436) into main (4c7b6de) will increase coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head b0a0436 differs from pull request most recent head 3cc8cf3. Consider uploading reports for the commit 3cc8cf3 to get more accurate results
| Impacted Files | Coverage Δ | |
|---|---|---|
| packages/cache/src/stylis-plugins.js | 100.00% <100.00%> (ø) | |

@emmatown emmatown merged commit 500cdd8 into emotion-js:main Oct 7, 2021
@github-actions github-actions bot mentioned this pull request Oct 7, 2021
@billyjanitsch billyjanitsch deleted the jest-27 branch October 7, 2021 02:21
@Andarist
Copy link
Member

Andarist commented Oct 7, 2021

This PR is just awaiting review. Please be patient as this project is a volunteer effort.

❤️

I don't believe there were any changes to the v27 typings that would affect @emotion/jest. But if you have any concerns, I'm happy to look into them to reduce the burden for you.

Hard to assess - we don't have a lot of actual dependency on those types so hopefully this shouldn't be problematic. We'll see after a release, in the worst-case scenario we'll have to do some minor adjustments to make it work with both (that's the hope, at least 😅 ).

@chyzwar
Copy link

chyzwar commented Oct 7, 2021

We use @emotion/jest with @types/jest v27 for few weeks already, No issues so far beside peer warning during install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants