From 3093773f01e5ea6782c16d21172447ec3c2fb432 Mon Sep 17 00:00:00 2001 From: Johannes Stein Date: Fri, 4 Dec 2015 16:16:17 +0100 Subject: [PATCH 1/2] Check for hyphen According to SemVer a hyphen describes a pre-release version --- lib/run.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/run.js b/lib/run.js index 8e06123..48500b3 100644 --- a/lib/run.js +++ b/lib/run.js @@ -99,13 +99,10 @@ function run(config, done) { var wantedAndAlreadyInstalled = config.wanted && (info.updateTo === info.current); var isDependencyMissing = !info.current; var isUnstable = false; - var unstableStrings = ["alpha", "beta", "rc"]; - var counter; - for (counter = 0; counter < unstableStrings.length; counter++) { - if (info.updateTo && info.updateTo.indexOf(unstableStrings[counter]) !== -1) { - isUnstable = true; - } + // Check for hyphen in version string as this is a prerelease version according to SemVer + if (info.updateTo && info.updateTo.indexOf("-") !== -1) { + isUnstable = true; } return !(isGitDependeny || wantedAndAlreadyInstalled || isDependencyMissing || isUnstable); From ec82999fb1cc3bd82e4ea3bc2681504039af77e6 Mon Sep 17 00:00:00 2001 From: Johannes Stein Date: Fri, 4 Dec 2015 16:17:26 +0100 Subject: [PATCH 2/2] Fix typo --- test/run.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/run.js b/test/run.js index 5ca7b63..911884c 100644 --- a/test/run.js +++ b/test/run.js @@ -344,7 +344,7 @@ describe("run()", function () { }); describe("testing", function () { - describe("if outdated moudles were found", function () { + describe("if outdated modules were found", function () { before(setupOutdatedModules(outdatedModules)); afterEach(tearDown);