Socket
Socket
Sign inDemoInstall

gulp-bump

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.2 to 0.3.0

2

index.js

@@ -41,3 +41,3 @@ 'use strict';

// increment the key with type
content[opts.key] = semver.inc(content[opts.key], opts.type);
content[opts.key] = semver.inc(content[opts.key], opts.type, opts.preid);
ver = content[opts.key];

@@ -44,0 +44,0 @@ }

{
"name": "gulp-bump",
"description": "Bump npm versions with Gulp (gulpjs.com)",
"version": "0.2.2",
"version": "0.3.0",
"homepage": "http://github.com/stevelacy/gulp-bump",

@@ -11,4 +11,4 @@ "repository": "git://github.com/stevelacy/gulp-bump.git",

"dot-object": "^0.6.0",
"gulp-util": "^3.0.3",
"semver": "^4.3.0",
"gulp-util": "^3.0.4",
"semver": "^4.3.1",
"through2": "^0.5.1"

@@ -15,0 +15,0 @@ },

@@ -203,3 +203,15 @@ # gulp-bump

### options.preid
Set the prerelase tag to use
Type: `String`
Default: `null`
Example:
```js
bump({type: 'prerelease', preid : 'alphaWhateverTheYWant'});
// => '0.0.2-alphaWhateverTheYWant.0'
```
## Versioning

@@ -206,0 +218,0 @@ #### Versioning Used: [Semantic](http://semver.org/)

@@ -119,2 +119,38 @@ 'use strict';

});
it('should bump to a prerelease version with a preid', function(done) {
var fakeFile = new gutil.File({
contents: new Buffer('{ "version": "0.0.1"}'),
path: 'test/fixtures/test.json'
});
var bumpS = bump({type: 'prerelease', preid : 'alphaWhateverTheYWant'});
bumpS.once('data', function(newFile) {
should.exist(newFile);
should.exist(newFile.contents);
JSON.parse(newFile.contents.toString()).version.should.equal('0.0.2-alphaWhateverTheYWant.0');
return done();
});
bumpS.write(fakeFile);
bumpS.end();
});
it('should bump preid version', function(done) {
var fakeFile = new gutil.File({
contents: new Buffer('{ "version": "0.1.0-zeta.1"}'),
path: 'test/fixtures/test.json'
});
var bumpS = bump({type: 'prerelease', preid: 'zeta'});
bumpS.once('data', function(newFile) {
should.exist(newFile);
should.exist(newFile.contents);
JSON.parse(newFile.contents.toString()).version.should.equal('0.1.0-zeta.2');
return done();
});
bumpS.write(fakeFile);
bumpS.end();
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc