diff --git a/deps/npm/lib/utils/unsupported.js b/deps/npm/lib/utils/unsupported.js index 13535515e405f6..b3a8a9b33ae29b 100644 --- a/deps/npm/lib/utils/unsupported.js +++ b/deps/npm/lib/utils/unsupported.js @@ -4,7 +4,8 @@ var supportedNode = [ {ver: '4', min: '4.7.0'}, {ver: '6', min: '6.0.0'}, {ver: '7', min: '7.0.0'}, - {ver: '8', min: '8.0.0'} + {ver: '8', min: '8.0.0'}, + {ver: '9', min: '9.0.0'} ] var knownBroken = '<4.7.0' 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 7d595dec4f505b..8c0df2ac439688 100644 --- a/deps/npm/node_modules/tar/node_modules/minizlib/index.js +++ b/deps/npm/node_modules/tar/node_modules/minizlib/index.js @@ -52,6 +52,7 @@ const _offset = Symbol('offset') const _level = Symbol('level') const _strategy = Symbol('strategy') const _ended = Symbol('ended') +const _writeState = Symbol('writeState') class Zlib extends MiniPass { constructor (opts, mode) { @@ -127,11 +128,27 @@ class Zlib extends MiniPass { var strategy = typeof opts.strategy === 'number' ? opts.strategy : constants.Z_DEFAULT_STRATEGY - this[_handle].init(opts.windowBits || constants.Z_DEFAULT_WINDOWBITS, - level, - opts.memLevel || constants.Z_DEFAULT_MEMLEVEL, - strategy, - opts.dictionary) + this[_writeState] = new Uint32Array(2); + const window = opts.windowBits || constants.Z_DEFAULT_WINDOWBITS + const memLevel = opts.memLevel || constants.Z_DEFAULT_MEMLEVEL + + // API changed in node v9 + /* istanbul ignore next */ + if (/^v[0-8]\./.test(process.version)) { + this[_handle].init(window, + level, + memLevel, + strategy, + opts.dictionary) + } else { + this[_handle].init(window, + level, + memLevel, + strategy, + this[_writeState], + () => {}, + opts.dictionary) + } this[_buffer] = Buffer.allocUnsafe(this[_chunkSize]) this[_offset] = 0 @@ -234,11 +251,15 @@ class Zlib extends MiniPass { this[_offset], //out_off availOutBefore // out_len ) + if (this[_hadError]) break - let availInAfter = res[0] - let availOutAfter = res[1] + // API changed in v9 + /* istanbul ignore next */ + let availInAfter = res ? res[0] : this[_writeState][1] + /* istanbul ignore next */ + let availOutAfter = res ? res[1] : this[_writeState][0] const have = availOutBefore - availOutAfter assert(have >= 0, 'have should not go down') 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 ae7fb898d4631c..0a41e31c82d0e1 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.0.3", - "_id": "minizlib@1.0.3", + "_from": "minizlib@1.0.4", + "_id": "minizlib@1.0.4", "_inBundle": false, - "_integrity": "sha1-1cGr93vhVGGZUuJTM27Mq5sqMvU=", + "_integrity": "sha512-sN4U9tIJtBRwKbwgFh9qJfrPIQ/GGTRr1MGqkgOeMTLy8/lM0FcWU//FqlnZ3Vb7gJ+Mxh3FOg1EklibdajbaQ==", "_location": "/tar/minizlib", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "minizlib@^1.0.3", + "raw": "minizlib@1.0.4", "name": "minizlib", "escapedName": "minizlib", - "rawSpec": "^1.0.3", + "rawSpec": "1.0.4", "saveSpec": null, - "fetchSpec": "^1.0.3" + "fetchSpec": "1.0.4" }, "_requiredBy": [ "/tar" ], - "_resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.0.3.tgz", - "_shasum": "d5c1abf77be154619952e253336eccab9b2a32f5", - "_spec": "minizlib@^1.0.3", - "_where": "/Users/rebecca/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", @@ -32,12 +32,12 @@ }, "bundleDependencies": false, "dependencies": { - "minipass": "^2.0.0" + "minipass": "^2.2.1" }, "deprecated": false, "description": "A small fast zlib stream built on [minipass](http://npm.im/minipass) and Node.js's zlib binding.", "devDependencies": { - "tap": "^10.3.0" + "tap": "^10.7.2" }, "files": [ "index.js", @@ -67,5 +67,5 @@ "preversion": "npm test", "test": "tap test/*.js --100 -J" }, - "version": "1.0.3" + "version": "1.0.4" }