react-spring
react-spring copied to clipboard
Fix react-konva peerDependency
Why
This PR resolves #1861
As of now, the @react-spring/konva
package has a peer dependency on react-konva
:
https://github.com/pmndrs/react-spring/blob/a865bb7ba00d669d63483fdbe95339521a9e0ccb/targets/konva/package.json#L38
But react-konva uses a pre-release scheme on the v17. So the version used breaks peerDependencies of projects using react 17.
You can test it on the npm semantic version calculator:
What
I added the version ^17.0.2-0
to the scheme so it could match for those versions:
Checklist
- [ ] Documentation updated
- [ ] Demo added
- [x] Ready to be merged
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
react-spring-io | ✅ Ready (Inspect) | Visit Preview | May 10, 2022 at 2:26PM (UTC) |
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 34a2ce5f36e66b4dd4ad7aa6d47691526d603805:
Sandbox | Source |
---|---|
spring-animating-auto | Configuration |
pmndrs/react-spring | Configuration |
spring-cards-stack | Configuration |
spring-chain | Configuration |
pmndrs/react-spring | Configuration |
pmndrs/react-spring | Configuration |
spring-exit-before-enter | Configuration |
pmndrs/react-spring | Configuration |
Would this break if react-konva
used something like ^17.0.2-1
? 🤔
Would this break if
react-konva
used something like^17.0.2-1
? 🤔
It would just not allow version 17.0.2-0
, so it shouldn't be harmful.
Hey I just saw you bumped the version number, is this because we need to use an explicit version number as 17.0.2-1
isn't obviously semantic?
Hey I just saw you bumped the version number, is this because we need to use an explicit version number as
17.0.2-1
isn't obviously semantic?
Yoy can see on the screenshots of the PR which versions would be allowed
Hey I just saw you bumped the version number, is this because we need to use an explicit version number as
17.0.2-1
isn't obviously semantic?Yoy can see on the screenshots of the PR which versions would be allowed
right, i see, thanks! that wasn't super clear to me.
Okay, i've had a proper look at this, and the problem I have with the solution is that i'm missing between 16.8.7-0
& 17.0.1-3
. Now the obvious solution would be to add the different pieces in, but thats very cumbersome and I feel like maybe i'm missing a shortcut.
cc/ @lavrton was there an idea of how someone would reference your lib with the way you're doing the versioning?
The proposed fix in the PR looks good to me. Thanks for pinging me, I was not aware current versions may produce such issues. I will think about better solution from react-konva
side.