From 0469abd4a9c9270a1fdc962969e36e63699af8b4 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sun, 10 Dec 2017 21:51:33 +0100 Subject: upgrade dependencies --- node_modules/webpack/lib/Stats.js | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) (limited to 'node_modules/webpack/lib/Stats.js') diff --git a/node_modules/webpack/lib/Stats.js b/node_modules/webpack/lib/Stats.js index 16c191714..6aa3d1ac9 100644 --- a/node_modules/webpack/lib/Stats.js +++ b/node_modules/webpack/lib/Stats.js @@ -100,6 +100,7 @@ class Stats { const requestShortener = new RequestShortener(context); const showPerformance = optionOrLocalFallback(options.performance, true); const showHash = optionOrLocalFallback(options.hash, true); + const showEnv = optionOrLocalFallback(options.env, false); const showVersion = optionOrLocalFallback(options.version, true); const showTimings = optionOrLocalFallback(options.timings, true); const showAssets = optionOrLocalFallback(options.assets, true); @@ -198,15 +199,22 @@ class Stats { text += e.message; if(showErrorDetails && e.details) text += `\n${e.details}`; if(showErrorDetails && e.missing) text += e.missing.map(item => `\n[${item}]`).join(""); - if(showModuleTrace && e.dependencies && e.origin) { + if(showModuleTrace && e.origin) { text += `\n @ ${e.origin.readableIdentifier(requestShortener)}`; - e.dependencies.forEach(dep => { - if(!dep.loc) return; - if(typeof dep.loc === "string") return; - const locInfo = formatLocation(dep.loc); - if(!locInfo) return; - text += ` ${locInfo}`; - }); + if(typeof e.originLoc === "object") { + const locInfo = formatLocation(e.originLoc); + if(locInfo) + text += ` ${locInfo}`; + } + if(e.dependencies) { + e.dependencies.forEach(dep => { + if(!dep.loc) return; + if(typeof dep.loc === "string") return; + const locInfo = formatLocation(dep.loc); + if(!locInfo) return; + text += ` ${locInfo}`; + }); + } let current = e.origin; while(current.issuer) { current = current.issuer; @@ -240,6 +248,11 @@ class Stats { if(showTimings && this.startTime && this.endTime) { obj.time = this.endTime - this.startTime; } + + if(showEnv && options._env) { + obj.env = options._env; + } + if(compilation.needAdditionalPass) { obj.needAdditionalPass = true; } @@ -546,6 +559,11 @@ class Stats { colors.normal("ms"); newline(); } + if(obj.env) { + colors.normal("Environment (--env): "); + colors.bold(JSON.stringify(obj.env, null, 2)); + newline(); + } if(obj.publicPath) { colors.normal("PublicPath: "); colors.bold(obj.publicPath); @@ -900,6 +918,7 @@ class Stats { chunkModules: true, chunkOrigins: true, depth: true, + env: true, reasons: true, usedExports: true, providedExports: true, -- cgit v1.2.3