-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Yarn installs bad package version if dash in version number #1304
Comments
The difference in behavior is probably something to look into but keep in mind that |
Pre-release versions have a lower precedence than the associated normal version [1]. Considering semver spec, I would say that Yarn is right and NPM wrong(?) if it installs the pre-release version. node-semver (the one used by npm) is even a bit more restrictive [2]: both, a greater pre-release |
We don't mean yarn/npm are good or bad. We just try to replace npm with yarn and report problems been found. PS. Also package author was asked to use pure semver without dashes in patch numbers. |
I think it's related to npm/npm#13248 and tagging pre-release versions as latest in the registry when publishing. NPM is installing the latest version specified in the registry and not the latest semver (stable) version. If you run
and when you
|
@Kirill89 This is exactly how node-semver works. If you believe that it should work in another way, you should raise this issue there. |
If package.json looks like this:
yarn installs bootstrap-multiselect of version
0.9.13
instead of0.9.13-1
.But if i try to remove
^
from version, yarn works fine.With npm 3.10.8 both cases works fine.
On mac os x 10.11.6, node v6.8.0.
The text was updated successfully, but these errors were encountered: