From ed3386f04498fe44c085d71633e6d2877b2355a6 Mon Sep 17 00:00:00 2001 From: Brett Trotter Date: Tue, 10 Dec 2013 13:04:47 -0600 Subject: [PATCH 1/2] Update semver.compare to semver.compareLoose to tolerate grunt and other packages --- lib/storage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/storage.js b/lib/storage.js index 057ce9109..06714883a 100644 --- a/lib/storage.js +++ b/lib/storage.js @@ -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) } } } From 0b286d1fe3f101f3587c4df16dd50d661c382fa3 Mon Sep 17 00:00:00 2001 From: Brett Trotter Date: Tue, 10 Dec 2013 14:03:48 -0600 Subject: [PATCH 2/2] exit with appropriate status code --- test/start.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/start.sh b/test/start.sh index 9ad918076..011563d81 100755 --- a/test/start.sh +++ b/test/start.sh @@ -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