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
a11da1545a
commit
fc99692219
1 changed files with 2 additions and 2 deletions
|
@ -467,7 +467,7 @@ Storage.prototype.get_package = function(name, 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]
|
||||
|
@ -505,7 +505,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