diff --git a/angular-semver-sort.js b/angular-semver-sort.js index e5a4447..5c145b4 100644 --- a/angular-semver-sort.js +++ b/angular-semver-sort.js @@ -361,6 +361,10 @@ SemVer.prototype.inc = function(release) { this.inc('pre'); break; case 'prepatch': + // If this is already a prerelease, it will bump to the next version + // drop any prereleases that might already exist, since they are not + // relevant at this point. + this.prerelease.length = 0 this.inc('patch'); this.inc('pre'); break; diff --git a/package.json b/package.json index 00de7bc..1078562 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "author": "Dominik Porada", "license": "BSD", "dependencies": { - "semver": "2.3.0" + "semver": "2.3.1" }, "devDependencies": { "karma": "~0.12.16",