mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-06 22:40:26 -05:00
Merge branch 'master' of github.com:rlidwka/sinopia
This commit is contained in:
commit
bd7dde229a
2 changed files with 4 additions and 3 deletions
|
@ -469,7 +469,7 @@ Storage.prototype.get_package = function(name, options, callback) {
|
||||||
if (!~whitelist.indexOf(i)) delete result[i]
|
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']) {
|
for (var i in result['dist-tags']) {
|
||||||
if (Array.isArray(result['dist-tags'][i])) {
|
if (Array.isArray(result['dist-tags'][i])) {
|
||||||
result['dist-tags'][i] = result['dist-tags'][i][result['dist-tags'][i].length-1]
|
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) {
|
if (local['dist-tags'][i].indexOf(up['dist-tags'][i]) === -1) {
|
||||||
local['dist-tags'][i].push(up['dist-tags'][i])
|
local['dist-tags'][i].push(up['dist-tags'][i])
|
||||||
local['dist-tags'][i].sort(semver.compare)
|
local['dist-tags'][i].sort(semver.compareLoose)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,5 +5,6 @@ PATH='../node_modules/.bin':$PATH
|
||||||
TESTDIR=$(dirname $0)
|
TESTDIR=$(dirname $0)
|
||||||
cd $TESTDIR
|
cd $TESTDIR
|
||||||
mocha -R list --ui exports ./tests.js ./no_proxy.js
|
mocha -R list --ui exports ./tests.js ./no_proxy.js
|
||||||
|
TESTRES=$?
|
||||||
cd $CWD
|
cd $CWD
|
||||||
|
exit $TESTRES
|
||||||
|
|
Loading…
Reference in a new issue