0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-16 21:56:25 -05:00

Merge branch 'master' of github.com:rlidwka/sinopia

This commit is contained in:
Alex Kocharin 2013-12-11 21:40:41 +04:00
commit bd7dde229a
2 changed files with 4 additions and 3 deletions

View file

@ -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)
}
}
}

View file

@ -5,5 +5,6 @@ PATH='../node_modules/.bin':$PATH
TESTDIR=$(dirname $0)
cd $TESTDIR
mocha -R list --ui exports ./tests.js ./no_proxy.js
TESTRES=$?
cd $CWD
exit $TESTRES