diff --git a/package.json b/package.json index 87d1531..41591a6 100644 --- a/package.json +++ b/package.json @@ -7,16 +7,16 @@ "author": "Steve Lacy (http://slacy.me)", "main": "./index.js", "dependencies": { - "bump-regex": "^2.2.0", + "bump-regex": "^2.3.0", "plugin-error": "^0.1.2", "plugin-log": "^0.1.0", - "semver": "^5.0.3", + "semver": "^5.3.0", "through2": "^2.0.1" }, "devDependencies": { "mocha": "*", "should": "*", - "vinyl": "^1.1.1" + "vinyl": "^1.2.0" }, "scripts": { "test": "mocha --reporter spec" diff --git a/test/index.js b/test/index.js index 264f207..f6023d1 100644 --- a/test/index.js +++ b/test/index.js @@ -135,6 +135,23 @@ describe('gulp-bump: JSON comparison fixtures', function() { bumpS.end(); }); + it('should update prerelease tags without a version', function(done) { + var fakeFile = new File({ + contents: new Buffer('{ "version": "0.1.0-zeta"}'), + path: 'test/fixtures/test.json' + }); + + var bumpS = bump({type: 'patch'}); + + bumpS.once('data', function(newFile) { + should.exist(newFile); + JSON.parse(newFile.contents.toString()).version.should.equal('0.1.0'); + return done(); + }); + bumpS.write(fakeFile); + bumpS.end(); + }); + it('should return bumpData', function(done) { var fakeFile = new File({ contents: new Buffer('{ "version": "0.1.0-zeta.1"}'),