mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
Update semver.compare to semver.compareLoose to tolerate grunt and other packages
This commit is contained in:
parent
f05a4784fd
commit
ed3386f044
1 changed files with 2 additions and 2 deletions
|
@ -469,7 +469,7 @@ Storage.prototype.get_package = function(name, options, callback) {
|
|||
if (!~whitelist.indexOf(i)) delete result[i]
|
||||
}
|
||||
|
||||
result['dist-tags'].latest = Object.keys(result.versions).sort(semver.compare)
|
||||
result['dist-tags'].latest = Object.keys(result.versions).sort(semver.compareLoose)
|
||||
for (var i in result['dist-tags']) {
|
||||
if (Array.isArray(result['dist-tags'][i])) {
|
||||
result['dist-tags'][i] = result['dist-tags'][i][result['dist-tags'][i].length-1]
|
||||
|
@ -508,7 +508,7 @@ Storage._merge_versions = function(local, up) {
|
|||
}
|
||||
if (local['dist-tags'][i].indexOf(up['dist-tags'][i]) === -1) {
|
||||
local['dist-tags'][i].push(up['dist-tags'][i])
|
||||
local['dist-tags'][i].sort(semver.compare)
|
||||
local['dist-tags'][i].sort(semver.compareLoose)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue