Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRebecca Turner <me@re-becca.org>2017-03-24 21:28:07 +0300
committerRebecca Turner <me@re-becca.org>2017-03-25 01:13:42 +0300
commit245e25315524b95c0a71c980223a27719392ba75 (patch)
tree7ae1baeda15f59ddde85445ad953ff4ade63e1a8 /node_modules
parenteb3789fd18cfb063de9e6f80c3049e314993d235 (diff)
readable-stream@2.2.6
Remove WriteReq and CorkedRequest as they aren't in core yet. Credit: @mcollina
Diffstat (limited to 'node_modules')
-rw-r--r--node_modules/readable-stream/.travis.yml4
-rw-r--r--node_modules/readable-stream/README.md2
-rw-r--r--node_modules/readable-stream/lib/_stream_readable.js2
-rw-r--r--node_modules/readable-stream/lib/_stream_writable.js37
-rw-r--r--node_modules/readable-stream/package.json65
5 files changed, 40 insertions, 70 deletions
diff --git a/node_modules/readable-stream/.travis.yml b/node_modules/readable-stream/.travis.yml
index 84504c98f..76b4b0cfc 100644
--- a/node_modules/readable-stream/.travis.yml
+++ b/node_modules/readable-stream/.travis.yml
@@ -28,8 +28,8 @@ matrix:
env: TASK=test
- node_js: 6
env: TASK=test
- - node_js: 5
- env: TASK=browser BROWSER_NAME=android BROWSER_VERSION="4.0..latest"
+ - node_js: 7
+ env: TASK=test
- node_js: 5
env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest"
- node_js: 5
diff --git a/node_modules/readable-stream/README.md b/node_modules/readable-stream/README.md
index 6cc54caa8..ff75b0d79 100644
--- a/node_modules/readable-stream/README.md
+++ b/node_modules/readable-stream/README.md
@@ -18,7 +18,7 @@ npm install --save readable-stream
This package is a mirror of the Streams2 and Streams3 implementations in
Node-core.
-Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v7.3.0/docs/api/).
+Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v7.7.3/docs/api/).
If you want to guarantee a stable streams base, regardless of what version of
Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).
diff --git a/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/readable-stream/lib/_stream_readable.js
index 3a7d42d62..13b5a7474 100644
--- a/node_modules/readable-stream/lib/_stream_readable.js
+++ b/node_modules/readable-stream/lib/_stream_readable.js
@@ -92,7 +92,7 @@ function ReadableState(options, stream) {
this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
// cast to ints.
- this.highWaterMark = ~ ~this.highWaterMark;
+ this.highWaterMark = ~~this.highWaterMark;
// A linked list is used to store data chunks instead of an array because the
// linked list can remove elements from the beginning faster than
diff --git a/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/readable-stream/lib/_stream_writable.js
index 4d9c62ba6..575beb3c4 100644
--- a/node_modules/readable-stream/lib/_stream_writable.js
+++ b/node_modules/readable-stream/lib/_stream_writable.js
@@ -77,7 +77,7 @@ function WritableState(options, stream) {
this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm;
// cast to ints.
- this.highWaterMark = ~ ~this.highWaterMark;
+ this.highWaterMark = ~~this.highWaterMark;
// drain event flag.
this.needDrain = false;
@@ -232,20 +232,16 @@ function writeAfterEnd(stream, cb) {
processNextTick(cb, er);
}
-// If we get something that is not a buffer, string, null, or undefined,
-// and we're not in objectMode, then that's an error.
-// Otherwise stream chunks are all considered to be of length=1, and the
-// watermarks determine how many objects to keep in the buffer, rather than
-// how many bytes or characters.
+// Checks that a user-supplied chunk is valid, especially for the particular
+// mode the stream is in. Currently this means that `null` is never accepted
+// and undefined/non-string values are only allowed in object mode.
function validChunk(stream, state, chunk, cb) {
var valid = true;
var er = false;
- // Always throw error if a null is written
- // if we are not in object mode then throw
- // if it is not a buffer, string, or undefined.
+
if (chunk === null) {
er = new TypeError('May not write null values to stream');
- } else if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
+ } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
er = new TypeError('Invalid non-string/buffer chunk');
}
if (er) {
@@ -259,19 +255,20 @@ function validChunk(stream, state, chunk, cb) {
Writable.prototype.write = function (chunk, encoding, cb) {
var state = this._writableState;
var ret = false;
+ var isBuf = Buffer.isBuffer(chunk);
if (typeof encoding === 'function') {
cb = encoding;
encoding = null;
}
- if (Buffer.isBuffer(chunk)) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
+ if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
if (typeof cb !== 'function') cb = nop;
- if (state.ended) writeAfterEnd(this, cb);else if (validChunk(this, state, chunk, cb)) {
+ if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
state.pendingcb++;
- ret = writeOrBuffer(this, state, chunk, encoding, cb);
+ ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
}
return ret;
@@ -311,10 +308,11 @@ function decodeChunk(state, chunk, encoding) {
// if we're already writing something, then just put this
// in the queue, and wait our turn. Otherwise, call _write
// If we return false, then we need a drain event, so set that flag.
-function writeOrBuffer(stream, state, chunk, encoding, cb) {
- chunk = decodeChunk(state, chunk, encoding);
-
- if (Buffer.isBuffer(chunk)) encoding = 'buffer';
+function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
+ if (!isBuf) {
+ chunk = decodeChunk(state, chunk, encoding);
+ if (Buffer.isBuffer(chunk)) encoding = 'buffer';
+ }
var len = state.objectMode ? 1 : chunk.length;
state.length += len;
@@ -383,8 +381,8 @@ function onwrite(stream, er) {
asyncWrite(afterWrite, stream, state, finished, cb);
/*</replacement>*/
} else {
- afterWrite(stream, state, finished, cb);
- }
+ afterWrite(stream, state, finished, cb);
+ }
}
}
@@ -535,7 +533,6 @@ function CorkedRequest(state) {
this.next = null;
this.entry = null;
-
this.finish = function (err) {
var entry = _this.entry;
_this.entry = null;
diff --git a/node_modules/readable-stream/package.json b/node_modules/readable-stream/package.json
index ae1b6a85d..6413787ed 100644
--- a/node_modules/readable-stream/package.json
+++ b/node_modules/readable-stream/package.json
@@ -2,39 +2,29 @@
"_args": [
[
{
- "raw": "readable-stream@2.2.3",
+ "raw": "readable-stream@2.2.6",
"scope": null,
"escapedName": "readable-stream",
"name": "readable-stream",
- "rawSpec": "2.2.3",
- "spec": "2.2.3",
+ "rawSpec": "2.2.6",
+ "spec": "2.2.6",
"type": "version"
},
"/Users/rebecca/code/npm"
]
],
- "_from": "readable-stream@2.2.3",
- "_id": "readable-stream@2.2.3",
- "_inCache": true,
+ "_from": "readable-stream@2.2.6",
+ "_hasShrinkwrap": false,
+ "_id": "readable-stream@2.2.6",
"_location": "/readable-stream",
- "_nodeVersion": "6.9.2",
- "_npmOperationalInternal": {
- "host": "packages-18-east.internal.npmjs.com",
- "tmp": "tmp/readable-stream-2.2.3.tgz_1487688066228_0.35690787457861006"
- },
- "_npmUser": {
- "name": "cwmma",
- "email": "calvin.metcalf@gmail.com"
- },
- "_npmVersion": "4.0.5",
"_phantomChildren": {},
"_requested": {
- "raw": "readable-stream@2.2.3",
+ "raw": "readable-stream@2.2.6",
"scope": null,
"escapedName": "readable-stream",
"name": "readable-stream",
- "rawSpec": "2.2.3",
- "spec": "2.2.3",
+ "rawSpec": "2.2.6",
+ "spec": "2.2.6",
"type": "version"
},
"_requiredBy": [
@@ -47,17 +37,18 @@
"/mississippi/from2",
"/mississippi/parallel-transform",
"/mississippi/through2",
+ "/npm-registry-client/concat-stream",
"/npmlog/are-we-there-yet",
"/sha",
+ "/standard/eslint/concat-stream",
"/tap",
"/tap/tap-mocha-reporter",
- "/tap/tap-mocha-reporter/tap-parser",
"/tap/tap-parser"
],
- "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.3.tgz",
- "_shasum": "9cf49463985df016c8ae8813097a9293a9b33729",
+ "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.6.tgz",
+ "_shasum": "8b43aed76e71483938d12a8d46c6cf1a00b1f816",
"_shrinkwrap": null,
- "_spec": "readable-stream@2.2.3",
+ "_spec": "readable-stream@2.2.6",
"_where": "/Users/rebecca/code/npm",
"browser": {
"util": false
@@ -86,10 +77,9 @@
},
"directories": {},
"dist": {
- "shasum": "9cf49463985df016c8ae8813097a9293a9b33729",
- "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.3.tgz"
+ "shasum": "8b43aed76e71483938d12a8d46c6cf1a00b1f816",
+ "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.6.tgz"
},
- "gitHead": "4dbe6e20051e44025d3cbec3ed9603483d8b27cb",
"homepage": "https://github.com/nodejs/readable-stream#readme",
"keywords": [
"readable",
@@ -98,24 +88,6 @@
],
"license": "MIT",
"main": "readable.js",
- "maintainers": [
- {
- "name": "isaacs",
- "email": "isaacs@npmjs.com"
- },
- {
- "name": "tootallnate",
- "email": "nathan@tootallnate.net"
- },
- {
- "name": "rvagg",
- "email": "rod@vagg.org"
- },
- {
- "name": "cwmma",
- "email": "calvin.metcalf@gmail.com"
- }
- ],
"name": "readable-stream",
"nyc": {
"include": [
@@ -126,7 +98,8 @@
"react-native": {
"stream": false
},
- "readme": "ERROR: No README data found!",
+ "readme": "# readable-stream\n\n***Node-core v7.0.0 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream)\n\n\n[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/)\n[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/)\n\n\n[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream)\n\n```bash\nnpm install --save readable-stream\n```\n\n***Node-core streams for userland***\n\nThis package is a mirror of the Streams2 and Streams3 implementations in\nNode-core.\n\nFull documentation may be found on the [Node.js website](https://nodejs.org/dist/v7.7.3/docs/api/).\n\nIf you want to guarantee a stable streams base, regardless of what version of\nNode you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *\"stream\"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html).\n\nAs of version 2.0.0 **readable-stream** uses semantic versioning.\n\n# Streams Working Group\n\n`readable-stream` is maintained by the Streams Working Group, which\noversees the development and maintenance of the Streams API within\nNode.js. The responsibilities of the Streams Working Group include:\n\n* Addressing stream issues on the Node.js issue tracker.\n* Authoring and editing stream documentation within the Node.js project.\n* Reviewing changes to stream subclasses within the Node.js project.\n* Redirecting changes to streams from the Node.js project to this\n project.\n* Assisting in the implementation of stream providers within Node.js.\n* Recommending versions of `readable-stream` to be included in Node.js.\n* Messaging about the future of streams to give the community advance\n notice of changes.\n\n<a name=\"members\"></a>\n## Team Members\n\n* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) &lt;christopher.s.dickinson@gmail.com&gt;\n - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B\n* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) &lt;calvin.metcalf@gmail.com&gt;\n - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242\n* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) &lt;rod@vagg.org&gt;\n - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D\n* **Sam Newman** ([@sonewman](https://github.com/sonewman)) &lt;newmansam@outlook.com&gt;\n* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) &lt;mathiasbuus@gmail.com&gt;\n* **Domenic Denicola** ([@domenic](https://github.com/domenic)) &lt;d@domenic.me&gt;\n* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) &lt;matteo.collina@gmail.com&gt;\n - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E\n",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/nodejs/readable-stream.git"
@@ -139,5 +112,5 @@
"test": "tap test/parallel/*.js test/ours/*.js",
"write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml"
},
- "version": "2.2.3"
+ "version": "2.2.6"
}