-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Emotion 10 + Emotion 11 side-by-side problems #1974
Comments
Sorry to hear that - we automate our releases and versioning using Changesets. When maintaining 2 separate release lines - which both depend on a shared versioning scheme - things get sometimes tricky and some errors, like this, are easy to miss as this situation is not automatically validated. This is especially troublesome when dealing with 0.x packages. Not sure how to best handle this on the Changesets level, but I will keep thinking about this. The good news is that the fix is quite simple - we should just bump |
Thanks so much for the fast response! I've managed a bit of a temporary workaround using yarn's
but it's only a temporary workaround: we automatically run |
I've released new |
Yep, @Andarist I've successfully pulled in the updated packages and that's somewhat cleaner enabling me to discover the next hurdle where attributes that were previously filtered by Emotion v10 don't seem to be in v11. Will investigate and raise separate issue. |
I'm getting a similar issue with a project that uses Emotion 11 and Storybook 6 (which uses Emotion 10). This only happens with yarn and not npm. However, I don't understand why Emotion 11 breaks with this hoisting strategy; I've created a repro here: https://github.com/levymetal/emotion-11-conflict-repro. Running |
I've given the answer to @levymetal's issue here: storybookjs/storybook#13300 (comment) |
Current behavior:
I'm currently attempting an upgrade of our codebase to Emotion 11 and it's proving extremely problematic as we have a variety of things that still require Emotion 10. (e.g. storybook). So I have a
node_modules
folder that contains both Emotion 10 and Emotion 11.There are some TypeScript issues (specifically the dreaded TS2742 error) which I won't list here but the most significant problem I'm having right now is with the versioning of the
@emotion/serialize
package: the Emotion 10 version of this package has a higher version number than the Emotion 11 version and so is picked up by@emotion/react
of Emotion 11.To reproduce:
@emotion/react
package.@emotion/serialize@0.11.16
from Emotion 10, used by storybook.The problem is that
@emotion/react@11.0.0-next.14
has a dependency on^0.11.15-next.2
. That dependency will be satisfied by@emotion/serialize@0.11.16
Expected behavior:
If Emotion 11 packages require other Emotion 11 packages, they should be picking them up, not accidentally picking up Emotion 10 packages.
The text was updated successfully, but these errors were encountered: