summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/tar/node_modules
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/tar/node_modules')
-rw-r--r--deps/npm/node_modules/tar/node_modules/fs-minipass/LICENSE15
-rw-r--r--deps/npm/node_modules/tar/node_modules/fs-minipass/README.md70
-rw-r--r--deps/npm/node_modules/tar/node_modules/fs-minipass/index.js386
-rw-r--r--deps/npm/node_modules/tar/node_modules/fs-minipass/package.json65
-rw-r--r--deps/npm/node_modules/tar/node_modules/minizlib/index.js32
-rw-r--r--deps/npm/node_modules/tar/node_modules/minizlib/package.json24
6 files changed, 23 insertions, 569 deletions
diff --git a/deps/npm/node_modules/tar/node_modules/fs-minipass/LICENSE b/deps/npm/node_modules/tar/node_modules/fs-minipass/LICENSE
deleted file mode 100644
index 19129e315f..0000000000
--- a/deps/npm/node_modules/tar/node_modules/fs-minipass/LICENSE
+++ /dev/null
@@ -1,15 +0,0 @@
-The ISC License
-
-Copyright (c) Isaac Z. Schlueter and Contributors
-
-Permission to use, copy, modify, and/or distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
-IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/deps/npm/node_modules/tar/node_modules/fs-minipass/README.md b/deps/npm/node_modules/tar/node_modules/fs-minipass/README.md
deleted file mode 100644
index 1e61241cf0..0000000000
--- a/deps/npm/node_modules/tar/node_modules/fs-minipass/README.md
+++ /dev/null
@@ -1,70 +0,0 @@
-# fs-minipass
-
-Filesystem streams based on [minipass](http://npm.im/minipass).
-
-4 classes are exported:
-
-- ReadStream
-- ReadStreamSync
-- WriteStream
-- WriteStreamSync
-
-When using `ReadStreamSync`, all of the data is made available
-immediately upon consuming the stream. Nothing is buffered in memory
-when the stream is constructed. If the stream is piped to a writer,
-then it will synchronously `read()` and emit data into the writer as
-fast as the writer can consume it. (That is, it will respect
-backpressure.) If you call `stream.read()` then it will read the
-entire file and return the contents.
-
-When using `WriteStreamSync`, every write is flushed to the file
-synchronously. If your writes all come in a single tick, then it'll
-write it all out in a single tick. It's as synchronous as you are.
-
-The async versions work much like their node builtin counterparts,
-with the exception of introducing significantly less Stream machinery
-overhead.
-
-## USAGE
-
-It's just streams, you pipe them or read() them or write() to them.
-
-```js
-const fsm = require('fs-minipass')
-const readStream = new fsm.ReadStream('file.txt')
-const writeStream = new fsm.WriteStream('output.txt')
-writeStream.write('some file header or whatever\n')
-readStream.pipe(writeStream)
-```
-
-## ReadStream(path, options)
-
-Path string is required, but somewhat irrelevant if an open file
-descriptor is passed in as an option.
-
-Options:
-
-- `fd` Pass in a numeric file descriptor, if the file is already open.
-- `readSize` The size of reads to do, defaults to 16MB
-- `size` The size of the file, if known. Prevents zero-byte read()
- call at the end.
-- `autoClose` Set to `false` to prevent the file descriptor from being
- closed when the file is done being read.
-
-## WriteStream(path, options)
-
-Path string is required, but somewhat irrelevant if an open file
-descriptor is passed in as an option.
-
-Options:
-
-- `fd` Pass in a numeric file descriptor, if the file is already open.
-- `mode` The mode to create the file with. Defaults to `0o666`.
-- `start` The position in the file to start reading. If not
- specified, then the file will start writing at position zero, and be
- truncated by default.
-- `autoClose` Set to `false` to prevent the file descriptor from being
- closed when the stream is ended.
-- `flags` Flags to use when opening the file. Irrelevant if `fd` is
- passed in, since file won't be opened in that case. Defaults to
- `'a'` if a `pos` is specified, or `'w'` otherwise.
diff --git a/deps/npm/node_modules/tar/node_modules/fs-minipass/index.js b/deps/npm/node_modules/tar/node_modules/fs-minipass/index.js
deleted file mode 100644
index 0f15c810eb..0000000000
--- a/deps/npm/node_modules/tar/node_modules/fs-minipass/index.js
+++ /dev/null
@@ -1,386 +0,0 @@
-'use strict'
-const MiniPass = require('minipass')
-const EE = require('events').EventEmitter
-const fs = require('fs')
-
-// for writev
-const binding = process.binding('fs')
-const writeBuffers = binding.writeBuffers
-const FSReqWrap = binding.FSReqWrap
-
-const _autoClose = Symbol('_autoClose')
-const _close = Symbol('_close')
-const _ended = Symbol('_ended')
-const _fd = Symbol('_fd')
-const _finished = Symbol('_finished')
-const _flags = Symbol('_flags')
-const _flush = Symbol('_flush')
-const _handleChunk = Symbol('_handleChunk')
-const _makeBuf = Symbol('_makeBuf')
-const _mode = Symbol('_mode')
-const _needDrain = Symbol('_needDrain')
-const _onerror = Symbol('_onerror')
-const _onopen = Symbol('_onopen')
-const _onread = Symbol('_onread')
-const _onwrite = Symbol('_onwrite')
-const _open = Symbol('_open')
-const _path = Symbol('_path')
-const _pos = Symbol('_pos')
-const _queue = Symbol('_queue')
-const _read = Symbol('_read')
-const _readSize = Symbol('_readSize')
-const _reading = Symbol('_reading')
-const _remain = Symbol('_remain')
-const _size = Symbol('_size')
-const _write = Symbol('_write')
-const _writing = Symbol('_writing')
-const _defaultFlag = Symbol('_defaultFlag')
-
-class ReadStream extends MiniPass {
- constructor (path, opt) {
- opt = opt || {}
- super(opt)
-
- this.writable = false
-
- if (typeof path !== 'string')
- throw new TypeError('path must be a string')
-
- this[_fd] = typeof opt.fd === 'number' ? opt.fd : null
- this[_path] = path
- this[_readSize] = opt.readSize || 16*1024*1024
- this[_reading] = false
- this[_size] = typeof opt.size === 'number' ? opt.size : Infinity
- this[_remain] = this[_size]
- this[_autoClose] = typeof opt.autoClose === 'boolean' ?
- opt.autoClose : true
-
- if (typeof this[_fd] === 'number')
- this[_read]()
- else
- this[_open]()
- }
-
- get fd () { return this[_fd] }
- get path () { return this[_path] }
-
- write () {
- throw new TypeError('this is a readable stream')
- }
-
- end () {
- throw new TypeError('this is a readable stream')
- }
-
- [_open] () {
- fs.open(this[_path], 'r', (er, fd) => this[_onopen](er, fd))
- }
-
- [_onopen] (er, fd) {
- if (er)
- this[_onerror](er)
- else {
- this[_fd] = fd
- this.emit('open', fd)
- this[_read]()
- }
- }
-
- [_makeBuf] () {
- return Buffer.allocUnsafe(Math.min(this[_readSize], this[_remain]))
- }
-
- [_read] () {
- if (!this[_reading]) {
- this[_reading] = true
- const buf = this[_makeBuf]()
- /* istanbul ignore if */
- if (buf.length === 0) return process.nextTick(() => this[_onread](null, 0, buf))
- fs.read(this[_fd], buf, 0, buf.length, null, (er, br, buf) =>
- this[_onread](er, br, buf))
- }
- }
-
- [_onread] (er, br, buf) {
- this[_reading] = false
- if (er)
- this[_onerror](er)
- else if (this[_handleChunk](br, buf))
- this[_read]()
- }
-
- [_close] () {
- if (this[_autoClose] && typeof this[_fd] === 'number') {
- fs.close(this[_fd], _ => this.emit('close'))
- this[_fd] = null
- }
- }
-
- [_onerror] (er) {
- this[_reading] = true
- this[_close]()
- this.emit('error', er)
- }
-
- [_handleChunk] (br, buf) {
- let ret = false
- // no effect if infinite
- this[_remain] -= br
- if (br > 0)
- ret = super.write(br < buf.length ? buf.slice(0, br) : buf)
-
- if (br === 0 || this[_remain] <= 0) {
- ret = false
- this[_close]()
- super.end()
- }
-
- return ret
- }
-
- emit (ev, data) {
- switch (ev) {
- case 'prefinish':
- case 'finish':
- break
-
- case 'drain':
- if (typeof this[_fd] === 'number')
- this[_read]()
- break
-
- default:
- return super.emit(ev, data)
- }
- }
-}
-
-class ReadStreamSync extends ReadStream {
- [_open] () {
- let threw = true
- try {
- this[_onopen](null, fs.openSync(this[_path], 'r'))
- threw = false
- } finally {
- if (threw)
- this[_close]()
- }
- }
-
- [_read] () {
- let threw = true
- try {
- if (!this[_reading]) {
- this[_reading] = true
- do {
- const buf = this[_makeBuf]()
- /* istanbul ignore next */
- const br = buf.length === 0 ? 0 : fs.readSync(this[_fd], buf, 0, buf.length, null)
- if (!this[_handleChunk](br, buf))
- break
- } while (true)
- this[_reading] = false
- }
- threw = false
- } finally {
- if (threw)
- this[_close]()
- }
- }
-
- [_close] () {
- if (this[_autoClose] && typeof this[_fd] === 'number') {
- try {
- fs.closeSync(this[_fd])
- } catch (er) {}
- this[_fd] = null
- this.emit('close')
- }
- }
-}
-
-class WriteStream extends EE {
- constructor (path, opt) {
- opt = opt || {}
- super(opt)
- this.readable = false
- this[_writing] = false
- this[_ended] = false
- this[_needDrain] = false
- this[_queue] = []
- this[_path] = path
- this[_fd] = typeof opt.fd === 'number' ? opt.fd : null
- this[_mode] = opt.mode === undefined ? 0o666 : opt.mode
- this[_pos] = typeof opt.start === 'number' ? opt.start : null
- this[_autoClose] = typeof opt.autoClose === 'boolean' ?
- opt.autoClose : true
-
- // truncating makes no sense when writing into the middle
- const defaultFlag = this[_pos] !== null ? 'r+' : 'w'
- this[_defaultFlag] = opt.flags === undefined
- this[_flags] = this[_defaultFlag] ? defaultFlag : opt.flags
-
- if (this[_fd] === null)
- this[_open]()
- }
-
- get fd () { return this[_fd] }
- get path () { return this[_path] }
-
- [_onerror] (er) {
- this[_close]()
- this[_writing] = true
- this.emit('error', er)
- }
-
- [_open] () {
- fs.open(this[_path], this[_flags], this[_mode],
- (er, fd) => this[_onopen](er, fd))
- }
-
- [_onopen] (er, fd) {
- if (this[_defaultFlag] &&
- this[_flags] === 'r+' &&
- er && er.code === 'ENOENT') {
- this[_flags] = 'w'
- this[_open]()
- } else if (er)
- this[_onerror](er)
- else {
- this[_fd] = fd
- this.emit('open', fd)
- this[_flush]()
- }
- }
-
- end (buf, enc) {
- if (buf)
- this.write(buf, enc)
-
- this[_ended] = true
-
- // synthetic after-write logic, where drain/finish live
- if (!this[_writing] && !this[_queue].length &&
- typeof this[_fd] === 'number')
- this[_onwrite](null, 0)
- }
-
- write (buf, enc) {
- if (typeof buf === 'string')
- buf = new Buffer(buf, enc)
-
- if (this[_ended]) {
- this.emit('error', new Error('write() after end()'))
- return false
- }
-
- if (this[_fd] === null || this[_writing] || this[_queue].length) {
- this[_queue].push(buf)
- this[_needDrain] = true
- return false
- }
-
- this[_writing] = true
- this[_write](buf)
- return true
- }
-
- [_write] (buf) {
- fs.write(this[_fd], buf, 0, buf.length, this[_pos], (er, bw) =>
- this[_onwrite](er, bw))
- }
-
- [_onwrite] (er, bw) {
- if (er)
- this[_onerror](er)
- else {
- if (this[_pos] !== null)
- this[_pos] += bw
- if (this[_queue].length)
- this[_flush]()
- else {
- this[_writing] = false
-
- if (this[_ended] && !this[_finished]) {
- this[_finished] = true
- this[_close]()
- this.emit('finish')
- } else if (this[_needDrain]) {
- this[_needDrain] = false
- this.emit('drain')
- }
- }
- }
- }
-
- [_flush] () {
- if (this[_queue].length === 0) {
- if (this[_ended])
- this[_onwrite](null, 0)
- } else if (this[_queue].length === 1)
- this[_write](this[_queue].pop())
- else {
- const iovec = this[_queue]
- this[_queue] = []
- writev(this[_fd], iovec, this[_pos],
- (er, bw) => this[_onwrite](er, bw))
- }
- }
-
- [_close] () {
- if (this[_autoClose] && typeof this[_fd] === 'number') {
- fs.close(this[_fd], _ => this.emit('close'))
- this[_fd] = null
- }
- }
-}
-
-class WriteStreamSync extends WriteStream {
- [_open] () {
- let fd
- try {
- fd = fs.openSync(this[_path], this[_flags], this[_mode])
- } catch (er) {
- if (this[_defaultFlag] &&
- this[_flags] === 'r+' &&
- er && er.code === 'ENOENT') {
- this[_flags] = 'w'
- return this[_open]()
- } else
- throw er
- }
- this[_onopen](null, fd)
- }
-
- [_close] () {
- if (this[_autoClose] && typeof this[_fd] === 'number') {
- try {
- fs.closeSync(this[_fd])
- } catch (er) {}
- this[_fd] = null
- this.emit('close')
- }
- }
-
- [_write] (buf) {
- try {
- this[_onwrite](null,
- fs.writeSync(this[_fd], buf, 0, buf.length, this[_pos]))
- } catch (er) {
- this[_onwrite](er, 0)
- }
- }
-}
-
-const writev = (fd, iovec, pos, cb) => {
- const done = (er, bw) => cb(er, bw, iovec)
- const req = new FSReqWrap()
- req.oncomplete = done
- binding.writeBuffers(fd, iovec, pos, req)
-}
-
-exports.ReadStream = ReadStream
-exports.ReadStreamSync = ReadStreamSync
-
-exports.WriteStream = WriteStream
-exports.WriteStreamSync = WriteStreamSync
diff --git a/deps/npm/node_modules/tar/node_modules/fs-minipass/package.json b/deps/npm/node_modules/tar/node_modules/fs-minipass/package.json
deleted file mode 100644
index 9a96770d5c..0000000000
--- a/deps/npm/node_modules/tar/node_modules/fs-minipass/package.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "_args": [
- [
- "fs-minipass@1.2.5",
- "/Users/rebecca/code/npm"
- ]
- ],
- "_from": "fs-minipass@1.2.5",
- "_id": "fs-minipass@1.2.5",
- "_inBundle": false,
- "_integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==",
- "_location": "/tar/fs-minipass",
- "_phantomChildren": {},
- "_requested": {
- "type": "version",
- "registry": true,
- "raw": "fs-minipass@1.2.5",
- "name": "fs-minipass",
- "escapedName": "fs-minipass",
- "rawSpec": "1.2.5",
- "saveSpec": null,
- "fetchSpec": "1.2.5"
- },
- "_requiredBy": [
- "/tar"
- ],
- "_resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz",
- "_spec": "1.2.5",
- "_where": "/Users/rebecca/code/npm",
- "author": {
- "name": "Isaac Z. Schlueter",
- "email": "i@izs.me",
- "url": "http://blog.izs.me/"
- },
- "bugs": {
- "url": "https://github.com/npm/fs-minipass/issues"
- },
- "dependencies": {
- "minipass": "^2.2.1"
- },
- "description": "fs read and write streams based on minipass",
- "devDependencies": {
- "mutate-fs": "^2.0.1",
- "tap": "^10.7.2"
- },
- "files": [
- "index.js"
- ],
- "homepage": "https://github.com/npm/fs-minipass#readme",
- "keywords": [],
- "license": "ISC",
- "main": "index.js",
- "name": "fs-minipass",
- "repository": {
- "type": "git",
- "url": "git+https://github.com/npm/fs-minipass.git"
- },
- "scripts": {
- "postpublish": "git push origin --all; git push origin --tags",
- "postversion": "npm publish",
- "preversion": "npm test",
- "test": "tap test/*.js --100 -J"
- },
- "version": "1.2.5"
-}
diff --git a/deps/npm/node_modules/tar/node_modules/minizlib/index.js b/deps/npm/node_modules/tar/node_modules/minizlib/index.js
index 10c8a8b486..8c0df2ac43 100644
--- a/deps/npm/node_modules/tar/node_modules/minizlib/index.js
+++ b/deps/npm/node_modules/tar/node_modules/minizlib/index.js
@@ -7,18 +7,6 @@ const binding = process.binding('zlib')
const constants = exports.constants = require('./constants.js')
const MiniPass = require('minipass')
-class ZlibError extends Error {
- constructor (msg, errno) {
- super('zlib: ' + msg)
- this.errno = errno
- this.code = codes.get(errno)
- }
-
- get name () {
- return 'ZlibError'
- }
-}
-
// translation table for return codes.
const codes = new Map([
[constants.Z_OK, 'Z_OK'],
@@ -73,10 +61,10 @@ class Zlib extends MiniPass {
this[_opts] = opts = opts || {}
this[_chunkSize] = opts.chunkSize || constants.Z_DEFAULT_CHUNK
if (opts.flush && !validFlushFlags.has(opts.flush)) {
- throw new TypeError('Invalid flush flag: ' + opts.flush)
+ throw new Error('Invalid flush flag: ' + opts.flush)
}
if (opts.finishFlush && !validFlushFlags.has(opts.finishFlush)) {
- throw new TypeError('Invalid flush flag: ' + opts.finishFlush)
+ throw new Error('Invalid flush flag: ' + opts.finishFlush)
}
this[_flushFlag] = opts.flush || constants.Z_NO_FLUSH
@@ -85,37 +73,37 @@ class Zlib extends MiniPass {
if (opts.chunkSize) {
if (opts.chunkSize < constants.Z_MIN_CHUNK) {
- throw new RangeError('Invalid chunk size: ' + opts.chunkSize)
+ throw new Error('Invalid chunk size: ' + opts.chunkSize)
}
}
if (opts.windowBits) {
if (opts.windowBits < constants.Z_MIN_WINDOWBITS ||
opts.windowBits > constants.Z_MAX_WINDOWBITS) {
- throw new RangeError('Invalid windowBits: ' + opts.windowBits)
+ throw new Error('Invalid windowBits: ' + opts.windowBits)
}
}
if (opts.level) {
if (opts.level < constants.Z_MIN_LEVEL ||
opts.level > constants.Z_MAX_LEVEL) {
- throw new RangeError('Invalid compression level: ' + opts.level)
+ throw new Error('Invalid compression level: ' + opts.level)
}
}
if (opts.memLevel) {
if (opts.memLevel < constants.Z_MIN_MEMLEVEL ||
opts.memLevel > constants.Z_MAX_MEMLEVEL) {
- throw new RangeError('Invalid memLevel: ' + opts.memLevel)
+ throw new Error('Invalid memLevel: ' + opts.memLevel)
}
}
if (opts.strategy && !(strategies.has(opts.strategy)))
- throw new TypeError('Invalid strategy: ' + opts.strategy)
+ throw new Error('Invalid strategy: ' + opts.strategy)
if (opts.dictionary) {
if (!(opts.dictionary instanceof Buffer)) {
- throw new TypeError('Invalid dictionary: it should be a Buffer instance')
+ throw new Error('Invalid dictionary: it should be a Buffer instance')
}
}
@@ -128,7 +116,9 @@ class Zlib extends MiniPass {
this.close()
this[_hadError] = true
- const error = new ZlibError(message, errno)
+ const error = new Error(message)
+ error.errno = errno
+ error.code = codes.get(errno)
this.emit('error', error)
}
diff --git a/deps/npm/node_modules/tar/node_modules/minizlib/package.json b/deps/npm/node_modules/tar/node_modules/minizlib/package.json
index 24f9157989..0a41e31c82 100644
--- a/deps/npm/node_modules/tar/node_modules/minizlib/package.json
+++ b/deps/npm/node_modules/tar/node_modules/minizlib/package.json
@@ -1,27 +1,27 @@
{
- "_from": "minizlib@^1.1.0",
- "_id": "minizlib@1.1.0",
+ "_from": "minizlib@1.0.4",
+ "_id": "minizlib@1.0.4",
"_inBundle": false,
- "_integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==",
+ "_integrity": "sha512-sN4U9tIJtBRwKbwgFh9qJfrPIQ/GGTRr1MGqkgOeMTLy8/lM0FcWU//FqlnZ3Vb7gJ+Mxh3FOg1EklibdajbaQ==",
"_location": "/tar/minizlib",
"_phantomChildren": {},
"_requested": {
- "type": "range",
+ "type": "version",
"registry": true,
- "raw": "minizlib@^1.1.0",
+ "raw": "minizlib@1.0.4",
"name": "minizlib",
"escapedName": "minizlib",
- "rawSpec": "^1.1.0",
+ "rawSpec": "1.0.4",
"saveSpec": null,
- "fetchSpec": "^1.1.0"
+ "fetchSpec": "1.0.4"
},
"_requiredBy": [
"/tar"
],
- "_resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz",
- "_shasum": "11e13658ce46bc3a70a267aac58359d1e0c29ceb",
- "_spec": "minizlib@^1.1.0",
- "_where": "/Users/zkat/Documents/code/npm/node_modules/tar",
+ "_resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.0.4.tgz",
+ "_shasum": "8ebb51dd8bbe40b0126b5633dbb36b284a2f523c",
+ "_spec": "minizlib@1.0.4",
+ "_where": "/Users/rebecca/code/npm",
"author": {
"name": "Isaac Z. Schlueter",
"email": "i@izs.me",
@@ -67,5 +67,5 @@
"preversion": "npm test",
"test": "tap test/*.js --100 -J"
},
- "version": "1.1.0"
+ "version": "1.0.4"
}