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); 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);