Comments (7)
I published 1.0.10
with React >=15.0.0 <15.4.0
range.
And 1.1.0
with React ~15.4.0
range.
And for future safety you have to find a way not to depend on React internals.
Unfortunately, I don't know any possible implementations without using React internals.
Please reopen if I missed something.
from react-konva.
In fact it was even in patch version which is assumed only for bugfixes.
from react-konva.
I am not sure how semantic version works for that case. I wasn't able to google an answer. Please post a link if you can find.
The thing is - public API of react-konva
itself didn't change.
So if you update react-konva
AND react
you will have backwards compatible
change.
from react-konva.
Real life projects often use ~
to define dependency ranges in projects to minify chance of breaking a build, because minor version upgrades often could bring new bugs with new features.
So our build system got new patch update of react-konva
, but react
is still locked to 15.3.x.
Upgrading react
to 15.4.0 requires special intention and testing.
Returning to peer dependency. It also can be treated as public API since it defines compatibility range. BTW you should define it as wide as possible to avoid issues with other libs that also defines same peer. I don't think that 1.0.9 introduced somth that couldn't work with react less 15.4.0.
So if you really need to shrink peer dep range support please consider do it at least with minor version. But it's better solution to extend this range as much as possible.
Semver maybe not cover exactly this question since it just general common sense rules. But I hope I have argued enough. Still will try find some links later.
from react-konva.
Thre is a note about updating dependency on semver FAQ:
What should I do if I update my own dependencies without changing the public API?
That would be considered compatible since it does not affect the public API. Software that explicitly depends on the same dependencies as your package should have their own dependency specifications and the author will notice any conflicts. Determining whether the change is a patch level or minor level modification depends on whether you updated your dependencies in order to fix a bug or introduce new functionality. I would usually expect additional code for the latter instance, in which case it’s obviously a minor level increment.
http://semver.org/#what-should-i-do-if-i-update-my-own-dependencies-without-changing-the-public-api
It's not exactly same situation, but at least it suggests to have minor increment.
I would still suggest to publish patch version increment (1.0.10) with extended range of react. I am pretty sure that there is nothing that avoids using react-konva
with react@^15.0.0
range,
from react-konva.
@Guria I can't extend the range of react versions. You can see change here: d4837af#diff-1f10719214e0d5e2a72f54b98f667499
from react-konva.
Ouch. Have you read release blogpost?
However, there is a possibility that you imported private APIs from react/lib/*, or that a package you rely on might use them. We would like to remind you that this was never supported, and that your apps should not rely on internal APIs. The React internals will keep changing as we work to make React better.
Anyway it was mistake to release this breaking change in patch version. Semver suggests a fix for such situations:
What do I do if I accidentally release a backwards incompatible change as a minor version?
As soon as you realize that you’ve broken the Semantic Versioning spec, fix the problem and release a new minor version that corrects the problem and restores backwards compatibility. Even under this circumstance, it is unacceptable to modify versioned releases. If it’s appropriate, document the offending version and inform your users of the problem so that they are aware of the offending version.
But in your case it means we need 1.0.10 which will be the same as 1.0.8 with range of react >15.0.0 <15.4.0. And then release 1.1.0 or even 2.0.0 with ~15.4.0 range.
And for future safety you have to find a way not to depend on React internals.
from react-konva.
Related Issues (20)
- Uncaught TypeError: getImage.crop is not a function
- Shapes with opacity do not correctly apply layer pixelRatio and can appear blurry on zoom in HOT 4
- NextJS: Module not found: Can't resolve 'canvas' HOT 2
- Issue with RTL Text
- Facing the issue now with Next.js 14: HOT 5
- OnTouchStart does not contain touches HOT 1
- getRelativePointerPosition has an offset on x when going fullscreen
- Asynchronous drawing will exceed the cropping area HOT 4
- Free drawing performance HOT 6
- Transformer is not reusable HOT 2
- Coordinates not working correctly after zoom in/out or drag of stage HOT 1
- If I want to erase only the lines drawn with a pen, how can I do that? HOT 2
- Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. HOT 1
- Arrow Drag and Transform using anchors not working HOT 4
- load data to stage HOT 1
- Positioning issue with transformer using keepRatio prop set to false HOT 1
- Breaking changes in React experimental branch
- TypeScript : `'cornerRadius'` does not exist on type `Shape<RectConfig>` HOT 1
- Trouble with Drag-and-Drop on Mobile Devices in React (with react-konva) HOT 1
- g
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-konva.