diff options
author | Kat Marchán <kzm@sykosomatic.org> | 2017-06-05 21:17:34 +0300 |
---|---|---|
committer | Kat Marchán <kzm@sykosomatic.org> | 2017-06-06 00:20:51 +0300 |
commit | 6e12a5cc022cb5a157a37df7283b6d7b3d49bdab (patch) | |
tree | bf48d3b7bf1e1ad936936e113e72b594a55cd6f0 /node_modules/readable-stream | |
parent | 0b9fc56a8e451003a613f75b166cfacc49e2d9a9 (diff) |
deps: bump cacache, pacote, ssri, readable-stream, safe-buffer
Diffstat (limited to 'node_modules/readable-stream')
13 files changed, 68 insertions, 262 deletions
diff --git a/node_modules/readable-stream/.travis.yml b/node_modules/readable-stream/.travis.yml index 76b4b0cfc..0c5d2bc26 100644 --- a/node_modules/readable-stream/.travis.yml +++ b/node_modules/readable-stream/.travis.yml @@ -2,26 +2,40 @@ sudo: false language: node_js before_install: - npm install -g npm@2 - - npm install -g npm + - test $NPM_LEGACY && npm install -g npm@latest-3 || npm install npm -g notifications: email: false matrix: fast_finish: true include: - node_js: '0.8' - env: TASK=test + env: + - TASK=test + - NPM_LEGACY=true - node_js: '0.10' - env: TASK=test + env: + - TASK=test + - NPM_LEGACY=true - node_js: '0.11' - env: TASK=test + env: + - TASK=test + - NPM_LEGACY=true - node_js: '0.12' - env: TASK=test + env: + - TASK=test + - NPM_LEGACY=true - node_js: 1 - env: TASK=test + env: + - TASK=test + - NPM_LEGACY=true - node_js: 2 - env: TASK=test + env: + - TASK=test + - NPM_LEGACY=true - node_js: 3 - env: TASK=test + env: + - TASK=test + - NPM_LEGACY=true - node_js: 4 env: TASK=test - node_js: 5 @@ -30,17 +44,19 @@ matrix: env: TASK=test - node_js: 7 env: TASK=test - - node_js: 5 + - node_js: 8 + env: TASK=test + - node_js: 6 env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest" - - node_js: 5 + - node_js: 6 env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest" - - node_js: 5 + - node_js: 6 env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="-3..latest" - - node_js: 5 + - node_js: 6 env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="-3..latest" - - node_js: 5 + - node_js: 6 env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest" - - node_js: 5 + - node_js: 6 env: TASK=browser BROWSER_NAME=microsoftedge BROWSER_VERSION=latest script: "npm run $TASK" env: diff --git a/node_modules/readable-stream/README.md b/node_modules/readable-stream/README.md index 8b6e5d39b..3024d77c6 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.8.0/docs/api/). +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v7.10.0/docs/api/stream.html). 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 b19b2088b..a01012e3c 100644 --- a/node_modules/readable-stream/lib/_stream_readable.js +++ b/node_modules/readable-stream/lib/_stream_readable.js @@ -28,9 +28,8 @@ var EElistenerCount = function (emitter, type) { var Stream = require('./internal/streams/stream'); /*</replacement>*/ -var Buffer = require('buffer').Buffer; /*<replacement>*/ -var bufferShim = require('buffer-shims'); +var Buffer = require('safe-buffer').Buffer; /*</replacement>*/ /*<replacement>*/ @@ -163,7 +162,7 @@ Readable.prototype.push = function (chunk, encoding) { if (!state.objectMode && typeof chunk === 'string') { encoding = encoding || state.defaultEncoding; if (encoding !== state.encoding) { - chunk = bufferShim.from(chunk, encoding); + chunk = Buffer.from(chunk, encoding); encoding = ''; } } @@ -483,7 +482,7 @@ Readable.prototype.pipe = function (dest, pipeOpts) { var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; - var endFn = doEnd ? onend : cleanup; + var endFn = doEnd ? onend : unpipe; if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn); dest.on('unpipe', onunpipe); @@ -516,7 +515,7 @@ Readable.prototype.pipe = function (dest, pipeOpts) { dest.removeListener('error', onerror); dest.removeListener('unpipe', onunpipe); src.removeListener('end', onend); - src.removeListener('end', cleanup); + src.removeListener('end', unpipe); src.removeListener('data', ondata); cleanedUp = true; @@ -873,7 +872,7 @@ function copyFromBufferString(n, list) { // This function is designed to be inlinable, so please take care when making // changes to the function body. function copyFromBuffer(n, list) { - var ret = bufferShim.allocUnsafe(n); + var ret = Buffer.allocUnsafe(n); var p = list.head; var c = 1; p.data.copy(ret); diff --git a/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/readable-stream/lib/_stream_writable.js index 15db03868..e9701f500 100644 --- a/node_modules/readable-stream/lib/_stream_writable.js +++ b/node_modules/readable-stream/lib/_stream_writable.js @@ -35,9 +35,8 @@ var internalUtil = { var Stream = require('./internal/streams/stream'); /*</replacement>*/ -var Buffer = require('buffer').Buffer; /*<replacement>*/ -var bufferShim = require('buffer-shims'); +var Buffer = require('safe-buffer').Buffer; /*</replacement>*/ util.inherits(Writable, Stream); @@ -293,7 +292,7 @@ Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { function decodeChunk(state, chunk, encoding) { if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { - chunk = bufferShim.from(chunk, encoding); + chunk = Buffer.from(chunk, encoding); } return chunk; } diff --git a/node_modules/readable-stream/lib/internal/streams/BufferList.js b/node_modules/readable-stream/lib/internal/streams/BufferList.js index e4bfcf02d..82598c852 100644 --- a/node_modules/readable-stream/lib/internal/streams/BufferList.js +++ b/node_modules/readable-stream/lib/internal/streams/BufferList.js @@ -1,8 +1,8 @@ 'use strict'; -var Buffer = require('buffer').Buffer; /*<replacement>*/ -var bufferShim = require('buffer-shims'); + +var Buffer = require('safe-buffer').Buffer; /*</replacement>*/ module.exports = BufferList; @@ -50,9 +50,9 @@ BufferList.prototype.join = function (s) { }; BufferList.prototype.concat = function (n) { - if (this.length === 0) return bufferShim.alloc(0); + if (this.length === 0) return Buffer.alloc(0); if (this.length === 1) return this.head.data; - var ret = bufferShim.allocUnsafe(n >>> 0); + var ret = Buffer.allocUnsafe(n >>> 0); var p = this.head; var i = 0; while (p) { diff --git a/node_modules/readable-stream/node_modules/buffer-shims/index.js b/node_modules/readable-stream/node_modules/buffer-shims/index.js deleted file mode 100644 index 1cab4c05e..000000000 --- a/node_modules/readable-stream/node_modules/buffer-shims/index.js +++ /dev/null @@ -1,108 +0,0 @@ -'use strict'; - -var buffer = require('buffer'); -var Buffer = buffer.Buffer; -var SlowBuffer = buffer.SlowBuffer; -var MAX_LEN = buffer.kMaxLength || 2147483647; -exports.alloc = function alloc(size, fill, encoding) { - if (typeof Buffer.alloc === 'function') { - return Buffer.alloc(size, fill, encoding); - } - if (typeof encoding === 'number') { - throw new TypeError('encoding must not be number'); - } - if (typeof size !== 'number') { - throw new TypeError('size must be a number'); - } - if (size > MAX_LEN) { - throw new RangeError('size is too large'); - } - var enc = encoding; - var _fill = fill; - if (_fill === undefined) { - enc = undefined; - _fill = 0; - } - var buf = new Buffer(size); - if (typeof _fill === 'string') { - var fillBuf = new Buffer(_fill, enc); - var flen = fillBuf.length; - var i = -1; - while (++i < size) { - buf[i] = fillBuf[i % flen]; - } - } else { - buf.fill(_fill); - } - return buf; -} -exports.allocUnsafe = function allocUnsafe(size) { - if (typeof Buffer.allocUnsafe === 'function') { - return Buffer.allocUnsafe(size); - } - if (typeof size !== 'number') { - throw new TypeError('size must be a number'); - } - if (size > MAX_LEN) { - throw new RangeError('size is too large'); - } - return new Buffer(size); -} -exports.from = function from(value, encodingOrOffset, length) { - if (typeof Buffer.from === 'function' && (!global.Uint8Array || Uint8Array.from !== Buffer.from)) { - return Buffer.from(value, encodingOrOffset, length); - } - if (typeof value === 'number') { - throw new TypeError('"value" argument must not be a number'); - } - if (typeof value === 'string') { - return new Buffer(value, encodingOrOffset); - } - if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) { - var offset = encodingOrOffset; - if (arguments.length === 1) { - return new Buffer(value); - } - if (typeof offset === 'undefined') { - offset = 0; - } - var len = length; - if (typeof len === 'undefined') { - len = value.byteLength - offset; - } - if (offset >= value.byteLength) { - throw new RangeError('\'offset\' is out of bounds'); - } - if (len > value.byteLength - offset) { - throw new RangeError('\'length\' is out of bounds'); - } - return new Buffer(value.slice(offset, offset + len)); - } - if (Buffer.isBuffer(value)) { - var out = new Buffer(value.length); - value.copy(out, 0, 0, value.length); - return out; - } - if (value) { - if (Array.isArray(value) || (typeof ArrayBuffer !== 'undefined' && value.buffer instanceof ArrayBuffer) || 'length' in value) { - return new Buffer(value); - } - if (value.type === 'Buffer' && Array.isArray(value.data)) { - return new Buffer(value.data); - } - } - - throw new TypeError('First argument must be a string, Buffer, ' + 'ArrayBuffer, Array, or array-like object.'); -} -exports.allocUnsafeSlow = function allocUnsafeSlow(size) { - if (typeof Buffer.allocUnsafeSlow === 'function') { - return Buffer.allocUnsafeSlow(size); - } - if (typeof size !== 'number') { - throw new TypeError('size must be a number'); - } - if (size >= MAX_LEN) { - throw new RangeError('size is too large'); - } - return new SlowBuffer(size); -} diff --git a/node_modules/readable-stream/node_modules/buffer-shims/license.md b/node_modules/readable-stream/node_modules/buffer-shims/license.md deleted file mode 100644 index 01cfaefe2..000000000 --- a/node_modules/readable-stream/node_modules/buffer-shims/license.md +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) 2016 Calvin Metcalf - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -**THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.** diff --git a/node_modules/readable-stream/node_modules/buffer-shims/package.json b/node_modules/readable-stream/node_modules/buffer-shims/package.json deleted file mode 100644 index 8e4af6603..000000000 --- a/node_modules/readable-stream/node_modules/buffer-shims/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "_from": "buffer-shims@~1.0.0", - "_id": "buffer-shims@1.0.0", - "_integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=", - "_location": "/readable-stream/buffer-shims", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "buffer-shims@~1.0.0", - "name": "buffer-shims", - "escapedName": "buffer-shims", - "rawSpec": "~1.0.0", - "saveSpec": null, - "fetchSpec": "~1.0.0" - }, - "_requiredBy": [ - "/readable-stream", - "/readable-stream/string_decoder" - ], - "_resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", - "_shasum": "9978ce317388c649ad8793028c3477ef044a8b51", - "_shrinkwrap": null, - "_spec": "buffer-shims@~1.0.0", - "_where": "/Users/zkat/Documents/code/npm/node_modules/readable-stream", - "bin": null, - "bugs": { - "url": "https://github.com/calvinmetcalf/buffer-shims/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "some shims for node buffers", - "devDependencies": { - "tape": "^4.5.1" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/calvinmetcalf/buffer-shims#readme", - "license": "MIT", - "main": "index.js", - "name": "buffer-shims", - "optionalDependencies": {}, - "peerDependencies": {}, - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/calvinmetcalf/buffer-shims.git" - }, - "scripts": { - "test": "tape test/*.js" - }, - "version": "1.0.0" -} diff --git a/node_modules/readable-stream/node_modules/buffer-shims/readme.md b/node_modules/readable-stream/node_modules/buffer-shims/readme.md deleted file mode 100644 index 7ea6475e2..000000000 --- a/node_modules/readable-stream/node_modules/buffer-shims/readme.md +++ /dev/null @@ -1,21 +0,0 @@ -buffer-shims -=== - -functions to make sure the new buffer methods work in older browsers. - -```js -var bufferShim = require('buffer-shims'); -bufferShim.from('foo'); -bufferShim.alloc(9, 'cafeface', 'hex'); -bufferShim.allocUnsafe(15); -bufferShim.allocUnsafeSlow(21); -``` - -should just use the original in newer nodes and on older nodes uses fallbacks. - -Known Issues -=== -- this does not patch the buffer object, only the constructor stuff -- it's actually a polyfill - -![](https://i.imgur.com/zxII3jJ.gif) diff --git a/node_modules/readable-stream/node_modules/string_decoder/README.md b/node_modules/readable-stream/node_modules/string_decoder/README.md index 13d827d89..dc3a2d216 100644 --- a/node_modules/readable-stream/node_modules/string_decoder/README.md +++ b/node_modules/readable-stream/node_modules/string_decoder/README.md @@ -7,8 +7,6 @@ [![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) -[![Sauce Test Status](https://saucelabs.com/browser-matrix/string_decoder.svg)](https://saucelabs.com/u/string_decoder) - ```bash npm install --save string_decoder ``` diff --git a/node_modules/readable-stream/node_modules/string_decoder/lib/string_decoder.js b/node_modules/readable-stream/node_modules/string_decoder/lib/string_decoder.js index 696d7ab61..26fb94c34 100644 --- a/node_modules/readable-stream/node_modules/string_decoder/lib/string_decoder.js +++ b/node_modules/readable-stream/node_modules/string_decoder/lib/string_decoder.js @@ -1,7 +1,6 @@ 'use strict'; -var Buffer = require('buffer').Buffer; -var bufferShim = require('buffer-shims'); +var Buffer = require('safe-buffer').Buffer; var isEncoding = Buffer.isEncoding || function (encoding) { encoding = '' + encoding; @@ -78,7 +77,7 @@ function StringDecoder(encoding) { } this.lastNeed = 0; this.lastTotal = 0; - this.lastChar = bufferShim.allocUnsafe(nb); + this.lastChar = Buffer.allocUnsafe(nb); } StringDecoder.prototype.write = function (buf) { diff --git a/node_modules/readable-stream/node_modules/string_decoder/package.json b/node_modules/readable-stream/node_modules/string_decoder/package.json index fb2958ba2..cb5868ece 100644 --- a/node_modules/readable-stream/node_modules/string_decoder/package.json +++ b/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -1,7 +1,8 @@ { "_from": "string_decoder@~1.0.0", - "_id": "string_decoder@1.0.0", - "_integrity": "sha1-8G9BFXtmTYYGn4S9vcmw2KsoFmc=", + "_id": "string_decoder@1.0.1", + "_inBundle": false, + "_integrity": "sha1-YuIA8DmVWmgQ2N8KM//A8BNmLZg=", "_location": "/readable-stream/string_decoder", "_phantomChildren": {}, "_requested": { @@ -17,18 +18,16 @@ "_requiredBy": [ "/readable-stream" ], - "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.0.tgz", - "_shasum": "f06f41157b664d86069f84bdbdc9b0d8ab281667", - "_shrinkwrap": null, + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.1.tgz", + "_shasum": "62e200f039955a6810d8df0a33ffc0f013662d98", "_spec": "string_decoder@~1.0.0", "_where": "/Users/zkat/Documents/code/npm/node_modules/readable-stream", - "bin": null, "bugs": { "url": "https://github.com/rvagg/string_decoder/issues" }, "bundleDependencies": false, "dependencies": { - "buffer-shims": "~1.0.0" + "safe-buffer": "^5.0.1" }, "deprecated": false, "description": "The string_decoder module from Node core", @@ -46,8 +45,6 @@ "license": "MIT", "main": "lib/string_decoder.js", "name": "string_decoder", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/rvagg/string_decoder.git" @@ -55,5 +52,5 @@ "scripts": { "test": "tap test/parallel/*.js" }, - "version": "1.0.0" + "version": "1.0.1" } diff --git a/node_modules/readable-stream/package.json b/node_modules/readable-stream/package.json index d1bf299d0..5308555f4 100644 --- a/node_modules/readable-stream/package.json +++ b/node_modules/readable-stream/package.json @@ -1,20 +1,24 @@ { - "_from": "readable-stream@~2.2.9", - "_id": "readable-stream@2.2.9", - "_integrity": "sha1-z3jsb0ptHrQ9JkiMrJfwQudLf8g=", + "_from": "readable-stream@2.2.10", + "_id": "readable-stream@2.2.10", + "_inBundle": false, + "_integrity": "sha512-HQEnnoV404e0EtwB9yNiuk2tJ+egeVC8Y9QBAxzDg8DBJt4BzRp+yQuIb/t3FIWkSTmIi+sgx7yVv/ZM0GNoqw==", "_location": "/readable-stream", - "_phantomChildren": {}, + "_phantomChildren": { + "safe-buffer": "5.0.1" + }, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "readable-stream@~2.2.9", + "raw": "readable-stream@2.2.10", "name": "readable-stream", "escapedName": "readable-stream", - "rawSpec": "~2.2.9", + "rawSpec": "2.2.10", "saveSpec": null, - "fetchSpec": "~2.2.9" + "fetchSpec": "2.2.10" }, "_requiredBy": [ + "#USER", "/", "/fs-write-stream-atomic", "/mississippi/concat-stream", @@ -34,12 +38,10 @@ "/tap/tap-mocha-reporter", "/tap/tap-parser" ], - "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz", - "_shasum": "cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8", - "_shrinkwrap": null, - "_spec": "readable-stream@~2.2.9", + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.10.tgz", + "_shasum": "effe72bb7c884c0dd335e2379d526196d9d011ee", + "_spec": "readable-stream@2.2.10", "_where": "/Users/zkat/Documents/code/npm", - "bin": null, "browser": { "util": false, "./readable.js": "./readable-browser.js", @@ -52,11 +54,11 @@ }, "bundleDependencies": false, "dependencies": { - "buffer-shims": "~1.0.0", "core-util-is": "~1.0.0", "inherits": "~2.0.1", "isarray": "~1.0.0", "process-nextick-args": "~1.0.6", + "safe-buffer": "^5.0.1", "string_decoder": "~1.0.0", "util-deprecate": "~1.0.1" }, @@ -85,8 +87,6 @@ "lib/**.js" ] }, - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git://github.com/nodejs/readable-stream.git" @@ -99,5 +99,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.9" + "version": "2.2.10" } |