Merge tag 'v4.39.0' into next

4.39.0
This commit is contained in:
Tobias Koppers 2019-08-05 12:15:03 +02:00
commit b73d35bbee
42 changed files with 1010 additions and 636 deletions

View File

@ -104,6 +104,8 @@ class Compiler {
run: new AsyncSeriesHook(["compiler"]),
/** @type {AsyncSeriesHook<[Compilation]>} */
emit: new AsyncSeriesHook(["compilation"]),
/** @type {AsyncSeriesHook<[string, Buffer]>} */
assetEmitted: new AsyncSeriesHook(["file", "content"]),
/** @type {AsyncSeriesHook<[Compilation]>} */
afterEmit: new AsyncSeriesHook(["compilation"]),
@ -135,7 +137,7 @@ class Compiler {
watchClose: new SyncHook([]),
/** @type {SyncBailHook<[string, string, any[]], true>} */
infrastructurelog: new SyncBailHook(["origin", "type", "args"]),
infrastructureLog: new SyncBailHook(["origin", "type", "args"]),
// TODO the following hooks are weirdly located here
// TODO move them for webpack 5
@ -226,7 +228,7 @@ class Compiler {
);
}
}
if (this.hooks.infrastructurelog.call(name, type, args) === undefined) {
if (this.hooks.infrastructureLog.call(name, type, args) === undefined) {
if (this.infrastructureLogger !== undefined) {
this.infrastructureLogger(name, type, args);
}
@ -474,7 +476,7 @@ class Compiler {
: targetFileGeneration + 1;
cacheEntry.writtenTo.set(targetPath, newGeneration);
this._assetEmittingWrittenFiles.set(targetPath, newGeneration);
callback();
this.hooks.assetEmitted.callAsync(file, content, callback);
});
};

View File

@ -12,7 +12,8 @@ const ConcurrentCompilationError = require("./ConcurrentCompilationError");
const MultiStats = require("./MultiStats");
const MultiWatching = require("./MultiWatching");
/** @template T @typedef {import("tapable").AsyncSeriesHook} AsyncSeriesHook<T> */
/** @template T @typedef {import("tapable").AsyncSeriesHook<T>} AsyncSeriesHook<T> */
/** @template T @template R @typedef {import("tapable").SyncBailHook<T, R>} SyncBailHook<T, R> */
/** @typedef {import("../declarations/WebpackOptions").WatchOptions} WatchOptions */
/** @typedef {import("./Compiler")} Compiler */
/** @typedef {import("./Stats")} Stats */
@ -62,7 +63,11 @@ module.exports = class MultiCompiler {
/** @type {SyncHook<[]>} */
watchClose: new SyncHook([]),
/** @type {MultiHook<AsyncSeriesHook<[Compiler]>>} */
watchRun: new MultiHook(compilers.map(c => c.hooks.watchRun))
watchRun: new MultiHook(compilers.map(c => c.hooks.watchRun)),
/** @type {MultiHook<SyncBailHook<[string, string, any[]], true>>} */
infrastructureLog: new MultiHook(
compilers.map(c => c.hooks.infrastructureLog)
)
});
this.compilers = compilers;
/** @type {WeakMap<Compiler, string[]>} */
@ -151,6 +156,10 @@ module.exports = class MultiCompiler {
}
}
getInfrastructureLogger(name) {
return this.compilers[0].getInfrastructureLogger(name);
}
/**
* @param {Compiler} compiler the child compiler
* @param {string[]} dependencies its dependencies

View File

@ -14,50 +14,14 @@ const MultiCompiler = require("./MultiCompiler");
/** @typedef {import("../declarations/plugins/ProgressPlugin").ProgressPluginArgument} ProgressPluginArgument */
/** @typedef {import("../declarations/plugins/ProgressPlugin").ProgressPluginOptions} ProgressPluginOptions */
const createDefaultHandler = profile => {
let lineCaretPosition = 0;
let lastMessage = "";
const createDefaultHandler = (profile, logger) => {
let lastState;
let lastStateTime;
const defaultHandler = (percentage, msg, ...args) => {
let state = msg;
const details = args.filter(v => v.length);
const maxLineLength = process.stderr.columns || Infinity;
if (percentage < 1) {
percentage = Math.floor(percentage * 100);
msg = `${percentage}% ${msg}`;
if (percentage < 100) {
msg = ` ${msg}`;
}
if (percentage < 10) {
msg = ` ${msg}`;
}
if (details.length) {
const maxTotalDetailsLength = maxLineLength - msg.length;
const totalDetailsLength = details.reduce(
(a, b) => a + b.length,
details.length // account for added space before each detail text
);
const maxDetailLength =
totalDetailsLength < maxTotalDetailsLength
? Infinity
: Math.floor(maxTotalDetailsLength / details.length);
for (let detail of details) {
if (!detail) continue;
if (detail.length + 1 > maxDetailLength) {
const truncatePrefix = "...";
detail = `${truncatePrefix}${detail.substr(
-(maxDetailLength - truncatePrefix.length - 1)
)}`;
}
msg += ` ${detail}`;
}
}
}
logger.status(`${Math.floor(percentage * 100)}%`, msg, ...args);
if (profile) {
let state = msg;
state = state.replace(/^\d+\/\d+\s+/, "");
if (percentage === 0) {
lastState = null;
@ -66,34 +30,22 @@ const createDefaultHandler = profile => {
const now = Date.now();
if (lastState) {
const diff = now - lastStateTime;
if (diff >= 1) {
const stateMsg = `${diff}ms ${lastState}`;
goToLineStartAndWrite(stateMsg);
process.stderr.write("\n");
lineCaretPosition = 0;
const stateMsg = `${diff}ms ${lastState}`;
if (diff > 1000) {
logger.warn(stateMsg);
} else if (diff > 10) {
logger.info(stateMsg);
} else if (diff > 0) {
logger.log(stateMsg);
} else {
logger.debug(stateMsg);
}
}
lastState = state;
lastStateTime = now;
}
}
if (lastMessage !== msg) {
msg = msg.substring(0, maxLineLength);
goToLineStartAndWrite(msg);
lastMessage = msg;
}
};
const goToLineStartAndWrite = nextMessage => {
let str = "";
for (; lineCaretPosition > nextMessage.length; lineCaretPosition--) {
str += "\b \b";
}
for (var i = 0; i < lineCaretPosition; i++) {
str += "\b";
}
lineCaretPosition = nextMessage.length;
if (str) process.stderr.write(str + nextMessage);
if (percentage === 1) logger.status();
};
return defaultHandler;
@ -145,7 +97,12 @@ class ProgressPlugin {
* @returns {void}
*/
apply(compiler) {
const handler = this.handler || createDefaultHandler(this.profile);
const handler =
this.handler ||
createDefaultHandler(
this.profile,
compiler.getInfrastructureLogger("webpack.Progress")
);
if (compiler instanceof MultiCompiler) {
this._applyOnMultiCompiler(compiler, handler);
} else if (compiler instanceof Compiler) {

View File

@ -39,7 +39,11 @@ class SystemMainTemplatePlugin {
const externals = /** @type {ExternalModule[]} */ (modules);
// The name this bundle should be registered as with System
const name = this.name ? `${JSON.stringify(this.name)}, ` : "";
const name = this.name
? `${JSON.stringify(
mainTemplate.getAssetPath(this.name, { hash, chunk })
)}, `
: "";
// The array of dependencies that are external to webpack and will be provided by System
const systemDependencies = JSON.stringify(

View File

@ -12,7 +12,7 @@ const Module = require("./Module");
/** @typedef {import("./Compilation").PathData} PathData */
/** @typedef {import("./Compiler")} Compiler */
const REGEXP = /\[([a-z]+)(?::(\d+))?\]/gi;
const REGEXP = /\[\\*([\w:]+)\\*\]/gi;
const prepareId = id => {
if (typeof id !== "string") return id;
@ -29,14 +29,14 @@ const prepareId = id => {
};
const hashLength = (replacer, handler) => {
const fn = (match, hashLength, ...args) => {
const length = hashLength && parseInt(hashLength, 10);
const fn = (match, arg, input) => {
const length = arg && parseInt(arg, 10);
if (length && handler) {
return handler(length);
}
const hash = replacer(match, hashLength, ...args);
const hash = replacer(match, arg, input);
return length ? hash.slice(0, length) : hash;
};
@ -45,11 +45,9 @@ const hashLength = (replacer, handler) => {
};
const replacer = (value, allowEmpty) => {
const fn = (match, ...args) => {
const fn = (match, arg, input) => {
if (value === null || value === undefined) {
if (!allowEmpty) {
// last argument in replacer is the entire input string
const input = args[args.length - 1];
throw new Error(
`Path variable ${match} not implemented in this context: ${input}`
);
@ -245,10 +243,17 @@ const replacePathVariables = (path, data) => {
path = path(data);
}
path = path.replace(REGEXP, (match, kind, ...args) => {
const replacer = replacements.get(kind);
if (replacer !== undefined) {
return replacer(match, ...args);
path = path.replace(REGEXP, (match, content) => {
if (content.length + 2 === match.length) {
const contentMatch = /^(\w+)(?::(\w+))?$/.exec(content);
if (!contentMatch) return match;
const [, kind, arg] = contentMatch;
const replacer = replacements.get(kind);
if (replacer !== undefined) {
return replacer(match, arg, path);
}
} else if (match.startsWith("[\\") && match.endsWith("\\]")) {
return `[${match.slice(2, -2)}]`;
}
return match;
});

View File

@ -26,7 +26,8 @@ const LogType = Object.freeze({
time: "time", // name, time as [seconds, nanoseconds]
clear: "clear" // no arguments
clear: "clear", // no arguments
status: "status" // message, arguments
});
exports.LogType = LogType;
@ -78,6 +79,10 @@ class WebpackLogger {
this[LOG_SYMBOL](LogType.clear);
}
status(...args) {
this[LOG_SYMBOL](LogType.status, args);
}
group(...args) {
this[LOG_SYMBOL](LogType.group, args);
}

View File

@ -15,8 +15,9 @@ const { LogType } = require("./Logger");
/**
* @typedef {Object} LoggerOptions
* @property {false|true|"none"|"error"|"warn"|"info"|"log"|"verbose"} options.level loglevel
* @property {FilterTypes|boolean} options.debug filter for debug logging
* @property {false|true|"none"|"error"|"warn"|"info"|"log"|"verbose"} level loglevel
* @property {FilterTypes|boolean} debug filter for debug logging
* @property {Console & { status?: Function, logTime?: Function }} console the console to log to
*/
/**
@ -62,7 +63,7 @@ const LogLevel = {
* @param {LoggerOptions} options options object
* @returns {function(string, LogTypeEnum, any[]): void} logging function
*/
module.exports = ({ level = "info", debug = false }) => {
module.exports = ({ level = "info", debug = false, console }) => {
const debugFilters =
typeof debug === "boolean"
? [() => debug]
@ -79,12 +80,12 @@ module.exports = ({ level = "info", debug = false }) => {
* @returns {void}
*/
const logger = (name, type, args) => {
const labeledArgs = (prefix = "") => {
const labeledArgs = () => {
if (Array.isArray(args)) {
if (args.length > 0 && typeof args[0] === "string") {
return [`${prefix}[${name}] ${args[0]}`, ...args.slice(1)];
return [`[${name}] ${args[0]}`, ...args.slice(1)];
} else {
return [`${prefix}[${name}]`, ...args];
return [`[${name}]`, ...args];
}
} else {
return [];
@ -108,20 +109,33 @@ module.exports = ({ level = "info", debug = false }) => {
break;
case LogType.info:
if (!debug && loglevel > LogLevel.info) return;
console.info(...labeledArgs("<i> "));
console.info(...labeledArgs());
break;
case LogType.warn:
if (!debug && loglevel > LogLevel.warn) return;
console.warn(...labeledArgs("<w> "));
console.warn(...labeledArgs());
break;
case LogType.error:
if (!debug && loglevel > LogLevel.error) return;
console.error(...labeledArgs("<e> "));
console.error(...labeledArgs());
break;
case LogType.trace:
if (!debug) return;
console.trace();
break;
case LogType.groupCollapsed:
if (!debug && loglevel > LogLevel.log) return;
if (!debug && loglevel > LogLevel.verbose) {
// eslint-disable-next-line node/no-unsupported-features/node-builtins
if (typeof console.groupCollapsed === "function") {
// eslint-disable-next-line node/no-unsupported-features/node-builtins
console.groupCollapsed(...labeledArgs());
} else {
console.log(...labeledArgs());
}
break;
}
// falls through
case LogType.group:
if (!debug && loglevel > LogLevel.log) return;
// eslint-disable-next-line node/no-unsupported-features/node-builtins
@ -132,32 +146,25 @@ module.exports = ({ level = "info", debug = false }) => {
console.log(...labeledArgs());
}
break;
case LogType.groupCollapsed:
if (!debug && loglevel > LogLevel.log) return;
// eslint-disable-next-line node/no-unsupported-features/node-builtins
if (typeof console.groupCollapsed === "function") {
// eslint-disable-next-line node/no-unsupported-features/node-builtins
console.groupCollapsed(...labeledArgs());
} else {
console.log(...labeledArgs("<g> "));
}
break;
case LogType.groupEnd:
if (!debug && loglevel > LogLevel.log) return;
// eslint-disable-next-line node/no-unsupported-features/node-builtins
if (typeof console.groupEnd === "function") {
// eslint-disable-next-line node/no-unsupported-features/node-builtins
console.groupEnd();
} else {
console.log(...labeledArgs("</g> "));
}
break;
case LogType.time:
case LogType.time: {
if (!debug && loglevel > LogLevel.log) return;
console.log(
`[${name}] ${args[0]}: ${args[1] * 1000 + args[2] / 1000000}ms`
);
const ms = args[1] * 1000 + args[2] / 1000000;
const msg = `[${name}] ${args[0]}: ${ms}ms`;
if (typeof console.logTime === "function") {
console.logTime(msg);
} else {
console.log(msg);
}
break;
}
case LogType.profile:
// eslint-disable-next-line node/no-unsupported-features/node-builtins
if (typeof console.profile === "function") {
@ -180,6 +187,20 @@ module.exports = ({ level = "info", debug = false }) => {
console.clear();
}
break;
case LogType.status:
if (!debug && loglevel > LogLevel.info) return;
if (typeof console.status === "function") {
if (args.length === 0) {
console.status();
} else {
console.status(...labeledArgs());
}
} else {
if (args.length !== 0) {
console.info(...labeledArgs());
}
}
break;
default:
throw new Error(`Unexpected LogType ${type}`);
}

View File

@ -12,7 +12,8 @@ const createConsoleLogger = require("./createConsoleLogger");
/** @type {createConsoleLogger.LoggerOptions} */
let currentDefaultLoggerOptions = {
level: "info",
debug: false
debug: false,
console
};
let currentDefaultLogger = createConsoleLogger(currentDefaultLoggerOptions);

View File

@ -0,0 +1,76 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
/**
* @param {any[]} args items to be truncated
* @param {number} maxLength maximum length of args including spaces between
* @returns {string[]} truncated args
*/
const truncateArgs = (args, maxLength) => {
const lengths = args.map(a => `${a}`.length);
const availableLength = maxLength - lengths.length + 1;
if (availableLength > 0 && args.length === 1) {
if (availableLength >= args[0].length) {
return args;
} else if (availableLength > 3) {
return ["..." + args[0].slice(-availableLength + 3)];
} else {
return [args[0].slice(-availableLength)];
}
}
// Check if there is space for at least 4 chars per arg
if (availableLength < lengths.reduce((s, i) => s + Math.min(i, 6), 0)) {
// remove args
if (args.length > 1)
return truncateArgs(args.slice(0, args.length - 1), maxLength);
return [];
}
let currentLength = lengths.reduce((a, b) => a + b, 0);
// Check if all fits into maxLength
if (currentLength <= availableLength) return args;
// Try to remove chars from the longest items until it fits
while (currentLength > availableLength) {
const maxLength = Math.max(...lengths);
const shorterItems = lengths.filter(l => l !== maxLength);
const nextToMaxLength =
shorterItems.length > 0 ? Math.max(...shorterItems) : 0;
const maxReduce = maxLength - nextToMaxLength;
let maxItems = lengths.length - shorterItems.length;
let overrun = currentLength - availableLength;
for (let i = 0; i < lengths.length; i++) {
if (lengths[i] === maxLength) {
const reduce = Math.min(Math.floor(overrun / maxItems), maxReduce);
lengths[i] -= reduce;
currentLength -= reduce;
overrun -= reduce;
maxItems--;
}
}
}
// Return args reduced to length in lengths
return args.map((a, i) => {
const str = `${a}`;
const length = lengths[i];
if (str.length === length) {
return str;
} else if (length > 5) {
return "..." + str.slice(-length + 3);
} else if (length > 0) {
return str.slice(-length);
} else {
return "";
}
});
};
module.exports = truncateArgs;

View File

@ -9,6 +9,7 @@ const CachedInputFileSystem = require("enhanced-resolve/lib/CachedInputFileSyste
const fs = require("graceful-fs");
const createConsoleLogger = require("../logging/createConsoleLogger");
const NodeWatchFileSystem = require("./NodeWatchFileSystem");
const nodeConsole = require("./nodeConsole");
/** @typedef {import("../Compiler")} Compiler */
@ -26,7 +27,8 @@ class NodeEnvironmentPlugin {
Object.assign(
{
level: "info",
debug: false
debug: false,
console: nodeConsole
},
this.options.infrastructureLogging
)

133
lib/node/nodeConsole.js Normal file
View File

@ -0,0 +1,133 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const util = require("util");
const truncateArgs = require("../logging/truncateArgs");
const tty = process.stderr.isTTY && process.env.TERM !== "dumb";
let currentStatusMessage = undefined;
let hasStatusMessage = false;
let currentIndent = "";
let currentCollapsed = 0;
const indent = (str, prefix, colorPrefix, colorSuffix) => {
if (str === "") return str;
prefix = currentIndent + prefix;
if (tty) {
return (
prefix +
colorPrefix +
str.replace(/\n/g, colorSuffix + "\n" + prefix + colorPrefix) +
colorSuffix
);
} else {
return prefix + str.replace(/\n/g, "\n" + prefix);
}
};
const clearStatusMessage = () => {
if (hasStatusMessage) {
process.stderr.write("\x1b[2K\r");
hasStatusMessage = false;
}
};
const writeStatusMessage = () => {
if (!currentStatusMessage) return;
const l = process.stderr.columns;
const args = l ? truncateArgs(currentStatusMessage, l) : currentStatusMessage;
const str = args.join(" ");
const coloredStr = `\u001b[1m${str}\u001b[39m\u001b[22m`;
process.stderr.write(`\x1b[2K\r${coloredStr}`);
hasStatusMessage = true;
};
const writeColored = (prefix, colorPrefix, colorSuffix) => {
return (...args) => {
if (currentCollapsed > 0) return;
clearStatusMessage();
// @ts-ignore
const str = indent(util.format(...args), prefix, colorPrefix, colorSuffix);
process.stderr.write(str + "\n");
writeStatusMessage();
};
};
const writeGroupMessage = writeColored(
"<-> ",
"\u001b[1m\u001b[36m",
"\u001b[39m\u001b[22m"
);
const writeGroupCollapsedMessage = writeColored(
"<+> ",
"\u001b[1m\u001b[36m",
"\u001b[39m\u001b[22m"
);
module.exports = {
log: writeColored(" ", "\u001b[1m", "\u001b[22m"),
debug: writeColored(" ", "", ""),
trace: writeColored(" ", "", ""),
info: writeColored("<i> ", "\u001b[1m\u001b[32m", "\u001b[39m\u001b[22m"),
warn: writeColored("<w> ", "\u001b[1m\u001b[33m", "\u001b[39m\u001b[22m"),
error: writeColored("<e> ", "\u001b[1m\u001b[31m", "\u001b[39m\u001b[22m"),
logTime: writeColored("<t> ", "\u001b[1m\u001b[35m", "\u001b[39m\u001b[22m"),
group: (...args) => {
writeGroupMessage(...args);
if (currentCollapsed > 0) {
currentCollapsed++;
} else {
currentIndent += " ";
}
},
groupCollapsed: (...args) => {
writeGroupCollapsedMessage(...args);
currentCollapsed++;
},
groupEnd: () => {
if (currentCollapsed > 0) currentCollapsed--;
else if (currentIndent.length >= 2)
currentIndent = currentIndent.slice(0, currentIndent.length - 2);
},
// eslint-disable-next-line node/no-unsupported-features/node-builtins
profile: console.profile && (name => console.profile(name)),
// eslint-disable-next-line node/no-unsupported-features/node-builtins
profileEnd: console.profileEnd && (name => console.profileEnd(name)),
clear:
tty &&
// eslint-disable-next-line node/no-unsupported-features/node-builtins
console.clear &&
(() => {
clearStatusMessage();
// eslint-disable-next-line node/no-unsupported-features/node-builtins
console.clear();
writeStatusMessage();
}),
status: tty
? (name, ...args) => {
args = args.filter(Boolean);
if (name === undefined && args.length === 0) {
clearStatusMessage();
currentStatusMessage = undefined;
} else if (
typeof name === "string" &&
name.startsWith("[webpack.Progress] ")
) {
currentStatusMessage = [name.slice(19), ...args];
writeStatusMessage();
} else if (name === "[webpack.Progress]") {
currentStatusMessage = [...args];
writeStatusMessage();
} else {
currentStatusMessage = [name, ...args];
writeStatusMessage();
}
}
: writeColored("<s> ", "", "")
};

View File

@ -249,9 +249,15 @@ const SIMPLE_EXTRACTORS = {
object.assetsByChunkName = {};
for (const asset of object.assets) {
for (const name of asset.chunkNames) {
object.assetsByChunkName[name] = (
object.assetsByChunkName[name] || []
).concat(asset.name);
if (
!Object.prototype.hasOwnProperty.call(
object.assetsByChunkName,
name
)
) {
object.assetsByChunkName[name] = [];
}
object.assetsByChunkName[name].push(asset.name);
}
}
},
@ -355,6 +361,7 @@ const SIMPLE_EXTRACTORS = {
LogType.profile,
LogType.profileEnd,
LogType.time,
LogType.status,
LogType.clear
]);
collapsedGroups = true;

View File

@ -423,9 +423,13 @@ const SIMPLE_PRINTERS = {
"loggingEntry(info).loggingEntry.message": (message, { green }) =>
mapLines(message, x => `<i> ${green(x)}`),
"loggingEntry(log).loggingEntry.message": (message, { bold }) =>
mapLines(message, x => bold(x)),
"loggingEntry(debug).loggingEntry.message": message => message,
"loggingEntry(trace).loggingEntry.message": message => message,
mapLines(message, x => ` ${bold(x)}`),
"loggingEntry(debug).loggingEntry.message": message =>
mapLines(message, x => ` ${x}`),
"loggingEntry(trace).loggingEntry.message": message =>
mapLines(message, x => ` ${x}`),
"loggingEntry(status).loggingEntry.message": (message, { magenta }) =>
mapLines(message, x => `<s> ${magenta(x)}`),
"loggingEntry(profile).loggingEntry.message": (message, { magenta }) =>
mapLines(message, x => `<p> ${magenta(x)}`),
"loggingEntry(profileEnd).loggingEntry.message": (message, { magenta }) =>
@ -433,10 +437,10 @@ const SIMPLE_PRINTERS = {
"loggingEntry(time).loggingEntry.message": (message, { magenta }) =>
mapLines(message, x => `<t> ${magenta(x)}`),
"loggingEntry(group).loggingEntry.message": (message, { cyan }) =>
mapLines(message, x => cyan(x)),
mapLines(message, x => `<-> ${cyan(x)}`),
"loggingEntry(groupCollapsed).loggingEntry.message": (message, { cyan }) =>
mapLines(message, x => `<+> ${cyan(x)}`),
"loggingEntry(clear).loggingEntry": () => "-------",
"loggingEntry(clear).loggingEntry": () => " -------",
"loggingEntry(groupCollapsed).loggingEntry.children": () => "",
"loggingEntry.trace[]": trace =>
trace ? mapLines(trace, x => `| ${x}`) : undefined,

View File

@ -131,7 +131,7 @@ class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
hasJsMatcher !== false
? Template.indent([
"// JSONP chunk loading for javascript",
`var installedChunkData = installedChunks[chunkId];`,
`var installedChunkData = Object.prototype.hasOwnProperty.call(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;`,
'if(installedChunkData !== 0) { // 0 means "already installed".',
Template.indent([
"",
@ -154,7 +154,12 @@ class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
"",
"// start chunk loading",
`var url = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkScriptFilename}(chunkId);`,
"var loadingEnded = function() { if(installedChunks[chunkId]) return installedChunks[chunkId][1]; if(installedChunks[chunkId] !== 0) installedChunks[chunkId] = undefined; };",
"var loadingEnded = function() {",
Template.indent([
"if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) return installedChunks[chunkId][1];",
"if(installedChunks[chunkId] !== 0) installedChunks[chunkId] = undefined;"
]),
"};",
jsonpScript.call("", chunk),
"document.head.appendChild(script);"
]),
@ -176,7 +181,7 @@ class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
Template.indent([
"chunkPreloadData.forEach(function(chunkId) {",
Template.indent([
"if(installedChunks[chunkId] === undefined) {",
"if(!Object.prototype.hasOwnProperty.call(installedChunks, chunkId) || installedChunks[chunkId] === undefined) {",
Template.indent([
"installedChunks[chunkId] = null;",
linkPreload.call("", chunk),
@ -205,7 +210,7 @@ class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
? Template.asString([
"function prefetchChunk(chunkId) {",
Template.indent([
"if(installedChunks[chunkId] === undefined) {",
"if(!Object.prototype.hasOwnProperty.call(installedChunks, chunkId) || installedChunks[chunkId] === undefined) {",
Template.indent([
"installedChunks[chunkId] = null;",
linkPrefetch.call("", chunk),
@ -303,7 +308,7 @@ class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
"currentUpdatedModulesList = updatedModulesList;",
"chunkIds.forEach(function(chunkId) {",
Template.indent([
"if(installedChunks[chunkId] !== undefined) {",
"if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId] !== undefined) {",
Template.indent(["promises.push(loadUpdateChunk(chunkId));"]),
"}",
"currentUpdateChunks[chunkId] = true;"
@ -409,7 +414,7 @@ class JsonpChunkLoadingRuntimeModule extends RuntimeModule {
"for(;i < chunkIds.length; i++) {",
Template.indent([
"chunkId = chunkIds[i];",
"if(installedChunks[chunkId]) {",
"if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {",
Template.indent("resolves.push(installedChunks[chunkId][0]);"),
"}",
"installedChunks[chunkId] = 0;"

View File

@ -9,23 +9,23 @@
"@webassemblyjs/helper-module-context": "1.8.5",
"@webassemblyjs/wasm-edit": "1.8.5",
"@webassemblyjs/wasm-parser": "1.8.5",
"acorn": "^6.2.0",
"ajv": "^6.1.0",
"ajv-keywords": "^3.1.0",
"chrome-trace-event": "^1.0.0",
"acorn": "^6.2.1",
"ajv": "^6.10.2",
"ajv-keywords": "^3.4.1",
"chrome-trace-event": "^1.0.2",
"enhanced-resolve": "5.0.0-beta.2",
"eslint-scope": "^4.0.0",
"eslint-scope": "^4.0.3",
"events": "^3.0.0",
"find-cache-dir": "^2.1.0",
"glob-to-regexp": "^0.4.1",
"graceful-fs": "^4.1.15",
"json-parse-better-errors": "^1.0.2",
"loader-runner": "3.0.0",
"loader-utils": "^1.1.0",
"neo-async": "^2.6.0",
"loader-utils": "^1.2.3",
"neo-async": "^2.6.1",
"schema-utils": "^1.0.0",
"tapable": "2.0.0-beta.8",
"terser-webpack-plugin": "^1.2.1",
"terser-webpack-plugin": "^1.4.1",
"watchpack": "2.0.0-beta.7",
"webpack-sources": "2.0.0-beta.1"
},
@ -63,7 +63,7 @@
"open-cli": "^5.0.0",
"prettier": "^1.14.3",
"pretty-format": "24.0.0",
"pug": "^2.0.3",
"pug": "^2.0.4",
"pug-loader": "^2.4.0",
"raw-loader": "^1.0.0",
"react": "^16.8.0",

View File

@ -7,6 +7,7 @@ const webpack = require("..");
const Stats = require("../lib/Stats");
const WebpackOptionsDefaulter = require("../lib/WebpackOptionsDefaulter");
const MemoryFs = require("memory-fs");
const captureStdio = require("./helpers/captureStdio");
describe("Compiler", () => {
jest.setTimeout(20000);
@ -710,32 +711,12 @@ describe("Compiler", () => {
});
});
describe("infrastructure logging", () => {
const CONSOLE_METHODS = [
"error",
"warn",
"info",
"log",
"debug",
"trace",
"profile",
"profileEnd",
"group",
"groupEnd",
"groupCollapsed"
];
const spies = {};
let capture;
beforeEach(() => {
for (const method of CONSOLE_METHODS) {
if (console[method]) {
spies[method] = jest.spyOn(console, method).mockImplementation();
}
}
capture = captureStdio(process.stderr);
});
afterEach(() => {
for (const method in spies) {
spies[method].mockRestore();
delete spies[method];
}
capture.restore();
});
class MyPlugin {
apply(compiler) {
@ -769,25 +750,18 @@ describe("Compiler", () => {
});
compiler.outputFileSystem = new MemoryFs();
compiler.run((err, stats) => {
expect(spies.group).toHaveBeenCalledTimes(1);
expect(spies.group).toHaveBeenCalledWith("[MyPlugin] Group");
expect(spies.groupCollapsed).toHaveBeenCalledTimes(1);
expect(spies.groupCollapsed).toHaveBeenCalledWith(
"[MyPlugin] Collaped group"
);
expect(spies.error).toHaveBeenCalledTimes(1);
expect(spies.error).toHaveBeenCalledWith("<e> [MyPlugin] Error");
expect(spies.warn).toHaveBeenCalledTimes(1);
expect(spies.warn).toHaveBeenCalledWith("<w> [MyPlugin] Warning");
expect(spies.info).toHaveBeenCalledTimes(1);
expect(spies.info).toHaveBeenCalledWith("<i> [MyPlugin] Info");
expect(spies.log).toHaveBeenCalledTimes(3);
expect(spies.log).toHaveBeenCalledWith("[MyPlugin] Log");
expect(spies.log).toHaveBeenCalledWith(
"[MyPlugin] Log inside collapsed group"
);
expect(spies.debug).toHaveBeenCalledTimes(0);
expect(spies.groupEnd).toHaveBeenCalledTimes(2);
expect(capture.toString().replace(/[\d.]+ms/, "Xms"))
.toMatchInlineSnapshot(`
"<-> [MyPlugin] Group
<e> [MyPlugin] Error
<w> [MyPlugin] Warning
<i> [MyPlugin] Info
[MyPlugin] Log
<-> [MyPlugin] Collaped group
[MyPlugin] Log inside collapsed group
<t> [MyPlugin] Time: Xms
"
`);
done();
});
});
@ -807,26 +781,19 @@ describe("Compiler", () => {
});
compiler.outputFileSystem = new MemoryFs();
compiler.run((err, stats) => {
expect(spies.group).toHaveBeenCalledTimes(1);
expect(spies.group).toHaveBeenCalledWith("[MyPlugin] Group");
expect(spies.groupCollapsed).toHaveBeenCalledTimes(1);
expect(spies.groupCollapsed).toHaveBeenCalledWith(
"[MyPlugin] Collaped group"
);
expect(spies.error).toHaveBeenCalledTimes(1);
expect(spies.error).toHaveBeenCalledWith("<e> [MyPlugin] Error");
expect(spies.warn).toHaveBeenCalledTimes(1);
expect(spies.warn).toHaveBeenCalledWith("<w> [MyPlugin] Warning");
expect(spies.info).toHaveBeenCalledTimes(1);
expect(spies.info).toHaveBeenCalledWith("<i> [MyPlugin] Info");
expect(spies.log).toHaveBeenCalledTimes(3);
expect(spies.log).toHaveBeenCalledWith("[MyPlugin] Log");
expect(spies.log).toHaveBeenCalledWith(
"[MyPlugin] Log inside collapsed group"
);
expect(spies.debug).toHaveBeenCalledTimes(1);
expect(spies.debug).toHaveBeenCalledWith("[MyPlugin] Debug");
expect(spies.groupEnd).toHaveBeenCalledTimes(2);
expect(capture.toString().replace(/[\d.]+ms/, "Xms"))
.toMatchInlineSnapshot(`
"<-> [MyPlugin] Group
<e> [MyPlugin] Error
<w> [MyPlugin] Warning
<i> [MyPlugin] Info
[MyPlugin] Log
[MyPlugin] Debug
<-> [MyPlugin] Collaped group
[MyPlugin] Log inside collapsed group
<t> [MyPlugin] Time: Xms
"
`);
done();
});
});
@ -845,14 +812,7 @@ describe("Compiler", () => {
});
compiler.outputFileSystem = new MemoryFs();
compiler.run((err, stats) => {
expect(spies.group).toHaveBeenCalledTimes(0);
expect(spies.groupCollapsed).toHaveBeenCalledTimes(0);
expect(spies.error).toHaveBeenCalledTimes(0);
expect(spies.warn).toHaveBeenCalledTimes(0);
expect(spies.info).toHaveBeenCalledTimes(0);
expect(spies.log).toHaveBeenCalledTimes(0);
expect(spies.debug).toHaveBeenCalledTimes(0);
expect(spies.groupEnd).toHaveBeenCalledTimes(0);
expect(capture.toString()).toMatchInlineSnapshot(`""`);
done();
});
});

View File

@ -32,7 +32,9 @@ describe("ConfigTestCases", () => {
const testDirectory = path.join(casesPath, cat, testName);
const filterPath = path.join(testDirectory, "test.filter.js");
if (fs.existsSync(filterPath) && !require(filterPath)()) {
describe.skip(testName, () => it("filtered"));
describe.skip(testName, () => {
it("filtered", () => {});
});
return false;
}
return true;

View File

@ -161,4 +161,90 @@ describe("HotModuleReplacementPlugin", () => {
});
});
});
it("should handle entryFile that contains path variable", done => {
const entryFile = path.join(
__dirname,
"js",
"HotModuleReplacementPlugin",
"[name]",
"entry.js"
);
const statsFile3 = path.join(
__dirname,
"js",
"HotModuleReplacementPlugin",
"HotModuleReplacementPlugin.test.stats3.txt"
);
const statsFile4 = path.join(
__dirname,
"js",
"HotModuleReplacementPlugin",
"HotModuleReplacementPlugin.test.stats4.txt"
);
const recordsFile = path.join(
__dirname,
"js",
"HotModuleReplacementPlugin",
"records.json"
);
try {
mkdirp.sync(
path.join(__dirname, "js", "HotModuleReplacementPlugin", "[name]")
);
} catch (e) {
// empty
}
try {
fs.unlinkSync(recordsFile);
} catch (e) {
// empty
}
const compiler = webpack({
mode: "development",
cache: false,
entry: {
"[name]/entry.js": entryFile
},
recordsPath: recordsFile,
output: {
filename: "[name]",
chunkFilename: "[name].js",
path: path.join(__dirname, "js", "HotModuleReplacementPlugin"),
hotUpdateChunkFilename: "static/webpack/[id].[hash].hot-update.js",
hotUpdateMainFilename: "static/webpack/[hash].hot-update.json"
},
plugins: [new webpack.HotModuleReplacementPlugin()],
optimization: {
chunkIds: "named"
}
});
fs.writeFileSync(entryFile, "1", "utf-8");
compiler.run((err, stats) => {
if (err) return done(err);
fs.writeFileSync(statsFile3, stats.toString());
compiler.run((err, stats) => {
if (err) return done(err);
fs.writeFileSync(statsFile4, stats.toString());
fs.writeFileSync(entryFile, "2", "utf-8");
compiler.run((err, stats) => {
if (err) return done(err);
fs.writeFileSync(statsFile3, stats.toString());
let foundUpdates = false;
Object.keys(stats.compilation.assets).forEach(key => {
foundUpdates =
foundUpdates ||
!!key.match(
/static\/webpack\/\[name\]\/entry\.js\..*?\.hot-update\.js/
);
});
expect(foundUpdates).toBe(true);
done();
});
});
});
});
});

View File

@ -3,19 +3,18 @@
const _ = require("lodash");
const path = require("path");
const MemoryFs = require("memory-fs");
const webpack = require("..");
const captureStdio = require("./helpers/captureStdio");
let webpack;
describe("ProgressPlugin", function() {
let _env;
let stderr;
beforeEach(() => {
_env = process.env;
stderr = captureStdio(process.stderr);
stderr = captureStdio(process.stderr, true);
webpack = require("..");
});
afterEach(() => {
process.env = _env;
stderr && stderr.restore();
});
@ -30,17 +29,23 @@ describe("ProgressPlugin", function() {
it("should not print lines longer than stderr.columns", () => {
const compiler = createSimpleCompiler();
process.stderr.columns = 40;
process.stderr.columns = 35;
return RunCompilerAsync(compiler).then(() => {
const logs = getLogs(stderr.toString());
expect(logs.length).toBeGreaterThan(20);
logs.forEach(log => expect(log.length).toBeLessThanOrEqual(40));
logs.forEach(log => expect(log.length).toBeLessThanOrEqual(35));
expect(logs).toContain(
" 10% building ...tries ...dules 0 active",
"75% ...optimization ...ChunksPlugin",
"trims each detail string equally"
);
expect(logs).toContain(
"10% ...ding ...ries ...ules ...tive",
"remove empty arguments and omit arguments when no space"
);
expect(logs).toContain("92% after chunk asset optimization");
expect(logs).toContain("100%");
});
});
@ -88,7 +93,7 @@ const createSimpleCompiler = () => {
return compiler;
};
const getLogs = logsStr => logsStr.split(/\u0008+/).filter(v => !(v === " "));
const getLogs = logsStr => logsStr.split(/\r/).filter(v => !(v === " "));
const RunCompilerAsync = compiler =>
new Promise((resolve, reject) => {

View File

@ -3,8 +3,9 @@
const path = require("path");
const fs = require("graceful-fs");
const captureStdio = require("./helpers/captureStdio");
const webpack = require("..");
let webpack;
/**
* Escapes regular expression metacharacters
@ -35,6 +36,14 @@ const tests = fs
});
describe("StatsTestCases", () => {
let stderr;
beforeEach(() => {
stderr = captureStdio(process.stderr, true);
webpack = require("..");
});
afterEach(() => {
stderr.restore();
});
tests.forEach(testName => {
it("should print correct stats for " + testName, done => {
jest.setTimeout(30000);
@ -136,10 +145,12 @@ describe("StatsTestCases", () => {
let actual = stats.toString(toStringOptions);
expect(typeof actual).toBe("string");
if (!hasColorSetting) {
actual = stderr.toString() + actual;
actual = actual
.replace(/\u001b\[[0-9;]*m/g, "")
.replace(/[.0-9]+(\s?ms)/g, "X$1");
} else {
actual = stderr.toStringRaw() + actual;
actual = actual
.replace(/\u001b\[1m\u001b\[([0-9;]*)m/g, "<CLR=$1,BOLD>")
.replace(/\u001b\[1m/g, "<CLR=BOLD>")
@ -150,6 +161,7 @@ describe("StatsTestCases", () => {
const testPath = path.join(base, testName);
actual = actual
.replace(/\r\n?/g, "\n")
.replace(/\(.+\) DeprecationWarning.+(\n\s+at .*)*\n?/g, "")
.replace(/[\t ]*Version:.+\n/g, "")
.replace(new RegExp(quotemeta(testPath), "g"), "Xdir/" + testName)
.replace(/(\w)\\(\w)/g, "$1/$2")

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,8 @@ it("should load script with nonce 'nonce1234'", function(done) {
// if in browser context, test that nonce was added.
if (typeof document !== 'undefined') {
var script = document.querySelector('script[src="js/chunk-with-nonce.web.js"]');
expect(script.getAttribute('nonce')).toBe('nonce1234');
var nonce = script.nonce || script.getAttribute('nonce');
expect(nonce).toBe('nonce1234');
}
__webpack_nonce__ = undefined;
done();

View File

@ -0,0 +1,3 @@
import("./module");
it("should run", () => {});

View File

@ -0,0 +1,18 @@
module.exports = {
plugins: [
compiler => {
const files = {};
compiler.hooks.assetEmitted.tap("Test", (file, buffer) => {
files[file] = Buffer.isBuffer(buffer);
});
compiler.hooks.afterEmit.tap("Test", () => {
expect(files).toMatchInlineSnapshot(`
Object {
"662.bundle0.js": true,
"bundle0.js": true,
}
`);
});
}
]
};

View File

@ -0,0 +1 @@
it("should compile and evaluate fine", () => {});

View File

@ -0,0 +1,5 @@
module.exports = {
findBundle: function(i, options) {
return ["runtime.js", "constructor.js"];
}
};

View File

@ -0,0 +1,13 @@
module.exports = {
entry: {
constructor: "./index"
},
target: "web",
output: {
filename: "[name].js"
},
optimization: {
runtimeChunk: "single",
chunkIds: "named"
}
};

View File

@ -0,0 +1,5 @@
/* This test verifies that when output.library is specified that the compiled bundle provides
* the library name to System during the System.register
*/
it("should call System.register with a name assets path", function() {});

View File

@ -0,0 +1,12 @@
const System = require("../../../helpers/fakeSystem");
module.exports = {
beforeExecute: () => {
System.init();
},
moduleScope(scope) {
scope.System = System;
},
afterExecute: () => {
System.execute(`named-system-module-main`);
}
};

View File

@ -0,0 +1,10 @@
module.exports = {
output: {
library: "named-system-module-[name]",
libraryTarget: "system"
},
node: {
__dirname: false,
__filename: false
}
};

View File

@ -0,0 +1,34 @@
module.exports = class LogTestPlugin {
constructor(noTraced) {
this.noTraced = noTraced;
}
apply(compiler) {
const logSome = logger => {
logger.group("Group");
if (!this.noTraced) {
logger.error("Error");
logger.warn("Warning");
}
logger.info("Info");
logger.log("Log");
logger.debug("Debug");
logger.groupCollapsed("Collaped group");
logger.log("Log inside collapsed group");
logger.group("Inner group");
logger.log("Inner inner message");
logger.groupEnd();
logger.groupEnd();
logger.log("Log");
logger.groupEnd();
logger.log("End");
};
logSome(compiler.getInfrastructureLogger("LogTestPlugin"));
compiler.hooks.compilation.tap("LogTestPlugin", compilation => {
const logger = compilation.getLogger("LogTestPlugin");
logSome(logger);
const otherLogger = compilation.getLogger("LogOtherTestPlugin");
otherLogger.debug("debug message only");
});
}
};

View File

@ -1,15 +1,22 @@
const stripAnsi = require("strip-ansi");
module.exports = stdio => {
module.exports = (stdio, tty) => {
let logs = [];
const write = stdio.write;
const isTTY = stdio.isTTY;
stdio.write = function(str) {
logs.push(str);
write.apply(this, arguments);
};
if (tty !== undefined) stdio.isTTY = tty;
// isTTY flag is only read once on initialization
// therefore we need to clear some module caches
// to get the mocked value
delete require.cache[require.resolve("../../")];
delete require.cache[require.resolve("../../lib/node/NodeEnvironmentPlugin")];
delete require.cache[require.resolve("../../lib/node/nodeConsole")];
return {
data: logs,
@ -26,6 +33,13 @@ module.exports = stdio => {
restore() {
stdio.write = write;
stdio.isTTY = isTTY;
delete require.cache[require.resolve("../../")];
delete require.cache[
require.resolve("../../lib/node/NodeEnvironmentPlugin")
];
delete require.cache[require.resolve("../../lib/node/nodeConsole")];
}
};
};

View File

@ -1,18 +1,4 @@
class MyPlugin {
apply(compiler) {
compiler.hooks.compilation.tap("MyPlugin", compilation => {
const logger = compilation.getLogger("MyPlugin");
logger.info("Plugin is now active");
logger.debug("Debug message should not be visible");
logger.groupCollapsed("Nested");
logger.log("Log inside collapsed group");
logger.groupEnd("Nested");
const otherLogger = compilation.getLogger("MyOtherPlugin");
otherLogger.debug("debug message only");
});
}
}
const LogTestPlugin = require("../../helpers/LogTestPlugin");
module.exports = {
mode: "production",
@ -26,7 +12,7 @@ module.exports = {
}
]
},
plugins: [new MyPlugin()],
plugins: [new LogTestPlugin(true)],
stats: {
colors: true,
logging: true,

View File

@ -1,24 +1,11 @@
class MyPlugin {
apply(compiler) {
compiler.hooks.compilation.tap("MyPlugin", compilation => {
const logger = compilation.getLogger("MyPlugin");
logger.group("Group");
logger.error("Error");
logger.warn("Warning");
logger.info("Info");
logger.log("Log");
logger.debug("Debug");
logger.groupCollapsed("Collaped group");
logger.log("Log inside collapsed group");
logger.groupEnd();
logger.groupEnd();
});
}
}
const LogTestPlugin = require("../../helpers/LogTestPlugin");
module.exports = {
mode: "production",
entry: "./index",
stats: "detailed",
plugins: [new MyPlugin()]
infrastructureLogging: {
level: "log"
},
plugins: [new LogTestPlugin()]
};

View File

@ -1,24 +1,11 @@
class MyPlugin {
apply(compiler) {
compiler.hooks.compilation.tap("MyPlugin", compilation => {
const logger = compilation.getLogger("MyPlugin");
logger.group("Group");
logger.error("Error");
logger.warn("Warning");
logger.info("Info");
logger.log("Log");
logger.debug("Debug");
logger.groupCollapsed("Collaped group");
logger.log("Log inside collapsed group");
logger.groupEnd();
logger.groupEnd();
});
}
}
const LogTestPlugin = require("../../helpers/LogTestPlugin");
module.exports = {
mode: "production",
entry: "./index",
stats: "errors-only",
plugins: [new MyPlugin()]
infrastructureLogging: {
level: "error"
},
plugins: [new LogTestPlugin()]
};

View File

@ -1,24 +1,11 @@
class MyPlugin {
apply(compiler) {
compiler.hooks.compilation.tap("MyPlugin", compilation => {
const logger = compilation.getLogger("MyPlugin");
logger.group("Group");
logger.error("Error");
logger.warn("Warning");
logger.info("Info");
logger.log("Log");
logger.debug("Debug");
logger.groupCollapsed("Collaped group");
logger.log("Log inside collapsed group");
logger.groupEnd();
logger.groupEnd();
});
}
}
const LogTestPlugin = require("../../helpers/LogTestPlugin");
module.exports = {
mode: "production",
entry: "./index",
stats: "errors-warnings",
plugins: [new MyPlugin()]
infrastructureLogging: {
level: "warn"
},
plugins: [new LogTestPlugin()]
};

View File

@ -1,24 +1,11 @@
class MyPlugin {
apply(compiler) {
compiler.hooks.compilation.tap("MyPlugin", compilation => {
const logger = compilation.getLogger("MyPlugin");
logger.group("Group");
logger.error("Error");
logger.warn("Warning");
logger.info("Info");
logger.log("Log");
logger.debug("Debug");
logger.groupCollapsed("Collaped group");
logger.log("Log inside collapsed group");
logger.groupEnd();
logger.groupEnd();
});
}
}
const LogTestPlugin = require("../../helpers/LogTestPlugin");
module.exports = {
mode: "production",
entry: "./index",
stats: "minimal",
plugins: [new MyPlugin()]
infrastructureLogging: {
level: "warn"
},
plugins: [new LogTestPlugin()]
};

View File

@ -1,24 +1,8 @@
class MyPlugin {
apply(compiler) {
compiler.hooks.compilation.tap("MyPlugin", compilation => {
const logger = compilation.getLogger("MyPlugin");
logger.group("Group");
logger.error("Error");
logger.warn("Warning");
logger.info("Info");
logger.log("Log");
logger.debug("Debug");
logger.groupCollapsed("Collaped group");
logger.log("Log inside collapsed group");
logger.groupEnd();
logger.groupEnd();
});
}
}
const LogTestPlugin = require("../../helpers/LogTestPlugin");
module.exports = {
mode: "production",
entry: "./index",
stats: false,
plugins: [new MyPlugin()]
plugins: [new LogTestPlugin()]
};

View File

@ -1,24 +1,8 @@
class MyPlugin {
apply(compiler) {
compiler.hooks.compilation.tap("MyPlugin", compilation => {
const logger = compilation.getLogger("MyPlugin");
logger.group("Group");
logger.error("Error");
logger.warn("Warning");
logger.info("Info");
logger.log("Log");
logger.debug("Debug");
logger.groupCollapsed("Collaped group");
logger.log("Log inside collapsed group");
logger.groupEnd();
logger.groupEnd();
});
}
}
const LogTestPlugin = require("../../helpers/LogTestPlugin");
module.exports = {
mode: "production",
entry: "./index",
stats: "normal",
plugins: [new MyPlugin()]
plugins: [new LogTestPlugin()]
};

View File

@ -1,25 +1,12 @@
class MyPlugin {
apply(compiler) {
compiler.hooks.compilation.tap("MyPlugin", compilation => {
const logger = compilation.getLogger("MyPlugin");
logger.group("Group");
logger.error("Error");
logger.warn("Warning");
logger.info("Info");
logger.log("Log");
logger.debug("Debug");
logger.groupCollapsed("Collaped group");
logger.log("Log inside collapsed group");
logger.groupEnd();
logger.groupEnd();
});
}
}
const LogTestPlugin = require("../../helpers/LogTestPlugin");
module.exports = {
mode: "production",
entry: "./index",
profile: true,
stats: "verbose",
plugins: [new MyPlugin()]
infrastructureLogging: {
level: "verbose"
},
plugins: [new LogTestPlugin()]
};

166
yarn.lock
View File

@ -373,9 +373,9 @@
integrity sha512-MeatbbUsZ80BEsKPXby6pUZjUM9ZuHIpWElN0siopih3fvnlpX2O9L6D5+dzDIb36lf9tM/8U4PVdLQ+L4qr4A==
"@types/node@^10.12.21":
version "10.14.13"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.13.tgz#ac786d623860adf39a3f51d629480aacd6a6eec7"
integrity sha512-yN/FNNW1UYsRR1wwAoyOwqvDuLDtVXnaJTZ898XIw/Q5cCaeVAlVwvsmXLX5PuiScBYwZsZU4JYSHB3TvfdwvQ==
version "10.14.14"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.14.tgz#a47955df2acf76ba7f0ac3b205d325da193dc9ad"
integrity sha512-xXD08vZsvpv4xptQXj1+ky22f7ZoKu5ZNI/4l+/BXG3X+XaeZsmaFbbTKuhSE3NjjvRuZFxFf9sQBMXIcZNFMQ==
"@types/prettier@^1.16.1":
version "1.16.1"
@ -392,6 +392,23 @@
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.10.tgz#17a8ec65cd8e88f51b418ceb271af18d3137df67"
integrity sha512-WsVzTPshvCSbHThUduGGxbmnwcpkgSctHGHTqzWyFg4lYAuV5qXlyFPOsP3OWqCINfmg/8VXP+zJaa4OxEsBQQ==
"@typescript-eslint/experimental-utils@^1.13.0":
version "1.13.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.13.0.tgz#b08c60d780c0067de2fb44b04b432f540138301e"
integrity sha512-zmpS6SyqG4ZF64ffaJ6uah6tWWWgZ8m+c54XXgwFtUv0jNz8aJAVx8chMCvnk7yl6xwn8d+d96+tWp7fXzTuDg==
dependencies:
"@types/json-schema" "^7.0.3"
"@typescript-eslint/typescript-estree" "1.13.0"
eslint-scope "^4.0.0"
"@typescript-eslint/typescript-estree@1.13.0":
version "1.13.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.13.0.tgz#8140f17d0f60c03619798f1d628b8434913dc32e"
integrity sha512-b5rCmd2e6DCC6tCTN9GSUAuxdYwCM/k/2wdjHGrIRGPSJotWMCe/dGpi66u42bhuh8q3QBzqM4TMA1GUUCJvdw==
dependencies:
lodash.unescape "4.0.1"
semver "5.5.0"
"@webassemblyjs/ast@1.8.5":
version "1.8.5"
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.8.5.tgz#51b1c5fe6576a34953bf4b253df9f0d490d9e359"
@ -608,7 +625,7 @@ acorn@^5.5.3:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279"
integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==
acorn@^6.0.1, acorn@^6.0.7, acorn@^6.2.0:
acorn@^6.0.1, acorn@^6.0.7, acorn@^6.2.1:
version "6.2.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.2.1.tgz#3ed8422d6dec09e6121cc7a843ca86a330a86b51"
integrity sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q==
@ -618,12 +635,12 @@ ajv-errors@^1.0.0:
resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d"
integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==
ajv-keywords@^3.1.0:
ajv-keywords@^3.1.0, ajv-keywords@^3.4.1:
version "3.4.1"
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da"
integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==
ajv@^6.1.0, ajv@^6.5.5, ajv@^6.9.1:
ajv@^6.1.0, ajv@^6.10.2, ajv@^6.5.5, ajv@^6.9.1:
version "6.10.2"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52"
integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==
@ -952,10 +969,10 @@ binary-extensions@^1.0.0:
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65"
integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==
bluebird@^3.5.3:
version "3.5.4"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.4.tgz#d6cc661595de30d5b3af5fcedd3c0b3ef6ec5714"
integrity sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw==
bluebird@^3.5.5:
version "3.5.5"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f"
integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==
brace-expansion@^1.1.7:
version "1.1.11"
@ -1019,22 +1036,23 @@ bundle-loader@~0.5.0:
dependencies:
loader-utils "^1.1.0"
cacache@^11.3.2:
version "11.3.2"
resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.2.tgz#2d81e308e3d258ca38125b676b98b2ac9ce69bfa"
integrity sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==
cacache@^12.0.2:
version "12.0.2"
resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.2.tgz#8db03205e36089a3df6954c66ce92541441ac46c"
integrity sha512-ifKgxH2CKhJEg6tNdAwziu6Q33EvuG26tYcda6PT3WKisZcYDXsnEdnRv67Po3yCzFfaSoMjGZzJyD2c3DT1dg==
dependencies:
bluebird "^3.5.3"
bluebird "^3.5.5"
chownr "^1.1.1"
figgy-pudding "^3.5.1"
glob "^7.1.3"
glob "^7.1.4"
graceful-fs "^4.1.15"
infer-owner "^1.0.3"
lru-cache "^5.1.1"
mississippi "^3.0.0"
mkdirp "^0.5.1"
move-concurrently "^1.0.1"
promise-inflight "^1.0.1"
rimraf "^2.6.2"
rimraf "^2.6.3"
ssri "^6.0.1"
unique-filename "^1.1.1"
y18n "^4.0.0"
@ -1183,7 +1201,7 @@ chownr@^1.1.1:
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494"
integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==
chrome-trace-event@^1.0.0:
chrome-trace-event@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4"
integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==
@ -1316,7 +1334,7 @@ combined-stream@^1.0.6, combined-stream@~1.0.6:
dependencies:
delayed-stream "~1.0.0"
commander@^2.14.1, commander@^2.19.0, commander@^2.9.0, commander@~2.20.0:
commander@^2.14.1, commander@^2.20.0, commander@^2.9.0, commander@~2.20.0:
version "2.20.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422"
integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==
@ -1841,14 +1859,16 @@ eslint-plugin-es@^1.3.1:
regexpp "^2.0.1"
eslint-plugin-jest@^22.2.2:
version "22.13.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.13.0.tgz#d7d134c6e3c2f67cc50f5fa89a329db579d28428"
integrity sha512-bIr8LL7buUXS8Pk69SFgaDKgyvPQkDu6i8ko0lP54uccszlo4EOwtstDXOZl5Af3JwudbECxRUbCpL/2cKDkkg==
version "22.14.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.14.1.tgz#32287dade9bc0a1920c61e25a71cf11363d78015"
integrity sha512-mpLjhADl+HjagrlaGNx95HIji089S18DhnU/Ee8P8VP+dhEnuEzb43BXEaRmDgQ7BiSUPcSCvt1ydtgPkjOF/Q==
dependencies:
"@typescript-eslint/experimental-utils" "^1.13.0"
eslint-plugin-jsdoc@^15.3.2:
version "15.7.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-15.7.2.tgz#2def358e61b8376de60927c63546af49d99c232f"
integrity sha512-xQFqyc/pWxpY1dlEeYpO3kpd/zwX9TVnMn0krvVuCe7l0MpqXxBVm/+wRpgI6E6jpE5l3yA0gQshipYyxbVLIg==
version "15.8.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-15.8.0.tgz#74cf0f35dec8524a6bd011f0cf199d24e09517f2"
integrity sha512-J6ozWkaAgBh1eLdQE+C2wcXhoEgDmGJOSB6zMF5ktEtMBnU62xT3wfHcUacuTnv6rt+ollC0uZThaEpGA+sTNg==
dependencies:
comment-parser "^0.6.1"
debug "^4.1.1"
@ -2196,15 +2216,6 @@ fill-range@^7.0.1:
dependencies:
to-regex-range "^5.0.1"
find-cache-dir@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.0.0.tgz#4c1faed59f45184530fb9d7fa123a4d04a98472d"
integrity sha512-LDUY6V1Xs5eFskUVYtIwatojt6+9xC9Chnlk/jYOOvn3FAFfSaWddxahDGyNHh0b2dMXa6YW2m0tk8TdVaXHlA==
dependencies:
commondir "^1.0.1"
make-dir "^1.0.0"
pkg-dir "^3.0.0"
find-cache-dir@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7"
@ -2439,7 +2450,7 @@ glob@^5.0.15:
once "^1.3.0"
path-is-absolute "^1.0.0"
glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3:
glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4:
version "7.1.4"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255"
integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==
@ -2467,7 +2478,12 @@ globby@^6.1.0:
pify "^2.0.0"
pinkie-promise "^2.0.0"
graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.2.0:
graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2:
version "4.1.15"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"
integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==
graceful-fs@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.0.tgz#8d8fdc73977cb04104721cb53666c1ca64cd328b"
integrity sha512-jpSvDPV4Cq/bgtpndIWbI5hmYxhQGHPC4d4cqBPb4DLniCfhJokdXhwhaDuLBGLQdvvRum/UiX6ECVIPvDXqdg==
@ -2693,6 +2709,11 @@ indexes-of@^1.0.1:
resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607"
integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc=
infer-owner@^1.0.3:
version "1.0.4"
resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467"
integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==
inflight@^1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
@ -3835,6 +3856,11 @@ lodash.sortby@^4.7.0:
resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=
lodash.unescape@4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c"
integrity sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=
lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.4:
version "4.17.15"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
@ -3902,7 +3928,7 @@ lru-queue@0.1:
dependencies:
es5-ext "~0.10.2"
make-dir@^1.0.0, make-dir@^1.3.0:
make-dir@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c"
integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==
@ -4237,7 +4263,7 @@ needle@^2.2.1:
iconv-lite "^0.4.4"
sax "^1.2.4"
neo-async@^2.5.0, neo-async@^2.6.0:
neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c"
integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==
@ -4987,7 +5013,7 @@ pug-walk@^1.1.8:
resolved "https://registry.yarnpkg.com/pug-walk/-/pug-walk-1.1.8.tgz#b408f67f27912f8c21da2f45b7230c4bd2a5ea7a"
integrity sha512-GMu3M5nUL3fju4/egXwZO0XLi6fW/K3T3VTgFQ14GxNi8btlxgT5qZL//JwZFm/2Fa64J/PNS8AZeys3wiMkVA==
pug@^2.0.3:
pug@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/pug/-/pug-2.0.4.tgz#ee7682ec0a60494b38d48a88f05f3b0ac931377d"
integrity sha512-XhoaDlvi6NIzL49nu094R2NA6P37ijtgMDuWE+ofekDChvfKnzFal60bhSdiy8y2PBO6fmz3oMEIcfpBVRUdvw==
@ -5326,7 +5352,7 @@ right-align@^0.1.1:
dependencies:
align-text "^0.1.1"
rimraf@2.6.3, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2:
rimraf@2.6.3, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3:
version "2.6.3"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==
@ -5438,12 +5464,17 @@ semver-compare@^1.0.0:
resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w=
"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0:
"semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.5.1:
version "5.6.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==
semver@^5.3.0:
semver@5.5.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==
semver@^5.3.0, semver@^5.6.0:
version "5.7.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b"
integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==
@ -5506,9 +5537,9 @@ signal-exit@^3.0.0, signal-exit@^3.0.2:
integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=
simple-git@^1.65.0, simple-git@^1.85.0:
version "1.122.0"
resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-1.122.0.tgz#33b2d3a760aa02df470c79fbab5413d4f4e68945"
integrity sha512-plTwhnkIHrw2TFMJbJH/mKwWGgFbj03V9wcfBKa4FsuvgJbpwdlSJnlvkIQWDV1CVLaf2Gl6zSNeRRnxBRhX1g==
version "1.124.0"
resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-1.124.0.tgz#10a73cc1af303832b5c11720d4256e134fba35ca"
integrity sha512-ks9mBoO4ODQy/xGLC8Cc+YDvj/hho/IKgPhi6h5LI/sA+YUdHc3v0DEoHzM29VmulubpGCxMJUSFmyXNsjNMEA==
dependencies:
debug "^4.0.1"
@ -5590,10 +5621,10 @@ source-map-support@^0.5.6:
buffer-from "^1.0.0"
source-map "^0.6.0"
source-map-support@~0.5.10:
version "0.5.12"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599"
integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==
source-map-support@~0.5.12:
version "0.5.13"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932"
integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"
@ -5915,30 +5946,29 @@ temp-write@^4.0.0:
temp-dir "^1.0.0"
uuid "^3.3.2"
terser-webpack-plugin@^1.2.1:
version "1.3.0"
resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.3.0.tgz#69aa22426299f4b5b3775cbed8cb2c5d419aa1d4"
integrity sha512-W2YWmxPjjkUcOWa4pBEv4OP4er1aeQJlSo2UhtCFQCuRXEHjOFscO8VyWHj9JLlA0RzQb8Y2/Ta78XZvT54uGg==
terser-webpack-plugin@^1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.1.tgz#61b18e40eaee5be97e771cdbb10ed1280888c2b4"
integrity sha512-ZXmmfiwtCLfz8WKZyYUuuHf3dMYEjg8NrjHMb0JqHVHVOSkzp3cW2/XG1fP3tRhqEqSzMwzzRQGtAPbs4Cncxg==
dependencies:
cacache "^11.3.2"
find-cache-dir "^2.0.0"
cacache "^12.0.2"
find-cache-dir "^2.1.0"
is-wsl "^1.1.0"
loader-utils "^1.2.3"
schema-utils "^1.0.0"
serialize-javascript "^1.7.0"
source-map "^0.6.1"
terser "^4.0.0"
webpack-sources "^1.3.0"
terser "^4.1.2"
webpack-sources "^1.4.0"
worker-farm "^1.7.0"
terser@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/terser/-/terser-4.0.0.tgz#ef356f6f359a963e2cc675517f21c1c382877374"
integrity sha512-dOapGTU0hETFl1tCo4t56FN+2jffoKyER9qBGoUFyZ6y7WLoKT0bF+lAYi6B6YsILcGF3q1C2FBh8QcKSCgkgA==
terser@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/terser/-/terser-4.1.2.tgz#b2656c8a506f7ce805a3f300a2ff48db022fa391"
integrity sha512-jvNoEQSPXJdssFwqPSgWjsOrb+ELoE+ILpHPKXC83tIxOlh2U75F1KuB2luLD/3a6/7K3Vw5pDn+hvu0C4AzSw==
dependencies:
commander "^2.19.0"
commander "^2.20.0"
source-map "~0.6.1"
source-map-support "~0.5.10"
source-map-support "~0.5.12"
test-exclude@^5.0.0:
version "5.1.0"
@ -6316,10 +6346,10 @@ webpack-sources@2.0.0-beta.1:
source-list-map "^2.0.1"
source-map "~0.6.1"
webpack-sources@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.3.0.tgz#2a28dcb9f1f45fe960d8f1493252b5ee6530fa85"
integrity sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==
webpack-sources@^1.4.0:
version "1.4.1"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.1.tgz#b91b2c5b1c4e890ff50d1d35b7fa3657040da1da"
integrity sha512-XSz38193PTo/1csJabKaV4b53uRVotlMgqJXm3s3eje0Bu6gQTxYDqpD38CmQfDBA+gN+QqaGjasuC8I/7eW3Q==
dependencies:
source-list-map "^2.0.0"
source-map "~0.6.1"