react-spring icon indicating copy to clipboard operation
react-spring copied to clipboard

Fix react-konva peerDependency

Open davbrito opened this issue 2 years ago • 9 comments

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: image

What

I added the version ^17.0.2-0 to the scheme so it could match for those versions: image

Checklist

  • [ ] Documentation updated
  • [ ] Demo added
  • [x] Ready to be merged

davbrito avatar Apr 25 '22 15:04 davbrito

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)

vercel[bot] avatar Apr 25 '22 15:04 vercel[bot]

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

codesandbox-ci[bot] avatar Apr 25 '22 17:04 codesandbox-ci[bot]

Would this break if react-konva used something like ^17.0.2-1? 🤔

joshuaellis avatar Apr 26 '22 07:04 joshuaellis

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.

davbrito avatar Apr 26 '22 11:04 davbrito

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?

joshuaellis avatar Apr 29 '22 07:04 joshuaellis

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

davbrito avatar Apr 29 '22 13:04 davbrito

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.

joshuaellis avatar Apr 29 '22 13:04 joshuaellis

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?

joshuaellis avatar May 04 '22 14:05 joshuaellis

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.

lavrton avatar May 04 '22 18:05 lavrton