-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat!: update Yoga to 3.0 #2711
Conversation
🦋 Changeset detectedLatest commit: d21bd48 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
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 |
@wojtekmaj this looks good. What's missing? |
@diegomura See the original ticket: we will be unable to provide CJS builds as Yoga 3 is a pure ESM module. |
Sorry! Missed that. Huh, good decision to make. Would be nice to push forward that and just embrace ESM but I'm afraid that would break a lot of setups. Will think about this. Any input would be welcomed! |
I think the question is more WHEN and not IF. It's really up to you: how much further are you able (and willing to!) push the v2 forward? If you think that significant improvements can still be made, you may want to hold off with v3 for a while, to avoid maintaining two releases at the same time. If you think v2 is "pretty much ready" and you're basically only maintaining it, then it would be best to bite the bullet and remove CJS builds. The move will also improve the experience for ESM users (see #2507), userbase of which is ever growing, at the expense of CJS users, userbase of which is ever shrinking. Please note that removing CJS builds does not stop CJS users from:
|
I wonder if Yoga v2 with its unusual CommonJS wrapper code is also causing issues like this property access error |
@wojtekmaj is there an easy way to try this PR out? If this isn't published somewhere already, would it be possible to get a prerelease version published? I'm currently applying your changes to |
I think this is the best we can do until it's released :( |
Oh ok, @diegomura would you be open to a pre-release version like @wojtekmaj aside from that, would you be open to publish a scoped package under your name eg. |
It may actually be more beneficial to go back to keeping things async and using the |
Thanks for the heads up. PDF.js introduced top-level await recently and they rolled it back after a huge backslash, so I guess you'd be right. |
Hi, is there an expected release data for this feature? |
I'm very tempted on removing CJS support. We should look forward. I feel it's kind of our responsibility to help things moving forward as lib authors. Newer solutions won't become adopted if people do not have an incentive to upgrade. Also, given bandwidth of lib authors feels like it simplifies things. Many packages here won't even need a build step. @wojtekmaj curious what you think |
I can't agree more. And frankly, it's not even a question if we want to move react-pdf forward. More and more libs are abandoning CJS, like our core dependencies. |
Amazing. I'll remove CJS support and we can land this after then! |
Done in #2871 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
Closes #2692
Closes #2507
This PR updates Yoga to 3.0.
See the list of new features, improvements, and potential breaking changes in #2692.