Comparing version 2.0.0 to 2.0.1
@@ -0,1 +1,6 @@ | ||
2.0.1 / 2015-05-10 | ||
================== | ||
* Fix a false-positive when unpiping in Node.js 0.8 | ||
2.0.0 / 2015-05-08 | ||
@@ -2,0 +7,0 @@ ================== |
21
index.js
@@ -126,2 +126,19 @@ /*! | ||
/** | ||
* Determine if there are Node.js pipe-like data listeners. | ||
*/ | ||
/* istanbul ignore next: implementation differs between versions */ | ||
function hasPipeDataListeners(stream) { | ||
var listeners = stream.listeners('data') | ||
for (var i = 0; i < listeners.length; i++) { | ||
if (listeners[i].name === 'ondata') { | ||
return true | ||
} | ||
} | ||
return false | ||
} | ||
/** | ||
* Make a serializable error object. | ||
@@ -311,2 +328,6 @@ * | ||
// Node.js 0.8 hack | ||
if (!hasPipeDataListeners(stream)) { | ||
return | ||
} | ||
var listener | ||
@@ -313,0 +334,0 @@ var listeners = stream.listeners('close') |
{ | ||
"name": "raw-body", | ||
"description": "Get and validate the raw body of a readable stream.", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)", | ||
@@ -24,3 +24,3 @@ "contributors": [ | ||
"engines": { | ||
"node": ">= 0.8.0" | ||
"node": ">= 0.8" | ||
}, | ||
@@ -34,6 +34,6 @@ "files": [ | ||
"scripts": { | ||
"test": "mocha --reporter spec --bail test/", | ||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot test/", | ||
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec test/" | ||
"test": "mocha --trace-deprecation --reporter spec --bail --check-leaks test/", | ||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --trace-deprecation --reporter dot --check-leaks test/", | ||
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --trace-deprecation --reporter spec --check-leaks test/" | ||
} | ||
} |
@@ -5,2 +5,3 @@ # raw-body | ||
[![NPM Downloads][downloads-image]][downloads-url] | ||
[![Node.js Version][node-version-image]][node-version-url] | ||
[![Build status][travis-image]][travis-url] | ||
@@ -119,2 +120,4 @@ [![Test coverage][coveralls-image]][coveralls-url] | ||
[npm-url]: https://npmjs.org/package/raw-body | ||
[node-version-image]: https://img.shields.io/node/v/raw-body.svg | ||
[node-version-url]: http://nodejs.org/download/ | ||
[travis-image]: https://img.shields.io/travis/stream-utils/raw-body/master.svg | ||
@@ -121,0 +124,0 @@ [travis-url]: https://travis-ci.org/stream-utils/raw-body |
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
16099
286
127
0