From bddd60e302283a4a70d35f8f742e42bd13f4dabf Mon Sep 17 00:00:00 2001 From: isaacs Date: Mon, 1 Jul 2019 17:18:54 -0700 Subject: [PATCH] inherits@2.0.4 --- node_modules/inherits/inherits.js | 2 + node_modules/inherits/inherits_browser.js | 32 ++++++++------- node_modules/inherits/package.json | 48 ++++++++++++++--------- package-lock.json | 6 +-- package.json | 2 +- 5 files changed, 53 insertions(+), 37 deletions(-) diff --git a/node_modules/inherits/inherits.js b/node_modules/inherits/inherits.js index 3b94763a76eef..f71f2d93294a6 100644 --- a/node_modules/inherits/inherits.js +++ b/node_modules/inherits/inherits.js @@ -1,7 +1,9 @@ try { var util = require('util'); + /* istanbul ignore next */ if (typeof util.inherits !== 'function') throw ''; module.exports = util.inherits; } catch (e) { + /* istanbul ignore next */ module.exports = require('./inherits_browser.js'); } diff --git a/node_modules/inherits/inherits_browser.js b/node_modules/inherits/inherits_browser.js index c1e78a75e6b52..86bbb3dc29e48 100644 --- a/node_modules/inherits/inherits_browser.js +++ b/node_modules/inherits/inherits_browser.js @@ -1,23 +1,27 @@ if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); + if (superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }) + } }; } else { // old school shim for old browsers module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor + if (superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } } } diff --git a/node_modules/inherits/package.json b/node_modules/inherits/package.json index 0ae0875ff4874..ab48b2a4b3dbf 100644 --- a/node_modules/inherits/package.json +++ b/node_modules/inherits/package.json @@ -1,52 +1,62 @@ { - "_args": [ - [ - "inherits@2.0.3", - "/Users/rebecca/code/npm" - ] - ], - "_from": "inherits@2.0.3", - "_id": "inherits@2.0.3", + "_from": "inherits@2.0.4", + "_id": "inherits@2.0.4", "_inBundle": false, - "_integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "_integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "_location": "/inherits", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "inherits@2.0.3", + "raw": "inherits@2.0.4", "name": "inherits", "escapedName": "inherits", - "rawSpec": "2.0.3", + "rawSpec": "2.0.4", "saveSpec": null, - "fetchSpec": "2.0.3" + "fetchSpec": "2.0.4" }, "_requiredBy": [ + "#USER", "/", + "/are-we-there-yet/readable-stream", "/block-stream", + "/cacache/glob", "/concat-stream", + "/concat-stream/readable-stream", "/duplexify", + "/duplexify/readable-stream", "/flush-write-stream", + "/flush-write-stream/readable-stream", "/from2", + "/from2/readable-stream", + "/fs-write-stream-atomic/readable-stream", "/fstream", "/glob", "/node-gyp/tar", "/parallel-transform", + "/parallel-transform/readable-stream", "/pumpify", "/readable-stream", "/sorted-union-stream/from2", - "/sorted-union-stream/readable-stream" + "/sorted-union-stream/readable-stream", + "/stream-iterate/readable-stream", + "/tap-mocha-reporter/readable-stream", + "/tar-stream", + "/through2/readable-stream" ], - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "_spec": "2.0.3", - "_where": "/Users/rebecca/code/npm", + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "_shasum": "0fa2c64f932917c3433a0ded55363aae37416b7c", + "_spec": "inherits@2.0.4", + "_where": "/Users/isaacs/dev/npm/cli", "browser": "./inherits_browser.js", "bugs": { "url": "https://github.com/isaacs/inherits/issues" }, + "bundleDependencies": false, + "deprecated": false, "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", "devDependencies": { - "tap": "^7.1.0" + "tap": "^14.2.4" }, "files": [ "inherits.js", @@ -71,7 +81,7 @@ "url": "git://github.com/isaacs/inherits.git" }, "scripts": { - "test": "node test" + "test": "tap" }, - "version": "2.0.3" + "version": "2.0.4" } diff --git a/package-lock.json b/package-lock.json index bd8a26dda7552..bb8a09ff674fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2599,9 +2599,9 @@ } }, "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, "ini": { "version": "1.3.5", diff --git a/package.json b/package.json index 66d2ba3148004..7d1a22fddc2dc 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "hosted-git-info": "^2.7.1", "iferr": "^1.0.2", "inflight": "~1.0.6", - "inherits": "~2.0.3", + "inherits": "^2.0.4", "ini": "^1.3.5", "init-package-json": "^1.10.3", "is-cidr": "^3.0.0",