Comparing version 1.9.1 to 1.9.2
@@ -1,8 +0,14 @@ | ||
1.9.1 / 2012-05-07 | ||
1.9.2 / 2013-06-12 | ||
================== | ||
* refactor; move `streamToBuffer` to a separate module | ||
* fixed; .stream(format) without a callback | ||
1.9.1 / 2013-05-07 | ||
================== | ||
* fixed; gm().resize(width) always only resizes width | ||
* fixed; gm('img.gif').format() returns the format of the first frame | ||
1.9.0 / 2012-04-21 | ||
1.9.0 / 2013-04-21 | ||
================== | ||
@@ -9,0 +15,0 @@ |
@@ -12,2 +12,3 @@ | ||
var through = require('through'); | ||
var streamToBuffer = require('stream-to-buffer'); | ||
@@ -89,3 +90,6 @@ /** | ||
proto.stream = function stream (format, callback) { | ||
if (!callback) callback = format, format = null; | ||
if (!callback && typeof format === 'function') { | ||
callback = format; | ||
format = null; | ||
} | ||
@@ -135,3 +139,3 @@ var throughStream; | ||
utils.streamToBuffer(stdout, callback); | ||
streamToBuffer(stdout, callback); | ||
}) | ||
@@ -222,3 +226,3 @@ } | ||
utils.streamToBuffer(self.sourceStream, function (err, buffer) { | ||
streamToBuffer(self.sourceStream, function (err, buffer) { | ||
self.sourceBuffer = buffer; | ||
@@ -225,0 +229,0 @@ self.sourceStream = null; // The stream is now dead |
@@ -23,23 +23,2 @@ | ||
return arr; | ||
} | ||
exports.streamToBuffer = function (stream, callback) { | ||
var buffers = []; | ||
var done = false; | ||
stream.on('data', function (chunk) { | ||
buffers.push(chunk); | ||
}) | ||
stream.on('error', function (err) { | ||
done = true; | ||
callback(err); | ||
}) | ||
stream.on('end', function () { | ||
if (done) return; | ||
callback(null, Buffer.concat(buffers)); | ||
buffers = null; | ||
}) | ||
} |
{ "name": "gm" | ||
, "description": "GraphicsMagick for node.js" | ||
, "version": "1.9.1" | ||
, "version": "1.9.2" | ||
, "author": "Aaron Heckmann <aaron.heckmann+github@gmail.com>" | ||
@@ -24,4 +24,5 @@ , "keywords": ["graphics", "magick", "image", "graphicsmagick", "imagemagick", "gm", "convert", "identify", "compare"] | ||
"array-parallel": "~0.1.0", | ||
"through": "~2.3.1" | ||
"through": "~2.3.1", | ||
"stream-to-buffer": "~0.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
96952
5
1816
+ Addedstream-to-buffer@~0.0.1
+ Addedstream-to-buffer@0.0.1(transitive)