Closed mydea closed 6 years ago
Node/npm/yarn/etc. treat version numbers with leading zeroes (e.g. 0.x.y
or 0.0.z
) in a special way when dealing with ^
and ~
version ranges. Basically, incrementing the first nonzero segment indicates a potentially breaking change in a library. In ember-tether, for example, they dropped support for all versions of Ember before 2.4 when they released version 0.4.0.
This means ~0.4.1
is equivalent to >=0.4.1 <0.5.0
, and ^0.3.1
is equivalent to >=0.3.1 <0.4.0
, so there's no version of ember-tether that can satisfy both. You're winding up with two different versions in your dependency tree, and dependency-lint is letting you know that that happened. If you test your app and you're comfortable with the conflict, you can tell dependency-lint to ignore it.
You can check out the node-semver
documentation and this interactive semver calculator for more details on how version ranges work. 🙂
Ah, got it. Good to know - I wasn't aware of that. Thanks for the quick answer and the great work on this addon :)
I just started using ember-cli-dependency-lint, and I really like the idea (as it has happend to me before that my app broke due to differing dependency versions).
However, it seems to not correctly handle version ranges for me.
E.g. my app has the following dependency:
"ember-tether": "~0.4.1"
while another dependency had
"ember-tether": "^0.3.1"
specified. This resulted in an error. Shouldn't that be allowed?