Comparing version 0.10.0 to 0.10.1
52
index.js
@@ -5,3 +5,2 @@ 'use strict'; | ||
var BufferStreams = require('bufferstreams'); | ||
var consolidate = require('consolidate'); | ||
@@ -14,2 +13,3 @@ var extend = require('node.extend'); | ||
var tryit = require('tryit'); | ||
var VinylBufferStream = require('vinyl-bufferstream'); | ||
@@ -40,10 +40,3 @@ var PLUGIN_NAME = 'gulp-wrap'; | ||
function gulpWrapTransform(file, enc, cb) { | ||
var self = this; | ||
if (file.isNull()) { | ||
cb(null, file); | ||
return; | ||
} | ||
return through.obj(function gulpWrapTransform(file, enc, cb) { | ||
function compile(contents, done) { | ||
@@ -85,34 +78,15 @@ // attempt to parse the file contents for JSON or YAML files | ||
if (file.isStream()) { | ||
file.contents = file.contents.pipe(new BufferStreams(function(none, buf, done) { | ||
compile(buf, function(err, contents) { | ||
process.nextTick(function() { | ||
if (err) { | ||
self.emit('error', err); | ||
done(err); | ||
} else { | ||
done(null, contents); | ||
self.push(file); | ||
} | ||
cb(); | ||
}); | ||
}); | ||
})); | ||
return; | ||
} | ||
var run = new VinylBufferStream(compile); | ||
var self = this; | ||
compile(file.contents, function(err, contents) { | ||
process.nextTick(function() { | ||
if (err) { | ||
self.emit('error', err); | ||
} else { | ||
file.contents = contents; | ||
self.push(file); | ||
} | ||
cb(); | ||
}); | ||
run(file, function(err, contents) { | ||
if (err) { | ||
self.emit('error', err); | ||
} else { | ||
file.contents = contents; | ||
self.push(file); | ||
} | ||
cb(); | ||
}); | ||
} | ||
return through.obj(gulpWrapTransform); | ||
}); | ||
}; |
{ | ||
"name": "gulp-wrap", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"description": "A gulp plugin to wrap the stream contents with a template.", | ||
@@ -11,2 +11,9 @@ "repository": "adamayres/gulp-wrap", | ||
}, | ||
"contributors": [ | ||
{ | ||
"name": "Shinnosuke Watanabe", | ||
"email": "snnskwtnb@gmail.com", | ||
"url": "https://github.com/shinnn" | ||
} | ||
], | ||
"licenses": [ | ||
@@ -37,3 +44,2 @@ { | ||
"dependencies": { | ||
"bufferstreams": "^0.0.2", | ||
"consolidate": "^0.10.0", | ||
@@ -47,6 +53,7 @@ "es6-promise": "^2.0.1", | ||
"through2": "^0.6.3", | ||
"tryit": "^1.0.1" | ||
"tryit": "^1.0.1", | ||
"vinyl-bufferstream": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^0.11.0", | ||
"eslint": "^0.12.0", | ||
"istanbul": "^0.3.5", | ||
@@ -53,0 +60,0 @@ "istanbul-coveralls": "^1.0.1", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
8996
74
+ Addedvinyl-bufferstream@^1.0.0
+ Addedbufferstreams@1.0.1(transitive)
+ Addedvinyl-bufferstream@1.0.1(transitive)
- Removedbufferstreams@^0.0.2
- Removedbufferstreams@0.0.2(transitive)