From cf737c505e76a473850c5244b17f3469efbc3c02 Mon Sep 17 00:00:00 2001 From: Gar Date: Thu, 22 Jul 2021 13:07:49 -0700 Subject: [PATCH] debug@4.3.2 --- node_modules/debug/package.json | 2 +- node_modules/debug/src/common.js | 15 ++++++++++++++- package-lock.json | 12 ++++++------ 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/node_modules/debug/package.json b/node_modules/debug/package.json index da809d2b8d28b..b7d70acb9bee8 100644 --- a/node_modules/debug/package.json +++ b/node_modules/debug/package.json @@ -1,6 +1,6 @@ { "name": "debug", - "version": "4.3.1", + "version": "4.3.2", "repository": { "type": "git", "url": "git://github.com/visionmedia/debug.git" diff --git a/node_modules/debug/src/common.js b/node_modules/debug/src/common.js index 392a8e005a063..50ce2925101d7 100644 --- a/node_modules/debug/src/common.js +++ b/node_modules/debug/src/common.js @@ -60,6 +60,8 @@ function setup(env) { function createDebug(namespace) { let prevTime; let enableOverride = null; + let namespacesCache; + let enabledCache; function debug(...args) { // Disabled? @@ -120,7 +122,17 @@ function setup(env) { Object.defineProperty(debug, 'enabled', { enumerable: true, configurable: false, - get: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + + return enabledCache; + }, set: v => { enableOverride = v; } @@ -149,6 +161,7 @@ function setup(env) { */ function enable(namespaces) { createDebug.save(namespaces); + createDebug.namespaces = namespaces; createDebug.names = []; createDebug.skips = []; diff --git a/package-lock.json b/package-lock.json index 17a410baf9747..f4a82e2ffcfab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2093,9 +2093,9 @@ } }, "node_modules/debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "inBundle": true, "dependencies": { "ms": "2.1.2" @@ -11999,9 +11999,9 @@ } }, "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "requires": { "ms": "2.1.2" },