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.1.13 to 0.2.0

examples/sublevel.json

14

examples/gulpfile.js

@@ -19,3 +19,15 @@ var gulp = require('gulp');

gulp.task('patch', function(){
gulp.src('./package.json')
.pipe(bump())
.pipe(gulp.dest('./build'));
});
gulp.task('default', ['bump']);
gulp.task('sublevel', function(){
gulp.src('./sublevel.json')
.pipe(bump({key: 'subversion.version'}))
.pipe(gulp.dest('./build'));
});
gulp.task('default', ['bump']);

2

examples/package.json
{
"name": "gulp-bump",
"description": "Bump npm versions with Gulp (gulpjs.com)",
"version": "0.1.0",
"version": "0.1.9",
"homepage": "http://github.com/stevelacy/gulp-bump",

@@ -6,0 +6,0 @@ "repository": "git://github.com/stevelacy/gulp-bump.git",

var gutil = require('gulp-util');
var through = require('through2');
var semver = require('semver');
var Dot = require('dot-object');

@@ -41,3 +42,3 @@ var setDefaultOptions = function(opts) {

var content, json;
var content, json, ver;

@@ -66,2 +67,3 @@ return through.obj(function(file, enc, cb) {

content[key] = version;
ver = content[key];
}

@@ -71,3 +73,10 @@ else if (semver.valid(content[key])) {

content[key] = semver.inc(content[key], type);
ver = content[key];
}
else if (key.indexOf('.') > -1) {
var dot = new Dot();
var value = dot.pick(key, content);
ver = semver.inc(value, type);
dot.str(key, ver, content);
}
else {

@@ -78,5 +87,5 @@ return cb(new gutil.PluginError('gulp-bump', 'Detected invalid semver ' + key, {fileName: file.path, showStack: false}));

gutil.log('Bumped ' + gutil.colors.magenta(key) + ' to: ' + gutil.colors.cyan(content[key]));
gutil.log('Bumped ' + gutil.colors.magenta(key) + ' to: ' + gutil.colors.cyan(ver));
cb(null, file);
});
};
{
"name": "gulp-bump",
"description": "Bump npm versions with Gulp (gulpjs.com)",
"version": "0.1.13",
"version": "0.2.0",
"homepage": "http://github.com/stevelacy/gulp-bump",

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

"dependencies": {
"gulp-util": "^3.0.1",
"semver": "^2.3.2",
"dot-object": "^0.6.0",
"gulp-util": "^3.0.3",
"semver": "^4.3.0",
"through2": "^0.5.1"

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

Sorry, the diff of this file is not supported yet

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