diff options
Diffstat (limited to 'deps/npm/node_modules/tar')
-rw-r--r-- | deps/npm/node_modules/tar/lib/write-entry.js | 4 | ||||
-rw-r--r-- | deps/npm/node_modules/tar/node_modules/minipass/index.js | 23 | ||||
-rw-r--r-- | deps/npm/node_modules/tar/node_modules/minipass/package.json | 12 | ||||
-rw-r--r-- | deps/npm/node_modules/tar/package.json | 20 |
4 files changed, 39 insertions, 20 deletions
diff --git a/deps/npm/node_modules/tar/lib/write-entry.js b/deps/npm/node_modules/tar/lib/write-entry.js index 63f749488c..0c019006f3 100644 --- a/deps/npm/node_modules/tar/lib/write-entry.js +++ b/deps/npm/node_modules/tar/lib/write-entry.js @@ -231,7 +231,7 @@ const WriteEntry = warner(class WriteEntry extends MiniPass { er.path = this.absolute er.syscall = 'read' er.code = 'EOF' - this[CLOSE](fd) + this[CLOSE](fd, _ => _) return this.emit('error', er) } @@ -240,7 +240,7 @@ const WriteEntry = warner(class WriteEntry extends MiniPass { er.path = this.absolute er.syscall = 'read' er.code = 'EOF' - this[CLOSE](fd) + this[CLOSE](fd, _ => _) return this.emit('error', er) } diff --git a/deps/npm/node_modules/tar/node_modules/minipass/index.js b/deps/npm/node_modules/tar/node_modules/minipass/index.js index cab9009f2b..c072352d44 100644 --- a/deps/npm/node_modules/tar/node_modules/minipass/index.js +++ b/deps/npm/node_modules/tar/node_modules/minipass/index.js @@ -43,6 +43,14 @@ const isEndish = ev => ev === 'finish' || ev === 'prefinish' +const isArrayBuffer = b => b instanceof ArrayBuffer || + typeof b === 'object' && + b.constructor && + b.constructor.name === 'ArrayBuffer' && + b.byteLength >= 0 + +const isArrayBufferView = b => !B.isBuffer(b) && ArrayBuffer.isView(b) + module.exports = class Minipass extends EE { constructor (options) { super() @@ -114,8 +122,19 @@ module.exports = class Minipass extends EE { if (!encoding) encoding = 'utf8' - if (typeof chunk !== 'string' && !B.isBuffer(chunk) && !this[OBJECTMODE]) - this.objectMode = true + // convert array buffers and typed array views into buffers + // at some point in the future, we may want to do the opposite! + // leave strings and buffers as-is + // anything else switches us into object mode + if (!this[OBJECTMODE] && !B.isBuffer(chunk)) { + if (isArrayBufferView(chunk)) + chunk = B.from(chunk.buffer, chunk.byteOffset, chunk.byteLength) + else if (isArrayBuffer(chunk)) + chunk = B.from(chunk) + else if (typeof chunk !== 'string') + // use the setter so we throw if we have encoding set + this.objectMode = true + } // this ensures at this point that the chunk is a buffer or string // don't buffer it up or send it to the decoder diff --git a/deps/npm/node_modules/tar/node_modules/minipass/package.json b/deps/npm/node_modules/tar/node_modules/minipass/package.json index 5c782f120d..aeb390253c 100644 --- a/deps/npm/node_modules/tar/node_modules/minipass/package.json +++ b/deps/npm/node_modules/tar/node_modules/minipass/package.json @@ -1,8 +1,8 @@ { "_from": "minipass@^2.8.6", - "_id": "minipass@2.8.6", + "_id": "minipass@2.9.0", "_inBundle": false, - "_integrity": "sha512-lFG7d6g3+/UaFDCOtqPiKAC9zngWWsQZl1g5q6gaONqrjq61SX2xFqXMleQiFVyDpYwa018E9hmlAFY22PCb+A==", + "_integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", "_location": "/tar/minipass", "_phantomChildren": {}, "_requested": { @@ -18,8 +18,8 @@ "_requiredBy": [ "/tar" ], - "_resolved": "https://registry.npmjs.org/minipass/-/minipass-2.8.6.tgz", - "_shasum": "620d889ace26356391d010ecb9458749df9b6db5", + "_resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "_shasum": "e713762e7d3e32fed803115cf93e04bca9fcc9a6", "_spec": "minipass@^2.8.6", "_where": "/Users/mperrotte/npminc/cli/node_modules/tar", "author": { @@ -39,7 +39,7 @@ "description": "minimal implementation of a PassThrough stream", "devDependencies": { "end-of-stream": "^1.4.0", - "tap": "^14.6.4", + "tap": "^14.6.5", "through2": "^2.0.3" }, "files": [ @@ -66,5 +66,5 @@ "tap": { "check-coverage": true }, - "version": "2.8.6" + "version": "2.9.0" } diff --git a/deps/npm/node_modules/tar/package.json b/deps/npm/node_modules/tar/package.json index 9a4a511239..b12db0f3ef 100644 --- a/deps/npm/node_modules/tar/package.json +++ b/deps/npm/node_modules/tar/package.json @@ -1,8 +1,8 @@ { - "_from": "tar@4.4.12", - "_id": "tar@4.4.12", + "_from": "tar@4.4.13", + "_id": "tar@4.4.13", "_inBundle": false, - "_integrity": "sha512-4GwpJwdSjIHlUrWd/1yJrl63UqcqjJyVglgIwn4gcG+Lrp9TXpZ1ZRrGLIRBNqLTUvz6yoPJrX4B/MISxY/Ukg==", + "_integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", "_location": "/tar", "_phantomChildren": { "safe-buffer": "5.1.2", @@ -11,12 +11,12 @@ "_requested": { "type": "version", "registry": true, - "raw": "tar@4.4.12", + "raw": "tar@4.4.13", "name": "tar", "escapedName": "tar", - "rawSpec": "4.4.12", + "rawSpec": "4.4.13", "saveSpec": null, - "fetchSpec": "4.4.12" + "fetchSpec": "4.4.13" }, "_requiredBy": [ "#USER", @@ -24,9 +24,9 @@ "/node-gyp", "/pacote" ], - "_resolved": "https://registry.npmjs.org/tar/-/tar-4.4.12.tgz", - "_shasum": "6a1275a870a782f92828e24d28fa6aa253193af7", - "_spec": "tar@4.4.12", + "_resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", + "_shasum": "43b364bc52888d555298637b10d60790254ab525", + "_spec": "tar@4.4.13", "_where": "/Users/mperrotte/npminc/cli", "author": { "name": "Isaac Z. Schlueter", @@ -84,5 +84,5 @@ "coverage-map": "map.js", "check-coverage": true }, - "version": "4.4.12" + "version": "4.4.13" } |