From f0ecb66a01396e91dddaee6522b6ec7d76fe590f Mon Sep 17 00:00:00 2001 From: Mihail Bodrov Date: Sat, 20 Jan 2018 15:04:40 +0300 Subject: [PATCH 001/310] Simplify check hasDependencies, add unit tests --- lib/DependenciesBlockVariable.js | 5 ++-- test/DependenciesBlockVariable.unittest.js | 31 ++++++++++++++++++++-- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/lib/DependenciesBlockVariable.js b/lib/DependenciesBlockVariable.js index 6a6ff5e0d48..9d2330b9a4f 100644 --- a/lib/DependenciesBlockVariable.js +++ b/lib/DependenciesBlockVariable.js @@ -40,11 +40,10 @@ class DependenciesBlockVariable { hasDependencies(filter) { if(filter) { - if(this.dependencies.some(filter)) return true; + return this.dependencies.some(filter); } else { - if(this.dependencies.length > 0) return true; + return this.dependencies.length > 0; } - return false; } } diff --git a/test/DependenciesBlockVariable.unittest.js b/test/DependenciesBlockVariable.unittest.js index 43d19cd1e53..5b1bd009bd1 100644 --- a/test/DependenciesBlockVariable.unittest.js +++ b/test/DependenciesBlockVariable.unittest.js @@ -25,9 +25,36 @@ describe("DependenciesBlockVariable", () => { afterEach(() => sandbox.restore()); - describe("hasDependencies", () => + describe("hasDependencies", () => { it("returns `true` if has dependencies", () => - should(DependenciesBlockVariableInstance.hasDependencies()).be.true())); + should(DependenciesBlockVariableInstance.hasDependencies()).be.true() + ); + + it("returns `true` if has dependencies and passed filter", () => + should(DependenciesBlockVariableInstance.hasDependencies(() => true)).be.true() + ); + + it("returns `false` if has dependencies, but not passed filter", () => + should(DependenciesBlockVariableInstance.hasDependencies(() => false)).be.false() + ); + + it("returns `false` if has 0 dependencies", () => + should(new DependenciesBlockVariable("dependencies-name", "expression", []).hasDependencies()).be.false() + ); + + it("returns `false` if has 0 dependencies and truthy filter", () => + should(new DependenciesBlockVariable("dependencies-name", "expression", []).hasDependencies(() => true)).be.false() + ); + + it("returns `true` if has several dependencies and only 1 filter passed", () => + should( + new DependenciesBlockVariable( + "dependencies-name", "expression", [dependencyMock, Object.assign({}, dependencyMock), Object.assign({}, dependencyMock)] + ) + .hasDependencies((item, i) => i === 2) + ).be.true() + ); + }); describe("disconnect", () => it("trigger dependencies disconnection", () => { From abeb5d85481f97174cddf63989fd3d2af30663ad Mon Sep 17 00:00:00 2001 From: Mihail Bodrov Date: Sun, 21 Jan 2018 17:29:40 +0300 Subject: [PATCH 002/310] Omit else block --- lib/DependenciesBlockVariable.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/DependenciesBlockVariable.js b/lib/DependenciesBlockVariable.js index 9d2330b9a4f..ba8962c86e1 100644 --- a/lib/DependenciesBlockVariable.js +++ b/lib/DependenciesBlockVariable.js @@ -41,9 +41,8 @@ class DependenciesBlockVariable { hasDependencies(filter) { if(filter) { return this.dependencies.some(filter); - } else { - return this.dependencies.length > 0; } + return this.dependencies.length > 0; } } From 30d3be5a53209a67aecc06e0b73e4291cc63a3c0 Mon Sep 17 00:00:00 2001 From: Stephon Harris Date: Thu, 29 Mar 2018 09:28:03 -0400 Subject: [PATCH 003/310] Fixing grammar issues --- examples/dll-app-and-vendor/0-vendor/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/dll-app-and-vendor/0-vendor/README.md b/examples/dll-app-and-vendor/0-vendor/README.md index be4fe8eeb97..1f1cb1a13d2 100644 --- a/examples/dll-app-and-vendor/0-vendor/README.md +++ b/examples/dll-app-and-vendor/0-vendor/README.md @@ -1,10 +1,10 @@ This is the vendor build part. -It's built separately from the app part. The vendors dll is only built when vendors has changed and not while the normal development cycle. +It's built separately from the app part. The vendors dll is only built when the array of vendors has changed and not during the normal development cycle. The DllPlugin in combination with the `output.library` option exposes the internal require function as global variable in the target environment. -A manifest is creates which includes mappings from module names to internal ids. +A manifest is created which includes mappings from module names to internal ids. ### webpack.config.js From 68ce7db7a8e5fdaa209afaa25cefbc6849841eca Mon Sep 17 00:00:00 2001 From: Mihail Bodrov Date: Tue, 3 Apr 2018 02:27:56 +0300 Subject: [PATCH 004/310] Fix eslint --- test/DependenciesBlockVariable.unittest.js | 43 ++++++++++++++-------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/test/DependenciesBlockVariable.unittest.js b/test/DependenciesBlockVariable.unittest.js index b5888dd8feb..45be56aa55a 100644 --- a/test/DependenciesBlockVariable.unittest.js +++ b/test/DependenciesBlockVariable.unittest.js @@ -27,33 +27,44 @@ describe("DependenciesBlockVariable", () => { describe("hasDependencies", () => { it("returns `true` if has dependencies", () => - should(DependenciesBlockVariableInstance.hasDependencies()).be.true() - ); + should(DependenciesBlockVariableInstance.hasDependencies()).be.true()); it("returns `true` if has dependencies and passed filter", () => - should(DependenciesBlockVariableInstance.hasDependencies(() => true)).be.true() - ); + should( + DependenciesBlockVariableInstance.hasDependencies(() => true) + ).be.true()); it("returns `false` if has dependencies, but not passed filter", () => - should(DependenciesBlockVariableInstance.hasDependencies(() => false)).be.false() - ); + should( + DependenciesBlockVariableInstance.hasDependencies(() => false) + ).be.false()); it("returns `false` if has 0 dependencies", () => - should(new DependenciesBlockVariable("dependencies-name", "expression", []).hasDependencies()).be.false() - ); + should( + new DependenciesBlockVariable( + "dependencies-name", + "expression", + [] + ).hasDependencies() + ).be.false()); it("returns `false` if has 0 dependencies and truthy filter", () => - should(new DependenciesBlockVariable("dependencies-name", "expression", []).hasDependencies(() => true)).be.false() - ); + should( + new DependenciesBlockVariable( + "dependencies-name", + "expression", + [] + ).hasDependencies(() => true) + ).be.false()); it("returns `true` if has several dependencies and only 1 filter passed", () => should( - new DependenciesBlockVariable( - "dependencies-name", "expression", [dependencyMock, Object.assign({}, dependencyMock), Object.assign({}, dependencyMock)] - ) - .hasDependencies((item, i) => i === 2) - ).be.true() - ); + new DependenciesBlockVariable("dependencies-name", "expression", [ + dependencyMock, + Object.assign({}, dependencyMock), + Object.assign({}, dependencyMock) + ]).hasDependencies((item, i) => i === 2) + ).be.true()); }); describe("disconnect", () => From 7daecaf8f004b742120111a49e08e416907da458 Mon Sep 17 00:00:00 2001 From: Ryan Tsao Date: Tue, 10 Apr 2018 17:25:56 -0700 Subject: [PATCH 005/310] Add script src check so crossorigin attributes only added when needed --- lib/web/JsonpMainTemplatePlugin.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/web/JsonpMainTemplatePlugin.js b/lib/web/JsonpMainTemplatePlugin.js index c13216572be..0006fe51bbd 100644 --- a/lib/web/JsonpMainTemplatePlugin.js +++ b/lib/web/JsonpMainTemplatePlugin.js @@ -121,15 +121,17 @@ class JsonpMainTemplatePlugin { : "", "script.charset = 'utf-8';", `script.timeout = ${chunkLoadTimeout / 1000};`, + `script.src = ${mainTemplate.requireFn}.p + ${scriptSrcPath};`, crossOriginLoading - ? `script.crossOrigin = ${JSON.stringify(crossOriginLoading)};` + ? `script.src.indexOf(window.location.origin) && script.crossOrigin = ${JSON.stringify( + crossOriginLoading + )};` : "", `if (${mainTemplate.requireFn}.nc) {`, Template.indent( `script.setAttribute("nonce", ${mainTemplate.requireFn}.nc);` ), "}", - `script.src = ${mainTemplate.requireFn}.p + ${scriptSrcPath};`, "var timeout = setTimeout(function(){", Template.indent([ "onScriptComplete({ type: 'timeout', target: script });" From 3710932abdaac02b0002887ef50723c1bc2a51ad Mon Sep 17 00:00:00 2001 From: Ryan Tsao Date: Tue, 10 Apr 2018 18:09:03 -0700 Subject: [PATCH 006/310] Add crossorigin attr test cases --- .../crossorigin/set-crossorigin/empty.js | 0 .../crossorigin/set-crossorigin/index.js | 27 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 test/cases/crossorigin/set-crossorigin/empty.js create mode 100644 test/cases/crossorigin/set-crossorigin/index.js diff --git a/test/cases/crossorigin/set-crossorigin/empty.js b/test/cases/crossorigin/set-crossorigin/empty.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/cases/crossorigin/set-crossorigin/index.js b/test/cases/crossorigin/set-crossorigin/index.js new file mode 100644 index 00000000000..cb992604f62 --- /dev/null +++ b/test/cases/crossorigin/set-crossorigin/index.js @@ -0,0 +1,27 @@ +it("should load script without crossorigin attribute", function(done) { + require.ensure([], function(require) { + require("./empty?a"); + }, "chunk-with-crossorigin-attr"); + // if in browser context, test that crossorigin attribute was not added. + if (typeof document !== 'undefined') { + var script = document.querySelector('script[src="js/chunk-with-crossorigin-attr.web.js"]'); + script.getAttribute('crossorigin').should.be.exactly(null); + } + done(); +}); + +it("should load script with crossorigin attribute 'anonymous'", function(done) { + var originalValue = __webpack_public_path__; + __webpack_public_path__ = 'https://example.com/'; + require.ensure([], function(require) { + require("./empty?b"); + }, "chunk-with-crossorigin-attr"); + __webpack_public_path__ = originalValue; + // if in browser context, test that crossorigin attribute was added. + if (typeof document !== 'undefined') { + var script = document.querySelector('script[src="https://example.com/js/chunk-with-crossorigin-attr.web.js"]'); + script.getAttribute('crossorigin').should.be.exactly('anonymous'); + } + __webpack_public_path__ = originalValue; + done(); +}); From 9a87c20d1c5f463ddabd89b3d85e2086f5e0deb0 Mon Sep 17 00:00:00 2001 From: Ryan Tsao Date: Wed, 11 Apr 2018 11:32:00 -0700 Subject: [PATCH 007/310] Ensure script src is set last, except for crossorigin attribute --- lib/web/JsonpMainTemplatePlugin.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/web/JsonpMainTemplatePlugin.js b/lib/web/JsonpMainTemplatePlugin.js index 0006fe51bbd..034c85e6447 100644 --- a/lib/web/JsonpMainTemplatePlugin.js +++ b/lib/web/JsonpMainTemplatePlugin.js @@ -121,17 +121,17 @@ class JsonpMainTemplatePlugin { : "", "script.charset = 'utf-8';", `script.timeout = ${chunkLoadTimeout / 1000};`, - `script.src = ${mainTemplate.requireFn}.p + ${scriptSrcPath};`, - crossOriginLoading - ? `script.src.indexOf(window.location.origin) && script.crossOrigin = ${JSON.stringify( - crossOriginLoading - )};` - : "", `if (${mainTemplate.requireFn}.nc) {`, Template.indent( `script.setAttribute("nonce", ${mainTemplate.requireFn}.nc);` ), "}", + `script.src = ${mainTemplate.requireFn}.p + ${scriptSrcPath};`, + crossOriginLoading + ? `if (script.src.indexOf(window.location.origin)) {${Template.indent( + `script.crossOrigin = ${JSON.stringify(crossOriginLoading)};` + )}}` + : "", "var timeout = setTimeout(function(){", Template.indent([ "onScriptComplete({ type: 'timeout', target: script });" From ca9734ec5e78a5f4828ea1677f05fe069c1eedb2 Mon Sep 17 00:00:00 2001 From: Ryan Tsao Date: Wed, 11 Apr 2018 11:36:21 -0700 Subject: [PATCH 008/310] Convert crossorigin attribute tests to use dynamic imports --- test/cases/crossorigin/set-crossorigin/index.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/test/cases/crossorigin/set-crossorigin/index.js b/test/cases/crossorigin/set-crossorigin/index.js index cb992604f62..07d57cc6f00 100644 --- a/test/cases/crossorigin/set-crossorigin/index.js +++ b/test/cases/crossorigin/set-crossorigin/index.js @@ -1,7 +1,5 @@ it("should load script without crossorigin attribute", function(done) { - require.ensure([], function(require) { - require("./empty?a"); - }, "chunk-with-crossorigin-attr"); + import("./empty?a" /* webpackChunkName: "chunk-with-crossorigin-attr" */); // if in browser context, test that crossorigin attribute was not added. if (typeof document !== 'undefined') { var script = document.querySelector('script[src="js/chunk-with-crossorigin-attr.web.js"]'); @@ -13,13 +11,11 @@ it("should load script without crossorigin attribute", function(done) { it("should load script with crossorigin attribute 'anonymous'", function(done) { var originalValue = __webpack_public_path__; __webpack_public_path__ = 'https://example.com/'; - require.ensure([], function(require) { - require("./empty?b"); - }, "chunk-with-crossorigin-attr"); + import("./empty?b" /* webpackChunkName: "chunk-without-crossorigin-attr" */); __webpack_public_path__ = originalValue; // if in browser context, test that crossorigin attribute was added. if (typeof document !== 'undefined') { - var script = document.querySelector('script[src="https://example.com/js/chunk-with-crossorigin-attr.web.js"]'); + var script = document.querySelector('script[src="https://example.com/js/chunk-without-crossorigin-attr.web.js"]'); script.getAttribute('crossorigin').should.be.exactly('anonymous'); } __webpack_public_path__ = originalValue; From ac479f1bfd8d4d81fa90972894349162d770f0f6 Mon Sep 17 00:00:00 2001 From: Ryan Tsao Date: Thu, 19 Apr 2018 17:13:13 -0700 Subject: [PATCH 009/310] Fix tests --- test/configCases/web/prefetch-preload/index.js | 2 ++ test/statsCases/preload/expected.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/test/configCases/web/prefetch-preload/index.js b/test/configCases/web/prefetch-preload/index.js index 361620e85d8..699196b320d 100644 --- a/test/configCases/web/prefetch-preload/index.js +++ b/test/configCases/web/prefetch-preload/index.js @@ -8,10 +8,12 @@ beforeEach(() => { oldNonce = __webpack_nonce__; oldPublicPath = __webpack_public_path__; global.document = new FakeDocument(); + global.location = {origin: "https://example.com"}; }); afterEach(() => { delete global.document; + delete global.location; __webpack_nonce__ = oldNonce; __webpack_public_path__ = oldPublicPath; }) diff --git a/test/statsCases/preload/expected.txt b/test/statsCases/preload/expected.txt index 75bf0ae9fa8..ba3db08aeed 100644 --- a/test/statsCases/preload/expected.txt +++ b/test/statsCases/preload/expected.txt @@ -3,7 +3,7 @@ normal.js 130 bytes 1 [emitted] normal preloaded2.js 127 bytes 2 [emitted] preloaded2 preloaded3.js 130 bytes 3 [emitted] preloaded3 - main.js 9.81 KiB 4 [emitted] main + main.js 9.8 KiB 4 [emitted] main inner.js 136 bytes 5 [emitted] inner inner2.js 201 bytes 6 [emitted] inner2 Entrypoint main = main.js (preload: preloaded2.js preloaded.js preloaded3.js) From 0b759d755808799bb0ad88630e5d1ae9568176b0 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 23 Apr 2018 21:56:18 +0200 Subject: [PATCH 010/310] reformat --- lib/web/JsonpMainTemplatePlugin.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/lib/web/JsonpMainTemplatePlugin.js b/lib/web/JsonpMainTemplatePlugin.js index 4a7ebcaf0a4..18e15b35716 100644 --- a/lib/web/JsonpMainTemplatePlugin.js +++ b/lib/web/JsonpMainTemplatePlugin.js @@ -161,9 +161,13 @@ class JsonpMainTemplatePlugin { "}", "script.src = jsonpScriptSrc(chunkId);", crossOriginLoading - ? `if (script.src.indexOf(window.location.origin)) {${Template.indent( - `script.crossOrigin = ${JSON.stringify(crossOriginLoading)};` - )}}` + ? Template.asString([ + "if (script.src.indexOf(window.location.origin)) {", + Template.indent( + `script.crossOrigin = ${JSON.stringify(crossOriginLoading)};` + ), + "}" + ]) : "", "var timeout = setTimeout(function(){", Template.indent([ @@ -219,9 +223,13 @@ class JsonpMainTemplatePlugin { 'link.as = "script";', "link.href = jsonpScriptSrc(chunkId);", crossOriginLoading - ? `if (link.href.indexOf(window.location.origin)) {${Template.indent( - `link.crossOrigin = ${JSON.stringify(crossOriginLoading)};` - )}}` + ? Template.asString([ + "if (link.href.indexOf(window.location.origin)) {", + Template.indent( + `link.crossOrigin = ${JSON.stringify(crossOriginLoading)};` + ), + "}" + ]) : "" ]); } From ab1d79bda29a21b3ff08c4970f41e1bbd3c59072 Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Wed, 25 Apr 2018 00:35:58 +0200 Subject: [PATCH 011/310] Fix - Exits abruptly when invalid JSON --- lib/JsonGenerator.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/JsonGenerator.js b/lib/JsonGenerator.js index 508ae5ccc51..455f09c64c0 100644 --- a/lib/JsonGenerator.js +++ b/lib/JsonGenerator.js @@ -6,11 +6,17 @@ const { ConcatSource } = require("webpack-sources"); -const stringifySafe = data => - JSON.stringify(data).replace( +const stringifySafe = data => { + const stringified = JSON.stringify(data); + if (!stringified) { + return undefined; // Invalid JSON + } + + return stringified.replace( /\u2028|\u2029/g, str => (str === "\u2029" ? "\\u2029" : "\\u2028") ); // invalid in JavaScript but valid JSON +}; class JsonGenerator { generate(module, dependencyTemplates, runtimeTemplate) { From cc3fa5964508fa3f1b90d51816a123a680b67315 Mon Sep 17 00:00:00 2001 From: Ron Korving Date: Mon, 19 Mar 2018 12:20:44 +0900 Subject: [PATCH 012/310] [DefinePlugin] Add ability to use function return values This adds the following API to DefinePlugin: new webpack.DefinePlugin({ BUILT_AT: webpack.DefinePlugin.runtimeValue(() => Date.now(), [fileDep, ...]) }) --- lib/DefinePlugin.js | 109 +++++++++++------- test/statsCases/define-plugin/123.txt | 1 + test/statsCases/define-plugin/321.txt | 1 + test/statsCases/define-plugin/expected.txt | 10 +- .../define-plugin/webpack.config.js | 24 ++++ 5 files changed, 103 insertions(+), 42 deletions(-) create mode 100644 test/statsCases/define-plugin/123.txt create mode 100644 test/statsCases/define-plugin/321.txt diff --git a/lib/DefinePlugin.js b/lib/DefinePlugin.js index 6114b05180e..7f618a8d023 100644 --- a/lib/DefinePlugin.js +++ b/lib/DefinePlugin.js @@ -9,26 +9,43 @@ const BasicEvaluatedExpression = require("./BasicEvaluatedExpression"); const ParserHelpers = require("./ParserHelpers"); const NullFactory = require("./NullFactory"); -const stringifyObj = obj => { +class RuntimeValue { + constructor(fn, fileDependencies) { + this.fn = fn; + this.fileDependencies = fileDependencies || []; + } + + exec(parser) { + for (const fileDependency of this.fileDependencies) { + parser.state.module.buildInfo.fileDependencies.add(fileDependency); + } + + return this.fn(); + } +} + +const stringifyObj = (obj, parser) => { return ( "Object({" + Object.keys(obj) .map(key => { const code = obj[key]; - return JSON.stringify(key) + ":" + toCode(code); + return JSON.stringify(key) + ":" + toCode(code, parser); }) .join(",") + "})" ); }; -const toCode = code => { +const toCode = (code, parser) => { if (code === null) return "null"; else if (code === undefined) return "undefined"; + else if (code instanceof RuntimeValue) + return toCode(code.exec(parser), parser); else if (code instanceof RegExp && code.toString) return code.toString(); else if (typeof code === "function" && code.toString) return "(" + code.toString() + ")"; - else if (typeof code === "object") return stringifyObj(code); + else if (typeof code === "object") return stringifyObj(code, parser); else return code + ""; }; @@ -37,6 +54,10 @@ class DefinePlugin { this.definitions = definitions; } + static runtimeValue(fn, fileDependencies) { + return new RuntimeValue(fn, fileDependencies); + } + apply(compiler) { const definitions = this.definitions; compiler.hooks.compilation.tap( @@ -55,6 +76,7 @@ class DefinePlugin { if ( code && typeof code === "object" && + !(code instanceof RuntimeValue) && !(code instanceof RegExp) ) { walkDefinitions(code, prefix + key + "."); @@ -81,7 +103,6 @@ class DefinePlugin { if (isTypeof) key = key.replace(/^typeof\s+/, ""); let recurse = false; let recurseTypeof = false; - code = toCode(code); if (!isTypeof) { parser.hooks.canRename .for(key) @@ -99,24 +120,25 @@ class DefinePlugin { */ if (recurse) return; recurse = true; - const res = parser.evaluate(code); + const res = parser.evaluate(toCode(code, parser)); recurse = false; res.setRange(expr.range); return res; }); - parser.hooks.expression - .for(key) - .tap( - "DefinePlugin", - /__webpack_require__/.test(code) - ? ParserHelpers.toConstantDependencyWithWebpackRequire( - parser, - code - ) - : ParserHelpers.toConstantDependency(parser, code) - ); + parser.hooks.expression.for(key).tap("DefinePlugin", expr => { + const strCode = toCode(code, parser); + if (/__webpack_require__/.test(strCode)) { + return ParserHelpers.toConstantDependencyWithWebpackRequire( + parser, + strCode + )(expr); + } else { + return ParserHelpers.toConstantDependency(parser, strCode)( + expr + ); + } + }); } - const typeofCode = isTypeof ? code : "typeof (" + code + ")"; parser.hooks.evaluateTypeof.for(key).tap("DefinePlugin", expr => { /** * this is needed in case there is a recursion in the DefinePlugin @@ -128,12 +150,18 @@ class DefinePlugin { */ if (recurseTypeof) return; recurseTypeof = true; + const typeofCode = isTypeof + ? toCode(code, parser) + : "typeof (" + toCode(code, parser) + ")"; const res = parser.evaluate(typeofCode); recurseTypeof = false; res.setRange(expr.range); return res; }); parser.hooks.typeof.for(key).tap("DefinePlugin", expr => { + const typeofCode = isTypeof + ? toCode(code, parser) + : "typeof (" + toCode(code, parser) + ")"; const res = parser.evaluate(typeofCode); if (!res.isString()) return; return ParserHelpers.toConstantDependency( @@ -144,7 +172,6 @@ class DefinePlugin { }; const applyObjectDefine = (key, obj) => { - const code = stringifyObj(obj); parser.hooks.canRename .for(key) .tap("DefinePlugin", ParserHelpers.approve); @@ -153,29 +180,29 @@ class DefinePlugin { .tap("DefinePlugin", expr => new BasicEvaluatedExpression().setTruthy().setRange(expr.range) ); - parser.hooks.evaluateTypeof - .for(key) - .tap("DefinePlugin", ParserHelpers.evaluateToString("object")); - parser.hooks.expression - .for(key) - .tap( - "DefinePlugin", - /__webpack_require__/.test(code) - ? ParserHelpers.toConstantDependencyWithWebpackRequire( - parser, - code - ) - : ParserHelpers.toConstantDependency(parser, code) - ); - parser.hooks.typeof - .for(key) - .tap( - "DefinePlugin", - ParserHelpers.toConstantDependency( + parser.hooks.evaluateTypeof.for(key).tap("DefinePlugin", expr => { + return ParserHelpers.evaluateToString("object")(expr); + }); + parser.hooks.expression.for(key).tap("DefinePlugin", expr => { + const strCode = stringifyObj(obj, parser); + + if (/__webpack_require__/.test(strCode)) { + return ParserHelpers.toConstantDependencyWithWebpackRequire( parser, - JSON.stringify("object") - ) - ); + strCode + )(expr); + } else { + return ParserHelpers.toConstantDependency(parser, strCode)( + expr + ); + } + }); + parser.hooks.typeof.for(key).tap("DefinePlugin", expr => { + return ParserHelpers.toConstantDependency( + parser, + JSON.stringify("object") + )(expr); + }); }; walkDefinitions(definitions, ""); diff --git a/test/statsCases/define-plugin/123.txt b/test/statsCases/define-plugin/123.txt new file mode 100644 index 00000000000..190a18037c6 --- /dev/null +++ b/test/statsCases/define-plugin/123.txt @@ -0,0 +1 @@ +123 diff --git a/test/statsCases/define-plugin/321.txt b/test/statsCases/define-plugin/321.txt new file mode 100644 index 00000000000..3ae0b938fa8 --- /dev/null +++ b/test/statsCases/define-plugin/321.txt @@ -0,0 +1 @@ +321 diff --git a/test/statsCases/define-plugin/expected.txt b/test/statsCases/define-plugin/expected.txt index 09dbcefb92e..aadf360644a 100644 --- a/test/statsCases/define-plugin/expected.txt +++ b/test/statsCases/define-plugin/expected.txt @@ -1,4 +1,4 @@ -Hash: 189d0d15eb46be80d1f9eaead63561588b554cc6 +Hash: 189d0d15eb46be80d1f9eaead63561588b554cc6932fcbff1d88af84338a Child Hash: 189d0d15eb46be80d1f9 Time: Xms @@ -13,5 +13,13 @@ Child Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names main.js 2.63 KiB 0 [emitted] main + Entrypoint main = main.js + [0] ./index.js 24 bytes {0} [built] +Child + Hash: 932fcbff1d88af84338a + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + main.js 2.64 KiB 0 [emitted] main Entrypoint main = main.js [0] ./index.js 24 bytes {0} [built] \ No newline at end of file diff --git a/test/statsCases/define-plugin/webpack.config.js b/test/statsCases/define-plugin/webpack.config.js index 999dc282d1d..32d87e4f89a 100644 --- a/test/statsCases/define-plugin/webpack.config.js +++ b/test/statsCases/define-plugin/webpack.config.js @@ -1,4 +1,11 @@ var webpack = require("../../../"); +var fs = require("fs"); +var join = require("path").join; + +function read(path) { + return JSON.stringify(fs.readFileSync(join(__dirname, path), "utf8")); +} + module.exports = [ { mode: "production", @@ -18,5 +25,22 @@ module.exports = [ VALUE: "321" }) ] + }, + + { + mode: "production", + entry: "./index", + plugins: [ + new webpack.DefinePlugin({ + VALUE: webpack.DefinePlugin.runtimeValue(() => read("123.txt"), [ + "./123.txt" + ]) + }), + new webpack.DefinePlugin({ + VALUE: webpack.DefinePlugin.runtimeValue(() => read("321.txt"), [ + "./321.txt" + ]) + }) + ] } ]; From 98ffc28e55c1067379d52bc8359b87459bab9086 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 30 Apr 2018 10:58:41 +0200 Subject: [PATCH 013/310] fix timestamp issue in WatchTestCases --- test/WatchTestCases.test.js | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/test/WatchTestCases.test.js b/test/WatchTestCases.test.js index ea4a3c6f515..c549c35f287 100644 --- a/test/WatchTestCases.test.js +++ b/test/WatchTestCases.test.js @@ -11,7 +11,7 @@ const checkArrayExpectation = require("./checkArrayExpectation"); const Stats = require("../lib/Stats"); const webpack = require("../lib/webpack"); -function copyDiff(src, dest) { +function copyDiff(src, dest, initial) { if (!fs.existsSync(dest)) fs.mkdirSync(dest); const files = fs.readdirSync(src); files.forEach(filename => { @@ -19,12 +19,22 @@ function copyDiff(src, dest) { const destFile = path.join(dest, filename); const directory = fs.statSync(srcFile).isDirectory(); if (directory) { - copyDiff(srcFile, destFile); + copyDiff(srcFile, destFile, initial); } else { var content = fs.readFileSync(srcFile); - if (/^DELETE\s*$/.test(content.toString("utf-8"))) + if (/^DELETE\s*$/.test(content.toString("utf-8"))) { fs.unlinkSync(destFile); - else fs.writeFileSync(destFile, content); + } else { + fs.writeFileSync(destFile, content); + if (initial) { + const longTimeAgo = Date.now() - 1000 * 60 * 60 * 24; + fs.utimesSync( + destFile, + Date.now() - longTimeAgo, + Date.now() - longTimeAgo + ); + } + } } }); } @@ -135,7 +145,7 @@ describe("WatchTestCases", () => { let lastHash = ""; const currentWatchStepModule = require("./helpers/currentWatchStep"); currentWatchStepModule.step = run.name; - copyDiff(path.join(testDirectory, run.name), tempDirectory); + copyDiff(path.join(testDirectory, run.name), tempDirectory, true); setTimeout(() => { const compiler = webpack(options); @@ -304,7 +314,8 @@ describe("WatchTestCases", () => { currentWatchStepModule.step = run.name; copyDiff( path.join(testDirectory, run.name), - tempDirectory + tempDirectory, + false ); }, 1500); } else { From 345c501a95d9771380d3812df304a5771db4565c Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 30 Apr 2018 11:51:57 +0200 Subject: [PATCH 014/310] add test case for #6793 --- .../plugins/define-plugin/0/index.js | 15 +++++++++++++ .../plugins/define-plugin/0/module.js | 2 ++ .../plugins/define-plugin/0/module2.js | 2 ++ .../plugins/define-plugin/0/value.txt | 1 + .../plugins/define-plugin/1/value.txt | 1 + .../plugins/define-plugin/webpack.config.js | 22 +++++++++++++++++++ 6 files changed, 43 insertions(+) create mode 100644 test/watchCases/plugins/define-plugin/0/index.js create mode 100644 test/watchCases/plugins/define-plugin/0/module.js create mode 100644 test/watchCases/plugins/define-plugin/0/module2.js create mode 100644 test/watchCases/plugins/define-plugin/0/value.txt create mode 100644 test/watchCases/plugins/define-plugin/1/value.txt create mode 100644 test/watchCases/plugins/define-plugin/webpack.config.js diff --git a/test/watchCases/plugins/define-plugin/0/index.js b/test/watchCases/plugins/define-plugin/0/index.js new file mode 100644 index 00000000000..f0b05c51d7c --- /dev/null +++ b/test/watchCases/plugins/define-plugin/0/index.js @@ -0,0 +1,15 @@ +it("should be able to use dynamic defines in watch mode", function() { + const module = require("./module"); + module.should.be.eql({ + default: WATCH_STEP, + type: "string" + }); +}); + +it("should not update a define when dependencies list is missing", function() { + const module2 = require("./module2"); + module2.should.be.eql({ + default: "0", + type: "string" + }); +}); diff --git a/test/watchCases/plugins/define-plugin/0/module.js b/test/watchCases/plugins/define-plugin/0/module.js new file mode 100644 index 00000000000..272cd4deaa4 --- /dev/null +++ b/test/watchCases/plugins/define-plugin/0/module.js @@ -0,0 +1,2 @@ +export default TEST_VALUE; +export const type = typeof TEST_VALUE; diff --git a/test/watchCases/plugins/define-plugin/0/module2.js b/test/watchCases/plugins/define-plugin/0/module2.js new file mode 100644 index 00000000000..4bac8477803 --- /dev/null +++ b/test/watchCases/plugins/define-plugin/0/module2.js @@ -0,0 +1,2 @@ +export default TEST_VALUE2; +export const type = typeof TEST_VALUE2; diff --git a/test/watchCases/plugins/define-plugin/0/value.txt b/test/watchCases/plugins/define-plugin/0/value.txt new file mode 100644 index 00000000000..573541ac970 --- /dev/null +++ b/test/watchCases/plugins/define-plugin/0/value.txt @@ -0,0 +1 @@ +0 diff --git a/test/watchCases/plugins/define-plugin/1/value.txt b/test/watchCases/plugins/define-plugin/1/value.txt new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/test/watchCases/plugins/define-plugin/1/value.txt @@ -0,0 +1 @@ +1 diff --git a/test/watchCases/plugins/define-plugin/webpack.config.js b/test/watchCases/plugins/define-plugin/webpack.config.js new file mode 100644 index 00000000000..113eb10e5b3 --- /dev/null +++ b/test/watchCases/plugins/define-plugin/webpack.config.js @@ -0,0 +1,22 @@ +const path = require("path"); +const fs = require("fs"); +const webpack = require("../../../../"); +const valueFile = path.resolve( + __dirname, + "../../../js/watch-src/plugins/define-plugin/value.txt" +); +module.exports = { + plugins: [ + new webpack.DefinePlugin({ + TEST_VALUE: webpack.DefinePlugin.runtimeValue( + () => { + return JSON.stringify(fs.readFileSync(valueFile, "utf-8").trim()); + }, + [valueFile] + ), + TEST_VALUE2: webpack.DefinePlugin.runtimeValue(() => { + return JSON.stringify(fs.readFileSync(valueFile, "utf-8").trim()); + }, []) + }) + ] +}; From 27731225789e60d1355e149bc5f9afdc084b776d Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Thu, 3 May 2018 09:57:02 -0700 Subject: [PATCH 015/310] chore(types): add Compiler and Compilation type support --- .github/ISSUE_TEMPLATE/Bug_report.md | 80 +++++++++++------------ .github/ISSUE_TEMPLATE/Feature_request.md | 54 +++++++-------- .github/ISSUE_TEMPLATE/Other.md | 18 ++--- 3 files changed, 76 insertions(+), 76 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md index 0404afc2825..dc81609d712 100644 --- a/.github/ISSUE_TEMPLATE/Bug_report.md +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -1,40 +1,40 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - - - - -# Bug report - - - - - - -**What is the current behavior?** - - -**If the current behavior is a bug, please provide the steps to reproduce.** - - - - - - - - - -**What is the expected behavior?** - - - - - -**Other relevant information:** -webpack version: -Node.js version: -Operating System: -Additional tools: +--- +name: Bug report +about: Create a report to help us improve + +--- + + + + +# Bug report + + + + + + +**What is the current behavior?** + + +**If the current behavior is a bug, please provide the steps to reproduce.** + + + + + + + + + +**What is the expected behavior?** + + + + + +**Other relevant information:** +webpack version: +Node.js version: +Operating System: +Additional tools: diff --git a/.github/ISSUE_TEMPLATE/Feature_request.md b/.github/ISSUE_TEMPLATE/Feature_request.md index e23f20d97cf..1b69aa08fd4 100644 --- a/.github/ISSUE_TEMPLATE/Feature_request.md +++ b/.github/ISSUE_TEMPLATE/Feature_request.md @@ -1,27 +1,27 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- - - - -## Feature request - - - - - - - -**What is the expected behavior?** - - -**What is motivation or use case for adding/changing the behavior?** - - -**How should this be implemented in your opinion?** - - -**Are you willing to work on this yourself?** -yes +--- +name: Feature request +about: Suggest an idea for this project + +--- + + + +## Feature request + + + + + + + +**What is the expected behavior?** + + +**What is motivation or use case for adding/changing the behavior?** + + +**How should this be implemented in your opinion?** + + +**Are you willing to work on this yourself?** +yes diff --git a/.github/ISSUE_TEMPLATE/Other.md b/.github/ISSUE_TEMPLATE/Other.md index 5e5b62bd605..033e88fcad4 100644 --- a/.github/ISSUE_TEMPLATE/Other.md +++ b/.github/ISSUE_TEMPLATE/Other.md @@ -1,9 +1,9 @@ ---- -name: Other -about: Something else - ---- - - - - +--- +name: Other +about: Something else + +--- + + + + From a3092c64314ae784d3bdfbe20a9ea0ef49657717 Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Thu, 3 May 2018 09:57:02 -0700 Subject: [PATCH 016/310] chore(types): add Compiler and Compilation type support --- declarations.d.ts | 93 +++ lib/AsyncDependenciesBlock.js | 58 ++ lib/Chunk.js | 22 + lib/Compilation.js | 516 +++++++++++- lib/Compiler.js | 70 +- lib/ContextModule.js | 9 +- lib/DelegatedModule.js | 4 + lib/DependenciesBlock.js | 42 +- lib/DependenciesBlockVariable.js | 23 +- lib/Dependency.js | 3 + lib/DynamicEntryPlugin.js | 24 +- lib/EntryOptionPlugin.js | 12 + lib/JavascriptGenerator.js | 2 +- lib/Module.js | 12 +- lib/MultiEntryPlugin.js | 23 +- lib/NormalModule.js | 2 + lib/SingleEntryPlugin.js | 14 + lib/WebpackError.js | 11 +- lib/dependencies/DependencyReference.js | 9 + lib/dependencies/LoaderPlugin.js | 6 +- lib/dependencies/ModuleDependency.js | 3 + lib/dependencies/MultiEntryDependency.js | 5 + lib/dependencies/SingleEntryDependency.js | 4 + lib/optimize/ConcatenatedModule.js | 2 +- lib/util/Semaphore.js | 12 + package.json | 1 + tsconfig.json | 113 +-- yarn.lock | 916 ++++++++++------------ 28 files changed, 1378 insertions(+), 633 deletions(-) diff --git a/declarations.d.ts b/declarations.d.ts index d73b4d8305a..42a387af58b 100644 --- a/declarations.d.ts +++ b/declarations.d.ts @@ -8,6 +8,99 @@ declare namespace NodeJS { } } +declare module "neo-async" { + export interface Dictionary { + [key: string]: T; + } + export type IterableCollection = T[] | IterableIterator | Dictionary; + + export interface ErrorCallback { + (err?: T): void; + } + export interface AsyncBooleanResultCallback { + (err?: E, truthValue?: boolean): void; + } + export interface AsyncResultCallback { + (err?: E, result?: T): void; + } + export interface AsyncResultArrayCallback { + (err?: E, results?: Array): void; + } + export interface AsyncResultObjectCallback { + (err: E | undefined, results: Dictionary): void; + } + + export interface AsyncFunction { + (callback: (err?: E, result?: T) => void): void; + } + export interface AsyncFunctionEx { + (callback: (err?: E, ...results: T[]) => void): void; + } + export interface AsyncIterator { + (item: T, callback: ErrorCallback): void; + } + export interface AsyncForEachOfIterator { + (item: T, key: number | string, callback: ErrorCallback): void; + } + export interface AsyncResultIterator { + (item: T, callback: AsyncResultCallback): void; + } + export interface AsyncMemoIterator { + (memo: R | undefined, item: T, callback: AsyncResultCallback): void; + } + export interface AsyncBooleanIterator { + (item: T, callback: AsyncBooleanResultCallback): void; + } + + export interface AsyncWorker { + (task: T, callback: ErrorCallback): void; + } + export interface AsyncVoidFunction { + (callback: ErrorCallback): void; + } + + export type AsyncAutoTasks, E> = { + [K in keyof R]: AsyncAutoTask + }; + export type AsyncAutoTask, E> = + | AsyncAutoTaskFunctionWithoutDependencies + | (keyof R | AsyncAutoTaskFunction)[]; + export interface AsyncAutoTaskFunctionWithoutDependencies { + (cb: AsyncResultCallback | ErrorCallback): void; + } + export interface AsyncAutoTaskFunction, E> { + (results: R, cb: AsyncResultCallback | ErrorCallback): void; + } + + export function each( + arr: IterableCollection, + iterator: AsyncIterator, + callback?: ErrorCallback + ): void; + + export function map( + arr: T[] | IterableIterator, + iterator: AsyncResultIterator, + callback?: AsyncResultArrayCallback + ): void; + export function map( + arr: Dictionary, + iterator: AsyncResultIterator, + callback?: AsyncResultArrayCallback + ): void; + + export function parallel( + tasks: Array>, + callback?: AsyncResultArrayCallback + ): void; + export function parallel( + tasks: Dictionary>, + callback?: AsyncResultObjectCallback + ): void; + + export const forEach: typeof each; +} + // There are no typings for chrome-trace-event declare module "chrome-trace-event" { interface Event { diff --git a/lib/AsyncDependenciesBlock.js b/lib/AsyncDependenciesBlock.js index 3bf22d2e297..a9c03a53f94 100644 --- a/lib/AsyncDependenciesBlock.js +++ b/lib/AsyncDependenciesBlock.js @@ -5,7 +5,34 @@ "use strict"; const DependenciesBlock = require("./DependenciesBlock"); +/** + * @typedef {import("./ChunkGroup")} ChunkGroup + * @typedef {import("./Module")} Module + * @typedef {import("crypto").Hash} Hash + * @typedef {TODO} GroupOptions + * + */ + +/** + * @typedef {Object} SourcePosition + * @property {number} line + * @property {number} column + */ + +/** + * @typedef {Object} SourceLocation + * @property {number} index + * @property {SourcePosition} start + * @property {SourcePosition} end + */ + module.exports = class AsyncDependenciesBlock extends DependenciesBlock { + /** + * @param {GroupOptions} groupOptions options for the group + * @param {Module} module the Module object + * @param {SourceLocation=} loc the line of code + * @param {TODO=} request the request + */ constructor(groupOptions, module, loc, request) { super(); if (typeof groupOptions === "string") { @@ -14,28 +41,50 @@ module.exports = class AsyncDependenciesBlock extends DependenciesBlock { groupOptions = { name: undefined }; } this.groupOptions = groupOptions; + /** @type {ChunkGroup=} */ this.chunkGroup = undefined; this.module = module; this.loc = loc; this.request = request; + /** @type {DependenciesBlock} */ + this.parent = undefined; } + /** + * @returns {string} The name of the chunk + */ get chunkName() { return this.groupOptions.name; } + /** + * @param {string} value The new chunk name + * @returns {void} + */ set chunkName(value) { this.groupOptions.name = value; } + /** + * @returns {never} this throws and should never be called + */ get chunks() { throw new Error("Moved to AsyncDependenciesBlock.chunkGroup"); } + /** + * @param {never} value setter value + * @returns {never} this is going to throw therefore we should throw type + * assertions by returning never + */ set chunks(value) { throw new Error("Moved to AsyncDependenciesBlock.chunkGroup"); } + /** + * @param {Hash} hash the hash used to track block changes, from "crypto" module + * @returns {void} + */ updateHash(hash) { hash.update(JSON.stringify(this.groupOptions)); hash.update( @@ -50,16 +99,25 @@ module.exports = class AsyncDependenciesBlock extends DependenciesBlock { super.updateHash(hash); } + /** + * @returns {void} + */ disconnect() { this.chunkGroup = undefined; super.disconnect(); } + /** + * @returns {void} + */ unseal() { this.chunkGroup = undefined; super.unseal(); } + /** + * @returns {void} + */ sortItems() { super.sortItems(); } diff --git a/lib/Chunk.js b/lib/Chunk.js index f0c6f3902dd..a0ea24a7491 100644 --- a/lib/Chunk.js +++ b/lib/Chunk.js @@ -17,6 +17,7 @@ const ERR_CHUNK_INITIAL = /** @typedef {import("./ChunkGroup")} ChunkGroup */ /** @typedef {import("./ModuleReason.js")} ModuleReason */ /** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("crypto").Hash} Hash */ /** * @typedef {Object} Identifiable an object who contains an identifier function property @@ -471,6 +472,11 @@ class Chunk { return this.addMultiplierAndOverhead(this.modulesSize(), options); } + /** + * @param {Chunk} otherChunk the other chunk + * @param {TODO} options the options for this function + * @returns {number | false} the size, or false if it can't be integrated + */ integratedSize(otherChunk, options) { // Chunk if it's possible to integrate this chunk if (!this.canBeIntegrated(otherChunk)) { @@ -500,6 +506,9 @@ class Chunk { this.sortModules(); } + /** + * @returns {Set} a set of all the async chunks + */ getAllAsyncChunks() { const queue = new Set(); const chunks = new Set(); @@ -522,6 +531,10 @@ class Chunk { return chunks; } + /** + * @param {Hash} realHash the hash for the chunk maps + * @returns {{ hash: TODO, contentHash: TODO, name: TODO }} the chunk map information + */ getChunkMaps(realHash) { const chunkHashMap = Object.create(null); const chunkContentHashMap = Object.create(null); @@ -544,6 +557,9 @@ class Chunk { }; } + /** + * @returns {Record>>} a record object of names to lists of child ids(?) + */ getChildIdsByOrders() { const lists = new Map(); for (const group of this.groupsIterable) { @@ -600,6 +616,12 @@ class Chunk { return chunkMaps; } + /** @typedef {(module: Module) => true} FilterFn */ + + /** + * @param {FilterFn} filterFn function used to filter modules + * @returns {TODO} module map information + */ getChunkModuleMaps(filterFn) { const chunkModuleIdMap = Object.create(null); const chunkModuleHashMap = Object.create(null); diff --git a/lib/Compilation.js b/lib/Compilation.js index 5f482ba3eb5..2755c6f82b9 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -35,14 +35,93 @@ const createHash = require("./util/createHash"); const Queue = require("./util/Queue"); const SortableSet = require("./util/SortableSet"); const GraphHelpers = require("./GraphHelpers"); - -const byId = (a, b) => { - if (a.id < b.id) return -1; - if (a.id > b.id) return 1; +const SingleEntryDependency = require("./dependencies/SingleEntryDependency"); + +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./WebpackError")} WebpackError */ +/** @typedef {import("./DependenciesBlockVariable")} DependenciesBlockVariable */ +/** @typedef {import("./dependencies/SingleEntryDependency")} SingleEntryDependency */ +/** @typedef {import("./dependencies/MultiEntryDependency")} MultiEntryDependency */ +/** @typedef {import("./dependencies/DllEntryDependency")} DllEntryDependency */ +/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ +/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ + +/** @typedef {SingleEntryDependency|MultiEntryDependency|DllEntryDependency} PossibleEntryDependencies */ +/** @typedef {{[assetName: string]: Source}} CompilationAssets */ +/** @typedef {(err: Error|null, result?: Module) => void } ModuleCallback */ +/** @typedef {(err?: Error|null, result?: Module) => void } ModuleChainCallback */ +/** @typedef {(module: Module) => void} OnModuleCallback */ +/** @typedef {(err?: Error|null) => void} CompilationSealCallback */ +/** @typedef {{apply: (dep: Dependency, source: Source, runtime: RuntimeTemplate) => void}} DependencyTemplate */ +/** @typedef {(d: Dependency) => any} DepBlockVarDependenciesCallback */ +/** @typedef {new (...args: any[]) => Dependency} DepConstructor */ +/** @typedef {{apply: () => void}} Plugin */ + +/** + * @typedef {Object} ModuleFactoryCreateDataContextInfo + * @property {string} issuer + * @property {string} compiler + */ + +/** + * @typedef {Object} ModuleFactoryCreateData + * @property {ModuleFactoryCreateDataContextInfo} contextInfo + * @property {any=} resolveOptions + * @property {string} context + * @property {Dependency[]} dependencies + */ + +/** + * @typedef {Object} ModuleFactory + * @property {(data: ModuleFactoryCreateData, callback: ModuleCallback) => any} create + */ + +/** + * @typedef {Object} SortedDependency + * @property {ModuleFactory} factory + * @property {Dependency[]} dependencies + */ + +/** + * @typedef {Object} SourcePosition + * @property {number} line + * @property {number} column + */ + +/** + * @typedef {Object} SourceLocation + * @property {number} index + * @property {SourcePosition} start + * @property {SourcePosition} end + */ + +/** + * @typedef {Object} AvailableModulesChunkGroupMapping + * @property {ChunkGroup} chunkGroup + * @property {Set} availableModules + */ + +/** + * @param {Chunk} a first chunk to sort by id + * @param {Chunk} b second chunk to sort by id + * @returns {-1|0|1} sort value + */ +function byId(a, b) { + if (a.id && b.id) { + if (a.id < b.id) return -1; + if (a.id > b.id) return 1; + } return 0; -}; +} -const byIdOrIdentifier = (a, b) => { +/** + * @param {Module} a first module to sort by + * @param {Module} b second module to sort by + * @returns {-1|0|1} sort value + */ +function byIdOrIdentifier(a, b) { if (a.id < b.id) return -1; if (a.id > b.id) return 1; const identA = a.identifier(); @@ -50,9 +129,14 @@ const byIdOrIdentifier = (a, b) => { if (identA < identB) return -1; if (identA > identB) return 1; return 0; -}; +} -const byIndexOrIdentifier = (a, b) => { +/** + * @param {Module} a first module to sort by + * @param {Module} b second module to sort by + * @returns {-1|0|1} sort value + */ +function byIndexOrIdentifier(a, b) { if (a.index < b.index) return -1; if (a.index > b.index) return 1; const identA = a.identifier(); @@ -60,35 +144,59 @@ const byIndexOrIdentifier = (a, b) => { if (identA < identB) return -1; if (identA > identB) return 1; return 0; -}; +} -const byNameOrHash = (a, b) => { +/** + * @param {Compilation} a first compilation to sort by + * @param {Compilation} b second compilation to sort by + * @returns {-1|0|1} sort value + */ +function byNameOrHash(a, b) { if (a.name < b.name) return -1; if (a.name > b.name) return 1; if (a.fullHash < b.fullHash) return -1; - if (a.fullhash > b.fullHash) return 1; + if (a.fullHash > b.fullHash) return 1; return 0; -}; +} -const iterationBlockVariable = (variables, fn) => { +/** + * @param {DependenciesBlockVariable[]} variables DepBlock Variables to iterate over + * @param {DepBlockVarDependenciesCallback} fn callback to apply on iterated elements + * @returns {void} + */ +function iterationBlockVariable(variables, fn) { for ( let indexVariable = 0; indexVariable < variables.length; indexVariable++ ) { + // TODO: Remove when Dependency + DependenciesBlockVariable is typed + /** @type {Dependency[]} */ const varDep = variables[indexVariable].dependencies; for (let indexVDep = 0; indexVDep < varDep.length; indexVDep++) { fn(varDep[indexVDep]); } } -}; +} -const iterationOfArrayCallback = (arr, fn) => { +/** + * @template {T} + * @param {T[]} arr array of elements to iterate over + * @param {function(T): void} fn callback applied to each element + * @returns {void} + */ +function iterationOfArrayCallback(arr, fn) { for (let index = 0; index < arr.length; index++) { fn(arr[index]); } -}; +} +/** + * @template {T} + * @param {Set} set set to add items to + * @param {Set} otherSet set to add items from + * @returns {void} + */ function addAllToSet(set, otherSet) { for (const item of otherSet) { set.add(item); @@ -96,92 +204,156 @@ function addAllToSet(set, otherSet) { } class Compilation extends Tapable { + /** + * Creates an instance of Compilation. + * @param {Compiler} compiler the compiler which created the compilation + */ constructor(compiler) { super(); this.hooks = { + /** @type {SyncHook} */ buildModule: new SyncHook(["module"]), + /** @type {SyncHook} */ rebuildModule: new SyncHook(["module"]), + /** @type {SyncHook} */ failedModule: new SyncHook(["module", "error"]), + /** @type {SyncHook} */ succeedModule: new SyncHook(["module"]), - + /** @type {SyncHook} */ finishModules: new SyncHook(["modules"]), + /** @type {SyncHook} */ finishRebuildingModule: new SyncHook(["module"]), - + /** @type {SyncHook} */ unseal: new SyncHook([]), + /** @type {SyncHook} */ seal: new SyncHook([]), + /** @type {SyncBailHook} */ optimizeDependenciesBasic: new SyncBailHook(["modules"]), + /** @type {SyncBailHook} */ optimizeDependencies: new SyncBailHook(["modules"]), + /** @type {SyncBailHook} */ optimizeDependenciesAdvanced: new SyncBailHook(["modules"]), + /** @type {SyncBailHook} */ afterOptimizeDependencies: new SyncHook(["modules"]), + /** @type {SyncHook} */ optimize: new SyncHook([]), - + /** @type {SyncBailHook} */ optimizeModulesBasic: new SyncBailHook(["modules"]), + /** @type {SyncBailHook} */ optimizeModules: new SyncBailHook(["modules"]), + /** @type {SyncBailHook} */ optimizeModulesAdvanced: new SyncBailHook(["modules"]), + /** @type {SyncHook} */ afterOptimizeModules: new SyncHook(["modules"]), + /** @type {SyncBailHook} */ optimizeChunksBasic: new SyncBailHook(["chunks", "chunkGroups"]), + /** @type {SyncBailHook} */ optimizeChunks: new SyncBailHook(["chunks", "chunkGroups"]), + /** @type {SyncBailHook} */ optimizeChunksAdvanced: new SyncBailHook(["chunks", "chunkGroups"]), + /** @type {SyncHook} */ afterOptimizeChunks: new SyncHook(["chunks", "chunkGroups"]), + /** @type {AsyncSeriesHook} */ optimizeTree: new AsyncSeriesHook(["chunks", "modules"]), + /** @type {SyncHook} */ afterOptimizeTree: new SyncHook(["chunks", "modules"]), + /** @type {SyncBailHook} */ optimizeChunkModulesBasic: new SyncBailHook(["chunks", "modules"]), + /** @type {SyncBailHook} */ optimizeChunkModules: new SyncBailHook(["chunks", "modules"]), + /** @type {SyncBailHook} */ optimizeChunkModulesAdvanced: new SyncBailHook(["chunks", "modules"]), + /** @type {SyncHook} */ afterOptimizeChunkModules: new SyncHook(["chunks", "modules"]), + /** @type {SyncBailHook} */ shouldRecord: new SyncBailHook([]), + /** @type {SyncHook} */ reviveModules: new SyncHook(["modules", "records"]), + /** @type {SyncHook} */ optimizeModuleOrder: new SyncHook(["modules"]), + /** @type {SyncHook} */ advancedOptimizeModuleOrder: new SyncHook(["modules"]), + /** @type {SyncHook} */ beforeModuleIds: new SyncHook(["modules"]), + /** @type {SyncHook} */ moduleIds: new SyncHook(["modules"]), + /** @type {SyncHook} */ optimizeModuleIds: new SyncHook(["modules"]), + /** @type {SyncHook} */ afterOptimizeModuleIds: new SyncHook(["modules"]), + /** @type {SyncHook} */ reviveChunks: new SyncHook(["chunks", "records"]), + /** @type {SyncHook} */ optimizeChunkOrder: new SyncHook(["chunks"]), + /** @type {SyncHook} */ beforeChunkIds: new SyncHook(["chunks"]), + /** @type {SyncHook} */ optimizeChunkIds: new SyncHook(["chunks"]), + /** @type {SyncHook} */ afterOptimizeChunkIds: new SyncHook(["chunks"]), + /** @type {SyncHook} */ recordModules: new SyncHook(["modules", "records"]), + /** @type {SyncHook} */ recordChunks: new SyncHook(["chunks", "records"]), + /** @type {SyncHook} */ beforeHash: new SyncHook([]), + /** @type {SyncHook} */ contentHash: new SyncHook(["chunk"]), + /** @type {SyncHook} */ afterHash: new SyncHook([]), - + /** @type {SyncHook} */ recordHash: new SyncHook(["records"]), - + /** @type {SyncHook} */ record: new SyncHook(["compilation", "records"]), + /** @type {SyncHook} */ beforeModuleAssets: new SyncHook([]), + /** @type {SyncBailHook} */ shouldGenerateChunkAssets: new SyncBailHook([]), + /** @type {SyncHook} */ beforeChunkAssets: new SyncHook([]), + /** @type {SyncHook} */ additionalChunkAssets: new SyncHook(["chunks"]), + /** @type {AsyncSeriesHook} */ additionalAssets: new AsyncSeriesHook([]), + /** @type {AsyncSeriesHook} */ optimizeChunkAssets: new AsyncSeriesHook(["chunks"]), + /** @type {SyncHook} */ afterOptimizeChunkAssets: new SyncHook(["chunks"]), + /** @type {AsyncSeriesHook} */ optimizeAssets: new AsyncSeriesHook(["assets"]), + /** @type {SyncHook} */ afterOptimizeAssets: new SyncHook(["assets"]), + /** @type {SyncBailHook} */ needAdditionalSeal: new SyncBailHook([]), + /** @type {AsyncSeriesHook} */ afterSeal: new AsyncSeriesHook([]), + /** @type {SyncHook} */ chunkHash: new SyncHook(["chunk", "chunkHash"]), + /** @type {SyncHook} */ moduleAsset: new SyncHook(["module", "filename"]), + /** @type {SyncHook} */ chunkAsset: new SyncHook(["chunk", "filename"]), + /** @type {SyncWaterfallHook} */ assetPath: new SyncWaterfallHook(["filename", "data"]), // TODO MainTemplate + /** @type {SyncBailHook} */ needAdditionalPass: new SyncBailHook([]), + + /** @type {SyncHook} */ childCompiler: new SyncHook([ "childCompiler", "compilerName", @@ -190,11 +362,16 @@ class Compilation extends Tapable { // TODO the following hooks are weirdly located here // TODO move them for webpack 5 + /** @type {SyncHook} */ normalModuleLoader: new SyncHook(["loaderContext", "module"]), + /** @type {SyncBailHook} */ optimizeExtractedChunksBasic: new SyncBailHook(["chunks"]), + /** @type {SyncBailHook} */ optimizeExtractedChunks: new SyncBailHook(["chunks"]), + /** @type {SyncBailHook} */ optimizeExtractedChunksAdvanced: new SyncBailHook(["chunks"]), + /** @type {SyncHook} */ afterOptimizeExtractedChunks: new SyncHook(["chunks"]) }; this._pluginCompat.tap("Compilation", options => { @@ -208,7 +385,9 @@ class Compilation extends Tapable { break; } }); + /** @type {string=} */ this.name = undefined; + /** @type {Compiler} */ this.compiler = compiler; this.resolverFactory = compiler.resolverFactory; this.inputFileSystem = compiler.inputFileSystem; @@ -216,6 +395,7 @@ class Compilation extends Tapable { const options = (this.options = compiler.options); this.outputOptions = options && options.output; + /** @type {boolean=} */ this.bail = options && options.bail; this.profile = options && options.profile; this.performance = options && options.performance; @@ -237,34 +417,56 @@ class Compilation extends Tapable { this.semaphore = new Semaphore(options.parallelism || 100); this.entries = []; + /** @private @type {{name: string, request: string, module: Module}[]} */ this._preparedEntrypoints = []; this.entrypoints = new Map(); + /** @type {Chunk[]} */ this.chunks = []; + /** @type {ChunkGroup[]} */ this.chunkGroups = []; + /** @type {Map} */ this.namedChunkGroups = new Map(); + /** @type {Map} */ this.namedChunks = new Map(); + /** @type {Module[]} */ this.modules = []; + /** @private @type {Map} */ this._modules = new Map(); this.cache = null; this.records = null; + /** @type {number=} */ this.nextFreeModuleIndex = undefined; + /** @type {number=} */ this.nextFreeModuleIndex2 = undefined; + /** @type {string[]} */ this.additionalChunkAssets = []; + /** @type {CompilationAssets} */ this.assets = {}; + /** @type {WebpackError[]} */ this.errors = []; + /** @type {WebpackError[]} */ this.warnings = []; + /** @type {Compilation[]} */ this.children = []; + /** @type {Map} */ this.dependencyFactories = new Map(); + /** @type {Map} */ this.dependencyTemplates = new Map(); this.dependencyTemplates.set("hash", ""); this.childrenCounters = {}; + /** @type {Set} */ this.usedChunkIds = null; + /** @type {Set} */ this.usedModuleIds = null; + /** @type {Map=} */ this.fileTimestamps = undefined; + /** @type {Map=} */ this.contextTimestamps = undefined; + /** @type {Set} */ this.compilationDependencies = undefined; - + /** @private @type {Map} */ this._buildingModules = new Map(); + /** @private @type {Map} */ this._rebuildingModules = new Map(); } @@ -272,6 +474,12 @@ class Compilation extends Tapable { return new Stats(this); } + /** + * @param {Module} module module to be added that was created + * @param {any=} cacheGroup cacheGroup it is apart of + * @returns {{module: Module, issuer: boolean, build: boolean, dependencies: boolean}} returns meta about whether or not the module had built + * had an issuer, or any dependnecies + */ addModule(module, cacheGroup) { const identifier = module.identifier(); const alreadyAddedModule = this._modules.get(identifier); @@ -327,15 +535,30 @@ class Compilation extends Tapable { }; } + /** + * Fetches a module from a compilation by its identifier + * @param {Module} module the module provided + * @returns {Module} the module requested + */ getModule(module) { const identifier = module.identifier(); return this._modules.get(identifier); } + /** + * Attempts to search for a module by its identifier + * @param {string} identifier identifier (usually path) for module + * @returns {Module|undefined} attempt to search for module and return it, else undefined + */ findModule(identifier) { return this._modules.get(identifier); } + /** + * @param {Module} module module with its callback list + * @param {any} callback the callback function + * @returns {void} + */ waitForBuildingFinished(module, callback) { let callbackList = this._buildingModules.get(module); if (callbackList) { @@ -345,6 +568,16 @@ class Compilation extends Tapable { } } + /** + * Builds the module object + * + * @param {Module} module module to be built + * @param {boolean} optional optional flag + * @param {Module=} origin origin module this module build was requested from + * @param {Dependency[]=} dependencies optional dependencies from the module to be built + * @param {any} thisCallback the callback + * @returns {any} returns the callback function with results + */ buildModule(module, optional, origin, dependencies, thisCallback) { let callbackList = this._buildingModules.get(module); if (callbackList) { @@ -396,6 +629,11 @@ class Compilation extends Tapable { ); } + /** + * @param {Module} module to be processed for deps + * @param {*} callback callback to be triggered + * @returns {void} + */ processModuleDependencies(module, callback) { const dependencies = new Map(); @@ -457,6 +695,15 @@ class Compilation extends Tapable { ); } + /** + * @param {Module} module module to add deps to + * @param {SortedDependency[]} dependencies set of sorted dependencies to iterate through + * @param {(boolean|null)=} bail whether to bail or not + * @param {any} cacheGroup optional cacheGroup + * @param {boolean} recursive whether it is recursive traversal + * @param {function} callback callback for when dependencies are finished being added + * @returns {void} + */ addModuleDependencies( module, dependencies, @@ -623,6 +870,14 @@ class Compilation extends Tapable { ); } + /** + * + * @param {string} context context string path + * @param {Dependency} dependency dependency used to create Module chain + * @param {OnModuleCallback} onModule function invoked on modules creation + * @param {ModuleChainCallback} callback callback for when module chain is complete + * @returns {void|never} will throw if dependency instance is not a valid Dependency + */ _addModuleChain(context, dependency, onModule, callback) { const start = this.profile && Date.now(); const currentProfile = this.profile && {}; @@ -644,7 +899,10 @@ class Compilation extends Tapable { ) { throw new Error("Parameter 'dependency' must be a Dependency"); } - + // @ts-ignore + // TODO: Not sure how to handle the + // dependency.constructor error, + // maybe I typed it wrong const moduleFactory = this.dependencyFactories.get(dependency.constructor); if (!moduleFactory) { throw new Error( @@ -655,6 +913,7 @@ class Compilation extends Tapable { } this.semaphore.acquire(() => { + /** @type {ModuleFactory} */ moduleFactory.create( { contextInfo: { @@ -731,12 +990,25 @@ class Compilation extends Tapable { }); } + /** + * + * @param {string} context context path for entry + * @param {PossibleEntryDependencies} entry entry dependency being created + * @param {string} name name of entry + * @param {ModuleCallback} callback callback function + * @returns {void} returns + */ addEntry(context, entry, name, callback) { const slot = { name: name, - request: entry.request, + request: null, module: null }; + + if (entry instanceof SingleEntryDependency) { + slot.request = entry.request; + } + this._preparedEntrypoints.push(slot); this._addModuleChain( context, @@ -760,6 +1032,12 @@ class Compilation extends Tapable { ); } + /** + * @param {string} context context path string + * @param {PossibleEntryDependencies} dependency dep used to create module + * @param {ModuleCallback} callback module callback sending module up a level + * @returns {void} + */ prefetch(context, dependency, callback) { this._addModuleChain( context, @@ -831,6 +1109,10 @@ class Compilation extends Tapable { } } + /** + * @param {CompilationSealCallback} callback signals when the seal method is finishes + * @returns {void} + */ seal(callback) { this.hooks.seal.call(); @@ -970,10 +1252,19 @@ class Compilation extends Tapable { }); } + /** + * @param {Module[]} modules the modules array on compilation to perform the sort for + * @returns {void} + */ sortModules(modules) { modules.sort(byIndexOrIdentifier); } + /** + * @param {Module} module moulde to report from + * @param {DependenciesBlock[]} blocks blocks to report from + * @returns {void} + */ reportDependencyErrorsAndWarnings(module, blocks) { for (let indexBlock = 0; indexBlock < blocks.length; indexBlock++) { const block = blocks[indexBlock]; @@ -1006,6 +1297,13 @@ class Compilation extends Tapable { } } + /** + * @param {any} groupOptions options provided for group + * @param {Module} module module in question + * @param {SourceLocation} loc source location reference + * @param {string} request request string + * @returns {ChunkGroup} the chunk group added inside + */ addChunkInGroup(groupOptions, module, loc, request) { if (typeof groupOptions === "string") { groupOptions = { name: groupOptions }; @@ -1034,6 +1332,13 @@ class Compilation extends Tapable { return chunkGroup; } + /** + * This method first looks to see if a name is provided for a new chunk, + * and first looks to see if any named chunks already exist and reuse that chunk instead. + * + * @param {string=} name optional chunk name to be provided + * @returns {Chunk} create a chunk (invoked during seal event) + */ addChunk(name) { if (name) { const chunk = this.namedChunks.get(name); @@ -1049,7 +1354,15 @@ class Compilation extends Tapable { return chunk; } + /** + * @param {Module} module index will be assigned to this module + * @returns {void} + */ assignIndex(module) { + /** + * @param {Module} module assign index to the module + * @returns {void} + */ const assignIndexToModule = module => { // enter module if (typeof module.index !== "number") { @@ -1069,11 +1382,23 @@ class Compilation extends Tapable { } }; + /** + * @param {DependenciesBlock} block to assign index to + * @returns {void} + */ const assignIndexToDependencyBlock = block => { let allDependencies = []; + /** + * @param {Dependency} d iterator over dependencies + * @returns {number} returned push function value (side-effect) + */ const iteratorDependency = d => allDependencies.push(d); + /** + * @param {DependenciesBlock} b blocks to iterate + * @returns {number} returned push value from queue (side-effect) + */ const iteratorBlock = b => queue.push(() => assignIndexToDependencyBlock(b)); @@ -1104,6 +1429,10 @@ class Compilation extends Tapable { } ]; + /** + * @param {(Dependency|DependenciesBlockVariable)[]} d all dependencies of a block being added to queue + * @returns {void} + */ const iteratorAllDependencies = d => { queue.push(() => assignIndexToDependency(d)); }; @@ -1113,12 +1442,20 @@ class Compilation extends Tapable { } } + /** + * @param {Module} module module to assign depth + * @returns {void} + */ assignDepth(module) { const queue = new Set([module]); let depth; module.depth = 0; + /** + * @param {Module} module module for processeing + * @returns {void} + */ const enqueueJob = module => { const d = module.depth; if (typeof d === "number" && d <= depth) return; @@ -1126,12 +1463,20 @@ class Compilation extends Tapable { module.depth = depth; }; - const assignDepthToDependency = (dependency, depth) => { + /** + * @param {Dependency} dependency dependency to assign depth to + * @returns {void} + */ + const assignDepthToDependency = dependency => { if (dependency.module) { enqueueJob(dependency.module); } }; + /** + * @param {DependenciesBlock} block block to assign depth to + * @returns {void} + */ const assignDepthToDependencyBlock = block => { if (block.variables) { iterationBlockVariable(block.variables, assignDepthToDependency); @@ -1156,6 +1501,10 @@ class Compilation extends Tapable { } // This method creates the Chunk graph from the Module graph + /** + * @param {TODO} inputChunkGroups input chunkGroups to be processed + * @returns {void} + */ processDependenciesBlocksForChunkGroups(inputChunkGroups) { // Process is splitting into two parts: // Part one traverse the module graph and builds a very basic chunks graph @@ -1169,8 +1518,13 @@ class Compilation extends Tapable { const allCreatedChunkGroups = new Set(); // PREPARE + /** @type {Map, blocks: AsyncDependenciesBlock[]}>} */ const blockInfoMap = new Map(); + /** + * @param {Dependency} d dependency to iterate over + * @returns {void} + */ const iteratorDependency = d => { // We skip Dependencies without Reference const ref = d.getReference(); @@ -1190,12 +1544,23 @@ class Compilation extends Tapable { blockInfoModules.add(refModule); }; + /** + * @param {AsyncDependenciesBlock} b blocks to prepare + * @returns {void} + */ const iteratorBlockPrepare = b => { blockInfoBlocks.push(b); blockQueue.push(b); }; - let block, blockQueue, blockInfoModules, blockInfoBlocks; + /** @type {DependenciesBlock} */ + let block; + /** @type {DependenciesBlock[]} */ + let blockQueue; + /** @type {Set} */ + let blockInfoModules; + /** @type {AsyncDependenciesBlock[]} */ + let blockInfoBlocks; for (const module of this.modules) { blockQueue = [module]; while (blockQueue.length > 0) { @@ -1224,10 +1589,12 @@ class Compilation extends Tapable { } // PART ONE - + /** @type {Map} */ const blockChunkGroups = new Map(); // Start with the provided modules/chunks + /** @type {{block: DependenciesBlock, module: Module, chunk: Chunk, chunkGroup: ChunkGroup}[]} */ + const queue = inputChunkGroups.map(chunkGroup => ({ block: chunkGroup.chunks[0].entryModule, module: chunkGroup.chunks[0].entryModule, @@ -1235,9 +1602,18 @@ class Compilation extends Tapable { chunkGroup })); - let module, chunk, chunkGroup; + /** @type {Module} */ + let module; + /** @type {Chunk} */ + let chunk; + /** @type {ChunkGroup} */ + let chunkGroup; // For each async Block in graph + /** + * @param {AsyncDependenciesBlock} b iterating over each Async DepBlock + * @returns {void} + */ const iteratorBlock = b => { // 1. We create a chunk for this Block // but only once (blockChunkGroups map) @@ -1315,9 +1691,10 @@ class Compilation extends Tapable { } // PART TWO - + /** @type {Set} */ let availableModules; let newAvailableModules; + /** @type {Queue} */ const queue2 = new Queue( inputChunkGroups.map(chunkGroup => ({ chunkGroup, @@ -1325,7 +1702,13 @@ class Compilation extends Tapable { })) ); - // Helper function to check if all modules of a chunk are available + /** + * Helper function to check if all modules of a chunk are available + * + * @param {ChunkGroup} chunkGroup the chunkGroup to scan + * @param {Set} availableModules the comparitor set + * @returns {boolean} return true if all modules of a chunk are available + */ const areModulesAvailable = (chunkGroup, availableModules) => { for (const chunk of chunkGroup.chunks) { for (const module of chunk.modulesIterable) { @@ -1336,14 +1719,18 @@ class Compilation extends Tapable { }; // For each edge in the basic chunk graph + /** + * @param {TODO} dep the dependency used for filtering + * @returns {boolean} used to filter "edges" (aka Dependencies) that were pointing + * to modules that are already available. Also filters circular dependencies in the chunks graph + */ const filterFn = dep => { - // Filter egdes that are not needed because all modules are already available - // This also filters circular dependencies in the chunks graph const depChunkGroup = dep.chunkGroup; if (areModulesAvailable(depChunkGroup, newAvailableModules)) return false; // break all modules are already available return true; }; + /** @type {Map>} */ const minAvailableModulesMap = new Map(); // Iterative traversing of the basic chunk graph @@ -1425,6 +1812,12 @@ class Compilation extends Tapable { } } + /** + * + * @param {Module} module module relationship for removal + * @param {DependenciesBlock} block //TODO: good description + * @returns {void} + */ removeReasonsOfDependencyBlock(module, block) { const iteratorDependency = d => { if (!d.module) { @@ -1452,6 +1845,11 @@ class Compilation extends Tapable { } } + /** + * @param {Module} module module to patch tie + * @param {Chunk} chunk chunk to patch tie + * @returns {void} + */ patchChunksAfterReasonRemoval(module, chunk) { if (!module.hasReasons()) { this.removeReasonsOfDependencyBlock(module, module); @@ -1463,6 +1861,12 @@ class Compilation extends Tapable { } } + /** + * + * @param {DependenciesBlock} block block tie for Chunk + * @param {Chunk} chunk chunk to remove from dep + * @returns {void} + */ removeChunkFromDependencies(block, chunk) { const iteratorDependency = d => { if (!d.module) { @@ -1473,12 +1877,15 @@ class Compilation extends Tapable { const blocks = block.blocks; for (let indexBlock = 0; indexBlock < blocks.length; indexBlock++) { - const chunks = blocks[indexBlock].chunks; + // Grab all chunks from the first Block's AsyncDepBlock + const chunks = blocks[indexBlock].chunkGroup.chunks; + // For each chunk in chunkGroup for (let indexChunk = 0; indexChunk < chunks.length; indexChunk++) { - const blockChunk = chunks[indexChunk]; - chunk.removeChunk(blockChunk); - blockChunk.removeParent(chunk); - this.removeChunkFromDependencies(chunks, blockChunk); + const iteratedChunk = chunks[indexChunk]; + block.chunkGroup.removeChunk(iteratedChunk); + block.chunkGroup.removeParent(iteratedChunk); + // Recurse + this.removeChunkFromDependencies(block, iteratedChunk); } } @@ -1539,6 +1946,7 @@ class Compilation extends Tapable { } applyChunkIds() { + /** @type {Set} */ const usedIds = new Set(); // Get used ids from usedChunkIds property (i. e. from records) @@ -1568,11 +1976,15 @@ class Compilation extends Tapable { // Calculate maximum assigned chunk id let nextFreeChunkId = -1; for (const id of usedIds) { + if (typeof id !== "number") { + continue; + } nextFreeChunkId = Math.max(nextFreeChunkId, id); } nextFreeChunkId++; // Determine free chunk ids from 0 to maximum + /** @type {number[]} */ const unusedIds = []; if (nextFreeChunkId > 0) { let index = nextFreeChunkId; @@ -1630,6 +2042,16 @@ class Compilation extends Tapable { chunks[indexChunk].sortItems(true); } + /** + * Used to sort errors and warnings in compilation. this.warnings, and + * this.errors contribute to the compilation hash and therefore shoudl be + * updated whenever other references (having a chunk id) are sorted. This preserves the hash + * integrity + * + * @param {WebpackError} a first WebpackError instance (including subclasses) + * @param {WebpackError} b second WebpackError instance (including subclasses) + * @returns {-1|0|1} sort order index + */ const byMessage = (a, b) => { const ma = `${a.message}`; const mb = `${b.message}`; @@ -1746,6 +2168,10 @@ class Compilation extends Tapable { this.hash = this.fullHash.substr(0, hashDigestLength); } + /** + * @param {TODO} update //TODO (update hash function?) + * @returns {void} + */ modifyHash(update) { const outputOptions = this.outputOptions; const hashFunction = outputOptions.hashFunction; @@ -1839,12 +2265,27 @@ class Compilation extends Tapable { } } + /** + * @param {string} filename used to get asset path with hash + * @param {TODO=} data // TODO: figure out this param type + * @returns {TODO} figure out this return type + */ getPath(filename, data) { data = data || {}; data.hash = data.hash || this.hash; return this.mainTemplate.getAssetPath(filename, data); } + /** + * This function allows you to run another instance of webpack inside of webpack however as + * a child with different settings and configurations (if desired) applied. It copies all hooks, plugins + * from parent (or top level compiler) and creates a child Compilation + * + * @param {string} name name of the child compiler + * @param {TODO} outputOptions // Need to convert config schema to types for this + * @param {Plugin[]} plugins webpack plugins that will be applied + * @returns {Compiler} creates a child Compiler instance + */ createChildCompiler(name, outputOptions, plugins) { const idx = this.childrenCounters[name] || 0; this.childrenCounters[name] = idx + 1; @@ -1858,6 +2299,7 @@ class Compilation extends Tapable { } checkConstraints() { + /** @type {Set} */ const usedIds = new Set(); const modules = this.modules; diff --git a/lib/Compiler.js b/lib/Compiler.js index e7805c4b394..3066d22ce03 100644 --- a/lib/Compiler.js +++ b/lib/Compiler.js @@ -26,38 +26,92 @@ const RequestShortener = require("./RequestShortener"); const { makePathsRelative } = require("./util/identifier"); const ConcurrentCompilationError = require("./ConcurrentCompilationError"); +/** + * @typedef {Object} CompilationParams + * @property {NormalModuleFactory} normalModuleFactory + * @property {ContextModuleFactory} contextModuleFactory + * @property {Set} compilationDependencies + */ + +/** @typedef {string|string[]} EntryValues */ +/** @typedef {{[entryKey: string]: EntryValues}} EntryOptionValues */ +/** @typedef {(() => EntryOptionValues) | EntryOptionValues | EntryValues} EntryOptions */ + class Compiler extends Tapable { constructor(context) { super(); this.hooks = { + /** @type {SyncBailHook} */ shouldEmit: new SyncBailHook(["compilation"]), + + /** @type {AsyncSeriesHook} */ done: new AsyncSeriesHook(["stats"]), + + /** @type {AsyncSeriesHook<>} */ additionalPass: new AsyncSeriesHook([]), - beforeRun: new AsyncSeriesHook(["compilation"]), - run: new AsyncSeriesHook(["compilation"]), + + /** @type {AsyncSeriesHook} */ + beforeRun: new AsyncSeriesHook(["compiler"]), + + /** @type {AsyncSeriesHook} */ + run: new AsyncSeriesHook(["compiler"]), + + /** @type {AsyncSeriesHook} */ emit: new AsyncSeriesHook(["compilation"]), + + /** @type {AsyncSeriesHook} */ afterEmit: new AsyncSeriesHook(["compilation"]), + + /** @type {SyncHook} */ thisCompilation: new SyncHook(["compilation", "params"]), + + /** @type {SyncHook} */ compilation: new SyncHook(["compilation", "params"]), + + /** @type {SyncHook} */ normalModuleFactory: new SyncHook(["normalModuleFactory"]), + + /** @type {SyncHook} */ contextModuleFactory: new SyncHook(["contextModulefactory"]), + + /** @type {AsyncSeriesHook} */ beforeCompile: new AsyncSeriesHook(["params"]), + + /** @type {SyncHook} */ compile: new SyncHook(["params"]), + + /** @type {AsyncParallelHook} */ make: new AsyncParallelHook(["compilation"]), + + /** @type {AsyncSeriesHook} */ afterCompile: new AsyncSeriesHook(["compilation"]), + + /** @type {AsyncSeriesHook} */ watchRun: new AsyncSeriesHook(["compiler"]), + + /** @type {SyncHook} */ failed: new SyncHook(["error"]), + + /** @type {SyncHook} */ invalid: new SyncHook(["filename", "changeTime"]), + + /** @type {SyncHook} */ watchClose: new SyncHook([]), // TODO the following hooks are weirdly located here // TODO move them for webpack 5 + /** @type {SyncHook} */ environment: new SyncHook([]), + /** @type {SyncHook} */ afterEnvironment: new SyncHook([]), + /** @type {SyncHook} */ afterPlugins: new SyncHook(["compiler"]), + /** @type {SyncHook} */ afterResolvers: new SyncHook(["compiler"]), + /** @type {SyncBailHook} */ entryOption: new SyncBailHook(["context", "entry"]) }; + this._pluginCompat.tap("Compiler", options => { switch (options.name) { case "additional-pass": @@ -74,19 +128,26 @@ class Compiler extends Tapable { } }); + /** @type {string=} */ this.name = undefined; + /** @type {Compilation=} */ this.parentCompilation = undefined; + /** @type {string} */ this.outputPath = ""; + this.outputFileSystem = null; this.inputFileSystem = null; + /** @type {string|null} */ this.recordsInputPath = null; + /** @type {string|null} */ this.recordsOutputPath = null; this.records = {}; - + /** @type {Map} */ this.fileTimestamps = new Map(); + /** @type {Map} */ this.contextTimestamps = new Map(); - + /** @type {ResolverFactory} */ this.resolverFactory = new ResolverFactory(); // TODO remove in webpack 5 @@ -135,6 +196,7 @@ class Compiler extends Tapable { this.requestShortener = new RequestShortener(context); + /** @type {boolean} */ this.running = false; } diff --git a/lib/ContextModule.js b/lib/ContextModule.js index fd186bc90f6..2b201fdc84f 100644 --- a/lib/ContextModule.js +++ b/lib/ContextModule.js @@ -8,6 +8,7 @@ const util = require("util"); const { OriginalSource, RawSource } = require("webpack-sources"); const Module = require("./Module"); const AsyncDependenciesBlock = require("./AsyncDependenciesBlock"); +const ModuleDependency = require("./dependencies/ModuleDependency"); const Template = require("./Template"); class ContextModule extends Module { @@ -645,10 +646,10 @@ webpackEmptyAsyncContext.id = ${JSON.stringify(id)};`; const initialSize = 160; // if we dont have dependencies we stop here. - return this.dependencies.reduce( - (size, dependency) => size + 5 + dependency.userRequest.length, - initialSize - ); + return this.dependencies.reduce((size, dependency) => { + if (dependency instanceof ModuleDependency) + return size + 5 + dependency.userRequest.length; + }, initialSize); } } diff --git a/lib/DelegatedModule.js b/lib/DelegatedModule.js index c2560542433..3abe062c1f8 100644 --- a/lib/DelegatedModule.js +++ b/lib/DelegatedModule.js @@ -11,6 +11,8 @@ const WebpackMissingModule = require("./dependencies/WebpackMissingModule"); const DelegatedSourceDependency = require("./dependencies/DelegatedSourceDependency"); const DelegatedExportsDependency = require("./dependencies/DelegatedExportsDependency"); +/** @typedef {import("./dependencies/ModuleDependency")} ModuleDependency */ + class DelegatedModule extends Module { constructor(sourceRequest, data, type, userRequest, originalRequest) { super("javascript/dynamic", null); @@ -48,6 +50,8 @@ class DelegatedModule extends Module { this.built = true; this.buildMeta = Object.assign({}, this.delegateData.buildMeta); this.buildInfo = {}; + /** @type {ModuleDependency[]=} */ + this.dependencies = []; this.addDependency(new DelegatedSourceDependency(this.sourceRequest)); this.addDependency( new DelegatedExportsDependency(this, this.delegateData.exports || true) diff --git a/lib/DependenciesBlock.js b/lib/DependenciesBlock.js index 037118f5734..cd25f26212f 100644 --- a/lib/DependenciesBlock.js +++ b/lib/DependenciesBlock.js @@ -6,23 +6,46 @@ const DependenciesBlockVariable = require("./DependenciesBlockVariable"); -/** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** + * @typedef {import("./ChunkGroup")} ChunkGroup + * @typedef {import("./Dependency")} Dependency + * @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock + * @typedef {import("./DependenciesBlockVariable")} DependenciesBlockVariable + * @typedef {(d: Dependency) => boolean} DependencyFilterFunction + * @typedef {import("crypto").Hash} Hash + */ class DependenciesBlock { constructor() { + /** @type {Dependency[]} */ this.dependencies = []; + /** @type {AsyncDependenciesBlock[]} */ this.blocks = []; + /** @type {DependenciesBlockVariable[]} */ this.variables = []; // TODO remove this line, it's wrong /** @type {ChunkGroup=} */ this.chunkGroup = undefined; } + /** + * Adds a DependencyBlock to DependencyBlock relationship. + * This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting) + * + * @param {AsyncDependenciesBlock} block block being added + * @returns {void} + */ addBlock(block) { this.blocks.push(block); block.parent = this; } + /** + * @param {string} name name of dependency + * @param {string} expression expression string for variable + * @param {Dependency[]} dependencies dependency instances tied to variable + * @returns {void} + */ addVariable(name, expression, dependencies) { for (let v of this.variables) { if (v.name === name && v.expression === expression) { @@ -34,15 +57,28 @@ class DependenciesBlock { ); } + /** + * @param {Dependency} dependency dependency being tied to block. + * This is an "edge" pointing to another "node" on module graph. + * @returns {void} + */ addDependency(dependency) { this.dependencies.push(dependency); } + /** + * @param {Dependency} dependency dependency being removed + * @returns {void} + */ removeDependency(dependency) { const idx = this.dependencies.indexOf(dependency); if (idx >= 0) this.dependencies.splice(idx, 1); } + /** + * @param {Hash} hash the hash used to track dependencies, from "crypto" module + * @returns {void} + */ updateHash(hash) { for (const dep of this.dependencies) dep.updateHash(hash); for (const block of this.blocks) block.updateHash(hash); @@ -59,6 +95,10 @@ class DependenciesBlock { for (const block of this.blocks) block.unseal(); } + /** + * @param {DependencyFilterFunction} filter filter function for dependencies, gets passed all dependency ties from current instance + * @returns {boolean} returns boolean for filter + */ hasDependencies(filter) { if (filter) { for (const dep of this.dependencies) { diff --git a/lib/DependenciesBlockVariable.js b/lib/DependenciesBlockVariable.js index abb990b44fc..0573502c16a 100644 --- a/lib/DependenciesBlockVariable.js +++ b/lib/DependenciesBlockVariable.js @@ -6,13 +6,29 @@ const { RawSource, ReplaceSource } = require("webpack-sources"); +/** @typedef {import("./Dependency")} Dependency */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("crypto").Hash} Hash */ +/** @typedef {(d: Dependency) => boolean} DependencyFilterFunction */ +/** @typedef {Map} DependencyFactoryConstruction */ + class DependenciesBlockVariable { + /** + * Creates an instance of DependenciesBlockVariable. + * @param {string} name name of DependenciesBlockVariable + * @param {string} expression expression string + * @param {Dependency[]=} dependencies dependencies tied to this varaiable + */ constructor(name, expression, dependencies) { this.name = name; this.expression = expression; this.dependencies = dependencies || []; } + /** + * @param {Hash} hash hash for instance to update + * @returns {void} + */ updateHash(hash) { hash.update(this.name); hash.update(this.expression); @@ -21,8 +37,13 @@ class DependenciesBlockVariable { } } + /** + * @param {DependencyFactoryConstruction} dependencyTemplates Dependency constructors and templates Map. + * @param {RuntimeTemplate} runtimeTemplate runtimeTemplate to generate expression souce + * @returns {ReplaceSource} returns constructed source for expression via templates + */ expressionSource(dependencyTemplates, runtimeTemplate) { - const source = new ReplaceSource(new RawSource(this.expression)); + const source = new ReplaceSource(new RawSource(this.expression), null); for (const dep of this.dependencies) { const template = dependencyTemplates.get(dep.constructor); if (!template) diff --git a/lib/Dependency.js b/lib/Dependency.js index a5a5c23e21e..f031f13b045 100644 --- a/lib/Dependency.js +++ b/lib/Dependency.js @@ -7,8 +7,11 @@ const compareLocations = require("./compareLocations"); const DependencyReference = require("./dependencies/DependencyReference"); +/** @typedef {import("./Module")} Module */ + class Dependency { constructor() { + /** @type {Module|null} */ this.module = null; this.weak = false; this.optional = false; diff --git a/lib/DynamicEntryPlugin.js b/lib/DynamicEntryPlugin.js index 38a5dbb3fc5..ec8633f5df5 100644 --- a/lib/DynamicEntryPlugin.js +++ b/lib/DynamicEntryPlugin.js @@ -10,12 +10,25 @@ const MultiModuleFactory = require("./MultiModuleFactory"); const MultiEntryPlugin = require("./MultiEntryPlugin"); const SingleEntryPlugin = require("./SingleEntryPlugin"); +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {string|string[]} EntryValues */ +/** @typedef {{[entryKey: string]: EntryValues | EntryValues}} EntryOptionValues */ +/** @typedef {(() => (EntryOptionValues|EntryValues))} EntryOptionValuesFunction */ + class DynamicEntryPlugin { + /** + * @param {string} context the context path + * @param {EntryOptionValuesFunction} entry the entry value + */ constructor(context, entry) { this.context = context; this.entry = entry; } + /** + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ apply(compiler) { compiler.hooks.compilation.tap( "DynamicEntryPlugin", @@ -36,6 +49,11 @@ class DynamicEntryPlugin { compiler.hooks.make.tapAsync( "DynamicEntryPlugin", (compilation, callback) => { + /** + * @param {string|string[]} entry entry value or array of entry values + * @param {string} name name of entry + * @returns {Promise} returns the promise resolving the Compilation#addEntry function + */ const addEntry = (entry, name) => { const dep = DynamicEntryPlugin.createDependency(entry, name); return new Promise((resolve, reject) => { @@ -63,7 +81,11 @@ class DynamicEntryPlugin { } module.exports = DynamicEntryPlugin; - +/** + * @param {string|string[]} entry entry value or array of entry paths + * @param {string} name name of entry + * @returns {SingleEntryDependency|MultiEntryDependency} returns dep + */ DynamicEntryPlugin.createDependency = (entry, name) => { if (Array.isArray(entry)) return MultiEntryPlugin.createDependency(entry, name); diff --git a/lib/EntryOptionPlugin.js b/lib/EntryOptionPlugin.js index c8c3ce75588..e992bc2c95a 100644 --- a/lib/EntryOptionPlugin.js +++ b/lib/EntryOptionPlugin.js @@ -8,6 +8,14 @@ const SingleEntryPlugin = require("./SingleEntryPlugin"); const MultiEntryPlugin = require("./MultiEntryPlugin"); const DynamicEntryPlugin = require("./DynamicEntryPlugin"); +/** @typedef {import("./Compiler")} Compiler */ + +/** + * @param {string} context context path + * @param {string | string[]} item entry array or single path + * @param {string} name entry key name + * @returns {SingleEntryPlugin | MultiEntryPlugin} returns either a single or multi entry plugin + */ const itemToPlugin = (context, item, name) => { if (Array.isArray(item)) { return new MultiEntryPlugin(context, item, name); @@ -16,6 +24,10 @@ const itemToPlugin = (context, item, name) => { }; module.exports = class EntryOptionPlugin { + /** + * @param {Compiler} compiler the compiler instance one is tapping into + * @returns {void} + */ apply(compiler) { compiler.hooks.entryOption.tap("EntryOptionPlugin", (context, entry) => { if (typeof entry === "string" || Array.isArray(entry)) { diff --git a/lib/JavascriptGenerator.js b/lib/JavascriptGenerator.js index 167a628c76b..b233c93cbc2 100644 --- a/lib/JavascriptGenerator.js +++ b/lib/JavascriptGenerator.js @@ -18,7 +18,7 @@ class JavascriptGenerator { return new RawSource("throw new Error('No source available');"); } - const source = new ReplaceSource(originalSource); + const source = new ReplaceSource(originalSource, null); this.sourceBlock( module, diff --git a/lib/Module.js b/lib/Module.js index 72f25857225..b42ef3835d1 100644 --- a/lib/Module.js +++ b/lib/Module.js @@ -11,8 +11,14 @@ const ModuleReason = require("./ModuleReason"); const SortableSet = require("./util/SortableSet"); const Template = require("./Template"); +<<<<<<< HEAD /** @typedef {import("./Chunk")} Chunk */ /** @typedef {import("./RequestShortener")} RequestShortener */ +======= +/** @typedef {typeof import("./Chunk")} Chunk */ +/** @typedef {typeof import("./RequestShortener")} RequestShortener */ +/** @typedef {import("./WebpackError")} WebpackError */ +>>>>>>> 206d1a6... chore(types): add Compiler and Compilation type support const EMPTY_RESOLVE_OPTIONS = {}; @@ -47,15 +53,15 @@ class Module extends DependenciesBlock { this.renderedHash = undefined; // Info from Factory - /** @type {object} */ + /** @type {any} */ this.resolveOptions = EMPTY_RESOLVE_OPTIONS; /** @type {object} */ this.factoryMeta = {}; // Info from Build - /** @type {Error[]} */ + /** @type {WebpackError[]} */ this.warnings = []; - /** @type {Error[]} */ + /** @type {WebpackError[]} */ this.errors = []; /** @type {object} */ this.buildMeta = undefined; diff --git a/lib/MultiEntryPlugin.js b/lib/MultiEntryPlugin.js index 29e8064298c..853ee399df2 100644 --- a/lib/MultiEntryPlugin.js +++ b/lib/MultiEntryPlugin.js @@ -8,13 +8,25 @@ const MultiEntryDependency = require("./dependencies/MultiEntryDependency"); const SingleEntryDependency = require("./dependencies/SingleEntryDependency"); const MultiModuleFactory = require("./MultiModuleFactory"); -module.exports = class MultiEntryPlugin { +/** @typedef {import("./Compiler")} Compiler */ + +class MultiEntryPlugin { + /** + * The MultiEntryPlugin is invoked whenever this.options.entry value is an array of paths + * @param {string} context context path + * @param {string[]} entries array of entry paths + * @param {string} name entry key name + */ constructor(context, entries, name) { this.context = context; this.entries = entries; this.name = name; } + /** + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ apply(compiler) { compiler.hooks.compilation.tap( "MultiEntryPlugin", @@ -43,6 +55,11 @@ module.exports = class MultiEntryPlugin { ); } + /** + * @param {string[]} entries each entry path string + * @param {string} name name of the entry + * @return {MultiEntryDependency} returns a constructed Dependency + */ static createDependency(entries, name) { return new MultiEntryDependency( entries.map((e, idx) => { @@ -55,4 +72,6 @@ module.exports = class MultiEntryPlugin { name ); } -}; +} + +module.exports = MultiEntryPlugin; diff --git a/lib/NormalModule.js b/lib/NormalModule.js index 125c21c2b8d..0d2712bcd95 100644 --- a/lib/NormalModule.js +++ b/lib/NormalModule.js @@ -218,6 +218,8 @@ class NormalModule extends Module { } if (Buffer.isBuffer(source)) { + // @ts-ignore + // TODO We need to fix @types/webpack-sources to allow RawSource to take a Buffer | string return new RawSource(source); } diff --git a/lib/SingleEntryPlugin.js b/lib/SingleEntryPlugin.js index 755a6b59725..e049abc2ac8 100644 --- a/lib/SingleEntryPlugin.js +++ b/lib/SingleEntryPlugin.js @@ -5,13 +5,27 @@ "use strict"; const SingleEntryDependency = require("./dependencies/SingleEntryDependency"); +/** @typedef {import("./Compiler")} Compiler */ + class SingleEntryPlugin { + /** + * An entry plugin which will handle + * creation of the SingleEntryDependency + * + * @param {string} context context path + * @param {string} entry entry path + * @param {string} name entry key name + */ constructor(context, entry, name) { this.context = context; this.entry = entry; this.name = name; } + /** + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ apply(compiler) { compiler.hooks.compilation.tap( "SingleEntryPlugin", diff --git a/lib/WebpackError.js b/lib/WebpackError.js index 4fd23388178..adc3671c006 100644 --- a/lib/WebpackError.js +++ b/lib/WebpackError.js @@ -4,11 +4,16 @@ */ "use strict"; -module.exports = class WebpackError extends Error { +class WebpackError extends Error { constructor(message) { super(message); this.details = undefined; + this.missing = undefined; + this.origin = undefined; + this.dependencies = undefined; + this.module = undefined; + this.message = undefined; Error.captureStackTrace(this, this.constructor); } @@ -16,4 +21,6 @@ module.exports = class WebpackError extends Error { inspect() { return this.stack + (this.details ? `\n${this.details}` : ""); } -}; +} + +module.exports = WebpackError; diff --git a/lib/dependencies/DependencyReference.js b/lib/dependencies/DependencyReference.js index 656b642186f..6334d793748 100644 --- a/lib/dependencies/DependencyReference.js +++ b/lib/dependencies/DependencyReference.js @@ -4,7 +4,16 @@ */ "use strict"; +/** @typedef {import('../Module')} Module */ + class DependencyReference { + /** + * Creates an instance of DependencyReference. + * @param {Module} module module there reference comes from + * @param {string[]|boolean} importedNames imported names or boolean + * @param {boolean} weak is weak reference or not + * @memberof DependencyReference + */ constructor(module, importedNames, weak) { this.module = module; // true: full object diff --git a/lib/dependencies/LoaderPlugin.js b/lib/dependencies/LoaderPlugin.js index efce35e6ab4..8c49a6d4494 100644 --- a/lib/dependencies/LoaderPlugin.js +++ b/lib/dependencies/LoaderPlugin.js @@ -5,6 +5,7 @@ "use strict"; const LoaderDependency = require("./LoaderDependency"); +const NormalModule = require("../NormalModule"); class LoaderPlugin { apply(compiler) { @@ -51,11 +52,10 @@ class LoaderPlugin { err => { compilation.semaphore.acquire(() => { if (err) return callback(err); - if (!dep.module) return callback(new Error("Cannot load the module")); - - if (dep.module.error) return callback(dep.module.error); + if (dep.module instanceof NormalModule && dep.module.error) + return callback(dep.module.error); if (!dep.module._source) throw new Error( "The module created for a LoaderDependency must have a property _source" diff --git a/lib/dependencies/ModuleDependency.js b/lib/dependencies/ModuleDependency.js index 992d86534db..f325e7a98d6 100644 --- a/lib/dependencies/ModuleDependency.js +++ b/lib/dependencies/ModuleDependency.js @@ -6,6 +6,9 @@ const Dependency = require("../Dependency"); class ModuleDependency extends Dependency { + /** + * @param {string} request request path which needs resolving + */ constructor(request) { super(); this.request = request; diff --git a/lib/dependencies/MultiEntryDependency.js b/lib/dependencies/MultiEntryDependency.js index a075eb3181e..712d3ff1f22 100644 --- a/lib/dependencies/MultiEntryDependency.js +++ b/lib/dependencies/MultiEntryDependency.js @@ -3,9 +3,14 @@ Author Tobias Koppers @sokra */ "use strict"; +/** @typedef {import("./SingleEntryDependency")} SingleEntryDependency */ const Dependency = require("../Dependency"); class MultiEntryDependency extends Dependency { + /** + * @param {SingleEntryDependency[]} dependencies an array of SingleEntryDependencies + * @param {string} name entry name + */ constructor(dependencies, name) { super(); this.dependencies = dependencies; diff --git a/lib/dependencies/SingleEntryDependency.js b/lib/dependencies/SingleEntryDependency.js index 387975dc8df..b269fb60f00 100644 --- a/lib/dependencies/SingleEntryDependency.js +++ b/lib/dependencies/SingleEntryDependency.js @@ -6,8 +6,12 @@ const ModuleDependency = require("./ModuleDependency"); class SingleEntryDependency extends ModuleDependency { + /** + * @param {string} request request path for entry + */ constructor(request) { super(request); + this.request = request; } get type() { diff --git a/lib/optimize/ConcatenatedModule.js b/lib/optimize/ConcatenatedModule.js index 5b744261aaa..6a002ab0b37 100644 --- a/lib/optimize/ConcatenatedModule.js +++ b/lib/optimize/ConcatenatedModule.js @@ -621,7 +621,7 @@ class ConcatenatedModule extends Module { }); const globalScope = scopeManager.acquire(ast); const moduleScope = globalScope.childScopes[0]; - const resultSource = new ReplaceSource(source); + const resultSource = new ReplaceSource(source, null); info.ast = ast; info.internalSource = source; info.source = resultSource; diff --git a/lib/util/Semaphore.js b/lib/util/Semaphore.js index 359378056ad..b75bc2c9267 100644 --- a/lib/util/Semaphore.js +++ b/lib/util/Semaphore.js @@ -5,12 +5,24 @@ "use strict"; class Semaphore { + /** + * Creates an instance of Semaphore. + * + * @param {number} available the amount available number of "tasks" + * in the Semaphore + */ constructor(available) { this.available = available; + /** @type {(() => void)[]} */ this.waiters = []; + /** @private */ this._continue = this._continue.bind(this); } + /** + * @param {function(): void} callback function block to capture and run + * @returns {void} + */ acquire(callback) { if (this.available > 0) { this.available--; diff --git a/package.json b/package.json index f67472e72d0..ffd6b4f4328 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "devDependencies": { "@types/node": "^9.6.4", "@types/tapable": "^1.0.1", + "@types/webpack-sources": "^0.1.4", "benchmark": "^2.1.1", "bundle-loader": "~0.5.0", "codacy-coverage": "^2.0.1", diff --git a/tsconfig.json b/tsconfig.json index c55aa8145a3..c8dfaaada4b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,62 +1,65 @@ { - "compilerOptions": { - /* Basic Options */ - "target": "ES2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - "lib": ["es2017", "dom"], /* Specify library files to be included in the compilation. */ - "allowJs": true, /* Allow javascript files to be compiled. */ - "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "removeComments": true, /* Do not emit comments to output. */ - "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + "compilerOptions": { + /* Basic Options */ + "target": + "ES2017" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */, + "module": + "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, + "lib": [ + "es2017", + "dom" + ] /* Specify library files to be included in the compilation. */, + "allowJs": true /* Allow javascript files to be compiled. */, + "checkJs": true /* Report errors in .js files. */, + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "removeComments": true, /* Do not emit comments to output. */ + "noEmit": true /* Do not emit outputs. */, + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - /* Strict Type-Checking Options */ - "strict": false, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + /* Strict Type-Checking Options */ + "strict": false /* Enable all strict type-checking options. */, + // "noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */, + // "strictNullChecks": true /* Enable strict null checks. */, + // "strictFunctionTypes": true /* Enable strict checking of function types. */, + // "strictPropertyInitialization": true /* Enable strict checking of property initialization in classes. */, + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + "alwaysStrict": true /* Parse in strict mode and emit "use strict" for each source file. */, - /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - "types": ["node"], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + "types": [ + "node" + ] /* Type declaration files to be included in compilation. */, + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - /* Source Map Options */ - // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + /* Source Map Options */ + // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - }, - "include": [ - "declarations.d.ts", - "bin/*.js", - "lib/**/*.js" - ] + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + }, + "include": ["declarations.d.ts", "bin/*.js", "lib/**/*.js"] } diff --git a/yarn.lock b/yarn.lock index 56a5a9bb526..9060b0dcfd3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,8 +3,14 @@ "@babel/code-frame@^7.0.0-beta.35": - version "7.0.0-beta.38" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.38.tgz#c0af5930617e55e050336838e3a3670983b0b2b2" + version "7.0.0-beta.46" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.46.tgz#e0d002100805daab1461c0fcb32a07e304f3a4f4" + dependencies: + "@babel/highlight" "7.0.0-beta.46" + +"@babel/highlight@7.0.0-beta.46": + version "7.0.0-beta.46" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.46.tgz#c553c51e65f572bdedd6eff66fc0bb563016645e" dependencies: chalk "^2.0.0" esutils "^2.0.2" @@ -20,14 +26,30 @@ dependencies: "@types/babel-types" "*" +"@types/node@*": + version "10.0.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.0.8.tgz#37b4d91d4e958e4c2ba0be2b86e7ed4ff19b0858" + "@types/node@^9.6.4": - version "9.6.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.6.tgz#439b91f9caf3983cad2eef1e11f6bedcbf9431d2" + version "9.6.15" + resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.15.tgz#8a5a313ea0a43a95277235841be5d3f5fb3dfeda" + +"@types/source-list-map@*": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@types/source-list-map/-/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9" "@types/tapable@^1.0.1": version "1.0.2" resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.2.tgz#e13182e1b69871a422d7863e11a4a6f5b814a4bd" +"@types/webpack-sources@^0.1.4": + version "0.1.4" + resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-0.1.4.tgz#a52f1cec41e4d24b3df0bf87e8a538945f6d493f" + dependencies: + "@types/node" "*" + "@types/source-list-map" "*" + source-map "^0.6.1" + "@webassemblyjs/ast@1.4.3": version "1.4.3" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.4.3.tgz#3b3f6fced944d8660273347533e6d4d315b5934a" @@ -209,21 +231,17 @@ acorn@^4.0.4, acorn@~4.0.2: version "4.0.13" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" -acorn@^5.0.0, acorn@^5.5.0: +acorn@^5.0.0, acorn@^5.3.0, acorn@^5.5.0: version "5.5.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.3.tgz#f473dd47e0277a08e28e9bec5aeeb04751f0b8c9" -acorn@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.3.0.tgz#7446d39459c54fb49a80e6ee6478149b940ec822" - ajv-keywords@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" ajv-keywords@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.1.0.tgz#ac2b27939c543e95d2c06e7f7f5c27be4aa543be" + version "3.2.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.2.0.tgz#e86b819c602cf8821ad637413698f1dec021847a" ajv@^4.9.1: version "4.11.8" @@ -242,13 +260,13 @@ ajv@^5.0.0, ajv@^5.1.0, ajv@^5.2.3, ajv@^5.3.0: json-schema-traverse "^0.3.0" ajv@^6.1.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.4.0.tgz#d3aff78e9277549771daf0164cff48482b754fc6" + version "6.5.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.0.tgz#4c8affdf80887d8f132c9c52ab8a2dc4d0b7b24c" dependencies: - fast-deep-equal "^1.0.0" + fast-deep-equal "^2.0.1" fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" - uri-js "^3.0.2" + uri-js "^4.2.1" align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" @@ -282,25 +300,12 @@ ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" -ansi-styles@^3.1.0, ansi-styles@^3.2.1: +ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" dependencies: color-convert "^1.9.0" -ansi-styles@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" - dependencies: - color-convert "^1.9.0" - -anymatch@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" - dependencies: - micromatch "^2.1.5" - normalize-path "^2.0.0" - anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -443,9 +448,9 @@ asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" -atob@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.0.tgz#ab2b150e51d7b122b9efc8d7340c06b6c41076bc" +atob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.1.tgz#ae2d5a729477f289d60dd7f96a6314a22dd6c22a" autoprefixer@^6.3.1: version "6.7.7" @@ -479,8 +484,8 @@ babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: js-tokens "^3.0.2" babel-core@^6.0.0, babel-core@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" + version "6.26.3" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" dependencies: babel-code-frame "^6.26.0" babel-generator "^6.26.0" @@ -492,19 +497,19 @@ babel-core@^6.0.0, babel-core@^6.26.0: babel-traverse "^6.26.0" babel-types "^6.26.0" babylon "^6.18.0" - convert-source-map "^1.5.0" - debug "^2.6.8" + convert-source-map "^1.5.1" + debug "^2.6.9" json5 "^0.5.1" lodash "^4.17.4" minimatch "^3.0.4" path-is-absolute "^1.0.1" - private "^0.1.7" + private "^0.1.8" slash "^1.0.0" - source-map "^0.5.6" + source-map "^0.5.7" babel-generator@^6.18.0, babel-generator@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.0.tgz#ac1ae20070b79f6e3ca1d3269613053774f20dc5" + version "6.26.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" dependencies: babel-messages "^6.23.0" babel-runtime "^6.26.0" @@ -512,7 +517,7 @@ babel-generator@^6.18.0, babel-generator@^6.26.0: detect-indent "^4.0.0" jsesc "^1.3.0" lodash "^4.17.4" - source-map "^0.5.6" + source-map "^0.5.7" trim-right "^1.0.1" babel-helpers@^6.24.1: @@ -522,12 +527,12 @@ babel-helpers@^6.24.1: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-jest@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.0.0-alpha.5.tgz#acf85d6e69b96755fb8f89542251349718620615" +babel-jest@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.0.0-charlie.1.tgz#275dc7da10420b0da7df54e11e5b21a3daa3581a" dependencies: babel-plugin-istanbul "^4.1.6" - babel-preset-jest "^23.0.0-alpha.5" + babel-preset-jest "^23.0.0-charlie.1" babel-messages@^6.23.0: version "6.23.0" @@ -535,14 +540,6 @@ babel-messages@^6.23.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-istanbul@^4.1.5: - version "4.1.5" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz#6760cdd977f411d3e175bb064f2bc327d99b2b6e" - dependencies: - find-up "^2.1.0" - istanbul-lib-instrument "^1.7.5" - test-exclude "^4.1.1" - babel-plugin-istanbul@^4.1.6: version "4.1.6" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45" @@ -552,19 +549,19 @@ babel-plugin-istanbul@^4.1.6: istanbul-lib-instrument "^1.10.1" test-exclude "^4.2.1" -babel-plugin-jest-hoist@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.0.0-alpha.5.tgz#d3ac1b55cfcf78d1418629b5cbd8f82d97f1545e" +babel-plugin-jest-hoist@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.0.0-charlie.1.tgz#2a6d15cb609443158d61eb01ca63ed08edd2c46b" babel-plugin-syntax-object-rest-spread@^6.13.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" -babel-preset-jest@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.0.0-alpha.5.tgz#2acb14805bfcb73b4884e8fadc776bae26e30a50" +babel-preset-jest@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.0.0-charlie.1.tgz#188ac3695737c1f8e76b1737e3064d2d8c783141" dependencies: - babel-plugin-jest-hoist "^23.0.0-alpha.5" + babel-plugin-jest-hoist "^23.0.0-charlie.1" babel-plugin-syntax-object-rest-spread "^6.13.0" babel-register@^6.26.0: @@ -668,12 +665,6 @@ binary-extensions@^1.0.0: version "1.11.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" -block-stream@*: - version "0.0.9" - resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" - dependencies: - inherits "~2.0.0" - bluebird@^3.5.0, bluebird@^3.5.1, bluebird@^3.5.x: version "3.5.1" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" @@ -903,8 +894,14 @@ caniuse-api@^1.5.2: lodash.uniq "^4.5.0" caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: - version "1.0.30000830" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000830.tgz#6e45255b345649fd15ff59072da1e12bb3de2f13" + version "1.0.30000840" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000840.tgz#68d5a0f0694c92180b0d82e720d70f8e61366604" + +capture-exit@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-1.2.0.tgz#1c5fcc489fd0ab00d4f1ac7ae1072e3173fbab6f" + dependencies: + rsvp "^3.3.3" caseless@~0.11.0: version "0.11.0" @@ -931,7 +928,7 @@ chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.3.2: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" dependencies: @@ -939,22 +936,6 @@ chalk@^2.0.0, chalk@^2.3.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^2.0.1, chalk@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" - dependencies: - ansi-styles "^3.1.0" - escape-string-regexp "^1.0.5" - supports-color "^4.0.0" - -chalk@^2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - character-parser@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/character-parser/-/character-parser-1.2.1.tgz#c0dde4ab182713b919b970959a123ecc1a30fcd6" @@ -996,8 +977,8 @@ chrome-trace-event@^0.1.1: resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-0.1.3.tgz#d395af2d31c87b90a716c831fe326f69768ec084" ci-info@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.2.tgz#03561259db48d0474c8bdc90f5b47b068b6bbfb4" + version "1.1.3" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.3.tgz#710193264bb05c77b8c90d02f5aaf22216a667b2" cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" @@ -1057,8 +1038,8 @@ cliui@^2.1.0: wordwrap "0.0.2" cliui@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.0.0.tgz#743d4650e05f36d1ed2575b59638d87322bfbbcc" + version "4.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" dependencies: string-width "^2.1.1" strip-ansi "^4.0.0" @@ -1168,9 +1149,9 @@ commander@^2.9.0, commander@^2.x: version "2.15.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" -commander@~2.13.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" +commander@~2.14.1: + version "2.14.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa" commander@~2.6.0: version "2.6.0" @@ -1181,8 +1162,8 @@ commondir@^1.0.1: resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" compare-versions@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.1.0.tgz#43310256a5c555aaed4193c04d8f154cf9c6efd5" + version "3.2.0" + resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.2.0.tgz#f36f23aacc539da0e3e0f71af46ce5b953a6ae76" component-emitter@^1.2.1: version "1.2.1" @@ -1234,15 +1215,11 @@ content-disposition@0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.1.tgz#87476c6a67c8daa87e32e87616df883ba7fb071b" -content-type-parser@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.2.tgz#caabe80623e63638b2502fd4c7f12ff4ce2352e7" - content-type@~1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" -convert-source-map@^1.4.0, convert-source-map@^1.5.0: +convert-source-map@^1.4.0, convert-source-map@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" @@ -1274,8 +1251,8 @@ core-js@^1.0.0: resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" core-js@^2.4.0, core-js@^2.5.0: - version "2.5.3" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e" + version "2.5.6" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.6.tgz#0fe6d45bf3cac3ac364a9d72de7576f4eb221b9d" core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -1292,8 +1269,8 @@ coveralls@^2.11.2: request "2.79.0" create-ecdh@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.1.tgz#44223dfed533193ba5ba54e0df5709b89acf1f82" + version "4.0.3" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" dependencies: bn.js "^4.1.0" elliptic "^6.0.0" @@ -1481,11 +1458,19 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +data-urls@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.0.0.tgz#24802de4e81c298ea8a9388bb0d8e461c774684f" + dependencies: + abab "^1.0.4" + whatwg-mimetype "^2.0.0" + whatwg-url "^6.4.0" + date-now@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" -debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: +debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: @@ -1605,8 +1590,8 @@ detect-newline@^2.1.0: resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" diff@^3.2.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c" + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" diffie-hellman@^5.0.0: version "5.0.3" @@ -1636,9 +1621,9 @@ domexception@^1.0.0: dependencies: webidl-conversions "^4.0.2" -duplexify@^3.4.2, duplexify@^3.5.3: - version "3.5.4" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.4.tgz#4bb46c1796eabebeec4ca9a2e66b808cb7a3d8b4" +duplexify@^3.4.2, duplexify@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.6.0.tgz#592903f5d80b38d037220541264d69a198fb3410" dependencies: end-of-stream "^1.0.0" inherits "^2.0.1" @@ -1656,8 +1641,8 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" electron-to-chromium@^1.2.7: - version "1.3.42" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.42.tgz#95c33bf01d0cc405556aec899fe61fd4d76ea0f9" + version "1.3.45" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.45.tgz#458ac1b1c5c760ce8811a16d2bfbd97ec30bafb8" elliptic@^6.0.0: version "6.4.0" @@ -1708,8 +1693,8 @@ error-ex@^1.2.0: is-arrayish "^0.2.1" es-abstract@^1.5.1: - version "1.10.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864" + version "1.11.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.11.0.tgz#cce87d518f0496893b1a30cd8461835535480681" dependencies: es-to-primitive "^1.1.1" function-bind "^1.1.1" @@ -1749,15 +1734,15 @@ escodegen@1.8.x: source-map "~0.2.0" escodegen@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.0.tgz#9811a2f265dc1cd3894420ee3717064b632b8852" + version "1.9.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.1.tgz#dbae17ef96c8e4bedb1356f4504fa4cc2f7cb7e2" dependencies: esprima "^3.1.3" estraverse "^4.2.0" esutils "^2.0.2" optionator "^0.8.1" optionalDependencies: - source-map "~0.5.6" + source-map "~0.6.1" eslint-config-prettier@^2.9.0: version "2.9.0" @@ -1943,16 +1928,16 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" -expect@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/expect/-/expect-23.0.0-alpha.5.tgz#514d9f37b77c86f7d4386c2116de2abce795284c" +expect@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/expect/-/expect-23.0.0-charlie.1.tgz#c6c40f6c0a12c49d1830f5d2315b2a2c937cd206" dependencies: ansi-styles "^3.2.0" - jest-diff "^23.0.0-alpha.5" + jest-diff "^23.0.0-charlie.1" jest-get-type "^22.1.0" - jest-matcher-utils "^23.0.0-alpha.5" - jest-message-util "^23.0.0-alpha.5" - jest-regex-util "^23.0.0-alpha.5" + jest-matcher-utils "^23.0.0-charlie.1" + jest-message-util "^23.0.0-charlie.1" + jest-regex-util "^23.0.0-charlie.1" express@~4.13.1: version "4.13.4" @@ -2040,6 +2025,10 @@ fast-deep-equal@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" +fast-deep-equal@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + fast-diff@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.1.2.tgz#4b62c42b8e03de3f848460b639079920695d0154" @@ -2106,12 +2095,12 @@ fileset@^2.0.2: minimatch "^3.0.3" fill-range@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + version "2.2.4" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" dependencies: is-number "^2.1.0" isobject "^2.0.0" - randomatic "^1.1.3" + randomatic "^3.0.0" repeat-element "^1.1.2" repeat-string "^1.5.2" @@ -2248,37 +2237,13 @@ fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" -fsevents@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.3.tgz#11f82318f5fe7bb2cd22965a108e9306208216d8" - dependencies: - nan "^2.3.0" - node-pre-gyp "^0.6.39" - -fsevents@^1.1.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.2.tgz#4f598f0f69b273188ef4a62ca4e9e08ace314bbf" +fsevents@^1.1.2, fsevents@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.3.tgz#08292982e7059f6674c93d8b829c1e8604979ac0" dependencies: nan "^2.9.2" node-pre-gyp "^0.9.0" -fstream-ignore@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" - dependencies: - fstream "^1.0.0" - inherits "2" - minimatch "^3.0.0" - -fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: - version "1.0.11" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" - dependencies: - graceful-fs "^4.1.2" - inherits "~2.0.0" - mkdirp ">=0.5 0" - rimraf "2" - function-bind@^1.0.2, function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -2374,8 +2339,8 @@ glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: path-is-absolute "^1.0.0" globals@^11.0.1: - version "11.4.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.4.0.tgz#b85c793349561c16076a3c13549238a27945f1bc" + version "11.5.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.5.0.tgz#6bc840de6771173b191f13d3a9c94d441ee92642" globals@^9.18.0: version "9.18.0" @@ -2455,10 +2420,6 @@ has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" -has-flag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -2514,7 +2475,7 @@ hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.0" -hawk@3.1.3, hawk@~3.1.3: +hawk@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" dependencies: @@ -2556,8 +2517,8 @@ home-or-tmp@^2.0.0: os-tmpdir "^1.0.1" hosted-git-info@^2.1.4: - version "2.5.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" + version "2.6.0" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.6.0.tgz#23235b29ab230c576aab0d4f13fc046b0b038222" html-comment-regex@^1.1.0: version "1.1.1" @@ -2605,10 +2566,10 @@ iconv-lite@0.4.19: resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" iconv-lite@^0.4.17, iconv-lite@^0.4.4, iconv-lite@~0.4.13: - version "0.4.21" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.21.tgz#c47f8733d02171189ebc4a400f3218d348094798" + version "0.4.23" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" dependencies: - safer-buffer "^2.1.0" + safer-buffer ">= 2.1.2 < 3" icss-replace-symbols@^1.1.0: version "1.1.0" @@ -2668,7 +2629,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -2700,8 +2661,8 @@ inquirer@^3.0.6: through "^2.3.6" invariant@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" dependencies: loose-envify "^1.0.0" @@ -3018,8 +2979,8 @@ isstream@~0.1.2: resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" istanbul-api@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.1.tgz#4c3b05d18c0016d1022e079b98dc82c40f488954" + version "1.3.2" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.2.tgz#b2cfe6d15ae6a28ee282e7a823b8e9faa235e6cf" dependencies: async "^2.1.4" compare-versions "^3.1.0" @@ -3029,15 +2990,11 @@ istanbul-api@^1.3.1: istanbul-lib-instrument "^1.10.1" istanbul-lib-report "^1.1.4" istanbul-lib-source-maps "^1.2.4" - istanbul-reports "^1.3.0" + istanbul-reports "^1.4.0" js-yaml "^3.7.0" mkdirp "^0.5.1" once "^1.4.0" -istanbul-lib-coverage@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da" - istanbul-lib-coverage@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz#f7d8f2e42b97e37fe796114cb0f9d68b5e3a4341" @@ -3060,18 +3017,6 @@ istanbul-lib-instrument@^1.10.1: istanbul-lib-coverage "^1.2.0" semver "^5.3.0" -istanbul-lib-instrument@^1.7.5, istanbul-lib-instrument@^1.8.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.1.tgz#250b30b3531e5d3251299fdd64b0b2c9db6b558e" - dependencies: - babel-generator "^6.18.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - babylon "^6.18.0" - istanbul-lib-coverage "^1.1.1" - semver "^5.3.0" - istanbul-lib-report@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz#e886cdf505c4ebbd8e099e4396a90d0a28e2acb5" @@ -3081,16 +3026,6 @@ istanbul-lib-report@^1.1.4: path-parse "^1.0.5" supports-color "^3.1.2" -istanbul-lib-source-maps@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.2.tgz#750578602435f28a0c04ee6d7d9e0f2960e62c1c" - dependencies: - debug "^3.1.0" - istanbul-lib-coverage "^1.1.1" - mkdirp "^0.5.1" - rimraf "^2.6.1" - source-map "^0.5.3" - istanbul-lib-source-maps@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.4.tgz#cc7ccad61629f4efff8e2f78adb8c522c9976ec7" @@ -3101,9 +3036,9 @@ istanbul-lib-source-maps@^1.2.4: rimraf "^2.6.1" source-map "^0.5.3" -istanbul-reports@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.3.0.tgz#2f322e81e1d9520767597dca3c20a0cce89a3554" +istanbul-reports@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.4.0.tgz#3d7b44b912ecbe7652a603662b962120739646a1" dependencies: handlebars "^4.0.3" @@ -3148,14 +3083,14 @@ jade@^1.11.0: with "~4.0.0" jest-changed-files@^22.2.0: - version "22.2.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-22.2.0.tgz#517610c4a8ca0925bdc88b0ca53bd678aa8d019e" + version "22.4.3" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-22.4.3.tgz#8882181e022c38bd46a2e4d18d44d19d90a90fb2" dependencies: throat "^4.0.0" jest-cli@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.0.0-alpha.5.tgz#713d38a20f046a595e4411ff9c3c26f7cc05b202" + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.0.0-charlie.1.tgz#71b797f31079d1b9717d1b0800cf14d219a0b1b4" dependencies: ansi-escapes "^3.0.0" chalk "^2.0.1" @@ -3165,23 +3100,23 @@ jest-cli@^23.0.0-alpha.5: import-local "^1.0.0" is-ci "^1.0.10" istanbul-api "^1.3.1" - istanbul-lib-coverage "^1.1.1" - istanbul-lib-instrument "^1.8.0" - istanbul-lib-source-maps "^1.2.1" + istanbul-lib-coverage "^1.2.0" + istanbul-lib-instrument "^1.10.1" + istanbul-lib-source-maps "^1.2.4" jest-changed-files "^22.2.0" - jest-config "^23.0.0-alpha.5" - jest-environment-jsdom "^23.0.0-alpha.5" + jest-config "^23.0.0-charlie.1" + jest-environment-jsdom "^23.0.0-charlie.1" jest-get-type "^22.1.0" - jest-haste-map "^23.0.0-alpha.5" - jest-message-util "^23.0.0-alpha.5" - jest-regex-util "^23.0.0-alpha.5" - jest-resolve-dependencies "^23.0.0-alpha.5" - jest-runner "^23.0.0-alpha.5" - jest-runtime "^23.0.0-alpha.5" - jest-snapshot "^23.0.0-alpha.5" - jest-util "^23.0.0-alpha.5" - jest-validate "^23.0.0-alpha.5" - jest-worker "^23.0.0-alpha.5" + jest-haste-map "^23.0.0-charlie.1" + jest-message-util "^23.0.0-charlie.1" + jest-regex-util "^23.0.0-charlie.1" + jest-resolve-dependencies "^23.0.0-charlie.1" + jest-runner "^23.0.0-charlie.1" + jest-runtime "^23.0.0-charlie.1" + jest-snapshot "^23.0.0-charlie.1" + jest-util "^23.0.0-charlie.1" + jest-validate "^23.0.0-charlie.1" + jest-worker "^23.0.0-charlie.1" micromatch "^2.3.11" node-notifier "^5.2.1" realpath-native "^1.0.0" @@ -3192,103 +3127,104 @@ jest-cli@^23.0.0-alpha.5: which "^1.2.12" yargs "^11.0.0" -jest-config@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.0.0-alpha.5.tgz#8e3aab4fdd36dedcc17b4462e74313b201740e8a" +jest-config@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.0.0-charlie.1.tgz#848c809bca16492d7648012508e8fdfa54330e2a" dependencies: babel-core "^6.0.0" - babel-jest "^23.0.0-alpha.5" + babel-jest "^23.0.0-charlie.1" chalk "^2.0.1" glob "^7.1.1" - jest-environment-jsdom "^23.0.0-alpha.5" - jest-environment-node "^23.0.0-alpha.5" + jest-environment-jsdom "^23.0.0-charlie.1" + jest-environment-node "^23.0.0-charlie.1" jest-get-type "^22.1.0" - jest-jasmine2 "^23.0.0-alpha.5" - jest-regex-util "^23.0.0-alpha.5" - jest-resolve "^23.0.0-alpha.5" - jest-util "^23.0.0-alpha.5" - jest-validate "^23.0.0-alpha.5" - pretty-format "^23.0.0-alpha.5" - -jest-diff@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.0.0-alpha.5.tgz#65c40a2f83ae763167f3b22cbe546d11e879fd21" + jest-jasmine2 "^23.0.0-charlie.1" + jest-regex-util "^23.0.0-charlie.1" + jest-resolve "^23.0.0-charlie.1" + jest-util "^23.0.0-charlie.1" + jest-validate "^23.0.0-charlie.1" + pretty-format "^23.0.0-charlie.1" + +jest-diff@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.0.0-charlie.1.tgz#d5a9c4c38c9b6fb33e6d8b88d1fb77b62d67382e" dependencies: chalk "^2.0.1" diff "^3.2.0" jest-get-type "^22.1.0" - pretty-format "^23.0.0-alpha.5" + pretty-format "^23.0.0-charlie.1" jest-docblock@^21.0.0: version "21.2.0" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414" jest-docblock@^22.4.0: - version "22.4.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-22.4.0.tgz#dbf1877e2550070cfc4d9b07a55775a0483159b8" + version "22.4.3" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-22.4.3.tgz#50886f132b42b280c903c592373bb6e93bb68b19" dependencies: detect-newline "^2.1.0" -jest-environment-jsdom@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.0.0-alpha.5.tgz#5703be9552c971eb21a6d127ba61a0aef00376e4" +jest-environment-jsdom@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.0.0-charlie.1.tgz#c32276008d476522fd3dfba0b380077aa7cbd067" dependencies: - jest-mock "^23.0.0-alpha.5" - jest-util "^23.0.0-alpha.5" + jest-mock "^23.0.0-charlie.1" + jest-util "^23.0.0-charlie.1" jsdom "^11.5.1" -jest-environment-node@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.0.0-alpha.5.tgz#a843ff68af484289493366923ed9c3fb13df38bd" +jest-environment-node@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.0.0-charlie.1.tgz#51b2473cd60bad82541afafbcfdd8b1847f2b79f" dependencies: - jest-mock "^23.0.0-alpha.5" - jest-util "^23.0.0-alpha.5" + jest-mock "^23.0.0-charlie.1" + jest-util "^23.0.0-charlie.1" jest-get-type@^22.1.0: - version "22.1.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.1.0.tgz#4e90af298ed6181edc85d2da500dbd2753e0d5a9" + version "22.4.3" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4" -jest-haste-map@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.0.0-alpha.5.tgz#6602742b99a4a90f40775560b44294455acd55cd" +jest-haste-map@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.0.0-charlie.1.tgz#1194d9707201947d563d39aa6e33a18ce40f29b9" dependencies: fb-watchman "^2.0.0" graceful-fs "^4.1.11" jest-docblock "^22.4.0" - jest-serializer "^22.4.0" - jest-worker "^23.0.0-alpha.5" + jest-serializer "^23.0.0-charlie.1" + jest-worker "^23.0.0-charlie.1" micromatch "^2.3.11" sane "^2.0.0" -jest-jasmine2@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.0.0-alpha.5.tgz#99757191bdadd54885217b239a9d2dc3045cd4c8" +jest-jasmine2@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.0.0-charlie.1.tgz#db47ca9e697434990bc21d710bfbfb5047fcd4a6" dependencies: chalk "^2.0.1" co "^4.6.0" - expect "^23.0.0-alpha.5" + expect "^23.0.0-charlie.1" graceful-fs "^4.1.11" is-generator-fn "^1.0.0" - jest-diff "^23.0.0-alpha.5" - jest-matcher-utils "^23.0.0-alpha.5" - jest-message-util "^23.0.0-alpha.5" - jest-snapshot "^23.0.0-alpha.5" - jest-util "^23.0.0-alpha.5" + jest-diff "^23.0.0-charlie.1" + jest-matcher-utils "^23.0.0-charlie.1" + jest-message-util "^23.0.0-charlie.1" + jest-snapshot "^23.0.0-charlie.1" + jest-util "^23.0.0-charlie.1" + pretty-format "^23.0.0-charlie.1" source-map-support "^0.5.0" -jest-leak-detector@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.0.0-alpha.5.tgz#0f35047e4734671c676e7e95661cd0e8a6c4fdfb" +jest-leak-detector@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.0.0-charlie.1.tgz#1a89f816da34f422014bf59ae02bc87f17a34d53" dependencies: - pretty-format "^23.0.0-alpha.5" + pretty-format "^23.0.0-charlie.1" -jest-matcher-utils@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.0.0-alpha.5.tgz#300c31dde2fa3402f0b217add320cb7f101fa627" +jest-matcher-utils@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.0.0-charlie.1.tgz#6f568348689a67c86fc9232975fcc98658d47e8a" dependencies: chalk "^2.0.1" jest-get-type "^22.1.0" - pretty-format "^23.0.0-alpha.5" + pretty-format "^23.0.0-charlie.1" jest-message-util@^22.4.3: version "22.4.3" @@ -3300,9 +3236,9 @@ jest-message-util@^22.4.3: slash "^1.0.0" stack-utils "^1.0.1" -jest-message-util@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.0.0-alpha.5.tgz#72e56d5ffb196c1fc018a6c7ac49b94ddc5bf974" +jest-message-util@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.0.0-charlie.1.tgz#22ad4999659015443bf27ec6c4c50f560a0a1900" dependencies: "@babel/code-frame" "^7.0.0-beta.35" chalk "^2.0.1" @@ -3310,62 +3246,63 @@ jest-message-util@^23.0.0-alpha.5: slash "^1.0.0" stack-utils "^1.0.1" -jest-mock@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.0.0-alpha.5.tgz#3c3ad13f69019ed3002ad84a8fded5676fc2ab4a" +jest-mock@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.0.0-charlie.1.tgz#0729d27217b3c96a03687f67e508816b42b9e07b" -jest-regex-util@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.0.0-alpha.5.tgz#6dbe0dcb23c9389a2f979c7e293ead3e91052e14" +jest-regex-util@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.0.0-charlie.1.tgz#b85c25e0e879e4c5c11bd66996a820a487b08b23" -jest-resolve-dependencies@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.0.0-alpha.5.tgz#5f371c22d35e3fb3d5e2ed0f580bff60b8f0f144" +jest-resolve-dependencies@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.0.0-charlie.1.tgz#d37ef78c397af73103cf66b73a58872d693fd394" dependencies: - jest-regex-util "^23.0.0-alpha.5" - jest-snapshot "^23.0.0-alpha.5" + jest-regex-util "^23.0.0-charlie.1" + jest-snapshot "^23.0.0-charlie.1" -jest-resolve@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.0.0-alpha.5.tgz#31f484b3c6fa2c2be112092e0da4d898e482b95a" +jest-resolve@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.0.0-charlie.1.tgz#8ec756ee559da2c0c99fd2fda8ac796b245542c8" dependencies: browser-resolve "^1.11.2" chalk "^2.0.1" realpath-native "^1.0.0" -jest-runner@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.0.0-alpha.5.tgz#bc18404f0ad7016c2b641908240face3ca16c117" +jest-runner@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.0.0-charlie.1.tgz#6a20b50ded3e6aadc19b4c45d0bbb962ec37dfaa" dependencies: exit "^0.1.2" - jest-config "^23.0.0-alpha.5" + jest-config "^23.0.0-charlie.1" jest-docblock "^22.4.0" - jest-haste-map "^23.0.0-alpha.5" - jest-jasmine2 "^23.0.0-alpha.5" - jest-leak-detector "^23.0.0-alpha.5" - jest-message-util "^23.0.0-alpha.5" - jest-runtime "^23.0.0-alpha.5" - jest-util "^23.0.0-alpha.5" - jest-worker "^23.0.0-alpha.5" + jest-haste-map "^23.0.0-charlie.1" + jest-jasmine2 "^23.0.0-charlie.1" + jest-leak-detector "^23.0.0-charlie.1" + jest-message-util "^23.0.0-charlie.1" + jest-runtime "^23.0.0-charlie.1" + jest-util "^23.0.0-charlie.1" + jest-worker "^23.0.0-charlie.1" throat "^4.0.0" -jest-runtime@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.0.0-alpha.5.tgz#8a8def856cf9be87d154f13b47d6e2551e0a55ac" +jest-runtime@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.0.0-charlie.1.tgz#322bc1e28d21af7528ca9ab9b74d93eccf7f6af8" dependencies: babel-core "^6.0.0" - babel-plugin-istanbul "^4.1.5" + babel-plugin-istanbul "^4.1.6" chalk "^2.0.1" convert-source-map "^1.4.0" exit "^0.1.2" graceful-fs "^4.1.11" - jest-config "^23.0.0-alpha.5" - jest-haste-map "^23.0.0-alpha.5" - jest-regex-util "^23.0.0-alpha.5" - jest-resolve "^23.0.0-alpha.5" - jest-snapshot "^23.0.0-alpha.5" - jest-util "^23.0.0-alpha.5" - jest-validate "^23.0.0-alpha.5" + jest-config "^23.0.0-charlie.1" + jest-haste-map "^23.0.0-charlie.1" + jest-message-util "^23.0.0-charlie.1" + jest-regex-util "^23.0.0-charlie.1" + jest-resolve "^23.0.0-charlie.1" + jest-snapshot "^23.0.0-charlie.1" + jest-util "^23.0.0-charlie.1" + jest-validate "^23.0.0-charlie.1" json-stable-stringify "^1.0.1" micromatch "^2.3.11" realpath-native "^1.0.0" @@ -3374,9 +3311,9 @@ jest-runtime@^23.0.0-alpha.5: write-file-atomic "^2.1.0" yargs "^11.0.0" -jest-serializer@^22.4.0: - version "22.4.0" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-22.4.0.tgz#b5d145b98c4b0d2c20ab686609adbb81fe23b566" +jest-serializer@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-23.0.0-charlie.1.tgz#c73288c67ed332bc9b80743f0ffe98baa665de08" jest-silent-reporter@0.0.4: version "0.0.4" @@ -3385,16 +3322,16 @@ jest-silent-reporter@0.0.4: chalk "^2.3.1" jest-util "^22.3.0" -jest-snapshot@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.0.0-alpha.5.tgz#98ba2e55c2dca0837782a83bcfd880d125f7d849" +jest-snapshot@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.0.0-charlie.1.tgz#ecccf8fd657ed3b1107e0cf6df5f5bf05cb84dca" dependencies: chalk "^2.0.1" - jest-diff "^23.0.0-alpha.5" - jest-matcher-utils "^23.0.0-alpha.5" + jest-diff "^23.0.0-charlie.1" + jest-matcher-utils "^23.0.0-charlie.1" mkdirp "^0.5.1" natural-compare "^1.4.0" - pretty-format "^23.0.0-alpha.5" + pretty-format "^23.0.0-charlie.1" jest-util@^22.3.0: version "22.4.3" @@ -3408,31 +3345,30 @@ jest-util@^22.3.0: mkdirp "^0.5.1" source-map "^0.6.0" -jest-util@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.0.0-alpha.5.tgz#2ac78c3d6c9e459cae7c100e028f271f954b4b15" +jest-util@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.0.0-charlie.1.tgz#e7efe9bbd1fd3647ce5699df7b2e8c2091968f6a" dependencies: callsites "^2.0.0" chalk "^2.0.1" graceful-fs "^4.1.11" is-ci "^1.0.10" - jest-message-util "^23.0.0-alpha.5" + jest-message-util "^23.0.0-charlie.1" mkdirp "^0.5.1" source-map "^0.6.0" -jest-validate@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.0.0-alpha.5.tgz#c95ec2032b0971af8baa0978de67598ccffdaa8d" +jest-validate@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.0.0-charlie.1.tgz#6895138a0a22366ad5624691631a8ae2896a3fae" dependencies: chalk "^2.0.1" - jest-config "^23.0.0-alpha.5" jest-get-type "^22.1.0" leven "^2.1.0" - pretty-format "^23.0.0-alpha.5" + pretty-format "^23.0.0-charlie.1" -jest-worker@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.0.0-alpha.5.tgz#003d3b106b126070c5c563b20d48cf2141df0f44" +jest-worker@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.0.0-charlie.1.tgz#ac8212ee454808a21b617a72a3c7678a3b29b0e6" dependencies: merge-stream "^1.0.1" @@ -3470,20 +3406,13 @@ js-yaml@3.6.1: argparse "^1.0.7" esprima "^2.6.0" -js-yaml@3.x, js-yaml@^3.9.1: +js-yaml@3.x, js-yaml@^3.7.0, js-yaml@^3.9.1: version "3.11.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef" dependencies: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^3.7.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - js-yaml@~3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" @@ -3496,23 +3425,22 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" jsdom@^11.5.1: - version "11.6.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.6.0.tgz#7334781595ee8bdeea9742fc33fab5cdad6d195f" + version "11.10.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.10.0.tgz#a42cd54e88895dc765f03f15b807a474962ac3b5" dependencies: abab "^1.0.4" acorn "^5.3.0" acorn-globals "^4.1.0" array-equal "^1.0.0" - browser-process-hrtime "^0.1.2" - content-type-parser "^1.0.2" cssom ">= 0.3.2 < 0.4.0" cssstyle ">= 0.2.37 < 0.3.0" + data-urls "^1.0.0" domexception "^1.0.0" escodegen "^1.9.0" html-encoding-sniffer "^1.0.2" left-pad "^1.2.0" nwmatcher "^1.4.3" - parse5 "^4.0.0" + parse5 "4.0.0" pn "^1.1.0" request "^2.83.0" request-promise-native "^1.0.5" @@ -3522,6 +3450,7 @@ jsdom@^11.5.1: w3c-hr-time "^1.0.1" webidl-conversions "^4.0.2" whatwg-encoding "^1.0.3" + whatwg-mimetype "^2.1.0" whatwg-url "^6.4.0" ws "^4.0.0" xml-name-validator "^3.0.0" @@ -3638,8 +3567,8 @@ leb@^0.3.0: resolved "https://registry.yarnpkg.com/leb/-/leb-0.3.0.tgz#32bee9fad168328d6aea8522d833f4180eed1da3" left-pad@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee" + version "1.3.0" + resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" less-loader@^4.0.3: version "4.1.0" @@ -3727,14 +3656,10 @@ lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" -lodash@^4.13.1, lodash@^4.17.4, lodash@^4.3.0: +lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.3.0: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" -lodash@^4.14.0: - version "4.17.4" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" - log-driver@1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056" @@ -3758,8 +3683,8 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1: js-tokens "^3.0.0" lru-cache@^4.0.1, lru-cache@^4.1.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.2.tgz#45234b2e6e2f2b33da125624c4664929a0224c3f" + version "4.1.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" dependencies: pseudomap "^1.0.2" yallist "^2.1.2" @@ -3769,8 +3694,8 @@ macaddress@^0.2.8: resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" make-dir@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.2.0.tgz#6d6a49eead4aae296c53bbf3a1a008bd6c89469b" + version "1.3.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" dependencies: pify "^3.0.0" @@ -3794,6 +3719,10 @@ math-expression-evaluator@^1.2.14: version "1.2.17" resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac" +math-random@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" + md5.js@^1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" @@ -3836,7 +3765,7 @@ methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" -micromatch@^2.1.5, micromatch@^2.3.11: +micromatch@^2.3.11: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" dependencies: @@ -3909,7 +3838,7 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" -"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: +"minimatch@2 || 3", minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: @@ -3928,8 +3857,8 @@ minimist@~0.0.1: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" minipass@^2.2.1, minipass@^2.2.4: - version "2.2.4" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.2.4.tgz#03c824d84551ec38a8d1bb5bc350a5a30a354a40" + version "2.3.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.0.tgz#2e11b1c46df7fe7f1afbe9a490280add21ffe384" dependencies: safe-buffer "^5.1.1" yallist "^3.0.0" @@ -3962,7 +3891,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: +mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -3991,7 +3920,7 @@ mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" -nan@^2.3.0, nan@^2.9.2: +nan@^2.9.2: version "2.10.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" @@ -4017,8 +3946,8 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" needle@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.0.tgz#f14efc69cee1024b72c8b21c7bdf94a731dc12fa" + version "2.2.1" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.1.tgz#b5e325bd3aae8c2678902fa296f729455d1d3a7d" dependencies: debug "^2.1.2" iconv-lite "^0.4.4" @@ -4080,22 +4009,6 @@ node-notifier@^5.2.1: shellwords "^0.1.1" which "^1.3.0" -node-pre-gyp@^0.6.39: - version "0.6.39" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649" - dependencies: - detect-libc "^1.0.2" - hawk "3.1.3" - mkdirp "^0.5.1" - nopt "^4.0.1" - npmlog "^4.0.2" - rc "^1.1.7" - request "2.81.0" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^2.2.1" - tar-pack "^3.4.0" - node-pre-gyp@^0.9.0: version "0.9.1" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.9.1.tgz#f11c07516dd92f87199dbc7e1838eab7cd56c9e0" @@ -4133,7 +4046,7 @@ normalize-package-data@^2.3.2: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1: +normalize-path@^2.0.1, normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" dependencies: @@ -4187,8 +4100,8 @@ number-is-nan@^1.0.0: resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" nwmatcher@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.3.tgz#64348e3b3d80f035b40ac11563d278f8b72db89c" + version "1.4.4" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.4.tgz#2285631f34a95f0d0395cd900c96ed39b58f346e" oauth-sign@~0.8.1, oauth-sign@~0.8.2: version "0.8.2" @@ -4242,7 +4155,7 @@ on-finished@~2.3.0: dependencies: ee-first "1.1.1" -once@1.x, once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0: +once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: @@ -4362,7 +4275,7 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" -parse5@^4.0.0: +parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" @@ -4717,12 +4630,12 @@ postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0 supports-color "^3.2.3" postcss@^6.0.1: - version "6.0.21" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.21.tgz#8265662694eddf9e9a5960db6da33c39e4cd069d" + version "6.0.22" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.22.tgz#e23b78314905c3b90cbd61702121e7a78848f2a3" dependencies: - chalk "^2.3.2" + chalk "^2.4.1" source-map "^0.6.1" - supports-color "^5.3.0" + supports-color "^5.4.0" prelude-ls@~1.1.2: version "1.1.2" @@ -4740,14 +4653,14 @@ prettier@^1.11.1: version "1.12.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.1.tgz#c1ad20e803e7749faf905a409d2367e06bbe7325" -pretty-format@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.0.0-alpha.5.tgz#49441032994ce2b1cfa74531c1c9d9a36fe59e90" +pretty-format@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.0.0-charlie.1.tgz#cb5fde20ad5f5d2e38197c5f07340e694233e986" dependencies: ansi-regex "^3.0.0" ansi-styles "^3.2.0" -private@^0.1.7: +private@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -4927,10 +4840,10 @@ pump@^2.0.0, pump@^2.0.1: once "^1.3.1" pumpify@^1.3.3: - version "1.4.0" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.4.0.tgz#80b7c5df7e24153d03f0e7ac8a05a5d068bd07fb" + version "1.5.0" + resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.0.tgz#30c905a26c88fa0074927af07256672b474b1c15" dependencies: - duplexify "^3.5.3" + duplexify "^3.6.0" inherits "^2.0.3" pump "^2.0.0" @@ -4963,8 +4876,8 @@ qs@~6.4.0: resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" qs@~6.5.1: - version "6.5.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" query-string@^4.1.0: version "4.3.4" @@ -4981,12 +4894,13 @@ querystring@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" -randomatic@^1.1.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" +randomatic@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.0.0.tgz#d35490030eb4f7578de292ce6dfb04a91a128923" dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" + is-number "^4.0.0" + kind-of "^6.0.0" + math-random "^1.0.1" randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: version "2.0.6" @@ -5056,7 +4970,7 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" dependencies: @@ -5098,8 +5012,8 @@ reduce-function-call@^1.0.1: balanced-match "^0.4.2" regenerate@^1.2.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" + version "1.4.0" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" regenerator-runtime@^0.11.0: version "0.11.1" @@ -5320,7 +5234,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: +rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" dependencies: @@ -5333,6 +5247,10 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" +rsvp@^3.3.3: + version "3.6.2" + resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a" + run-async@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" @@ -5355,7 +5273,7 @@ rx-lite@*, rx-lite@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -5365,23 +5283,24 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -safer-buffer@^2.1.0: +"safer-buffer@>= 2.1.2 < 3": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" sane@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/sane/-/sane-2.3.0.tgz#3f3df584abf69e63d4bb74f0f8c42468e4d7d46b" + version "2.5.2" + resolved "https://registry.yarnpkg.com/sane/-/sane-2.5.2.tgz#b4dc1861c21b427e929507a3e751e2a2cb8ab3fa" dependencies: - anymatch "^1.3.0" + anymatch "^2.0.0" + capture-exit "^1.2.0" exec-sh "^0.2.0" fb-watchman "^2.0.0" - minimatch "^3.0.2" + micromatch "^3.1.4" minimist "^1.1.1" walker "~1.0.5" watch "~0.18.0" optionalDependencies: - fsevents "^1.1.1" + fsevents "^1.2.3" sax@^1.2.4, sax@~1.2.1: version "1.2.4" @@ -5577,10 +5496,10 @@ source-list-map@^2.0.0: resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" source-map-resolve@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.1.tgz#7ad0f593f2281598e854df80f19aae4b92d7a11a" + version "0.5.2" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" dependencies: - atob "^2.0.0" + atob "^2.1.1" decode-uri-component "^0.2.0" resolve-url "^0.2.1" source-map-url "^0.4.0" @@ -5593,9 +5512,10 @@ source-map-support@^0.4.15: source-map "^0.5.6" source-map-support@^0.5.0: - version "0.5.2" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.2.tgz#1a6297fd5b2e762b39688c7fc91233b60984f0a5" + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13" dependencies: + buffer-from "^1.0.0" source-map "^0.6.0" source-map-url@^0.4.0: @@ -5608,7 +5528,7 @@ source-map@0.4.x, source-map@^0.4.4: dependencies: amdefine ">=0.0.4" -source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.6: +source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" @@ -5628,19 +5548,27 @@ source-map@~0.2.0: dependencies: amdefine ">=0.0.4" -spdx-correct@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" +spdx-correct@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" dependencies: - spdx-license-ids "^1.0.2" + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" -spdx-expression-parse@~1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" +spdx-exceptions@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9" -spdx-license-ids@^1.0.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" +spdx-expression-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87" split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" @@ -5710,12 +5638,12 @@ stream-each@^1.1.0: stream-shift "^1.0.0" stream-http@^2.7.2: - version "2.8.1" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.1.tgz#d0441be1a457a73a733a8a7b53570bebd9ef66a4" + version "2.8.2" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.2.tgz#4126e8c6b107004465918aa2fc35549e77402c87" dependencies: builtin-status-codes "^3.0.0" inherits "^2.0.1" - readable-stream "^2.3.3" + readable-stream "^2.3.6" to-arraybuffer "^1.0.0" xtend "^4.0.0" @@ -5806,15 +5734,9 @@ supports-color@^3.1.0, supports-color@^3.1.2, supports-color@^3.2.3: dependencies: has-flag "^1.0.0" -supports-color@^4.0.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" - dependencies: - has-flag "^2.0.0" - -supports-color@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.3.0.tgz#5b24ac15db80fa927cf5227a4a33fd3c4c7676c0" +supports-color@^5.3.0, supports-color@^5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" dependencies: has-flag "^3.0.0" @@ -5849,49 +5771,18 @@ tapable@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.0.0.tgz#cbb639d9002eed9c6b5975eb20598d7936f1f9f2" -tar-pack@^3.4.0: - version "3.4.1" - resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f" - dependencies: - debug "^2.2.0" - fstream "^1.0.10" - fstream-ignore "^1.0.5" - once "^1.3.3" - readable-stream "^2.1.4" - rimraf "^2.5.1" - tar "^2.2.1" - uid-number "^0.0.6" - -tar@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" - dependencies: - block-stream "*" - fstream "^1.0.2" - inherits "2" - tar@^4: - version "4.4.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.1.tgz#b25d5a8470c976fd7a9a8a350f42c59e9fa81749" + version "4.4.2" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.2.tgz#60685211ba46b38847b1ae7ee1a24d744a2cd462" dependencies: chownr "^1.0.1" fs-minipass "^1.2.5" minipass "^2.2.4" minizlib "^1.1.0" mkdirp "^0.5.0" - safe-buffer "^5.1.1" + safe-buffer "^5.1.2" yallist "^3.0.2" -test-exclude@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26" - dependencies: - arrify "^1.0.1" - micromatch "^2.3.11" - object-assign "^4.1.0" - read-pkg-up "^1.0.1" - require-main-filename "^1.0.1" - test-exclude@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.1.tgz#dfa222f03480bca69207ca728b37d74b45f724fa" @@ -5981,19 +5872,13 @@ topo@2.x.x: dependencies: hoek "4.x.x" -tough-cookie@>=2.3.3, tough-cookie@~2.3.0, tough-cookie@~2.3.3: +tough-cookie@>=2.3.3, tough-cookie@^2.3.3, tough-cookie@~2.3.0, tough-cookie@~2.3.3: version "2.3.4" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" dependencies: punycode "^1.4.1" -tough-cookie@^2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561" - dependencies: - punycode "^1.4.1" - -tr46@^1.0.0: +tr46@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" dependencies: @@ -6047,18 +5932,18 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" typescript@^2.9.0-dev.20180511: - version "2.9.0-dev.20180511" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.0-dev.20180511.tgz#e864f6b9bf9e7f654d26f5401e74b76871f5a8e2" + version "2.9.0-insiders.20180510" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.0-insiders.20180510.tgz#2f9c37b904ddd8f8151e5eb25be11a3c4744b13f" ua-parser-js@^0.7.9: - version "0.7.17" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac" + version "0.7.18" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.18.tgz#a7bfd92f56edfb117083b69e31d2aa8882d4b1ed" uglify-es@^3.3.4: - version "3.3.9" - resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" + version "3.3.10" + resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.10.tgz#8b0b7992cebe20edc26de1bf325cef797b8f3fa5" dependencies: - commander "~2.13.0" + commander "~2.14.1" source-map "~0.6.1" uglify-js@^2.4.19, uglify-js@^2.6, uglify-js@^2.6.1: @@ -6082,8 +5967,8 @@ uglify-to-browserify@~1.0.0: resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" uglifyjs-webpack-plugin@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.4.tgz#5eec941b2e9b8538be0a20fc6eda25b14c7c1043" + version "1.2.5" + resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.5.tgz#2ef8387c8f1a903ec5e44fa36f9f3cbdcea67641" dependencies: cacache "^10.0.4" find-cache-dir "^1.0.0" @@ -6094,14 +5979,6 @@ uglifyjs-webpack-plugin@^1.2.4: webpack-sources "^1.1.0" worker-farm "^1.5.2" -uid-number@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" - -ultron@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" - union-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" @@ -6152,9 +6029,9 @@ upath@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/upath/-/upath-1.0.5.tgz#02cab9ecebe95bbec6d5fc2566325725ab6d1a73" -uri-js@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-3.0.2.tgz#f90b858507f81dea4dcfbb3c4c3dbfa2b557faaa" +uri-js@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.1.tgz#4595a80a51f356164e22970df64c7abd6ade9850" dependencies: punycode "^2.1.0" @@ -6215,11 +6092,11 @@ val-loader@^1.0.2: loader-utils "^1.0.0" validate-npm-package-license@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + version "3.0.3" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz#81643bcbef1bdfecd4623793dc4648948ba98338" dependencies: - spdx-correct "~1.0.0" - spdx-expression-parse "~1.0.0" + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" vary@~1.0.1: version "1.0.1" @@ -6284,7 +6161,7 @@ webassemblyjs@1.4.3: "@webassemblyjs/wast-parser" "1.4.3" long "^3.2.0" -webidl-conversions@^4.0.1, webidl-conversions@^4.0.2: +webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" @@ -6315,13 +6192,17 @@ whatwg-fetch@>=0.10.0: version "2.0.4" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" +whatwg-mimetype@^2.0.0, whatwg-mimetype@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.1.0.tgz#f0f21d76cbba72362eb609dbed2a30cd17fcc7d4" + whatwg-url@^6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.4.0.tgz#08fdf2b9e872783a7a1f6216260a1d66cc722e08" + version "6.4.1" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.4.1.tgz#fdb94b440fd4ad836202c16e9737d511f012fd67" dependencies: lodash.sortby "^4.7.0" - tr46 "^1.0.0" - webidl-conversions "^4.0.1" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" whet.extend@~0.9.9: version "0.9.9" @@ -6412,12 +6293,11 @@ write@^0.2.1: mkdirp "^0.5.1" ws@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-4.0.0.tgz#bfe1da4c08eeb9780b986e0e4d10eccd7345999f" + version "4.1.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-4.1.0.tgz#a979b5d7d4da68bf54efe0408967c324869a7289" dependencies: async-limiter "~1.0.0" safe-buffer "~5.1.0" - ultron "~1.1.0" xml-name-validator@^3.0.0: version "3.0.0" @@ -6456,8 +6336,8 @@ yargs-parser@^9.0.2: camelcase "^4.1.0" yargs@^11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.0.0.tgz#c052931006c5eee74610e5fc0354bedfd08a201b" + version "11.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" dependencies: cliui "^4.0.0" decamelize "^1.1.1" From 6b1504ecc3c570acc6767fbba557f29f1dd8b21b Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Sun, 6 May 2018 14:01:47 -0700 Subject: [PATCH 017/310] chore(types): make loose interface for removing reasons ties in Compilation --- lib/Compilation.js | 17 +++++++++++++++-- lib/ContextModule.js | 5 ++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/lib/Compilation.js b/lib/Compilation.js index 2755c6f82b9..ae7b2ee8894 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -103,6 +103,13 @@ const SingleEntryDependency = require("./dependencies/SingleEntryDependency"); * @property {Set} availableModules */ +/** + * @typedef {Object} DependenciesBlockLike + * @property {Dependency[]} dependencies + * @property {AsyncDependenciesBlock[]} blocks + * @property {DependenciesBlockVariable[]} variables + */ + /** * @param {Chunk} a first chunk to sort by id * @param {Chunk} b second chunk to sort by id @@ -631,7 +638,7 @@ class Compilation extends Tapable { /** * @param {Module} module to be processed for deps - * @param {*} callback callback to be triggered + * @param {ModuleCallback} callback callback to be triggered * @returns {void} */ processModuleDependencies(module, callback) { @@ -1049,6 +1056,12 @@ class Compilation extends Tapable { ); } + /** + * @param {Module} module module to be rebuilt + * @param {TODO} thisCallback //TODO need a great description for what + * the hell this code does here or rename "thisCallback" + * @returns {void} + */ rebuildModule(module, thisCallback) { let callbackList = this._rebuildingModules.get(module); if (callbackList) { @@ -1815,7 +1828,7 @@ class Compilation extends Tapable { /** * * @param {Module} module module relationship for removal - * @param {DependenciesBlock} block //TODO: good description + * @param {DependenciesBlockLike} block //TODO: good description * @returns {void} */ removeReasonsOfDependencyBlock(module, block) { diff --git a/lib/ContextModule.js b/lib/ContextModule.js index 2b201fdc84f..8852f8e8562 100644 --- a/lib/ContextModule.js +++ b/lib/ContextModule.js @@ -647,8 +647,11 @@ webpackEmptyAsyncContext.id = ${JSON.stringify(id)};`; // if we dont have dependencies we stop here. return this.dependencies.reduce((size, dependency) => { - if (dependency instanceof ModuleDependency) + if (dependency instanceof ModuleDependency) { return size + 5 + dependency.userRequest.length; + } else { + return size; + } }, initialSize); } } From 62cce4ee6192ce5e7d38c43483bd8221cfeba96e Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Sun, 6 May 2018 22:29:26 -0700 Subject: [PATCH 018/310] chore(types): remove dup types, clean up some itesm --- declarations.d.ts | 12 ++++++++++++ lib/AsyncDependenciesBlock.js | 15 +-------------- lib/Compilation.js | 15 +-------------- lib/Module.js | 5 ----- 4 files changed, 14 insertions(+), 33 deletions(-) diff --git a/declarations.d.ts b/declarations.d.ts index 42a387af58b..7bd9f0e82ce 100644 --- a/declarations.d.ts +++ b/declarations.d.ts @@ -218,3 +218,15 @@ declare const $crossOriginLoading$; declare const chunkId; type TODO = any; + +declare interface SourcePosition { + line: number; + column: number; +} + +declare interface DependencyLocation { + name: string; + index: number; + start: SourcePosition; + end: SourcePosition; +} diff --git a/lib/AsyncDependenciesBlock.js b/lib/AsyncDependenciesBlock.js index a9c03a53f94..dc8e15a80f9 100644 --- a/lib/AsyncDependenciesBlock.js +++ b/lib/AsyncDependenciesBlock.js @@ -13,24 +13,11 @@ const DependenciesBlock = require("./DependenciesBlock"); * */ -/** - * @typedef {Object} SourcePosition - * @property {number} line - * @property {number} column - */ - -/** - * @typedef {Object} SourceLocation - * @property {number} index - * @property {SourcePosition} start - * @property {SourcePosition} end - */ - module.exports = class AsyncDependenciesBlock extends DependenciesBlock { /** * @param {GroupOptions} groupOptions options for the group * @param {Module} module the Module object - * @param {SourceLocation=} loc the line of code + * @param {DependencyLocation=} loc the line of code * @param {TODO=} request the request */ constructor(groupOptions, module, loc, request) { diff --git a/lib/Compilation.js b/lib/Compilation.js index ae7b2ee8894..7cfa3a9d376 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -84,19 +84,6 @@ const SingleEntryDependency = require("./dependencies/SingleEntryDependency"); * @property {Dependency[]} dependencies */ -/** - * @typedef {Object} SourcePosition - * @property {number} line - * @property {number} column - */ - -/** - * @typedef {Object} SourceLocation - * @property {number} index - * @property {SourcePosition} start - * @property {SourcePosition} end - */ - /** * @typedef {Object} AvailableModulesChunkGroupMapping * @property {ChunkGroup} chunkGroup @@ -1313,7 +1300,7 @@ class Compilation extends Tapable { /** * @param {any} groupOptions options provided for group * @param {Module} module module in question - * @param {SourceLocation} loc source location reference + * @param {DependencyLocation} loc source location reference * @param {string} request request string * @returns {ChunkGroup} the chunk group added inside */ diff --git a/lib/Module.js b/lib/Module.js index b42ef3835d1..98d0fdbab2f 100644 --- a/lib/Module.js +++ b/lib/Module.js @@ -11,14 +11,9 @@ const ModuleReason = require("./ModuleReason"); const SortableSet = require("./util/SortableSet"); const Template = require("./Template"); -<<<<<<< HEAD -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./RequestShortener")} RequestShortener */ -======= /** @typedef {typeof import("./Chunk")} Chunk */ /** @typedef {typeof import("./RequestShortener")} RequestShortener */ /** @typedef {import("./WebpackError")} WebpackError */ ->>>>>>> 206d1a6... chore(types): add Compiler and Compilation type support const EMPTY_RESOLVE_OPTIONS = {}; From 761d73b4e72208f4a44aca3d833fbde5a3c9d26d Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Thu, 3 May 2018 09:57:02 -0700 Subject: [PATCH 019/310] chore(types): add Compiler and Compilation type support --- declarations.d.ts | 93 +++ lib/AsyncDependenciesBlock.js | 58 ++ lib/Chunk.js | 22 + lib/Compilation.js | 516 +++++++++++- lib/Compiler.js | 70 +- lib/ContextModule.js | 9 +- lib/DelegatedModule.js | 4 + lib/DependenciesBlock.js | 42 +- lib/DependenciesBlockVariable.js | 23 +- lib/Dependency.js | 3 + lib/DynamicEntryPlugin.js | 24 +- lib/EntryOptionPlugin.js | 12 + lib/JavascriptGenerator.js | 2 +- lib/Module.js | 12 +- lib/MultiEntryPlugin.js | 23 +- lib/NormalModule.js | 2 + lib/SingleEntryPlugin.js | 14 + lib/WebpackError.js | 11 +- lib/dependencies/DependencyReference.js | 9 + lib/dependencies/LoaderPlugin.js | 6 +- lib/dependencies/ModuleDependency.js | 3 + lib/dependencies/MultiEntryDependency.js | 5 + lib/dependencies/SingleEntryDependency.js | 4 + lib/optimize/ConcatenatedModule.js | 2 +- lib/util/Semaphore.js | 12 + package.json | 1 + tsconfig.json | 113 +-- yarn.lock | 916 ++++++++++------------ 28 files changed, 1378 insertions(+), 633 deletions(-) diff --git a/declarations.d.ts b/declarations.d.ts index d73b4d8305a..42a387af58b 100644 --- a/declarations.d.ts +++ b/declarations.d.ts @@ -8,6 +8,99 @@ declare namespace NodeJS { } } +declare module "neo-async" { + export interface Dictionary { + [key: string]: T; + } + export type IterableCollection = T[] | IterableIterator | Dictionary; + + export interface ErrorCallback { + (err?: T): void; + } + export interface AsyncBooleanResultCallback { + (err?: E, truthValue?: boolean): void; + } + export interface AsyncResultCallback { + (err?: E, result?: T): void; + } + export interface AsyncResultArrayCallback { + (err?: E, results?: Array): void; + } + export interface AsyncResultObjectCallback { + (err: E | undefined, results: Dictionary): void; + } + + export interface AsyncFunction { + (callback: (err?: E, result?: T) => void): void; + } + export interface AsyncFunctionEx { + (callback: (err?: E, ...results: T[]) => void): void; + } + export interface AsyncIterator { + (item: T, callback: ErrorCallback): void; + } + export interface AsyncForEachOfIterator { + (item: T, key: number | string, callback: ErrorCallback): void; + } + export interface AsyncResultIterator { + (item: T, callback: AsyncResultCallback): void; + } + export interface AsyncMemoIterator { + (memo: R | undefined, item: T, callback: AsyncResultCallback): void; + } + export interface AsyncBooleanIterator { + (item: T, callback: AsyncBooleanResultCallback): void; + } + + export interface AsyncWorker { + (task: T, callback: ErrorCallback): void; + } + export interface AsyncVoidFunction { + (callback: ErrorCallback): void; + } + + export type AsyncAutoTasks, E> = { + [K in keyof R]: AsyncAutoTask + }; + export type AsyncAutoTask, E> = + | AsyncAutoTaskFunctionWithoutDependencies + | (keyof R | AsyncAutoTaskFunction)[]; + export interface AsyncAutoTaskFunctionWithoutDependencies { + (cb: AsyncResultCallback | ErrorCallback): void; + } + export interface AsyncAutoTaskFunction, E> { + (results: R, cb: AsyncResultCallback | ErrorCallback): void; + } + + export function each( + arr: IterableCollection, + iterator: AsyncIterator, + callback?: ErrorCallback + ): void; + + export function map( + arr: T[] | IterableIterator, + iterator: AsyncResultIterator, + callback?: AsyncResultArrayCallback + ): void; + export function map( + arr: Dictionary, + iterator: AsyncResultIterator, + callback?: AsyncResultArrayCallback + ): void; + + export function parallel( + tasks: Array>, + callback?: AsyncResultArrayCallback + ): void; + export function parallel( + tasks: Dictionary>, + callback?: AsyncResultObjectCallback + ): void; + + export const forEach: typeof each; +} + // There are no typings for chrome-trace-event declare module "chrome-trace-event" { interface Event { diff --git a/lib/AsyncDependenciesBlock.js b/lib/AsyncDependenciesBlock.js index 3bf22d2e297..a9c03a53f94 100644 --- a/lib/AsyncDependenciesBlock.js +++ b/lib/AsyncDependenciesBlock.js @@ -5,7 +5,34 @@ "use strict"; const DependenciesBlock = require("./DependenciesBlock"); +/** + * @typedef {import("./ChunkGroup")} ChunkGroup + * @typedef {import("./Module")} Module + * @typedef {import("crypto").Hash} Hash + * @typedef {TODO} GroupOptions + * + */ + +/** + * @typedef {Object} SourcePosition + * @property {number} line + * @property {number} column + */ + +/** + * @typedef {Object} SourceLocation + * @property {number} index + * @property {SourcePosition} start + * @property {SourcePosition} end + */ + module.exports = class AsyncDependenciesBlock extends DependenciesBlock { + /** + * @param {GroupOptions} groupOptions options for the group + * @param {Module} module the Module object + * @param {SourceLocation=} loc the line of code + * @param {TODO=} request the request + */ constructor(groupOptions, module, loc, request) { super(); if (typeof groupOptions === "string") { @@ -14,28 +41,50 @@ module.exports = class AsyncDependenciesBlock extends DependenciesBlock { groupOptions = { name: undefined }; } this.groupOptions = groupOptions; + /** @type {ChunkGroup=} */ this.chunkGroup = undefined; this.module = module; this.loc = loc; this.request = request; + /** @type {DependenciesBlock} */ + this.parent = undefined; } + /** + * @returns {string} The name of the chunk + */ get chunkName() { return this.groupOptions.name; } + /** + * @param {string} value The new chunk name + * @returns {void} + */ set chunkName(value) { this.groupOptions.name = value; } + /** + * @returns {never} this throws and should never be called + */ get chunks() { throw new Error("Moved to AsyncDependenciesBlock.chunkGroup"); } + /** + * @param {never} value setter value + * @returns {never} this is going to throw therefore we should throw type + * assertions by returning never + */ set chunks(value) { throw new Error("Moved to AsyncDependenciesBlock.chunkGroup"); } + /** + * @param {Hash} hash the hash used to track block changes, from "crypto" module + * @returns {void} + */ updateHash(hash) { hash.update(JSON.stringify(this.groupOptions)); hash.update( @@ -50,16 +99,25 @@ module.exports = class AsyncDependenciesBlock extends DependenciesBlock { super.updateHash(hash); } + /** + * @returns {void} + */ disconnect() { this.chunkGroup = undefined; super.disconnect(); } + /** + * @returns {void} + */ unseal() { this.chunkGroup = undefined; super.unseal(); } + /** + * @returns {void} + */ sortItems() { super.sortItems(); } diff --git a/lib/Chunk.js b/lib/Chunk.js index f0c6f3902dd..a0ea24a7491 100644 --- a/lib/Chunk.js +++ b/lib/Chunk.js @@ -17,6 +17,7 @@ const ERR_CHUNK_INITIAL = /** @typedef {import("./ChunkGroup")} ChunkGroup */ /** @typedef {import("./ModuleReason.js")} ModuleReason */ /** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("crypto").Hash} Hash */ /** * @typedef {Object} Identifiable an object who contains an identifier function property @@ -471,6 +472,11 @@ class Chunk { return this.addMultiplierAndOverhead(this.modulesSize(), options); } + /** + * @param {Chunk} otherChunk the other chunk + * @param {TODO} options the options for this function + * @returns {number | false} the size, or false if it can't be integrated + */ integratedSize(otherChunk, options) { // Chunk if it's possible to integrate this chunk if (!this.canBeIntegrated(otherChunk)) { @@ -500,6 +506,9 @@ class Chunk { this.sortModules(); } + /** + * @returns {Set} a set of all the async chunks + */ getAllAsyncChunks() { const queue = new Set(); const chunks = new Set(); @@ -522,6 +531,10 @@ class Chunk { return chunks; } + /** + * @param {Hash} realHash the hash for the chunk maps + * @returns {{ hash: TODO, contentHash: TODO, name: TODO }} the chunk map information + */ getChunkMaps(realHash) { const chunkHashMap = Object.create(null); const chunkContentHashMap = Object.create(null); @@ -544,6 +557,9 @@ class Chunk { }; } + /** + * @returns {Record>>} a record object of names to lists of child ids(?) + */ getChildIdsByOrders() { const lists = new Map(); for (const group of this.groupsIterable) { @@ -600,6 +616,12 @@ class Chunk { return chunkMaps; } + /** @typedef {(module: Module) => true} FilterFn */ + + /** + * @param {FilterFn} filterFn function used to filter modules + * @returns {TODO} module map information + */ getChunkModuleMaps(filterFn) { const chunkModuleIdMap = Object.create(null); const chunkModuleHashMap = Object.create(null); diff --git a/lib/Compilation.js b/lib/Compilation.js index 5f482ba3eb5..2755c6f82b9 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -35,14 +35,93 @@ const createHash = require("./util/createHash"); const Queue = require("./util/Queue"); const SortableSet = require("./util/SortableSet"); const GraphHelpers = require("./GraphHelpers"); - -const byId = (a, b) => { - if (a.id < b.id) return -1; - if (a.id > b.id) return 1; +const SingleEntryDependency = require("./dependencies/SingleEntryDependency"); + +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./WebpackError")} WebpackError */ +/** @typedef {import("./DependenciesBlockVariable")} DependenciesBlockVariable */ +/** @typedef {import("./dependencies/SingleEntryDependency")} SingleEntryDependency */ +/** @typedef {import("./dependencies/MultiEntryDependency")} MultiEntryDependency */ +/** @typedef {import("./dependencies/DllEntryDependency")} DllEntryDependency */ +/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ +/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ + +/** @typedef {SingleEntryDependency|MultiEntryDependency|DllEntryDependency} PossibleEntryDependencies */ +/** @typedef {{[assetName: string]: Source}} CompilationAssets */ +/** @typedef {(err: Error|null, result?: Module) => void } ModuleCallback */ +/** @typedef {(err?: Error|null, result?: Module) => void } ModuleChainCallback */ +/** @typedef {(module: Module) => void} OnModuleCallback */ +/** @typedef {(err?: Error|null) => void} CompilationSealCallback */ +/** @typedef {{apply: (dep: Dependency, source: Source, runtime: RuntimeTemplate) => void}} DependencyTemplate */ +/** @typedef {(d: Dependency) => any} DepBlockVarDependenciesCallback */ +/** @typedef {new (...args: any[]) => Dependency} DepConstructor */ +/** @typedef {{apply: () => void}} Plugin */ + +/** + * @typedef {Object} ModuleFactoryCreateDataContextInfo + * @property {string} issuer + * @property {string} compiler + */ + +/** + * @typedef {Object} ModuleFactoryCreateData + * @property {ModuleFactoryCreateDataContextInfo} contextInfo + * @property {any=} resolveOptions + * @property {string} context + * @property {Dependency[]} dependencies + */ + +/** + * @typedef {Object} ModuleFactory + * @property {(data: ModuleFactoryCreateData, callback: ModuleCallback) => any} create + */ + +/** + * @typedef {Object} SortedDependency + * @property {ModuleFactory} factory + * @property {Dependency[]} dependencies + */ + +/** + * @typedef {Object} SourcePosition + * @property {number} line + * @property {number} column + */ + +/** + * @typedef {Object} SourceLocation + * @property {number} index + * @property {SourcePosition} start + * @property {SourcePosition} end + */ + +/** + * @typedef {Object} AvailableModulesChunkGroupMapping + * @property {ChunkGroup} chunkGroup + * @property {Set} availableModules + */ + +/** + * @param {Chunk} a first chunk to sort by id + * @param {Chunk} b second chunk to sort by id + * @returns {-1|0|1} sort value + */ +function byId(a, b) { + if (a.id && b.id) { + if (a.id < b.id) return -1; + if (a.id > b.id) return 1; + } return 0; -}; +} -const byIdOrIdentifier = (a, b) => { +/** + * @param {Module} a first module to sort by + * @param {Module} b second module to sort by + * @returns {-1|0|1} sort value + */ +function byIdOrIdentifier(a, b) { if (a.id < b.id) return -1; if (a.id > b.id) return 1; const identA = a.identifier(); @@ -50,9 +129,14 @@ const byIdOrIdentifier = (a, b) => { if (identA < identB) return -1; if (identA > identB) return 1; return 0; -}; +} -const byIndexOrIdentifier = (a, b) => { +/** + * @param {Module} a first module to sort by + * @param {Module} b second module to sort by + * @returns {-1|0|1} sort value + */ +function byIndexOrIdentifier(a, b) { if (a.index < b.index) return -1; if (a.index > b.index) return 1; const identA = a.identifier(); @@ -60,35 +144,59 @@ const byIndexOrIdentifier = (a, b) => { if (identA < identB) return -1; if (identA > identB) return 1; return 0; -}; +} -const byNameOrHash = (a, b) => { +/** + * @param {Compilation} a first compilation to sort by + * @param {Compilation} b second compilation to sort by + * @returns {-1|0|1} sort value + */ +function byNameOrHash(a, b) { if (a.name < b.name) return -1; if (a.name > b.name) return 1; if (a.fullHash < b.fullHash) return -1; - if (a.fullhash > b.fullHash) return 1; + if (a.fullHash > b.fullHash) return 1; return 0; -}; +} -const iterationBlockVariable = (variables, fn) => { +/** + * @param {DependenciesBlockVariable[]} variables DepBlock Variables to iterate over + * @param {DepBlockVarDependenciesCallback} fn callback to apply on iterated elements + * @returns {void} + */ +function iterationBlockVariable(variables, fn) { for ( let indexVariable = 0; indexVariable < variables.length; indexVariable++ ) { + // TODO: Remove when Dependency + DependenciesBlockVariable is typed + /** @type {Dependency[]} */ const varDep = variables[indexVariable].dependencies; for (let indexVDep = 0; indexVDep < varDep.length; indexVDep++) { fn(varDep[indexVDep]); } } -}; +} -const iterationOfArrayCallback = (arr, fn) => { +/** + * @template {T} + * @param {T[]} arr array of elements to iterate over + * @param {function(T): void} fn callback applied to each element + * @returns {void} + */ +function iterationOfArrayCallback(arr, fn) { for (let index = 0; index < arr.length; index++) { fn(arr[index]); } -}; +} +/** + * @template {T} + * @param {Set} set set to add items to + * @param {Set} otherSet set to add items from + * @returns {void} + */ function addAllToSet(set, otherSet) { for (const item of otherSet) { set.add(item); @@ -96,92 +204,156 @@ function addAllToSet(set, otherSet) { } class Compilation extends Tapable { + /** + * Creates an instance of Compilation. + * @param {Compiler} compiler the compiler which created the compilation + */ constructor(compiler) { super(); this.hooks = { + /** @type {SyncHook} */ buildModule: new SyncHook(["module"]), + /** @type {SyncHook} */ rebuildModule: new SyncHook(["module"]), + /** @type {SyncHook} */ failedModule: new SyncHook(["module", "error"]), + /** @type {SyncHook} */ succeedModule: new SyncHook(["module"]), - + /** @type {SyncHook} */ finishModules: new SyncHook(["modules"]), + /** @type {SyncHook} */ finishRebuildingModule: new SyncHook(["module"]), - + /** @type {SyncHook} */ unseal: new SyncHook([]), + /** @type {SyncHook} */ seal: new SyncHook([]), + /** @type {SyncBailHook} */ optimizeDependenciesBasic: new SyncBailHook(["modules"]), + /** @type {SyncBailHook} */ optimizeDependencies: new SyncBailHook(["modules"]), + /** @type {SyncBailHook} */ optimizeDependenciesAdvanced: new SyncBailHook(["modules"]), + /** @type {SyncBailHook} */ afterOptimizeDependencies: new SyncHook(["modules"]), + /** @type {SyncHook} */ optimize: new SyncHook([]), - + /** @type {SyncBailHook} */ optimizeModulesBasic: new SyncBailHook(["modules"]), + /** @type {SyncBailHook} */ optimizeModules: new SyncBailHook(["modules"]), + /** @type {SyncBailHook} */ optimizeModulesAdvanced: new SyncBailHook(["modules"]), + /** @type {SyncHook} */ afterOptimizeModules: new SyncHook(["modules"]), + /** @type {SyncBailHook} */ optimizeChunksBasic: new SyncBailHook(["chunks", "chunkGroups"]), + /** @type {SyncBailHook} */ optimizeChunks: new SyncBailHook(["chunks", "chunkGroups"]), + /** @type {SyncBailHook} */ optimizeChunksAdvanced: new SyncBailHook(["chunks", "chunkGroups"]), + /** @type {SyncHook} */ afterOptimizeChunks: new SyncHook(["chunks", "chunkGroups"]), + /** @type {AsyncSeriesHook} */ optimizeTree: new AsyncSeriesHook(["chunks", "modules"]), + /** @type {SyncHook} */ afterOptimizeTree: new SyncHook(["chunks", "modules"]), + /** @type {SyncBailHook} */ optimizeChunkModulesBasic: new SyncBailHook(["chunks", "modules"]), + /** @type {SyncBailHook} */ optimizeChunkModules: new SyncBailHook(["chunks", "modules"]), + /** @type {SyncBailHook} */ optimizeChunkModulesAdvanced: new SyncBailHook(["chunks", "modules"]), + /** @type {SyncHook} */ afterOptimizeChunkModules: new SyncHook(["chunks", "modules"]), + /** @type {SyncBailHook} */ shouldRecord: new SyncBailHook([]), + /** @type {SyncHook} */ reviveModules: new SyncHook(["modules", "records"]), + /** @type {SyncHook} */ optimizeModuleOrder: new SyncHook(["modules"]), + /** @type {SyncHook} */ advancedOptimizeModuleOrder: new SyncHook(["modules"]), + /** @type {SyncHook} */ beforeModuleIds: new SyncHook(["modules"]), + /** @type {SyncHook} */ moduleIds: new SyncHook(["modules"]), + /** @type {SyncHook} */ optimizeModuleIds: new SyncHook(["modules"]), + /** @type {SyncHook} */ afterOptimizeModuleIds: new SyncHook(["modules"]), + /** @type {SyncHook} */ reviveChunks: new SyncHook(["chunks", "records"]), + /** @type {SyncHook} */ optimizeChunkOrder: new SyncHook(["chunks"]), + /** @type {SyncHook} */ beforeChunkIds: new SyncHook(["chunks"]), + /** @type {SyncHook} */ optimizeChunkIds: new SyncHook(["chunks"]), + /** @type {SyncHook} */ afterOptimizeChunkIds: new SyncHook(["chunks"]), + /** @type {SyncHook} */ recordModules: new SyncHook(["modules", "records"]), + /** @type {SyncHook} */ recordChunks: new SyncHook(["chunks", "records"]), + /** @type {SyncHook} */ beforeHash: new SyncHook([]), + /** @type {SyncHook} */ contentHash: new SyncHook(["chunk"]), + /** @type {SyncHook} */ afterHash: new SyncHook([]), - + /** @type {SyncHook} */ recordHash: new SyncHook(["records"]), - + /** @type {SyncHook} */ record: new SyncHook(["compilation", "records"]), + /** @type {SyncHook} */ beforeModuleAssets: new SyncHook([]), + /** @type {SyncBailHook} */ shouldGenerateChunkAssets: new SyncBailHook([]), + /** @type {SyncHook} */ beforeChunkAssets: new SyncHook([]), + /** @type {SyncHook} */ additionalChunkAssets: new SyncHook(["chunks"]), + /** @type {AsyncSeriesHook} */ additionalAssets: new AsyncSeriesHook([]), + /** @type {AsyncSeriesHook} */ optimizeChunkAssets: new AsyncSeriesHook(["chunks"]), + /** @type {SyncHook} */ afterOptimizeChunkAssets: new SyncHook(["chunks"]), + /** @type {AsyncSeriesHook} */ optimizeAssets: new AsyncSeriesHook(["assets"]), + /** @type {SyncHook} */ afterOptimizeAssets: new SyncHook(["assets"]), + /** @type {SyncBailHook} */ needAdditionalSeal: new SyncBailHook([]), + /** @type {AsyncSeriesHook} */ afterSeal: new AsyncSeriesHook([]), + /** @type {SyncHook} */ chunkHash: new SyncHook(["chunk", "chunkHash"]), + /** @type {SyncHook} */ moduleAsset: new SyncHook(["module", "filename"]), + /** @type {SyncHook} */ chunkAsset: new SyncHook(["chunk", "filename"]), + /** @type {SyncWaterfallHook} */ assetPath: new SyncWaterfallHook(["filename", "data"]), // TODO MainTemplate + /** @type {SyncBailHook} */ needAdditionalPass: new SyncBailHook([]), + + /** @type {SyncHook} */ childCompiler: new SyncHook([ "childCompiler", "compilerName", @@ -190,11 +362,16 @@ class Compilation extends Tapable { // TODO the following hooks are weirdly located here // TODO move them for webpack 5 + /** @type {SyncHook} */ normalModuleLoader: new SyncHook(["loaderContext", "module"]), + /** @type {SyncBailHook} */ optimizeExtractedChunksBasic: new SyncBailHook(["chunks"]), + /** @type {SyncBailHook} */ optimizeExtractedChunks: new SyncBailHook(["chunks"]), + /** @type {SyncBailHook} */ optimizeExtractedChunksAdvanced: new SyncBailHook(["chunks"]), + /** @type {SyncHook} */ afterOptimizeExtractedChunks: new SyncHook(["chunks"]) }; this._pluginCompat.tap("Compilation", options => { @@ -208,7 +385,9 @@ class Compilation extends Tapable { break; } }); + /** @type {string=} */ this.name = undefined; + /** @type {Compiler} */ this.compiler = compiler; this.resolverFactory = compiler.resolverFactory; this.inputFileSystem = compiler.inputFileSystem; @@ -216,6 +395,7 @@ class Compilation extends Tapable { const options = (this.options = compiler.options); this.outputOptions = options && options.output; + /** @type {boolean=} */ this.bail = options && options.bail; this.profile = options && options.profile; this.performance = options && options.performance; @@ -237,34 +417,56 @@ class Compilation extends Tapable { this.semaphore = new Semaphore(options.parallelism || 100); this.entries = []; + /** @private @type {{name: string, request: string, module: Module}[]} */ this._preparedEntrypoints = []; this.entrypoints = new Map(); + /** @type {Chunk[]} */ this.chunks = []; + /** @type {ChunkGroup[]} */ this.chunkGroups = []; + /** @type {Map} */ this.namedChunkGroups = new Map(); + /** @type {Map} */ this.namedChunks = new Map(); + /** @type {Module[]} */ this.modules = []; + /** @private @type {Map} */ this._modules = new Map(); this.cache = null; this.records = null; + /** @type {number=} */ this.nextFreeModuleIndex = undefined; + /** @type {number=} */ this.nextFreeModuleIndex2 = undefined; + /** @type {string[]} */ this.additionalChunkAssets = []; + /** @type {CompilationAssets} */ this.assets = {}; + /** @type {WebpackError[]} */ this.errors = []; + /** @type {WebpackError[]} */ this.warnings = []; + /** @type {Compilation[]} */ this.children = []; + /** @type {Map} */ this.dependencyFactories = new Map(); + /** @type {Map} */ this.dependencyTemplates = new Map(); this.dependencyTemplates.set("hash", ""); this.childrenCounters = {}; + /** @type {Set} */ this.usedChunkIds = null; + /** @type {Set} */ this.usedModuleIds = null; + /** @type {Map=} */ this.fileTimestamps = undefined; + /** @type {Map=} */ this.contextTimestamps = undefined; + /** @type {Set} */ this.compilationDependencies = undefined; - + /** @private @type {Map} */ this._buildingModules = new Map(); + /** @private @type {Map} */ this._rebuildingModules = new Map(); } @@ -272,6 +474,12 @@ class Compilation extends Tapable { return new Stats(this); } + /** + * @param {Module} module module to be added that was created + * @param {any=} cacheGroup cacheGroup it is apart of + * @returns {{module: Module, issuer: boolean, build: boolean, dependencies: boolean}} returns meta about whether or not the module had built + * had an issuer, or any dependnecies + */ addModule(module, cacheGroup) { const identifier = module.identifier(); const alreadyAddedModule = this._modules.get(identifier); @@ -327,15 +535,30 @@ class Compilation extends Tapable { }; } + /** + * Fetches a module from a compilation by its identifier + * @param {Module} module the module provided + * @returns {Module} the module requested + */ getModule(module) { const identifier = module.identifier(); return this._modules.get(identifier); } + /** + * Attempts to search for a module by its identifier + * @param {string} identifier identifier (usually path) for module + * @returns {Module|undefined} attempt to search for module and return it, else undefined + */ findModule(identifier) { return this._modules.get(identifier); } + /** + * @param {Module} module module with its callback list + * @param {any} callback the callback function + * @returns {void} + */ waitForBuildingFinished(module, callback) { let callbackList = this._buildingModules.get(module); if (callbackList) { @@ -345,6 +568,16 @@ class Compilation extends Tapable { } } + /** + * Builds the module object + * + * @param {Module} module module to be built + * @param {boolean} optional optional flag + * @param {Module=} origin origin module this module build was requested from + * @param {Dependency[]=} dependencies optional dependencies from the module to be built + * @param {any} thisCallback the callback + * @returns {any} returns the callback function with results + */ buildModule(module, optional, origin, dependencies, thisCallback) { let callbackList = this._buildingModules.get(module); if (callbackList) { @@ -396,6 +629,11 @@ class Compilation extends Tapable { ); } + /** + * @param {Module} module to be processed for deps + * @param {*} callback callback to be triggered + * @returns {void} + */ processModuleDependencies(module, callback) { const dependencies = new Map(); @@ -457,6 +695,15 @@ class Compilation extends Tapable { ); } + /** + * @param {Module} module module to add deps to + * @param {SortedDependency[]} dependencies set of sorted dependencies to iterate through + * @param {(boolean|null)=} bail whether to bail or not + * @param {any} cacheGroup optional cacheGroup + * @param {boolean} recursive whether it is recursive traversal + * @param {function} callback callback for when dependencies are finished being added + * @returns {void} + */ addModuleDependencies( module, dependencies, @@ -623,6 +870,14 @@ class Compilation extends Tapable { ); } + /** + * + * @param {string} context context string path + * @param {Dependency} dependency dependency used to create Module chain + * @param {OnModuleCallback} onModule function invoked on modules creation + * @param {ModuleChainCallback} callback callback for when module chain is complete + * @returns {void|never} will throw if dependency instance is not a valid Dependency + */ _addModuleChain(context, dependency, onModule, callback) { const start = this.profile && Date.now(); const currentProfile = this.profile && {}; @@ -644,7 +899,10 @@ class Compilation extends Tapable { ) { throw new Error("Parameter 'dependency' must be a Dependency"); } - + // @ts-ignore + // TODO: Not sure how to handle the + // dependency.constructor error, + // maybe I typed it wrong const moduleFactory = this.dependencyFactories.get(dependency.constructor); if (!moduleFactory) { throw new Error( @@ -655,6 +913,7 @@ class Compilation extends Tapable { } this.semaphore.acquire(() => { + /** @type {ModuleFactory} */ moduleFactory.create( { contextInfo: { @@ -731,12 +990,25 @@ class Compilation extends Tapable { }); } + /** + * + * @param {string} context context path for entry + * @param {PossibleEntryDependencies} entry entry dependency being created + * @param {string} name name of entry + * @param {ModuleCallback} callback callback function + * @returns {void} returns + */ addEntry(context, entry, name, callback) { const slot = { name: name, - request: entry.request, + request: null, module: null }; + + if (entry instanceof SingleEntryDependency) { + slot.request = entry.request; + } + this._preparedEntrypoints.push(slot); this._addModuleChain( context, @@ -760,6 +1032,12 @@ class Compilation extends Tapable { ); } + /** + * @param {string} context context path string + * @param {PossibleEntryDependencies} dependency dep used to create module + * @param {ModuleCallback} callback module callback sending module up a level + * @returns {void} + */ prefetch(context, dependency, callback) { this._addModuleChain( context, @@ -831,6 +1109,10 @@ class Compilation extends Tapable { } } + /** + * @param {CompilationSealCallback} callback signals when the seal method is finishes + * @returns {void} + */ seal(callback) { this.hooks.seal.call(); @@ -970,10 +1252,19 @@ class Compilation extends Tapable { }); } + /** + * @param {Module[]} modules the modules array on compilation to perform the sort for + * @returns {void} + */ sortModules(modules) { modules.sort(byIndexOrIdentifier); } + /** + * @param {Module} module moulde to report from + * @param {DependenciesBlock[]} blocks blocks to report from + * @returns {void} + */ reportDependencyErrorsAndWarnings(module, blocks) { for (let indexBlock = 0; indexBlock < blocks.length; indexBlock++) { const block = blocks[indexBlock]; @@ -1006,6 +1297,13 @@ class Compilation extends Tapable { } } + /** + * @param {any} groupOptions options provided for group + * @param {Module} module module in question + * @param {SourceLocation} loc source location reference + * @param {string} request request string + * @returns {ChunkGroup} the chunk group added inside + */ addChunkInGroup(groupOptions, module, loc, request) { if (typeof groupOptions === "string") { groupOptions = { name: groupOptions }; @@ -1034,6 +1332,13 @@ class Compilation extends Tapable { return chunkGroup; } + /** + * This method first looks to see if a name is provided for a new chunk, + * and first looks to see if any named chunks already exist and reuse that chunk instead. + * + * @param {string=} name optional chunk name to be provided + * @returns {Chunk} create a chunk (invoked during seal event) + */ addChunk(name) { if (name) { const chunk = this.namedChunks.get(name); @@ -1049,7 +1354,15 @@ class Compilation extends Tapable { return chunk; } + /** + * @param {Module} module index will be assigned to this module + * @returns {void} + */ assignIndex(module) { + /** + * @param {Module} module assign index to the module + * @returns {void} + */ const assignIndexToModule = module => { // enter module if (typeof module.index !== "number") { @@ -1069,11 +1382,23 @@ class Compilation extends Tapable { } }; + /** + * @param {DependenciesBlock} block to assign index to + * @returns {void} + */ const assignIndexToDependencyBlock = block => { let allDependencies = []; + /** + * @param {Dependency} d iterator over dependencies + * @returns {number} returned push function value (side-effect) + */ const iteratorDependency = d => allDependencies.push(d); + /** + * @param {DependenciesBlock} b blocks to iterate + * @returns {number} returned push value from queue (side-effect) + */ const iteratorBlock = b => queue.push(() => assignIndexToDependencyBlock(b)); @@ -1104,6 +1429,10 @@ class Compilation extends Tapable { } ]; + /** + * @param {(Dependency|DependenciesBlockVariable)[]} d all dependencies of a block being added to queue + * @returns {void} + */ const iteratorAllDependencies = d => { queue.push(() => assignIndexToDependency(d)); }; @@ -1113,12 +1442,20 @@ class Compilation extends Tapable { } } + /** + * @param {Module} module module to assign depth + * @returns {void} + */ assignDepth(module) { const queue = new Set([module]); let depth; module.depth = 0; + /** + * @param {Module} module module for processeing + * @returns {void} + */ const enqueueJob = module => { const d = module.depth; if (typeof d === "number" && d <= depth) return; @@ -1126,12 +1463,20 @@ class Compilation extends Tapable { module.depth = depth; }; - const assignDepthToDependency = (dependency, depth) => { + /** + * @param {Dependency} dependency dependency to assign depth to + * @returns {void} + */ + const assignDepthToDependency = dependency => { if (dependency.module) { enqueueJob(dependency.module); } }; + /** + * @param {DependenciesBlock} block block to assign depth to + * @returns {void} + */ const assignDepthToDependencyBlock = block => { if (block.variables) { iterationBlockVariable(block.variables, assignDepthToDependency); @@ -1156,6 +1501,10 @@ class Compilation extends Tapable { } // This method creates the Chunk graph from the Module graph + /** + * @param {TODO} inputChunkGroups input chunkGroups to be processed + * @returns {void} + */ processDependenciesBlocksForChunkGroups(inputChunkGroups) { // Process is splitting into two parts: // Part one traverse the module graph and builds a very basic chunks graph @@ -1169,8 +1518,13 @@ class Compilation extends Tapable { const allCreatedChunkGroups = new Set(); // PREPARE + /** @type {Map, blocks: AsyncDependenciesBlock[]}>} */ const blockInfoMap = new Map(); + /** + * @param {Dependency} d dependency to iterate over + * @returns {void} + */ const iteratorDependency = d => { // We skip Dependencies without Reference const ref = d.getReference(); @@ -1190,12 +1544,23 @@ class Compilation extends Tapable { blockInfoModules.add(refModule); }; + /** + * @param {AsyncDependenciesBlock} b blocks to prepare + * @returns {void} + */ const iteratorBlockPrepare = b => { blockInfoBlocks.push(b); blockQueue.push(b); }; - let block, blockQueue, blockInfoModules, blockInfoBlocks; + /** @type {DependenciesBlock} */ + let block; + /** @type {DependenciesBlock[]} */ + let blockQueue; + /** @type {Set} */ + let blockInfoModules; + /** @type {AsyncDependenciesBlock[]} */ + let blockInfoBlocks; for (const module of this.modules) { blockQueue = [module]; while (blockQueue.length > 0) { @@ -1224,10 +1589,12 @@ class Compilation extends Tapable { } // PART ONE - + /** @type {Map} */ const blockChunkGroups = new Map(); // Start with the provided modules/chunks + /** @type {{block: DependenciesBlock, module: Module, chunk: Chunk, chunkGroup: ChunkGroup}[]} */ + const queue = inputChunkGroups.map(chunkGroup => ({ block: chunkGroup.chunks[0].entryModule, module: chunkGroup.chunks[0].entryModule, @@ -1235,9 +1602,18 @@ class Compilation extends Tapable { chunkGroup })); - let module, chunk, chunkGroup; + /** @type {Module} */ + let module; + /** @type {Chunk} */ + let chunk; + /** @type {ChunkGroup} */ + let chunkGroup; // For each async Block in graph + /** + * @param {AsyncDependenciesBlock} b iterating over each Async DepBlock + * @returns {void} + */ const iteratorBlock = b => { // 1. We create a chunk for this Block // but only once (blockChunkGroups map) @@ -1315,9 +1691,10 @@ class Compilation extends Tapable { } // PART TWO - + /** @type {Set} */ let availableModules; let newAvailableModules; + /** @type {Queue} */ const queue2 = new Queue( inputChunkGroups.map(chunkGroup => ({ chunkGroup, @@ -1325,7 +1702,13 @@ class Compilation extends Tapable { })) ); - // Helper function to check if all modules of a chunk are available + /** + * Helper function to check if all modules of a chunk are available + * + * @param {ChunkGroup} chunkGroup the chunkGroup to scan + * @param {Set} availableModules the comparitor set + * @returns {boolean} return true if all modules of a chunk are available + */ const areModulesAvailable = (chunkGroup, availableModules) => { for (const chunk of chunkGroup.chunks) { for (const module of chunk.modulesIterable) { @@ -1336,14 +1719,18 @@ class Compilation extends Tapable { }; // For each edge in the basic chunk graph + /** + * @param {TODO} dep the dependency used for filtering + * @returns {boolean} used to filter "edges" (aka Dependencies) that were pointing + * to modules that are already available. Also filters circular dependencies in the chunks graph + */ const filterFn = dep => { - // Filter egdes that are not needed because all modules are already available - // This also filters circular dependencies in the chunks graph const depChunkGroup = dep.chunkGroup; if (areModulesAvailable(depChunkGroup, newAvailableModules)) return false; // break all modules are already available return true; }; + /** @type {Map>} */ const minAvailableModulesMap = new Map(); // Iterative traversing of the basic chunk graph @@ -1425,6 +1812,12 @@ class Compilation extends Tapable { } } + /** + * + * @param {Module} module module relationship for removal + * @param {DependenciesBlock} block //TODO: good description + * @returns {void} + */ removeReasonsOfDependencyBlock(module, block) { const iteratorDependency = d => { if (!d.module) { @@ -1452,6 +1845,11 @@ class Compilation extends Tapable { } } + /** + * @param {Module} module module to patch tie + * @param {Chunk} chunk chunk to patch tie + * @returns {void} + */ patchChunksAfterReasonRemoval(module, chunk) { if (!module.hasReasons()) { this.removeReasonsOfDependencyBlock(module, module); @@ -1463,6 +1861,12 @@ class Compilation extends Tapable { } } + /** + * + * @param {DependenciesBlock} block block tie for Chunk + * @param {Chunk} chunk chunk to remove from dep + * @returns {void} + */ removeChunkFromDependencies(block, chunk) { const iteratorDependency = d => { if (!d.module) { @@ -1473,12 +1877,15 @@ class Compilation extends Tapable { const blocks = block.blocks; for (let indexBlock = 0; indexBlock < blocks.length; indexBlock++) { - const chunks = blocks[indexBlock].chunks; + // Grab all chunks from the first Block's AsyncDepBlock + const chunks = blocks[indexBlock].chunkGroup.chunks; + // For each chunk in chunkGroup for (let indexChunk = 0; indexChunk < chunks.length; indexChunk++) { - const blockChunk = chunks[indexChunk]; - chunk.removeChunk(blockChunk); - blockChunk.removeParent(chunk); - this.removeChunkFromDependencies(chunks, blockChunk); + const iteratedChunk = chunks[indexChunk]; + block.chunkGroup.removeChunk(iteratedChunk); + block.chunkGroup.removeParent(iteratedChunk); + // Recurse + this.removeChunkFromDependencies(block, iteratedChunk); } } @@ -1539,6 +1946,7 @@ class Compilation extends Tapable { } applyChunkIds() { + /** @type {Set} */ const usedIds = new Set(); // Get used ids from usedChunkIds property (i. e. from records) @@ -1568,11 +1976,15 @@ class Compilation extends Tapable { // Calculate maximum assigned chunk id let nextFreeChunkId = -1; for (const id of usedIds) { + if (typeof id !== "number") { + continue; + } nextFreeChunkId = Math.max(nextFreeChunkId, id); } nextFreeChunkId++; // Determine free chunk ids from 0 to maximum + /** @type {number[]} */ const unusedIds = []; if (nextFreeChunkId > 0) { let index = nextFreeChunkId; @@ -1630,6 +2042,16 @@ class Compilation extends Tapable { chunks[indexChunk].sortItems(true); } + /** + * Used to sort errors and warnings in compilation. this.warnings, and + * this.errors contribute to the compilation hash and therefore shoudl be + * updated whenever other references (having a chunk id) are sorted. This preserves the hash + * integrity + * + * @param {WebpackError} a first WebpackError instance (including subclasses) + * @param {WebpackError} b second WebpackError instance (including subclasses) + * @returns {-1|0|1} sort order index + */ const byMessage = (a, b) => { const ma = `${a.message}`; const mb = `${b.message}`; @@ -1746,6 +2168,10 @@ class Compilation extends Tapable { this.hash = this.fullHash.substr(0, hashDigestLength); } + /** + * @param {TODO} update //TODO (update hash function?) + * @returns {void} + */ modifyHash(update) { const outputOptions = this.outputOptions; const hashFunction = outputOptions.hashFunction; @@ -1839,12 +2265,27 @@ class Compilation extends Tapable { } } + /** + * @param {string} filename used to get asset path with hash + * @param {TODO=} data // TODO: figure out this param type + * @returns {TODO} figure out this return type + */ getPath(filename, data) { data = data || {}; data.hash = data.hash || this.hash; return this.mainTemplate.getAssetPath(filename, data); } + /** + * This function allows you to run another instance of webpack inside of webpack however as + * a child with different settings and configurations (if desired) applied. It copies all hooks, plugins + * from parent (or top level compiler) and creates a child Compilation + * + * @param {string} name name of the child compiler + * @param {TODO} outputOptions // Need to convert config schema to types for this + * @param {Plugin[]} plugins webpack plugins that will be applied + * @returns {Compiler} creates a child Compiler instance + */ createChildCompiler(name, outputOptions, plugins) { const idx = this.childrenCounters[name] || 0; this.childrenCounters[name] = idx + 1; @@ -1858,6 +2299,7 @@ class Compilation extends Tapable { } checkConstraints() { + /** @type {Set} */ const usedIds = new Set(); const modules = this.modules; diff --git a/lib/Compiler.js b/lib/Compiler.js index e7805c4b394..3066d22ce03 100644 --- a/lib/Compiler.js +++ b/lib/Compiler.js @@ -26,38 +26,92 @@ const RequestShortener = require("./RequestShortener"); const { makePathsRelative } = require("./util/identifier"); const ConcurrentCompilationError = require("./ConcurrentCompilationError"); +/** + * @typedef {Object} CompilationParams + * @property {NormalModuleFactory} normalModuleFactory + * @property {ContextModuleFactory} contextModuleFactory + * @property {Set} compilationDependencies + */ + +/** @typedef {string|string[]} EntryValues */ +/** @typedef {{[entryKey: string]: EntryValues}} EntryOptionValues */ +/** @typedef {(() => EntryOptionValues) | EntryOptionValues | EntryValues} EntryOptions */ + class Compiler extends Tapable { constructor(context) { super(); this.hooks = { + /** @type {SyncBailHook} */ shouldEmit: new SyncBailHook(["compilation"]), + + /** @type {AsyncSeriesHook} */ done: new AsyncSeriesHook(["stats"]), + + /** @type {AsyncSeriesHook<>} */ additionalPass: new AsyncSeriesHook([]), - beforeRun: new AsyncSeriesHook(["compilation"]), - run: new AsyncSeriesHook(["compilation"]), + + /** @type {AsyncSeriesHook} */ + beforeRun: new AsyncSeriesHook(["compiler"]), + + /** @type {AsyncSeriesHook} */ + run: new AsyncSeriesHook(["compiler"]), + + /** @type {AsyncSeriesHook} */ emit: new AsyncSeriesHook(["compilation"]), + + /** @type {AsyncSeriesHook} */ afterEmit: new AsyncSeriesHook(["compilation"]), + + /** @type {SyncHook} */ thisCompilation: new SyncHook(["compilation", "params"]), + + /** @type {SyncHook} */ compilation: new SyncHook(["compilation", "params"]), + + /** @type {SyncHook} */ normalModuleFactory: new SyncHook(["normalModuleFactory"]), + + /** @type {SyncHook} */ contextModuleFactory: new SyncHook(["contextModulefactory"]), + + /** @type {AsyncSeriesHook} */ beforeCompile: new AsyncSeriesHook(["params"]), + + /** @type {SyncHook} */ compile: new SyncHook(["params"]), + + /** @type {AsyncParallelHook} */ make: new AsyncParallelHook(["compilation"]), + + /** @type {AsyncSeriesHook} */ afterCompile: new AsyncSeriesHook(["compilation"]), + + /** @type {AsyncSeriesHook} */ watchRun: new AsyncSeriesHook(["compiler"]), + + /** @type {SyncHook} */ failed: new SyncHook(["error"]), + + /** @type {SyncHook} */ invalid: new SyncHook(["filename", "changeTime"]), + + /** @type {SyncHook} */ watchClose: new SyncHook([]), // TODO the following hooks are weirdly located here // TODO move them for webpack 5 + /** @type {SyncHook} */ environment: new SyncHook([]), + /** @type {SyncHook} */ afterEnvironment: new SyncHook([]), + /** @type {SyncHook} */ afterPlugins: new SyncHook(["compiler"]), + /** @type {SyncHook} */ afterResolvers: new SyncHook(["compiler"]), + /** @type {SyncBailHook} */ entryOption: new SyncBailHook(["context", "entry"]) }; + this._pluginCompat.tap("Compiler", options => { switch (options.name) { case "additional-pass": @@ -74,19 +128,26 @@ class Compiler extends Tapable { } }); + /** @type {string=} */ this.name = undefined; + /** @type {Compilation=} */ this.parentCompilation = undefined; + /** @type {string} */ this.outputPath = ""; + this.outputFileSystem = null; this.inputFileSystem = null; + /** @type {string|null} */ this.recordsInputPath = null; + /** @type {string|null} */ this.recordsOutputPath = null; this.records = {}; - + /** @type {Map} */ this.fileTimestamps = new Map(); + /** @type {Map} */ this.contextTimestamps = new Map(); - + /** @type {ResolverFactory} */ this.resolverFactory = new ResolverFactory(); // TODO remove in webpack 5 @@ -135,6 +196,7 @@ class Compiler extends Tapable { this.requestShortener = new RequestShortener(context); + /** @type {boolean} */ this.running = false; } diff --git a/lib/ContextModule.js b/lib/ContextModule.js index fd186bc90f6..2b201fdc84f 100644 --- a/lib/ContextModule.js +++ b/lib/ContextModule.js @@ -8,6 +8,7 @@ const util = require("util"); const { OriginalSource, RawSource } = require("webpack-sources"); const Module = require("./Module"); const AsyncDependenciesBlock = require("./AsyncDependenciesBlock"); +const ModuleDependency = require("./dependencies/ModuleDependency"); const Template = require("./Template"); class ContextModule extends Module { @@ -645,10 +646,10 @@ webpackEmptyAsyncContext.id = ${JSON.stringify(id)};`; const initialSize = 160; // if we dont have dependencies we stop here. - return this.dependencies.reduce( - (size, dependency) => size + 5 + dependency.userRequest.length, - initialSize - ); + return this.dependencies.reduce((size, dependency) => { + if (dependency instanceof ModuleDependency) + return size + 5 + dependency.userRequest.length; + }, initialSize); } } diff --git a/lib/DelegatedModule.js b/lib/DelegatedModule.js index c2560542433..3abe062c1f8 100644 --- a/lib/DelegatedModule.js +++ b/lib/DelegatedModule.js @@ -11,6 +11,8 @@ const WebpackMissingModule = require("./dependencies/WebpackMissingModule"); const DelegatedSourceDependency = require("./dependencies/DelegatedSourceDependency"); const DelegatedExportsDependency = require("./dependencies/DelegatedExportsDependency"); +/** @typedef {import("./dependencies/ModuleDependency")} ModuleDependency */ + class DelegatedModule extends Module { constructor(sourceRequest, data, type, userRequest, originalRequest) { super("javascript/dynamic", null); @@ -48,6 +50,8 @@ class DelegatedModule extends Module { this.built = true; this.buildMeta = Object.assign({}, this.delegateData.buildMeta); this.buildInfo = {}; + /** @type {ModuleDependency[]=} */ + this.dependencies = []; this.addDependency(new DelegatedSourceDependency(this.sourceRequest)); this.addDependency( new DelegatedExportsDependency(this, this.delegateData.exports || true) diff --git a/lib/DependenciesBlock.js b/lib/DependenciesBlock.js index 037118f5734..cd25f26212f 100644 --- a/lib/DependenciesBlock.js +++ b/lib/DependenciesBlock.js @@ -6,23 +6,46 @@ const DependenciesBlockVariable = require("./DependenciesBlockVariable"); -/** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** + * @typedef {import("./ChunkGroup")} ChunkGroup + * @typedef {import("./Dependency")} Dependency + * @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock + * @typedef {import("./DependenciesBlockVariable")} DependenciesBlockVariable + * @typedef {(d: Dependency) => boolean} DependencyFilterFunction + * @typedef {import("crypto").Hash} Hash + */ class DependenciesBlock { constructor() { + /** @type {Dependency[]} */ this.dependencies = []; + /** @type {AsyncDependenciesBlock[]} */ this.blocks = []; + /** @type {DependenciesBlockVariable[]} */ this.variables = []; // TODO remove this line, it's wrong /** @type {ChunkGroup=} */ this.chunkGroup = undefined; } + /** + * Adds a DependencyBlock to DependencyBlock relationship. + * This is used for when a Module has a AsyncDependencyBlock tie (for code-splitting) + * + * @param {AsyncDependenciesBlock} block block being added + * @returns {void} + */ addBlock(block) { this.blocks.push(block); block.parent = this; } + /** + * @param {string} name name of dependency + * @param {string} expression expression string for variable + * @param {Dependency[]} dependencies dependency instances tied to variable + * @returns {void} + */ addVariable(name, expression, dependencies) { for (let v of this.variables) { if (v.name === name && v.expression === expression) { @@ -34,15 +57,28 @@ class DependenciesBlock { ); } + /** + * @param {Dependency} dependency dependency being tied to block. + * This is an "edge" pointing to another "node" on module graph. + * @returns {void} + */ addDependency(dependency) { this.dependencies.push(dependency); } + /** + * @param {Dependency} dependency dependency being removed + * @returns {void} + */ removeDependency(dependency) { const idx = this.dependencies.indexOf(dependency); if (idx >= 0) this.dependencies.splice(idx, 1); } + /** + * @param {Hash} hash the hash used to track dependencies, from "crypto" module + * @returns {void} + */ updateHash(hash) { for (const dep of this.dependencies) dep.updateHash(hash); for (const block of this.blocks) block.updateHash(hash); @@ -59,6 +95,10 @@ class DependenciesBlock { for (const block of this.blocks) block.unseal(); } + /** + * @param {DependencyFilterFunction} filter filter function for dependencies, gets passed all dependency ties from current instance + * @returns {boolean} returns boolean for filter + */ hasDependencies(filter) { if (filter) { for (const dep of this.dependencies) { diff --git a/lib/DependenciesBlockVariable.js b/lib/DependenciesBlockVariable.js index abb990b44fc..0573502c16a 100644 --- a/lib/DependenciesBlockVariable.js +++ b/lib/DependenciesBlockVariable.js @@ -6,13 +6,29 @@ const { RawSource, ReplaceSource } = require("webpack-sources"); +/** @typedef {import("./Dependency")} Dependency */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("crypto").Hash} Hash */ +/** @typedef {(d: Dependency) => boolean} DependencyFilterFunction */ +/** @typedef {Map} DependencyFactoryConstruction */ + class DependenciesBlockVariable { + /** + * Creates an instance of DependenciesBlockVariable. + * @param {string} name name of DependenciesBlockVariable + * @param {string} expression expression string + * @param {Dependency[]=} dependencies dependencies tied to this varaiable + */ constructor(name, expression, dependencies) { this.name = name; this.expression = expression; this.dependencies = dependencies || []; } + /** + * @param {Hash} hash hash for instance to update + * @returns {void} + */ updateHash(hash) { hash.update(this.name); hash.update(this.expression); @@ -21,8 +37,13 @@ class DependenciesBlockVariable { } } + /** + * @param {DependencyFactoryConstruction} dependencyTemplates Dependency constructors and templates Map. + * @param {RuntimeTemplate} runtimeTemplate runtimeTemplate to generate expression souce + * @returns {ReplaceSource} returns constructed source for expression via templates + */ expressionSource(dependencyTemplates, runtimeTemplate) { - const source = new ReplaceSource(new RawSource(this.expression)); + const source = new ReplaceSource(new RawSource(this.expression), null); for (const dep of this.dependencies) { const template = dependencyTemplates.get(dep.constructor); if (!template) diff --git a/lib/Dependency.js b/lib/Dependency.js index a5a5c23e21e..f031f13b045 100644 --- a/lib/Dependency.js +++ b/lib/Dependency.js @@ -7,8 +7,11 @@ const compareLocations = require("./compareLocations"); const DependencyReference = require("./dependencies/DependencyReference"); +/** @typedef {import("./Module")} Module */ + class Dependency { constructor() { + /** @type {Module|null} */ this.module = null; this.weak = false; this.optional = false; diff --git a/lib/DynamicEntryPlugin.js b/lib/DynamicEntryPlugin.js index 38a5dbb3fc5..ec8633f5df5 100644 --- a/lib/DynamicEntryPlugin.js +++ b/lib/DynamicEntryPlugin.js @@ -10,12 +10,25 @@ const MultiModuleFactory = require("./MultiModuleFactory"); const MultiEntryPlugin = require("./MultiEntryPlugin"); const SingleEntryPlugin = require("./SingleEntryPlugin"); +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {string|string[]} EntryValues */ +/** @typedef {{[entryKey: string]: EntryValues | EntryValues}} EntryOptionValues */ +/** @typedef {(() => (EntryOptionValues|EntryValues))} EntryOptionValuesFunction */ + class DynamicEntryPlugin { + /** + * @param {string} context the context path + * @param {EntryOptionValuesFunction} entry the entry value + */ constructor(context, entry) { this.context = context; this.entry = entry; } + /** + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ apply(compiler) { compiler.hooks.compilation.tap( "DynamicEntryPlugin", @@ -36,6 +49,11 @@ class DynamicEntryPlugin { compiler.hooks.make.tapAsync( "DynamicEntryPlugin", (compilation, callback) => { + /** + * @param {string|string[]} entry entry value or array of entry values + * @param {string} name name of entry + * @returns {Promise} returns the promise resolving the Compilation#addEntry function + */ const addEntry = (entry, name) => { const dep = DynamicEntryPlugin.createDependency(entry, name); return new Promise((resolve, reject) => { @@ -63,7 +81,11 @@ class DynamicEntryPlugin { } module.exports = DynamicEntryPlugin; - +/** + * @param {string|string[]} entry entry value or array of entry paths + * @param {string} name name of entry + * @returns {SingleEntryDependency|MultiEntryDependency} returns dep + */ DynamicEntryPlugin.createDependency = (entry, name) => { if (Array.isArray(entry)) return MultiEntryPlugin.createDependency(entry, name); diff --git a/lib/EntryOptionPlugin.js b/lib/EntryOptionPlugin.js index c8c3ce75588..e992bc2c95a 100644 --- a/lib/EntryOptionPlugin.js +++ b/lib/EntryOptionPlugin.js @@ -8,6 +8,14 @@ const SingleEntryPlugin = require("./SingleEntryPlugin"); const MultiEntryPlugin = require("./MultiEntryPlugin"); const DynamicEntryPlugin = require("./DynamicEntryPlugin"); +/** @typedef {import("./Compiler")} Compiler */ + +/** + * @param {string} context context path + * @param {string | string[]} item entry array or single path + * @param {string} name entry key name + * @returns {SingleEntryPlugin | MultiEntryPlugin} returns either a single or multi entry plugin + */ const itemToPlugin = (context, item, name) => { if (Array.isArray(item)) { return new MultiEntryPlugin(context, item, name); @@ -16,6 +24,10 @@ const itemToPlugin = (context, item, name) => { }; module.exports = class EntryOptionPlugin { + /** + * @param {Compiler} compiler the compiler instance one is tapping into + * @returns {void} + */ apply(compiler) { compiler.hooks.entryOption.tap("EntryOptionPlugin", (context, entry) => { if (typeof entry === "string" || Array.isArray(entry)) { diff --git a/lib/JavascriptGenerator.js b/lib/JavascriptGenerator.js index 167a628c76b..b233c93cbc2 100644 --- a/lib/JavascriptGenerator.js +++ b/lib/JavascriptGenerator.js @@ -18,7 +18,7 @@ class JavascriptGenerator { return new RawSource("throw new Error('No source available');"); } - const source = new ReplaceSource(originalSource); + const source = new ReplaceSource(originalSource, null); this.sourceBlock( module, diff --git a/lib/Module.js b/lib/Module.js index 72f25857225..b42ef3835d1 100644 --- a/lib/Module.js +++ b/lib/Module.js @@ -11,8 +11,14 @@ const ModuleReason = require("./ModuleReason"); const SortableSet = require("./util/SortableSet"); const Template = require("./Template"); +<<<<<<< HEAD /** @typedef {import("./Chunk")} Chunk */ /** @typedef {import("./RequestShortener")} RequestShortener */ +======= +/** @typedef {typeof import("./Chunk")} Chunk */ +/** @typedef {typeof import("./RequestShortener")} RequestShortener */ +/** @typedef {import("./WebpackError")} WebpackError */ +>>>>>>> 206d1a6... chore(types): add Compiler and Compilation type support const EMPTY_RESOLVE_OPTIONS = {}; @@ -47,15 +53,15 @@ class Module extends DependenciesBlock { this.renderedHash = undefined; // Info from Factory - /** @type {object} */ + /** @type {any} */ this.resolveOptions = EMPTY_RESOLVE_OPTIONS; /** @type {object} */ this.factoryMeta = {}; // Info from Build - /** @type {Error[]} */ + /** @type {WebpackError[]} */ this.warnings = []; - /** @type {Error[]} */ + /** @type {WebpackError[]} */ this.errors = []; /** @type {object} */ this.buildMeta = undefined; diff --git a/lib/MultiEntryPlugin.js b/lib/MultiEntryPlugin.js index 29e8064298c..853ee399df2 100644 --- a/lib/MultiEntryPlugin.js +++ b/lib/MultiEntryPlugin.js @@ -8,13 +8,25 @@ const MultiEntryDependency = require("./dependencies/MultiEntryDependency"); const SingleEntryDependency = require("./dependencies/SingleEntryDependency"); const MultiModuleFactory = require("./MultiModuleFactory"); -module.exports = class MultiEntryPlugin { +/** @typedef {import("./Compiler")} Compiler */ + +class MultiEntryPlugin { + /** + * The MultiEntryPlugin is invoked whenever this.options.entry value is an array of paths + * @param {string} context context path + * @param {string[]} entries array of entry paths + * @param {string} name entry key name + */ constructor(context, entries, name) { this.context = context; this.entries = entries; this.name = name; } + /** + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ apply(compiler) { compiler.hooks.compilation.tap( "MultiEntryPlugin", @@ -43,6 +55,11 @@ module.exports = class MultiEntryPlugin { ); } + /** + * @param {string[]} entries each entry path string + * @param {string} name name of the entry + * @return {MultiEntryDependency} returns a constructed Dependency + */ static createDependency(entries, name) { return new MultiEntryDependency( entries.map((e, idx) => { @@ -55,4 +72,6 @@ module.exports = class MultiEntryPlugin { name ); } -}; +} + +module.exports = MultiEntryPlugin; diff --git a/lib/NormalModule.js b/lib/NormalModule.js index 125c21c2b8d..0d2712bcd95 100644 --- a/lib/NormalModule.js +++ b/lib/NormalModule.js @@ -218,6 +218,8 @@ class NormalModule extends Module { } if (Buffer.isBuffer(source)) { + // @ts-ignore + // TODO We need to fix @types/webpack-sources to allow RawSource to take a Buffer | string return new RawSource(source); } diff --git a/lib/SingleEntryPlugin.js b/lib/SingleEntryPlugin.js index 755a6b59725..e049abc2ac8 100644 --- a/lib/SingleEntryPlugin.js +++ b/lib/SingleEntryPlugin.js @@ -5,13 +5,27 @@ "use strict"; const SingleEntryDependency = require("./dependencies/SingleEntryDependency"); +/** @typedef {import("./Compiler")} Compiler */ + class SingleEntryPlugin { + /** + * An entry plugin which will handle + * creation of the SingleEntryDependency + * + * @param {string} context context path + * @param {string} entry entry path + * @param {string} name entry key name + */ constructor(context, entry, name) { this.context = context; this.entry = entry; this.name = name; } + /** + * @param {Compiler} compiler the compiler instance + * @returns {void} + */ apply(compiler) { compiler.hooks.compilation.tap( "SingleEntryPlugin", diff --git a/lib/WebpackError.js b/lib/WebpackError.js index 4fd23388178..adc3671c006 100644 --- a/lib/WebpackError.js +++ b/lib/WebpackError.js @@ -4,11 +4,16 @@ */ "use strict"; -module.exports = class WebpackError extends Error { +class WebpackError extends Error { constructor(message) { super(message); this.details = undefined; + this.missing = undefined; + this.origin = undefined; + this.dependencies = undefined; + this.module = undefined; + this.message = undefined; Error.captureStackTrace(this, this.constructor); } @@ -16,4 +21,6 @@ module.exports = class WebpackError extends Error { inspect() { return this.stack + (this.details ? `\n${this.details}` : ""); } -}; +} + +module.exports = WebpackError; diff --git a/lib/dependencies/DependencyReference.js b/lib/dependencies/DependencyReference.js index 656b642186f..6334d793748 100644 --- a/lib/dependencies/DependencyReference.js +++ b/lib/dependencies/DependencyReference.js @@ -4,7 +4,16 @@ */ "use strict"; +/** @typedef {import('../Module')} Module */ + class DependencyReference { + /** + * Creates an instance of DependencyReference. + * @param {Module} module module there reference comes from + * @param {string[]|boolean} importedNames imported names or boolean + * @param {boolean} weak is weak reference or not + * @memberof DependencyReference + */ constructor(module, importedNames, weak) { this.module = module; // true: full object diff --git a/lib/dependencies/LoaderPlugin.js b/lib/dependencies/LoaderPlugin.js index efce35e6ab4..8c49a6d4494 100644 --- a/lib/dependencies/LoaderPlugin.js +++ b/lib/dependencies/LoaderPlugin.js @@ -5,6 +5,7 @@ "use strict"; const LoaderDependency = require("./LoaderDependency"); +const NormalModule = require("../NormalModule"); class LoaderPlugin { apply(compiler) { @@ -51,11 +52,10 @@ class LoaderPlugin { err => { compilation.semaphore.acquire(() => { if (err) return callback(err); - if (!dep.module) return callback(new Error("Cannot load the module")); - - if (dep.module.error) return callback(dep.module.error); + if (dep.module instanceof NormalModule && dep.module.error) + return callback(dep.module.error); if (!dep.module._source) throw new Error( "The module created for a LoaderDependency must have a property _source" diff --git a/lib/dependencies/ModuleDependency.js b/lib/dependencies/ModuleDependency.js index 992d86534db..f325e7a98d6 100644 --- a/lib/dependencies/ModuleDependency.js +++ b/lib/dependencies/ModuleDependency.js @@ -6,6 +6,9 @@ const Dependency = require("../Dependency"); class ModuleDependency extends Dependency { + /** + * @param {string} request request path which needs resolving + */ constructor(request) { super(); this.request = request; diff --git a/lib/dependencies/MultiEntryDependency.js b/lib/dependencies/MultiEntryDependency.js index a075eb3181e..712d3ff1f22 100644 --- a/lib/dependencies/MultiEntryDependency.js +++ b/lib/dependencies/MultiEntryDependency.js @@ -3,9 +3,14 @@ Author Tobias Koppers @sokra */ "use strict"; +/** @typedef {import("./SingleEntryDependency")} SingleEntryDependency */ const Dependency = require("../Dependency"); class MultiEntryDependency extends Dependency { + /** + * @param {SingleEntryDependency[]} dependencies an array of SingleEntryDependencies + * @param {string} name entry name + */ constructor(dependencies, name) { super(); this.dependencies = dependencies; diff --git a/lib/dependencies/SingleEntryDependency.js b/lib/dependencies/SingleEntryDependency.js index 387975dc8df..b269fb60f00 100644 --- a/lib/dependencies/SingleEntryDependency.js +++ b/lib/dependencies/SingleEntryDependency.js @@ -6,8 +6,12 @@ const ModuleDependency = require("./ModuleDependency"); class SingleEntryDependency extends ModuleDependency { + /** + * @param {string} request request path for entry + */ constructor(request) { super(request); + this.request = request; } get type() { diff --git a/lib/optimize/ConcatenatedModule.js b/lib/optimize/ConcatenatedModule.js index 5b744261aaa..6a002ab0b37 100644 --- a/lib/optimize/ConcatenatedModule.js +++ b/lib/optimize/ConcatenatedModule.js @@ -621,7 +621,7 @@ class ConcatenatedModule extends Module { }); const globalScope = scopeManager.acquire(ast); const moduleScope = globalScope.childScopes[0]; - const resultSource = new ReplaceSource(source); + const resultSource = new ReplaceSource(source, null); info.ast = ast; info.internalSource = source; info.source = resultSource; diff --git a/lib/util/Semaphore.js b/lib/util/Semaphore.js index 359378056ad..b75bc2c9267 100644 --- a/lib/util/Semaphore.js +++ b/lib/util/Semaphore.js @@ -5,12 +5,24 @@ "use strict"; class Semaphore { + /** + * Creates an instance of Semaphore. + * + * @param {number} available the amount available number of "tasks" + * in the Semaphore + */ constructor(available) { this.available = available; + /** @type {(() => void)[]} */ this.waiters = []; + /** @private */ this._continue = this._continue.bind(this); } + /** + * @param {function(): void} callback function block to capture and run + * @returns {void} + */ acquire(callback) { if (this.available > 0) { this.available--; diff --git a/package.json b/package.json index f67472e72d0..ffd6b4f4328 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "devDependencies": { "@types/node": "^9.6.4", "@types/tapable": "^1.0.1", + "@types/webpack-sources": "^0.1.4", "benchmark": "^2.1.1", "bundle-loader": "~0.5.0", "codacy-coverage": "^2.0.1", diff --git a/tsconfig.json b/tsconfig.json index c55aa8145a3..c8dfaaada4b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,62 +1,65 @@ { - "compilerOptions": { - /* Basic Options */ - "target": "ES2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - "lib": ["es2017", "dom"], /* Specify library files to be included in the compilation. */ - "allowJs": true, /* Allow javascript files to be compiled. */ - "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "removeComments": true, /* Do not emit comments to output. */ - "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + "compilerOptions": { + /* Basic Options */ + "target": + "ES2017" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */, + "module": + "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, + "lib": [ + "es2017", + "dom" + ] /* Specify library files to be included in the compilation. */, + "allowJs": true /* Allow javascript files to be compiled. */, + "checkJs": true /* Report errors in .js files. */, + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + // "declaration": true, /* Generates corresponding '.d.ts' file. */ + // "sourceMap": true, /* Generates corresponding '.map' file. */ + // "outFile": "./", /* Concatenate and emit output to single file. */ + // "outDir": "./", /* Redirect output structure to the directory. */ + // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + // "removeComments": true, /* Do not emit comments to output. */ + "noEmit": true /* Do not emit outputs. */, + // "importHelpers": true, /* Import emit helpers from 'tslib'. */ + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - /* Strict Type-Checking Options */ - "strict": false, /* Enable all strict type-checking options. */ - // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + /* Strict Type-Checking Options */ + "strict": false /* Enable all strict type-checking options. */, + // "noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */, + // "strictNullChecks": true /* Enable strict null checks. */, + // "strictFunctionTypes": true /* Enable strict checking of function types. */, + // "strictPropertyInitialization": true /* Enable strict checking of property initialization in classes. */, + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + "alwaysStrict": true /* Parse in strict mode and emit "use strict" for each source file. */, - /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - "types": ["node"], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + /* Module Resolution Options */ + // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ + // "typeRoots": [], /* List of folders to include type definitions from. */ + "types": [ + "node" + ] /* Type declaration files to be included in compilation. */, + // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - /* Source Map Options */ - // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + /* Source Map Options */ + // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - }, - "include": [ - "declarations.d.ts", - "bin/*.js", - "lib/**/*.js" - ] + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + }, + "include": ["declarations.d.ts", "bin/*.js", "lib/**/*.js"] } diff --git a/yarn.lock b/yarn.lock index 56a5a9bb526..9060b0dcfd3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,8 +3,14 @@ "@babel/code-frame@^7.0.0-beta.35": - version "7.0.0-beta.38" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.38.tgz#c0af5930617e55e050336838e3a3670983b0b2b2" + version "7.0.0-beta.46" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.46.tgz#e0d002100805daab1461c0fcb32a07e304f3a4f4" + dependencies: + "@babel/highlight" "7.0.0-beta.46" + +"@babel/highlight@7.0.0-beta.46": + version "7.0.0-beta.46" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.46.tgz#c553c51e65f572bdedd6eff66fc0bb563016645e" dependencies: chalk "^2.0.0" esutils "^2.0.2" @@ -20,14 +26,30 @@ dependencies: "@types/babel-types" "*" +"@types/node@*": + version "10.0.8" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.0.8.tgz#37b4d91d4e958e4c2ba0be2b86e7ed4ff19b0858" + "@types/node@^9.6.4": - version "9.6.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.6.tgz#439b91f9caf3983cad2eef1e11f6bedcbf9431d2" + version "9.6.15" + resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.15.tgz#8a5a313ea0a43a95277235841be5d3f5fb3dfeda" + +"@types/source-list-map@*": + version "0.1.2" + resolved "https://registry.yarnpkg.com/@types/source-list-map/-/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9" "@types/tapable@^1.0.1": version "1.0.2" resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.2.tgz#e13182e1b69871a422d7863e11a4a6f5b814a4bd" +"@types/webpack-sources@^0.1.4": + version "0.1.4" + resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-0.1.4.tgz#a52f1cec41e4d24b3df0bf87e8a538945f6d493f" + dependencies: + "@types/node" "*" + "@types/source-list-map" "*" + source-map "^0.6.1" + "@webassemblyjs/ast@1.4.3": version "1.4.3" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.4.3.tgz#3b3f6fced944d8660273347533e6d4d315b5934a" @@ -209,21 +231,17 @@ acorn@^4.0.4, acorn@~4.0.2: version "4.0.13" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" -acorn@^5.0.0, acorn@^5.5.0: +acorn@^5.0.0, acorn@^5.3.0, acorn@^5.5.0: version "5.5.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.3.tgz#f473dd47e0277a08e28e9bec5aeeb04751f0b8c9" -acorn@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.3.0.tgz#7446d39459c54fb49a80e6ee6478149b940ec822" - ajv-keywords@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" ajv-keywords@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.1.0.tgz#ac2b27939c543e95d2c06e7f7f5c27be4aa543be" + version "3.2.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.2.0.tgz#e86b819c602cf8821ad637413698f1dec021847a" ajv@^4.9.1: version "4.11.8" @@ -242,13 +260,13 @@ ajv@^5.0.0, ajv@^5.1.0, ajv@^5.2.3, ajv@^5.3.0: json-schema-traverse "^0.3.0" ajv@^6.1.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.4.0.tgz#d3aff78e9277549771daf0164cff48482b754fc6" + version "6.5.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.0.tgz#4c8affdf80887d8f132c9c52ab8a2dc4d0b7b24c" dependencies: - fast-deep-equal "^1.0.0" + fast-deep-equal "^2.0.1" fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" - uri-js "^3.0.2" + uri-js "^4.2.1" align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" @@ -282,25 +300,12 @@ ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" -ansi-styles@^3.1.0, ansi-styles@^3.2.1: +ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" dependencies: color-convert "^1.9.0" -ansi-styles@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" - dependencies: - color-convert "^1.9.0" - -anymatch@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" - dependencies: - micromatch "^2.1.5" - normalize-path "^2.0.0" - anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -443,9 +448,9 @@ asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" -atob@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.0.tgz#ab2b150e51d7b122b9efc8d7340c06b6c41076bc" +atob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.1.tgz#ae2d5a729477f289d60dd7f96a6314a22dd6c22a" autoprefixer@^6.3.1: version "6.7.7" @@ -479,8 +484,8 @@ babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: js-tokens "^3.0.2" babel-core@^6.0.0, babel-core@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8" + version "6.26.3" + resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" dependencies: babel-code-frame "^6.26.0" babel-generator "^6.26.0" @@ -492,19 +497,19 @@ babel-core@^6.0.0, babel-core@^6.26.0: babel-traverse "^6.26.0" babel-types "^6.26.0" babylon "^6.18.0" - convert-source-map "^1.5.0" - debug "^2.6.8" + convert-source-map "^1.5.1" + debug "^2.6.9" json5 "^0.5.1" lodash "^4.17.4" minimatch "^3.0.4" path-is-absolute "^1.0.1" - private "^0.1.7" + private "^0.1.8" slash "^1.0.0" - source-map "^0.5.6" + source-map "^0.5.7" babel-generator@^6.18.0, babel-generator@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.0.tgz#ac1ae20070b79f6e3ca1d3269613053774f20dc5" + version "6.26.1" + resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" dependencies: babel-messages "^6.23.0" babel-runtime "^6.26.0" @@ -512,7 +517,7 @@ babel-generator@^6.18.0, babel-generator@^6.26.0: detect-indent "^4.0.0" jsesc "^1.3.0" lodash "^4.17.4" - source-map "^0.5.6" + source-map "^0.5.7" trim-right "^1.0.1" babel-helpers@^6.24.1: @@ -522,12 +527,12 @@ babel-helpers@^6.24.1: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-jest@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.0.0-alpha.5.tgz#acf85d6e69b96755fb8f89542251349718620615" +babel-jest@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.0.0-charlie.1.tgz#275dc7da10420b0da7df54e11e5b21a3daa3581a" dependencies: babel-plugin-istanbul "^4.1.6" - babel-preset-jest "^23.0.0-alpha.5" + babel-preset-jest "^23.0.0-charlie.1" babel-messages@^6.23.0: version "6.23.0" @@ -535,14 +540,6 @@ babel-messages@^6.23.0: dependencies: babel-runtime "^6.22.0" -babel-plugin-istanbul@^4.1.5: - version "4.1.5" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz#6760cdd977f411d3e175bb064f2bc327d99b2b6e" - dependencies: - find-up "^2.1.0" - istanbul-lib-instrument "^1.7.5" - test-exclude "^4.1.1" - babel-plugin-istanbul@^4.1.6: version "4.1.6" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45" @@ -552,19 +549,19 @@ babel-plugin-istanbul@^4.1.6: istanbul-lib-instrument "^1.10.1" test-exclude "^4.2.1" -babel-plugin-jest-hoist@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.0.0-alpha.5.tgz#d3ac1b55cfcf78d1418629b5cbd8f82d97f1545e" +babel-plugin-jest-hoist@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.0.0-charlie.1.tgz#2a6d15cb609443158d61eb01ca63ed08edd2c46b" babel-plugin-syntax-object-rest-spread@^6.13.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" -babel-preset-jest@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.0.0-alpha.5.tgz#2acb14805bfcb73b4884e8fadc776bae26e30a50" +babel-preset-jest@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.0.0-charlie.1.tgz#188ac3695737c1f8e76b1737e3064d2d8c783141" dependencies: - babel-plugin-jest-hoist "^23.0.0-alpha.5" + babel-plugin-jest-hoist "^23.0.0-charlie.1" babel-plugin-syntax-object-rest-spread "^6.13.0" babel-register@^6.26.0: @@ -668,12 +665,6 @@ binary-extensions@^1.0.0: version "1.11.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" -block-stream@*: - version "0.0.9" - resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" - dependencies: - inherits "~2.0.0" - bluebird@^3.5.0, bluebird@^3.5.1, bluebird@^3.5.x: version "3.5.1" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" @@ -903,8 +894,14 @@ caniuse-api@^1.5.2: lodash.uniq "^4.5.0" caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: - version "1.0.30000830" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000830.tgz#6e45255b345649fd15ff59072da1e12bb3de2f13" + version "1.0.30000840" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000840.tgz#68d5a0f0694c92180b0d82e720d70f8e61366604" + +capture-exit@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-1.2.0.tgz#1c5fcc489fd0ab00d4f1ac7ae1072e3173fbab6f" + dependencies: + rsvp "^3.3.3" caseless@~0.11.0: version "0.11.0" @@ -931,7 +928,7 @@ chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.3.2: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" dependencies: @@ -939,22 +936,6 @@ chalk@^2.0.0, chalk@^2.3.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^2.0.1, chalk@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" - dependencies: - ansi-styles "^3.1.0" - escape-string-regexp "^1.0.5" - supports-color "^4.0.0" - -chalk@^2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - character-parser@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/character-parser/-/character-parser-1.2.1.tgz#c0dde4ab182713b919b970959a123ecc1a30fcd6" @@ -996,8 +977,8 @@ chrome-trace-event@^0.1.1: resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-0.1.3.tgz#d395af2d31c87b90a716c831fe326f69768ec084" ci-info@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.2.tgz#03561259db48d0474c8bdc90f5b47b068b6bbfb4" + version "1.1.3" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.3.tgz#710193264bb05c77b8c90d02f5aaf22216a667b2" cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" @@ -1057,8 +1038,8 @@ cliui@^2.1.0: wordwrap "0.0.2" cliui@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.0.0.tgz#743d4650e05f36d1ed2575b59638d87322bfbbcc" + version "4.1.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" dependencies: string-width "^2.1.1" strip-ansi "^4.0.0" @@ -1168,9 +1149,9 @@ commander@^2.9.0, commander@^2.x: version "2.15.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" -commander@~2.13.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" +commander@~2.14.1: + version "2.14.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa" commander@~2.6.0: version "2.6.0" @@ -1181,8 +1162,8 @@ commondir@^1.0.1: resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" compare-versions@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.1.0.tgz#43310256a5c555aaed4193c04d8f154cf9c6efd5" + version "3.2.0" + resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.2.0.tgz#f36f23aacc539da0e3e0f71af46ce5b953a6ae76" component-emitter@^1.2.1: version "1.2.1" @@ -1234,15 +1215,11 @@ content-disposition@0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.1.tgz#87476c6a67c8daa87e32e87616df883ba7fb071b" -content-type-parser@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.2.tgz#caabe80623e63638b2502fd4c7f12ff4ce2352e7" - content-type@~1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" -convert-source-map@^1.4.0, convert-source-map@^1.5.0: +convert-source-map@^1.4.0, convert-source-map@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" @@ -1274,8 +1251,8 @@ core-js@^1.0.0: resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" core-js@^2.4.0, core-js@^2.5.0: - version "2.5.3" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e" + version "2.5.6" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.6.tgz#0fe6d45bf3cac3ac364a9d72de7576f4eb221b9d" core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -1292,8 +1269,8 @@ coveralls@^2.11.2: request "2.79.0" create-ecdh@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.1.tgz#44223dfed533193ba5ba54e0df5709b89acf1f82" + version "4.0.3" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" dependencies: bn.js "^4.1.0" elliptic "^6.0.0" @@ -1481,11 +1458,19 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +data-urls@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.0.0.tgz#24802de4e81c298ea8a9388bb0d8e461c774684f" + dependencies: + abab "^1.0.4" + whatwg-mimetype "^2.0.0" + whatwg-url "^6.4.0" + date-now@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" -debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: +debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: @@ -1605,8 +1590,8 @@ detect-newline@^2.1.0: resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" diff@^3.2.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.4.0.tgz#b1d85507daf3964828de54b37d0d73ba67dda56c" + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" diffie-hellman@^5.0.0: version "5.0.3" @@ -1636,9 +1621,9 @@ domexception@^1.0.0: dependencies: webidl-conversions "^4.0.2" -duplexify@^3.4.2, duplexify@^3.5.3: - version "3.5.4" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.4.tgz#4bb46c1796eabebeec4ca9a2e66b808cb7a3d8b4" +duplexify@^3.4.2, duplexify@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.6.0.tgz#592903f5d80b38d037220541264d69a198fb3410" dependencies: end-of-stream "^1.0.0" inherits "^2.0.1" @@ -1656,8 +1641,8 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" electron-to-chromium@^1.2.7: - version "1.3.42" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.42.tgz#95c33bf01d0cc405556aec899fe61fd4d76ea0f9" + version "1.3.45" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.45.tgz#458ac1b1c5c760ce8811a16d2bfbd97ec30bafb8" elliptic@^6.0.0: version "6.4.0" @@ -1708,8 +1693,8 @@ error-ex@^1.2.0: is-arrayish "^0.2.1" es-abstract@^1.5.1: - version "1.10.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864" + version "1.11.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.11.0.tgz#cce87d518f0496893b1a30cd8461835535480681" dependencies: es-to-primitive "^1.1.1" function-bind "^1.1.1" @@ -1749,15 +1734,15 @@ escodegen@1.8.x: source-map "~0.2.0" escodegen@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.0.tgz#9811a2f265dc1cd3894420ee3717064b632b8852" + version "1.9.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.1.tgz#dbae17ef96c8e4bedb1356f4504fa4cc2f7cb7e2" dependencies: esprima "^3.1.3" estraverse "^4.2.0" esutils "^2.0.2" optionator "^0.8.1" optionalDependencies: - source-map "~0.5.6" + source-map "~0.6.1" eslint-config-prettier@^2.9.0: version "2.9.0" @@ -1943,16 +1928,16 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" -expect@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/expect/-/expect-23.0.0-alpha.5.tgz#514d9f37b77c86f7d4386c2116de2abce795284c" +expect@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/expect/-/expect-23.0.0-charlie.1.tgz#c6c40f6c0a12c49d1830f5d2315b2a2c937cd206" dependencies: ansi-styles "^3.2.0" - jest-diff "^23.0.0-alpha.5" + jest-diff "^23.0.0-charlie.1" jest-get-type "^22.1.0" - jest-matcher-utils "^23.0.0-alpha.5" - jest-message-util "^23.0.0-alpha.5" - jest-regex-util "^23.0.0-alpha.5" + jest-matcher-utils "^23.0.0-charlie.1" + jest-message-util "^23.0.0-charlie.1" + jest-regex-util "^23.0.0-charlie.1" express@~4.13.1: version "4.13.4" @@ -2040,6 +2025,10 @@ fast-deep-equal@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" +fast-deep-equal@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + fast-diff@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.1.2.tgz#4b62c42b8e03de3f848460b639079920695d0154" @@ -2106,12 +2095,12 @@ fileset@^2.0.2: minimatch "^3.0.3" fill-range@^2.1.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + version "2.2.4" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" dependencies: is-number "^2.1.0" isobject "^2.0.0" - randomatic "^1.1.3" + randomatic "^3.0.0" repeat-element "^1.1.2" repeat-string "^1.5.2" @@ -2248,37 +2237,13 @@ fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" -fsevents@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.3.tgz#11f82318f5fe7bb2cd22965a108e9306208216d8" - dependencies: - nan "^2.3.0" - node-pre-gyp "^0.6.39" - -fsevents@^1.1.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.2.tgz#4f598f0f69b273188ef4a62ca4e9e08ace314bbf" +fsevents@^1.1.2, fsevents@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.3.tgz#08292982e7059f6674c93d8b829c1e8604979ac0" dependencies: nan "^2.9.2" node-pre-gyp "^0.9.0" -fstream-ignore@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" - dependencies: - fstream "^1.0.0" - inherits "2" - minimatch "^3.0.0" - -fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2: - version "1.0.11" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" - dependencies: - graceful-fs "^4.1.2" - inherits "~2.0.0" - mkdirp ">=0.5 0" - rimraf "2" - function-bind@^1.0.2, function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -2374,8 +2339,8 @@ glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: path-is-absolute "^1.0.0" globals@^11.0.1: - version "11.4.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.4.0.tgz#b85c793349561c16076a3c13549238a27945f1bc" + version "11.5.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.5.0.tgz#6bc840de6771173b191f13d3a9c94d441ee92642" globals@^9.18.0: version "9.18.0" @@ -2455,10 +2420,6 @@ has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" -has-flag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -2514,7 +2475,7 @@ hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.0" -hawk@3.1.3, hawk@~3.1.3: +hawk@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" dependencies: @@ -2556,8 +2517,8 @@ home-or-tmp@^2.0.0: os-tmpdir "^1.0.1" hosted-git-info@^2.1.4: - version "2.5.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.5.0.tgz#6d60e34b3abbc8313062c3b798ef8d901a07af3c" + version "2.6.0" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.6.0.tgz#23235b29ab230c576aab0d4f13fc046b0b038222" html-comment-regex@^1.1.0: version "1.1.1" @@ -2605,10 +2566,10 @@ iconv-lite@0.4.19: resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" iconv-lite@^0.4.17, iconv-lite@^0.4.4, iconv-lite@~0.4.13: - version "0.4.21" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.21.tgz#c47f8733d02171189ebc4a400f3218d348094798" + version "0.4.23" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" dependencies: - safer-buffer "^2.1.0" + safer-buffer ">= 2.1.2 < 3" icss-replace-symbols@^1.1.0: version "1.1.0" @@ -2668,7 +2629,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: +inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -2700,8 +2661,8 @@ inquirer@^3.0.6: through "^2.3.6" invariant@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" + version "2.2.4" + resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" dependencies: loose-envify "^1.0.0" @@ -3018,8 +2979,8 @@ isstream@~0.1.2: resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" istanbul-api@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.1.tgz#4c3b05d18c0016d1022e079b98dc82c40f488954" + version "1.3.2" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.2.tgz#b2cfe6d15ae6a28ee282e7a823b8e9faa235e6cf" dependencies: async "^2.1.4" compare-versions "^3.1.0" @@ -3029,15 +2990,11 @@ istanbul-api@^1.3.1: istanbul-lib-instrument "^1.10.1" istanbul-lib-report "^1.1.4" istanbul-lib-source-maps "^1.2.4" - istanbul-reports "^1.3.0" + istanbul-reports "^1.4.0" js-yaml "^3.7.0" mkdirp "^0.5.1" once "^1.4.0" -istanbul-lib-coverage@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da" - istanbul-lib-coverage@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz#f7d8f2e42b97e37fe796114cb0f9d68b5e3a4341" @@ -3060,18 +3017,6 @@ istanbul-lib-instrument@^1.10.1: istanbul-lib-coverage "^1.2.0" semver "^5.3.0" -istanbul-lib-instrument@^1.7.5, istanbul-lib-instrument@^1.8.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.1.tgz#250b30b3531e5d3251299fdd64b0b2c9db6b558e" - dependencies: - babel-generator "^6.18.0" - babel-template "^6.16.0" - babel-traverse "^6.18.0" - babel-types "^6.18.0" - babylon "^6.18.0" - istanbul-lib-coverage "^1.1.1" - semver "^5.3.0" - istanbul-lib-report@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz#e886cdf505c4ebbd8e099e4396a90d0a28e2acb5" @@ -3081,16 +3026,6 @@ istanbul-lib-report@^1.1.4: path-parse "^1.0.5" supports-color "^3.1.2" -istanbul-lib-source-maps@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.2.tgz#750578602435f28a0c04ee6d7d9e0f2960e62c1c" - dependencies: - debug "^3.1.0" - istanbul-lib-coverage "^1.1.1" - mkdirp "^0.5.1" - rimraf "^2.6.1" - source-map "^0.5.3" - istanbul-lib-source-maps@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.4.tgz#cc7ccad61629f4efff8e2f78adb8c522c9976ec7" @@ -3101,9 +3036,9 @@ istanbul-lib-source-maps@^1.2.4: rimraf "^2.6.1" source-map "^0.5.3" -istanbul-reports@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.3.0.tgz#2f322e81e1d9520767597dca3c20a0cce89a3554" +istanbul-reports@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.4.0.tgz#3d7b44b912ecbe7652a603662b962120739646a1" dependencies: handlebars "^4.0.3" @@ -3148,14 +3083,14 @@ jade@^1.11.0: with "~4.0.0" jest-changed-files@^22.2.0: - version "22.2.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-22.2.0.tgz#517610c4a8ca0925bdc88b0ca53bd678aa8d019e" + version "22.4.3" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-22.4.3.tgz#8882181e022c38bd46a2e4d18d44d19d90a90fb2" dependencies: throat "^4.0.0" jest-cli@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.0.0-alpha.5.tgz#713d38a20f046a595e4411ff9c3c26f7cc05b202" + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.0.0-charlie.1.tgz#71b797f31079d1b9717d1b0800cf14d219a0b1b4" dependencies: ansi-escapes "^3.0.0" chalk "^2.0.1" @@ -3165,23 +3100,23 @@ jest-cli@^23.0.0-alpha.5: import-local "^1.0.0" is-ci "^1.0.10" istanbul-api "^1.3.1" - istanbul-lib-coverage "^1.1.1" - istanbul-lib-instrument "^1.8.0" - istanbul-lib-source-maps "^1.2.1" + istanbul-lib-coverage "^1.2.0" + istanbul-lib-instrument "^1.10.1" + istanbul-lib-source-maps "^1.2.4" jest-changed-files "^22.2.0" - jest-config "^23.0.0-alpha.5" - jest-environment-jsdom "^23.0.0-alpha.5" + jest-config "^23.0.0-charlie.1" + jest-environment-jsdom "^23.0.0-charlie.1" jest-get-type "^22.1.0" - jest-haste-map "^23.0.0-alpha.5" - jest-message-util "^23.0.0-alpha.5" - jest-regex-util "^23.0.0-alpha.5" - jest-resolve-dependencies "^23.0.0-alpha.5" - jest-runner "^23.0.0-alpha.5" - jest-runtime "^23.0.0-alpha.5" - jest-snapshot "^23.0.0-alpha.5" - jest-util "^23.0.0-alpha.5" - jest-validate "^23.0.0-alpha.5" - jest-worker "^23.0.0-alpha.5" + jest-haste-map "^23.0.0-charlie.1" + jest-message-util "^23.0.0-charlie.1" + jest-regex-util "^23.0.0-charlie.1" + jest-resolve-dependencies "^23.0.0-charlie.1" + jest-runner "^23.0.0-charlie.1" + jest-runtime "^23.0.0-charlie.1" + jest-snapshot "^23.0.0-charlie.1" + jest-util "^23.0.0-charlie.1" + jest-validate "^23.0.0-charlie.1" + jest-worker "^23.0.0-charlie.1" micromatch "^2.3.11" node-notifier "^5.2.1" realpath-native "^1.0.0" @@ -3192,103 +3127,104 @@ jest-cli@^23.0.0-alpha.5: which "^1.2.12" yargs "^11.0.0" -jest-config@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.0.0-alpha.5.tgz#8e3aab4fdd36dedcc17b4462e74313b201740e8a" +jest-config@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.0.0-charlie.1.tgz#848c809bca16492d7648012508e8fdfa54330e2a" dependencies: babel-core "^6.0.0" - babel-jest "^23.0.0-alpha.5" + babel-jest "^23.0.0-charlie.1" chalk "^2.0.1" glob "^7.1.1" - jest-environment-jsdom "^23.0.0-alpha.5" - jest-environment-node "^23.0.0-alpha.5" + jest-environment-jsdom "^23.0.0-charlie.1" + jest-environment-node "^23.0.0-charlie.1" jest-get-type "^22.1.0" - jest-jasmine2 "^23.0.0-alpha.5" - jest-regex-util "^23.0.0-alpha.5" - jest-resolve "^23.0.0-alpha.5" - jest-util "^23.0.0-alpha.5" - jest-validate "^23.0.0-alpha.5" - pretty-format "^23.0.0-alpha.5" - -jest-diff@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.0.0-alpha.5.tgz#65c40a2f83ae763167f3b22cbe546d11e879fd21" + jest-jasmine2 "^23.0.0-charlie.1" + jest-regex-util "^23.0.0-charlie.1" + jest-resolve "^23.0.0-charlie.1" + jest-util "^23.0.0-charlie.1" + jest-validate "^23.0.0-charlie.1" + pretty-format "^23.0.0-charlie.1" + +jest-diff@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.0.0-charlie.1.tgz#d5a9c4c38c9b6fb33e6d8b88d1fb77b62d67382e" dependencies: chalk "^2.0.1" diff "^3.2.0" jest-get-type "^22.1.0" - pretty-format "^23.0.0-alpha.5" + pretty-format "^23.0.0-charlie.1" jest-docblock@^21.0.0: version "21.2.0" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414" jest-docblock@^22.4.0: - version "22.4.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-22.4.0.tgz#dbf1877e2550070cfc4d9b07a55775a0483159b8" + version "22.4.3" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-22.4.3.tgz#50886f132b42b280c903c592373bb6e93bb68b19" dependencies: detect-newline "^2.1.0" -jest-environment-jsdom@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.0.0-alpha.5.tgz#5703be9552c971eb21a6d127ba61a0aef00376e4" +jest-environment-jsdom@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.0.0-charlie.1.tgz#c32276008d476522fd3dfba0b380077aa7cbd067" dependencies: - jest-mock "^23.0.0-alpha.5" - jest-util "^23.0.0-alpha.5" + jest-mock "^23.0.0-charlie.1" + jest-util "^23.0.0-charlie.1" jsdom "^11.5.1" -jest-environment-node@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.0.0-alpha.5.tgz#a843ff68af484289493366923ed9c3fb13df38bd" +jest-environment-node@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.0.0-charlie.1.tgz#51b2473cd60bad82541afafbcfdd8b1847f2b79f" dependencies: - jest-mock "^23.0.0-alpha.5" - jest-util "^23.0.0-alpha.5" + jest-mock "^23.0.0-charlie.1" + jest-util "^23.0.0-charlie.1" jest-get-type@^22.1.0: - version "22.1.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.1.0.tgz#4e90af298ed6181edc85d2da500dbd2753e0d5a9" + version "22.4.3" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4" -jest-haste-map@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.0.0-alpha.5.tgz#6602742b99a4a90f40775560b44294455acd55cd" +jest-haste-map@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.0.0-charlie.1.tgz#1194d9707201947d563d39aa6e33a18ce40f29b9" dependencies: fb-watchman "^2.0.0" graceful-fs "^4.1.11" jest-docblock "^22.4.0" - jest-serializer "^22.4.0" - jest-worker "^23.0.0-alpha.5" + jest-serializer "^23.0.0-charlie.1" + jest-worker "^23.0.0-charlie.1" micromatch "^2.3.11" sane "^2.0.0" -jest-jasmine2@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.0.0-alpha.5.tgz#99757191bdadd54885217b239a9d2dc3045cd4c8" +jest-jasmine2@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.0.0-charlie.1.tgz#db47ca9e697434990bc21d710bfbfb5047fcd4a6" dependencies: chalk "^2.0.1" co "^4.6.0" - expect "^23.0.0-alpha.5" + expect "^23.0.0-charlie.1" graceful-fs "^4.1.11" is-generator-fn "^1.0.0" - jest-diff "^23.0.0-alpha.5" - jest-matcher-utils "^23.0.0-alpha.5" - jest-message-util "^23.0.0-alpha.5" - jest-snapshot "^23.0.0-alpha.5" - jest-util "^23.0.0-alpha.5" + jest-diff "^23.0.0-charlie.1" + jest-matcher-utils "^23.0.0-charlie.1" + jest-message-util "^23.0.0-charlie.1" + jest-snapshot "^23.0.0-charlie.1" + jest-util "^23.0.0-charlie.1" + pretty-format "^23.0.0-charlie.1" source-map-support "^0.5.0" -jest-leak-detector@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.0.0-alpha.5.tgz#0f35047e4734671c676e7e95661cd0e8a6c4fdfb" +jest-leak-detector@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.0.0-charlie.1.tgz#1a89f816da34f422014bf59ae02bc87f17a34d53" dependencies: - pretty-format "^23.0.0-alpha.5" + pretty-format "^23.0.0-charlie.1" -jest-matcher-utils@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.0.0-alpha.5.tgz#300c31dde2fa3402f0b217add320cb7f101fa627" +jest-matcher-utils@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.0.0-charlie.1.tgz#6f568348689a67c86fc9232975fcc98658d47e8a" dependencies: chalk "^2.0.1" jest-get-type "^22.1.0" - pretty-format "^23.0.0-alpha.5" + pretty-format "^23.0.0-charlie.1" jest-message-util@^22.4.3: version "22.4.3" @@ -3300,9 +3236,9 @@ jest-message-util@^22.4.3: slash "^1.0.0" stack-utils "^1.0.1" -jest-message-util@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.0.0-alpha.5.tgz#72e56d5ffb196c1fc018a6c7ac49b94ddc5bf974" +jest-message-util@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.0.0-charlie.1.tgz#22ad4999659015443bf27ec6c4c50f560a0a1900" dependencies: "@babel/code-frame" "^7.0.0-beta.35" chalk "^2.0.1" @@ -3310,62 +3246,63 @@ jest-message-util@^23.0.0-alpha.5: slash "^1.0.0" stack-utils "^1.0.1" -jest-mock@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.0.0-alpha.5.tgz#3c3ad13f69019ed3002ad84a8fded5676fc2ab4a" +jest-mock@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.0.0-charlie.1.tgz#0729d27217b3c96a03687f67e508816b42b9e07b" -jest-regex-util@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.0.0-alpha.5.tgz#6dbe0dcb23c9389a2f979c7e293ead3e91052e14" +jest-regex-util@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.0.0-charlie.1.tgz#b85c25e0e879e4c5c11bd66996a820a487b08b23" -jest-resolve-dependencies@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.0.0-alpha.5.tgz#5f371c22d35e3fb3d5e2ed0f580bff60b8f0f144" +jest-resolve-dependencies@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.0.0-charlie.1.tgz#d37ef78c397af73103cf66b73a58872d693fd394" dependencies: - jest-regex-util "^23.0.0-alpha.5" - jest-snapshot "^23.0.0-alpha.5" + jest-regex-util "^23.0.0-charlie.1" + jest-snapshot "^23.0.0-charlie.1" -jest-resolve@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.0.0-alpha.5.tgz#31f484b3c6fa2c2be112092e0da4d898e482b95a" +jest-resolve@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.0.0-charlie.1.tgz#8ec756ee559da2c0c99fd2fda8ac796b245542c8" dependencies: browser-resolve "^1.11.2" chalk "^2.0.1" realpath-native "^1.0.0" -jest-runner@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.0.0-alpha.5.tgz#bc18404f0ad7016c2b641908240face3ca16c117" +jest-runner@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.0.0-charlie.1.tgz#6a20b50ded3e6aadc19b4c45d0bbb962ec37dfaa" dependencies: exit "^0.1.2" - jest-config "^23.0.0-alpha.5" + jest-config "^23.0.0-charlie.1" jest-docblock "^22.4.0" - jest-haste-map "^23.0.0-alpha.5" - jest-jasmine2 "^23.0.0-alpha.5" - jest-leak-detector "^23.0.0-alpha.5" - jest-message-util "^23.0.0-alpha.5" - jest-runtime "^23.0.0-alpha.5" - jest-util "^23.0.0-alpha.5" - jest-worker "^23.0.0-alpha.5" + jest-haste-map "^23.0.0-charlie.1" + jest-jasmine2 "^23.0.0-charlie.1" + jest-leak-detector "^23.0.0-charlie.1" + jest-message-util "^23.0.0-charlie.1" + jest-runtime "^23.0.0-charlie.1" + jest-util "^23.0.0-charlie.1" + jest-worker "^23.0.0-charlie.1" throat "^4.0.0" -jest-runtime@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.0.0-alpha.5.tgz#8a8def856cf9be87d154f13b47d6e2551e0a55ac" +jest-runtime@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.0.0-charlie.1.tgz#322bc1e28d21af7528ca9ab9b74d93eccf7f6af8" dependencies: babel-core "^6.0.0" - babel-plugin-istanbul "^4.1.5" + babel-plugin-istanbul "^4.1.6" chalk "^2.0.1" convert-source-map "^1.4.0" exit "^0.1.2" graceful-fs "^4.1.11" - jest-config "^23.0.0-alpha.5" - jest-haste-map "^23.0.0-alpha.5" - jest-regex-util "^23.0.0-alpha.5" - jest-resolve "^23.0.0-alpha.5" - jest-snapshot "^23.0.0-alpha.5" - jest-util "^23.0.0-alpha.5" - jest-validate "^23.0.0-alpha.5" + jest-config "^23.0.0-charlie.1" + jest-haste-map "^23.0.0-charlie.1" + jest-message-util "^23.0.0-charlie.1" + jest-regex-util "^23.0.0-charlie.1" + jest-resolve "^23.0.0-charlie.1" + jest-snapshot "^23.0.0-charlie.1" + jest-util "^23.0.0-charlie.1" + jest-validate "^23.0.0-charlie.1" json-stable-stringify "^1.0.1" micromatch "^2.3.11" realpath-native "^1.0.0" @@ -3374,9 +3311,9 @@ jest-runtime@^23.0.0-alpha.5: write-file-atomic "^2.1.0" yargs "^11.0.0" -jest-serializer@^22.4.0: - version "22.4.0" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-22.4.0.tgz#b5d145b98c4b0d2c20ab686609adbb81fe23b566" +jest-serializer@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-23.0.0-charlie.1.tgz#c73288c67ed332bc9b80743f0ffe98baa665de08" jest-silent-reporter@0.0.4: version "0.0.4" @@ -3385,16 +3322,16 @@ jest-silent-reporter@0.0.4: chalk "^2.3.1" jest-util "^22.3.0" -jest-snapshot@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.0.0-alpha.5.tgz#98ba2e55c2dca0837782a83bcfd880d125f7d849" +jest-snapshot@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.0.0-charlie.1.tgz#ecccf8fd657ed3b1107e0cf6df5f5bf05cb84dca" dependencies: chalk "^2.0.1" - jest-diff "^23.0.0-alpha.5" - jest-matcher-utils "^23.0.0-alpha.5" + jest-diff "^23.0.0-charlie.1" + jest-matcher-utils "^23.0.0-charlie.1" mkdirp "^0.5.1" natural-compare "^1.4.0" - pretty-format "^23.0.0-alpha.5" + pretty-format "^23.0.0-charlie.1" jest-util@^22.3.0: version "22.4.3" @@ -3408,31 +3345,30 @@ jest-util@^22.3.0: mkdirp "^0.5.1" source-map "^0.6.0" -jest-util@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.0.0-alpha.5.tgz#2ac78c3d6c9e459cae7c100e028f271f954b4b15" +jest-util@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.0.0-charlie.1.tgz#e7efe9bbd1fd3647ce5699df7b2e8c2091968f6a" dependencies: callsites "^2.0.0" chalk "^2.0.1" graceful-fs "^4.1.11" is-ci "^1.0.10" - jest-message-util "^23.0.0-alpha.5" + jest-message-util "^23.0.0-charlie.1" mkdirp "^0.5.1" source-map "^0.6.0" -jest-validate@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.0.0-alpha.5.tgz#c95ec2032b0971af8baa0978de67598ccffdaa8d" +jest-validate@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.0.0-charlie.1.tgz#6895138a0a22366ad5624691631a8ae2896a3fae" dependencies: chalk "^2.0.1" - jest-config "^23.0.0-alpha.5" jest-get-type "^22.1.0" leven "^2.1.0" - pretty-format "^23.0.0-alpha.5" + pretty-format "^23.0.0-charlie.1" -jest-worker@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.0.0-alpha.5.tgz#003d3b106b126070c5c563b20d48cf2141df0f44" +jest-worker@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.0.0-charlie.1.tgz#ac8212ee454808a21b617a72a3c7678a3b29b0e6" dependencies: merge-stream "^1.0.1" @@ -3470,20 +3406,13 @@ js-yaml@3.6.1: argparse "^1.0.7" esprima "^2.6.0" -js-yaml@3.x, js-yaml@^3.9.1: +js-yaml@3.x, js-yaml@^3.7.0, js-yaml@^3.9.1: version "3.11.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef" dependencies: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^3.7.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - js-yaml@~3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" @@ -3496,23 +3425,22 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" jsdom@^11.5.1: - version "11.6.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.6.0.tgz#7334781595ee8bdeea9742fc33fab5cdad6d195f" + version "11.10.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.10.0.tgz#a42cd54e88895dc765f03f15b807a474962ac3b5" dependencies: abab "^1.0.4" acorn "^5.3.0" acorn-globals "^4.1.0" array-equal "^1.0.0" - browser-process-hrtime "^0.1.2" - content-type-parser "^1.0.2" cssom ">= 0.3.2 < 0.4.0" cssstyle ">= 0.2.37 < 0.3.0" + data-urls "^1.0.0" domexception "^1.0.0" escodegen "^1.9.0" html-encoding-sniffer "^1.0.2" left-pad "^1.2.0" nwmatcher "^1.4.3" - parse5 "^4.0.0" + parse5 "4.0.0" pn "^1.1.0" request "^2.83.0" request-promise-native "^1.0.5" @@ -3522,6 +3450,7 @@ jsdom@^11.5.1: w3c-hr-time "^1.0.1" webidl-conversions "^4.0.2" whatwg-encoding "^1.0.3" + whatwg-mimetype "^2.1.0" whatwg-url "^6.4.0" ws "^4.0.0" xml-name-validator "^3.0.0" @@ -3638,8 +3567,8 @@ leb@^0.3.0: resolved "https://registry.yarnpkg.com/leb/-/leb-0.3.0.tgz#32bee9fad168328d6aea8522d833f4180eed1da3" left-pad@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee" + version "1.3.0" + resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" less-loader@^4.0.3: version "4.1.0" @@ -3727,14 +3656,10 @@ lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" -lodash@^4.13.1, lodash@^4.17.4, lodash@^4.3.0: +lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.3.0: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" -lodash@^4.14.0: - version "4.17.4" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" - log-driver@1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.5.tgz#7ae4ec257302fd790d557cb10c97100d857b0056" @@ -3758,8 +3683,8 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1: js-tokens "^3.0.0" lru-cache@^4.0.1, lru-cache@^4.1.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.2.tgz#45234b2e6e2f2b33da125624c4664929a0224c3f" + version "4.1.3" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" dependencies: pseudomap "^1.0.2" yallist "^2.1.2" @@ -3769,8 +3694,8 @@ macaddress@^0.2.8: resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" make-dir@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.2.0.tgz#6d6a49eead4aae296c53bbf3a1a008bd6c89469b" + version "1.3.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" dependencies: pify "^3.0.0" @@ -3794,6 +3719,10 @@ math-expression-evaluator@^1.2.14: version "1.2.17" resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac" +math-random@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" + md5.js@^1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.4.tgz#e9bdbde94a20a5ac18b04340fc5764d5b09d901d" @@ -3836,7 +3765,7 @@ methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" -micromatch@^2.1.5, micromatch@^2.3.11: +micromatch@^2.3.11: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" dependencies: @@ -3909,7 +3838,7 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" -"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: +"minimatch@2 || 3", minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: @@ -3928,8 +3857,8 @@ minimist@~0.0.1: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" minipass@^2.2.1, minipass@^2.2.4: - version "2.2.4" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.2.4.tgz#03c824d84551ec38a8d1bb5bc350a5a30a354a40" + version "2.3.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.0.tgz#2e11b1c46df7fe7f1afbe9a490280add21ffe384" dependencies: safe-buffer "^5.1.1" yallist "^3.0.0" @@ -3962,7 +3891,7 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" -mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: +mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -3991,7 +3920,7 @@ mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" -nan@^2.3.0, nan@^2.9.2: +nan@^2.9.2: version "2.10.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" @@ -4017,8 +3946,8 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" needle@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.0.tgz#f14efc69cee1024b72c8b21c7bdf94a731dc12fa" + version "2.2.1" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.1.tgz#b5e325bd3aae8c2678902fa296f729455d1d3a7d" dependencies: debug "^2.1.2" iconv-lite "^0.4.4" @@ -4080,22 +4009,6 @@ node-notifier@^5.2.1: shellwords "^0.1.1" which "^1.3.0" -node-pre-gyp@^0.6.39: - version "0.6.39" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649" - dependencies: - detect-libc "^1.0.2" - hawk "3.1.3" - mkdirp "^0.5.1" - nopt "^4.0.1" - npmlog "^4.0.2" - rc "^1.1.7" - request "2.81.0" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^2.2.1" - tar-pack "^3.4.0" - node-pre-gyp@^0.9.0: version "0.9.1" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.9.1.tgz#f11c07516dd92f87199dbc7e1838eab7cd56c9e0" @@ -4133,7 +4046,7 @@ normalize-package-data@^2.3.2: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1: +normalize-path@^2.0.1, normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" dependencies: @@ -4187,8 +4100,8 @@ number-is-nan@^1.0.0: resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" nwmatcher@^1.4.3: - version "1.4.3" - resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.3.tgz#64348e3b3d80f035b40ac11563d278f8b72db89c" + version "1.4.4" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.4.tgz#2285631f34a95f0d0395cd900c96ed39b58f346e" oauth-sign@~0.8.1, oauth-sign@~0.8.2: version "0.8.2" @@ -4242,7 +4155,7 @@ on-finished@~2.3.0: dependencies: ee-first "1.1.1" -once@1.x, once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0: +once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: @@ -4362,7 +4275,7 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" -parse5@^4.0.0: +parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" @@ -4717,12 +4630,12 @@ postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0 supports-color "^3.2.3" postcss@^6.0.1: - version "6.0.21" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.21.tgz#8265662694eddf9e9a5960db6da33c39e4cd069d" + version "6.0.22" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.22.tgz#e23b78314905c3b90cbd61702121e7a78848f2a3" dependencies: - chalk "^2.3.2" + chalk "^2.4.1" source-map "^0.6.1" - supports-color "^5.3.0" + supports-color "^5.4.0" prelude-ls@~1.1.2: version "1.1.2" @@ -4740,14 +4653,14 @@ prettier@^1.11.1: version "1.12.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.1.tgz#c1ad20e803e7749faf905a409d2367e06bbe7325" -pretty-format@^23.0.0-alpha.5: - version "23.0.0-alpha.5" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.0.0-alpha.5.tgz#49441032994ce2b1cfa74531c1c9d9a36fe59e90" +pretty-format@^23.0.0-charlie.1: + version "23.0.0-charlie.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.0.0-charlie.1.tgz#cb5fde20ad5f5d2e38197c5f07340e694233e986" dependencies: ansi-regex "^3.0.0" ansi-styles "^3.2.0" -private@^0.1.7: +private@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" @@ -4927,10 +4840,10 @@ pump@^2.0.0, pump@^2.0.1: once "^1.3.1" pumpify@^1.3.3: - version "1.4.0" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.4.0.tgz#80b7c5df7e24153d03f0e7ac8a05a5d068bd07fb" + version "1.5.0" + resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.0.tgz#30c905a26c88fa0074927af07256672b474b1c15" dependencies: - duplexify "^3.5.3" + duplexify "^3.6.0" inherits "^2.0.3" pump "^2.0.0" @@ -4963,8 +4876,8 @@ qs@~6.4.0: resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" qs@~6.5.1: - version "6.5.1" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" query-string@^4.1.0: version "4.3.4" @@ -4981,12 +4894,13 @@ querystring@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" -randomatic@^1.1.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" +randomatic@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.0.0.tgz#d35490030eb4f7578de292ce6dfb04a91a128923" dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" + is-number "^4.0.0" + kind-of "^6.0.0" + math-random "^1.0.1" randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: version "2.0.6" @@ -5056,7 +4970,7 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" dependencies: @@ -5098,8 +5012,8 @@ reduce-function-call@^1.0.1: balanced-match "^0.4.2" regenerate@^1.2.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" + version "1.4.0" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" regenerator-runtime@^0.11.0: version "0.11.1" @@ -5320,7 +5234,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: +rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" dependencies: @@ -5333,6 +5247,10 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" +rsvp@^3.3.3: + version "3.6.2" + resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a" + run-async@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" @@ -5355,7 +5273,7 @@ rx-lite@*, rx-lite@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -5365,23 +5283,24 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -safer-buffer@^2.1.0: +"safer-buffer@>= 2.1.2 < 3": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" sane@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/sane/-/sane-2.3.0.tgz#3f3df584abf69e63d4bb74f0f8c42468e4d7d46b" + version "2.5.2" + resolved "https://registry.yarnpkg.com/sane/-/sane-2.5.2.tgz#b4dc1861c21b427e929507a3e751e2a2cb8ab3fa" dependencies: - anymatch "^1.3.0" + anymatch "^2.0.0" + capture-exit "^1.2.0" exec-sh "^0.2.0" fb-watchman "^2.0.0" - minimatch "^3.0.2" + micromatch "^3.1.4" minimist "^1.1.1" walker "~1.0.5" watch "~0.18.0" optionalDependencies: - fsevents "^1.1.1" + fsevents "^1.2.3" sax@^1.2.4, sax@~1.2.1: version "1.2.4" @@ -5577,10 +5496,10 @@ source-list-map@^2.0.0: resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085" source-map-resolve@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.1.tgz#7ad0f593f2281598e854df80f19aae4b92d7a11a" + version "0.5.2" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" dependencies: - atob "^2.0.0" + atob "^2.1.1" decode-uri-component "^0.2.0" resolve-url "^0.2.1" source-map-url "^0.4.0" @@ -5593,9 +5512,10 @@ source-map-support@^0.4.15: source-map "^0.5.6" source-map-support@^0.5.0: - version "0.5.2" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.2.tgz#1a6297fd5b2e762b39688c7fc91233b60984f0a5" + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13" dependencies: + buffer-from "^1.0.0" source-map "^0.6.0" source-map-url@^0.4.0: @@ -5608,7 +5528,7 @@ source-map@0.4.x, source-map@^0.4.4: dependencies: amdefine ">=0.0.4" -source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1, source-map@~0.5.6: +source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" @@ -5628,19 +5548,27 @@ source-map@~0.2.0: dependencies: amdefine ">=0.0.4" -spdx-correct@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" +spdx-correct@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" dependencies: - spdx-license-ids "^1.0.2" + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" -spdx-expression-parse@~1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" +spdx-exceptions@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9" -spdx-license-ids@^1.0.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" +spdx-expression-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87" split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" @@ -5710,12 +5638,12 @@ stream-each@^1.1.0: stream-shift "^1.0.0" stream-http@^2.7.2: - version "2.8.1" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.1.tgz#d0441be1a457a73a733a8a7b53570bebd9ef66a4" + version "2.8.2" + resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.2.tgz#4126e8c6b107004465918aa2fc35549e77402c87" dependencies: builtin-status-codes "^3.0.0" inherits "^2.0.1" - readable-stream "^2.3.3" + readable-stream "^2.3.6" to-arraybuffer "^1.0.0" xtend "^4.0.0" @@ -5806,15 +5734,9 @@ supports-color@^3.1.0, supports-color@^3.1.2, supports-color@^3.2.3: dependencies: has-flag "^1.0.0" -supports-color@^4.0.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" - dependencies: - has-flag "^2.0.0" - -supports-color@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.3.0.tgz#5b24ac15db80fa927cf5227a4a33fd3c4c7676c0" +supports-color@^5.3.0, supports-color@^5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" dependencies: has-flag "^3.0.0" @@ -5849,49 +5771,18 @@ tapable@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.0.0.tgz#cbb639d9002eed9c6b5975eb20598d7936f1f9f2" -tar-pack@^3.4.0: - version "3.4.1" - resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f" - dependencies: - debug "^2.2.0" - fstream "^1.0.10" - fstream-ignore "^1.0.5" - once "^1.3.3" - readable-stream "^2.1.4" - rimraf "^2.5.1" - tar "^2.2.1" - uid-number "^0.0.6" - -tar@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" - dependencies: - block-stream "*" - fstream "^1.0.2" - inherits "2" - tar@^4: - version "4.4.1" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.1.tgz#b25d5a8470c976fd7a9a8a350f42c59e9fa81749" + version "4.4.2" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.2.tgz#60685211ba46b38847b1ae7ee1a24d744a2cd462" dependencies: chownr "^1.0.1" fs-minipass "^1.2.5" minipass "^2.2.4" minizlib "^1.1.0" mkdirp "^0.5.0" - safe-buffer "^5.1.1" + safe-buffer "^5.1.2" yallist "^3.0.2" -test-exclude@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26" - dependencies: - arrify "^1.0.1" - micromatch "^2.3.11" - object-assign "^4.1.0" - read-pkg-up "^1.0.1" - require-main-filename "^1.0.1" - test-exclude@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.1.tgz#dfa222f03480bca69207ca728b37d74b45f724fa" @@ -5981,19 +5872,13 @@ topo@2.x.x: dependencies: hoek "4.x.x" -tough-cookie@>=2.3.3, tough-cookie@~2.3.0, tough-cookie@~2.3.3: +tough-cookie@>=2.3.3, tough-cookie@^2.3.3, tough-cookie@~2.3.0, tough-cookie@~2.3.3: version "2.3.4" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" dependencies: punycode "^1.4.1" -tough-cookie@^2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.3.tgz#0b618a5565b6dea90bf3425d04d55edc475a7561" - dependencies: - punycode "^1.4.1" - -tr46@^1.0.0: +tr46@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" dependencies: @@ -6047,18 +5932,18 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" typescript@^2.9.0-dev.20180511: - version "2.9.0-dev.20180511" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.0-dev.20180511.tgz#e864f6b9bf9e7f654d26f5401e74b76871f5a8e2" + version "2.9.0-insiders.20180510" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.0-insiders.20180510.tgz#2f9c37b904ddd8f8151e5eb25be11a3c4744b13f" ua-parser-js@^0.7.9: - version "0.7.17" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac" + version "0.7.18" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.18.tgz#a7bfd92f56edfb117083b69e31d2aa8882d4b1ed" uglify-es@^3.3.4: - version "3.3.9" - resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" + version "3.3.10" + resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.10.tgz#8b0b7992cebe20edc26de1bf325cef797b8f3fa5" dependencies: - commander "~2.13.0" + commander "~2.14.1" source-map "~0.6.1" uglify-js@^2.4.19, uglify-js@^2.6, uglify-js@^2.6.1: @@ -6082,8 +5967,8 @@ uglify-to-browserify@~1.0.0: resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" uglifyjs-webpack-plugin@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.4.tgz#5eec941b2e9b8538be0a20fc6eda25b14c7c1043" + version "1.2.5" + resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.5.tgz#2ef8387c8f1a903ec5e44fa36f9f3cbdcea67641" dependencies: cacache "^10.0.4" find-cache-dir "^1.0.0" @@ -6094,14 +5979,6 @@ uglifyjs-webpack-plugin@^1.2.4: webpack-sources "^1.1.0" worker-farm "^1.5.2" -uid-number@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" - -ultron@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" - union-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" @@ -6152,9 +6029,9 @@ upath@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/upath/-/upath-1.0.5.tgz#02cab9ecebe95bbec6d5fc2566325725ab6d1a73" -uri-js@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-3.0.2.tgz#f90b858507f81dea4dcfbb3c4c3dbfa2b557faaa" +uri-js@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.1.tgz#4595a80a51f356164e22970df64c7abd6ade9850" dependencies: punycode "^2.1.0" @@ -6215,11 +6092,11 @@ val-loader@^1.0.2: loader-utils "^1.0.0" validate-npm-package-license@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + version "3.0.3" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz#81643bcbef1bdfecd4623793dc4648948ba98338" dependencies: - spdx-correct "~1.0.0" - spdx-expression-parse "~1.0.0" + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" vary@~1.0.1: version "1.0.1" @@ -6284,7 +6161,7 @@ webassemblyjs@1.4.3: "@webassemblyjs/wast-parser" "1.4.3" long "^3.2.0" -webidl-conversions@^4.0.1, webidl-conversions@^4.0.2: +webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" @@ -6315,13 +6192,17 @@ whatwg-fetch@>=0.10.0: version "2.0.4" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" +whatwg-mimetype@^2.0.0, whatwg-mimetype@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.1.0.tgz#f0f21d76cbba72362eb609dbed2a30cd17fcc7d4" + whatwg-url@^6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.4.0.tgz#08fdf2b9e872783a7a1f6216260a1d66cc722e08" + version "6.4.1" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.4.1.tgz#fdb94b440fd4ad836202c16e9737d511f012fd67" dependencies: lodash.sortby "^4.7.0" - tr46 "^1.0.0" - webidl-conversions "^4.0.1" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" whet.extend@~0.9.9: version "0.9.9" @@ -6412,12 +6293,11 @@ write@^0.2.1: mkdirp "^0.5.1" ws@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-4.0.0.tgz#bfe1da4c08eeb9780b986e0e4d10eccd7345999f" + version "4.1.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-4.1.0.tgz#a979b5d7d4da68bf54efe0408967c324869a7289" dependencies: async-limiter "~1.0.0" safe-buffer "~5.1.0" - ultron "~1.1.0" xml-name-validator@^3.0.0: version "3.0.0" @@ -6456,8 +6336,8 @@ yargs-parser@^9.0.2: camelcase "^4.1.0" yargs@^11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.0.0.tgz#c052931006c5eee74610e5fc0354bedfd08a201b" + version "11.1.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" dependencies: cliui "^4.0.0" decamelize "^1.1.1" From 39195ff62f6236eb9c9a6f0e4d96443117a92714 Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Sun, 6 May 2018 14:01:47 -0700 Subject: [PATCH 020/310] chore(types): make loose interface for removing reasons ties in Compilation --- lib/Compilation.js | 17 +++++++++++++++-- lib/ContextModule.js | 5 ++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/lib/Compilation.js b/lib/Compilation.js index 2755c6f82b9..ae7b2ee8894 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -103,6 +103,13 @@ const SingleEntryDependency = require("./dependencies/SingleEntryDependency"); * @property {Set} availableModules */ +/** + * @typedef {Object} DependenciesBlockLike + * @property {Dependency[]} dependencies + * @property {AsyncDependenciesBlock[]} blocks + * @property {DependenciesBlockVariable[]} variables + */ + /** * @param {Chunk} a first chunk to sort by id * @param {Chunk} b second chunk to sort by id @@ -631,7 +638,7 @@ class Compilation extends Tapable { /** * @param {Module} module to be processed for deps - * @param {*} callback callback to be triggered + * @param {ModuleCallback} callback callback to be triggered * @returns {void} */ processModuleDependencies(module, callback) { @@ -1049,6 +1056,12 @@ class Compilation extends Tapable { ); } + /** + * @param {Module} module module to be rebuilt + * @param {TODO} thisCallback //TODO need a great description for what + * the hell this code does here or rename "thisCallback" + * @returns {void} + */ rebuildModule(module, thisCallback) { let callbackList = this._rebuildingModules.get(module); if (callbackList) { @@ -1815,7 +1828,7 @@ class Compilation extends Tapable { /** * * @param {Module} module module relationship for removal - * @param {DependenciesBlock} block //TODO: good description + * @param {DependenciesBlockLike} block //TODO: good description * @returns {void} */ removeReasonsOfDependencyBlock(module, block) { diff --git a/lib/ContextModule.js b/lib/ContextModule.js index 2b201fdc84f..8852f8e8562 100644 --- a/lib/ContextModule.js +++ b/lib/ContextModule.js @@ -647,8 +647,11 @@ webpackEmptyAsyncContext.id = ${JSON.stringify(id)};`; // if we dont have dependencies we stop here. return this.dependencies.reduce((size, dependency) => { - if (dependency instanceof ModuleDependency) + if (dependency instanceof ModuleDependency) { return size + 5 + dependency.userRequest.length; + } else { + return size; + } }, initialSize); } } From f0ed7b63e835755e3eb4d9acb5834ea8f3f4b08e Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Sun, 6 May 2018 22:29:26 -0700 Subject: [PATCH 021/310] chore(types): remove dup types, clean up some itesm --- declarations.d.ts | 12 ++++++++++++ lib/AsyncDependenciesBlock.js | 15 +-------------- lib/Compilation.js | 15 +-------------- lib/Module.js | 5 ----- 4 files changed, 14 insertions(+), 33 deletions(-) diff --git a/declarations.d.ts b/declarations.d.ts index 42a387af58b..7bd9f0e82ce 100644 --- a/declarations.d.ts +++ b/declarations.d.ts @@ -218,3 +218,15 @@ declare const $crossOriginLoading$; declare const chunkId; type TODO = any; + +declare interface SourcePosition { + line: number; + column: number; +} + +declare interface DependencyLocation { + name: string; + index: number; + start: SourcePosition; + end: SourcePosition; +} diff --git a/lib/AsyncDependenciesBlock.js b/lib/AsyncDependenciesBlock.js index a9c03a53f94..dc8e15a80f9 100644 --- a/lib/AsyncDependenciesBlock.js +++ b/lib/AsyncDependenciesBlock.js @@ -13,24 +13,11 @@ const DependenciesBlock = require("./DependenciesBlock"); * */ -/** - * @typedef {Object} SourcePosition - * @property {number} line - * @property {number} column - */ - -/** - * @typedef {Object} SourceLocation - * @property {number} index - * @property {SourcePosition} start - * @property {SourcePosition} end - */ - module.exports = class AsyncDependenciesBlock extends DependenciesBlock { /** * @param {GroupOptions} groupOptions options for the group * @param {Module} module the Module object - * @param {SourceLocation=} loc the line of code + * @param {DependencyLocation=} loc the line of code * @param {TODO=} request the request */ constructor(groupOptions, module, loc, request) { diff --git a/lib/Compilation.js b/lib/Compilation.js index ae7b2ee8894..7cfa3a9d376 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -84,19 +84,6 @@ const SingleEntryDependency = require("./dependencies/SingleEntryDependency"); * @property {Dependency[]} dependencies */ -/** - * @typedef {Object} SourcePosition - * @property {number} line - * @property {number} column - */ - -/** - * @typedef {Object} SourceLocation - * @property {number} index - * @property {SourcePosition} start - * @property {SourcePosition} end - */ - /** * @typedef {Object} AvailableModulesChunkGroupMapping * @property {ChunkGroup} chunkGroup @@ -1313,7 +1300,7 @@ class Compilation extends Tapable { /** * @param {any} groupOptions options provided for group * @param {Module} module module in question - * @param {SourceLocation} loc source location reference + * @param {DependencyLocation} loc source location reference * @param {string} request request string * @returns {ChunkGroup} the chunk group added inside */ diff --git a/lib/Module.js b/lib/Module.js index b42ef3835d1..98d0fdbab2f 100644 --- a/lib/Module.js +++ b/lib/Module.js @@ -11,14 +11,9 @@ const ModuleReason = require("./ModuleReason"); const SortableSet = require("./util/SortableSet"); const Template = require("./Template"); -<<<<<<< HEAD -/** @typedef {import("./Chunk")} Chunk */ -/** @typedef {import("./RequestShortener")} RequestShortener */ -======= /** @typedef {typeof import("./Chunk")} Chunk */ /** @typedef {typeof import("./RequestShortener")} RequestShortener */ /** @typedef {import("./WebpackError")} WebpackError */ ->>>>>>> 206d1a6... chore(types): add Compiler and Compilation type support const EMPTY_RESOLVE_OPTIONS = {}; From 3072378892739475c2707a024677511bba3ca973 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 15 May 2018 12:20:17 +0200 Subject: [PATCH 022/310] bugfixes and corrections --- lib/AsyncDependenciesBlock.js | 12 +++-- lib/Chunk.js | 32 +++++++++++--- lib/Compilation.js | 59 ++++++++++++++----------- lib/DelegatedModule.js | 12 +++-- lib/DependenciesBlock.js | 17 +++---- lib/DependenciesBlockVariable.js | 3 +- lib/Dependency.js | 7 +++ lib/GraphHelpers.js | 3 +- lib/Module.js | 6 +-- lib/MultiEntryPlugin.js | 2 +- lib/WebpackError.js | 1 - lib/dependencies/DependencyReference.js | 1 - lib/util/Semaphore.js | 2 +- 13 files changed, 94 insertions(+), 63 deletions(-) diff --git a/lib/AsyncDependenciesBlock.js b/lib/AsyncDependenciesBlock.js index dc8e15a80f9..74e15607fa0 100644 --- a/lib/AsyncDependenciesBlock.js +++ b/lib/AsyncDependenciesBlock.js @@ -3,15 +3,13 @@ Author Tobias Koppers @sokra */ "use strict"; + const DependenciesBlock = require("./DependenciesBlock"); -/** - * @typedef {import("./ChunkGroup")} ChunkGroup - * @typedef {import("./Module")} Module - * @typedef {import("crypto").Hash} Hash - * @typedef {TODO} GroupOptions - * - */ +/** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** @typedef {import("./Module")} Module */ +/** @typedef {import("crypto").Hash} Hash */ +/** @typedef {TODO} GroupOptions */ module.exports = class AsyncDependenciesBlock extends DependenciesBlock { /** diff --git a/lib/Chunk.js b/lib/Chunk.js index a0ea24a7491..5b34471a3a2 100644 --- a/lib/Chunk.js +++ b/lib/Chunk.js @@ -29,6 +29,7 @@ const ERR_CHUNK_INITIAL = * @property {string} id the id of the object */ +// TODO use @callback /** @typedef {(a: Module, b: Module) => -1|0|1} ModuleSortPredicate */ /** @typedef {(m: Module) => boolean} ModuleFilterPredicate */ /** @typedef {(c: Chunk) => boolean} ChunkFilterPredicate */ @@ -115,7 +116,7 @@ class Chunk { this._modules = new SortableSet(undefined, sortByIdentifier); /** @private */ this._groups = new SortableSet(undefined, sortById); - /** @type {Source[]} */ + /** @type {string[]} */ this.files = []; /** @type {boolean} */ this.rendered = false; @@ -532,12 +533,22 @@ class Chunk { } /** - * @param {Hash} realHash the hash for the chunk maps - * @returns {{ hash: TODO, contentHash: TODO, name: TODO }} the chunk map information + * @typedef {Object} ChunkMaps + * @property {Record} hash + * @property {Record>} contentHash + * @property {Record} name + */ + + /** + * @param {boolean} realHash should the full hash or the rendered hash be used + * @returns {ChunkMaps} the chunk map information */ getChunkMaps(realHash) { + /** @type {Record} */ const chunkHashMap = Object.create(null); + /** @type {Record>} */ const chunkContentHashMap = Object.create(null); + /** @type {Record} */ const chunkNameMap = Object.create(null); for (const chunk of this.getAllAsyncChunks()) { @@ -558,7 +569,7 @@ class Chunk { } /** - * @returns {Record>>} a record object of names to lists of child ids(?) + * @returns {Record[]>} a record object of names to lists of child ids(?) */ getChildIdsByOrders() { const lists = new Map(); @@ -616,17 +627,24 @@ class Chunk { return chunkMaps; } - /** @typedef {(module: Module) => true} FilterFn */ + /** + * @typedef {Object} ChunkModuleMaps + * @property {Record} id + * @property {Record} hash + */ /** - * @param {FilterFn} filterFn function used to filter modules - * @returns {TODO} module map information + * @param {ModuleFilterPredicate} filterFn function used to filter modules + * @returns {ChunkModuleMaps} module map information */ getChunkModuleMaps(filterFn) { + /** @type {Record} */ const chunkModuleIdMap = Object.create(null); + /** @type {Record} */ const chunkModuleHashMap = Object.create(null); for (const chunk of this.getAllAsyncChunks()) { + /** @type {(string|number)[]} */ let array; for (const module of chunk.modulesIterable) { if (filterFn(module)) { diff --git a/lib/Compilation.js b/lib/Compilation.js index 7cfa3a9d376..ebb76d17aeb 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -35,7 +35,7 @@ const createHash = require("./util/createHash"); const Queue = require("./util/Queue"); const SortableSet = require("./util/SortableSet"); const GraphHelpers = require("./GraphHelpers"); -const SingleEntryDependency = require("./dependencies/SingleEntryDependency"); +const ModuleDependency = require("./dependencies/ModuleDependency"); /** @typedef {import("./Module")} Module */ /** @typedef {import("./Compiler")} Compiler */ @@ -48,12 +48,12 @@ const SingleEntryDependency = require("./dependencies/SingleEntryDependency"); /** @typedef {import("./DependenciesBlock")} DependenciesBlock */ /** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ -/** @typedef {SingleEntryDependency|MultiEntryDependency|DllEntryDependency} PossibleEntryDependencies */ +// TODO use @callback /** @typedef {{[assetName: string]: Source}} CompilationAssets */ /** @typedef {(err: Error|null, result?: Module) => void } ModuleCallback */ /** @typedef {(err?: Error|null, result?: Module) => void } ModuleChainCallback */ /** @typedef {(module: Module) => void} OnModuleCallback */ -/** @typedef {(err?: Error|null) => void} CompilationSealCallback */ +/** @typedef {(err?: Error|null) => void} Callback */ /** @typedef {{apply: (dep: Dependency, source: Source, runtime: RuntimeTemplate) => void}} DependencyTemplate */ /** @typedef {(d: Dependency) => any} DepBlockVarDependenciesCallback */ /** @typedef {new (...args: any[]) => Dependency} DepConstructor */ @@ -356,7 +356,7 @@ class Compilation extends Tapable { // TODO the following hooks are weirdly located here // TODO move them for webpack 5 - /** @type {SyncHook} */ + /** @type {SyncHook} */ normalModuleLoader: new SyncHook(["loaderContext", "module"]), /** @type {SyncBailHook} */ @@ -448,7 +448,7 @@ class Compilation extends Tapable { this.dependencyTemplates = new Map(); this.dependencyTemplates.set("hash", ""); this.childrenCounters = {}; - /** @type {Set} */ + /** @type {Set} */ this.usedChunkIds = null; /** @type {Set} */ this.usedModuleIds = null; @@ -456,11 +456,11 @@ class Compilation extends Tapable { this.fileTimestamps = undefined; /** @type {Map=} */ this.contextTimestamps = undefined; - /** @type {Set} */ + /** @type {Set} */ this.compilationDependencies = undefined; - /** @private @type {Map} */ + /** @private @type {Map} */ this._buildingModules = new Map(); - /** @private @type {Map} */ + /** @private @type {Map} */ this._rebuildingModules = new Map(); } @@ -468,10 +468,18 @@ class Compilation extends Tapable { return new Stats(this); } + /** + * @typedef {Object} AddModuleResult + * @property {Module} module the added or existing module + * @property {boolean} issuer was this the first request for this module + * @property {boolean} build should the module be build + * @property {boolean} dependencies should dependencies be walked + */ + /** * @param {Module} module module to be added that was created * @param {any=} cacheGroup cacheGroup it is apart of - * @returns {{module: Module, issuer: boolean, build: boolean, dependencies: boolean}} returns meta about whether or not the module had built + * @returns {AddModuleResult} returns meta about whether or not the module had built * had an issuer, or any dependnecies */ addModule(module, cacheGroup) { @@ -550,7 +558,7 @@ class Compilation extends Tapable { /** * @param {Module} module module with its callback list - * @param {any} callback the callback function + * @param {Callback} callback the callback function * @returns {void} */ waitForBuildingFinished(module, callback) { @@ -569,8 +577,8 @@ class Compilation extends Tapable { * @param {boolean} optional optional flag * @param {Module=} origin origin module this module build was requested from * @param {Dependency[]=} dependencies optional dependencies from the module to be built - * @param {any} thisCallback the callback - * @returns {any} returns the callback function with results + * @param {TODO} thisCallback the callback + * @returns {TODO} returns the callback function with results */ buildModule(module, optional, origin, dependencies, thisCallback) { let callbackList = this._buildingModules.get(module); @@ -693,7 +701,7 @@ class Compilation extends Tapable { * @param {Module} module module to add deps to * @param {SortedDependency[]} dependencies set of sorted dependencies to iterate through * @param {(boolean|null)=} bail whether to bail or not - * @param {any} cacheGroup optional cacheGroup + * @param {TODO} cacheGroup optional cacheGroup * @param {boolean} recursive whether it is recursive traversal * @param {function} callback callback for when dependencies are finished being added * @returns {void} @@ -870,7 +878,7 @@ class Compilation extends Tapable { * @param {Dependency} dependency dependency used to create Module chain * @param {OnModuleCallback} onModule function invoked on modules creation * @param {ModuleChainCallback} callback callback for when module chain is complete - * @returns {void|never} will throw if dependency instance is not a valid Dependency + * @returns {void} will throw if dependency instance is not a valid Dependency */ _addModuleChain(context, dependency, onModule, callback) { const start = this.profile && Date.now(); @@ -987,7 +995,7 @@ class Compilation extends Tapable { /** * * @param {string} context context path for entry - * @param {PossibleEntryDependencies} entry entry dependency being created + * @param {Dependency} entry entry dependency being created * @param {string} name name of entry * @param {ModuleCallback} callback callback function * @returns {void} returns @@ -999,7 +1007,7 @@ class Compilation extends Tapable { module: null }; - if (entry instanceof SingleEntryDependency) { + if (entry instanceof ModuleDependency) { slot.request = entry.request; } @@ -1028,7 +1036,7 @@ class Compilation extends Tapable { /** * @param {string} context context path string - * @param {PossibleEntryDependencies} dependency dep used to create module + * @param {Dependency} dependency dep used to create module * @param {ModuleCallback} callback module callback sending module up a level * @returns {void} */ @@ -1110,7 +1118,7 @@ class Compilation extends Tapable { } /** - * @param {CompilationSealCallback} callback signals when the seal method is finishes + * @param {Callback} callback signals when the seal method is finishes * @returns {void} */ seal(callback) { @@ -1298,7 +1306,7 @@ class Compilation extends Tapable { } /** - * @param {any} groupOptions options provided for group + * @param {TODO} groupOptions options provided for group * @param {Module} module module in question * @param {DependencyLocation} loc source location reference * @param {string} request request string @@ -1877,13 +1885,14 @@ class Compilation extends Tapable { const blocks = block.blocks; for (let indexBlock = 0; indexBlock < blocks.length; indexBlock++) { + const asyncBlock = blocks[indexBlock]; // Grab all chunks from the first Block's AsyncDepBlock - const chunks = blocks[indexBlock].chunkGroup.chunks; + const chunks = asyncBlock.chunkGroup.chunks; // For each chunk in chunkGroup for (let indexChunk = 0; indexChunk < chunks.length; indexChunk++) { const iteratedChunk = chunks[indexChunk]; - block.chunkGroup.removeChunk(iteratedChunk); - block.chunkGroup.removeParent(iteratedChunk); + asyncBlock.chunkGroup.removeChunk(iteratedChunk); + asyncBlock.chunkGroup.removeParent(iteratedChunk); // Recurse this.removeChunkFromDependencies(block, iteratedChunk); } @@ -1946,7 +1955,7 @@ class Compilation extends Tapable { } applyChunkIds() { - /** @type {Set} */ + /** @type {Set} */ const usedIds = new Set(); // Get used ids from usedChunkIds property (i. e. from records) @@ -2169,7 +2178,7 @@ class Compilation extends Tapable { } /** - * @param {TODO} update //TODO (update hash function?) + * @param {string} update extra information * @returns {void} */ modifyHash(update) { @@ -2268,7 +2277,7 @@ class Compilation extends Tapable { /** * @param {string} filename used to get asset path with hash * @param {TODO=} data // TODO: figure out this param type - * @returns {TODO} figure out this return type + * @returns {string} interpolated path */ getPath(filename, data) { data = data || {}; diff --git a/lib/DelegatedModule.js b/lib/DelegatedModule.js index 3abe062c1f8..0a91ee07d5a 100644 --- a/lib/DelegatedModule.js +++ b/lib/DelegatedModule.js @@ -24,6 +24,9 @@ class DelegatedModule extends Module { this.userRequest = userRequest; this.originalRequest = originalRequest; this.delegateData = data; + + // Build info + this.delegatedSourceDependency = undefined; } libIdent(options) { @@ -50,9 +53,10 @@ class DelegatedModule extends Module { this.built = true; this.buildMeta = Object.assign({}, this.delegateData.buildMeta); this.buildInfo = {}; - /** @type {ModuleDependency[]=} */ - this.dependencies = []; - this.addDependency(new DelegatedSourceDependency(this.sourceRequest)); + this.delegatedSourceDependency = new DelegatedSourceDependency( + this.sourceRequest + ); + this.addDependency(this.delegatedSourceDependency); this.addDependency( new DelegatedExportsDependency(this, this.delegateData.exports || true) ); @@ -60,7 +64,7 @@ class DelegatedModule extends Module { } source(depTemplates, runtime) { - const dep = this.dependencies[0]; + const dep = this.delegatedSourceDependency; const sourceModule = dep.module; let str; diff --git a/lib/DependenciesBlock.js b/lib/DependenciesBlock.js index cd25f26212f..1d5aedc8f12 100644 --- a/lib/DependenciesBlock.js +++ b/lib/DependenciesBlock.js @@ -6,14 +6,12 @@ const DependenciesBlockVariable = require("./DependenciesBlockVariable"); -/** - * @typedef {import("./ChunkGroup")} ChunkGroup - * @typedef {import("./Dependency")} Dependency - * @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock - * @typedef {import("./DependenciesBlockVariable")} DependenciesBlockVariable - * @typedef {(d: Dependency) => boolean} DependencyFilterFunction - * @typedef {import("crypto").Hash} Hash - */ +/** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** @typedef {import("./Dependency")} Dependency */ +/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ +/** @typedef {import("./DependenciesBlockVariable")} DependenciesBlockVariable */ +/** @typedef {(d: Dependency) => boolean} DependencyFilterFunction */ +/** @typedef {import("crypto").Hash} Hash */ class DependenciesBlock { constructor() { @@ -23,9 +21,6 @@ class DependenciesBlock { this.blocks = []; /** @type {DependenciesBlockVariable[]} */ this.variables = []; - // TODO remove this line, it's wrong - /** @type {ChunkGroup=} */ - this.chunkGroup = undefined; } /** diff --git a/lib/DependenciesBlockVariable.js b/lib/DependenciesBlockVariable.js index 0573502c16a..b609779e208 100644 --- a/lib/DependenciesBlockVariable.js +++ b/lib/DependenciesBlockVariable.js @@ -7,10 +7,11 @@ const { RawSource, ReplaceSource } = require("webpack-sources"); /** @typedef {import("./Dependency")} Dependency */ +/** @typedef {import("./Dependency").DependencyTemplate} DependencyTemplate */ /** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ /** @typedef {import("crypto").Hash} Hash */ /** @typedef {(d: Dependency) => boolean} DependencyFilterFunction */ -/** @typedef {Map} DependencyFactoryConstruction */ +/** @typedef {Map} DependencyFactoryConstruction */ class DependenciesBlockVariable { /** diff --git a/lib/Dependency.js b/lib/Dependency.js index f031f13b045..9f98e7cd653 100644 --- a/lib/Dependency.js +++ b/lib/Dependency.js @@ -8,6 +8,13 @@ const compareLocations = require("./compareLocations"); const DependencyReference = require("./dependencies/DependencyReference"); /** @typedef {import("./Module")} Module */ +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ + +/** + * @typedef {Object} DependencyTemplate + * @property {function(Dependency, Source, RuntimeTemplate, Map): void} apply + */ class Dependency { constructor() { diff --git a/lib/GraphHelpers.js b/lib/GraphHelpers.js index d668159705a..73c567442d5 100644 --- a/lib/GraphHelpers.js +++ b/lib/GraphHelpers.js @@ -2,6 +2,7 @@ /** @typedef {import("./ChunkGroup")} ChunkGroup */ /** @typedef {import("./Module")} Module */ /** @typedef {import("./DependenciesBlock")} DependenciesBlock */ +/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ /** * @param {ChunkGroup} chunkGroup the ChunkGroup to connect @@ -47,7 +48,7 @@ const disconnectChunkAndModule = (chunk, module) => { }; /** - * @param {DependenciesBlock} depBlock DepBlock being tied to ChunkGroup + * @param {AsyncDependenciesBlock} depBlock DepBlock being tied to ChunkGroup * @param {ChunkGroup} chunkGroup ChunkGroup being tied to DepBlock * @returns {void} */ diff --git a/lib/Module.js b/lib/Module.js index 98d0fdbab2f..19578b79e31 100644 --- a/lib/Module.js +++ b/lib/Module.js @@ -11,8 +11,8 @@ const ModuleReason = require("./ModuleReason"); const SortableSet = require("./util/SortableSet"); const Template = require("./Template"); -/** @typedef {typeof import("./Chunk")} Chunk */ -/** @typedef {typeof import("./RequestShortener")} RequestShortener */ +/** @typedef {import("./Chunk")} Chunk */ +/** @typedef {import("./RequestShortener")} RequestShortener */ /** @typedef {import("./WebpackError")} WebpackError */ const EMPTY_RESOLVE_OPTIONS = {}; @@ -48,7 +48,7 @@ class Module extends DependenciesBlock { this.renderedHash = undefined; // Info from Factory - /** @type {any} */ + /** @type {TODO} */ this.resolveOptions = EMPTY_RESOLVE_OPTIONS; /** @type {object} */ this.factoryMeta = {}; diff --git a/lib/MultiEntryPlugin.js b/lib/MultiEntryPlugin.js index 853ee399df2..a7c67e5b678 100644 --- a/lib/MultiEntryPlugin.js +++ b/lib/MultiEntryPlugin.js @@ -58,7 +58,7 @@ class MultiEntryPlugin { /** * @param {string[]} entries each entry path string * @param {string} name name of the entry - * @return {MultiEntryDependency} returns a constructed Dependency + * @returns {MultiEntryDependency} returns a constructed Dependency */ static createDependency(entries, name) { return new MultiEntryDependency( diff --git a/lib/WebpackError.js b/lib/WebpackError.js index adc3671c006..e9247b5cd15 100644 --- a/lib/WebpackError.js +++ b/lib/WebpackError.js @@ -13,7 +13,6 @@ class WebpackError extends Error { this.origin = undefined; this.dependencies = undefined; this.module = undefined; - this.message = undefined; Error.captureStackTrace(this, this.constructor); } diff --git a/lib/dependencies/DependencyReference.js b/lib/dependencies/DependencyReference.js index 6334d793748..775bef485f6 100644 --- a/lib/dependencies/DependencyReference.js +++ b/lib/dependencies/DependencyReference.js @@ -12,7 +12,6 @@ class DependencyReference { * @param {Module} module module there reference comes from * @param {string[]|boolean} importedNames imported names or boolean * @param {boolean} weak is weak reference or not - * @memberof DependencyReference */ constructor(module, importedNames, weak) { this.module = module; diff --git a/lib/util/Semaphore.js b/lib/util/Semaphore.js index b75bc2c9267..d6c876651eb 100644 --- a/lib/util/Semaphore.js +++ b/lib/util/Semaphore.js @@ -13,7 +13,7 @@ class Semaphore { */ constructor(available) { this.available = available; - /** @type {(() => void)[]} */ + /** @type {(function(): void)[]} */ this.waiters = []; /** @private */ this._continue = this._continue.bind(this); From da823fc56dd13240ef9eb258fad34aecbacdfc53 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 15 May 2018 15:02:28 +0200 Subject: [PATCH 023/310] stricter lint of jsdoc --- .eslintrc.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index a70d08eb0fb..477b21dbaef 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -32,8 +32,10 @@ module.exports = { "valid-jsdoc": ["error", { "prefer": { "return": "returns", + "prop": "property", "memberof": "DONTUSE", "class": "DONTUSE", + "extends": "DONTUSE", "inheritdoc": "DONTUSE", "description": "DONTUSE", "readonly": "DONTUSE" From 309250a8d0d9001274516055dae7e5941ad68dde Mon Sep 17 00:00:00 2001 From: Ryan Tsao Date: Thu, 17 May 2018 21:08:50 -0700 Subject: [PATCH 024/310] Fix stats snapshot --- test/__snapshots__/StatsTestCases.test.js.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index 74b351dd2ff..301df8fdf8e 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -1705,7 +1705,7 @@ exports[`StatsTestCases should print correct stats for preload 1`] = ` normal.js 130 bytes 1 [emitted] normal preloaded2.js 127 bytes 2 [emitted] preloaded2 preloaded3.js 130 bytes 3 [emitted] preloaded3 - main.js 9.81 KiB 4 [emitted] main + main.js 9.8 KiB 4 [emitted] main inner.js 136 bytes 5 [emitted] inner inner2.js 201 bytes 6 [emitted] inner2 Entrypoint main = main.js (preload: preloaded2.js preloaded.js preloaded3.js) From 9f5a5e729352fade350554dc420e48b20eda35c8 Mon Sep 17 00:00:00 2001 From: Ryan Tsao Date: Thu, 17 May 2018 21:11:15 -0700 Subject: [PATCH 025/310] Remove old fixture --- test/statsCases/preload/expected.txt | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 test/statsCases/preload/expected.txt diff --git a/test/statsCases/preload/expected.txt b/test/statsCases/preload/expected.txt deleted file mode 100644 index ba3db08aeed..00000000000 --- a/test/statsCases/preload/expected.txt +++ /dev/null @@ -1,16 +0,0 @@ - Asset Size Chunks Chunk Names - preloaded.js 1.03 KiB 0 [emitted] preloaded - normal.js 130 bytes 1 [emitted] normal -preloaded2.js 127 bytes 2 [emitted] preloaded2 -preloaded3.js 130 bytes 3 [emitted] preloaded3 - main.js 9.8 KiB 4 [emitted] main - inner.js 136 bytes 5 [emitted] inner - inner2.js 201 bytes 6 [emitted] inner2 -Entrypoint main = main.js (preload: preloaded2.js preloaded.js preloaded3.js) -chunk {0} preloaded.js (preloaded) 226 bytes <{4}> >{5}< >{6}< (preload: {6} {5}) [rendered] -chunk {1} normal.js (normal) 0 bytes <{4}> [rendered] -chunk {2} preloaded2.js (preloaded2) 0 bytes <{4}> [rendered] -chunk {3} preloaded3.js (preloaded3) 0 bytes <{4}> [rendered] -chunk {4} main.js (main) 424 bytes >{0}< >{1}< >{2}< >{3}< (preload: {2} {0} {3}) [entry] [rendered] -chunk {5} inner.js (inner) 0 bytes <{0}> [rendered] -chunk {6} inner2.js (inner2) 0 bytes <{0}> [rendered] \ No newline at end of file From 800e0de25b8e0e0fc9ae69b9e76dbec00fb5895f Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Sun, 20 May 2018 00:32:59 -0700 Subject: [PATCH 026/310] Add typing for DefinePlugin --- lib/DefinePlugin.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/lib/DefinePlugin.js b/lib/DefinePlugin.js index bf168d7f3a2..a824183f7c7 100644 --- a/lib/DefinePlugin.js +++ b/lib/DefinePlugin.js @@ -9,6 +9,11 @@ const BasicEvaluatedExpression = require("./BasicEvaluatedExpression"); const ParserHelpers = require("./ParserHelpers"); const NullFactory = require("./NullFactory"); +/** + * Stringify an object + * @param {Object} obj Object to stringify + * @returns {string} Stringified object + */ const stringifyObj = obj => { return ( "Object({" + @@ -22,6 +27,11 @@ const stringifyObj = obj => { ); }; +/** + * Convert code to a string that evaluates + * @param {null|undefined|RegExp|Function|Object} code Code to evaluate + * @returns {string} code converted to string that evaluates + */ const toCode = code => { if (code === null) return "null"; else if (code === undefined) return "undefined"; @@ -33,10 +43,18 @@ const toCode = code => { }; class DefinePlugin { + /** + * Create a new define plugin + * @param {Object} definitions A map of global object definitions + */ constructor(definitions) { this.definitions = definitions; } + /** + * Apply the plugin + * @param {TODO} compiler Webpack Compiler + */ apply(compiler) { const definitions = this.definitions; compiler.hooks.compilation.tap( @@ -48,6 +66,10 @@ class DefinePlugin { new ConstDependency.Template() ); + /** + * Handler + * @param {TODO} parser Parser + */ const handler = parser => { const walkDefinitions = (definitions, prefix) => { Object.keys(definitions).forEach(key => { @@ -66,6 +88,11 @@ class DefinePlugin { }); }; + /** + * Apply define key + * @param {string} prefix Prefix + * @param {string} key Key + */ const applyDefineKey = (prefix, key) => { const splittedKey = key.split("."); splittedKey.slice(1).forEach((_, i) => { @@ -76,6 +103,11 @@ class DefinePlugin { }); }; + /** + * Apply Code + * @param {string} key Key + * @param {*} code Code + */ const applyDefine = (key, code) => { const isTypeof = /^typeof\s+/.test(key); if (isTypeof) key = key.replace(/^typeof\s+/, ""); @@ -143,6 +175,11 @@ class DefinePlugin { }); }; + /** + * Apply Object + * @param {string} key Key + * @param {Object} obj Object + */ const applyObjectDefine = (key, obj) => { const code = stringifyObj(obj); parser.hooks.canRename From c222a6f33b23764c4816e89d9bb802d589302ed3 Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Fri, 25 May 2018 16:41:20 +0300 Subject: [PATCH 027/310] feat: implement option for `HashedModuleIdes` plugin --- lib/WebpackOptionsApply.js | 3 +++ lib/WebpackOptionsDefaulter.js | 2 ++ schemas/WebpackOptions.json | 4 ++++ test/TestCases.template.js | 1 + .../optimization/hashed-module-ids/files/file1.js | 1 + .../optimization/hashed-module-ids/files/file2.js | 1 + .../optimization/hashed-module-ids/files/file3.js | 1 + .../optimization/hashed-module-ids/files/file4.js | 1 + .../optimization/hashed-module-ids/files/file5.js | 1 + .../optimization/hashed-module-ids/index.js | 10 ++++++++++ .../optimization/hashed-module-ids/webpack.config.js | 5 +++++ .../optimization/named-modules/files/file1.js | 1 + .../optimization/named-modules/files/file2.js | 1 + .../optimization/named-modules/files/file3.js | 1 + .../optimization/named-modules/files/file4.js | 1 + .../optimization/named-modules/files/file5.js | 1 + test/configCases/optimization/named-modules/index.js | 10 ++++++++++ .../optimization/named-modules/webpack.config.js | 5 +++++ 18 files changed, 50 insertions(+) create mode 100644 test/configCases/optimization/hashed-module-ids/files/file1.js create mode 100644 test/configCases/optimization/hashed-module-ids/files/file2.js create mode 100644 test/configCases/optimization/hashed-module-ids/files/file3.js create mode 100644 test/configCases/optimization/hashed-module-ids/files/file4.js create mode 100644 test/configCases/optimization/hashed-module-ids/files/file5.js create mode 100644 test/configCases/optimization/hashed-module-ids/index.js create mode 100644 test/configCases/optimization/hashed-module-ids/webpack.config.js create mode 100644 test/configCases/optimization/named-modules/files/file1.js create mode 100644 test/configCases/optimization/named-modules/files/file2.js create mode 100644 test/configCases/optimization/named-modules/files/file3.js create mode 100644 test/configCases/optimization/named-modules/files/file4.js create mode 100644 test/configCases/optimization/named-modules/files/file5.js create mode 100644 test/configCases/optimization/named-modules/index.js create mode 100644 test/configCases/optimization/named-modules/webpack.config.js diff --git a/lib/WebpackOptionsApply.js b/lib/WebpackOptionsApply.js index 0b9ba6c80ea..2fd511e4b37 100644 --- a/lib/WebpackOptionsApply.js +++ b/lib/WebpackOptionsApply.js @@ -56,6 +56,7 @@ const RuntimeChunkPlugin = require("./optimize/RuntimeChunkPlugin"); const NoEmitOnErrorsPlugin = require("./NoEmitOnErrorsPlugin"); const NamedModulesPlugin = require("./NamedModulesPlugin"); const NamedChunksPlugin = require("./NamedChunksPlugin"); +const HashedModuleIdsPlugin = require("./HashedModuleIdsPlugin"); const DefinePlugin = require("./DefinePlugin"); const SizeLimitsPlugin = require("./performance/SizeLimitsPlugin"); @@ -328,6 +329,8 @@ class WebpackOptionsApply extends OptionsApply { new NoEmitOnErrorsPlugin().apply(compiler); if (options.optimization.namedModules) new NamedModulesPlugin().apply(compiler); + if (options.optimization.hashedModuleIds) + new HashedModuleIdsPlugin().apply(compiler); if (options.optimization.namedChunks) new NamedChunksPlugin().apply(compiler); if (options.optimization.nodeEnv) { diff --git a/lib/WebpackOptionsDefaulter.js b/lib/WebpackOptionsDefaulter.js index d947e6a97db..a315efd1eb7 100644 --- a/lib/WebpackOptionsDefaulter.js +++ b/lib/WebpackOptionsDefaulter.js @@ -258,6 +258,8 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { "make", options => options.mode === "development" ); + // TODO enable for production mode in webpack 5 + this.set("optimization.hashedModuleIds", false); this.set( "optimization.namedChunks", "make", diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json index f8d94d68320..a392b3d033c 100644 --- a/schemas/WebpackOptions.json +++ b/schemas/WebpackOptions.json @@ -1546,6 +1546,10 @@ "description": "Use readable module identifiers for better debugging", "type": "boolean" }, + "hashedModuleIds": { + "description": "Use hashed module id instead module identifiers for better long term caching", + "type": "boolean" + }, "namedChunks": { "description": "Use readable chunk identifiers for better debugging", "type": "boolean" diff --git a/test/TestCases.template.js b/test/TestCases.template.js index 8168b8ee5c4..4c9825a2756 100644 --- a/test/TestCases.template.js +++ b/test/TestCases.template.js @@ -29,6 +29,7 @@ const DEFAULT_OPTIMIZATIONS = { noEmitOnErrors: false, concatenateModules: false, namedModules: false, + hashedModuleIds: false, minimizer: [uglifyJsForTesting] }; diff --git a/test/configCases/optimization/hashed-module-ids/files/file1.js b/test/configCases/optimization/hashed-module-ids/files/file1.js new file mode 100644 index 00000000000..3cec1b77aad --- /dev/null +++ b/test/configCases/optimization/hashed-module-ids/files/file1.js @@ -0,0 +1 @@ +module.exports = module.id; diff --git a/test/configCases/optimization/hashed-module-ids/files/file2.js b/test/configCases/optimization/hashed-module-ids/files/file2.js new file mode 100644 index 00000000000..3cec1b77aad --- /dev/null +++ b/test/configCases/optimization/hashed-module-ids/files/file2.js @@ -0,0 +1 @@ +module.exports = module.id; diff --git a/test/configCases/optimization/hashed-module-ids/files/file3.js b/test/configCases/optimization/hashed-module-ids/files/file3.js new file mode 100644 index 00000000000..3cec1b77aad --- /dev/null +++ b/test/configCases/optimization/hashed-module-ids/files/file3.js @@ -0,0 +1 @@ +module.exports = module.id; diff --git a/test/configCases/optimization/hashed-module-ids/files/file4.js b/test/configCases/optimization/hashed-module-ids/files/file4.js new file mode 100644 index 00000000000..3cec1b77aad --- /dev/null +++ b/test/configCases/optimization/hashed-module-ids/files/file4.js @@ -0,0 +1 @@ +module.exports = module.id; diff --git a/test/configCases/optimization/hashed-module-ids/files/file5.js b/test/configCases/optimization/hashed-module-ids/files/file5.js new file mode 100644 index 00000000000..3cec1b77aad --- /dev/null +++ b/test/configCases/optimization/hashed-module-ids/files/file5.js @@ -0,0 +1 @@ +module.exports = module.id; diff --git a/test/configCases/optimization/hashed-module-ids/index.js b/test/configCases/optimization/hashed-module-ids/index.js new file mode 100644 index 00000000000..8741cc8173a --- /dev/null +++ b/test/configCases/optimization/hashed-module-ids/index.js @@ -0,0 +1,10 @@ +var path = require("path"); + +it("should have named modules ids", function() { + for (var i = 1; i <= 5; i++) { + var expectedModuleId = "file" + i + ".js"; + var moduleId = require("./files/file" + i + ".js"); + + expect(path.basename(moduleId)).not.toBe(expectedModuleId); + } +}); diff --git a/test/configCases/optimization/hashed-module-ids/webpack.config.js b/test/configCases/optimization/hashed-module-ids/webpack.config.js new file mode 100644 index 00000000000..19d544d1dbe --- /dev/null +++ b/test/configCases/optimization/hashed-module-ids/webpack.config.js @@ -0,0 +1,5 @@ +module.exports = { + optimization: { + hashedModuleIds: true + } +}; diff --git a/test/configCases/optimization/named-modules/files/file1.js b/test/configCases/optimization/named-modules/files/file1.js new file mode 100644 index 00000000000..3cec1b77aad --- /dev/null +++ b/test/configCases/optimization/named-modules/files/file1.js @@ -0,0 +1 @@ +module.exports = module.id; diff --git a/test/configCases/optimization/named-modules/files/file2.js b/test/configCases/optimization/named-modules/files/file2.js new file mode 100644 index 00000000000..3cec1b77aad --- /dev/null +++ b/test/configCases/optimization/named-modules/files/file2.js @@ -0,0 +1 @@ +module.exports = module.id; diff --git a/test/configCases/optimization/named-modules/files/file3.js b/test/configCases/optimization/named-modules/files/file3.js new file mode 100644 index 00000000000..3cec1b77aad --- /dev/null +++ b/test/configCases/optimization/named-modules/files/file3.js @@ -0,0 +1 @@ +module.exports = module.id; diff --git a/test/configCases/optimization/named-modules/files/file4.js b/test/configCases/optimization/named-modules/files/file4.js new file mode 100644 index 00000000000..3cec1b77aad --- /dev/null +++ b/test/configCases/optimization/named-modules/files/file4.js @@ -0,0 +1 @@ +module.exports = module.id; diff --git a/test/configCases/optimization/named-modules/files/file5.js b/test/configCases/optimization/named-modules/files/file5.js new file mode 100644 index 00000000000..3cec1b77aad --- /dev/null +++ b/test/configCases/optimization/named-modules/files/file5.js @@ -0,0 +1 @@ +module.exports = module.id; diff --git a/test/configCases/optimization/named-modules/index.js b/test/configCases/optimization/named-modules/index.js new file mode 100644 index 00000000000..082bc1bda00 --- /dev/null +++ b/test/configCases/optimization/named-modules/index.js @@ -0,0 +1,10 @@ +var path = require("path"); + +it("should have named modules ids", function() { + for (var i = 1; i <= 5; i++) { + var expectedModuleId = "file" + i + ".js"; + var moduleId = require("./files/file" + i + ".js"); + + expect(path.basename(moduleId)).toBe(expectedModuleId); + } +}); diff --git a/test/configCases/optimization/named-modules/webpack.config.js b/test/configCases/optimization/named-modules/webpack.config.js new file mode 100644 index 00000000000..10572c1da34 --- /dev/null +++ b/test/configCases/optimization/named-modules/webpack.config.js @@ -0,0 +1,5 @@ +module.exports = { + optimization: { + namedModules: true + } +}; From a1b9b6e46bfa3e4728a9a7bc5e0f53097fb9dcae Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Wed, 16 May 2018 13:43:54 +0200 Subject: [PATCH 028/310] Lint JS files before committing them --- package.json | 12 ++ yarn.lock | 500 +++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 500 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index b173897b166..0ca4539842a 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "express": "~4.13.1", "file-loader": "^1.1.6", "glob": "^7.1.2", + "husky": "^1.0.0-rc.6", "i18n-webpack-plugin": "^1.0.0", "istanbul": "^0.4.5", "jade": "^1.11.0", @@ -57,6 +58,7 @@ "json-loader": "^0.5.7", "less": "^2.5.1", "less-loader": "^4.0.3", + "lint-staged": "^7.1.0", "lodash": "^4.17.4", "prettier": "^1.11.1", "pug": "^2.0.3", @@ -129,6 +131,16 @@ "cover:unit": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"/test/*.unittest.js\" --coverage", "cover:report": "istanbul report" }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "lib/**/*.js": [ + "eslint --cache" + ] + }, "jest": { "forceExit": true, "setupTestFrameworkScriptFile": "/test/setupTestFramework.js", diff --git a/yarn.lock b/yarn.lock index 04001e74bb9..783bea5a1da 100644 --- a/yarn.lock +++ b/yarn.lock @@ -268,6 +268,10 @@ amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" +ansi-escapes@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" + ansi-escapes@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" @@ -284,12 +288,22 @@ ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" -ansi-styles@^3.1.0, ansi-styles@^3.2.0, ansi-styles@^3.2.1: +ansi-styles@^3.1.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" dependencies: color-convert "^1.9.0" +ansi-styles@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" + dependencies: + color-convert "^1.9.0" + +any-observable@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.2.0.tgz#c67870058003579009083f54ac0abafb5c33d242" + anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -297,6 +311,10 @@ anymatch@^2.0.0: micromatch "^3.1.4" normalize-path "^2.1.1" +app-root-path@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.0.1.tgz#cd62dcf8e4fd5a417efc664d2e5b10653c651b46" + append-transform@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" @@ -902,7 +920,7 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -chalk@^1.1.1, chalk@^1.1.3: +chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: @@ -1019,12 +1037,29 @@ clean-css@^4.1.11: dependencies: source-map "0.5.x" +cli-cursor@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" + dependencies: + restore-cursor "^1.0.1" + cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" dependencies: restore-cursor "^2.0.0" +cli-spinners@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c" + +cli-truncate@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574" + dependencies: + slice-ansi "0.0.4" + string-width "^1.0.1" + cli-width@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" @@ -1145,7 +1180,7 @@ commander@2.8.x: dependencies: graceful-readlink ">= 1.0.0" -commander@^2.9.0, commander@^2.x: +commander@^2.14.1, commander@^2.9.0, commander@^2.x: version "2.15.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" @@ -1258,6 +1293,15 @@ core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" +cosmiconfig@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-4.0.0.tgz#760391549580bbd2df1e562bc177b13c290972dc" + dependencies: + is-directory "^0.3.1" + js-yaml "^3.9.0" + parse-json "^4.0.0" + require-from-string "^2.0.1" + coveralls@^2.11.2: version "2.13.3" resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-2.13.3.tgz#9ad7c2ae527417f361e8b626483f48ee92dd2bc7" @@ -1466,6 +1510,10 @@ data-urls@^1.0.0: whatwg-mimetype "^2.0.0" whatwg-url "^6.4.0" +date-fns@^1.27.2: + version "1.29.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.29.0.tgz#12e609cdcb935127311d04d33334e2960a2a54e6" + date-now@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" @@ -1496,6 +1544,10 @@ decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" +dedent@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" + deep-extend@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.5.1.tgz#b894a9dd90d3023fbf1c55a394fb858eb2066f1f" @@ -1644,6 +1696,10 @@ electron-to-chromium@^1.2.7: version "1.3.42" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.42.tgz#95c33bf01d0cc405556aec899fe61fd4d76ea0f9" +elegant-spinner@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" + elliptic@^6.0.0: version "6.4.0" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.0.tgz#cac9af8762c85836187003c8dfe193e5e2eae5df" @@ -1686,7 +1742,7 @@ errno@^0.1.1, errno@^0.1.3, errno@~0.1.7: dependencies: prr "~1.0.1" -error-ex@^1.2.0: +error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" dependencies: @@ -1900,6 +1956,22 @@ execa@^0.7.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +execa@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.9.0.tgz#adb7ce62cf985071f60580deb4a88b9e34712d01" + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +exit-hook@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" + exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -1928,6 +2000,17 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" +expect@^22.4.3: + version "22.4.3" + resolved "https://registry.yarnpkg.com/expect/-/expect-22.4.3.tgz#d5a29d0a0e1fb2153557caef2674d4547e914674" + dependencies: + ansi-styles "^3.2.0" + jest-diff "^22.4.3" + jest-get-type "^22.4.3" + jest-matcher-utils "^22.4.3" + jest-message-util "^22.4.3" + jest-regex-util "^22.4.3" + expect@^23.0.0-charlie.3: version "23.0.0-charlie.3" resolved "https://registry.yarnpkg.com/expect/-/expect-23.0.0-charlie.3.tgz#6f00326048ddcedd6645a861bf872aca90d09880" @@ -2059,6 +2142,13 @@ fbjs@^0.8.16, fbjs@^0.8.9: setimmediate "^1.0.5" ua-parser-js "^0.7.9" +figures@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + dependencies: + escape-string-regexp "^1.0.5" + object-assign "^4.1.0" + figures@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" @@ -2126,6 +2216,10 @@ find-cache-dir@^1.0.0: make-dir "^1.0.0" pkg-dir "^2.0.0" +find-parent-dir@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54" + find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" @@ -2282,6 +2376,10 @@ get-caller-file@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" +get-own-enumerable-property-symbols@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-2.0.1.tgz#5c4ad87f2834c4b9b4e84549dc1e0650fb38c24b" + get-stdin@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" @@ -2564,6 +2662,20 @@ https-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" +husky@^1.0.0-rc.6: + version "1.0.0-rc.6" + resolved "https://registry.yarnpkg.com/husky/-/husky-1.0.0-rc.6.tgz#000f5ffe671015ae8c48da5c52b3390bbba9770d" + dependencies: + cosmiconfig "^4.0.0" + execa "^0.9.0" + find-up "^2.1.0" + is-ci "^1.1.0" + pkg-dir "^2.0.0" + pupa "^1.0.0" + read-pkg "^3.0.0" + run-node "^1.0.0" + slash "^2.0.0" + i18n-webpack-plugin@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/i18n-webpack-plugin/-/i18n-webpack-plugin-1.0.0.tgz#0ca12296ec937a4f94325cd0264d08f4e0549831" @@ -2627,6 +2739,16 @@ imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + dependencies: + repeating "^2.0.0" + +indent-string@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" + indexes-of@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" @@ -2727,7 +2849,7 @@ is-callable@^1.1.1, is-callable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" -is-ci@^1.0.10: +is-ci@^1.0.10, is-ci@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5" dependencies: @@ -2765,6 +2887,10 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2: is-data-descriptor "^1.0.0" kind-of "^6.0.2" +is-directory@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + is-dotfile@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" @@ -2868,6 +2994,16 @@ is-number@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" +is-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + +is-observable@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-0.2.0.tgz#b361311d83c6e5d726cabf5e250b0237106f5ae2" + dependencies: + symbol-observable "^0.2.2" + is-odd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-2.0.0.tgz#7646624671fd7ea558ccd9a2795182f2958f1b24" @@ -2926,6 +3062,10 @@ is-regex@^1.0.3, is-regex@^1.0.4: dependencies: has "^1.0.1" +is-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" + is-resolvable@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" @@ -3140,6 +3280,22 @@ jest-cli@^23.0.0-charlie.3: which "^1.2.12" yargs "^11.0.0" +jest-config@^22.4.3: + version "22.4.3" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-22.4.3.tgz#0e9d57db267839ea31309119b41dc2fa31b76403" + dependencies: + chalk "^2.0.1" + glob "^7.1.1" + jest-environment-jsdom "^22.4.3" + jest-environment-node "^22.4.3" + jest-get-type "^22.4.3" + jest-jasmine2 "^22.4.3" + jest-regex-util "^22.4.3" + jest-resolve "^22.4.3" + jest-util "^22.4.3" + jest-validate "^22.4.3" + pretty-format "^22.4.3" + jest-config@^23.0.0-charlie.3: version "23.0.0-charlie.3" resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.0.0-charlie.3.tgz#e75d783a32d26b5d1aeb5736e5b2926d7709cd51" @@ -3158,6 +3314,15 @@ jest-config@^23.0.0-charlie.3: jest-validate "^23.0.0-charlie.3" pretty-format "^23.0.0-charlie.3" +jest-diff@^22.4.3: + version "22.4.3" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-22.4.3.tgz#e18cc3feff0aeef159d02310f2686d4065378030" + dependencies: + chalk "^2.0.1" + diff "^3.2.0" + jest-get-type "^22.4.3" + pretty-format "^22.4.3" + jest-diff@^23.0.0-charlie.3: version "23.0.0-charlie.3" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.0.0-charlie.3.tgz#9ee0575d512875038c0dbb60b4ffb0d643c8b732" @@ -3177,6 +3342,14 @@ jest-docblock@^22.4.0: dependencies: detect-newline "^2.1.0" +jest-environment-jsdom@^22.4.3: + version "22.4.3" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-22.4.3.tgz#d67daa4155e33516aecdd35afd82d4abf0fa8a1e" + dependencies: + jest-mock "^22.4.3" + jest-util "^22.4.3" + jsdom "^11.5.1" + jest-environment-jsdom@^23.0.0-charlie.3: version "23.0.0-charlie.3" resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.0.0-charlie.3.tgz#c88b81c77e00fb54c038a618768a2007bba4c92e" @@ -3185,6 +3358,13 @@ jest-environment-jsdom@^23.0.0-charlie.3: jest-util "^23.0.0-charlie.3" jsdom "^11.5.1" +jest-environment-node@^22.4.3: + version "22.4.3" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-22.4.3.tgz#54c4eaa374c83dd52a9da8759be14ebe1d0b9129" + dependencies: + jest-mock "^22.4.3" + jest-util "^22.4.3" + jest-environment-node@^23.0.0-charlie.3: version "23.0.0-charlie.3" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.0.0-charlie.3.tgz#4c853bb100e69f8ce0e693be45124a848c73fcc0" @@ -3192,7 +3372,7 @@ jest-environment-node@^23.0.0-charlie.3: jest-mock "^23.0.0-charlie.3" jest-util "^23.0.0-charlie.3" -jest-get-type@^22.1.0: +jest-get-type@^22.1.0, jest-get-type@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4" @@ -3208,6 +3388,22 @@ jest-haste-map@^23.0.0-charlie.3: micromatch "^2.3.11" sane "^2.0.0" +jest-jasmine2@^22.4.3: + version "22.4.3" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-22.4.3.tgz#4daf64cd14c793da9db34a7c7b8dcfe52a745965" + dependencies: + chalk "^2.0.1" + co "^4.6.0" + expect "^22.4.3" + graceful-fs "^4.1.11" + is-generator-fn "^1.0.0" + jest-diff "^22.4.3" + jest-matcher-utils "^22.4.3" + jest-message-util "^22.4.3" + jest-snapshot "^22.4.3" + jest-util "^22.4.3" + source-map-support "^0.5.0" + jest-jasmine2@^23.0.0-charlie.3: version "23.0.0-charlie.3" resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.0.0-charlie.3.tgz#2cf4269dc2d6b77d8f2bbd6bb4c5327fd28a4dee" @@ -3231,6 +3427,14 @@ jest-leak-detector@^23.0.0-charlie.3: dependencies: pretty-format "^23.0.0-charlie.3" +jest-matcher-utils@^22.4.3: + version "22.4.3" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-22.4.3.tgz#4632fe428ebc73ebc194d3c7b65d37b161f710ff" + dependencies: + chalk "^2.0.1" + jest-get-type "^22.4.3" + pretty-format "^22.4.3" + jest-matcher-utils@^23.0.0-charlie.3: version "23.0.0-charlie.3" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.0.0-charlie.3.tgz#41e1b0f56a951ab61a6688014c9f1fdc5fd082d4" @@ -3259,10 +3463,18 @@ jest-message-util@^23.0.0-charlie.3: slash "^1.0.0" stack-utils "^1.0.1" +jest-mock@^22.4.3: + version "22.4.3" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-22.4.3.tgz#f63ba2f07a1511772cdc7979733397df770aabc7" + jest-mock@^23.0.0-charlie.3: version "23.0.0-charlie.3" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.0.0-charlie.3.tgz#8bb1791579d92da32e733ee53b6e10c18739ea13" +jest-regex-util@^22.4.3: + version "22.4.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-22.4.3.tgz#a826eb191cdf22502198c5401a1fc04de9cef5af" + jest-regex-util@^23.0.0-charlie.3: version "23.0.0-charlie.3" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.0.0-charlie.3.tgz#f4cc6069940a2dbb1c5c4983cbb400932bef497c" @@ -3274,6 +3486,13 @@ jest-resolve-dependencies@^23.0.0-charlie.3: jest-regex-util "^23.0.0-charlie.3" jest-snapshot "^23.0.0-charlie.3" +jest-resolve@^22.4.3: + version "22.4.3" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-22.4.3.tgz#0ce9d438c8438229aa9b916968ec6b05c1abb4ea" + dependencies: + browser-resolve "^1.11.2" + chalk "^2.0.1" + jest-resolve@^23.0.0-charlie.3: version "23.0.0-charlie.3" resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.0.0-charlie.3.tgz#ebca5181e00a5ee59a604d6c52347b7f37128bf7" @@ -3335,6 +3554,17 @@ jest-silent-reporter@0.0.4: chalk "^2.3.1" jest-util "^22.3.0" +jest-snapshot@^22.4.3: + version "22.4.3" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-22.4.3.tgz#b5c9b42846ffb9faccb76b841315ba67887362d2" + dependencies: + chalk "^2.0.1" + jest-diff "^22.4.3" + jest-matcher-utils "^22.4.3" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + pretty-format "^22.4.3" + jest-snapshot@^23.0.0-charlie.3: version "23.0.0-charlie.3" resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.0.0-charlie.3.tgz#8e64540577806eb88794801c036cd9859e31ffc6" @@ -3346,7 +3576,7 @@ jest-snapshot@^23.0.0-charlie.3: natural-compare "^1.4.0" pretty-format "^23.0.0-charlie.3" -jest-util@^22.3.0: +jest-util@^22.3.0, jest-util@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-22.4.3.tgz#c70fec8eec487c37b10b0809dc064a7ecf6aafac" dependencies: @@ -3370,6 +3600,16 @@ jest-util@^23.0.0-charlie.3: mkdirp "^0.5.1" source-map "^0.6.0" +jest-validate@^22.4.0, jest-validate@^22.4.3: + version "22.4.3" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-22.4.3.tgz#0780954a5a7daaeec8d3c10834b9280865976b30" + dependencies: + chalk "^2.0.1" + jest-config "^22.4.3" + jest-get-type "^22.4.3" + leven "^2.1.0" + pretty-format "^22.4.3" + jest-validate@^23.0.0-charlie.3: version "23.0.0-charlie.3" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.0.0-charlie.3.tgz#4d2c5e9b6e98b90d0b97c8a37c4b117326be9ed0" @@ -3419,7 +3659,7 @@ js-yaml@3.6.1: argparse "^1.0.7" esprima "^2.6.0" -js-yaml@3.x, js-yaml@^3.7.0, js-yaml@^3.9.1: +js-yaml@3.x, js-yaml@^3.7.0, js-yaml@^3.9.0, js-yaml@^3.9.1: version "3.11.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef" dependencies: @@ -3480,7 +3720,7 @@ json-loader@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.7.tgz#dca14a70235ff82f0ac9a3abeb60d337a365185d" -json-parse-better-errors@^1.0.2: +json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" @@ -3619,6 +3859,82 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +lint-staged@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-7.1.0.tgz#1514a5b71b8d9492ca0c3d2a44769cbcbc8bcc79" + dependencies: + app-root-path "^2.0.1" + chalk "^2.3.1" + commander "^2.14.1" + cosmiconfig "^4.0.0" + debug "^3.1.0" + dedent "^0.7.0" + execa "^0.9.0" + find-parent-dir "^0.3.0" + is-glob "^4.0.0" + is-windows "^1.0.2" + jest-validate "^22.4.0" + listr "^0.13.0" + lodash "^4.17.5" + log-symbols "^2.2.0" + micromatch "^3.1.8" + npm-which "^3.0.1" + p-map "^1.1.1" + path-is-inside "^1.0.2" + pify "^3.0.0" + please-upgrade-node "^3.0.2" + staged-git-files "1.1.1" + string-argv "^0.0.2" + stringify-object "^3.2.2" + +listr-silent-renderer@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" + +listr-update-renderer@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz#344d980da2ca2e8b145ba305908f32ae3f4cc8a7" + dependencies: + chalk "^1.1.3" + cli-truncate "^0.2.1" + elegant-spinner "^1.0.1" + figures "^1.7.0" + indent-string "^3.0.0" + log-symbols "^1.0.2" + log-update "^1.0.2" + strip-ansi "^3.0.1" + +listr-verbose-renderer@^0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz#8206f4cf6d52ddc5827e5fd14989e0e965933a35" + dependencies: + chalk "^1.1.3" + cli-cursor "^1.0.2" + date-fns "^1.27.2" + figures "^1.7.0" + +listr@^0.13.0: + version "0.13.0" + resolved "https://registry.yarnpkg.com/listr/-/listr-0.13.0.tgz#20bb0ba30bae660ee84cc0503df4be3d5623887d" + dependencies: + chalk "^1.1.3" + cli-truncate "^0.2.1" + figures "^1.7.0" + indent-string "^2.1.0" + is-observable "^0.2.0" + is-promise "^2.1.0" + is-stream "^1.1.0" + listr-silent-renderer "^1.1.1" + listr-update-renderer "^0.4.0" + listr-verbose-renderer "^0.4.0" + log-symbols "^1.0.2" + log-update "^1.0.2" + ora "^0.2.3" + p-map "^1.1.1" + rxjs "^5.4.2" + stream-to-observable "^0.2.0" + strip-ansi "^3.0.1" + load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" @@ -3629,6 +3945,15 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" +load-json-file@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" + dependencies: + graceful-fs "^4.1.2" + parse-json "^4.0.0" + pify "^3.0.0" + strip-bom "^3.0.0" + loader-runner@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" @@ -3673,7 +3998,7 @@ lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" -lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.3.0: +lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" @@ -3685,6 +4010,25 @@ log-driver@^1.x: version "1.2.7" resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8" +log-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" + dependencies: + chalk "^1.0.0" + +log-symbols@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" + dependencies: + chalk "^2.0.1" + +log-update@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-1.0.2.tgz#19929f64c4093d2d2e7075a1dad8af59c296b8d1" + dependencies: + ansi-escapes "^1.0.0" + cli-cursor "^1.0.2" + long@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" @@ -4115,12 +4459,26 @@ npm-packlist@^1.1.6: ignore-walk "^3.0.1" npm-bundled "^1.0.1" +npm-path@^2.0.2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/npm-path/-/npm-path-2.0.4.tgz#c641347a5ff9d6a09e4d9bce5580c4f505278e64" + dependencies: + which "^1.2.10" + npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" dependencies: path-key "^2.0.0" +npm-which@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/npm-which/-/npm-which-3.0.1.tgz#9225f26ec3a285c209cae67c3b11a6b4ab7140aa" + dependencies: + commander "^2.9.0" + npm-path "^2.0.2" + which "^1.2.10" + npmlog@^4.0.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" @@ -4200,6 +4558,10 @@ once@1.x, once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" +onetime@^1.0.0: + version "1.1.0" + resolved "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" + onetime@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" @@ -4230,6 +4592,15 @@ optionator@^0.8.1, optionator@^0.8.2: type-check "~0.3.2" wordwrap "~1.0.0" +ora@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/ora/-/ora-0.2.3.tgz#37527d220adcd53c39b73571d754156d5db657a4" + dependencies: + chalk "^1.1.1" + cli-cursor "^1.0.2" + cli-spinners "^0.1.2" + object-assign "^4.0.1" + os-browserify@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" @@ -4273,6 +4644,10 @@ p-locate@^2.0.0: dependencies: p-limit "^1.1.0" +p-map@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" + p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" @@ -4314,6 +4689,13 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" @@ -4372,6 +4754,12 @@ path-type@^1.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + dependencies: + pify "^3.0.0" + pbkdf2@^3.0.3: version "3.0.16" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.16.tgz#7404208ec6b01b62d85bf83853a8064f8d9c2a5c" @@ -4418,6 +4806,12 @@ platform@^1.3.3: version "1.3.5" resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.5.tgz#fb6958c696e07e2918d2eeda0f0bc9448d733444" +please-upgrade-node@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.0.2.tgz#7b9eaeca35aa4a43d6ebdfd10616c042f9a83acc" + dependencies: + semver-compare "^1.0.0" + pluralize@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" @@ -4692,6 +5086,13 @@ prettier@^1.11.1: version "1.12.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.1.tgz#c1ad20e803e7749faf905a409d2367e06bbe7325" +pretty-format@^22.4.3: + version "22.4.3" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-22.4.3.tgz#f873d780839a9c02e9664c8a082e9ee79eaac16f" + dependencies: + ansi-regex "^3.0.0" + ansi-styles "^3.2.0" + pretty-format@^23.0.0-charlie.3: version "23.0.0-charlie.3" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.0.0-charlie.3.tgz#b251f1bdd5da81110c8d48842ac722405085f5fc" @@ -4898,6 +5299,10 @@ punycode@^1.2.4, punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" +pupa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pupa/-/pupa-1.0.0.tgz#9a9568a5af7e657b8462a6e9d5328743560ceff6" + q@^1.1.2: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -5009,6 +5414,14 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" +read-pkg@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" + dependencies: + load-json-file "^4.0.0" + normalize-package-data "^2.3.2" + path-type "^3.0.0" + "readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" @@ -5216,6 +5629,10 @@ require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" +require-from-string@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" @@ -5255,6 +5672,13 @@ resolve@^1.1.6, resolve@^1.1.7, resolve@^1.3.3: dependencies: path-parse "^1.0.5" +restore-cursor@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" + dependencies: + exit-hook "^1.0.0" + onetime "^1.0.0" + restore-cursor@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" @@ -5295,6 +5719,10 @@ run-async@^2.2.0: dependencies: is-promise "^2.1.0" +run-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/run-node/-/run-node-1.0.0.tgz#46b50b946a2aa2d4947ae1d886e9856fd9cabe5e" + run-queue@^1.0.0, run-queue@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" @@ -5311,6 +5739,12 @@ rx-lite@*, rx-lite@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" +rxjs@^5.4.2: + version "5.5.10" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.10.tgz#fde02d7a614f6c8683d0d1957827f492e09db045" + dependencies: + symbol-observable "1.0.1" + safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" @@ -5363,6 +5797,10 @@ script-loader@~0.7.0: dependencies: raw-loader "~0.5.1" +semver-compare@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" + "semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" @@ -5478,6 +5916,14 @@ slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" +slash@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" + +slice-ansi@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" + slice-ansi@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" @@ -5642,6 +6088,10 @@ stack-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.1.tgz#d4f33ab54e8e38778b0ca5cfd3b3afb12db68620" +staged-git-files@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-1.1.1.tgz#37c2218ef0d6d26178b1310719309a16a59f8f7b" + static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" @@ -5689,10 +6139,20 @@ stream-shift@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" +stream-to-observable@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/stream-to-observable/-/stream-to-observable-0.2.0.tgz#59d6ea393d87c2c0ddac10aa0d561bc6ba6f0e10" + dependencies: + any-observable "^0.2.0" + strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" +string-argv@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.0.2.tgz#dac30408690c21f3c3630a3ff3a05877bdcbd736" + string-length@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" @@ -5721,6 +6181,14 @@ string_decoder@^1.0.0, string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" +stringify-object@^3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.2.2.tgz#9853052e5a88fb605a44cd27445aa257ad7ffbcd" + dependencies: + get-own-enumerable-property-symbols "^2.0.1" + is-obj "^1.0.1" + is-regexp "^1.0.0" + stringstream@~0.0.4: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" @@ -5737,7 +6205,7 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-bom@3.0.0: +strip-bom@3.0.0, strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -5796,6 +6264,14 @@ svgo@^0.7.0: sax "~1.2.1" whet.extend "~0.9.9" +symbol-observable@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" + +symbol-observable@^0.2.2: + version "0.2.4" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-0.2.4.tgz#95a83db26186d6af7e7a18dbd9760a2f86d08f40" + symbol-tree@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" @@ -6266,7 +6742,7 @@ which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" -which@^1.1.1, which@^1.2.12, which@^1.2.9, which@^1.3.0: +which@^1.1.1, which@^1.2.10, which@^1.2.12, which@^1.2.9, which@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" dependencies: From 0933c0c5fcb3051f8d35a1a9a52610f501423f4f Mon Sep 17 00:00:00 2001 From: Ryan Tsao Date: Thu, 31 May 2018 16:53:11 -0700 Subject: [PATCH 029/310] Update StatsTestCases snapshots --- .../__snapshots__/StatsTestCases.test.js.snap | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index cdd63b243ca..ac4e4fdb409 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -8,7 +8,7 @@ Child fitting: Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 9ac13fb7087e9ff1b93e.js 1.05 KiB 0 [emitted] - f2e891598128a57b072c.js 11 KiB 1 [emitted] + f2e891598128a57b072c.js 11.2 KiB 1 [emitted] d1ba53816ff760e185b0.js 1.94 KiB 2 [emitted] 7b5b0a943e9362bc88c6.js 1.94 KiB 3 [emitted] Entrypoint main = d1ba53816ff760e185b0.js 7b5b0a943e9362bc88c6.js f2e891598128a57b072c.js @@ -34,7 +34,7 @@ Child content-change: Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 9ac13fb7087e9ff1b93e.js 1.05 KiB 0 [emitted] - f2e891598128a57b072c.js 11 KiB 1 [emitted] + f2e891598128a57b072c.js 11.2 KiB 1 [emitted] d1ba53816ff760e185b0.js 1.94 KiB 2 [emitted] 7b5b0a943e9362bc88c6.js 1.94 KiB 3 [emitted] Entrypoint main = d1ba53816ff760e185b0.js 7b5b0a943e9362bc88c6.js f2e891598128a57b072c.js @@ -71,7 +71,7 @@ d6418937dfae4b3ee922.js 1 KiB 1 [emitted] 685acdc95ff4af957f47.js 1 KiB 7 [emitted] 606f48c13070850338b1.js 1.94 KiB 8 [emitted] c5a8eae840969538f450.js 1.94 KiB 9 [emitted] -c69b2f79fdf6e98907c4.js 9.68 KiB 10 [emitted] main +c69b2f79fdf6e98907c4.js 9.88 KiB 10 [emitted] main fcdf398c8972e4dcf788.js 1.94 KiB 11 [emitted] Entrypoint main = c69b2f79fdf6e98907c4.js chunk {0} fd868baa40dab4fc30fd.js 1.76 KiB <{10}> ={1}= ={2}= ={3}= ={7}= ={9}= [recorded] aggressive splitted @@ -498,7 +498,7 @@ Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.bundle.js 152 bytes 0 [emitted] 1.bundle.js 289 bytes 1 [emitted] - bundle.js 8.27 KiB 2 [emitted] main + bundle.js 8.47 KiB 2 [emitted] main 3.bundle.js 227 bytes 3 [emitted] Entrypoint main = bundle.js chunk {0} 0.bundle.js 22 bytes <{2}> [rendered] @@ -537,7 +537,7 @@ Built at: Thu Jan 01 1970 00:00:00 GMT 0.bundle.js 433 bytes 0 [emitted] 1.bundle.js 297 bytes 1 [emitted] 2.bundle.js 588 bytes 2 [emitted] - bundle.js 8.65 KiB main [emitted] main + bundle.js 8.85 KiB main [emitted] main Entrypoint main = bundle.js chunk {main} bundle.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] > ./index main @@ -985,7 +985,7 @@ Built at: Thu Jan 01 1970 00:00:00 GMT 0.js 305 bytes 0 [emitted] 1.js 314 bytes 1 [emitted] 2.js 308 bytes 2 [emitted] -entry.js 9.06 KiB 3 [emitted] entry +entry.js 9.27 KiB 3 [emitted] entry Entrypoint entry = entry.js [0] ./templates/bar.js 38 bytes {0} [optional] [built] [1] ./templates/baz.js 38 bytes {1} [optional] [built] @@ -1000,7 +1000,7 @@ Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.js 149 bytes 0 [emitted] -entry.js 8.51 KiB 1 [emitted] entry +entry.js 8.71 KiB 1 [emitted] entry Entrypoint entry = entry.js [0] ./modules/b.js 22 bytes {0} [built] [1] ./entry.js 120 bytes {1} [built] @@ -1029,7 +1029,7 @@ Child 2 chunks: Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.bundle.js 632 bytes 0 [emitted] - bundle.js 8.26 KiB 1 [emitted] main + bundle.js 8.47 KiB 1 [emitted] main Entrypoint main = bundle.js chunk {0} 0.bundle.js 118 bytes <{0}> <{1}> >{0}< [rendered] [0] ./d.js 22 bytes {0} [built] @@ -1046,7 +1046,7 @@ Child 3 chunks: Asset Size Chunks Chunk Names 0.bundle.js 494 bytes 0 [emitted] 1.bundle.js 245 bytes 1 [emitted] - bundle.js 8.26 KiB 2 [emitted] main + bundle.js 8.47 KiB 2 [emitted] main Entrypoint main = bundle.js chunk {0} 0.bundle.js 74 bytes <{0}> <{2}> >{0}< >{1}< [rendered] [0] ./d.js 22 bytes {0} [built] @@ -1065,7 +1065,7 @@ Child 4 chunks: 0.bundle.js 236 bytes 0 [emitted] 1.bundle.js 245 bytes 1 [emitted] 2.bundle.js 323 bytes 2 [emitted] - bundle.js 8.26 KiB 3 [emitted] main + bundle.js 8.47 KiB 3 [emitted] main Entrypoint main = bundle.js chunk {0} 0.bundle.js 44 bytes <{2}> <{3}> [rendered] [0] ./d.js 22 bytes {0} [built] @@ -1157,9 +1157,9 @@ exports[`StatsTestCases should print correct stats for module-deduplication 1`] 3.js 661 bytes 3 [emitted] 4.js 661 bytes 4 [emitted] 5.js 661 bytes 5 [emitted] -e1.js 9.4 KiB 6 [emitted] e1 -e2.js 9.43 KiB 7 [emitted] e2 -e3.js 9.45 KiB 8 [emitted] e3 +e1.js 9.61 KiB 6 [emitted] e1 +e2.js 9.63 KiB 7 [emitted] e2 +e3.js 9.65 KiB 8 [emitted] e3 Entrypoint e1 = e1.js Entrypoint e2 = e2.js Entrypoint e3 = e3.js @@ -1203,9 +1203,9 @@ exports[`StatsTestCases should print correct stats for module-deduplication-name async3.js 818 bytes 0 [emitted] async3 async1.js 818 bytes 1 [emitted] async1 async2.js 818 bytes 2 [emitted] async2 - e1.js 9.29 KiB 3 [emitted] e1 - e2.js 9.31 KiB 4 [emitted] e2 - e3.js 9.33 KiB 5 [emitted] e3 + e1.js 9.5 KiB 3 [emitted] e1 + e2.js 9.52 KiB 4 [emitted] e2 + e3.js 9.54 KiB 5 [emitted] e3 Entrypoint e1 = e1.js Entrypoint e2 = e2.js Entrypoint e3 = e3.js @@ -1337,7 +1337,7 @@ Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names chunk-containing-__a_js.js 313 bytes chunk-containing-__a_js [emitted] chunk-containing-__b_js.js 173 bytes chunk-containing-__b_js [emitted] - entry.js 8.17 KiB entry [emitted] entry + entry.js 8.37 KiB entry [emitted] entry Entrypoint entry = entry.js [0] ./modules/b.js 22 bytes {chunk-containing-__b_js} [built] [1] ./modules/a.js 37 bytes {chunk-containing-__a_js} [built] @@ -1375,7 +1375,7 @@ Built at: Thu Jan 01 1970 00:00:00 GMT ab.js 183 bytes 1 [emitted] ab abd.js 277 bytes 2, 1 [emitted] abd cir2.js 299 bytes 3 [emitted] cir2 - main.js 9.07 KiB 4 [emitted] main + main.js 9.27 KiB 4 [emitted] main cir2 from cir1.js 359 bytes 5, 3 [emitted] cir2 from cir1 chunk.js 190 bytes 6, 7 [emitted] chunk ac in ab.js 130 bytes 7 [emitted] ac in ab @@ -1672,7 +1672,7 @@ exports[`StatsTestCases should print correct stats for prefetch 1`] = ` normal.js 130 bytes 1 [emitted] normal prefetched2.js 127 bytes 2 [emitted] prefetched2 prefetched3.js 130 bytes 3 [emitted] prefetched3 - main.js 9.73 KiB 4 [emitted] main + main.js 9.93 KiB 4 [emitted] main inner.js 136 bytes 5 [emitted] inner inner2.js 201 bytes 6 [emitted] inner2 Entrypoint main = main.js (prefetch: prefetched2.js prefetched.js prefetched3.js) @@ -1705,7 +1705,7 @@ exports[`StatsTestCases should print correct stats for preload 1`] = ` normal.js 130 bytes 1 [emitted] normal preloaded2.js 127 bytes 2 [emitted] preloaded2 preloaded3.js 130 bytes 3 [emitted] preloaded3 - main.js 9.85 KiB 4 [emitted] main + main.js 10 KiB 4 [emitted] main inner.js 136 bytes 5 [emitted] inner inner2.js 201 bytes 6 [emitted] inner2 Entrypoint main = main.js (preload: preloaded2.js preloaded.js preloaded3.js) @@ -1725,7 +1725,7 @@ Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.js 152 bytes 0 [emitted] 1.js 289 bytes 1 [emitted] -main.js 8.28 KiB 2 [emitted] main +main.js 8.48 KiB 2 [emitted] main 3.js 227 bytes 3 [emitted] Entrypoint main = main.js chunk {0} 0.js 22 bytes <{2}> [rendered] @@ -1784,7 +1784,7 @@ Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.js 152 bytes 0 [emitted] 1.js 289 bytes 1 [emitted] -main.js 8.28 KiB 2 [emitted] main +main.js 8.48 KiB 2 [emitted] main 3.js 227 bytes 3 [emitted] Entrypoint main = main.js [0] ./d.js 22 bytes {3} [built] @@ -1862,7 +1862,7 @@ Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.js 152 bytes 0 [emitted] 1.js 289 bytes 1 [emitted] -main.js 8.28 KiB 2 [emitted] main +main.js 8.48 KiB 2 [emitted] main 3.js 227 bytes 3 [emitted] Entrypoint main = main.js chunk {0} 0.js 22 bytes <{2}> [rendered] @@ -1953,7 +1953,7 @@ exports[`StatsTestCases should print correct stats for runtime-chunk-integration Asset Size Chunks Chunk Names 0.js 719 bytes 0 [emitted] main1.js 542 bytes 1 [emitted] main1 - runtime.js 8.73 KiB 2 [emitted] runtime + runtime.js 8.94 KiB 2 [emitted] runtime Entrypoint main1 = runtime.js main1.js [0] ./b.js 20 bytes {0} [built] [1] ./c.js 20 bytes {0} [built] @@ -1962,7 +1962,7 @@ exports[`StatsTestCases should print correct stats for runtime-chunk-integration Child manifest is named entry: Asset Size Chunks Chunk Names 0.js 719 bytes 0 [emitted] - manifest.js 9.04 KiB 1 [emitted] manifest + manifest.js 9.24 KiB 1 [emitted] manifest main1.js 542 bytes 2 [emitted] main1 Entrypoint main1 = manifest.js main1.js Entrypoint manifest = manifest.js @@ -2068,7 +2068,7 @@ Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.js 481 bytes 0 [emitted] -main.js 9.31 KiB 1 [emitted] main +main.js 9.51 KiB 1 [emitted] main Entrypoint main = main.js [0] ./components/src/CompAB/utils.js 97 bytes {1} [built] harmony side effect evaluation ./utils [1] ./main.js + 1 modules 1:0-30 From 1d39cce941d4a35d56d92f15a9dfa2e94e4a9266 Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Tue, 5 Jun 2018 21:11:24 -0700 Subject: [PATCH 030/310] Type SortableSet --- .eslintrc.js | 3 ++- lib/Chunk.js | 23 ++++++++--------- lib/ChunkGroup.js | 8 +++--- lib/Module.js | 2 +- lib/util/SortableSet.js | 57 +++++++++++++++++++++++++++++++---------- package.json | 2 +- yarn.lock | 6 ++--- 7 files changed, 66 insertions(+), 35 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index a70d08eb0fb..98a12c59d33 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -41,7 +41,8 @@ module.exports = { "preferType": { "*": "any" }, - "requireReturnType": true + "requireReturnType": true, + requireReturnDescription: false }], "node/no-unsupported-features": "error", "node/no-deprecated-api": "error", diff --git a/lib/Chunk.js b/lib/Chunk.js index 14d61861260..7088c3ab270 100644 --- a/lib/Chunk.js +++ b/lib/Chunk.js @@ -18,6 +18,10 @@ const ERR_CHUNK_INITIAL = /** @typedef {import("./ModuleReason.js")} ModuleReason */ /** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {(a: Module, b: Module) => -1|0|1} ModuleSortPredicate */ +/** @typedef {(m: Module) => boolean} ModuleFilterPredicate */ +/** @typedef {(c: Chunk) => boolean} ChunkFilterPredicate */ + /** * @typedef {Object} Identifiable an object who contains an identifier function property * @property {() => string} identifier the resource or unique identifier of something @@ -25,14 +29,11 @@ const ERR_CHUNK_INITIAL = /** * @typedef {Object} WithId an object who has an id property - * @property {string} id the id of the object + * @property {string | number} id the id of the object */ -/** @typedef {(a: Module, b: Module) => -1|0|1} ModuleSortPredicate */ -/** @typedef {(m: Module) => boolean} ModuleFilterPredicate */ -/** @typedef {(c: Chunk) => boolean} ChunkFilterPredicate */ - /** + * Compare two objects based on their ids for sorting * @param {WithId} a object that contains an ID property * @param {WithId} b object that contains an ID property * @returns {-1|0|1} sort value @@ -44,9 +45,9 @@ const sortById = (a, b) => { }; /** - * - * @param {Identifiable} a first object with ident fn - * @param {Identifiable} b second object with ident fn + * Compare two Identifiables , based on their ids for sorting + * @param {Module} a first object with ident fn + * @param {Module} b second object with ident fn * @returns {-1|0|1} The order number of the sort */ const sortByIdentifier = (a, b) => { @@ -108,11 +109,9 @@ class Chunk { this.preventIntegration = false; /** @type {Module=} */ this.entryModule = undefined; - //TODO make these typed generics for Module[] and ChunkGroup[] and their sort being (T, T): => 1,-1,0 - //See https://github.com/webpack/webpack/pull/7046 - /** @private */ + /** @private @type {SortableSet} */ this._modules = new SortableSet(undefined, sortByIdentifier); - /** @private */ + /** @private @type {SortableSet} */ this._groups = new SortableSet(undefined, sortById); /** @type {Source[]} */ this.files = []; diff --git a/lib/ChunkGroup.js b/lib/ChunkGroup.js index 7cb72079df5..1e52943ed18 100644 --- a/lib/ChunkGroup.js +++ b/lib/ChunkGroup.js @@ -26,8 +26,8 @@ const getArray = set => Array.from(set); /** * A convenience method used to sort chunks based on their id's - * @param {HasId} a first sorting comparitor - * @param {HasId} b second sorting comparitor + * @param {HasId} a first sorting comparator + * @param {HasId} b second sorting comparator * @returns {1|0|-1} a sorting index to determine order */ const sortById = (a, b) => { @@ -37,8 +37,8 @@ const sortById = (a, b) => { }; /** - * @param {OriginRecord} a the first comparitor in sort - * @param {OriginRecord} b the second comparitor in sort + * @param {OriginRecord} a the first comparator in sort + * @param {OriginRecord} b the second comparator in sort * @returns {1|-1|0} returns sorting order as index */ const sortOrigin = (a, b) => { diff --git a/lib/Module.js b/lib/Module.js index 258dd2fcecb..5c95cbbf182 100644 --- a/lib/Module.js +++ b/lib/Module.js @@ -65,7 +65,7 @@ class Module extends DependenciesBlock { // Graph (per Compilation) /** @type {ModuleReason[]} */ this.reasons = []; - /** @type {SortableSet} */ + /** @type {SortableSet} */ this._chunks = new SortableSet(undefined, sortById); // Info from Compilation (per Compilation) diff --git a/lib/util/SortableSet.js b/lib/util/SortableSet.js index 6bc49a60db6..5dbbe41a72f 100644 --- a/lib/util/SortableSet.js +++ b/lib/util/SortableSet.js @@ -1,19 +1,32 @@ "use strict"; -//TODO: Make this a generic type -//https://github.com/Microsoft/TypeScript/issues/23385 -//https://github.com/Microsoft/TypeScript/issues/23384 + +/** + * A subset of Set that offers sorting functionality + * @template T item type in set + */ class SortableSet extends Set { + // eslint-disable-next-line valid-jsdoc + /** + * Create a new sortable set + * @param {Array=} initialIterable The initial iterable value + * @param {SortFunction=} defaultSort Default sorting function + * @typedef {(a: T, b: T) => number} SortFunction + */ constructor(initialIterable, defaultSort) { super(initialIterable); + /** @private @type {(a: T, b: T) => number}} */ this._sortFn = defaultSort; + /** @private @type {(a: T, b: T) => number} | null} */ this._lastActiveSortFn = null; + /** @private @type {Map | undefined} */ this._cache = undefined; + /** @private @type {Map | undefined} */ this._cacheOrderIndependent = undefined; } /** - * @param {TODO} value - value to add to set - * @returns {this} - returns itself + * @param {T} value value to add to set + * @returns {this} returns itself */ add(value) { this._lastActiveSortFn = null; @@ -23,19 +36,31 @@ class SortableSet extends Set { return this; } + /** + * @param {T} value value to delete + * @returns {boolean} true if value existed in set, false otherwise + */ delete(value) { this._invalidateCache(); this._invalidateOrderedCache(); return super.delete(value); } + /** + * @returns {void} + */ clear() { this._invalidateCache(); this._invalidateOrderedCache(); return super.clear(); } - sortWith(/** @type {(a: TODO, b: TODO) => number} */ sortFn) { + /** + * Sort with a comparer function + * @param {SortFunction} sortFn Sorting comparer function + * @returns {void} + */ + sortWith(sortFn) { if (this.size <= 1 || sortFn === this._lastActiveSortFn) { // already sorted - nothing to do return; @@ -50,16 +75,14 @@ class SortableSet extends Set { this._invalidateCache(); } - /** - * @returns {void} - */ sort() { this.sortWith(this._sortFn); } + // eslint-disable-next-line valid-jsdoc /** - * @param {Function} fn - function to calculate value - * @returns {TODO} - returns result of fn(this), cached until set changes + * @param {(instance: SortableSet) => TODO} fn function to calculate value + * @returns {TODO} returns result of fn(this), cached until set changes */ getFromCache(fn) { if (this._cache === undefined) { @@ -76,8 +99,8 @@ class SortableSet extends Set { } /** - * @param {Function} fn - function to calculate value - * @returns {TODO} - returns result of fn(this), cached until set changes + * @param {Function} fn function to calculate value + * @returns {any} returns result of fn(this), cached until set changes */ getFromUnorderedCache(fn) { if (this._cacheOrderIndependent === undefined) { @@ -93,12 +116,20 @@ class SortableSet extends Set { return newData; } + /** + * @private + * @returns {void} + */ _invalidateCache() { if (this._cache !== undefined) { this._cache.clear(); } } + /** + * @private + * @returns {void} + */ _invalidateOrderedCache() { if (this._cacheOrderIndependent !== undefined) { this._cacheOrderIndependent.clear(); diff --git a/package.json b/package.json index 101a501c698..de3845ed565 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "script-loader": "~0.7.0", "simple-git": "^1.65.0", "style-loader": "^0.19.1", - "typescript": "^2.9.0-dev.20180518", + "typescript": "^2.9.1", "url-loader": "^0.6.2", "val-loader": "^1.0.2", "vm-browserify": "~0.0.0", diff --git a/yarn.lock b/yarn.lock index a6580f4704b..0234675fb09 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5984,9 +5984,9 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -typescript@^2.9.0-dev.20180518: - version "2.9.0-dev.20180518" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.0-dev.20180518.tgz#7c709cb5d59e60a5e346cc5856277fd7b8ced68c" +typescript@^2.9.1: + version "2.9.1" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.1.tgz#fdb19d2c67a15d11995fd15640e373e09ab09961" ua-parser-js@^0.7.9: version "0.7.17" From 39d0bcb5951b4ceabb177c8ac2fafab879678fd7 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 7 Jun 2018 14:22:35 +0200 Subject: [PATCH 031/310] spacings --- lib/WebpackOptionsApply.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/WebpackOptionsApply.js b/lib/WebpackOptionsApply.js index 17562c3c792..f22ca8c3074 100644 --- a/lib/WebpackOptionsApply.js +++ b/lib/WebpackOptionsApply.js @@ -354,10 +354,10 @@ class WebpackOptionsApply extends OptionsApply { } if (options.optimization.namedModules) { new NamedModulesPlugin().apply(compiler); - } + } if (options.optimization.hashedModuleIds) { new HashedModuleIdsPlugin().apply(compiler); - } + } if (options.optimization.namedChunks) { new NamedChunksPlugin().apply(compiler); } From a55bfc6d98d647e7ef77cc40636cc9b5203a60e1 Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Sat, 9 Jun 2018 11:14:48 -0700 Subject: [PATCH 032/310] undo eslint config changes --- .eslintrc.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 98a12c59d33..a70d08eb0fb 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -41,8 +41,7 @@ module.exports = { "preferType": { "*": "any" }, - "requireReturnType": true, - requireReturnDescription: false + "requireReturnType": true }], "node/no-unsupported-features": "error", "node/no-deprecated-api": "error", From 0874383dcb9c60cdf2b76f5378a4c5deb3158ab0 Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Sat, 9 Jun 2018 19:37:09 -0700 Subject: [PATCH 033/310] Fix lint --- lib/DefinePlugin.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/DefinePlugin.js b/lib/DefinePlugin.js index 35a610722cd..e9c0a4be837 100644 --- a/lib/DefinePlugin.js +++ b/lib/DefinePlugin.js @@ -63,6 +63,7 @@ class DefinePlugin { /** * Apply the plugin * @param {TODO} compiler Webpack Compiler + * @returns {void} */ apply(compiler) { const definitions = this.definitions; @@ -78,8 +79,15 @@ class DefinePlugin { /** * Handler * @param {TODO} parser Parser + * @returns {void} */ const handler = parser => { + /** + * Walk definitions + * @param {TODO} definitions Definitions map + * @param {string} prefix Prefix string + * @returns {void} + */ const walkDefinitions = (definitions, prefix) => { Object.keys(definitions).forEach(key => { const code = definitions[key]; @@ -101,6 +109,7 @@ class DefinePlugin { * Apply define key * @param {string} prefix Prefix * @param {string} key Key + * @returns {void} */ const applyDefineKey = (prefix, key) => { const splittedKey = key.split("."); @@ -115,7 +124,8 @@ class DefinePlugin { /** * Apply Code * @param {string} key Key - * @param {*} code Code + * @param {TODO} code Code + * @returns {void} */ const applyDefine = (key, code) => { const isTypeof = /^typeof\s+/.test(key); @@ -188,6 +198,7 @@ class DefinePlugin { * Apply Object * @param {string} key Key * @param {Object} obj Object + * @returns {void} */ const applyObjectDefine = (key, obj) => { const code = stringifyObj(obj); From 1943804f22ee58a91f2dbb2959fbb0a00b9514c9 Mon Sep 17 00:00:00 2001 From: Ryan Tsao Date: Tue, 12 Jun 2018 14:18:34 -0700 Subject: [PATCH 034/310] Fix tests --- .../__snapshots__/StatsTestCases.test.js.snap | 2742 +++++++++++++++++ .../configCases/web/prefetch-preload/index.js | 4 +- 2 files changed, 2745 insertions(+), 1 deletion(-) create mode 100644 test/__snapshots__/StatsTestCases.test.js.snap diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap new file mode 100644 index 00000000000..a43663f0009 --- /dev/null +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -0,0 +1,2742 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`StatsTestCases should print correct stats for aggressive-splitting-entry 1`] = ` +"Hash: 4aa5beb3bbe987f505a74aa5beb3bbe987f505a7 +Child fitting: + Hash: 4aa5beb3bbe987f505a7 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + 9ac13fb7087e9ff1b93e.js 1.05 KiB 0 [emitted] + 2b4c8b62a524452d2de1.js 11.3 KiB 1 [emitted] + d1ba53816ff760e185b0.js 1.94 KiB 2 [emitted] + 7b5b0a943e9362bc88c6.js 1.94 KiB 3 [emitted] + Entrypoint main = d1ba53816ff760e185b0.js 7b5b0a943e9362bc88c6.js 2b4c8b62a524452d2de1.js + chunk {0} 9ac13fb7087e9ff1b93e.js 916 bytes <{1}> <{2}> <{3}> + > ./g [4] ./index.js 7:0-13 + [7] ./g.js 916 bytes {0} [built] + chunk {1} 2b4c8b62a524452d2de1.js 1.87 KiB ={2}= ={3}= >{0}< [entry] [rendered] + > ./index main + [3] ./e.js 899 bytes {1} [built] + [4] ./index.js 111 bytes {1} [built] + [6] ./f.js 900 bytes {1} [built] + chunk {2} d1ba53816ff760e185b0.js 1.76 KiB ={1}= ={3}= >{0}< [initial] [rendered] [recorded] aggressive splitted + > ./index main + [0] ./b.js 899 bytes {2} [built] + [5] ./a.js 899 bytes {2} [built] + chunk {3} 7b5b0a943e9362bc88c6.js 1.76 KiB ={1}= ={2}= >{0}< [initial] [rendered] [recorded] aggressive splitted + > ./index main + [1] ./c.js 899 bytes {3} [built] + [2] ./d.js 899 bytes {3} [built] +Child content-change: + Hash: 4aa5beb3bbe987f505a7 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + 9ac13fb7087e9ff1b93e.js 1.05 KiB 0 [emitted] + 2b4c8b62a524452d2de1.js 11.3 KiB 1 [emitted] + d1ba53816ff760e185b0.js 1.94 KiB 2 [emitted] + 7b5b0a943e9362bc88c6.js 1.94 KiB 3 [emitted] + Entrypoint main = d1ba53816ff760e185b0.js 7b5b0a943e9362bc88c6.js 2b4c8b62a524452d2de1.js + chunk {0} 9ac13fb7087e9ff1b93e.js 916 bytes <{1}> <{2}> <{3}> + > ./g [4] ./index.js 7:0-13 + [7] ./g.js 916 bytes {0} [built] + chunk {1} 2b4c8b62a524452d2de1.js 1.87 KiB ={2}= ={3}= >{0}< [entry] [rendered] + > ./index main + [3] ./e.js 899 bytes {1} [built] + [4] ./index.js 111 bytes {1} [built] + [6] ./f.js 900 bytes {1} [built] + chunk {2} d1ba53816ff760e185b0.js 1.76 KiB ={1}= ={3}= >{0}< [initial] [rendered] [recorded] aggressive splitted + > ./index main + [0] ./b.js 899 bytes {2} [built] + [5] ./a.js 899 bytes {2} [built] + chunk {3} 7b5b0a943e9362bc88c6.js 1.76 KiB ={1}= ={2}= >{0}< [initial] [rendered] [recorded] aggressive splitted + > ./index main + [1] ./c.js 899 bytes {3} [built] + [2] ./d.js 899 bytes {3} [built]" +`; + +exports[`StatsTestCases should print correct stats for aggressive-splitting-on-demand 1`] = ` +"Hash: 2e21ab9d4836a0caedb1 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +cf8697fa2c994f39a5d4.js 1.94 KiB 6, 7 [emitted] +fd868baa40dab4fc30fd.js 1.93 KiB 0 [emitted] +79c527bb5bf9cba1dc12.js 1.96 KiB 2 [emitted] +e9d82e81fefd7353e8df.js 1.94 KiB 3, 1 [emitted] +ae76098eeb55b9c448f2.js 1.01 KiB 4 [emitted] +05d92aaacfbffa4b7e56.js 1.94 KiB 5 [emitted] +d6418937dfae4b3ee922.js 1 KiB 1 [emitted] +685acdc95ff4af957f47.js 1 KiB 7 [emitted] +606f48c13070850338b1.js 1.94 KiB 8 [emitted] +c5a8eae840969538f450.js 1.94 KiB 9 [emitted] +7bf22146f3e40919bde5.js 9.9 KiB 10 [emitted] main +fcdf398c8972e4dcf788.js 1.94 KiB 11 [emitted] +Entrypoint main = 7bf22146f3e40919bde5.js +chunk {0} fd868baa40dab4fc30fd.js 1.76 KiB <{10}> ={1}= ={2}= ={3}= ={7}= ={9}= [recorded] aggressive splitted + > ./b ./d ./e ./f ./g [11] ./index.js 5:0-44 + > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 + [0] ./b.js 899 bytes {0} {5} [built] + [1] ./d.js 899 bytes {0} {8} [built] +chunk {1} d6418937dfae4b3ee922.js 899 bytes <{10}> ={0}= ={2}= ={8}= + > ./c ./d ./e [11] ./index.js 3:0-30 + > ./b ./d ./e ./f ./g [11] ./index.js 5:0-44 + [2] ./e.js 899 bytes {1} {3} [built] +chunk {2} 79c527bb5bf9cba1dc12.js 1.76 KiB <{10}> ={0}= ={1}= ={11}= ={3}= ={6}= ={7}= ={9}= [recorded] aggressive splitted + > ./f ./g ./h ./i ./j ./k [11] ./index.js 4:0-51 + > ./b ./d ./e ./f ./g [11] ./index.js 5:0-44 + > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 + [3] ./f.js 899 bytes {2} [built] + [4] ./g.js 901 bytes {2} [built] +chunk {3} e9d82e81fefd7353e8df.js 1.76 KiB <{10}> ={0}= ={2}= ={7}= ={9}= [rendered] [recorded] aggressive splitted + > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 + [2] ./e.js 899 bytes {1} {3} [built] + [6] ./h.js 899 bytes {3} {11} [built] +chunk {4} ae76098eeb55b9c448f2.js 899 bytes <{10}> + > ./a [11] ./index.js 1:0-16 + [10] ./a.js 899 bytes {4} [built] +chunk {5} 05d92aaacfbffa4b7e56.js 1.76 KiB <{10}> + > ./b ./c [11] ./index.js 2:0-23 + [0] ./b.js 899 bytes {0} {5} [built] + [5] ./c.js 899 bytes {5} {8} [built] +chunk {6} cf8697fa2c994f39a5d4.js 1.76 KiB <{10}> ={11}= ={2}= + > ./f ./g ./h ./i ./j ./k [11] ./index.js 4:0-51 + [8] ./j.js 901 bytes {6} {9} [built] + [9] ./k.js 899 bytes {6} {7} [built] +chunk {7} 685acdc95ff4af957f47.js 899 bytes <{10}> ={0}= ={2}= ={3}= ={9}= + > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 + [9] ./k.js 899 bytes {6} {7} [built] +chunk {8} 606f48c13070850338b1.js 1.76 KiB <{10}> ={1}= [recorded] aggressive splitted + > ./c ./d ./e [11] ./index.js 3:0-30 + [1] ./d.js 899 bytes {0} {8} [built] + [5] ./c.js 899 bytes {5} {8} [built] +chunk {9} c5a8eae840969538f450.js 1.76 KiB <{10}> ={0}= ={2}= ={3}= ={7}= [rendered] [recorded] aggressive splitted + > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 + [7] ./i.js 899 bytes {9} {11} [built] + [8] ./j.js 901 bytes {6} {9} [built] +chunk {10} 7bf22146f3e40919bde5.js (main) 248 bytes >{0}< >{1}< >{11}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< >{8}< >{9}< [entry] [rendered] + > ./index main + [11] ./index.js 248 bytes {10} [built] +chunk {11} fcdf398c8972e4dcf788.js 1.76 KiB <{10}> ={2}= ={6}= [rendered] [recorded] aggressive splitted + > ./f ./g ./h ./i ./j ./k [11] ./index.js 4:0-51 + [6] ./h.js 899 bytes {3} {11} [built] + [7] ./i.js 899 bytes {9} {11} [built]" +`; + +exports[`StatsTestCases should print correct stats for async-commons-chunk 1`] = ` +"Entrypoint main = main.js +chunk {0} 0.js 21 bytes <{3}> ={1}= ={2}= [rendered] reused as split chunk (cache group: default) + > [3] ./index.js 17:1-21:3 + > [3] ./index.js 2:1-5:3 + > ./a ./b [3] ./index.js 9:1-13:3 + [0] ./a.js 21 bytes {0} [built] +chunk {1} 1.js 21 bytes <{3}> ={0}= [rendered] + > ./a ./b [3] ./index.js 9:1-13:3 + [1] ./b.js 21 bytes {1} [built] +chunk {2} 2.js 21 bytes <{3}> ={0}= [rendered] + > [3] ./index.js 17:1-21:3 + [2] ./c.js 21 bytes {2} [built] +chunk {3} main.js (main) 515 bytes >{0}< >{1}< >{2}< [entry] [rendered] + > ./ main + [3] ./index.js 515 bytes {3} [built]" +`; + +exports[`StatsTestCases should print correct stats for async-commons-chunk-auto 1`] = ` +"Child disabled: + Entrypoint main = disabled/main.js + Entrypoint a = disabled/a.js + Entrypoint b = disabled/b.js + Entrypoint c = disabled/c.js + chunk {0} disabled/async-g.js (async-g) 54 bytes <{1}> <{5}> [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [2] ./f.js 20 bytes {0} {2} {3} {6} {7} [built] + [8] ./g.js 34 bytes {0} [built] + chunk {1} disabled/async-a.js (async-a) 216 bytes <{4}> >{0}< [rendered] + > ./a [7] ./index.js 1:0-47 + [0] ./d.js 20 bytes {1} {2} {3} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {1} {2} {3} {5} {6} {7} [built] + [3] ./node_modules/y.js 20 bytes {1} {2} {5} {6} [built] + [5] ./a.js + 1 modules 156 bytes {1} {5} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {2} disabled/async-b.js (async-b) 152 bytes <{4}> [rendered] + > ./b [7] ./index.js 2:0-47 + [0] ./d.js 20 bytes {1} {2} {3} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {1} {2} {3} {5} {6} {7} [built] + [2] ./f.js 20 bytes {0} {2} {3} {6} {7} [built] + [3] ./node_modules/y.js 20 bytes {1} {2} {5} {6} [built] + [4] ./b.js 72 bytes {2} {6} [built] + chunk {3} disabled/async-c.js (async-c) 167 bytes <{4}> [rendered] + > ./c [7] ./index.js 3:0-47 + [0] ./d.js 20 bytes {1} {2} {3} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {1} {2} {3} {5} {6} {7} [built] + [2] ./f.js 20 bytes {0} {2} {3} {6} {7} [built] + [6] ./c.js + 1 modules 107 bytes {3} {7} [built] + | ./c.js 72 bytes [built] + | ./node_modules/z.js 20 bytes [built] + chunk {4} disabled/main.js (main) 147 bytes >{1}< >{2}< >{3}< [entry] [rendered] + > ./ main + [7] ./index.js 147 bytes {4} [built] + chunk {5} disabled/a.js (a) 216 bytes >{0}< [entry] [rendered] + > ./a a + [0] ./d.js 20 bytes {1} {2} {3} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {1} {2} {3} {5} {6} {7} [built] + [3] ./node_modules/y.js 20 bytes {1} {2} {5} {6} [built] + [5] ./a.js + 1 modules 156 bytes {1} {5} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {6} disabled/b.js (b) 152 bytes [entry] [rendered] + > ./b b + [0] ./d.js 20 bytes {1} {2} {3} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {1} {2} {3} {5} {6} {7} [built] + [2] ./f.js 20 bytes {0} {2} {3} {6} {7} [built] + [3] ./node_modules/y.js 20 bytes {1} {2} {5} {6} [built] + [4] ./b.js 72 bytes {2} {6} [built] + chunk {7} disabled/c.js (c) 167 bytes [entry] [rendered] + > ./c c + [0] ./d.js 20 bytes {1} {2} {3} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {1} {2} {3} {5} {6} {7} [built] + [2] ./f.js 20 bytes {0} {2} {3} {6} {7} [built] + [6] ./c.js + 1 modules 107 bytes {3} {7} [built] + | ./c.js 72 bytes [built] + | ./node_modules/z.js 20 bytes [built] +Child default: + Entrypoint main = default/main.js + Entrypoint a = default/a.js + Entrypoint b = default/b.js + Entrypoint c = default/c.js + chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{9}> ={1}= ={2}= ={3}= ={5}= ={6}= ={7}= ={8}= >{2}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] + chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={5}= ={6}= ={7}= ={8}= >{2}< >{4}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{5}> <{9}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + > ./g [] 6:0-47 + > ./g [] 6:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [2] ./f.js 20 bytes {2} {11} {12} [built] + chunk {3} default/vendors~async-a~async-b.js (vendors~async-a~async-b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={5}= ={6}= >{2}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] + chunk {4} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{5}> ={2}= [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [9] ./g.js 34 bytes {4} [built] + chunk {5} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{4}< [rendered] + > ./a [8] ./index.js 1:0-47 + [7] ./a.js + 1 modules 156 bytes {5} {10} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {6} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] + > ./b [8] ./index.js 2:0-47 + [5] ./b.js 72 bytes {6} {11} [built] + chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={8}= [rendered] + > ./c [8] ./index.js 3:0-47 + [6] ./c.js 72 bytes {7} {12} [built] + chunk {8} default/vendors~async-c.js (vendors~async-c) 20 bytes <{9}> ={0}= ={1}= ={2}= ={7}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c) + > ./c [8] ./index.js 3:0-47 + [4] ./node_modules/z.js 20 bytes {8} {12} [built] + chunk {9} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{5}< >{6}< >{7}< >{8}< [entry] [rendered] + > ./ main + [8] ./index.js 147 bytes {9} [built] + chunk {10} default/a.js (a) 216 bytes >{2}< >{4}< [entry] [rendered] + > ./a a + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] + [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] + [7] ./a.js + 1 modules 156 bytes {5} {10} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {11} default/b.js (b) 152 bytes [entry] [rendered] + > ./b b + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] + [2] ./f.js 20 bytes {2} {11} {12} [built] + [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] + [5] ./b.js 72 bytes {6} {11} [built] + chunk {12} default/c.js (c) 152 bytes [entry] [rendered] + > ./c c + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] + [2] ./f.js 20 bytes {2} {11} {12} [built] + [4] ./node_modules/z.js 20 bytes {8} {12} [built] + [6] ./c.js 72 bytes {7} {12} [built] +Child vendors: + Entrypoint main = vendors/main.js + Entrypoint a = vendors/vendors.js vendors/a.js + Entrypoint b = vendors/vendors.js vendors/b.js + Entrypoint c = vendors/vendors.js vendors/c.js + chunk {0} vendors/async-g.js (async-g) 54 bytes <{1}> <{4}> <{6}> [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [2] ./f.js 20 bytes {0} {2} {3} {7} {8} [built] + [9] ./g.js 34 bytes {0} [built] + chunk {1} vendors/async-a.js (async-a) 216 bytes <{5}> >{0}< [rendered] + > ./a [8] ./index.js 1:0-47 + [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] + [1] ./node_modules/x.js 20 bytes {1} {2} {3} {4} [built] + [3] ./node_modules/y.js 20 bytes {1} {2} {4} [built] + [7] ./a.js + 1 modules 156 bytes {1} {6} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {2} vendors/async-b.js (async-b) 152 bytes <{5}> [rendered] + > ./b [8] ./index.js 2:0-47 + [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] + [1] ./node_modules/x.js 20 bytes {1} {2} {3} {4} [built] + [2] ./f.js 20 bytes {0} {2} {3} {7} {8} [built] + [3] ./node_modules/y.js 20 bytes {1} {2} {4} [built] + [5] ./b.js 72 bytes {2} {7} [built] + chunk {3} vendors/async-c.js (async-c) 152 bytes <{5}> [rendered] + > ./c [8] ./index.js 3:0-47 + [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] + [1] ./node_modules/x.js 20 bytes {1} {2} {3} {4} [built] + [2] ./f.js 20 bytes {0} {2} {3} {7} {8} [built] + [4] ./node_modules/z.js 20 bytes {3} {4} [built] + [6] ./c.js 72 bytes {3} {8} [built] + chunk {4} vendors/vendors.js (vendors) 60 bytes ={6}= ={7}= ={8}= >{0}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) + > ./a a + > ./b b + > ./c c + [1] ./node_modules/x.js 20 bytes {1} {2} {3} {4} [built] + [3] ./node_modules/y.js 20 bytes {1} {2} {4} [built] + [4] ./node_modules/z.js 20 bytes {3} {4} [built] + chunk {5} vendors/main.js (main) 147 bytes >{1}< >{2}< >{3}< [entry] [rendered] + > ./ main + [8] ./index.js 147 bytes {5} [built] + chunk {6} vendors/a.js (a) 176 bytes ={4}= >{0}< [entry] [rendered] + > ./a a + [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] + [7] ./a.js + 1 modules 156 bytes {1} {6} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {7} vendors/b.js (b) 112 bytes ={4}= [entry] [rendered] + > ./b b + [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] + [2] ./f.js 20 bytes {0} {2} {3} {7} {8} [built] + [5] ./b.js 72 bytes {2} {7} [built] + chunk {8} vendors/c.js (c) 112 bytes ={4}= [entry] [rendered] + > ./c c + [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] + [2] ./f.js 20 bytes {0} {2} {3} {7} {8} [built] + [6] ./c.js 72 bytes {3} {8} [built] +Child multiple-vendors: + Entrypoint main = multiple-vendors/main.js + Entrypoint a = multiple-vendors/libs-x.js multiple-vendors/vendors~a~async-a~async-b~b.js multiple-vendors/a.js + Entrypoint b = multiple-vendors/libs-x.js multiple-vendors/vendors~a~async-a~async-b~b.js multiple-vendors/b.js + Entrypoint c = multiple-vendors/libs-x.js multiple-vendors/vendors~async-c~c.js multiple-vendors/c.js + chunk {0} multiple-vendors/libs-x.js (libs-x) 20 bytes <{9}> ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: libs) (name: libs-x) + > ./a a + > ./b b + > ./c c + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [2] ./node_modules/x.js 20 bytes {0} [built] + chunk {1} multiple-vendors/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + chunk {2} multiple-vendors/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{6}> <{9}> ={0}= ={1}= ={3}= ={4}= ={5}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + > ./g [] 6:0-47 + > ./g [] 6:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [1] ./f.js 20 bytes {2} {11} {12} [built] + chunk {3} multiple-vendors/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={10}= ={11}= ={2}= ={6}= ={7}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) + > ./a a + > ./b b + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + [3] ./node_modules/y.js 20 bytes {3} [built] + chunk {4} multiple-vendors/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={8}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + > ./c c + > ./c [8] ./index.js 3:0-47 + [7] ./node_modules/z.js 20 bytes {4} [built] + chunk {5} multiple-vendors/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{6}> ={2}= [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [9] ./g.js 34 bytes {5} [built] + chunk {6} multiple-vendors/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{5}< [rendered] + > ./a [8] ./index.js 1:0-47 + [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {7} multiple-vendors/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] + > ./b [8] ./index.js 2:0-47 + [4] ./b.js 72 bytes {7} {11} [built] + chunk {8} multiple-vendors/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] + > ./c [8] ./index.js 3:0-47 + [5] ./c.js 72 bytes {8} {12} [built] + chunk {9} multiple-vendors/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{6}< >{7}< >{8}< [entry] [rendered] + > ./ main + [8] ./index.js 147 bytes {9} [built] + chunk {10} multiple-vendors/a.js (a) 176 bytes ={0}= ={3}= >{2}< >{5}< [entry] [rendered] + > ./a a + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {11} multiple-vendors/b.js (b) 112 bytes ={0}= ={3}= [entry] [rendered] + > ./b b + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./f.js 20 bytes {2} {11} {12} [built] + [4] ./b.js 72 bytes {7} {11} [built] + chunk {12} multiple-vendors/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] + > ./c c + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./f.js 20 bytes {2} {11} {12} [built] + [5] ./c.js 72 bytes {8} {12} [built] +Child all: + Entrypoint main = all/main.js + Entrypoint a = all/vendors~a~async-a~async-b~async-c~b~c.js all/vendors~a~async-a~async-b~b.js all/a.js + Entrypoint b = all/vendors~a~async-a~async-b~async-c~b~c.js all/vendors~a~async-a~async-b~b.js all/b.js + Entrypoint c = all/vendors~a~async-a~async-b~async-c~b~c.js all/vendors~async-c~c.js all/c.js + chunk {0} all/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) + > ./a a + > ./b b + > ./c c + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [2] ./node_modules/x.js 20 bytes {0} [built] + chunk {1} all/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + chunk {2} all/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{6}> <{9}> ={0}= ={1}= ={3}= ={4}= ={5}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + > ./g [] 6:0-47 + > ./g [] 6:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [1] ./f.js 20 bytes {2} {11} {12} [built] + chunk {3} all/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={10}= ={11}= ={2}= ={6}= ={7}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) + > ./a a + > ./b b + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + [3] ./node_modules/y.js 20 bytes {3} [built] + chunk {4} all/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={8}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + > ./c c + > ./c [8] ./index.js 3:0-47 + [7] ./node_modules/z.js 20 bytes {4} [built] + chunk {5} all/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{6}> ={2}= [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [9] ./g.js 34 bytes {5} [built] + chunk {6} all/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{5}< [rendered] + > ./a [8] ./index.js 1:0-47 + [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {7} all/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] + > ./b [8] ./index.js 2:0-47 + [4] ./b.js 72 bytes {7} {11} [built] + chunk {8} all/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] + > ./c [8] ./index.js 3:0-47 + [5] ./c.js 72 bytes {8} {12} [built] + chunk {9} all/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{6}< >{7}< >{8}< [entry] [rendered] + > ./ main + [8] ./index.js 147 bytes {9} [built] + chunk {10} all/a.js (a) 176 bytes ={0}= ={3}= >{2}< >{5}< [entry] [rendered] + > ./a a + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {11} all/b.js (b) 112 bytes ={0}= ={3}= [entry] [rendered] + > ./b b + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./f.js 20 bytes {2} {11} {12} [built] + [4] ./b.js 72 bytes {7} {11} [built] + chunk {12} all/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] + > ./c c + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./f.js 20 bytes {2} {11} {12} [built] + [5] ./c.js 72 bytes {8} {12} [built]" +`; + +exports[`StatsTestCases should print correct stats for chunk-module-id-range 1`] = ` +"Hash: 7d8eb8b4418c6ae6a262 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +main2.js 4.85 KiB 0 [emitted] main2 +main1.js 4.86 KiB 1 [emitted] main1 +Entrypoint main1 = main1.js +Entrypoint main2 = main2.js +chunk {0} main2.js (main2) 136 bytes [entry] [rendered] + > ./main2 main2 + [0] ./e.js 20 bytes {0} [built] + [1] ./f.js 20 bytes {0} [built] + [2] ./main2.js 56 bytes {0} [built] + [100] ./d.js 20 bytes {0} {1} [built] + [101] ./a.js 20 bytes {0} {1} [built] +chunk {1} main1.js (main1) 136 bytes [entry] [rendered] + > ./main1 main1 + [3] ./b.js 20 bytes {1} [built] + [4] ./main1.js 56 bytes {1} [built] + [100] ./d.js 20 bytes {0} {1} [built] + [101] ./a.js 20 bytes {0} {1} [built] + [102] ./c.js 20 bytes {1} [built]" +`; + +exports[`StatsTestCases should print correct stats for chunks 1`] = ` +"Hash: 7762656cf5adce7c4f04 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +0.bundle.js 152 bytes 0 [emitted] +1.bundle.js 289 bytes 1 [emitted] + bundle.js 8.49 KiB 2 [emitted] main +3.bundle.js 227 bytes 3 [emitted] +Entrypoint main = bundle.js +chunk {0} 0.bundle.js 22 bytes <{2}> [rendered] + > ./b [4] ./index.js 2:0-16 + [2] ./b.js 22 bytes {0} [built] + amd require ./b [4] ./index.js 2:0-16 + [4] Xms -> factory:Xms building:Xms = Xms +chunk {1} 1.bundle.js 54 bytes <{2}> >{3}< [rendered] + > ./c [4] ./index.js 3:0-16 + [3] ./c.js 54 bytes {1} [built] + amd require ./c [4] ./index.js 3:0-16 + [4] Xms -> factory:Xms building:Xms = Xms +chunk {2} bundle.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] + > ./index main + [4] ./index.js 51 bytes {2} [built] + single entry ./index main + factory:Xms building:Xms = Xms + [5] ./a.js 22 bytes {2} [built] + cjs require ./a [4] ./index.js 1:0-14 + [4] Xms -> factory:Xms building:Xms = Xms +chunk {3} 3.bundle.js 44 bytes <{1}> [rendered] + > [3] ./c.js 1:0-52 + [0] ./d.js 22 bytes {3} [built] + require.ensure item ./d [3] ./c.js 1:0-52 + [4] Xms -> [3] Xms -> factory:Xms building:Xms = Xms + [1] ./e.js 22 bytes {3} [built] + require.ensure item ./e [3] ./c.js 1:0-52 + [4] Xms -> [3] Xms -> factory:Xms building:Xms = Xms" +`; + +exports[`StatsTestCases should print correct stats for chunks-development 1`] = ` +"Hash: e9e5a35c80318dd22050 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +0.bundle.js 433 bytes 0 [emitted] +1.bundle.js 297 bytes 1 [emitted] +2.bundle.js 588 bytes 2 [emitted] + bundle.js 8.87 KiB main [emitted] main +Entrypoint main = bundle.js +chunk {main} bundle.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] + > ./index main + [./a.js] 22 bytes {main} [built] + cjs require ./a [./index.js] 1:0-14 + cjs require ./a [./e.js] 1:0-14 + [./index.js] Xms -> factory:Xms building:Xms = Xms + [./index.js] 51 bytes {main} [built] + single entry ./index main + factory:Xms building:Xms = Xms +chunk {0} 0.bundle.js 54 bytes <{main}> >{2}< [rendered] + > ./c [./index.js] ./index.js 3:0-16 + [./c.js] 54 bytes {0} [built] + amd require ./c [./index.js] 3:0-16 + [./index.js] Xms -> factory:Xms building:Xms = Xms +chunk {1} 1.bundle.js 22 bytes <{main}> [rendered] + > ./b [./index.js] ./index.js 2:0-16 + [./b.js] 22 bytes {1} [built] + amd require ./b [./index.js] 2:0-16 + [./index.js] Xms -> factory:Xms building:Xms = Xms +chunk {2} 2.bundle.js 60 bytes <{0}> [rendered] + > [./c.js] ./c.js 1:0-52 + [./d.js] 22 bytes {2} [built] + require.ensure item ./d [./c.js] 1:0-52 + [./index.js] Xms -> [./c.js] Xms -> factory:Xms building:Xms = Xms + [./e.js] 38 bytes {2} [built] + require.ensure item ./e [./c.js] 1:0-52 + [./index.js] Xms -> [./c.js] Xms -> factory:Xms building:Xms = Xms" +`; + +exports[`StatsTestCases should print correct stats for circular-correctness 1`] = ` +"Entrypoint main = bundle.js +chunk {0} 0.bundle.js (a) 49 bytes <{2}> <{3}> >{3}< [rendered] + [1] ./module-a.js 49 bytes {0} [built] +chunk {1} 1.bundle.js (b) 49 bytes <{2}> <{3}> >{3}< [rendered] + [2] ./module-b.js 49 bytes {1} [built] +chunk {2} bundle.js (main) 98 bytes >{0}< >{1}< [entry] [rendered] + [3] ./index.js 98 bytes {2} [built] +chunk {3} 3.bundle.js (c) 98 bytes <{0}> <{1}> >{0}< >{1}< [rendered] + [0] ./module-c.js 98 bytes {3} [built]" +`; + +exports[`StatsTestCases should print correct stats for color-disabled 1`] = ` +"Hash: c5ad40363e9aee54c089 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +main.js 3.57 KiB 0 [emitted] main +Entrypoint main = main.js +[0] ./index.js 0 bytes {0} [built]" +`; + +exports[`StatsTestCases should print correct stats for color-enabled 1`] = ` +"Hash: c5ad40363e9aee54c089 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +main.js 3.57 KiB 0 [emitted] main +Entrypoint main = main.js +[0] ./index.js 0 bytes {0} [built]" +`; + +exports[`StatsTestCases should print correct stats for color-enabled-custom 1`] = ` +"Hash: c5ad40363e9aee54c089 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +main.js 3.57 KiB 0 [emitted] main +Entrypoint main = main.js +[0] ./index.js 0 bytes {0} [built]" +`; + +exports[`StatsTestCases should print correct stats for commons-chunk-min-size-0 1`] = ` +"Hash: bace8077f1ed02050b2f +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + entry-1.js 6.6 KiB 0 [emitted] entry-1 +vendor-1~entry-1.js 314 bytes 1 [emitted] vendor-1~entry-1 +Entrypoint entry-1 = vendor-1~entry-1.js entry-1.js +[0] ./entry-1.js 145 bytes {0} [built] +[1] ./modules/a.js 22 bytes {1} [built] +[2] ./modules/b.js 22 bytes {1} [built] +[3] ./modules/c.js 22 bytes {1} [built] +[4] ./modules/d.js 22 bytes {0} [built] +[5] ./modules/e.js 22 bytes {0} [built] +[6] ./modules/f.js 22 bytes {0} [built]" +`; + +exports[`StatsTestCases should print correct stats for commons-chunk-min-size-Infinity 1`] = ` +"Hash: cb8c4bb6c365b0a67d67 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + entry-1.js 6.6 KiB 0 [emitted] entry-1 +vendor-1.js 314 bytes 1 [emitted] vendor-1 +Entrypoint entry-1 = vendor-1.js entry-1.js +[0] ./entry-1.js 145 bytes {0} [built] +[1] ./modules/a.js 22 bytes {1} [built] +[2] ./modules/b.js 22 bytes {1} [built] +[3] ./modules/c.js 22 bytes {1} [built] +[4] ./modules/d.js 22 bytes {0} [built] +[5] ./modules/e.js 22 bytes {0} [built] +[6] ./modules/f.js 22 bytes {0} [built]" +`; + +exports[`StatsTestCases should print correct stats for commons-plugin-issue-4980 1`] = ` +"Hash: 707868320b2a03412b3fe3b00ef4ecd794b284d6 +Child + Hash: 707868320b2a03412b3f + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + app.js 6.69 KiB 0 [emitted] app + vendor.6a3bdffda9f0de672978.js 619 bytes 1 [emitted] vendor + Entrypoint app = vendor.6a3bdffda9f0de672978.js app.js + [./constants.js] 87 bytes {1} [built] + [./entry-1.js] ./entry-1.js + 2 modules 190 bytes {0} [built] + | ./entry-1.js 67 bytes [built] + | ./submodule-a.js 59 bytes [built] + | ./submodule-b.js 59 bytes [built] +Child + Hash: e3b00ef4ecd794b284d6 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + app.js 6.7 KiB 0 [emitted] app + vendor.6a3bdffda9f0de672978.js 619 bytes 1 [emitted] vendor + Entrypoint app = vendor.6a3bdffda9f0de672978.js app.js + [./constants.js] 87 bytes {1} [built] + [./entry-2.js] ./entry-2.js + 2 modules 197 bytes {0} [built] + | ./entry-2.js 67 bytes [built] + | ./submodule-a.js 59 bytes [built] + | ./submodule-c.js 66 bytes [built]" +`; + +exports[`StatsTestCases should print correct stats for concat-and-sideeffects 1`] = ` +"[0] ./index.js + 2 modules 119 bytes {0} [built] + | ./index.js 46 bytes [built] + | ModuleConcatenation bailout: Module is an entry point + | ./node_modules/pmodule/a.js 49 bytes [built] + | ./node_modules/pmodule/aa.js 24 bytes [built] +[1] ./node_modules/pmodule/index.js 63 bytes [built] + ModuleConcatenation bailout: Module is not in any chunk +[2] ./node_modules/pmodule/b.js 49 bytes [built] + ModuleConcatenation bailout: Module is not in any chunk +[3] ./node_modules/pmodule/bb.js 24 bytes [built] + ModuleConcatenation bailout: Module is not in any chunk +[4] ./node_modules/pmodule/c.js 49 bytes [built] + ModuleConcatenation bailout: Module is not in any chunk +[5] ./node_modules/pmodule/cc.js 24 bytes [built] + ModuleConcatenation bailout: Module is not in any chunk" +`; + +exports[`StatsTestCases should print correct stats for define-plugin 1`] = ` +"Hash: cfe08d4450db77f81610f4228fcb997ec81e2aa6 +Child + Hash: cfe08d4450db77f81610 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + main.js 3.6 KiB 0 [emitted] main + Entrypoint main = main.js + [0] ./index.js 24 bytes {0} [built] +Child + Hash: f4228fcb997ec81e2aa6 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + main.js 3.6 KiB 0 [emitted] main + Entrypoint main = main.js + [0] ./index.js 24 bytes {0} [built]" +`; + +exports[`StatsTestCases should print correct stats for exclude-with-loader 1`] = ` +"Hash: 52eadc5de721f000106b +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +bundle.js 4.01 KiB 0 [emitted] main + + 1 hidden asset +Entrypoint main = bundle.js +[0] ./index.js 77 bytes {0} [built] +[1] ./a.txt 43 bytes {0} [built] + + 2 hidden modules" +`; + +exports[`StatsTestCases should print correct stats for external 1`] = ` +"Hash: 7a4bb5500ee0eddeee44 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +main.js 3.71 KiB 0 [emitted] main +Entrypoint main = main.js +[0] ./index.js 17 bytes {0} [built] +[1] external \\"test\\" 42 bytes {0} [built]" +`; + +exports[`StatsTestCases should print correct stats for filter-warnings 1`] = ` +"Hash: 4269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b4 +Child + Hash: 4269d427a8c1110386b4 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + bundle.js 2.89 KiB 0 [emitted] main + Entrypoint main = bundle.js + + WARNING in bundle.js from UglifyJs + Dropping side-effect-free statement [./index.js:6,0] + Dropping unused function someUnUsedFunction1 [./index.js:8,0] + Dropping unused function someUnUsedFunction2 [./index.js:9,0] + Dropping unused function someUnUsedFunction3 [./index.js:10,0] + Dropping unused function someUnUsedFunction4 [./index.js:11,0] + Dropping unused function someUnUsedFunction5 [./index.js:12,0] + Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] +Child + Hash: 4269d427a8c1110386b4 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + bundle.js 2.89 KiB 0 [emitted] main + Entrypoint main = bundle.js +Child + Hash: 4269d427a8c1110386b4 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + bundle.js 2.89 KiB 0 [emitted] main + Entrypoint main = bundle.js +Child + Hash: 4269d427a8c1110386b4 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + bundle.js 2.89 KiB 0 [emitted] main + Entrypoint main = bundle.js +Child + Hash: 4269d427a8c1110386b4 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + bundle.js 2.89 KiB 0 [emitted] main + Entrypoint main = bundle.js +Child + Hash: 4269d427a8c1110386b4 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + bundle.js 2.89 KiB 0 [emitted] main + Entrypoint main = bundle.js +Child + Hash: 4269d427a8c1110386b4 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + bundle.js 2.89 KiB 0 [emitted] main + Entrypoint main = bundle.js +Child + Hash: 4269d427a8c1110386b4 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + bundle.js 2.89 KiB 0 [emitted] main + Entrypoint main = bundle.js + + WARNING in bundle.js from UglifyJs + Dropping side-effect-free statement [./index.js:6,0] + Dropping unused function someUnUsedFunction1 [./index.js:8,0] + Dropping unused function someUnUsedFunction2 [./index.js:9,0] + Dropping unused function someUnUsedFunction3 [./index.js:10,0] + Dropping unused function someUnUsedFunction4 [./index.js:11,0] + Dropping unused function someUnUsedFunction5 [./index.js:12,0] + Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] +Child + Hash: 4269d427a8c1110386b4 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + bundle.js 2.89 KiB 0 [emitted] main + Entrypoint main = bundle.js + + WARNING in bundle.js from UglifyJs + Dropping side-effect-free statement [./index.js:6,0] + Dropping unused function someUnUsedFunction1 [./index.js:8,0] + Dropping unused function someUnUsedFunction2 [./index.js:9,0] + Dropping unused function someUnUsedFunction3 [./index.js:10,0] + Dropping unused function someUnUsedFunction4 [./index.js:11,0] + Dropping unused function someUnUsedFunction5 [./index.js:12,0] + Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] +Child + Hash: 4269d427a8c1110386b4 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + bundle.js 2.89 KiB 0 [emitted] main + Entrypoint main = bundle.js + + WARNING in bundle.js from UglifyJs + Dropping side-effect-free statement [./index.js:6,0] + Dropping unused function someUnUsedFunction1 [./index.js:8,0] + Dropping unused function someUnUsedFunction2 [./index.js:9,0] + Dropping unused function someUnUsedFunction3 [./index.js:10,0] + Dropping unused function someUnUsedFunction4 [./index.js:11,0] + Dropping unused function someUnUsedFunction5 [./index.js:12,0] + Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] +Child + Hash: 4269d427a8c1110386b4 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + bundle.js 2.89 KiB 0 [emitted] main + Entrypoint main = bundle.js + + WARNING in bundle.js from UglifyJs + Dropping side-effect-free statement [./index.js:6,0] + Dropping unused function someUnUsedFunction1 [./index.js:8,0] + Dropping unused function someUnUsedFunction2 [./index.js:9,0] + Dropping unused function someUnUsedFunction3 [./index.js:10,0] + Dropping unused function someUnUsedFunction4 [./index.js:11,0] + Dropping unused function someUnUsedFunction5 [./index.js:12,0] + Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] +Child + Hash: 4269d427a8c1110386b4 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + bundle.js 2.89 KiB 0 [emitted] main + Entrypoint main = bundle.js + + WARNING in bundle.js from UglifyJs + Dropping side-effect-free statement [./index.js:6,0] + Dropping unused function someUnUsedFunction1 [./index.js:8,0] + Dropping unused function someUnUsedFunction2 [./index.js:9,0] + Dropping unused function someUnUsedFunction3 [./index.js:10,0] + Dropping unused function someUnUsedFunction4 [./index.js:11,0] + Dropping unused function someUnUsedFunction5 [./index.js:12,0] + Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] +Child + Hash: 4269d427a8c1110386b4 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + bundle.js 2.89 KiB 0 [emitted] main + Entrypoint main = bundle.js + + WARNING in bundle.js from UglifyJs + Dropping side-effect-free statement [./index.js:6,0] + Dropping unused function someUnUsedFunction1 [./index.js:8,0] + Dropping unused function someUnUsedFunction2 [./index.js:9,0] + Dropping unused function someUnUsedFunction3 [./index.js:10,0] + Dropping unused function someUnUsedFunction4 [./index.js:11,0] + Dropping unused function someUnUsedFunction5 [./index.js:12,0] + Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0]" +`; + +exports[`StatsTestCases should print correct stats for graph-correctness-entries 1`] = ` +"Entrypoint e1 = e1.js +Entrypoint e2 = e2.js +chunk {0} c.js (c) 49 bytes <{3}> <{4}> >{1}< [rendered] + [1] ./module-c.js 49 bytes {0} [built] + import() ./module-c [2] ./module-b.js 1:0-47 + import() ./module-c [4] ./e2.js 1:0-47 +chunk {1} a.js (a) 49 bytes <{0}> <{2}> >{4}< [rendered] + [0] ./module-a.js 49 bytes {1} [built] + import() ./module-a [1] ./module-c.js 1:0-47 + import() ./module-a [3] ./e1.js 1:0-47 +chunk {2} e1.js (e1) 49 bytes >{1}< [entry] [rendered] + [3] ./e1.js 49 bytes {2} [built] + single entry ./e1 e1 +chunk {3} e2.js (e2) 49 bytes >{0}< [entry] [rendered] + [4] ./e2.js 49 bytes {3} [built] + single entry ./e2 e2 +chunk {4} b.js (b) 49 bytes <{1}> >{0}< [rendered] + [2] ./module-b.js 49 bytes {4} [built] + import() ./module-b [0] ./module-a.js 1:0-47" +`; + +exports[`StatsTestCases should print correct stats for graph-correctness-modules 1`] = ` +"Entrypoint e1 = e1.js +Entrypoint e2 = e2.js +chunk {0} y.js (y) 0 bytes <{3}> <{4}> [rendered] + [3] ./module-y.js 0 bytes {0} [built] + import() ./module-y [0] ./module-x.js 1:0-47 +chunk {1} c.js (c) 49 bytes <{4}> <{5}> >{2}< [rendered] + [2] ./module-c.js 49 bytes {1} [built] + import() ./module-c [4] ./module-b.js 1:0-47 + import() ./module-c [6] ./e2.js 2:0-47 +chunk {2} a.js (a) 49 bytes <{1}> <{3}> >{5}< [rendered] + [1] ./module-a.js 49 bytes {2} [built] + import() ./module-a [2] ./module-c.js 1:0-47 + import() ./module-a [5] ./e1.js 2:0-47 +chunk {3} e1.js (e1) 119 bytes >{0}< >{2}< [entry] [rendered] + [0] ./module-x.js 49 bytes {3} {4} [built] + import() ./module-x [4] ./module-b.js 2:0-20 + harmony side effect evaluation ./module-x [5] ./e1.js 1:0-20 + harmony side effect evaluation ./module-x [6] ./e2.js 1:0-20 + [5] ./e1.js 70 bytes {3} [built] + single entry ./e1 e1 +chunk {4} e2.js (e2) 119 bytes >{0}< >{1}< [entry] [rendered] + [0] ./module-x.js 49 bytes {3} {4} [built] + import() ./module-x [4] ./module-b.js 2:0-20 + harmony side effect evaluation ./module-x [5] ./e1.js 1:0-20 + harmony side effect evaluation ./module-x [6] ./e2.js 1:0-20 + [6] ./e2.js 70 bytes {4} [built] + single entry ./e2 e2 +chunk {5} b.js (b) 179 bytes <{2}> >{1}< [rendered] + [4] ./module-b.js 179 bytes {5} [built] + import() ./module-b [1] ./module-a.js 1:0-47" +`; + +exports[`StatsTestCases should print correct stats for import-context-filter 1`] = ` +"Hash: 2a0d654db3e185182232 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + 0.js 305 bytes 0 [emitted] + 1.js 314 bytes 1 [emitted] + 2.js 308 bytes 2 [emitted] +entry.js 9.28 KiB 3 [emitted] entry +Entrypoint entry = entry.js +[0] ./templates/bar.js 38 bytes {0} [optional] [built] +[1] ./templates/baz.js 38 bytes {1} [optional] [built] +[2] ./templates/foo.js 38 bytes {2} [optional] [built] +[3] ./entry.js 450 bytes {3} [built] +[4] ./templates lazy ^\\\\.\\\\/.*$ include: \\\\.js$ exclude: \\\\.noimport\\\\.js$ namespace object 160 bytes {3} [optional] [built]" +`; + +exports[`StatsTestCases should print correct stats for import-weak 1`] = ` +"Hash: 34cdd6c85db0facc427a +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + 0.js 149 bytes 0 [emitted] +entry.js 8.73 KiB 1 [emitted] entry +Entrypoint entry = entry.js +[0] ./modules/b.js 22 bytes {0} [built] +[1] ./entry.js 120 bytes {1} [built] +[2] ./modules/a.js 37 bytes [built]" +`; + +exports[`StatsTestCases should print correct stats for import-with-invalid-options-comments 1`] = ` +"Built at: Thu Jan 01 1970 00:00:00 GMT +[0] ./chunk-a.js 27 bytes {2} [built] +[1] ./chunk-b.js 27 bytes {3} [built] +[2] ./chunk-c.js 27 bytes {4} [built] +[3] ./chunk-d.js 27 bytes {5} [built] +[4] ./chunk.js 401 bytes {0} [built] [3 warnings] +[5] ./index.js 50 bytes {1} [built] + +WARNING in ./chunk.js 4:11-77 +Compilation error while processing magic comment(-s): /* webpack Prefetch: 0, webpackChunkName: \\"notGoingToCompile-c\\" */: Unexpected identifier + @ ./index.js 1:0-49 + +WARNING in ./chunk.js 5:11-38 +Compilation error while processing magic comment(-s): /* webpackPrefetch: nope */: nope is not defined + @ ./index.js 1:0-49 + +WARNING in ./chunk.js 2:11-84 +Compilation error while processing magic comment(-s): /* webpackPrefetch: true, webpackChunkName: notGoingToCompileChunkName */: notGoingToCompileChunkName is not defined + @ ./index.js 1:0-49" +`; + +exports[`StatsTestCases should print correct stats for limit-chunk-count-plugin 1`] = ` +"Hash: 3f682d19df3a78cc355b84831557db9bd7a90e1a059dbb5576e98cee97e4f44eff82b7d35dbb5021 +Child 1 chunks: + Hash: 3f682d19df3a78cc355b + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + bundle.js 6.39 KiB 0 [emitted] main + Entrypoint main = bundle.js + chunk {0} bundle.js (main) 191 bytes <{0}> >{0}< [entry] [rendered] + [0] ./index.js 73 bytes {0} [built] + [1] ./a.js 22 bytes {0} [built] + [2] ./b.js 22 bytes {0} [built] + [3] ./c.js 30 bytes {0} [built] + [4] ./d.js 22 bytes {0} [built] + [5] ./e.js 22 bytes {0} [built] +Child 2 chunks: + Hash: 84831557db9bd7a90e1a + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + 0.bundle.js 632 bytes 0 [emitted] + bundle.js 8.49 KiB 1 [emitted] main + Entrypoint main = bundle.js + chunk {0} 0.bundle.js 118 bytes <{0}> <{1}> >{0}< [rendered] + [0] ./d.js 22 bytes {0} [built] + [1] ./e.js 22 bytes {0} [built] + [2] ./a.js 22 bytes {0} [built] + [3] ./b.js 22 bytes {0} [built] + [4] ./c.js 30 bytes {0} [built] + chunk {1} bundle.js (main) 73 bytes >{0}< [entry] [rendered] + [5] ./index.js 73 bytes {1} [built] +Child 3 chunks: + Hash: 059dbb5576e98cee97e4 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + 0.bundle.js 494 bytes 0 [emitted] + 1.bundle.js 245 bytes 1 [emitted] + bundle.js 8.49 KiB 2 [emitted] main + Entrypoint main = bundle.js + chunk {0} 0.bundle.js 74 bytes <{0}> <{2}> >{0}< >{1}< [rendered] + [0] ./d.js 22 bytes {0} [built] + [2] ./a.js 22 bytes {0} [built] + [4] ./c.js 30 bytes {0} [built] + chunk {1} 1.bundle.js 44 bytes <{0}> <{2}> [rendered] + [1] ./e.js 22 bytes {1} [built] + [3] ./b.js 22 bytes {1} [built] + chunk {2} bundle.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] + [5] ./index.js 73 bytes {2} [built] +Child 4 chunks: + Hash: f44eff82b7d35dbb5021 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + 0.bundle.js 236 bytes 0 [emitted] + 1.bundle.js 245 bytes 1 [emitted] + 2.bundle.js 323 bytes 2 [emitted] + bundle.js 8.49 KiB 3 [emitted] main + Entrypoint main = bundle.js + chunk {0} 0.bundle.js 44 bytes <{2}> <{3}> [rendered] + [0] ./d.js 22 bytes {0} [built] + [2] ./a.js 22 bytes {0} [built] + chunk {1} 1.bundle.js 44 bytes <{2}> <{3}> [rendered] + [1] ./e.js 22 bytes {1} [built] + [3] ./b.js 22 bytes {1} [built] + chunk {2} 2.bundle.js 30 bytes <{3}> >{0}< >{1}< [rendered] + [4] ./c.js 30 bytes {2} [built] + chunk {3} bundle.js (main) 73 bytes >{0}< >{1}< >{2}< [entry] [rendered] + [5] ./index.js 73 bytes {3} [built]" +`; + +exports[`StatsTestCases should print correct stats for max-modules 1`] = ` +"Hash: 8e1f6d7b7886c5f4617d +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +main.js 6.81 KiB 0 [emitted] main +Entrypoint main = main.js + [0] ./a.js?1 33 bytes {0} [built] + [1] ./a.js?2 33 bytes {0} [built] + [2] ./a.js?3 33 bytes {0} [built] + [3] ./a.js?4 33 bytes {0} [built] + [4] ./a.js?5 33 bytes {0} [built] + [5] ./a.js?6 33 bytes {0} [built] + [6] ./a.js?7 33 bytes {0} [built] + [7] ./a.js?8 33 bytes {0} [built] + [8] ./a.js?9 33 bytes {0} [built] + [9] ./a.js?10 33 bytes {0} [built] +[10] ./index.js 181 bytes {0} [built] +[11] ./c.js?1 33 bytes {0} [built] +[13] ./c.js?2 33 bytes {0} [built] +[15] ./c.js?3 33 bytes {0} [built] +[17] ./c.js?4 33 bytes {0} [built] +[19] ./c.js?5 33 bytes {0} [built] +[23] ./c.js?7 33 bytes {0} [built] +[25] ./c.js?8 33 bytes {0} [built] +[27] ./c.js?9 33 bytes {0} [built] +[29] ./c.js?10 33 bytes {0} [built] + + 11 hidden modules" +`; + +exports[`StatsTestCases should print correct stats for max-modules-default 1`] = ` +"Hash: 8e1f6d7b7886c5f4617d +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +main.js 6.81 KiB 0 [emitted] main +Entrypoint main = main.js + [0] ./a.js?1 33 bytes {0} [built] + [1] ./a.js?2 33 bytes {0} [built] + [2] ./a.js?3 33 bytes {0} [built] + [3] ./a.js?4 33 bytes {0} [built] + [4] ./a.js?5 33 bytes {0} [built] + [5] ./a.js?6 33 bytes {0} [built] + [6] ./a.js?7 33 bytes {0} [built] + [7] ./a.js?8 33 bytes {0} [built] + [8] ./a.js?9 33 bytes {0} [built] + [9] ./a.js?10 33 bytes {0} [built] +[10] ./index.js 181 bytes {0} [built] +[11] ./c.js?1 33 bytes {0} [built] +[13] ./c.js?2 33 bytes {0} [built] +[27] ./c.js?9 33 bytes {0} [built] +[29] ./c.js?10 33 bytes {0} [built] + + 16 hidden modules" +`; + +exports[`StatsTestCases should print correct stats for module-assets 1`] = ` +"Hash: e1ecf80df7148b69327b +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT +Entrypoint main = main.js +chunk {0} 0.js 68 bytes <{1}> [rendered] + [0] ./node_modules/a/1.png 51 bytes {0} [built] [1 asset] + [1] ./node_modules/a/index.js 17 bytes {0} [built] +chunk {1} main.js (main) 12 bytes >{0}< [entry] [rendered] + [2] ./index.js 12 bytes {1} [built] +[0] ./node_modules/a/1.png 51 bytes {0} [built] [1 asset] +[1] ./node_modules/a/index.js 17 bytes {0} [built] +[2] ./index.js 12 bytes {1} [built]" +`; + +exports[`StatsTestCases should print correct stats for module-deduplication 1`] = ` +"Asset Size Chunks Chunk Names + 0.js 730 bytes 0, 5 [emitted] + 1.js 730 bytes 1, 4 [emitted] + 2.js 730 bytes 2, 3 [emitted] + 3.js 661 bytes 3 [emitted] + 4.js 661 bytes 4 [emitted] + 5.js 661 bytes 5 [emitted] +e1.js 9.63 KiB 6 [emitted] e1 +e2.js 9.65 KiB 7 [emitted] e2 +e3.js 9.67 KiB 8 [emitted] e3 +Entrypoint e1 = e1.js +Entrypoint e2 = e2.js +Entrypoint e3 = e3.js +chunk {0} 0.js 37 bytes <{7}> <{8}> [rendered] + [2] ./d.js 9 bytes {0} {6} [built] + [5] ./async1.js 28 bytes {0} {5} [built] +chunk {1} 1.js 37 bytes <{6}> <{8}> [rendered] + [3] ./f.js 9 bytes {1} {7} [built] + [6] ./async2.js 28 bytes {1} {4} [built] +chunk {2} 2.js 37 bytes <{6}> <{7}> [rendered] + [4] ./h.js 9 bytes {2} {8} [built] + [7] ./async3.js 28 bytes {2} {3} [built] +chunk {3} 3.js 28 bytes <{8}> [rendered] + [7] ./async3.js 28 bytes {2} {3} [built] +chunk {4} 4.js 28 bytes <{7}> [rendered] + [6] ./async2.js 28 bytes {1} {4} [built] +chunk {5} 5.js 28 bytes <{6}> [rendered] + [5] ./async1.js 28 bytes {0} {5} [built] +chunk {6} e1.js (e1) 152 bytes >{1}< >{2}< >{5}< [entry] [rendered] + [0] ./b.js 9 bytes {6} {7} {8} [built] + [1] ./a.js 9 bytes {6} {7} {8} [built] + [2] ./d.js 9 bytes {0} {6} [built] + [8] ./e1.js 116 bytes {6} [built] + [9] ./c.js 9 bytes {6} [built] +chunk {7} e2.js (e2) 152 bytes >{0}< >{2}< >{4}< [entry] [rendered] + [0] ./b.js 9 bytes {6} {7} {8} [built] + [1] ./a.js 9 bytes {6} {7} {8} [built] + [3] ./f.js 9 bytes {1} {7} [built] + [10] ./e2.js 116 bytes {7} [built] + [11] ./e.js 9 bytes {7} [built] +chunk {8} e3.js (e3) 152 bytes >{0}< >{1}< >{3}< [entry] [rendered] + [0] ./b.js 9 bytes {6} {7} {8} [built] + [1] ./a.js 9 bytes {6} {7} {8} [built] + [4] ./h.js 9 bytes {2} {8} [built] + [12] ./e3.js 116 bytes {8} [built] + [13] ./g.js 9 bytes {8} [built]" +`; + +exports[`StatsTestCases should print correct stats for module-deduplication-named 1`] = ` +" Asset Size Chunks Chunk Names +async3.js 818 bytes 0 [emitted] async3 +async1.js 818 bytes 1 [emitted] async1 +async2.js 818 bytes 2 [emitted] async2 + e1.js 9.51 KiB 3 [emitted] e1 + e2.js 9.53 KiB 4 [emitted] e2 + e3.js 9.55 KiB 5 [emitted] e3 +Entrypoint e1 = e1.js +Entrypoint e2 = e2.js +Entrypoint e3 = e3.js +chunk {0} async3.js (async3) 89 bytes <{2}> <{5}> >{1}< [rendered] + [4] ./h.js 9 bytes {0} {5} [built] + [7] ./async3.js 80 bytes {0} [built] +chunk {1} async1.js (async1) 89 bytes <{0}> <{3}> >{2}< [rendered] + [2] ./d.js 9 bytes {1} {3} [built] + [5] ./async1.js 80 bytes {1} [built] +chunk {2} async2.js (async2) 89 bytes <{1}> <{4}> >{0}< [rendered] + [3] ./f.js 9 bytes {2} {4} [built] + [6] ./async2.js 80 bytes {2} [built] +chunk {3} e1.js (e1) 144 bytes >{1}< [entry] [rendered] + [0] ./b.js 9 bytes {3} {4} {5} [built] + [1] ./a.js 9 bytes {3} {4} {5} [built] + [2] ./d.js 9 bytes {1} {3} [built] + [8] ./e1.js 108 bytes {3} [built] + [9] ./c.js 9 bytes {3} [built] +chunk {4} e2.js (e2) 144 bytes >{2}< [entry] [rendered] + [0] ./b.js 9 bytes {3} {4} {5} [built] + [1] ./a.js 9 bytes {3} {4} {5} [built] + [3] ./f.js 9 bytes {2} {4} [built] + [10] ./e2.js 108 bytes {4} [built] + [11] ./e.js 9 bytes {4} [built] +chunk {5} e3.js (e3) 144 bytes >{0}< [entry] [rendered] + [0] ./b.js 9 bytes {3} {4} {5} [built] + [1] ./a.js 9 bytes {3} {4} {5} [built] + [4] ./h.js 9 bytes {0} {5} [built] + [12] ./e3.js 108 bytes {5} [built] + [13] ./g.js 9 bytes {5} [built]" +`; + +exports[`StatsTestCases should print correct stats for module-trace-disabled-in-error 1`] = ` +"Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +main.js 3.75 KiB 0 main +Entrypoint main = main.js +[0] ./index.js 25 bytes {0} [built] + +ERROR in ./index.js +Module not found: Error: Can't resolve 'does-not-exist' in 'Xdir/module-trace-disabled-in-error'" +`; + +exports[`StatsTestCases should print correct stats for module-trace-enabled-in-error 1`] = ` +"Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +main.js 3.75 KiB 0 main +Entrypoint main = main.js +[0] ./index.js 25 bytes {0} [built] + +ERROR in ./index.js +Module not found: Error: Can't resolve 'does-not-exist' in 'Xdir/module-trace-enabled-in-error' + @ ./index.js 1:0-25" +`; + +exports[`StatsTestCases should print correct stats for named-chunk-groups 1`] = ` +"Child + Chunk Group main = main.js + Chunk Group async-a = async-a~async-b.js async-a.js + Chunk Group async-b = async-a~async-b.js async-b.js + Chunk Group async-c = vendors.js async-c.js + chunk {0} async-a~async-b.js (async-a~async-b) 133 bytes <{5}> ={1}= ={2}= [rendered] split chunk (cache group: default) (name: async-a~async-b) + > ./a [6] ./index.js 1:0-47 + > ./b [6] ./index.js 2:0-47 + [0] ./shared.js 133 bytes {0} [built] + chunk {1} async-a.js (async-a) 40 bytes <{5}> ={0}= [rendered] + > ./a [6] ./index.js 1:0-47 + [3] ./a.js 40 bytes {1} [built] + chunk {2} async-b.js (async-b) 40 bytes <{5}> ={0}= [rendered] + > ./b [6] ./index.js 2:0-47 + [4] ./b.js 40 bytes {2} [built] + chunk {3} async-c.js (async-c) 45 bytes <{5}> ={4}= [rendered] + > ./c [6] ./index.js 3:0-47 + [5] ./c.js 45 bytes {3} [built] + chunk {4} vendors.js (vendors) 40 bytes <{5}> ={3}= [rendered] split chunk (cache group: vendors) (name: vendors) + > ./c [6] ./index.js 3:0-47 + [1] ./node_modules/x.js 20 bytes {4} [built] + [2] ./node_modules/y.js 20 bytes {4} [built] + chunk {5} main.js (main) 146 bytes >{0}< >{1}< >{2}< >{3}< >{4}< [entry] [rendered] + > ./ main + [6] ./index.js 146 bytes {5} [built] +Child + Entrypoint main = main.js + Chunk Group async-a = async-a~async-b.js async-a.js + Chunk Group async-b = async-a~async-b.js async-b.js + Chunk Group async-c = vendors.js async-c.js + chunk {0} async-a~async-b.js (async-a~async-b) 133 bytes <{5}> ={1}= ={2}= [rendered] split chunk (cache group: default) (name: async-a~async-b) + > ./a [6] ./index.js 1:0-47 + > ./b [6] ./index.js 2:0-47 + [0] ./shared.js 133 bytes {0} [built] + chunk {1} async-a.js (async-a) 40 bytes <{5}> ={0}= [rendered] + > ./a [6] ./index.js 1:0-47 + [3] ./a.js 40 bytes {1} [built] + chunk {2} async-b.js (async-b) 40 bytes <{5}> ={0}= [rendered] + > ./b [6] ./index.js 2:0-47 + [4] ./b.js 40 bytes {2} [built] + chunk {3} async-c.js (async-c) 45 bytes <{5}> ={4}= [rendered] + > ./c [6] ./index.js 3:0-47 + [5] ./c.js 45 bytes {3} [built] + chunk {4} vendors.js (vendors) 40 bytes <{5}> ={3}= [rendered] split chunk (cache group: vendors) (name: vendors) + > ./c [6] ./index.js 3:0-47 + [1] ./node_modules/x.js 20 bytes {4} [built] + [2] ./node_modules/y.js 20 bytes {4} [built] + chunk {5} main.js (main) 146 bytes >{0}< >{1}< >{2}< >{3}< >{4}< [entry] [rendered] + > ./ main + [6] ./index.js 146 bytes {5} [built]" +`; + +exports[`StatsTestCases should print correct stats for named-chunks-plugin 1`] = ` +"Hash: ae58e4539a3d3b521cc7 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + entry.js 6.45 KiB entry [emitted] entry +vendor.js 269 bytes vendor [emitted] vendor +Entrypoint entry = vendor.js entry.js +[./entry.js] 72 bytes {entry} [built] +[./modules/a.js] 22 bytes {vendor} [built] +[./modules/b.js] 22 bytes {vendor} [built] +[./modules/c.js] 22 bytes {entry} [built]" +`; + +exports[`StatsTestCases should print correct stats for named-chunks-plugin-async 1`] = ` +"Hash: b6aa15eeabc33e889828 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +chunk-containing-__a_js.js 313 bytes chunk-containing-__a_js [emitted] +chunk-containing-__b_js.js 173 bytes chunk-containing-__b_js [emitted] + entry.js 8.39 KiB entry [emitted] entry +Entrypoint entry = entry.js +[0] ./modules/b.js 22 bytes {chunk-containing-__b_js} [built] +[1] ./modules/a.js 37 bytes {chunk-containing-__a_js} [built] +[2] ./entry.js 47 bytes {entry} [built]" +`; + +exports[`StatsTestCases should print correct stats for no-emit-on-errors-plugin-with-child-error 1`] = ` +"Hash: 6a246e5dec75240f30bf +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + child.js 3.57 KiB +bundle.js 3.57 KiB 0 main +Entrypoint main = bundle.js +[0] ./index.js 0 bytes {0} [built] + +WARNING in configuration +The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment. +You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/ +Child child: + Asset Size Chunks Chunk Names + child.js 3.57 KiB 0 child + Entrypoint child = child.js + [0] ./index.js 0 bytes {0} [built] + + ERROR in forced error" +`; + +exports[`StatsTestCases should print correct stats for optimize-chunks 1`] = ` +"Hash: c52867ded6f77bcf50cc +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + cir1.js 299 bytes 0 [emitted] cir1 + ab.js 183 bytes 1 [emitted] ab + abd.js 277 bytes 2, 1 [emitted] abd + cir2.js 299 bytes 3 [emitted] cir2 + main.js 9.29 KiB 4 [emitted] main +cir2 from cir1.js 359 bytes 5, 3 [emitted] cir2 from cir1 + chunk.js 190 bytes 6, 7 [emitted] chunk + ac in ab.js 130 bytes 7 [emitted] ac in ab +Entrypoint main = main.js +chunk {0} cir1.js (cir1) 81 bytes <{3}> <{4}> >{5}< [rendered] + > [3] ./circular2.js 1:0-79 + > [3] ./circular2.js 1:0-79 + > [8] ./index.js 13:0-54 + [2] ./circular1.js 81 bytes {0} [built] +chunk {1} ab.js (ab) 0 bytes <{4}> >{7}< [rendered] + > [8] ./index.js 1:0-6:8 + [0] ./modules/a.js 0 bytes {1} {2} [built] + [1] ./modules/b.js 0 bytes {1} {2} [built] +chunk {2} abd.js (abd) 0 bytes <{4}> >{6}< [rendered] + > [8] ./index.js 8:0-11:9 + [0] ./modules/a.js 0 bytes {1} {2} [built] + [1] ./modules/b.js 0 bytes {1} {2} [built] + [6] ./modules/d.js 0 bytes {2} {6} [built] +chunk {3} cir2.js (cir2) 81 bytes <{4}> >{0}< [rendered] + > [8] ./index.js 14:0-54 + [3] ./circular2.js 81 bytes {3} {5} [built] +chunk {4} main.js (main) 523 bytes >{0}< >{1}< >{2}< >{3}< [entry] [rendered] + > ./index main + [4] ./modules/f.js 0 bytes {4} [built] + [8] ./index.js 523 bytes {4} [built] +chunk {5} cir2 from cir1.js (cir2 from cir1) 81 bytes <{0}> [rendered] + > [2] ./circular1.js 1:0-79 + > [2] ./circular1.js 1:0-79 + [3] ./circular2.js 81 bytes {3} {5} [built] + [7] ./modules/e.js 0 bytes {5} [built] +chunk {6} chunk.js (chunk) 0 bytes <{2}> <{7}> [rendered] + > [8] ./index.js 3:2-4:13 + > [8] ./index.js 9:1-10:12 + [5] ./modules/c.js 0 bytes {6} {7} [built] + [6] ./modules/d.js 0 bytes {2} {6} [built] +chunk {7} ac in ab.js (ac in ab) 0 bytes <{1}> >{6}< [rendered] + > [8] ./index.js 2:1-5:15 + [5] ./modules/c.js 0 bytes {6} {7} [built]" +`; + +exports[`StatsTestCases should print correct stats for parse-error 1`] = ` +" Asset Size Chunks Chunk Names +main.js 4.01 KiB 0 main +Entrypoint main = main.js +[0] ./b.js 169 bytes {0} [built] [failed] [1 error] +[1] ./index.js + 1 modules 35 bytes {0} [built] + | ./index.js 15 bytes [built] + | ./a.js 15 bytes [built] + +ERROR in ./b.js 6:7 +Module parse failed: Unexpected token (6:7) +You may need an appropriate loader to handle this file type. +| includes +| a +> parser ) +| error +| in + @ ./a.js 2:0-13 + @ ./index.js" +`; + +exports[`StatsTestCases should print correct stats for performance-different-mode-and-target 1`] = ` +"Hash: b27a7019f90a13ead012bb84b396eb1e98365d94fb930f6aa3329ab03a278deb0030bfebe86abb37a1cddcae25eb52f3112b62c8b61bc84829d26b13ae06efe5f0099a11af36 +Child + Hash: b27a7019f90a13ead012 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + warning.pro-web.js 297 KiB 0 [emitted] [big] main + Entrypoint main [big] = warning.pro-web.js + [0] ./index.js 293 KiB {0} [built] + + WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). + This can impact web performance. + Assets: + warning.pro-web.js (297 KiB) + + WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance. + Entrypoints: + main (297 KiB) + warning.pro-web.js + + + WARNING in webpack performance recommendations: + You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application. + For more info visit https://webpack.js.org/guides/code-splitting/ +Child + Hash: bb84b396eb1e98365d94 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + warning.pro-webworker.js 297 KiB 0 [emitted] [big] main + Entrypoint main [big] = warning.pro-webworker.js + [0] ./index.js 293 KiB {0} [built] + + WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). + This can impact web performance. + Assets: + warning.pro-webworker.js (297 KiB) + + WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance. + Entrypoints: + main (297 KiB) + warning.pro-webworker.js + + + WARNING in webpack performance recommendations: + You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application. + For more info visit https://webpack.js.org/guides/code-splitting/ +Child + Hash: fb930f6aa3329ab03a27 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + no-warning.pro-node.js 297 KiB 0 [emitted] main + Entrypoint main = no-warning.pro-node.js + [0] ./index.js 293 KiB {0} [built] +Child + Hash: 8deb0030bfebe86abb37 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + no-warning.dev-web.js 1.72 MiB main [emitted] main + Entrypoint main = no-warning.dev-web.js + [./index.js] 293 KiB {main} [built] +Child + Hash: a1cddcae25eb52f3112b + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + no-warning.dev-node.js 1.72 MiB main [emitted] main + Entrypoint main = no-warning.dev-node.js + [./index.js] 293 KiB {main} [built] +Child + Hash: 62c8b61bc84829d26b13 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + no-warning.dev-web-with-limit-set.js 1.72 MiB main [emitted] [big] main + Entrypoint main [big] = no-warning.dev-web-with-limit-set.js + [./index.js] 293 KiB {main} [built] +Child + Hash: ae06efe5f0099a11af36 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + warning.pro-node-with-hints-set.js 297 KiB 0 [emitted] [big] main + Entrypoint main [big] = warning.pro-node-with-hints-set.js + [0] ./index.js 293 KiB {0} [built] + + WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). + This can impact web performance. + Assets: + warning.pro-node-with-hints-set.js (297 KiB) + + WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance. + Entrypoints: + main (297 KiB) + warning.pro-node-with-hints-set.js + + + WARNING in webpack performance recommendations: + You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application. + For more info visit https://webpack.js.org/guides/code-splitting/" +`; + +exports[`StatsTestCases should print correct stats for performance-disabled 1`] = ` +"Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + 0.js 152 bytes 0 [emitted] + 1.js 289 bytes 1 [emitted] +main.js 301 KiB 2 [emitted] main + 3.js 227 bytes 3 [emitted] +Entrypoint main = main.js +[0] ./d.js 22 bytes {3} [built] +[1] ./e.js 22 bytes {3} [built] +[2] ./b.js 22 bytes {0} [built] +[3] ./c.js 54 bytes {1} [built] +[4] ./index.js 52 bytes {2} [built] +[5] ./a.js 293 KiB {2} [built]" +`; + +exports[`StatsTestCases should print correct stats for performance-error 1`] = ` +"Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + 0.js 152 bytes 0 [emitted] + 1.js 289 bytes 1 [emitted] +main.js 301 KiB 2 [emitted] [big] main + 3.js 227 bytes 3 [emitted] +Entrypoint main [big] = main.js +[0] ./d.js 22 bytes {3} [built] +[1] ./e.js 22 bytes {3} [built] +[2] ./b.js 22 bytes {0} [built] +[3] ./c.js 54 bytes {1} [built] +[4] ./index.js 52 bytes {2} [built] +[5] ./a.js 293 KiB {2} [built] + +ERROR in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). +This can impact web performance. +Assets: + main.js (301 KiB) + +ERROR in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance. +Entrypoints: + main (301 KiB) + main.js +" +`; + +exports[`StatsTestCases should print correct stats for performance-no-async-chunks-shown 1`] = ` +"Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +main.js 297 KiB 0 [emitted] [big] main + sec.js 3.91 KiB 1 [emitted] sec +Entrypoint main [big] = main.js +Entrypoint sec = sec.js +[0] ./b.js 22 bytes {0} {1} [built] +[1] ./index.js 32 bytes {0} [built] +[2] ./a.js 293 KiB {0} [built] +[3] ./index2.js 48 bytes {1} [built] +[4] ./c.js 22 bytes {1} [built] +[5] ./d.js 22 bytes {1} [built] + +WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). +This can impact web performance. +Assets: + main.js (297 KiB) + +WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance. +Entrypoints: + main (297 KiB) + main.js + + +WARNING in webpack performance recommendations: +You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application. +For more info visit https://webpack.js.org/guides/code-splitting/" +`; + +exports[`StatsTestCases should print correct stats for performance-no-hints 1`] = ` +"Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + 0.js 152 bytes 0 [emitted] + 1.js 289 bytes 1 [emitted] +main.js 301 KiB 2 [emitted] [big] main + 3.js 227 bytes 3 [emitted] +Entrypoint main [big] = main.js +[0] ./d.js 22 bytes {3} [built] +[1] ./e.js 22 bytes {3} [built] +[2] ./b.js 22 bytes {0} [built] +[3] ./c.js 54 bytes {1} [built] +[4] ./index.js 52 bytes {2} [built] +[5] ./a.js 293 KiB {2} [built]" +`; + +exports[`StatsTestCases should print correct stats for performance-oversize-limit-error 1`] = ` +"Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +main.js 297 KiB 0 [emitted] [big] main + sec.js 297 KiB 1 [emitted] [big] sec +Entrypoint main [big] = main.js +Entrypoint sec [big] = sec.js +[0] ./a.js 293 KiB {0} {1} [built] +[1] ./index.js 16 bytes {0} [built] +[2] ./index2.js 16 bytes {1} [built] + +ERROR in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). +This can impact web performance. +Assets: + main.js (297 KiB) + sec.js (297 KiB) + +ERROR in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance. +Entrypoints: + main (297 KiB) + main.js + sec (297 KiB) + sec.js + + +ERROR in webpack performance recommendations: +You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application. +For more info visit https://webpack.js.org/guides/code-splitting/" +`; + +exports[`StatsTestCases should print correct stats for prefetch 1`] = ` +" Asset Size Chunks Chunk Names + prefetched.js 475 bytes 0 [emitted] prefetched + normal.js 130 bytes 1 [emitted] normal +prefetched2.js 127 bytes 2 [emitted] prefetched2 +prefetched3.js 130 bytes 3 [emitted] prefetched3 + main.js 9.86 KiB 4 [emitted] main + inner.js 136 bytes 5 [emitted] inner + inner2.js 201 bytes 6 [emitted] inner2 +Entrypoint main = main.js (prefetch: prefetched2.js prefetched.js prefetched3.js) +chunk {0} prefetched.js (prefetched) 228 bytes <{4}> >{5}< >{6}< (prefetch: {6} {5}) [rendered] +chunk {1} normal.js (normal) 0 bytes <{4}> [rendered] +chunk {2} prefetched2.js (prefetched2) 0 bytes <{4}> [rendered] +chunk {3} prefetched3.js (prefetched3) 0 bytes <{4}> [rendered] +chunk {4} main.js (main) 436 bytes >{0}< >{1}< >{2}< >{3}< (prefetch: {2} {0} {3}) [entry] [rendered] +chunk {5} inner.js (inner) 0 bytes <{0}> [rendered] +chunk {6} inner2.js (inner2) 0 bytes <{0}> [rendered]" +`; + +exports[`StatsTestCases should print correct stats for prefetch-preload-mixed 1`] = ` +"chunk {0} a.js (a) 136 bytes <{3}> >{10}< >{9}< (prefetch: {9} {10}) [rendered] +chunk {1} b.js (b) 203 bytes <{3}> >{6}< >{7}< >{8}< (prefetch: {6} {8}) (preload: {7}) [rendered] +chunk {2} c.js (c) 134 bytes <{3}> >{4}< >{5}< (preload: {4} {5}) [rendered] +chunk {3} main.js (main) 195 bytes >{0}< >{1}< >{2}< (prefetch: {0} {1} {2}) [entry] [rendered] +chunk {4} c1.js (c1) 0 bytes <{2}> [rendered] +chunk {5} c2.js (c2) 0 bytes <{2}> [rendered] +chunk {6} b1.js (b1) 0 bytes <{1}> [rendered] +chunk {7} b2.js (b2) 0 bytes <{1}> [rendered] +chunk {8} b3.js (b3) 0 bytes <{1}> [rendered] +chunk {9} a1.js (a1) 0 bytes <{0}> [rendered] +chunk {10} a2.js (a2) 0 bytes <{0}> [rendered]" +`; + +exports[`StatsTestCases should print correct stats for preload 1`] = ` +" Asset Size Chunks Chunk Names + preloaded.js 467 bytes 0 [emitted] preloaded + normal.js 130 bytes 1 [emitted] normal +preloaded2.js 127 bytes 2 [emitted] preloaded2 +preloaded3.js 130 bytes 3 [emitted] preloaded3 + main.js 10.1 KiB 4 [emitted] main + inner.js 136 bytes 5 [emitted] inner + inner2.js 201 bytes 6 [emitted] inner2 +Entrypoint main = main.js (preload: preloaded2.js preloaded.js preloaded3.js) +chunk {0} preloaded.js (preloaded) 226 bytes <{4}> >{5}< >{6}< (preload: {6} {5}) [rendered] +chunk {1} normal.js (normal) 0 bytes <{4}> [rendered] +chunk {2} preloaded2.js (preloaded2) 0 bytes <{4}> [rendered] +chunk {3} preloaded3.js (preloaded3) 0 bytes <{4}> [rendered] +chunk {4} main.js (main) 424 bytes >{0}< >{1}< >{2}< >{3}< (preload: {2} {0} {3}) [entry] [rendered] +chunk {5} inner.js (inner) 0 bytes <{0}> [rendered] +chunk {6} inner2.js (inner2) 0 bytes <{0}> [rendered]" +`; + +exports[`StatsTestCases should print correct stats for preset-detailed 1`] = ` +"Hash: 2eb3274d0272da6a7a14 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + 0.js 152 bytes 0 [emitted] + 1.js 289 bytes 1 [emitted] +main.js 8.5 KiB 2 [emitted] main + 3.js 227 bytes 3 [emitted] +Entrypoint main = main.js +chunk {0} 0.js 22 bytes <{2}> [rendered] + > ./b [4] ./index.js 2:0-16 +chunk {1} 1.js 54 bytes <{2}> >{3}< [rendered] + > ./c [4] ./index.js 3:0-16 +chunk {2} main.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] + > ./index main +chunk {3} 3.js 44 bytes <{1}> [rendered] + > [3] ./c.js 1:0-52 +[0] ./d.js 22 bytes {3} [depth 2] [built] + ModuleConcatenation bailout: Module is not an ECMAScript module +[1] ./e.js 22 bytes {3} [depth 2] [built] + ModuleConcatenation bailout: Module is not an ECMAScript module +[2] ./b.js 22 bytes {0} [depth 1] [built] + ModuleConcatenation bailout: Module is not an ECMAScript module +[3] ./c.js 54 bytes {1} [depth 1] [built] + ModuleConcatenation bailout: Module is not an ECMAScript module +[4] ./index.js 51 bytes {2} [depth 0] [built] + ModuleConcatenation bailout: Module is not an ECMAScript module +[5] ./a.js 22 bytes {2} [depth 1] [built] + ModuleConcatenation bailout: Module is not an ECMAScript module" +`; + +exports[`StatsTestCases should print correct stats for preset-errors-only 1`] = `""`; + +exports[`StatsTestCases should print correct stats for preset-errors-only-error 1`] = ` +" +ERROR in ./index.js +Module not found: Error: Can't resolve 'does-not-exist' in 'Xdir/preset-errors-only-error' + @ ./index.js 1:0-25" +`; + +exports[`StatsTestCases should print correct stats for preset-minimal 1`] = `" 6 modules"`; + +exports[`StatsTestCases should print correct stats for preset-minimal-simple 1`] = `" 1 module"`; + +exports[`StatsTestCases should print correct stats for preset-mixed-array 1`] = ` +"Child minimal: + 1 module +Child verbose: + Entrypoint main = main.js + [0] ./index.js 8 bytes {0} [built]" +`; + +exports[`StatsTestCases should print correct stats for preset-none 1`] = `""`; + +exports[`StatsTestCases should print correct stats for preset-none-array 1`] = `""`; + +exports[`StatsTestCases should print correct stats for preset-none-error 1`] = `""`; + +exports[`StatsTestCases should print correct stats for preset-normal 1`] = ` +"Hash: 2eb3274d0272da6a7a14 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + 0.js 152 bytes 0 [emitted] + 1.js 289 bytes 1 [emitted] +main.js 8.5 KiB 2 [emitted] main + 3.js 227 bytes 3 [emitted] +Entrypoint main = main.js +[0] ./d.js 22 bytes {3} [built] +[1] ./e.js 22 bytes {3} [built] +[2] ./b.js 22 bytes {0} [built] +[3] ./c.js 54 bytes {1} [built] +[4] ./index.js 51 bytes {2} [built] +[5] ./a.js 22 bytes {2} [built]" +`; + +exports[`StatsTestCases should print correct stats for preset-normal-performance 1`] = ` +"Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + 0.js 152 bytes 0 [emitted] + 1.js 289 bytes 1 [emitted] +main.js 301 KiB 2 [emitted] [big] main + 3.js 227 bytes 3 [emitted] +Entrypoint main [big] = main.js +[0] ./d.js 22 bytes {3} [built] +[1] ./e.js 22 bytes {3} [built] +[2] ./b.js 22 bytes {0} [built] +[3] ./c.js 54 bytes {1} [built] +[4] ./index.js 52 bytes {2} [built] +[5] ./a.js 293 KiB {2} [built] + +WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). +This can impact web performance. +Assets: + main.js (301 KiB) + +WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance. +Entrypoints: + main (301 KiB) + main.js +" +`; + +exports[`StatsTestCases should print correct stats for preset-normal-performance-ensure-filter-sourcemaps 1`] = ` +"Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + 0.js 182 bytes 0 [emitted] + 1.js 319 bytes 1 [emitted] + main.js 301 KiB 2 [emitted] [big] main + 3.js 257 bytes 3 [emitted] + 0.js.map 156 bytes 0 [emitted] + 1.js.map 197 bytes 1 [emitted] +main.js.map 1.72 MiB 2 [emitted] main + 3.js.map 214 bytes 3 [emitted] +Entrypoint main [big] = main.js main.js.map +[0] ./d.js 22 bytes {3} [built] +[1] ./e.js 22 bytes {3} [built] +[2] ./b.js 22 bytes {0} [built] +[3] ./c.js 54 bytes {1} [built] +[4] ./index.js 52 bytes {2} [built] +[5] ./a.js 293 KiB {2} [built] + +WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). +This can impact web performance. +Assets: + main.js (301 KiB) + +WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance. +Entrypoints: + main (301 KiB) + main.js +" +`; + +exports[`StatsTestCases should print correct stats for preset-verbose 1`] = ` +"Hash: 2eb3274d0272da6a7a14 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + 0.js 152 bytes 0 [emitted] + 1.js 289 bytes 1 [emitted] +main.js 8.5 KiB 2 [emitted] main + 3.js 227 bytes 3 [emitted] +Entrypoint main = main.js +chunk {0} 0.js 22 bytes <{2}> [rendered] + > ./b [4] ./index.js 2:0-16 + [2] ./b.js 22 bytes {0} [depth 1] [built] + ModuleConcatenation bailout: Module is not an ECMAScript module + amd require ./b [4] ./index.js 2:0-16 + [4] Xms -> factory:Xms building:Xms = Xms +chunk {1} 1.js 54 bytes <{2}> >{3}< [rendered] + > ./c [4] ./index.js 3:0-16 + [3] ./c.js 54 bytes {1} [depth 1] [built] + ModuleConcatenation bailout: Module is not an ECMAScript module + amd require ./c [4] ./index.js 3:0-16 + [4] Xms -> factory:Xms building:Xms = Xms +chunk {2} main.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] + > ./index main + [4] ./index.js 51 bytes {2} [depth 0] [built] + ModuleConcatenation bailout: Module is not an ECMAScript module + single entry ./index main + factory:Xms building:Xms = Xms + [5] ./a.js 22 bytes {2} [depth 1] [built] + ModuleConcatenation bailout: Module is not an ECMAScript module + cjs require ./a [4] ./index.js 1:0-14 + [4] Xms -> factory:Xms building:Xms = Xms +chunk {3} 3.js 44 bytes <{1}> [rendered] + > [3] ./c.js 1:0-52 + [0] ./d.js 22 bytes {3} [depth 2] [built] + ModuleConcatenation bailout: Module is not an ECMAScript module + require.ensure item ./d [3] ./c.js 1:0-52 + [4] Xms -> [3] Xms -> factory:Xms building:Xms = Xms + [1] ./e.js 22 bytes {3} [depth 2] [built] + ModuleConcatenation bailout: Module is not an ECMAScript module + require.ensure item ./e [3] ./c.js 1:0-52 + [4] Xms -> [3] Xms -> factory:Xms building:Xms = Xms" +`; + +exports[`StatsTestCases should print correct stats for resolve-plugin-context 1`] = ` +"Hash: f866085f4874b382c7c6 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +bundle.js 3.97 KiB 0 [emitted] main +Entrypoint main = bundle.js +[0] ./node_modules/xyz/index.js 0 bytes {0} [built] +[1] ./index.js 48 bytes {0} [built] +[2] ./node_modules/abc/index.js 16 bytes {0} [built] +[3] ./node_modules/def/index.js 16 bytes {0} [built] +[4] ./node_modules/def/node_modules/xyz/index.js 0 bytes {0} [built]" +`; + +exports[`StatsTestCases should print correct stats for reverse-sort-modules 1`] = ` +"Hash: 8e1f6d7b7886c5f4617d +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +main.js 6.81 KiB 0 [emitted] main +Entrypoint main = main.js +[29] ./c.js?10 33 bytes {0} [built] +[27] ./c.js?9 33 bytes {0} [built] +[25] ./c.js?8 33 bytes {0} [built] +[23] ./c.js?7 33 bytes {0} [built] +[19] ./c.js?5 33 bytes {0} [built] +[17] ./c.js?4 33 bytes {0} [built] +[15] ./c.js?3 33 bytes {0} [built] +[13] ./c.js?2 33 bytes {0} [built] +[11] ./c.js?1 33 bytes {0} [built] +[10] ./index.js 181 bytes {0} [built] + [9] ./a.js?10 33 bytes {0} [built] + [8] ./a.js?9 33 bytes {0} [built] + [7] ./a.js?8 33 bytes {0} [built] + [6] ./a.js?7 33 bytes {0} [built] + [5] ./a.js?6 33 bytes {0} [built] + [4] ./a.js?5 33 bytes {0} [built] + [3] ./a.js?4 33 bytes {0} [built] + [2] ./a.js?3 33 bytes {0} [built] + [1] ./a.js?2 33 bytes {0} [built] + [0] ./a.js?1 33 bytes {0} [built] + + 11 hidden modules" +`; + +exports[`StatsTestCases should print correct stats for runtime-chunk 1`] = ` +"Entrypoint e1 = runtime~e1.js e1.js +Entrypoint e2 = runtime~e2.js e2.js" +`; + +exports[`StatsTestCases should print correct stats for runtime-chunk-integration 1`] = ` +"Child base: + Asset Size Chunks Chunk Names + 0.js 719 bytes 0 [emitted] + main1.js 542 bytes 1 [emitted] main1 + runtime.js 8.95 KiB 2 [emitted] runtime + Entrypoint main1 = runtime.js main1.js + [0] ./b.js 20 bytes {0} [built] + [1] ./c.js 20 bytes {0} [built] + [2] ./d.js 20 bytes {0} [built] + [3] ./main1.js 66 bytes {1} [built] +Child manifest is named entry: + Asset Size Chunks Chunk Names + 0.js 719 bytes 0 [emitted] + manifest.js 9.26 KiB 1 [emitted] manifest + main1.js 542 bytes 2 [emitted] main1 + Entrypoint main1 = manifest.js main1.js + Entrypoint manifest = manifest.js + [0] ./b.js 20 bytes {0} [built] + [1] ./c.js 20 bytes {0} [built] + [2] ./d.js 20 bytes {0} [built] + [3] ./main1.js 66 bytes {2} [built] + [4] ./f.js 20 bytes {1} [built]" +`; + +exports[`StatsTestCases should print correct stats for runtime-chunk-issue-7382 1`] = ` +"Entrypoint e1 = runtime.js all.js e1.js +Entrypoint e2 = runtime.js all.js e2.js" +`; + +exports[`StatsTestCases should print correct stats for runtime-chunk-single 1`] = ` +"Entrypoint e1 = runtime.js e1.js +Entrypoint e2 = runtime.js e2.js" +`; + +exports[`StatsTestCases should print correct stats for scope-hoisting-bailouts 1`] = ` +"Hash: df49e15bdf57c432360e +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT +Entrypoint index = index.js +Entrypoint entry = entry.js +[0] ./entry.js 32 bytes {1} {2} [built] + ModuleConcatenation bailout: Module is an entry point +[1] ./ref-from-cjs.js 45 bytes {1} [built] + ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./cjs.js (referenced with cjs require) +[2] external \\"external\\" 42 bytes {1} [built] + ModuleConcatenation bailout: Module is not an ECMAScript module +[3] ./concatenated.js + 2 modules 116 bytes {0} [built] + ModuleConcatenation bailout: Cannot concat with external \\"external\\" (<- Module is not an ECMAScript module) + | ./concatenated.js 26 bytes [built] + | ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./index.js (referenced with import()) + | ./concatenated1.js 37 bytes [built] + | ./concatenated2.js 48 bytes [built] +[4] ./index.js 176 bytes {1} [built] + ModuleConcatenation bailout: Module is an entry point +[5] ./cjs.js 59 bytes {1} [built] + ModuleConcatenation bailout: Module is not an ECMAScript module +[6] ./eval.js 35 bytes {1} [built] + ModuleConcatenation bailout: Module uses eval() +[7] ./injected-vars.js 40 bytes {1} [built] + ModuleConcatenation bailout: Module uses injected variables (__dirname, __filename) +[8] ./module-id.js 26 bytes {1} [built] + ModuleConcatenation bailout: Module uses module.id +[9] ./module-loaded.js 30 bytes {1} [built] + ModuleConcatenation bailout: Module uses module.loaded" +`; + +exports[`StatsTestCases should print correct stats for scope-hoisting-multi 1`] = ` +"Hash: f47bea8ea571296b32b82a4cd6b69820dd6e8c36 +Child + Hash: f47bea8ea571296b32b8 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Entrypoint first = vendor.js first.js + Entrypoint second = vendor.js second.js + [0] ./common_lazy_shared.js 25 bytes {0} {1} {2} [built] + [1] ./common2.js 25 bytes {4} {5} [built] + [2] ./common_lazy.js 25 bytes {1} {2} [built] + [3] ./common.js 37 bytes {4} {5} [built] + [4] ./lazy_shared.js 31 bytes {0} [built] + [5] ./vendor.js 25 bytes {3} [built] + [6] ./lazy_first.js 55 bytes {2} [built] + [7] ./lazy_second.js 55 bytes {1} [built] + [8] ./first.js 207 bytes {4} [built] + [9] ./module_first.js 31 bytes {4} [built] + [10] ./second.js 177 bytes {5} [built] +Child + Hash: 2a4cd6b69820dd6e8c36 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Entrypoint first = vendor.js first.js + Entrypoint second = vendor.js second.js + [0] ./common_lazy_shared.js 25 bytes {0} {1} {2} [built] + [1] ./common_lazy.js 25 bytes {1} {2} [built] + [2] ./common.js + 1 modules 62 bytes {4} {5} [built] + | ./common.js 37 bytes [built] + | ./common2.js 25 bytes [built] + [3] ./vendor.js 25 bytes {3} [built] + [4] ./lazy_shared.js 31 bytes {0} [built] + ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./first.js (referenced with import()), ./second.js (referenced with import()) + [5] ./lazy_second.js 55 bytes {1} [built] + ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./second.js (referenced with import()) + [6] ./second.js 177 bytes {5} [built] + ModuleConcatenation bailout: Module is an entry point + [7] ./first.js + 1 modules 248 bytes {4} [built] + ModuleConcatenation bailout: Cannot concat with ./common.js + ModuleConcatenation bailout: Cannot concat with ./vendor.js + | ./first.js 207 bytes [built] + | ModuleConcatenation bailout: Module is an entry point + | ./module_first.js 31 bytes [built] + [8] ./lazy_first.js 55 bytes {2} [built] + ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./first.js (referenced with import())" +`; + +exports[`StatsTestCases should print correct stats for side-effects-issue-7428 1`] = ` +"Hash: b1ef68bcfacb3ad18417 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + 0.js 481 bytes 0 [emitted] +main.js 9.53 KiB 1 [emitted] main +Entrypoint main = main.js +[0] ./components/src/CompAB/utils.js 97 bytes {1} [built] + harmony side effect evaluation ./utils [1] ./main.js + 1 modules 1:0-30 + harmony import specifier ./utils [1] ./main.js + 1 modules 5:2-5 + harmony side effect evaluation ./utils [4] ./components/src/CompAB/CompA.js 1:0-35 + harmony import specifier ./utils [4] ./components/src/CompAB/CompA.js 5:5-12 +[1] ./main.js + 1 modules 231 bytes {1} [built] + single entry ./main.js main + | ./main.js 144 bytes [built] + | single entry ./main.js main + | ./components/src/CompAB/CompB.js 77 bytes [built] + | [only some exports used: default] + | harmony import specifier ./components ./main.js 4:15-20 (skipped side-effect-free modules) + | harmony side effect evaluation ./CompB [7] ./components/src/CompAB/index.js 2:0-43 + | harmony export imported specifier ./CompB [7] ./components/src/CompAB/index.js 2:0-43 +[2] ./components/src/index.js 84 bytes [built] + [no exports used] + harmony side effect evaluation ./components [1] ./main.js + 1 modules 1:0-44 + harmony side effect evaluation ./components [3] ./foo.js 1:0-37 +[3] ./foo.js 101 bytes {0} [built] + import() ./foo ./main.js 6:0-15 +[4] ./components/src/CompAB/CompA.js 89 bytes {1} [built] + [only some exports used: default] + harmony import specifier ./components ./main.js 3:15-20 (skipped side-effect-free modules) + harmony import specifier ./components [3] ./foo.js 3:20-25 (skipped side-effect-free modules) + harmony side effect evaluation ./CompA [7] ./components/src/CompAB/index.js 1:0-43 + harmony export imported specifier ./CompA [7] ./components/src/CompAB/index.js 1:0-43 +[5] ./components/src/CompC/CompC.js 33 bytes [built] + [no exports used] + harmony side effect evaluation ./CompC [6] ./components/src/CompC/index.js 1:0-34 + harmony export imported specifier ./CompC [6] ./components/src/CompC/index.js 1:0-34 +[6] ./components/src/CompC/index.js 34 bytes [built] + [no exports used] + harmony side effect evaluation ./CompC [2] ./components/src/index.js 2:0-43 + harmony export imported specifier ./CompC [2] ./components/src/index.js 2:0-43 +[7] ./components/src/CompAB/index.js 87 bytes [built] + [no exports used] + harmony side effect evaluation ./CompAB [2] ./components/src/index.js 1:0-40 + harmony export imported specifier ./CompAB [2] ./components/src/index.js 1:0-40 + harmony export imported specifier ./CompAB [2] ./components/src/index.js 1:0-40" +`; + +exports[`StatsTestCases should print correct stats for side-effects-simple-unused 1`] = ` +"Hash: 98f9f698f299e2fa69de +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +main.js 3.9 KiB 0 [emitted] main +Entrypoint main = main.js +[0] ./node_modules/pmodule/b.js 69 bytes [built] + [no exports used] +[1] ./node_modules/pmodule/a.js 60 bytes [built] + [no exports used] +[2] ./index.js + 2 modules 158 bytes {0} [built] + | ./index.js 55 bytes [built] + | ./node_modules/pmodule/index.js 75 bytes [built] + | [only some exports used: default] + | ./node_modules/pmodule/c.js 28 bytes [built] + | [only some exports used: z]" +`; + +exports[`StatsTestCases should print correct stats for simple 1`] = ` +"Hash: 06cc914b885215f96c5a +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +bundle.js 3.75 KiB main [emitted] main +Entrypoint main = bundle.js +[./index.js] 0 bytes {main} [built]" +`; + +exports[`StatsTestCases should print correct stats for simple-more-info 1`] = ` +"Hash: c8c226a954f967e61630 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +bundle.js 3.57 KiB 0 [emitted] main +Entrypoint main = bundle.js +[0] ./index.js 0 bytes {0} [built] + single entry ./index main + factory:Xms building:Xms = Xms" +`; + +exports[`StatsTestCases should print correct stats for split-chunks 1`] = ` +"Child default: + Entrypoint main = default/main.js + Entrypoint a = default/a.js + Entrypoint b = default/b.js + Entrypoint c = default/c.js + chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{9}> ={1}= ={2}= ={3}= ={5}= ={6}= ={7}= ={8}= >{2}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] + chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={5}= ={6}= ={7}= ={8}= >{2}< >{4}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{5}> <{9}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + > ./g [] 6:0-47 + > ./g [] 6:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [2] ./f.js 20 bytes {2} {11} {12} [built] + chunk {3} default/vendors~async-a~async-b.js (vendors~async-a~async-b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={5}= ={6}= >{2}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] + chunk {4} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{5}> ={2}= [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [9] ./g.js 34 bytes {4} [built] + chunk {5} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{4}< [rendered] + > ./a [8] ./index.js 1:0-47 + [7] ./a.js + 1 modules 156 bytes {5} {10} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {6} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] + > ./b [8] ./index.js 2:0-47 + [5] ./b.js 72 bytes {6} {11} [built] + chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={8}= [rendered] + > ./c [8] ./index.js 3:0-47 + [6] ./c.js 72 bytes {7} {12} [built] + chunk {8} default/vendors~async-c.js (vendors~async-c) 20 bytes <{9}> ={0}= ={1}= ={2}= ={7}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c) + > ./c [8] ./index.js 3:0-47 + [4] ./node_modules/z.js 20 bytes {8} {12} [built] + chunk {9} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{5}< >{6}< >{7}< >{8}< [entry] [rendered] + > ./ main + [8] ./index.js 147 bytes {9} [built] + chunk {10} default/a.js (a) 216 bytes >{2}< >{4}< [entry] [rendered] + > ./a a + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] + [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] + [7] ./a.js + 1 modules 156 bytes {5} {10} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {11} default/b.js (b) 152 bytes [entry] [rendered] + > ./b b + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] + [2] ./f.js 20 bytes {2} {11} {12} [built] + [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] + [5] ./b.js 72 bytes {6} {11} [built] + chunk {12} default/c.js (c) 152 bytes [entry] [rendered] + > ./c c + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] + [2] ./f.js 20 bytes {2} {11} {12} [built] + [4] ./node_modules/z.js 20 bytes {8} {12} [built] + [6] ./c.js 72 bytes {7} {12} [built] +Child all-chunks: + Entrypoint main = default/main.js + Entrypoint a = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~a~async-a~async-b~b.js default/a.js + Entrypoint b = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~a~async-a~async-b~b.js default/b.js + Entrypoint c = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~async-c~c.js default/c.js + chunk {0} default/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) + > ./a a + > ./b b + > ./c c + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [2] ./node_modules/x.js 20 bytes {0} [built] + chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{6}> <{9}> ={0}= ={1}= ={3}= ={4}= ={5}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + > ./g [] 6:0-47 + > ./g [] 6:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [1] ./f.js 20 bytes {2} {11} {12} [built] + chunk {3} default/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={10}= ={11}= ={2}= ={6}= ={7}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) + > ./a a + > ./b b + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + [3] ./node_modules/y.js 20 bytes {3} [built] + chunk {4} default/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={8}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + > ./c c + > ./c [8] ./index.js 3:0-47 + [7] ./node_modules/z.js 20 bytes {4} [built] + chunk {5} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{6}> ={2}= [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [9] ./g.js 34 bytes {5} [built] + chunk {6} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{5}< [rendered] + > ./a [8] ./index.js 1:0-47 + [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {7} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] + > ./b [8] ./index.js 2:0-47 + [4] ./b.js 72 bytes {7} {11} [built] + chunk {8} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] + > ./c [8] ./index.js 3:0-47 + [5] ./c.js 72 bytes {8} {12} [built] + chunk {9} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{6}< >{7}< >{8}< [entry] [rendered] + > ./ main + [8] ./index.js 147 bytes {9} [built] + chunk {10} default/a.js (a) 176 bytes ={0}= ={3}= >{2}< >{5}< [entry] [rendered] + > ./a a + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {11} default/b.js (b) 112 bytes ={0}= ={3}= [entry] [rendered] + > ./b b + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./f.js 20 bytes {2} {11} {12} [built] + [4] ./b.js 72 bytes {7} {11} [built] + chunk {12} default/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] + > ./c c + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./f.js 20 bytes {2} {11} {12} [built] + [5] ./c.js 72 bytes {8} {12} [built] +Child manual: + Entrypoint main = default/main.js + Entrypoint a = default/vendors.js default/a.js + Entrypoint b = default/vendors.js default/b.js + Entrypoint c = default/vendors.js default/c.js + chunk {0} default/vendors.js (vendors) 112 bytes <{5}> ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{1}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) + > ./a a + > ./b b + > ./c c + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [2] ./node_modules/x.js 20 bytes {0} [built] + [3] ./node_modules/y.js 20 bytes {0} [built] + [6] ./node_modules/z.js 20 bytes {0} [built] + [10] multi x y z 52 bytes {0} [built] + chunk {1} default/async-g.js (async-g) 54 bytes <{0}> <{2}> <{6}> [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] + [9] ./g.js 34 bytes {1} [built] + chunk {2} default/async-a.js (async-a) 176 bytes <{5}> ={0}= >{1}< [rendered] + > ./a [8] ./index.js 1:0-47 + [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] + [7] ./a.js + 1 modules 156 bytes {2} {6} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {3} default/async-b.js (async-b) 112 bytes <{5}> ={0}= [rendered] + > ./b [8] ./index.js 2:0-47 + [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] + [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] + [4] ./b.js 72 bytes {3} {7} [built] + chunk {4} default/async-c.js (async-c) 112 bytes <{5}> ={0}= [rendered] + > ./c [8] ./index.js 3:0-47 + [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] + [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] + [5] ./c.js 72 bytes {4} {8} [built] + chunk {5} default/main.js (main) 147 bytes >{0}< >{2}< >{3}< >{4}< [entry] [rendered] + > ./ main + [8] ./index.js 147 bytes {5} [built] + chunk {6} default/a.js (a) 176 bytes ={0}= >{1}< [entry] [rendered] + > ./a a + [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] + [7] ./a.js + 1 modules 156 bytes {2} {6} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {7} default/b.js (b) 112 bytes ={0}= [entry] [rendered] + > ./b b + [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] + [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] + [4] ./b.js 72 bytes {3} {7} [built] + chunk {8} default/c.js (c) 112 bytes ={0}= [entry] [rendered] + > ./c c + [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] + [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] + [5] ./c.js 72 bytes {4} {8} [built] +Child name-too-long: + Entrypoint main = main.js + Entrypoint aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f.js vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.js + Entrypoint bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f.js vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793.js async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc.js bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js + Entrypoint cccccccccccccccccccccccccccccc = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f.js vendors~async-c~cccccccccccccccccccccccccccccc.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793.js async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc.js cccccccccccccccccccccccccccccc.js + chunk {0} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f) 20 bytes <{9}> ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={7}= ={8}= >{2}< >{6}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f) + > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + > ./c cccccccccccccccccccccccccccccc + > ./a [7] ./index.js 1:0-47 + > ./b [7] ./index.js 2:0-47 + > ./c [7] ./index.js 3:0-47 + [2] ./node_modules/x.js 20 bytes {0} [built] + chunk {1} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793) 20 bytes <{9}> ={0}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={7}= ={8}= >{2}< >{6}< [initial] [rendered] split chunk (cache group: default) (name: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793) + > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + > ./c cccccccccccccccccccccccccccccc + > ./a [7] ./index.js 1:0-47 + > ./b [7] ./index.js 2:0-47 + > ./c [7] ./index.js 3:0-47 + [1] ./d.js 20 bytes {1} [built] + chunk {2} async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc.js (async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) 20 bytes <{0}> <{1}> <{10}> <{3}> <{5}> <{9}> ={0}= ={1}= ={11}= ={12}= ={3}= ={4}= ={6}= ={7}= ={8}= [initial] [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) + > ./g [] 6:0-47 + > ./g [] 6:0-47 + > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + > ./c cccccccccccccccccccccccccccccc + > ./b [7] ./index.js 2:0-47 + > ./c [7] ./index.js 3:0-47 + [0] ./f.js 20 bytes {2} [built] + chunk {3} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) 20 bytes <{9}> ={0}= ={1}= ={10}= ={11}= ={2}= ={5}= ={7}= >{2}< >{6}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) + > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + > ./a [7] ./index.js 1:0-47 + > ./b [7] ./index.js 2:0-47 + [3] ./node_modules/y.js 20 bytes {3} [built] + chunk {4} vendors~async-c~cccccccccccccccccccccccccccccc.js (vendors~async-c~cccccccccccccccccccccccccccccc) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={8}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~cccccccccccccccccccccccccccccc) + > ./c cccccccccccccccccccccccccccccc + > ./c [7] ./index.js 3:0-47 + [6] ./node_modules/z.js 20 bytes {4} [built] + chunk {5} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a) 156 bytes <{9}> ={0}= ={1}= ={10}= ={3}= >{2}< >{6}< [initial] [rendered] split chunk (cache group: default) (name: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a) + > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + > ./a [7] ./index.js 1:0-47 + [8] ./a.js + 1 modules 156 bytes {5} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {6} async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{5}> ={2}= [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [9] ./g.js 34 bytes {6} [built] + chunk {7} async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] + > ./b [7] ./index.js 2:0-47 + [4] ./b.js 72 bytes {7} {11} [built] + chunk {8} async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] + > ./c [7] ./index.js 3:0-47 + [5] ./c.js 72 bytes {8} {12} [built] + chunk {9} main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{7}< >{8}< [entry] [rendered] + > ./ main + [7] ./index.js 147 bytes {9} [built] + chunk {10} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) 0 bytes ={0}= ={1}= ={3}= ={5}= >{2}< >{6}< [entry] [rendered] + > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + chunk {11} bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js (bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) 72 bytes ={0}= ={1}= ={2}= ={3}= [entry] [rendered] + > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb + [4] ./b.js 72 bytes {7} {11} [built] + chunk {12} cccccccccccccccccccccccccccccc.js (cccccccccccccccccccccccccccccc) 72 bytes ={0}= ={1}= ={2}= ={4}= [entry] [rendered] + > ./c cccccccccccccccccccccccccccccc + [5] ./c.js 72 bytes {8} {12} [built] +Child custom-chunks-filter: + Entrypoint main = default/main.js + Entrypoint a = default/a.js + Entrypoint b = default/vendors~async-a~async-b~async-c~b~c.js default/vendors~async-a~async-b~b.js default/b.js + Entrypoint c = default/vendors~async-a~async-b~async-c~b~c.js default/vendors~async-c~c.js default/c.js + chunk {0} default/vendors~async-a~async-b~async-c~b~c.js (vendors~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={1}= ={11}= ={12}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c~b~c) + > ./b b + > ./c c + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [2] ./node_modules/x.js 20 bytes {0} {10} [built] + chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{6}> <{9}> ={0}= ={1}= ={3}= ={4}= ={5}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + > ./g [] 6:0-47 + > ./g [] 6:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [1] ./f.js 20 bytes {2} {11} {12} [built] + chunk {3} default/vendors~async-a~async-b~b.js (vendors~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={11}= ={2}= ={6}= ={7}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~b) + > ./b b + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + [3] ./node_modules/y.js 20 bytes {3} {10} [built] + chunk {4} default/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={8}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + > ./c c + > ./c [8] ./index.js 3:0-47 + [7] ./node_modules/z.js 20 bytes {4} [built] + chunk {5} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{6}> ={2}= [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [9] ./g.js 34 bytes {5} [built] + chunk {6} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{5}< [rendered] + > ./a [8] ./index.js 1:0-47 + [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {7} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] + > ./b [8] ./index.js 2:0-47 + [4] ./b.js 72 bytes {7} {11} [built] + chunk {8} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] + > ./c [8] ./index.js 3:0-47 + [5] ./c.js 72 bytes {8} {12} [built] + chunk {9} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{6}< >{7}< >{8}< [entry] [rendered] + > ./ main + [8] ./index.js 147 bytes {9} [built] + chunk {10} default/a.js (a) 216 bytes >{2}< >{5}< [entry] [rendered] + > ./a a + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [2] ./node_modules/x.js 20 bytes {0} {10} [built] + [3] ./node_modules/y.js 20 bytes {3} {10} [built] + [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {11} default/b.js (b) 112 bytes ={0}= ={3}= [entry] [rendered] + > ./b b + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./f.js 20 bytes {2} {11} {12} [built] + [4] ./b.js 72 bytes {7} {11} [built] + chunk {12} default/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] + > ./c c + [0] ./d.js 20 bytes {1} {10} {11} {12} [built] + [1] ./f.js 20 bytes {2} {11} {12} [built] + [5] ./c.js 72 bytes {8} {12} [built] +Child custom-chunks-filter-in-cache-groups: + Entrypoint main = default/main.js + Entrypoint a = default/a.js + Entrypoint b = default/vendors.js default/b.js + Entrypoint c = default/vendors.js default/c.js + chunk {0} default/vendors.js (vendors) 112 bytes <{5}> ={2}= ={3}= ={4}= ={7}= ={8}= >{1}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) + > ./b b + > ./c c + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [2] ./node_modules/x.js 20 bytes {0} {6} [built] + [3] ./node_modules/y.js 20 bytes {0} {6} [built] + [6] ./node_modules/z.js 20 bytes {0} [built] + [10] multi x y z 52 bytes {0} [built] + chunk {1} default/async-g.js (async-g) 54 bytes <{0}> <{2}> <{6}> [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] + [9] ./g.js 34 bytes {1} [built] + chunk {2} default/async-a.js (async-a) 176 bytes <{5}> ={0}= >{1}< [rendered] + > ./a [8] ./index.js 1:0-47 + [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] + [7] ./a.js + 1 modules 156 bytes {2} {6} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {3} default/async-b.js (async-b) 112 bytes <{5}> ={0}= [rendered] + > ./b [8] ./index.js 2:0-47 + [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] + [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] + [4] ./b.js 72 bytes {3} {7} [built] + chunk {4} default/async-c.js (async-c) 112 bytes <{5}> ={0}= [rendered] + > ./c [8] ./index.js 3:0-47 + [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] + [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] + [5] ./c.js 72 bytes {4} {8} [built] + chunk {5} default/main.js (main) 147 bytes >{0}< >{2}< >{3}< >{4}< [entry] [rendered] + > ./ main + [8] ./index.js 147 bytes {5} [built] + chunk {6} default/a.js (a) 216 bytes >{1}< [entry] [rendered] + > ./a a + [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] + [2] ./node_modules/x.js 20 bytes {0} {6} [built] + [3] ./node_modules/y.js 20 bytes {0} {6} [built] + [7] ./a.js + 1 modules 156 bytes {2} {6} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {7} default/b.js (b) 112 bytes ={0}= [entry] [rendered] + > ./b b + [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] + [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] + [4] ./b.js 72 bytes {3} {7} [built] + chunk {8} default/c.js (c) 112 bytes ={0}= [entry] [rendered] + > ./c c + [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] + [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] + [5] ./c.js 72 bytes {4} {8} [built]" +`; + +exports[`StatsTestCases should print correct stats for split-chunks-combinations 1`] = ` +"Entrypoint main = main.js +chunk {0} async-a~async-b.js (async-a~async-b) 134 bytes <{8}> ={1}= ={2}= [rendered] split chunk (cache group: default) (name: async-a~async-b) + > ./a [9] ./index.js 1:0-47 + > ./b [9] ./index.js 2:0-47 + [0] ./x.js 67 bytes {0} {3} {4} {5} {6} {7} [built] + [1] ./y.js 67 bytes {0} [built] +chunk {1} async-a.js (async-a) 48 bytes <{8}> ={0}= [rendered] + > ./a [9] ./index.js 1:0-47 + [2] ./a.js 48 bytes {1} [built] +chunk {2} async-b.js (async-b) 48 bytes <{8}> ={0}= [rendered] + > ./b [9] ./index.js 2:0-47 + [3] ./b.js 48 bytes {2} [built] +chunk {3} async-c.js (async-c) 101 bytes <{8}> [rendered] + > ./c [9] ./index.js 3:0-47 + [0] ./x.js 67 bytes {0} {3} {4} {5} {6} {7} [built] + [4] ./c.js 34 bytes {3} [built] +chunk {4} async-d.js (async-d) 101 bytes <{8}> [rendered] + > ./d [9] ./index.js 4:0-47 + [0] ./x.js 67 bytes {0} {3} {4} {5} {6} {7} [built] + [5] ./d.js 34 bytes {4} [built] +chunk {5} async-e.js (async-e) 101 bytes <{8}> [rendered] + > ./e [9] ./index.js 5:0-47 + [0] ./x.js 67 bytes {0} {3} {4} {5} {6} {7} [built] + [6] ./e.js 34 bytes {5} [built] +chunk {6} async-f.js (async-f) 101 bytes <{8}> [rendered] + > ./f [9] ./index.js 6:0-47 + [0] ./x.js 67 bytes {0} {3} {4} {5} {6} {7} [built] + [7] ./f.js 34 bytes {6} [built] +chunk {7} async-g.js (async-g) 101 bytes <{8}> [rendered] + > ./g [9] ./index.js 7:0-47 + [0] ./x.js 67 bytes {0} {3} {4} {5} {6} {7} [built] + [8] ./g.js 34 bytes {7} [built] +chunk {8} main.js (main) 343 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< [entry] [rendered] + > ./ main + [9] ./index.js 343 bytes {8} [built]" +`; + +exports[`StatsTestCases should print correct stats for split-chunks-issue-6413 1`] = ` +"Entrypoint main = main.js +chunk {0} vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{5}> ={1}= ={2}= ={3}= ={4}= [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) + > ./a [5] ./index.js 1:0-47 + > ./b [5] ./index.js 2:0-47 + > ./c [5] ./index.js 3:0-47 + [1] ./node_modules/x.js 20 bytes {0} [built] +chunk {1} async-a~async-b~async-c.js (async-a~async-b~async-c) 11 bytes <{5}> ={0}= ={2}= ={3}= ={4}= [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + > ./a [5] ./index.js 1:0-47 + > ./b [5] ./index.js 2:0-47 + > ./c [5] ./index.js 3:0-47 + [0] ./common.js 11 bytes {1} [built] +chunk {2} async-a.js (async-a) 19 bytes <{5}> ={0}= ={1}= [rendered] + > ./a [5] ./index.js 1:0-47 + [2] ./a.js 19 bytes {2} [built] +chunk {3} async-b.js (async-b) 19 bytes <{5}> ={0}= ={1}= [rendered] + > ./b [5] ./index.js 2:0-47 + [3] ./b.js 19 bytes {3} [built] +chunk {4} async-c.js (async-c) 19 bytes <{5}> ={0}= ={1}= [rendered] + > ./c [5] ./index.js 3:0-47 + [4] ./c.js 19 bytes {4} [built] +chunk {5} main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< [entry] [rendered] + > ./ main + [5] ./index.js 147 bytes {5} [built]" +`; + +exports[`StatsTestCases should print correct stats for split-chunks-issue-6696 1`] = ` +"Entrypoint main = vendors.js main.js +chunk {0} async-a.js (async-a) 32 bytes <{2}> <{3}> [rendered] + > ./a [3] ./index.js 2:0-47 + [0] ./node_modules/x.js 20 bytes {0} {1} [built] + [1] ./a.js 12 bytes {0} [built] +chunk {1} async-b.js (async-b) 32 bytes <{2}> <{3}> [rendered] + > ./b [3] ./index.js 3:0-47 + [0] ./node_modules/x.js 20 bytes {0} {1} [built] + [2] ./b.js 12 bytes {1} [built] +chunk {2} main.js (main) 110 bytes ={3}= >{0}< >{1}< [entry] [rendered] + > ./ main + [3] ./index.js 110 bytes {2} [built] +chunk {3} vendors.js (vendors) 20 bytes ={2}= >{0}< >{1}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) + > ./ main + [4] ./node_modules/y.js 20 bytes {3} [built]" +`; + +exports[`StatsTestCases should print correct stats for split-chunks-issue-7401 1`] = ` +"Entrypoint a = vendors~a~c.js a.js +Entrypoint b = b.js +Chunk Group c = vendors~a~c.js c.js +chunk {0} vendors~a~c.js (vendors~a~c) 20 bytes <{3}> ={1}= ={2}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~c) + > ./a a + > ./c [3] ./b.js 1:0-41 + [0] ./node_modules/x.js 20 bytes {0} [built] +chunk {1} c.js (c) 12 bytes <{3}> ={0}= [rendered] + > ./c [3] ./b.js 1:0-41 + [1] ./c.js 12 bytes {1} [built] +chunk {2} a.js (a) 12 bytes ={0}= [entry] [rendered] + > ./a a + [2] ./a.js 12 bytes {2} [built] +chunk {3} b.js (b) 43 bytes >{0}< >{1}< [entry] [rendered] + > ./b b + [3] ./b.js 43 bytes {3} [built]" +`; + +exports[`StatsTestCases should print correct stats for split-chunks-prefer-bigger-splits 1`] = ` +"Entrypoint main = default/main.js +chunk {0} default/async-b~async-c.js (async-b~async-c) 110 bytes <{4}> ={2}= ={3}= [rendered] split chunk (cache group: default) (name: async-b~async-c) + > ./b [6] ./index.js 2:0-47 + > ./c [6] ./index.js 3:0-47 + [0] ./d.js 43 bytes {0} {1} [built] + [2] ./f.js 67 bytes {0} [built] +chunk {1} default/async-a.js (async-a) 134 bytes <{4}> [rendered] + > ./a [6] ./index.js 1:0-47 + [0] ./d.js 43 bytes {0} {1} [built] + [1] ./e.js 43 bytes {1} {2} [built] + [3] ./a.js 48 bytes {1} [built] +chunk {2} default/async-b.js (async-b) 105 bytes <{4}> ={0}= [rendered] + > ./b [6] ./index.js 2:0-47 + [1] ./e.js 43 bytes {1} {2} [built] + [4] ./b.js 62 bytes {2} [built] +chunk {3} default/async-c.js (async-c) 48 bytes <{4}> ={0}= [rendered] + > ./c [6] ./index.js 3:0-47 + [5] ./c.js 48 bytes {3} [built] +chunk {4} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< [entry] [rendered] + > ./ main + [6] ./index.js 147 bytes {4} [built]" +`; + +exports[`StatsTestCases should print correct stats for tree-shaking 1`] = ` +"Hash: 7664ceef8f3f695c9688 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +bundle.js 8.23 KiB 0 [emitted] main +Entrypoint main = bundle.js + [0] ./a.js 13 bytes {0} [built] + [exports: a] + [all exports used] + [1] ./b.js 13 bytes {0} [built] + [exports: b] + [no exports used] + [2] ./unknown.js 0 bytes {0} [built] + [only some exports used: c] + [3] ./unknown2.js 0 bytes {0} [built] + [only some exports used: y] + [4] ./index.js 315 bytes {0} [built] + [no exports] + [5] ./require.include.js 36 bytes {0} [built] + [exports: a, default] + [no exports used] + [6] ./reexport-known.js 49 bytes {0} [built] + [exports: a, b] + [only some exports used: a] + [7] ./reexport-star-known.js 41 bytes {0} [built] + [exports: a, b] + [only some exports used: a] + [8] ./edge.js 45 bytes {0} [built] + [only some exports used: y] + [9] ./reexport-unknown.js 83 bytes {0} [built] + [exports: a, b, c, d] + [only some exports used: a, c] +[10] ./reexport-star-unknown.js 68 bytes {0} [built] + [only some exports used: a, c]" +`; + +exports[`StatsTestCases should print correct stats for warnings-uglifyjs 1`] = ` +"Hash: 1325fb5a846745d7ae89 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +bundle.js 2.89 KiB 0 [emitted] main +Entrypoint main = bundle.js +[0] ./index.js 299 bytes {0} [built] +[1] ./a.js 249 bytes {0} [built] +[2] (webpack)/buildin/module.js 497 bytes {0} [built] + +WARNING in bundle.js from UglifyJs +Dropping unused function someUnRemoteUsedFunction1 [./a.js:3,0] +Dropping unused function someUnRemoteUsedFunction2 [./a.js:4,0] +Dropping unused function someUnRemoteUsedFunction3 [./a.js:5,0] +Dropping unused function someUnRemoteUsedFunction4 [./a.js:6,0] +Dropping unused function someUnRemoteUsedFunction5 [./a.js:7,0]" +`; diff --git a/test/configCases/web/prefetch-preload/index.js b/test/configCases/web/prefetch-preload/index.js index 2d393f55a6b..9c0086c7a42 100644 --- a/test/configCases/web/prefetch-preload/index.js +++ b/test/configCases/web/prefetch-preload/index.js @@ -5,12 +5,14 @@ let oldPublicPath; beforeEach(() => { oldNonce = __webpack_nonce__; oldPublicPath = __webpack_public_path__; + global.location = {origin: "https://example.com"}; }); afterEach(() => { __webpack_nonce__ = oldNonce; __webpack_public_path__ = oldPublicPath; -}) + delete global.location; +}); it("should prefetch and preload child chunks on chunk load", () => { __webpack_nonce__ = "nonce"; From 2755a0e82bf41ca068d5f1bdca7bff459993ca94 Mon Sep 17 00:00:00 2001 From: Ryan Tsao Date: Tue, 12 Jun 2018 14:34:23 -0700 Subject: [PATCH 035/310] Remove redundant code after merge --- lib/web/JsonpMainTemplatePlugin.js | 6 --- .../__snapshots__/StatsTestCases.test.js.snap | 52 +++++++++---------- 2 files changed, 26 insertions(+), 32 deletions(-) diff --git a/lib/web/JsonpMainTemplatePlugin.js b/lib/web/JsonpMainTemplatePlugin.js index 1f7a7114261..2890f44af45 100644 --- a/lib/web/JsonpMainTemplatePlugin.js +++ b/lib/web/JsonpMainTemplatePlugin.js @@ -169,12 +169,6 @@ class JsonpMainTemplatePlugin { "}" ]) : "", - "var timeout = setTimeout(function(){", - Template.indent([ - "onScriptComplete({ type: 'timeout', target: script });" - ]), - `}, ${chunkLoadTimeout});`, - "script.onerror = script.onload = onScriptComplete;", "onScriptComplete = function (event) {", Template.indent([ "// avoid mem leaks in IE.", diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index a43663f0009..b3b1a41b685 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -8,7 +8,7 @@ Child fitting: Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 9ac13fb7087e9ff1b93e.js 1.05 KiB 0 [emitted] - 2b4c8b62a524452d2de1.js 11.3 KiB 1 [emitted] + 2b4c8b62a524452d2de1.js 11.1 KiB 1 [emitted] d1ba53816ff760e185b0.js 1.94 KiB 2 [emitted] 7b5b0a943e9362bc88c6.js 1.94 KiB 3 [emitted] Entrypoint main = d1ba53816ff760e185b0.js 7b5b0a943e9362bc88c6.js 2b4c8b62a524452d2de1.js @@ -34,7 +34,7 @@ Child content-change: Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 9ac13fb7087e9ff1b93e.js 1.05 KiB 0 [emitted] - 2b4c8b62a524452d2de1.js 11.3 KiB 1 [emitted] + 2b4c8b62a524452d2de1.js 11.1 KiB 1 [emitted] d1ba53816ff760e185b0.js 1.94 KiB 2 [emitted] 7b5b0a943e9362bc88c6.js 1.94 KiB 3 [emitted] Entrypoint main = d1ba53816ff760e185b0.js 7b5b0a943e9362bc88c6.js 2b4c8b62a524452d2de1.js @@ -71,7 +71,7 @@ d6418937dfae4b3ee922.js 1 KiB 1 [emitted] 685acdc95ff4af957f47.js 1 KiB 7 [emitted] 606f48c13070850338b1.js 1.94 KiB 8 [emitted] c5a8eae840969538f450.js 1.94 KiB 9 [emitted] -7bf22146f3e40919bde5.js 9.9 KiB 10 [emitted] main +7bf22146f3e40919bde5.js 9.7 KiB 10 [emitted] main fcdf398c8972e4dcf788.js 1.94 KiB 11 [emitted] Entrypoint main = 7bf22146f3e40919bde5.js chunk {0} fd868baa40dab4fc30fd.js 1.76 KiB <{10}> ={1}= ={2}= ={3}= ={7}= ={9}= [recorded] aggressive splitted @@ -498,7 +498,7 @@ Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.bundle.js 152 bytes 0 [emitted] 1.bundle.js 289 bytes 1 [emitted] - bundle.js 8.49 KiB 2 [emitted] main + bundle.js 8.29 KiB 2 [emitted] main 3.bundle.js 227 bytes 3 [emitted] Entrypoint main = bundle.js chunk {0} 0.bundle.js 22 bytes <{2}> [rendered] @@ -537,7 +537,7 @@ Built at: Thu Jan 01 1970 00:00:00 GMT 0.bundle.js 433 bytes 0 [emitted] 1.bundle.js 297 bytes 1 [emitted] 2.bundle.js 588 bytes 2 [emitted] - bundle.js 8.87 KiB main [emitted] main + bundle.js 8.67 KiB main [emitted] main Entrypoint main = bundle.js chunk {main} bundle.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] > ./index main @@ -985,7 +985,7 @@ Built at: Thu Jan 01 1970 00:00:00 GMT 0.js 305 bytes 0 [emitted] 1.js 314 bytes 1 [emitted] 2.js 308 bytes 2 [emitted] -entry.js 9.28 KiB 3 [emitted] entry +entry.js 9.08 KiB 3 [emitted] entry Entrypoint entry = entry.js [0] ./templates/bar.js 38 bytes {0} [optional] [built] [1] ./templates/baz.js 38 bytes {1} [optional] [built] @@ -1000,7 +1000,7 @@ Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.js 149 bytes 0 [emitted] -entry.js 8.73 KiB 1 [emitted] entry +entry.js 8.53 KiB 1 [emitted] entry Entrypoint entry = entry.js [0] ./modules/b.js 22 bytes {0} [built] [1] ./entry.js 120 bytes {1} [built] @@ -1051,7 +1051,7 @@ Child 2 chunks: Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.bundle.js 632 bytes 0 [emitted] - bundle.js 8.49 KiB 1 [emitted] main + bundle.js 8.28 KiB 1 [emitted] main Entrypoint main = bundle.js chunk {0} 0.bundle.js 118 bytes <{0}> <{1}> >{0}< [rendered] [0] ./d.js 22 bytes {0} [built] @@ -1068,7 +1068,7 @@ Child 3 chunks: Asset Size Chunks Chunk Names 0.bundle.js 494 bytes 0 [emitted] 1.bundle.js 245 bytes 1 [emitted] - bundle.js 8.49 KiB 2 [emitted] main + bundle.js 8.28 KiB 2 [emitted] main Entrypoint main = bundle.js chunk {0} 0.bundle.js 74 bytes <{0}> <{2}> >{0}< >{1}< [rendered] [0] ./d.js 22 bytes {0} [built] @@ -1087,7 +1087,7 @@ Child 4 chunks: 0.bundle.js 236 bytes 0 [emitted] 1.bundle.js 245 bytes 1 [emitted] 2.bundle.js 323 bytes 2 [emitted] - bundle.js 8.49 KiB 3 [emitted] main + bundle.js 8.28 KiB 3 [emitted] main Entrypoint main = bundle.js chunk {0} 0.bundle.js 44 bytes <{2}> <{3}> [rendered] [0] ./d.js 22 bytes {0} [built] @@ -1179,9 +1179,9 @@ exports[`StatsTestCases should print correct stats for module-deduplication 1`] 3.js 661 bytes 3 [emitted] 4.js 661 bytes 4 [emitted] 5.js 661 bytes 5 [emitted] -e1.js 9.63 KiB 6 [emitted] e1 -e2.js 9.65 KiB 7 [emitted] e2 -e3.js 9.67 KiB 8 [emitted] e3 +e1.js 9.42 KiB 6 [emitted] e1 +e2.js 9.44 KiB 7 [emitted] e2 +e3.js 9.46 KiB 8 [emitted] e3 Entrypoint e1 = e1.js Entrypoint e2 = e2.js Entrypoint e3 = e3.js @@ -1225,9 +1225,9 @@ exports[`StatsTestCases should print correct stats for module-deduplication-name async3.js 818 bytes 0 [emitted] async3 async1.js 818 bytes 1 [emitted] async1 async2.js 818 bytes 2 [emitted] async2 - e1.js 9.51 KiB 3 [emitted] e1 - e2.js 9.53 KiB 4 [emitted] e2 - e3.js 9.55 KiB 5 [emitted] e3 + e1.js 9.31 KiB 3 [emitted] e1 + e2.js 9.33 KiB 4 [emitted] e2 + e3.js 9.35 KiB 5 [emitted] e3 Entrypoint e1 = e1.js Entrypoint e2 = e2.js Entrypoint e3 = e3.js @@ -1359,7 +1359,7 @@ Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names chunk-containing-__a_js.js 313 bytes chunk-containing-__a_js [emitted] chunk-containing-__b_js.js 173 bytes chunk-containing-__b_js [emitted] - entry.js 8.39 KiB entry [emitted] entry + entry.js 8.18 KiB entry [emitted] entry Entrypoint entry = entry.js [0] ./modules/b.js 22 bytes {chunk-containing-__b_js} [built] [1] ./modules/a.js 37 bytes {chunk-containing-__a_js} [built] @@ -1397,7 +1397,7 @@ Built at: Thu Jan 01 1970 00:00:00 GMT ab.js 183 bytes 1 [emitted] ab abd.js 277 bytes 2, 1 [emitted] abd cir2.js 299 bytes 3 [emitted] cir2 - main.js 9.29 KiB 4 [emitted] main + main.js 9.09 KiB 4 [emitted] main cir2 from cir1.js 359 bytes 5, 3 [emitted] cir2 from cir1 chunk.js 190 bytes 6, 7 [emitted] chunk ac in ab.js 130 bytes 7 [emitted] ac in ab @@ -1694,7 +1694,7 @@ exports[`StatsTestCases should print correct stats for prefetch 1`] = ` normal.js 130 bytes 1 [emitted] normal prefetched2.js 127 bytes 2 [emitted] prefetched2 prefetched3.js 130 bytes 3 [emitted] prefetched3 - main.js 9.86 KiB 4 [emitted] main + main.js 9.66 KiB 4 [emitted] main inner.js 136 bytes 5 [emitted] inner inner2.js 201 bytes 6 [emitted] inner2 Entrypoint main = main.js (prefetch: prefetched2.js prefetched.js prefetched3.js) @@ -1727,7 +1727,7 @@ exports[`StatsTestCases should print correct stats for preload 1`] = ` normal.js 130 bytes 1 [emitted] normal preloaded2.js 127 bytes 2 [emitted] preloaded2 preloaded3.js 130 bytes 3 [emitted] preloaded3 - main.js 10.1 KiB 4 [emitted] main + main.js 9.86 KiB 4 [emitted] main inner.js 136 bytes 5 [emitted] inner inner2.js 201 bytes 6 [emitted] inner2 Entrypoint main = main.js (preload: preloaded2.js preloaded.js preloaded3.js) @@ -1747,7 +1747,7 @@ Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.js 152 bytes 0 [emitted] 1.js 289 bytes 1 [emitted] -main.js 8.5 KiB 2 [emitted] main +main.js 8.29 KiB 2 [emitted] main 3.js 227 bytes 3 [emitted] Entrypoint main = main.js chunk {0} 0.js 22 bytes <{2}> [rendered] @@ -1806,7 +1806,7 @@ Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.js 152 bytes 0 [emitted] 1.js 289 bytes 1 [emitted] -main.js 8.5 KiB 2 [emitted] main +main.js 8.29 KiB 2 [emitted] main 3.js 227 bytes 3 [emitted] Entrypoint main = main.js [0] ./d.js 22 bytes {3} [built] @@ -1884,7 +1884,7 @@ Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.js 152 bytes 0 [emitted] 1.js 289 bytes 1 [emitted] -main.js 8.5 KiB 2 [emitted] main +main.js 8.29 KiB 2 [emitted] main 3.js 227 bytes 3 [emitted] Entrypoint main = main.js chunk {0} 0.js 22 bytes <{2}> [rendered] @@ -1975,7 +1975,7 @@ exports[`StatsTestCases should print correct stats for runtime-chunk-integration Asset Size Chunks Chunk Names 0.js 719 bytes 0 [emitted] main1.js 542 bytes 1 [emitted] main1 - runtime.js 8.95 KiB 2 [emitted] runtime + runtime.js 8.75 KiB 2 [emitted] runtime Entrypoint main1 = runtime.js main1.js [0] ./b.js 20 bytes {0} [built] [1] ./c.js 20 bytes {0} [built] @@ -1984,7 +1984,7 @@ exports[`StatsTestCases should print correct stats for runtime-chunk-integration Child manifest is named entry: Asset Size Chunks Chunk Names 0.js 719 bytes 0 [emitted] - manifest.js 9.26 KiB 1 [emitted] manifest + manifest.js 9.06 KiB 1 [emitted] manifest main1.js 542 bytes 2 [emitted] main1 Entrypoint main1 = manifest.js main1.js Entrypoint manifest = manifest.js @@ -2090,7 +2090,7 @@ Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.js 481 bytes 0 [emitted] -main.js 9.53 KiB 1 [emitted] main +main.js 9.32 KiB 1 [emitted] main Entrypoint main = main.js [0] ./components/src/CompAB/utils.js 97 bytes {1} [built] harmony side effect evaluation ./utils [1] ./main.js + 1 modules 1:0-30 From 60e1afe19cc6bc731b5ad071a05d57190935200c Mon Sep 17 00:00:00 2001 From: Legends Date: Thu, 14 Jun 2018 16:51:20 +0200 Subject: [PATCH 036/310] AutomaticPrefetchPlugin typings added --- lib/AutomaticPrefetchPlugin.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/AutomaticPrefetchPlugin.js b/lib/AutomaticPrefetchPlugin.js index 4efb350ce95..551e1fd57e9 100644 --- a/lib/AutomaticPrefetchPlugin.js +++ b/lib/AutomaticPrefetchPlugin.js @@ -9,6 +9,11 @@ const PrefetchDependency = require("./dependencies/PrefetchDependency"); const NormalModule = require("./NormalModule"); class AutomaticPrefetchPlugin { + /** + * Apply the plugin + * @param {TODO} compiler Webpack Compiler + * @returns {void} + */ apply(compiler) { compiler.hooks.compilation.tap( "AutomaticPrefetchPlugin", From 16bf799cb84a36d79e8cfbde34868235ccbdb04f Mon Sep 17 00:00:00 2001 From: Legends Date: Thu, 14 Jun 2018 18:25:43 +0200 Subject: [PATCH 037/310] CommentCompilationWarning typings --- lib/CommentCompilationWarning.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/CommentCompilationWarning.js b/lib/CommentCompilationWarning.js index 29377e94692..c261dae1592 100644 --- a/lib/CommentCompilationWarning.js +++ b/lib/CommentCompilationWarning.js @@ -6,7 +6,25 @@ const WebpackError = require("./WebpackError"); +/** @typedef {import("./Module.js")} Module */ + +/** @typedef {Object} Position + * @property {number} column + * @property {number} line + */ + +/** @typedef {Object} Loc + * @property {Position} start + * @property {Position} end + */ + class CommentCompilationWarning extends WebpackError { + /** + * + * @param {string} message warning message + * @param {Module} module affected module + * @param {Loc} loc affected lines of code + */ constructor(message, module, loc) { super(message); From 07a50001f03e0d50b098d2a51b5efee06da94f18 Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Fri, 15 Jun 2018 18:55:25 +0300 Subject: [PATCH 038/310] remove comment --- lib/WebpackOptionsDefaulter.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/WebpackOptionsDefaulter.js b/lib/WebpackOptionsDefaulter.js index 264e6f01a68..f0d3f8922e0 100644 --- a/lib/WebpackOptionsDefaulter.js +++ b/lib/WebpackOptionsDefaulter.js @@ -263,7 +263,6 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { "make", options => options.mode === "development" ); - // TODO enable for production mode in webpack 5 this.set("optimization.hashedModuleIds", false); this.set( "optimization.namedChunks", From 532235c5423a50f4fd8448102cd3bf362f898c36 Mon Sep 17 00:00:00 2001 From: Grey Baker Date: Mon, 18 Jun 2018 19:00:42 -0400 Subject: [PATCH 039/310] Add SemVer compatibility badge --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index cb5e32d94ad..286f0b768fb 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,9 @@ [![licenses][licenses]][licenses-url]
+ + + From 064967128e22a619bd339a9af1234694e85eecad Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 19 Jun 2018 21:41:23 +0200 Subject: [PATCH 040/310] add test case for #7533 --- test/Compiler.test.js | 22 ++++++++++++++++++++++ test/fixtures/count-loader.js | 5 +++++ 2 files changed, 27 insertions(+) create mode 100644 test/fixtures/count-loader.js diff --git a/test/Compiler.test.js b/test/Compiler.test.js index 063343f38c2..ef0324624a8 100644 --- a/test/Compiler.test.js +++ b/test/Compiler.test.js @@ -448,4 +448,26 @@ describe("Compiler", () => { }); }); }); + it("should use cache on second run call", function(done) { + const compiler = webpack({ + context: __dirname, + mode: "development", + devtool: false, + entry: "./fixtures/count-loader!./fixtures/count-loader", + output: { + path: "/" + } + }); + compiler.outputFileSystem = new MemoryFs(); + compiler.run(() => { + compiler.run(() => { + const result = compiler.outputFileSystem.readFileSync( + "/main.js", + "utf-8" + ); + expect(result).toContain("module.exports = 0;"); + done(); + }); + }); + }) }); diff --git a/test/fixtures/count-loader.js b/test/fixtures/count-loader.js new file mode 100644 index 00000000000..ced2018eef9 --- /dev/null +++ b/test/fixtures/count-loader.js @@ -0,0 +1,5 @@ +let counter = 0; + +module.exports = function() { + return `module.exports = ${counter++};`; +}; From 4859c926ad364dec422c45c061f517385dff42df Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Tue, 19 Jun 2018 15:32:15 -0700 Subject: [PATCH 041/310] CR comments - remove TS syntax (one last type error) --- lib/Chunk.js | 25 ++++++++----------------- lib/ChunkGroup.js | 2 +- lib/util/SortableSet.js | 10 +++++----- 3 files changed, 14 insertions(+), 23 deletions(-) diff --git a/lib/Chunk.js b/lib/Chunk.js index 7088c3ab270..bc582e49b50 100644 --- a/lib/Chunk.js +++ b/lib/Chunk.js @@ -18,17 +18,8 @@ const ERR_CHUNK_INITIAL = /** @typedef {import("./ModuleReason.js")} ModuleReason */ /** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {(a: Module, b: Module) => -1|0|1} ModuleSortPredicate */ -/** @typedef {(m: Module) => boolean} ModuleFilterPredicate */ -/** @typedef {(c: Chunk) => boolean} ChunkFilterPredicate */ - -/** - * @typedef {Object} Identifiable an object who contains an identifier function property - * @property {() => string} identifier the resource or unique identifier of something - */ - /** - * @typedef {Object} WithId an object who has an id property + * @typedef {Object} WithId an object who has an id property * * @property {string | number} id the id of the object */ @@ -71,13 +62,13 @@ const getModulesIdent = set => { /** * @template T - * @param {Set} set the set to convert to array + * @param {SortableSet} set the sortable set to convert to array * @returns {Array} the array returned from Array.from(set) */ const getArray = set => Array.from(set); /** - * @param {Set} set the Set to get the count/size of + * @param {SortableSet} set the sortable Set to get the count/size of * @returns {number} the size of the modules */ const getModulesSize = set => { @@ -111,7 +102,7 @@ class Chunk { this.entryModule = undefined; /** @private @type {SortableSet} */ this._modules = new SortableSet(undefined, sortByIdentifier); - /** @private @type {SortableSet} */ + /** @private @type {SortableSet} */ this._groups = new SortableSet(undefined, sortById); /** @type {Source[]} */ this.files = []; @@ -497,14 +488,14 @@ class Chunk { } /** - * @param {ModuleSortPredicate=} sortByFn a predicate function used to sort modules + * @param {function(Module, Module): -1|0|1=} sortByFn a predicate function used to sort modules * @returns {void} */ sortModules(sortByFn) { this._modules.sortWith(sortByFn || sortById); } - sortItems(sortChunks) { + sortItems() { this.sortModules(); } @@ -660,8 +651,8 @@ class Chunk { /** * - * @param {ModuleFilterPredicate} filterFn predicate function used to filter modules - * @param {ChunkFilterPredicate} filterChunkFn predicate function used to filter chunks + * @param {function(Module): boolean} filterFn predicate function used to filter modules + * @param {function(Chunk): boolean} filterChunkFn predicate function used to filter chunks * @returns {boolean} return true if module exists in graph */ hasModuleInGraph(filterFn, filterChunkFn) { diff --git a/lib/ChunkGroup.js b/lib/ChunkGroup.js index 1e52943ed18..482800b7ed4 100644 --- a/lib/ChunkGroup.js +++ b/lib/ChunkGroup.js @@ -19,7 +19,7 @@ let debugId = 5000; /** * @template T - * @param {Set} set set to convert to array. + * @param {SortableSet} set set to convert to array. * @returns {T[]} the array format of existing set */ const getArray = set => Array.from(set); diff --git a/lib/util/SortableSet.js b/lib/util/SortableSet.js index 5dbbe41a72f..fda110be708 100644 --- a/lib/util/SortableSet.js +++ b/lib/util/SortableSet.js @@ -18,9 +18,9 @@ class SortableSet extends Set { this._sortFn = defaultSort; /** @private @type {(a: T, b: T) => number} | null} */ this._lastActiveSortFn = null; - /** @private @type {Map | undefined} */ + /** @private @type {Map | undefined} */ this._cache = undefined; - /** @private @type {Map | undefined} */ + /** @private @type {Map | undefined} */ this._cacheOrderIndependent = undefined; } @@ -79,9 +79,9 @@ class SortableSet extends Set { this.sortWith(this._sortFn); } - // eslint-disable-next-line valid-jsdoc /** - * @param {(instance: SortableSet) => TODO} fn function to calculate value + * Get data from cache + * @param {function(SortableSet): T[]} fn function to calculate value * @returns {TODO} returns result of fn(this), cached until set changes */ getFromCache(fn) { @@ -99,7 +99,7 @@ class SortableSet extends Set { } /** - * @param {Function} fn function to calculate value + * @param {function(SortableSet): string|number|T[]} fn function to calculate value * @returns {any} returns result of fn(this), cached until set changes */ getFromUnorderedCache(fn) { From 5c4327139763368a64e130155f8b62540f78cbe5 Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Tue, 19 Jun 2018 15:35:58 -0700 Subject: [PATCH 042/310] remove all ts syntax --- lib/util/SortableSet.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/util/SortableSet.js b/lib/util/SortableSet.js index fda110be708..3fdb020710e 100644 --- a/lib/util/SortableSet.js +++ b/lib/util/SortableSet.js @@ -9,14 +9,14 @@ class SortableSet extends Set { /** * Create a new sortable set * @param {Array=} initialIterable The initial iterable value + * @typedef {function(T, T): number} SortFunction * @param {SortFunction=} defaultSort Default sorting function - * @typedef {(a: T, b: T) => number} SortFunction */ constructor(initialIterable, defaultSort) { super(initialIterable); - /** @private @type {(a: T, b: T) => number}} */ + /** @private @type {function(T, T): number}} */ this._sortFn = defaultSort; - /** @private @type {(a: T, b: T) => number} | null} */ + /** @private @type {function(T, T): number} | null} */ this._lastActiveSortFn = null; /** @private @type {Map | undefined} */ this._cache = undefined; From 04d2af0825b1a4a9500e522ea77930f236842c52 Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Tue, 19 Jun 2018 15:48:00 -0700 Subject: [PATCH 043/310] Sean comments (even more code questions?) --- lib/Template.js | 5 +++-- lib/util/SortableSet.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Template.js b/lib/Template.js index 7e76092e053..b768d2ff0d7 100644 --- a/lib/Template.js +++ b/lib/Template.js @@ -24,11 +24,11 @@ const MATCH_PADDED_HYPHENS_REPLACE_REGEX = /^-|-$/g; /** * @typedef {Object} HasId - * @property {number} id + * @property {number | string} id * */ /** - * @typedef {(m: Module, idx: number) => boolean} ModuleFilterPredicate + * @typedef {function(Module, number): boolean} ModuleFilterPredicate */ /** @@ -236,6 +236,7 @@ class Template { source.add("[]"); return source; } + /** @type {Module[]} */ var allModules = modules.map(module => { return { id: module.id, diff --git a/lib/util/SortableSet.js b/lib/util/SortableSet.js index 3fdb020710e..9741fb9fb52 100644 --- a/lib/util/SortableSet.js +++ b/lib/util/SortableSet.js @@ -82,7 +82,7 @@ class SortableSet extends Set { /** * Get data from cache * @param {function(SortableSet): T[]} fn function to calculate value - * @returns {TODO} returns result of fn(this), cached until set changes + * @returns {T[]} returns result of fn(this), cached until set changes */ getFromCache(fn) { if (this._cache === undefined) { From 2fa0ea62e7fc96be06d18fbfbf77ff14abfc6324 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 20 Jun 2018 10:23:26 +0200 Subject: [PATCH 044/310] add missing semicolon --- test/Compiler.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Compiler.test.js b/test/Compiler.test.js index ef0324624a8..0ce5d3ffabb 100644 --- a/test/Compiler.test.js +++ b/test/Compiler.test.js @@ -469,5 +469,5 @@ describe("Compiler", () => { done(); }); }); - }) + }); }); From 3e778b85c70ea044ecb4d7f5132261bbd5112e3f Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 20 Jun 2018 12:04:47 +0200 Subject: [PATCH 045/310] fix minor type issues and linting --- lib/Chunk.js | 24 ++++++++++++++++++------ lib/ModuleTemplate.js | 9 +++++++++ lib/Template.js | 21 +++++++-------------- 3 files changed, 34 insertions(+), 20 deletions(-) diff --git a/lib/Chunk.js b/lib/Chunk.js index bc582e49b50..774eb445a95 100644 --- a/lib/Chunk.js +++ b/lib/Chunk.js @@ -24,12 +24,24 @@ const ERR_CHUNK_INITIAL = */ /** - * Compare two objects based on their ids for sorting - * @param {WithId} a object that contains an ID property - * @param {WithId} b object that contains an ID property + * Compare two Modules based on their ids for sorting + * @param {Module} a module + * @param {Module} b module * @returns {-1|0|1} sort value */ -const sortById = (a, b) => { +const sortModuleById = (a, b) => { + if (a.id < b.id) return -1; + if (b.id < a.id) return 1; + return 0; +}; + +/** + * Compare two ChunkGroups based on their ids for sorting + * @param {ChunkGroup} a chunk group + * @param {ChunkGroup} b chunk group + * @returns {-1|0|1} sort value + */ +const sortChunkGroupById = (a, b) => { if (a.id < b.id) return -1; if (b.id < a.id) return 1; return 0; @@ -103,7 +115,7 @@ class Chunk { /** @private @type {SortableSet} */ this._modules = new SortableSet(undefined, sortByIdentifier); /** @private @type {SortableSet} */ - this._groups = new SortableSet(undefined, sortById); + this._groups = new SortableSet(undefined, sortChunkGroupById); /** @type {Source[]} */ this.files = []; /** @type {boolean} */ @@ -492,7 +504,7 @@ class Chunk { * @returns {void} */ sortModules(sortByFn) { - this._modules.sortWith(sortByFn || sortById); + this._modules.sortWith(sortByFn || sortModuleById); } sortItems() { diff --git a/lib/ModuleTemplate.js b/lib/ModuleTemplate.js index 50697aecfa7..06e787ed930 100644 --- a/lib/ModuleTemplate.js +++ b/lib/ModuleTemplate.js @@ -6,6 +6,9 @@ const { Tapable, SyncWaterfallHook, SyncHook } = require("tapable"); +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./Module")} Module */ + module.exports = class ModuleTemplate extends Tapable { constructor(runtimeTemplate, type) { super(); @@ -40,6 +43,12 @@ module.exports = class ModuleTemplate extends Tapable { }; } + /** + * @param {Module} module the module + * @param {TODO} dependencyTemplates templates for dependencies + * @param {TODO} options render options + * @returns {Source} the source + */ render(module, dependencyTemplates, options) { try { const moduleSource = module.source( diff --git a/lib/Template.js b/lib/Template.js index b768d2ff0d7..443e357678c 100644 --- a/lib/Template.js +++ b/lib/Template.js @@ -44,14 +44,6 @@ const stringifyIdSortPredicate = (a, b) => { return 0; }; -/** - * @param {Module} module the module to compare against - * @returns {boolean} return true if module.id is equal to type "number" - */ -const moduleIdIsNumber = module => { - return typeof module.id === "number"; -}; - class Template { /** * @@ -177,18 +169,20 @@ class Template { } /** - * - * @param {Module[]} modules a collection of modules to get array bounds for + * @typedef {Object} WithId + * @property {string|number} id + */ + + /** + * @param {WithId[]} modules a collection of modules to get array bounds for * @returns {[number, number] | false} returns the upper and lower array bounds * or false if not every module has a number based id */ static getModulesArrayBounds(modules) { - // Typeguards don't work for .every() with predicate functions - // https://github.com/Microsoft/TypeScript/issues/23799 - if (!modules.every(moduleIdIsNumber)) return false; var maxId = -Infinity; var minId = Infinity; for (const module of modules) { + if (typeof module.id !== "number") return false; if (maxId < module.id) maxId = /** @type {number} */ (module.id); if (minId > module.id) minId = /** @type {number} */ (module.id); } @@ -236,7 +230,6 @@ class Template { source.add("[]"); return source; } - /** @type {Module[]} */ var allModules = modules.map(module => { return { id: module.id, From 7c5cab0b0f8dcf1969eb5712b7ff139877708f33 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 20 Jun 2018 12:12:35 +0200 Subject: [PATCH 046/310] remove eslint disable comment --- lib/util/SortableSet.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/util/SortableSet.js b/lib/util/SortableSet.js index 9741fb9fb52..c048d10350c 100644 --- a/lib/util/SortableSet.js +++ b/lib/util/SortableSet.js @@ -5,7 +5,6 @@ * @template T item type in set */ class SortableSet extends Set { - // eslint-disable-next-line valid-jsdoc /** * Create a new sortable set * @param {Array=} initialIterable The initial iterable value From 47b888650a78281bf0d67a7e21a542eda601feba Mon Sep 17 00:00:00 2001 From: byzyk Date: Wed, 20 Jun 2018 16:52:27 +0400 Subject: [PATCH 047/310] add types --- lib/UseStrictPlugin.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/UseStrictPlugin.js b/lib/UseStrictPlugin.js index 2e0743da848..175c6028350 100644 --- a/lib/UseStrictPlugin.js +++ b/lib/UseStrictPlugin.js @@ -6,7 +6,13 @@ const ConstDependency = require("./dependencies/ConstDependency"); +/** @typedef {import("./Compiler.js")} Compiler */ + class UseStrictPlugin { + /** + * @param {Compiler} compiler Webpack Compiler + * @returns {void} + */ apply(compiler) { compiler.hooks.compilation.tap( "UseStrictPlugin", From 5aafb83618203ec504d9eb920453d0baa9237edb Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 21 Jun 2018 10:57:43 +0200 Subject: [PATCH 048/310] update to lastest version badge --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 286f0b768fb..3a3c583cf2b 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ [![licenses][licenses]][licenses-url]
- - + + From 306f5c2d757ce286e44fbef811ba07725dd250bb Mon Sep 17 00:00:00 2001 From: byzyk Date: Thu, 21 Jun 2018 14:28:20 +0400 Subject: [PATCH 049/310] add types --- lib/IgnorePlugin.js | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/lib/IgnorePlugin.js b/lib/IgnorePlugin.js index 5cc6c62f80f..8f2cd20bcca 100644 --- a/lib/IgnorePlugin.js +++ b/lib/IgnorePlugin.js @@ -4,16 +4,26 @@ */ "use strict"; +/** @typedef {import("./Compiler.js")} Compiler */ + class IgnorePlugin { + /** + * @param {RegExp} resourceRegExp A RegExp to test the request against + * @param {RegExp=} contextRegExp A RegExp to test the context (directory) against + */ constructor(resourceRegExp, contextRegExp) { + /** @type {RegExp} */ this.resourceRegExp = resourceRegExp; + /** @type {RegExp} */ this.contextRegExp = contextRegExp; + /** @type {Function} */ this.checkIgnore = this.checkIgnore.bind(this); } - /* - * Only returns true if a "resourceRegExp" exists + /** + * @param {TODO} resource resource + * @returns {boolean} returns true if a "resourceRegExp" exists * and the resource given matches the regexp. */ checkResource(resource) { @@ -23,8 +33,9 @@ class IgnorePlugin { return this.resourceRegExp.test(resource); } - /* - * Returns true if contextRegExp does not exist + /** + * @param {TODO} context context + * @returns {boolean} returns true if "contextRegExp" does not exist * or if context matches the given regexp. */ checkContext(context) { @@ -34,12 +45,12 @@ class IgnorePlugin { return this.contextRegExp.test(context); } - /* - * Returns true if result should be ignored. - * false if it shouldn't. - * - * Not that if "contextRegExp" is given, both the "resourceRegExp" + /** + * Note that if "contextRegExp" is given, both the "resourceRegExp" * and "contextRegExp" have to match. + * + * @param {TODO} result result + * @returns {boolean} returns true if result should be ignored */ checkResult(result) { if (!result) { @@ -50,6 +61,10 @@ class IgnorePlugin { ); } + /** + * @param {TODO} result result + * @returns {result|null} returns result or null if result should be ignored + */ checkIgnore(result) { // check if result is ignored if (this.checkResult(result)) { @@ -58,6 +73,10 @@ class IgnorePlugin { return result; } + /** + * @param {Compiler} compiler Webpack Compiler + * @returns {void} + */ apply(compiler) { compiler.hooks.normalModuleFactory.tap("IgnorePlugin", nmf => { nmf.hooks.beforeResolve.tap("IgnorePlugin", this.checkIgnore); From b03804eabf7a75d65ab8b2a610a6637150992cba Mon Sep 17 00:00:00 2001 From: Legends Date: Thu, 21 Jun 2018 12:39:48 +0200 Subject: [PATCH 050/310] added Compiler, @returns void --- lib/AutomaticPrefetchPlugin.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/AutomaticPrefetchPlugin.js b/lib/AutomaticPrefetchPlugin.js index 551e1fd57e9..26123de53f5 100644 --- a/lib/AutomaticPrefetchPlugin.js +++ b/lib/AutomaticPrefetchPlugin.js @@ -8,10 +8,12 @@ const asyncLib = require("neo-async"); const PrefetchDependency = require("./dependencies/PrefetchDependency"); const NormalModule = require("./NormalModule"); +/** @typedef {import("./Compiler.js")} Compiler */ + class AutomaticPrefetchPlugin { /** * Apply the plugin - * @param {TODO} compiler Webpack Compiler + * @param {Compiler} compiler Webpack Compiler * @returns {void} */ apply(compiler) { From 36a7f8d4cb60feb373a684ac6c2464db65dd1475 Mon Sep 17 00:00:00 2001 From: byzyk Date: Thu, 21 Jun 2018 14:45:33 +0400 Subject: [PATCH 051/310] make properties private --- lib/IgnorePlugin.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/IgnorePlugin.js b/lib/IgnorePlugin.js index 8f2cd20bcca..124f1a8f9ef 100644 --- a/lib/IgnorePlugin.js +++ b/lib/IgnorePlugin.js @@ -12,12 +12,12 @@ class IgnorePlugin { * @param {RegExp=} contextRegExp A RegExp to test the context (directory) against */ constructor(resourceRegExp, contextRegExp) { - /** @type {RegExp} */ + /** @private @type {RegExp} */ this.resourceRegExp = resourceRegExp; - /** @type {RegExp} */ + /** @private @type {RegExp} */ this.contextRegExp = contextRegExp; - /** @type {Function} */ + /** @private @type {Function} */ this.checkIgnore = this.checkIgnore.bind(this); } From 4c3f04a7cf0d5942d2a4fcf2ec41c32c52e43e57 Mon Sep 17 00:00:00 2001 From: byzyk Date: Thu, 21 Jun 2018 14:47:15 +0400 Subject: [PATCH 052/310] result -> TODO --- lib/IgnorePlugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/IgnorePlugin.js b/lib/IgnorePlugin.js index 124f1a8f9ef..1f5be824726 100644 --- a/lib/IgnorePlugin.js +++ b/lib/IgnorePlugin.js @@ -63,7 +63,7 @@ class IgnorePlugin { /** * @param {TODO} result result - * @returns {result|null} returns result or null if result should be ignored + * @returns {TODO|null} returns result or null if result should be ignored */ checkIgnore(result) { // check if result is ignored From a96ac96780a34a8b2b2a42b919ba66c7efc9f673 Mon Sep 17 00:00:00 2001 From: byzyk Date: Thu, 21 Jun 2018 14:53:41 +0400 Subject: [PATCH 053/310] add type for resource and context --- lib/IgnorePlugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/IgnorePlugin.js b/lib/IgnorePlugin.js index 1f5be824726..fc280e88018 100644 --- a/lib/IgnorePlugin.js +++ b/lib/IgnorePlugin.js @@ -22,7 +22,7 @@ class IgnorePlugin { } /** - * @param {TODO} resource resource + * @param {string} resource resource * @returns {boolean} returns true if a "resourceRegExp" exists * and the resource given matches the regexp. */ @@ -34,7 +34,7 @@ class IgnorePlugin { } /** - * @param {TODO} context context + * @param {string} context context * @returns {boolean} returns true if "contextRegExp" does not exist * or if context matches the given regexp. */ From 968edbf77dfbf573c7af09ec39ba050545ca8013 Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Thu, 21 Jun 2018 14:38:17 +0300 Subject: [PATCH 054/310] fix(types): fix errors and linting errors --- lib/Chunk.js | 5 +++-- lib/Compilation.js | 10 ++++++---- lib/ContextModule.js | 1 - lib/DependenciesBlock.js | 1 - lib/ModuleTemplate.js | 2 +- lib/Template.js | 2 +- lib/dependencies/LoaderDependency.js | 4 ++++ lib/dependencies/LoaderPlugin.js | 1 - yarn.lock | 2 +- 9 files changed, 16 insertions(+), 12 deletions(-) diff --git a/lib/Chunk.js b/lib/Chunk.js index 7e332ea74ea..5cc8a8f96d6 100644 --- a/lib/Chunk.js +++ b/lib/Chunk.js @@ -35,6 +35,7 @@ const ERR_CHUNK_INITIAL = /** @typedef {(a: Module, b: Module) => -1|0|1} ModuleSortPredicate */ /** @typedef {(m: Module) => boolean} ModuleFilterPredicate */ /** @typedef {(c: Chunk) => boolean} ChunkFilterPredicate */ + const sortModuleById = (a, b) => { if (a.id < b.id) return -1; if (b.id < a.id) return 1; @@ -122,10 +123,10 @@ class Chunk { this._modules = new SortableSet(undefined, sortByIdentifier); /** @private */ - this._groups = new SortableSet(undefined, sortById); + this._groups = new SortableSet(undefined, sortChunkGroupById); /** @private @type {SortableSet} */ this._groups = new SortableSet(undefined, sortChunkGroupById); - /** @type {Source[]} */ + /** @type {string[]} */ this.files = []; /** @type {boolean} */ this.rendered = false; diff --git a/lib/Compilation.js b/lib/Compilation.js index 963d91b3035..1349448ffa5 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -456,7 +456,7 @@ class Compilation extends Tapable { this.fileTimestamps = undefined; /** @type {Map=} */ this.contextTimestamps = undefined; - /** @type {Set} */ + /** @type {Set=} */ this.compilationDependencies = undefined; /** @private @type {Map} */ this._buildingModules = new Map(); @@ -2056,7 +2056,7 @@ class Compilation extends Tapable { const chunks = this.chunks; for (let indexChunk = 0; indexChunk < chunks.length; indexChunk++) { - chunks[indexChunk].sortItems(false); + chunks[indexChunk].sortItems(); } } @@ -2077,7 +2077,7 @@ class Compilation extends Tapable { const chunks = this.chunks; for (let indexChunk = 0; indexChunk < chunks.length; indexChunk++) { - chunks[indexChunk].sortItems(true); + chunks[indexChunk].sortItems(); } /** @@ -2104,7 +2104,9 @@ class Compilation extends Tapable { } summarizeDependencies() { - this.fileDependencies = new SortableSet(this.compilationDependencies); + this.fileDependencies = new SortableSet( + Array.from(this.compilationDependencies) + ); this.contextDependencies = new SortableSet(); this.missingDependencies = new SortableSet(); diff --git a/lib/ContextModule.js b/lib/ContextModule.js index f5c2dbcda7e..175187a6973 100644 --- a/lib/ContextModule.js +++ b/lib/ContextModule.js @@ -8,7 +8,6 @@ const util = require("util"); const { OriginalSource, RawSource } = require("webpack-sources"); const Module = require("./Module"); const AsyncDependenciesBlock = require("./AsyncDependenciesBlock"); -const ModuleDependency = require("./dependencies/ModuleDependency"); const Template = require("./Template"); /** @typedef {import("./dependencies/ContextElementDependency")} ContextElementDependency */ diff --git a/lib/DependenciesBlock.js b/lib/DependenciesBlock.js index f182fec8718..3277e8b7303 100644 --- a/lib/DependenciesBlock.js +++ b/lib/DependenciesBlock.js @@ -13,7 +13,6 @@ const DependenciesBlockVariable = require("./DependenciesBlockVariable"); /** @typedef {(d: Dependency) => boolean} DependencyFilterFunction */ /** @typedef {import("crypto").Hash} Hash */ - class DependenciesBlock { constructor() { /** @type {Dependency[]} */ diff --git a/lib/ModuleTemplate.js b/lib/ModuleTemplate.js index 06e787ed930..f3631be5025 100644 --- a/lib/ModuleTemplate.js +++ b/lib/ModuleTemplate.js @@ -47,7 +47,7 @@ module.exports = class ModuleTemplate extends Tapable { * @param {Module} module the module * @param {TODO} dependencyTemplates templates for dependencies * @param {TODO} options render options - * @returns {Source} the source + * @returns {Source|string} the source */ render(module, dependencyTemplates, options) { try { diff --git a/lib/Template.js b/lib/Template.js index 443e357678c..d0b197a322e 100644 --- a/lib/Template.js +++ b/lib/Template.js @@ -241,7 +241,7 @@ class Template { if (removedModules && removedModules.length > 0) { for (const id of removedModules) { allModules.push({ - id: id, + id, source: "false" }); } diff --git a/lib/dependencies/LoaderDependency.js b/lib/dependencies/LoaderDependency.js index 343c44860a3..a551b100a83 100644 --- a/lib/dependencies/LoaderDependency.js +++ b/lib/dependencies/LoaderDependency.js @@ -5,9 +5,13 @@ "use strict"; const ModuleDependency = require("./ModuleDependency"); +/** @typedef {import("../NormalModule")} NormalModule */ + class LoaderDependency extends ModuleDependency { constructor(request) { super(request); + /** @type {NormalModule} */ + this.module = undefined; } get type() { diff --git a/lib/dependencies/LoaderPlugin.js b/lib/dependencies/LoaderPlugin.js index c60a0586bed..14388db5eca 100644 --- a/lib/dependencies/LoaderPlugin.js +++ b/lib/dependencies/LoaderPlugin.js @@ -5,7 +5,6 @@ "use strict"; const LoaderDependency = require("./LoaderDependency"); -const NormalModule = require("../NormalModule"); class LoaderPlugin { apply(compiler) { diff --git a/yarn.lock b/yarn.lock index 4b8e96996ec..ac4a8c2792b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5809,7 +5809,7 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3": +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" From 190305824fc4b2e4ed766d7acd93cc5ff0d0ba48 Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Thu, 21 Jun 2018 14:52:51 +0300 Subject: [PATCH 055/310] chore(test): update snapshot --- test/__snapshots__/StatsTestCases.test.js.snap | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index 1fe3e735870..cac04a3f423 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -61,13 +61,13 @@ exports[`StatsTestCases should print correct stats for aggressive-splitting-on-d Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names -cf8697fa2c994f39a5d4.js 1.94 KiB 6, 7 [emitted] fd868baa40dab4fc30fd.js 1.93 KiB 0 [emitted] -79c527bb5bf9cba1dc12.js 1.96 KiB 2 [emitted] +d6418937dfae4b3ee922.js 1 KiB 1 [emitted] e9d82e81fefd7353e8df.js 1.94 KiB 3, 1 [emitted] ae76098eeb55b9c448f2.js 1.01 KiB 4 [emitted] 05d92aaacfbffa4b7e56.js 1.94 KiB 5 [emitted] -d6418937dfae4b3ee922.js 1 KiB 1 [emitted] +cf8697fa2c994f39a5d4.js 1.94 KiB 6, 7 [emitted] +79c527bb5bf9cba1dc12.js 1.96 KiB 2 [emitted] 685acdc95ff4af957f47.js 1 KiB 7 [emitted] 606f48c13070850338b1.js 1.94 KiB 8 [emitted] c5a8eae840969538f450.js 1.94 KiB 9 [emitted] From efc61e10f3e43aef0fb4097722a27e7808c73fef Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Thu, 21 Jun 2018 14:59:27 +0300 Subject: [PATCH 056/310] chore(test): update basic test snapshots --- package.json | 2 +- .../__snapshots__/StatsTestCases.test.js.snap | 334 +++++++++++++----- yarn.lock | 6 +- 3 files changed, 248 insertions(+), 94 deletions(-) diff --git a/package.json b/package.json index 1ac0aac4481..e0c05c7ad22 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "script-loader": "~0.7.0", "simple-git": "^1.65.0", "style-loader": "^0.19.1", - "typescript": "^2.9.1", + "typescript": "^3.0.0-dev.20180621", "url-loader": "^0.6.2", "val-loader": "^1.0.2", "vm-browserify": "~0.0.0", diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index cac04a3f423..55289e2e184 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -746,18 +746,27 @@ Child bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js - WARNING in bundle.js from UglifyJs - Dropping side-effect-free statement [./index.js:6,0] - Dropping unused function someUnUsedFunction1 [./index.js:8,0] - Dropping unused function someUnUsedFunction2 [./index.js:9,0] - Dropping unused function someUnUsedFunction3 [./index.js:10,0] - Dropping unused function someUnUsedFunction4 [./index.js:11,0] - Dropping unused function someUnUsedFunction5 [./index.js:12,0] - Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] - Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] - Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] - Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] - Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] + WARNING in Dropping side-effect-free statement [./index.js:6,0] + + WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] + + WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] + + WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] + + WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] + + WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] Child Hash: 4269d427a8c1110386b4 Time: Xms @@ -765,6 +774,28 @@ Child Asset Size Chunks Chunk Names bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js + + WARNING in Dropping side-effect-free statement [./index.js:6,0] + + WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] + + WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] + + WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] + + WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] + + WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] Child Hash: 4269d427a8c1110386b4 Time: Xms @@ -772,6 +803,28 @@ Child Asset Size Chunks Chunk Names bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js + + WARNING in Dropping side-effect-free statement [./index.js:6,0] + + WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] + + WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] + + WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] + + WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] + + WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] Child Hash: 4269d427a8c1110386b4 Time: Xms @@ -786,6 +839,28 @@ Child Asset Size Chunks Chunk Names bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js + + WARNING in Dropping side-effect-free statement [./index.js:6,0] + + WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] + + WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] + + WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] + + WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] + + WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] Child Hash: 4269d427a8c1110386b4 Time: Xms @@ -793,6 +868,28 @@ Child Asset Size Chunks Chunk Names bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js + + WARNING in Dropping side-effect-free statement [./index.js:6,0] + + WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] + + WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] + + WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] + + WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] + + WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] Child Hash: 4269d427a8c1110386b4 Time: Xms @@ -808,18 +905,27 @@ Child bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js - WARNING in bundle.js from UglifyJs - Dropping side-effect-free statement [./index.js:6,0] - Dropping unused function someUnUsedFunction1 [./index.js:8,0] - Dropping unused function someUnUsedFunction2 [./index.js:9,0] - Dropping unused function someUnUsedFunction3 [./index.js:10,0] - Dropping unused function someUnUsedFunction4 [./index.js:11,0] - Dropping unused function someUnUsedFunction5 [./index.js:12,0] - Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] - Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] - Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] - Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] - Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] + WARNING in Dropping side-effect-free statement [./index.js:6,0] + + WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] + + WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] + + WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] + + WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] + + WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] Child Hash: 4269d427a8c1110386b4 Time: Xms @@ -828,18 +934,27 @@ Child bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js - WARNING in bundle.js from UglifyJs - Dropping side-effect-free statement [./index.js:6,0] - Dropping unused function someUnUsedFunction1 [./index.js:8,0] - Dropping unused function someUnUsedFunction2 [./index.js:9,0] - Dropping unused function someUnUsedFunction3 [./index.js:10,0] - Dropping unused function someUnUsedFunction4 [./index.js:11,0] - Dropping unused function someUnUsedFunction5 [./index.js:12,0] - Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] - Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] - Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] - Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] - Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] + WARNING in Dropping side-effect-free statement [./index.js:6,0] + + WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] + + WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] + + WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] + + WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] + + WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] Child Hash: 4269d427a8c1110386b4 Time: Xms @@ -848,18 +963,27 @@ Child bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js - WARNING in bundle.js from UglifyJs - Dropping side-effect-free statement [./index.js:6,0] - Dropping unused function someUnUsedFunction1 [./index.js:8,0] - Dropping unused function someUnUsedFunction2 [./index.js:9,0] - Dropping unused function someUnUsedFunction3 [./index.js:10,0] - Dropping unused function someUnUsedFunction4 [./index.js:11,0] - Dropping unused function someUnUsedFunction5 [./index.js:12,0] - Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] - Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] - Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] - Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] - Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] + WARNING in Dropping side-effect-free statement [./index.js:6,0] + + WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] + + WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] + + WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] + + WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] + + WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] Child Hash: 4269d427a8c1110386b4 Time: Xms @@ -868,18 +992,27 @@ Child bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js - WARNING in bundle.js from UglifyJs - Dropping side-effect-free statement [./index.js:6,0] - Dropping unused function someUnUsedFunction1 [./index.js:8,0] - Dropping unused function someUnUsedFunction2 [./index.js:9,0] - Dropping unused function someUnUsedFunction3 [./index.js:10,0] - Dropping unused function someUnUsedFunction4 [./index.js:11,0] - Dropping unused function someUnUsedFunction5 [./index.js:12,0] - Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] - Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] - Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] - Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] - Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] + WARNING in Dropping side-effect-free statement [./index.js:6,0] + + WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] + + WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] + + WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] + + WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] + + WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] Child Hash: 4269d427a8c1110386b4 Time: Xms @@ -888,18 +1021,27 @@ Child bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js - WARNING in bundle.js from UglifyJs - Dropping side-effect-free statement [./index.js:6,0] - Dropping unused function someUnUsedFunction1 [./index.js:8,0] - Dropping unused function someUnUsedFunction2 [./index.js:9,0] - Dropping unused function someUnUsedFunction3 [./index.js:10,0] - Dropping unused function someUnUsedFunction4 [./index.js:11,0] - Dropping unused function someUnUsedFunction5 [./index.js:12,0] - Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] - Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] - Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] - Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] - Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] + WARNING in Dropping side-effect-free statement [./index.js:6,0] + + WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] + + WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] + + WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] + + WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] + + WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] Child Hash: 4269d427a8c1110386b4 Time: Xms @@ -908,18 +1050,27 @@ Child bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js - WARNING in bundle.js from UglifyJs - Dropping side-effect-free statement [./index.js:6,0] - Dropping unused function someUnUsedFunction1 [./index.js:8,0] - Dropping unused function someUnUsedFunction2 [./index.js:9,0] - Dropping unused function someUnUsedFunction3 [./index.js:10,0] - Dropping unused function someUnUsedFunction4 [./index.js:11,0] - Dropping unused function someUnUsedFunction5 [./index.js:12,0] - Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] - Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] - Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] - Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] - Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0]" + WARNING in Dropping side-effect-free statement [./index.js:6,0] + + WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] + + WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] + + WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] + + WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] + + WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + + WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0]" `; exports[`StatsTestCases should print correct stats for graph-correctness-entries 1`] = ` @@ -2733,10 +2884,13 @@ Entrypoint main = bundle.js [1] ./a.js 249 bytes {0} [built] [2] (webpack)/buildin/module.js 497 bytes {0} [built] -WARNING in bundle.js from UglifyJs -Dropping unused function someUnRemoteUsedFunction1 [./a.js:3,0] -Dropping unused function someUnRemoteUsedFunction2 [./a.js:4,0] -Dropping unused function someUnRemoteUsedFunction3 [./a.js:5,0] -Dropping unused function someUnRemoteUsedFunction4 [./a.js:6,0] -Dropping unused function someUnRemoteUsedFunction5 [./a.js:7,0]" +WARNING in Dropping unused function someUnRemoteUsedFunction1 [./a.js:3,0] + +WARNING in Dropping unused function someUnRemoteUsedFunction2 [./a.js:4,0] + +WARNING in Dropping unused function someUnRemoteUsedFunction3 [./a.js:5,0] + +WARNING in Dropping unused function someUnRemoteUsedFunction4 [./a.js:6,0] + +WARNING in Dropping unused function someUnRemoteUsedFunction5 [./a.js:7,0]" `; diff --git a/yarn.lock b/yarn.lock index ac4a8c2792b..318c4cd7c17 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6509,9 +6509,9 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -typescript@^2.9.1: - version "2.9.1" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.1.tgz#fdb19d2c67a15d11995fd15640e373e09ab09961" +typescript@^3.0.0-dev.20180621: + version "3.0.0-dev.20180621" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.0-dev.20180621.tgz#a910b3cff52a3352a1a3fdbf748e160704eb6b82" ua-parser-js@^0.7.9: version "0.7.18" From aaf702442a9ed46f097bee4f96958fcc563b6d19 Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Thu, 21 Jun 2018 15:04:32 +0300 Subject: [PATCH 057/310] fix: typescript vversion --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e0c05c7ad22..1ac0aac4481 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "script-loader": "~0.7.0", "simple-git": "^1.65.0", "style-loader": "^0.19.1", - "typescript": "^3.0.0-dev.20180621", + "typescript": "^2.9.1", "url-loader": "^0.6.2", "val-loader": "^1.0.2", "vm-browserify": "~0.0.0", From b47cff96c1cf1331654914fd7f61d9bb385b6833 Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Thu, 21 Jun 2018 15:07:52 +0300 Subject: [PATCH 058/310] fix(deps): fix deps and lockfile --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 318c4cd7c17..0d71772996a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6509,9 +6509,9 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -typescript@^3.0.0-dev.20180621: - version "3.0.0-dev.20180621" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.0-dev.20180621.tgz#a910b3cff52a3352a1a3fdbf748e160704eb6b82" +typescript@^2.9.1: + version "2.9.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c" ua-parser-js@^0.7.9: version "0.7.18" From 7969a5a525f096ba5e43a831d291c6164a3f1515 Mon Sep 17 00:00:00 2001 From: Legends Date: Thu, 21 Jun 2018 17:36:12 +0200 Subject: [PATCH 059/310] Importing typedef from Dependency.js ??? Please review. --- lib/CommentCompilationWarning.js | 12 +++--------- lib/Dependency.js | 13 +++++++++++++ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/lib/CommentCompilationWarning.js b/lib/CommentCompilationWarning.js index c261dae1592..1b83147ddd7 100644 --- a/lib/CommentCompilationWarning.js +++ b/lib/CommentCompilationWarning.js @@ -8,15 +8,9 @@ const WebpackError = require("./WebpackError"); /** @typedef {import("./Module.js")} Module */ -/** @typedef {Object} Position - * @property {number} column - * @property {number} line - */ - -/** @typedef {Object} Loc - * @property {Position} start - * @property {Position} end - */ +/** @typedef {import("./Dependency.js").Position} Position */ + +/** @typedef {import("./Dependency.js").Loc} Loc */ class CommentCompilationWarning extends WebpackError { /** diff --git a/lib/Dependency.js b/lib/Dependency.js index a5a5c23e21e..f489b11cca2 100644 --- a/lib/Dependency.js +++ b/lib/Dependency.js @@ -48,4 +48,17 @@ class Dependency { } Dependency.compare = (a, b) => compareLocations(a.loc, b.loc); +/** @typedef {Object} Position + * @property {number} column + * @property {number} line + */ + +/** @typedef {Object} Loc + * @property {Position} start + * @property {Position} end + */ + +exports Position; +exports Loc; + module.exports = Dependency; From afdbf71ccb29c8c00f36fe28301f4fb15e531075 Mon Sep 17 00:00:00 2001 From: Legends Date: Thu, 21 Jun 2018 20:58:54 +0200 Subject: [PATCH 060/310] removing typedef exports --- lib/Dependency.js | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/lib/Dependency.js b/lib/Dependency.js index f489b11cca2..322cb7b9bd0 100644 --- a/lib/Dependency.js +++ b/lib/Dependency.js @@ -7,6 +7,16 @@ const compareLocations = require("./compareLocations"); const DependencyReference = require("./dependencies/DependencyReference"); +/** @typedef {Object} Position + * @property {number} column + * @property {number} line + */ + +/** @typedef {Object} Loc + * @property {Position} start + * @property {Position} end + */ + class Dependency { constructor() { this.module = null; @@ -48,17 +58,4 @@ class Dependency { } Dependency.compare = (a, b) => compareLocations(a.loc, b.loc); -/** @typedef {Object} Position - * @property {number} column - * @property {number} line - */ - -/** @typedef {Object} Loc - * @property {Position} start - * @property {Position} end - */ - -exports Position; -exports Loc; - module.exports = Dependency; From 1ef124143add25274a1e75564058ad58804c4b26 Mon Sep 17 00:00:00 2001 From: Tim Hambourger Date: Fri, 22 Jun 2018 00:16:14 -0500 Subject: [PATCH 061/310] Implement all path variables for webworker dynamic imports --- lib/webworker/WebWorkerMainTemplatePlugin.js | 19 +++++- test/configCases/issues/issue-7563/index.js | 3 + test/configCases/issues/issue-7563/one.js | 1 + .../issues/issue-7563/test.config.js | 22 +++++++ .../issues/issue-7563/webpack.config.js | 65 +++++++++++++++++++ 5 files changed, 109 insertions(+), 1 deletion(-) create mode 100644 test/configCases/issues/issue-7563/index.js create mode 100644 test/configCases/issues/issue-7563/one.js create mode 100644 test/configCases/issues/issue-7563/test.config.js create mode 100644 test/configCases/issues/issue-7563/webpack.config.js diff --git a/lib/webworker/WebWorkerMainTemplatePlugin.js b/lib/webworker/WebWorkerMainTemplatePlugin.js index e685470960f..02d3d5d4265 100644 --- a/lib/webworker/WebWorkerMainTemplatePlugin.js +++ b/lib/webworker/WebWorkerMainTemplatePlugin.js @@ -54,6 +54,20 @@ class WebWorkerMainTemplatePlugin { )} + "`, chunk: { id: '" + chunkId + "', + hash: `" + ${JSON.stringify(chunkMaps.hash)}[chunkId] + "`, + hashWithLength(length) { + const shortChunkHashMap = Object.create(null); + for (const chunkId of Object.keys(chunkMaps.hash)) { + if (typeof chunkMaps.hash[chunkId] === "string") { + shortChunkHashMap[chunkId] = chunkMaps.hash[ + chunkId + ].substr(0, length); + } + } + return `" + ${JSON.stringify( + shortChunkHashMap + )}[chunkId] + "`; + }, contentHash: { javascript: `" + ${JSON.stringify( chunkMaps.contentHash.javascript @@ -74,7 +88,10 @@ class WebWorkerMainTemplatePlugin { shortContentHashMap )}[chunkId] + "`; } - } + }, + name: `" + (${JSON.stringify( + chunkMaps.name + )}[chunkId]||chunkId) + "` }, contentHashType: "javascript" }) + diff --git a/test/configCases/issues/issue-7563/index.js b/test/configCases/issues/issue-7563/index.js new file mode 100644 index 00000000000..9e0bf87e832 --- /dev/null +++ b/test/configCases/issues/issue-7563/index.js @@ -0,0 +1,3 @@ +it("should compile without error", function() { + return import(/* webpackChunkName: "one" */ "./one"); +}); diff --git a/test/configCases/issues/issue-7563/one.js b/test/configCases/issues/issue-7563/one.js new file mode 100644 index 00000000000..bd816eaba4c --- /dev/null +++ b/test/configCases/issues/issue-7563/one.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/test/configCases/issues/issue-7563/test.config.js b/test/configCases/issues/issue-7563/test.config.js new file mode 100644 index 00000000000..dee26555271 --- /dev/null +++ b/test/configCases/issues/issue-7563/test.config.js @@ -0,0 +1,22 @@ +var fs = require('fs'); + +module.exports = { + noTests: true, + findBundle: function(i, options) { + var regex = new RegExp("^bundle\." + options.name, "i"); + var files = fs.readdirSync(options.output.path); + var bundle = files.find(function (file) { + return regex.test(file); + }); + + if (!bundle) { + throw new Error( + `No file found with correct name (regex: ${ + regex.source + }, files: ${files.join(", ")})` + ); + } + + return "./" + bundle; + } +}; diff --git a/test/configCases/issues/issue-7563/webpack.config.js b/test/configCases/issues/issue-7563/webpack.config.js new file mode 100644 index 00000000000..09164011712 --- /dev/null +++ b/test/configCases/issues/issue-7563/webpack.config.js @@ -0,0 +1,65 @@ +"use strict"; + +// Have to test [hash] and [chunkhash] separately to avoid +// "Cannot use [chunkhash] or [contenthash] for chunk in 'bundle1.[hash].[hash:16].[chunkhash].[chunkhash:16].[name].[id].[query].js' (use [hash] instead)" +var testAllButHash = "[chunkhash].[chunkhash:16].[name].[id].[query]"; +var testHash = "[hash].[hash:16]"; + +module.exports = [ + { + name: "webworker-all", + target: "webworker", + output: { + filename: "bundle.webworker-all." + testAllButHash + ".js" + } + }, + { + name: "webworker-hash", + target: "webworker", + output: { + filename: "bundle.webworker-hash." + testHash + ".js" + } + }, + { + name: "node-all", + target: "node", + output: { + filename: "bundle.node-all." + testAllButHash + ".js" + } + }, + { + name: "node", + target: "node", + output: { + filename: "bundle.node-hash." + testHash + ".js" + } + }, + { + name: "async-node-all", + target: "async-node", + output: { + filename: "bundle.async-node-all." + testAllButHash + ".js" + } + }, + { + name: "async-node-hash", + target: "async-node", + output: { + filename: "bundle.async-node-hash." + testHash + ".js" + } + }, + { + name: "web-all", + target: "web", + output: { + filename: "bundle.web-all." + testAllButHash + ".js" + } + }, + { + name: "web-hash", + target: "web", + output: { + filename: "bundle.web-hash." + testHash + ".js" + } + } +]; From 2fb9a6c10f867105edd03ae13aba8d2f7ff95858 Mon Sep 17 00:00:00 2001 From: Legends Date: Fri, 22 Jun 2018 12:04:38 +0200 Subject: [PATCH 062/310] remove typedef Position import --- lib/CommentCompilationWarning.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/CommentCompilationWarning.js b/lib/CommentCompilationWarning.js index 1b83147ddd7..4b1e6de5118 100644 --- a/lib/CommentCompilationWarning.js +++ b/lib/CommentCompilationWarning.js @@ -8,8 +8,6 @@ const WebpackError = require("./WebpackError"); /** @typedef {import("./Module.js")} Module */ -/** @typedef {import("./Dependency.js").Position} Position */ - /** @typedef {import("./Dependency.js").Loc} Loc */ class CommentCompilationWarning extends WebpackError { From 1e7b4e9a5e45bb752435bd9470a234542762656b Mon Sep 17 00:00:00 2001 From: arkadyt <23281304+arkadyt@users.noreply.github.com> Date: Fri, 22 Jun 2018 10:02:38 -0700 Subject: [PATCH 063/310] Remove dead links from /examples README.md. --- examples/README.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/examples/README.md b/examples/README.md index 6407710e237..28483211b7a 100644 --- a/examples/README.md +++ b/examples/README.md @@ -15,12 +15,6 @@ [code-splitting-specify-chunk-name](code-splitting-specify-chunk-name) -[move-to-parent](move-to-parent) - -[multiple-commons-chunks](multiple-commons-chunks) - -[multiple-entry-points-commons-chunk-css-bundle](multiple-entry-points-commons-chunk-css-bundle) - [named-chunks](named-chunks) example demonstrating merging of chunks with named chunks [two-explicit-vendor-chunks](two-explicit-vendor-chunks) @@ -49,11 +43,6 @@ ## CommonJS [commonjs](commonjs) example demonstrating a very simple program -## Css Bundle -[css-bundle](css-bundle) - -[multiple-entry-points-commons-chunk-css-bundle](multiple-entry-points-commons-chunk-css-bundle) - ## DLL [dll](dll) From 6759c51f1e3ff666a8a73e7d442b9d1b9b90a2af Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Fri, 22 Jun 2018 14:17:55 -0700 Subject: [PATCH 064/310] Do the todos --- lib/DefinePlugin.js | 15 +++++++++------ package.json | 2 +- yarn.lock | 6 +++--- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lib/DefinePlugin.js b/lib/DefinePlugin.js index e9c0a4be837..4e8d6538260 100644 --- a/lib/DefinePlugin.js +++ b/lib/DefinePlugin.js @@ -9,6 +9,10 @@ const BasicEvaluatedExpression = require("./BasicEvaluatedExpression"); const ParserHelpers = require("./ParserHelpers"); const NullFactory = require("./NullFactory"); +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./Parser")} Parser */ +/** @typedef {null|undefined|RegExp|Function|Object} CodeValue */ + /** * Stringify an object * @param {Object} obj Object to stringify @@ -29,7 +33,7 @@ const stringifyObj = obj => { /** * Convert code to a string that evaluates - * @param {null|undefined|RegExp|Function|Object} code Code to evaluate + * @param {CodeValue} code Code to evaluate * @returns {string} code converted to string that evaluates */ const toCode = code => { @@ -61,8 +65,7 @@ class DefinePlugin { } /** - * Apply the plugin - * @param {TODO} compiler Webpack Compiler + * @param {Compiler} compiler Webpack Compiler * @returns {void} */ apply(compiler) { @@ -78,13 +81,13 @@ class DefinePlugin { /** * Handler - * @param {TODO} parser Parser + * @param {Parser} parser Parser * @returns {void} */ const handler = parser => { /** * Walk definitions - * @param {TODO} definitions Definitions map + * @param {Object} definitions Definitions map * @param {string} prefix Prefix string * @returns {void} */ @@ -124,7 +127,7 @@ class DefinePlugin { /** * Apply Code * @param {string} key Key - * @param {TODO} code Code + * @param {CodeValue} code Code * @returns {void} */ const applyDefine = (key, code) => { diff --git a/package.json b/package.json index 14c9bb03432..7bf201b785c 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "script-loader": "~0.7.0", "simple-git": "^1.65.0", "style-loader": "^0.19.1", - "typescript": "^2.9.1", + "typescript": "^3.0.0-dev.20180622", "url-loader": "^0.6.2", "val-loader": "^1.0.2", "vm-browserify": "~0.0.0", diff --git a/yarn.lock b/yarn.lock index 4f12dc3fd51..d8996526433 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6489,9 +6489,9 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -typescript@^2.9.1: - version "2.9.1" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.1.tgz#fdb19d2c67a15d11995fd15640e373e09ab09961" +typescript@^3.0.0-dev.20180622: + version "3.0.0-dev.20180622" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.0-dev.20180622.tgz#16cb2d9cd90cda892810439f75b0b92762b8e745" ua-parser-js@^0.7.9: version "0.7.17" From e1f0a66fd961bb55b33b313c36532230991590c7 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 22 Jun 2018 17:35:48 +0200 Subject: [PATCH 065/310] add note about webpack 5 refactoring --- lib/dependencies/DependencyReference.js | 4 ++++ lib/optimize/ConcatenatedModule.js | 1 + 2 files changed, 5 insertions(+) diff --git a/lib/dependencies/DependencyReference.js b/lib/dependencies/DependencyReference.js index 0499eedc4ee..a8f6afae069 100644 --- a/lib/dependencies/DependencyReference.js +++ b/lib/dependencies/DependencyReference.js @@ -7,6 +7,9 @@ /** @typedef {import("../Module")} Module */ class DependencyReference { + // TODO webpack 5: module must be dynamic, you must pass a function returning a module + // This is needed to remove the hack in ConcatenatedModule + // The problem is that the `module` in Dependency could be replaced i. e. because of Scope Hoisting /** * * @param {Module} module the referenced module @@ -15,6 +18,7 @@ class DependencyReference { * @param {number} order the order information or NaN if don't care */ constructor(module, importedNames, weak = false, order = NaN) { + // TODO webpack 5: make it a getter this.module = module; // true: full object // false: only sideeffects/no export diff --git a/lib/optimize/ConcatenatedModule.js b/lib/optimize/ConcatenatedModule.js index 2ec0d4bc775..a785bfcd2fe 100644 --- a/lib/optimize/ConcatenatedModule.js +++ b/lib/optimize/ConcatenatedModule.js @@ -429,6 +429,7 @@ class ConcatenatedModule extends Module { }) .filter(ref => ref); DependencyReference.sort(references); + // TODO webpack 5: remove this hack, see also DependencyReference return references.map(ref => { const dep = map.get(ref); return () => dep.getReference().module; From 50fe2e79ee02068ecd3606abc563d211e0bed300 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 8 Jun 2018 10:34:38 +0200 Subject: [PATCH 066/310] add Compilation.getDependencyReference and hooks to override it expose DependencyReference class --- lib/Compilation.js | 29 ++++++++++++- lib/FlagDependencyUsagePlugin.js | 31 +++++++------ lib/RuntimeTemplate.js | 4 ++ lib/optimize/ConcatenatedModule.js | 28 ++++++++---- lib/optimize/ModuleConcatenationPlugin.js | 43 +++++++++++++------ lib/wasm/WasmFinalizeExportsPlugin.js | 5 ++- lib/webpack.js | 3 ++ .../remove-export/index.js | 8 ++++ .../remove-export/module.js | 8 ++++ .../remove-export/reference.js | 3 ++ .../remove-export/webpack.config.js | 34 +++++++++++++++ 11 files changed, 159 insertions(+), 37 deletions(-) create mode 100644 test/configCases/deep-scope-analysis/remove-export/index.js create mode 100644 test/configCases/deep-scope-analysis/remove-export/module.js create mode 100644 test/configCases/deep-scope-analysis/remove-export/reference.js create mode 100644 test/configCases/deep-scope-analysis/remove-export/webpack.config.js diff --git a/lib/Compilation.js b/lib/Compilation.js index 1fd02ed4f6f..be3a3e98218 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -36,6 +36,10 @@ const Queue = require("./util/Queue"); const SortableSet = require("./util/SortableSet"); const GraphHelpers = require("./GraphHelpers"); +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./dependencies/DependencyReference")} DependencyReference */ +/** @typedef {import("./Dependency")} Dependency */ + const byId = (a, b) => { if (a.id < b.id) return -1; if (a.id > b.id) return 1; @@ -104,6 +108,13 @@ class Compilation extends Tapable { failedModule: new SyncHook(["module", "error"]), succeedModule: new SyncHook(["module"]), + /** @type {SyncWaterfallHook} */ + dependencyReference: new SyncWaterfallHook([ + "dependencyReference", + "dependency", + "module" + ]), + finishModules: new SyncHook(["modules"]), finishRebuildingModule: new SyncHook(["module"]), @@ -1175,6 +1186,19 @@ class Compilation extends Tapable { } } + /** + * @param {Module} module the module containing the dependency + * @param {Dependency} dependency the dependency + * @returns {DependencyReference} a reference for the dependency + */ + getDependencyReference(module, dependency) { + // TODO remove dep.getReference existance check in webpack 5 + if (typeof dependency.getReference !== "function") return null; + const ref = dependency.getReference(); + if (!ref) return null; + return this.hooks.dependencyReference.call(ref, dependency, module); + } + // This method creates the Chunk graph from the Module graph processDependenciesBlocksForChunkGroups(inputChunkGroups) { // Process is splitting into two parts: @@ -1193,7 +1217,7 @@ class Compilation extends Tapable { const iteratorDependency = d => { // We skip Dependencies without Reference - const ref = d.getReference(); + const ref = this.getDependencyReference(currentModule, d); if (!ref) { return; } @@ -1215,9 +1239,12 @@ class Compilation extends Tapable { blockQueue.push(b); }; + /** @type {Module} */ + let currentModule; let block, blockQueue, blockInfoModules, blockInfoBlocks; for (const module of this.modules) { blockQueue = [module]; + currentModule = module; while (blockQueue.length > 0) { block = blockQueue.pop(); blockInfoModules = new Set(); diff --git a/lib/FlagDependencyUsagePlugin.js b/lib/FlagDependencyUsagePlugin.js index e464c1cd6ac..85c22160892 100644 --- a/lib/FlagDependencyUsagePlugin.js +++ b/lib/FlagDependencyUsagePlugin.js @@ -4,6 +4,11 @@ */ "use strict"; +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ + +/** @typedef {false | true | string[]} UsedExports */ + const addToSet = (a, b) => { for (const item of b) { if (!a.includes(item)) a.push(item); @@ -54,37 +59,36 @@ class FlagDependencyUsagePlugin { return; } - queue.push([module, module.usedExports]); + queue.push([module, module, module.usedExports]); }; - const processDependenciesBlock = (depBlock, usedExports) => { + const processDependenciesBlock = (module, depBlock, usedExports) => { for (const dep of depBlock.dependencies) { - processDependency(dep); + processDependency(module, dep); } for (const variable of depBlock.variables) { for (const dep of variable.dependencies) { - processDependency(dep); + processDependency(module, dep); } } for (const block of depBlock.blocks) { - queue.push([block, usedExports]); + queue.push([module, block, usedExports]); } }; - const processDependency = dep => { - // TODO remove dep.getReference existance check in webpack 5 - const reference = dep.getReference && dep.getReference(); + const processDependency = (module, dep) => { + const reference = compilation.getDependencyReference(module, dep); if (!reference) return; - const module = reference.module; + const referenceModule = reference.module; const importedNames = reference.importedNames; - const oldUsed = module.used; - const oldUsedExports = module.usedExports; + const oldUsed = referenceModule.used; + const oldUsedExports = referenceModule.usedExports; if ( !oldUsed || (importedNames && (!oldUsedExports || !isSubset(oldUsedExports, importedNames))) ) { - processModule(module, importedNames); + processModule(referenceModule, importedNames); } }; @@ -92,6 +96,7 @@ class FlagDependencyUsagePlugin { module.used = false; } + /** @type {[Module, DependenciesBlock, UsedExports][]} */ const queue = []; for (const preparedEntrypoint of compilation._preparedEntrypoints) { if (preparedEntrypoint.module) { @@ -101,7 +106,7 @@ class FlagDependencyUsagePlugin { while (queue.length) { const queueItem = queue.pop(); - processDependenciesBlock(queueItem[0], queueItem[1]); + processDependenciesBlock(queueItem[0], queueItem[1], queueItem[2]); } } ); diff --git a/lib/RuntimeTemplate.js b/lib/RuntimeTemplate.js index 92292d389c1..5f06ed4af8a 100644 --- a/lib/RuntimeTemplate.js +++ b/lib/RuntimeTemplate.js @@ -265,6 +265,10 @@ module.exports = class RuntimeTemplate { if (exportName) { const used = module.isUsed(exportName); + if (!used) { + const comment = Template.toNormalComment(`unused export ${exportName}`); + return `${comment} undefined`; + } const comment = used !== exportName ? Template.toNormalComment(exportName) + " " : ""; const access = `${importVar}[${comment}${JSON.stringify(used)}]`; diff --git a/lib/optimize/ConcatenatedModule.js b/lib/optimize/ConcatenatedModule.js index a785bfcd2fe..a1991acde1c 100644 --- a/lib/optimize/ConcatenatedModule.js +++ b/lib/optimize/ConcatenatedModule.js @@ -20,6 +20,13 @@ const HarmonyCompatibilityDependency = require("../dependencies/HarmonyCompatibi const createHash = require("../util/createHash"); /** @typedef {import("../Dependency")} Dependency */ +/** @typedef {import("../Compilation")} Compilation */ + +/** + * @typedef {Object} ConcatenationEntry + * @property {"concatenated" | "external"} type + * @property {Module} module + */ const ensureNsObjSource = ( info, @@ -275,7 +282,7 @@ const getPathInAst = (ast, node) => { }; class ConcatenatedModule extends Module { - constructor(rootModule, modules) { + constructor(rootModule, modules, concatenationList) { super("javascript/esm", null); super.setChunks(rootModule._chunks); @@ -319,10 +326,9 @@ class ConcatenatedModule extends Module { this.warnings = []; this.errors = []; - this._orderedConcatenationList = this._createOrderedConcatenationList( - rootModule, - modulesSet - ); + this._orderedConcatenationList = + concatenationList || + ConcatenatedModule.createConcatenationList(rootModule, modulesSet, null); for (const info of this._orderedConcatenationList) { if (info.type === "concatenated") { const m = info.module; @@ -409,7 +415,13 @@ class ConcatenatedModule extends Module { }, 0); } - _createOrderedConcatenationList(rootModule, modulesSet) { + /** + * @param {Module} rootModule the root of the concatenation + * @param {Set} modulesSet a set of modules which should be concatenated + * @param {Compilation} compilation the compilation context + * @returns {ConcatenationEntry[]} concatenation list + */ + static createConcatenationList(rootModule, modulesSet, compilation) { const list = []; const set = new Set(); @@ -423,7 +435,7 @@ class ConcatenatedModule extends Module { const references = module.dependencies .filter(dep => dep instanceof HarmonyImportDependency) .map(dep => { - const ref = dep.getReference(); + const ref = compilation.getDependencyReference(module, dep); if (ref) map.set(ref, dep); return ref; }) @@ -432,7 +444,7 @@ class ConcatenatedModule extends Module { // TODO webpack 5: remove this hack, see also DependencyReference return references.map(ref => { const dep = map.get(ref); - return () => dep.getReference().module; + return () => compilation.getDependencyReference(module, dep).module; }); }; diff --git a/lib/optimize/ModuleConcatenationPlugin.js b/lib/optimize/ModuleConcatenationPlugin.js index 24710016f95..15b7d796a39 100644 --- a/lib/optimize/ModuleConcatenationPlugin.js +++ b/lib/optimize/ModuleConcatenationPlugin.js @@ -213,8 +213,9 @@ class ModuleConcatenationPlugin { const failureCache = new Map(); // try to add all imports - for (const imp of this.getImports(currentRoot)) { - const problem = this.tryToAdd( + for (const imp of this._getImports(compilation, currentRoot)) { + const problem = this._tryToAdd( + compilation, currentConfiguration, imp, possibleInners, @@ -245,9 +246,15 @@ class ModuleConcatenationPlugin { for (const concatConfiguration of concatConfigurations) { if (usedModules.has(concatConfiguration.rootModule)) continue; const modules = concatConfiguration.getModules(); + const rootModule = concatConfiguration.rootModule; const newModule = new ConcatenatedModule( - concatConfiguration.rootModule, - modules + rootModule, + Array.from(modules), + ConcatenatedModule.createConcatenationList( + rootModule, + modules, + compilation + ) ); for (const warning of concatConfiguration.getWarningsSorted()) { newModule.optimizationBailout.push(requestShortener => { @@ -320,15 +327,16 @@ class ModuleConcatenationPlugin { ); } - getImports(module) { + _getImports(compilation, module) { return new Set( module.dependencies // Get reference info only for harmony Dependencies - .map( - dep => - dep instanceof HarmonyImportDependency ? dep.getReference() : null - ) + .map(dep => { + if (!(dep instanceof HarmonyImportDependency)) return null; + if (!compilation) return dep.getReference(); + return compilation.getDependencyReference(module, dep); + }) // Reference is valid and has a module // Dependencies are simple enough to concat them @@ -345,7 +353,7 @@ class ModuleConcatenationPlugin { ); } - tryToAdd(config, module, possibleModules, failureCache) { + _tryToAdd(compilation, config, module, possibleModules, failureCache) { const cacheEntry = failureCache.get(module); if (cacheEntry) { return cacheEntry; @@ -383,7 +391,8 @@ class ModuleConcatenationPlugin { ) continue; - const problem = this.tryToAdd( + const problem = this._tryToAdd( + compilation, testConfig, reason.module, possibleModules, @@ -399,8 +408,14 @@ class ModuleConcatenationPlugin { config.set(testConfig); // Eagerly try to add imports too if possible - for (const imp of this.getImports(module)) { - const problem = this.tryToAdd(config, imp, possibleModules, failureCache); + for (const imp of this._getImports(compilation, module)) { + const problem = this._tryToAdd( + compilation, + config, + imp, + possibleModules, + failureCache + ); if (problem) { config.addWarning(imp, problem); } @@ -451,7 +466,7 @@ class ConcatConfiguration { } getModules() { - return this.modules.asArray(); + return this.modules.asSet(); } clone() { diff --git a/lib/wasm/WasmFinalizeExportsPlugin.js b/lib/wasm/WasmFinalizeExportsPlugin.js index 5187dd9f124..09584222bb3 100644 --- a/lib/wasm/WasmFinalizeExportsPlugin.js +++ b/lib/wasm/WasmFinalizeExportsPlugin.js @@ -25,7 +25,10 @@ class WasmFinalizeExportsPlugin { for (const reason of module.reasons) { // 2. is referenced by a non-WebAssembly module if (reason.module.type.startsWith("webassembly") === false) { - const ref = reason.dependency.getReference(); + const ref = compilation.getDependencyReference( + reason.module, + reason.dependency + ); const importedNames = ref.importedNames; diff --git a/lib/webpack.js b/lib/webpack.js index facfebf6c08..f5a8af68f95 100644 --- a/lib/webpack.js +++ b/lib/webpack.js @@ -123,6 +123,9 @@ exportPlugins(exports, { UmdMainTemplatePlugin: () => require("./UmdMainTemplatePlugin"), WatchIgnorePlugin: () => require("./WatchIgnorePlugin") }); +exportPlugins((exports.dependencies = {}), { + DependencyReference: () => require("./dependencies/DependencyReference") +}); exportPlugins((exports.optimize = {}), { AggressiveMergingPlugin: () => require("./optimize/AggressiveMergingPlugin"), AggressiveSplittingPlugin: () => diff --git a/test/configCases/deep-scope-analysis/remove-export/index.js b/test/configCases/deep-scope-analysis/remove-export/index.js new file mode 100644 index 00000000000..ac8ca53004e --- /dev/null +++ b/test/configCases/deep-scope-analysis/remove-export/index.js @@ -0,0 +1,8 @@ +import { test } from "./module"; + +it("should run the test", () => { + expect(test()).toEqual({ + used: "used", + unused: undefined + }) +}); diff --git a/test/configCases/deep-scope-analysis/remove-export/module.js b/test/configCases/deep-scope-analysis/remove-export/module.js new file mode 100644 index 00000000000..171977542d8 --- /dev/null +++ b/test/configCases/deep-scope-analysis/remove-export/module.js @@ -0,0 +1,8 @@ +import { used, unused } from "./reference"; + +export function test() { + return { + used, + unused + }; +} diff --git a/test/configCases/deep-scope-analysis/remove-export/reference.js b/test/configCases/deep-scope-analysis/remove-export/reference.js new file mode 100644 index 00000000000..725c814ac8f --- /dev/null +++ b/test/configCases/deep-scope-analysis/remove-export/reference.js @@ -0,0 +1,3 @@ +export var used = "used"; + +export var unused = "unused"; diff --git a/test/configCases/deep-scope-analysis/remove-export/webpack.config.js b/test/configCases/deep-scope-analysis/remove-export/webpack.config.js new file mode 100644 index 00000000000..1b15ba720d7 --- /dev/null +++ b/test/configCases/deep-scope-analysis/remove-export/webpack.config.js @@ -0,0 +1,34 @@ +const DependencyReference = require("../../../../").dependencies + .DependencyReference; +module.exports = { + optimization: { + usedExports: true, + concatenateModules: false + }, + plugins: [ + function() { + this.hooks.compilation.tap("Test", compilation => { + compilation.hooks.dependencyReference.tap( + "Test", + (ref, dep, module) => { + if ( + module.identifier().endsWith("module.js") && + ref.module && + ref.module.identifier().endsWith("reference.js") && + Array.isArray(ref.importedNames) && + ref.importedNames.includes("unused") + ) { + return new DependencyReference( + ref.module, + ref.importedNames.filter(item => item !== "unused"), + ref.weak, + ref.order + ); + } + return ref; + } + ); + }); + } + ] +}; From 3502287bbbd88675fead88cea79e1994796f2d66 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 23 Jun 2018 15:10:56 +0200 Subject: [PATCH 067/310] emit correct code for reexport unused exports --- ...armonyExportImportedSpecifierDependency.js | 20 +++++++---- lib/optimize/ConcatenatedModule.js | 3 ++ .../remove-export-scope-hoisting/index.js | 9 +++++ .../remove-export-scope-hoisting/module.js | 10 ++++++ .../remove-export-scope-hoisting/reference.js | 3 ++ .../webpack.config.js | 34 +++++++++++++++++++ .../remove-export/index.js | 5 +-- .../remove-export/module.js | 2 ++ 8 files changed, 77 insertions(+), 9 deletions(-) create mode 100644 test/configCases/deep-scope-analysis/remove-export-scope-hoisting/index.js create mode 100644 test/configCases/deep-scope-analysis/remove-export-scope-hoisting/module.js create mode 100644 test/configCases/deep-scope-analysis/remove-export-scope-hoisting/reference.js create mode 100644 test/configCases/deep-scope-analysis/remove-export-scope-hoisting/webpack.config.js diff --git a/lib/dependencies/HarmonyExportImportedSpecifierDependency.js b/lib/dependencies/HarmonyExportImportedSpecifierDependency.js index adf0be81421..f5996dc993c 100644 --- a/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +++ b/lib/dependencies/HarmonyExportImportedSpecifierDependency.js @@ -602,10 +602,10 @@ HarmonyExportImportedSpecifierDependency.Template = class HarmonyExportImportedS getReexportStatement(module, key, name, valueKey) { const exportsName = module.exportsArgument; - const returnValue = this.getReturnValue(valueKey); + const returnValue = this.getReturnValue(name, valueKey); return `__webpack_require__.d(${exportsName}, ${JSON.stringify( key - )}, function() { return ${name}${returnValue}; });\n`; + )}, function() { return ${returnValue}; });\n`; } getReexportFakeNamespaceObjectStatement(module, key, name) { @@ -617,19 +617,25 @@ HarmonyExportImportedSpecifierDependency.Template = class HarmonyExportImportedS getConditionalReexportStatement(module, key, name, valueKey) { const exportsName = module.exportsArgument; - const returnValue = this.getReturnValue(valueKey); + const returnValue = this.getReturnValue(name, valueKey); return `if(__webpack_require__.o(${name}, ${JSON.stringify( valueKey )})) __webpack_require__.d(${exportsName}, ${JSON.stringify( key - )}, function() { return ${name}${returnValue}; });\n`; + )}, function() { return ${returnValue}; });\n`; } - getReturnValue(valueKey) { + getReturnValue(name, valueKey) { if (valueKey === null) { - return "_default.a"; + return `${name}_default.a`; + } + if (valueKey === "") { + return name; + } + if (valueKey === false) { + return "/* unused export */ undefined"; } - return valueKey && "[" + JSON.stringify(valueKey) + "]"; + return `${name}[${JSON.stringify(valueKey)}]`; } }; diff --git a/lib/optimize/ConcatenatedModule.js b/lib/optimize/ConcatenatedModule.js index a1991acde1c..42e74ead6ac 100644 --- a/lib/optimize/ConcatenatedModule.js +++ b/lib/optimize/ConcatenatedModule.js @@ -133,6 +133,9 @@ const getFinalName = ( strictHarmonyModule ); } + if (!info.module.isUsed(directExport)) { + return "/* unused export */ undefined"; + } const name = info.internalNames.get(directExport); if (!name) { throw new Error( diff --git a/test/configCases/deep-scope-analysis/remove-export-scope-hoisting/index.js b/test/configCases/deep-scope-analysis/remove-export-scope-hoisting/index.js new file mode 100644 index 00000000000..be12281baf0 --- /dev/null +++ b/test/configCases/deep-scope-analysis/remove-export-scope-hoisting/index.js @@ -0,0 +1,9 @@ +import { test, unused } from "./module"; + +it("should run the test", () => { + expect(test()).toEqual({ + used: "used", + unused: undefined + }); + expect(unused).toEqual(undefined); +}); diff --git a/test/configCases/deep-scope-analysis/remove-export-scope-hoisting/module.js b/test/configCases/deep-scope-analysis/remove-export-scope-hoisting/module.js new file mode 100644 index 00000000000..8d9ec8267b9 --- /dev/null +++ b/test/configCases/deep-scope-analysis/remove-export-scope-hoisting/module.js @@ -0,0 +1,10 @@ +import { used, unused } from "./reference"; + +export function test() { + return { + used, + unused + }; +} + +export { unused } diff --git a/test/configCases/deep-scope-analysis/remove-export-scope-hoisting/reference.js b/test/configCases/deep-scope-analysis/remove-export-scope-hoisting/reference.js new file mode 100644 index 00000000000..725c814ac8f --- /dev/null +++ b/test/configCases/deep-scope-analysis/remove-export-scope-hoisting/reference.js @@ -0,0 +1,3 @@ +export var used = "used"; + +export var unused = "unused"; diff --git a/test/configCases/deep-scope-analysis/remove-export-scope-hoisting/webpack.config.js b/test/configCases/deep-scope-analysis/remove-export-scope-hoisting/webpack.config.js new file mode 100644 index 00000000000..3c8519e2a44 --- /dev/null +++ b/test/configCases/deep-scope-analysis/remove-export-scope-hoisting/webpack.config.js @@ -0,0 +1,34 @@ +const DependencyReference = require("../../../../").dependencies + .DependencyReference; +module.exports = { + optimization: { + usedExports: true, + concatenateModules: true + }, + plugins: [ + function() { + this.hooks.compilation.tap("Test", compilation => { + compilation.hooks.dependencyReference.tap( + "Test", + (ref, dep, module) => { + if ( + module.identifier().endsWith("module.js") && + ref.module && + ref.module.identifier().endsWith("reference.js") && + Array.isArray(ref.importedNames) && + ref.importedNames.includes("unused") + ) { + return new DependencyReference( + ref.module, + ref.importedNames.filter(item => item !== "unused"), + ref.weak, + ref.order + ); + } + return ref; + } + ); + }); + } + ] +}; diff --git a/test/configCases/deep-scope-analysis/remove-export/index.js b/test/configCases/deep-scope-analysis/remove-export/index.js index ac8ca53004e..be12281baf0 100644 --- a/test/configCases/deep-scope-analysis/remove-export/index.js +++ b/test/configCases/deep-scope-analysis/remove-export/index.js @@ -1,8 +1,9 @@ -import { test } from "./module"; +import { test, unused } from "./module"; it("should run the test", () => { expect(test()).toEqual({ used: "used", unused: undefined - }) + }); + expect(unused).toEqual(undefined); }); diff --git a/test/configCases/deep-scope-analysis/remove-export/module.js b/test/configCases/deep-scope-analysis/remove-export/module.js index 171977542d8..8d9ec8267b9 100644 --- a/test/configCases/deep-scope-analysis/remove-export/module.js +++ b/test/configCases/deep-scope-analysis/remove-export/module.js @@ -6,3 +6,5 @@ export function test() { unused }; } + +export { unused } From be896f2b348fa763aaecea3860fa0445b4188535 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 23 Jun 2018 15:27:10 +0200 Subject: [PATCH 068/310] fix bug --- lib/dependencies/HarmonyExportImportedSpecifierDependency.js | 3 +++ lib/optimize/ConcatenatedModule.js | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/dependencies/HarmonyExportImportedSpecifierDependency.js b/lib/dependencies/HarmonyExportImportedSpecifierDependency.js index f5996dc993c..360c785b113 100644 --- a/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +++ b/lib/dependencies/HarmonyExportImportedSpecifierDependency.js @@ -616,6 +616,9 @@ HarmonyExportImportedSpecifierDependency.Template = class HarmonyExportImportedS } getConditionalReexportStatement(module, key, name, valueKey) { + if (valueKey === false) { + return "/* unused export */\n"; + } const exportsName = module.exportsArgument; const returnValue = this.getReturnValue(name, valueKey); return `if(__webpack_require__.o(${name}, ${JSON.stringify( diff --git a/lib/optimize/ConcatenatedModule.js b/lib/optimize/ConcatenatedModule.js index 42e74ead6ac..e67fc58ccec 100644 --- a/lib/optimize/ConcatenatedModule.js +++ b/lib/optimize/ConcatenatedModule.js @@ -132,8 +132,7 @@ const getFinalName = ( requestShortener, strictHarmonyModule ); - } - if (!info.module.isUsed(directExport)) { + } else if (!info.module.isUsed(exportName)) { return "/* unused export */ undefined"; } const name = info.internalNames.get(directExport); From f64f75e55fdf5e8fa6e758c88518b5b26250444f Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Sat, 23 Jun 2018 10:24:36 -0400 Subject: [PATCH 069/310] revert function style, fix a few types, etc --- lib/Compilation.js | 32 ++++++++----------- lib/Compiler.js | 2 +- .../__snapshots__/StatsTestCases.test.js.snap | 6 ++-- 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/lib/Compilation.js b/lib/Compilation.js index 1349448ffa5..099313ebbac 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -102,20 +102,20 @@ const ModuleDependency = require("./dependencies/ModuleDependency"); * @param {Chunk} b second chunk to sort by id * @returns {-1|0|1} sort value */ -function byId(a, b) { - if (a.id && b.id) { +const byId = (a, b) => { + if (a.id !== null && b.id !== null) { if (a.id < b.id) return -1; if (a.id > b.id) return 1; } return 0; -} +}; /** * @param {Module} a first module to sort by * @param {Module} b second module to sort by * @returns {-1|0|1} sort value */ -function byIdOrIdentifier(a, b) { +const byIdOrIdentifier = (a, b) => { if (a.id < b.id) return -1; if (a.id > b.id) return 1; const identA = a.identifier(); @@ -123,14 +123,14 @@ function byIdOrIdentifier(a, b) { if (identA < identB) return -1; if (identA > identB) return 1; return 0; -} +}; /** * @param {Module} a first module to sort by * @param {Module} b second module to sort by * @returns {-1|0|1} sort value */ -function byIndexOrIdentifier(a, b) { +const byIndexOrIdentifier = (a, b) => { if (a.index < b.index) return -1; if (a.index > b.index) return 1; const identA = a.identifier(); @@ -138,27 +138,27 @@ function byIndexOrIdentifier(a, b) { if (identA < identB) return -1; if (identA > identB) return 1; return 0; -} +}; /** * @param {Compilation} a first compilation to sort by * @param {Compilation} b second compilation to sort by * @returns {-1|0|1} sort value */ -function byNameOrHash(a, b) { +const byNameOrHash = (a, b) => { if (a.name < b.name) return -1; if (a.name > b.name) return 1; if (a.fullHash < b.fullHash) return -1; if (a.fullHash > b.fullHash) return 1; return 0; -} +}; /** * @param {DependenciesBlockVariable[]} variables DepBlock Variables to iterate over * @param {DepBlockVarDependenciesCallback} fn callback to apply on iterated elements * @returns {void} */ -function iterationBlockVariable(variables, fn) { +const iterationBlockVariable = (variables, fn) => { for ( let indexVariable = 0; indexVariable < variables.length; @@ -171,7 +171,7 @@ function iterationBlockVariable(variables, fn) { fn(varDep[indexVDep]); } } -} +}; /** * @template {T} @@ -179,14 +179,14 @@ function iterationBlockVariable(variables, fn) { * @param {function(T): void} fn callback applied to each element * @returns {void} */ -function iterationOfArrayCallback(arr, fn) { +const iterationOfArrayCallback = (arr, fn) => { for (let index = 0; index < arr.length; index++) { fn(arr[index]); } -} +}; /** - * @template {T} + * @template T * @param {Set} set set to add items to * @param {Set} otherSet set to add items from * @returns {void} @@ -928,7 +928,6 @@ class Compilation extends Tapable { } this.semaphore.acquire(() => { - /** @type {ModuleFactory} */ moduleFactory.create( { contextInfo: { @@ -2011,9 +2010,6 @@ class Compilation extends Tapable { // Calculate maximum assigned chunk id let nextFreeChunkId = -1; for (const id of usedIds) { - if (typeof id !== "number") { - continue; - } nextFreeChunkId = Math.max(nextFreeChunkId, id); } nextFreeChunkId++; diff --git a/lib/Compiler.js b/lib/Compiler.js index 8e70496e38a..9aa1d14d380 100644 --- a/lib/Compiler.js +++ b/lib/Compiler.js @@ -31,7 +31,7 @@ const ConcurrentCompilationError = require("./ConcurrentCompilationError"); * @typedef {Object} CompilationParams * @property {NormalModuleFactory} normalModuleFactory * @property {ContextModuleFactory} contextModuleFactory - * @property {Set} compilationDependencies + * @property {Set} compilationDependencies */ /** @typedef {string|string[]} EntryValues */ diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index 55289e2e184..f1a9c618286 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -61,13 +61,13 @@ exports[`StatsTestCases should print correct stats for aggressive-splitting-on-d Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names +cf8697fa2c994f39a5d4.js 1.94 KiB 6, 7 [emitted] fd868baa40dab4fc30fd.js 1.93 KiB 0 [emitted] -d6418937dfae4b3ee922.js 1 KiB 1 [emitted] +79c527bb5bf9cba1dc12.js 1.96 KiB 2 [emitted] e9d82e81fefd7353e8df.js 1.94 KiB 3, 1 [emitted] ae76098eeb55b9c448f2.js 1.01 KiB 4 [emitted] 05d92aaacfbffa4b7e56.js 1.94 KiB 5 [emitted] -cf8697fa2c994f39a5d4.js 1.94 KiB 6, 7 [emitted] -79c527bb5bf9cba1dc12.js 1.96 KiB 2 [emitted] +d6418937dfae4b3ee922.js 1 KiB 1 [emitted] 685acdc95ff4af957f47.js 1 KiB 7 [emitted] 606f48c13070850338b1.js 1.94 KiB 8 [emitted] c5a8eae840969538f450.js 1.94 KiB 9 [emitted] From 87589e72d966c6cd53dfa68afc7341519dd060b0 Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Sat, 23 Jun 2018 10:53:59 -0400 Subject: [PATCH 070/310] add NormalModuleType inline --- lib/AutomaticPrefetchPlugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/AutomaticPrefetchPlugin.js b/lib/AutomaticPrefetchPlugin.js index 26123de53f5..ccb7d856b4a 100644 --- a/lib/AutomaticPrefetchPlugin.js +++ b/lib/AutomaticPrefetchPlugin.js @@ -30,7 +30,7 @@ class AutomaticPrefetchPlugin { compiler.hooks.afterCompile.tap("AutomaticPrefetchPlugin", compilation => { lastModules = compilation.modules .filter(m => m instanceof NormalModule) - .map(m => ({ + .map((/** @type {NormalModule} */ m) => ({ context: m.context, request: m.request })); From cc7f578397d6576b2e987b22c53fcce95f785f13 Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Sat, 23 Jun 2018 10:55:29 -0400 Subject: [PATCH 071/310] add type lint to prestage commit --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 1ac0aac4481..75bf95a4846 100644 --- a/package.json +++ b/package.json @@ -141,7 +141,8 @@ }, "lint-staged": { "lib/**/*.js": [ - "eslint --cache" + "eslint --cache", + "tsc" ] }, "jest": { From 12ba65958d400d01f6cff6e2b7ecb4d1fe6fb854 Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Sat, 23 Jun 2018 10:55:48 -0400 Subject: [PATCH 072/310] add type lint to prestage commit --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index 75bf95a4846..1ac0aac4481 100644 --- a/package.json +++ b/package.json @@ -141,8 +141,7 @@ }, "lint-staged": { "lib/**/*.js": [ - "eslint --cache", - "tsc" + "eslint --cache" ] }, "jest": { From 735f99c01bb82a4ea703b63d1a1ac74a8d7235b7 Mon Sep 17 00:00:00 2001 From: Sam Saccone Date: Sat, 23 Jun 2018 11:27:18 -0700 Subject: [PATCH 073/310] Fix race condition in profiling plugin. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based on some digging in this git history for the profiling plugin it looks like this commit exacerbated the issue: 883088e Note, we are calling end() and then writeStream right after we call flush on the trace object https://github.com/samccone/chrome-trace-event/blob/64b514e9bd364ca5b6df3c0fb121ba0d3b239cc2/lib/trace-event.ts#L123 The trace object is only calling _push to the writable stream but in no way ensuring that all data that has been pushed has actually been written to the output stream sooo we find ourselves encounter 🐎 [race] conditions. --- lib/debug/ProfilingPlugin.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/debug/ProfilingPlugin.js b/lib/debug/ProfilingPlugin.js index 118d5007de3..bd6202fdbdb 100644 --- a/lib/debug/ProfilingPlugin.js +++ b/lib/debug/ProfilingPlugin.js @@ -130,7 +130,14 @@ function createTrace(outputPath) { trace, counter, profiler, - end: callback => fsStream.end(callback) + end: callback => { + // Wait until the write stream finishes. + fsStream.on("finish", () => { + callback(); + }); + // Tear down the readable trace stream. + trace.destroy(); + } }; } From 8a7597aa6eb2eef66a8f9db3a0c49bcb96022a94 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sun, 24 Jun 2018 10:44:01 +0200 Subject: [PATCH 074/310] 4.12.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 14c9bb03432..5b6f6dcfa97 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.12.0", + "version": "4.12.1", "author": "Tobias Koppers @sokra", "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", From f297a6822678ae286a580b17b0fee074bcbf267d Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 09:46:00 +0200 Subject: [PATCH 075/310] make tsconfig.json a correct json file and prettier it --- .prettierignore | 1 + package.json | 2 +- tsconfig.json | 70 +++++++------------------------------------------ 3 files changed, 12 insertions(+), 61 deletions(-) diff --git a/.prettierignore b/.prettierignore index c99674c1822..1f362540511 100644 --- a/.prettierignore +++ b/.prettierignore @@ -13,3 +13,4 @@ !examples/**/webpack.config.js !schemas/**/*.js !declarations.d.ts +!tsconfig.json diff --git a/package.json b/package.json index 9ac6f0fc140..7cd99e77a84 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ "code-lint": "eslint --cache setup lib bin hot buildin benchmark \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\"", "type-lint": "tsc --pretty", "fix": "yarn code-lint --fix", - "pretty": "prettier --write \"setup/**/*.js\" \"lib/**/*.js\" \"bin/*.js\" \"hot/*.js\" \"buildin/*.js\" \"benchmark/**/*.js\" \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\" \"declarations.d.ts\"", + "pretty": "prettier --write \"setup/**/*.js\" \"lib/**/*.js\" \"bin/*.js\" \"hot/*.js\" \"buildin/*.js\" \"benchmark/**/*.js\" \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\" \"declarations.d.ts\" \"tsconfig.json\"", "schema-lint": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"/test/*.lint.js\" --no-verbose", "benchmark": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"/test/*.benchmark.js\" --runInBand", "cover": "yarn cover:init && yarn cover:all && yarn cover:report", diff --git a/tsconfig.json b/tsconfig.json index c8dfaaada4b..ab2f8191e11 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,65 +1,15 @@ { "compilerOptions": { - /* Basic Options */ - "target": - "ES2017" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */, - "module": - "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, - "lib": [ - "es2017", - "dom" - ] /* Specify library files to be included in the compilation. */, - "allowJs": true /* Allow javascript files to be compiled. */, - "checkJs": true /* Report errors in .js files. */, - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - // "outDir": "./", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "removeComments": true, /* Do not emit comments to output. */ - "noEmit": true /* Do not emit outputs. */, - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Strict Type-Checking Options */ - "strict": false /* Enable all strict type-checking options. */, - // "noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */, - // "strictNullChecks": true /* Enable strict null checks. */, - // "strictFunctionTypes": true /* Enable strict checking of function types. */, - // "strictPropertyInitialization": true /* Enable strict checking of property initialization in classes. */, - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - "alwaysStrict": true /* Parse in strict mode and emit "use strict" for each source file. */, - - /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - - /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - "types": [ - "node" - ] /* Type declaration files to be included in compilation. */, - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - - /* Source Map Options */ - // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */ - // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - - /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + "target": "ES2017", + "module": "commonjs", + "lib": ["es2017", "dom"], + "allowJs": true, + "checkJs": true, + "noEmit": true, + "strict": false, + "alwaysStrict": true, + "types": ["node"], + "esModuleInterop": true }, "include": ["declarations.d.ts", "bin/*.js", "lib/**/*.js"] } From 8ae803ba134e23b6aec0fe9dbefb57ab0c07195b Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 10:09:39 +0200 Subject: [PATCH 076/310] type fixes --- lib/DynamicEntryPlugin.js | 8 ++++++-- lib/ModuleTemplate.js | 2 +- lib/Template.js | 3 +++ lib/dependencies/LoaderDependency.js | 7 +++---- lib/dependencies/LoaderPlugin.js | 4 +++- lib/dependencies/SingleEntryDependency.js | 1 - 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/lib/DynamicEntryPlugin.js b/lib/DynamicEntryPlugin.js index ff78c47c9e9..710e9908636 100644 --- a/lib/DynamicEntryPlugin.js +++ b/lib/DynamicEntryPlugin.js @@ -12,8 +12,12 @@ const SingleEntryPlugin = require("./SingleEntryPlugin"); /** @typedef {import("./Compiler")} Compiler */ /** @typedef {string|string[]} EntryValues */ -/** @typedef {{[entryKey: string]: EntryValues | EntryValues}} EntryOptionValues */ -/** @typedef {(() => (EntryOptionValues|EntryValues))} EntryOptionValuesFunction */ +/** @typedef {Record} EntryOptionValues */ + +/** + * @callback EntryOptionValuesFunction + * @returns {EntryOptionValues | EntryValues} the computed value + */ class DynamicEntryPlugin { /** diff --git a/lib/ModuleTemplate.js b/lib/ModuleTemplate.js index f3631be5025..06e787ed930 100644 --- a/lib/ModuleTemplate.js +++ b/lib/ModuleTemplate.js @@ -47,7 +47,7 @@ module.exports = class ModuleTemplate extends Tapable { * @param {Module} module the module * @param {TODO} dependencyTemplates templates for dependencies * @param {TODO} options render options - * @returns {Source|string} the source + * @returns {Source} the source */ render(module, dependencyTemplates, options) { try { diff --git a/lib/Template.js b/lib/Template.js index d0b197a322e..70d65bd1068 100644 --- a/lib/Template.js +++ b/lib/Template.js @@ -22,6 +22,8 @@ const COMMENT_END_REGEX = /\*\//g; const PATH_NAME_NORMALIZE_REPLACE_REGEX = /[^a-zA-Z0-9_!§$()=\-^°]+/g; const MATCH_PADDED_HYPHENS_REPLACE_REGEX = /^-|-$/g; +/** @typedef {import("webpack-sources").Source} Source */ + /** * @typedef {Object} HasId * @property {number | string} id @@ -230,6 +232,7 @@ class Template { source.add("[]"); return source; } + /** @type {{id: string|number, source: Source|string}[]} */ var allModules = modules.map(module => { return { id: module.id, diff --git a/lib/dependencies/LoaderDependency.js b/lib/dependencies/LoaderDependency.js index a551b100a83..9d0876bcee0 100644 --- a/lib/dependencies/LoaderDependency.js +++ b/lib/dependencies/LoaderDependency.js @@ -5,13 +5,12 @@ "use strict"; const ModuleDependency = require("./ModuleDependency"); -/** @typedef {import("../NormalModule")} NormalModule */ - class LoaderDependency extends ModuleDependency { + /** + * @param {string} request request string + */ constructor(request) { super(request); - /** @type {NormalModule} */ - this.module = undefined; } get type() { diff --git a/lib/dependencies/LoaderPlugin.js b/lib/dependencies/LoaderPlugin.js index 14388db5eca..a3ab3f14104 100644 --- a/lib/dependencies/LoaderPlugin.js +++ b/lib/dependencies/LoaderPlugin.js @@ -5,6 +5,7 @@ "use strict"; const LoaderDependency = require("./LoaderDependency"); +const NormalModule = require("../NormalModule"); class LoaderPlugin { apply(compiler) { @@ -57,7 +58,8 @@ class LoaderPlugin { if (!dep.module) { return callback(new Error("Cannot load the module")); } - if (dep.module.error) { + // TODO consider removing this in webpack 5 + if (dep.module instanceof NormalModule && dep.module.error) { return callback(dep.module.error); } if (!dep.module._source) { diff --git a/lib/dependencies/SingleEntryDependency.js b/lib/dependencies/SingleEntryDependency.js index b269fb60f00..75a8c080fec 100644 --- a/lib/dependencies/SingleEntryDependency.js +++ b/lib/dependencies/SingleEntryDependency.js @@ -11,7 +11,6 @@ class SingleEntryDependency extends ModuleDependency { */ constructor(request) { super(request); - this.request = request; } get type() { From c774f030f1bb004a4fa61cc549f018ceab611f76 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 10:43:59 +0200 Subject: [PATCH 077/310] merge DependencyLocation and disallow string locations --- declarations.d.ts | 12 ------------ lib/AsyncDependenciesBlock.js | 1 + lib/CommentCompilationWarning.js | 4 ++-- lib/Compilation.js | 1 + lib/Dependency.js | 20 ++++++++++++++++---- lib/DllEntryPlugin.js | 5 ++++- lib/MultiEntryPlugin.js | 5 ++++- lib/compareLocations.js | 30 +++++++++++++----------------- 8 files changed, 41 insertions(+), 37 deletions(-) diff --git a/declarations.d.ts b/declarations.d.ts index 670a25e3edb..81a0b7c0f29 100644 --- a/declarations.d.ts +++ b/declarations.d.ts @@ -244,15 +244,3 @@ declare const $crossOriginLoading$; declare const chunkId; type TODO = any; - -declare interface SourcePosition { - line: number; - column: number; -} - -declare interface DependencyLocation { - name: string; - index: number; - start: SourcePosition; - end: SourcePosition; -} diff --git a/lib/AsyncDependenciesBlock.js b/lib/AsyncDependenciesBlock.js index 74e15607fa0..113aa391af3 100644 --- a/lib/AsyncDependenciesBlock.js +++ b/lib/AsyncDependenciesBlock.js @@ -8,6 +8,7 @@ const DependenciesBlock = require("./DependenciesBlock"); /** @typedef {import("./ChunkGroup")} ChunkGroup */ /** @typedef {import("./Module")} Module */ +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ /** @typedef {import("crypto").Hash} Hash */ /** @typedef {TODO} GroupOptions */ diff --git a/lib/CommentCompilationWarning.js b/lib/CommentCompilationWarning.js index 4b1e6de5118..1f8e233f3aa 100644 --- a/lib/CommentCompilationWarning.js +++ b/lib/CommentCompilationWarning.js @@ -8,14 +8,14 @@ const WebpackError = require("./WebpackError"); /** @typedef {import("./Module.js")} Module */ -/** @typedef {import("./Dependency.js").Loc} Loc */ +/** @typedef {import("./Dependency.js").DependencyLocation} DependencyLocation */ class CommentCompilationWarning extends WebpackError { /** * * @param {string} message warning message * @param {Module} module affected module - * @param {Loc} loc affected lines of code + * @param {DependencyLocation} loc affected lines of code */ constructor(message, module, loc) { super(message); diff --git a/lib/Compilation.js b/lib/Compilation.js index 099313ebbac..c40fa64a3ad 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -47,6 +47,7 @@ const ModuleDependency = require("./dependencies/ModuleDependency"); /** @typedef {import("./dependencies/DllEntryDependency")} DllEntryDependency */ /** @typedef {import("./DependenciesBlock")} DependenciesBlock */ /** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ // TODO use @callback /** @typedef {{[assetName: string]: Source}} CompilationAssets */ diff --git a/lib/Dependency.js b/lib/Dependency.js index bb3b5b0d5d7..c439d639a11 100644 --- a/lib/Dependency.js +++ b/lib/Dependency.js @@ -14,24 +14,36 @@ const DependencyReference = require("./dependencies/DependencyReference"); /** * @typedef {Object} DependencyTemplate * @property {function(Dependency, Source, RuntimeTemplate, Map): void} apply + */ -/** @typedef {Object} Position +/** @typedef {Object} SourcePosition * @property {number} column * @property {number} line */ -/** @typedef {Object} Loc - * @property {Position} start - * @property {Position} end +/** @typedef {Object} RealDependencyLocation + * @property {SourcePosition} start + * @property {SourcePosition} end + * @property {number=} index + */ + +/** @typedef {Object} SynteticDependencyLocation + * @property {string} name + * @property {number} index */ +/** @typedef {SynteticDependencyLocation|RealDependencyLocation} DependencyLocation */ + class Dependency { constructor() { /** @type {Module|null} */ this.module = null; // TODO remove in webpack 5 + /** @type {boolean} */ this.weak = false; + /** @type {boolean} */ this.optional = false; + /** @type {DependencyLocation} */ this.loc = undefined; } diff --git a/lib/DllEntryPlugin.js b/lib/DllEntryPlugin.js index dbb1a40b3ab..562628d906a 100644 --- a/lib/DllEntryPlugin.js +++ b/lib/DllEntryPlugin.js @@ -36,7 +36,10 @@ class DllEntryPlugin { new DllEntryDependency( this.entries.map((e, idx) => { const dep = new SingleEntryDependency(e); - dep.loc = `${this.name}:${idx}`; + dep.loc = { + name: this.name, + index: idx + }; return dep; }), this.name diff --git a/lib/MultiEntryPlugin.js b/lib/MultiEntryPlugin.js index a7c67e5b678..b38a82399d9 100644 --- a/lib/MultiEntryPlugin.js +++ b/lib/MultiEntryPlugin.js @@ -66,7 +66,10 @@ class MultiEntryPlugin { const dep = new SingleEntryDependency(e); // Because entrypoints are not dependencies found in an // existing module, we give it a synthetic id - dep.loc = `${name}:${100000 + idx}`; + dep.loc = { + name, + index: idx + }; return dep; }), name diff --git a/lib/compareLocations.js b/lib/compareLocations.js index 7dce42bdb12..3840eb893ad 100644 --- a/lib/compareLocations.js +++ b/lib/compareLocations.js @@ -4,23 +4,13 @@ */ "use strict"; -/** - * @typedef {Object} LineAndColumn - * @property {number=} line - * @property {number=} column - */ - -/** - * @typedef {Object} NodeLocation - * @property {LineAndColumn=} start - * @property {LineAndColumn=} end - * @property {number=} index - */ +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ +// TODO webpack 5 remove string type from a and b /** * Compare two locations - * @param {string|NodeLocation} a A location node - * @param {string|NodeLocation} b A location node + * @param {string|DependencyLocation} a A location node + * @param {string|DependencyLocation} b A location node * @returns {-1|0|1} sorting comparator value */ module.exports = (a, b) => { @@ -38,7 +28,7 @@ module.exports = (a, b) => { if (typeof b === "string") { return -1; } else if (typeof b === "object") { - if (a.start && b.start) { + if ("start" in a && "start" in b) { const ap = a.start; const bp = b.start; if (ap.line < bp.line) return -1; @@ -46,8 +36,14 @@ module.exports = (a, b) => { if (ap.column < bp.column) return -1; if (ap.column > bp.column) return 1; } - if (a.index < b.index) return -1; - if (a.index > b.index) return 1; + if ("name" in a && "name" in b) { + if (a.name < b.name) return -1; + if (a.name > b.name) return 1; + } + if ("index" in a && "index" in b) { + if (a.index < b.index) return -1; + if (a.index > b.index) return 1; + } return 0; } else { return 0; From 5b4547e0acd17b9530aa35aae92d385ad088da50 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 10:44:54 +0200 Subject: [PATCH 078/310] cleanup Hash types --- lib/ChunkTemplate.js | 15 +++++++++++++-- lib/MainTemplate.js | 15 +++++++++++++-- lib/util/createHash.js | 15 +++++++++++++++ 3 files changed, 41 insertions(+), 4 deletions(-) diff --git a/lib/ChunkTemplate.js b/lib/ChunkTemplate.js index c22586f1fcc..7eebef8b590 100644 --- a/lib/ChunkTemplate.js +++ b/lib/ChunkTemplate.js @@ -9,12 +9,12 @@ const { Tapable, SyncWaterfallHook, SyncHook } = require("tapable"); /** @typedef {import("./ModuleTemplate")} ModuleTemplate */ /** @typedef {import("./Chunk")} Chunk */ /** @typedef {import("./Module")} Module} */ -/** @typedef {import("crypto").Hash} Hash */ +/** @typedef {import("./util/createHash").Hash} Hash} */ /** * @typedef {Object} RenderManifestOptions * @property {Chunk} chunk the chunk used to render - * @property {Hash} hash + * @property {string} hash * @property {string} fullHash * @property {TODO} outputOptions * @property {{javascript: ModuleTemplate, webassembly: ModuleTemplate}} moduleTemplates @@ -58,12 +58,23 @@ module.exports = class ChunkTemplate extends Tapable { return result; } + /** + * Updates hash with information from this template + * @param {Hash} hash the hash to update + * @returns {void} + */ updateHash(hash) { hash.update("ChunkTemplate"); hash.update("2"); this.hooks.hash.call(hash); } + /** + * Updates hash with chunk-specific information from this template + * @param {Hash} hash the hash to update + * @param {Chunk} chunk the chunk + * @returns {void} + */ updateHashForChunk(hash, chunk) { this.updateHash(hash); this.hooks.hashForChunk.call(hash, chunk); diff --git a/lib/MainTemplate.js b/lib/MainTemplate.js index 3463546fea6..d4ae152d9f8 100644 --- a/lib/MainTemplate.js +++ b/lib/MainTemplate.js @@ -22,12 +22,12 @@ const Template = require("./Template"); /** @typedef {import("./ModuleTemplate")} ModuleTemplate */ /** @typedef {import("./Chunk")} Chunk */ /** @typedef {import("./Module")} Module} */ -/** @typedef {import("crypto").Hash} Hash} */ +/** @typedef {import("./util/createHash").Hash} Hash} */ /** * @typedef {Object} RenderManifestOptions * @property {Chunk} chunk the chunk used to render - * @property {Hash} hash + * @property {string} hash * @property {string} fullHash * @property {TODO} outputOptions * @property {{javascript: ModuleTemplate, webassembly: ModuleTemplate}} moduleTemplates @@ -474,6 +474,11 @@ module.exports = class MainTemplate extends Tapable { return this.hooks.assetPath.call(path, options); } + /** + * Updates hash with information from this template + * @param {Hash} hash the hash to update + * @returns {void} + */ updateHash(hash) { hash.update("maintemplate"); hash.update("3"); @@ -481,6 +486,12 @@ module.exports = class MainTemplate extends Tapable { this.hooks.hash.call(hash); } + /** + * Updates hash with chunk-specific information from this template + * @param {Hash} hash the hash to update + * @param {Chunk} chunk the chunk + * @returns {void} + */ updateHashForChunk(hash, chunk) { this.updateHash(hash); this.hooks.hashForChunk.call(hash, chunk); diff --git a/lib/util/createHash.js b/lib/util/createHash.js index 2d21d0aa52b..bb5062c6721 100644 --- a/lib/util/createHash.js +++ b/lib/util/createHash.js @@ -4,8 +4,18 @@ */ "use strict"; +/** @typedef {{new(): Hash}} HashConstructor */ +/** + * @typedef {Object} Hash + * @property {function(string|Buffer, string=): Hash} update + * @property {function(string): string} digest + */ + const BULK_SIZE = 1000; +/** + * @implements {Hash} + */ class BulkUpdateDecorator { constructor(hash) { this.hash = hash; @@ -63,6 +73,11 @@ class DebugHash { } } +/** + * Creates a hash by name or function + * @param {string | HashConstructor} algorithm the algorithm name or a constructor creating a hash + * @returns {Hash} the hash + */ module.exports = algorithm => { if (typeof algorithm === "function") { return new BulkUpdateDecorator(new algorithm()); From 763ce22aa7f3e188fe789b2023af6c6fb8f0618c Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 10:51:33 +0200 Subject: [PATCH 079/310] spacing of hook list --- lib/Compiler.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/lib/Compiler.js b/lib/Compiler.js index 9aa1d14d380..b75b743c0e2 100644 --- a/lib/Compiler.js +++ b/lib/Compiler.js @@ -44,58 +44,43 @@ class Compiler extends Tapable { this.hooks = { /** @type {SyncBailHook} */ shouldEmit: new SyncBailHook(["compilation"]), - /** @type {AsyncSeriesHook} */ done: new AsyncSeriesHook(["stats"]), - /** @type {AsyncSeriesHook<>} */ additionalPass: new AsyncSeriesHook([]), - /** @type {AsyncSeriesHook} */ beforeRun: new AsyncSeriesHook(["compiler"]), - /** @type {AsyncSeriesHook} */ run: new AsyncSeriesHook(["compiler"]), - /** @type {AsyncSeriesHook} */ emit: new AsyncSeriesHook(["compilation"]), - /** @type {AsyncSeriesHook} */ afterEmit: new AsyncSeriesHook(["compilation"]), /** @type {SyncHook} */ thisCompilation: new SyncHook(["compilation", "params"]), - /** @type {SyncHook} */ compilation: new SyncHook(["compilation", "params"]), - /** @type {SyncHook} */ normalModuleFactory: new SyncHook(["normalModuleFactory"]), - /** @type {SyncHook} */ contextModuleFactory: new SyncHook(["contextModulefactory"]), /** @type {AsyncSeriesHook} */ beforeCompile: new AsyncSeriesHook(["params"]), - /** @type {SyncHook} */ compile: new SyncHook(["params"]), - /** @type {AsyncParallelHook} */ make: new AsyncParallelHook(["compilation"]), - /** @type {AsyncSeriesHook} */ afterCompile: new AsyncSeriesHook(["compilation"]), /** @type {AsyncSeriesHook} */ watchRun: new AsyncSeriesHook(["compiler"]), - /** @type {SyncHook} */ failed: new SyncHook(["error"]), - /** @type {SyncHook} */ invalid: new SyncHook(["filename", "changeTime"]), - /** @type {SyncHook} */ watchClose: new SyncHook([]), From 96c5dd1cb027234facf3a61eba73a08a1c845294 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 10:51:47 +0200 Subject: [PATCH 080/310] add some TODOs, add Hash type --- lib/Compilation.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Compilation.js b/lib/Compilation.js index c40fa64a3ad..47cbe07230b 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -48,6 +48,7 @@ const ModuleDependency = require("./dependencies/ModuleDependency"); /** @typedef {import("./DependenciesBlock")} DependenciesBlock */ /** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ /** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("./util/createHash").Hash} Hash */ // TODO use @callback /** @typedef {{[assetName: string]: Source}} CompilationAssets */ @@ -335,14 +336,14 @@ class Compilation extends Tapable { /** @type {AsyncSeriesHook} */ afterSeal: new AsyncSeriesHook([]), - /** @type {SyncHook} */ + /** @type {SyncHook} */ chunkHash: new SyncHook(["chunk", "chunkHash"]), /** @type {SyncHook} */ moduleAsset: new SyncHook(["module", "filename"]), /** @type {SyncHook} */ chunkAsset: new SyncHook(["chunk", "filename"]), - /** @type {SyncWaterfallHook} */ + /** @type {SyncWaterfallHook} */ assetPath: new SyncWaterfallHook(["filename", "data"]), // TODO MainTemplate /** @type {SyncBailHook} */ From da123fdbe252dfd21cff747227ce0336ad079d2d Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 12:23:24 +0200 Subject: [PATCH 081/310] upgrade uglifyjs-webpack-plugin because of regression --- yarn.lock | 37 +++++++++++++++---------------------- 1 file changed, 15 insertions(+), 22 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0d71772996a..bf9efc22e6c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -839,8 +839,8 @@ bser@^2.0.0: node-int64 "^0.4.0" buffer-from@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.0.0.tgz#4cb8832d23612589b0406e9e2956c17f06fdf531" + version "1.1.0" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.0.tgz#87fcaa3a298358e0ade6e442cfce840740d1ad04" buffer-xor@^1.0.3: version "1.0.3" @@ -1222,9 +1222,9 @@ commander@^2.14.1, commander@^2.9.0, commander@^2.x: version "2.15.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" -commander@~2.14.1: - version "2.14.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.14.1.tgz#2235123e37af8ca3c65df45b026dbd357b01b9aa" +commander@~2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" commander@~2.6.0: version "2.6.0" @@ -4093,20 +4093,13 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1: dependencies: js-tokens "^3.0.0" -lru-cache@^4.0.1: +lru-cache@^4.0.1, lru-cache@^4.1.1: version "4.1.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" dependencies: pseudomap "^1.0.2" yallist "^2.1.2" -lru-cache@^4.1.1: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.2.tgz#45234b2e6e2f2b33da125624c4664929a0224c3f" - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - macaddress@^0.2.8: version "0.2.8" resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" @@ -4687,8 +4680,8 @@ p-finally@^1.0.0: resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" p-limit@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" dependencies: p-try "^1.0.0" @@ -5334,8 +5327,8 @@ pump@^2.0.0, pump@^2.0.1: once "^1.3.1" pumpify@^1.3.3: - version "1.5.0" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.0.tgz#30c905a26c88fa0074927af07256672b474b1c15" + version "1.5.1" + resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" dependencies: duplexify "^3.6.0" inherits "^2.0.3" @@ -6518,10 +6511,10 @@ ua-parser-js@^0.7.9: resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.18.tgz#a7bfd92f56edfb117083b69e31d2aa8882d4b1ed" uglify-es@^3.3.4: - version "3.3.10" - resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.10.tgz#8b0b7992cebe20edc26de1bf325cef797b8f3fa5" + version "3.3.9" + resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" dependencies: - commander "~2.14.1" + commander "~2.13.0" source-map "~0.6.1" uglify-js@^2.4.19, uglify-js@^2.6, uglify-js@^2.6.1: @@ -6545,8 +6538,8 @@ uglify-to-browserify@~1.0.0: resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" uglifyjs-webpack-plugin@^1.2.4: - version "1.2.5" - resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.5.tgz#2ef8387c8f1a903ec5e44fa36f9f3cbdcea67641" + version "1.2.6" + resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.6.tgz#f4bb44f02431e82b301d8d4624330a6a35729381" dependencies: cacache "^10.0.4" find-cache-dir "^1.0.0" From 499ee8cc958d5d9b41dd34bb64728deb0addede7 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 15:43:42 +0200 Subject: [PATCH 082/310] update stats snapshots --- .../__snapshots__/StatsTestCases.test.js.snap | 278 ++++++------------ .../filter-warnings/webpack.config.js | 1 + 2 files changed, 96 insertions(+), 183 deletions(-) diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index f1a9c618286..8f35f7780e0 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -738,7 +738,7 @@ Entrypoint main = main.js exports[`StatsTestCases should print correct stats for filter-warnings 1`] = ` "Hash: 4269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b44269d427a8c1110386b4 -Child +Child undefined: Hash: 4269d427a8c1110386b4 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT @@ -746,158 +746,70 @@ Child bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js - WARNING in Dropping side-effect-free statement [./index.js:6,0] + WARNING in UglifyJs Plugin: Dropping side-effect-free statement [./index.js:6,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction1 [./index.js:8,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction2 [./index.js:9,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction3 [./index.js:10,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction4 [./index.js:11,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction5 [./index.js:12,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] -Child + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] in bundle.js +Child UglifyJs: Hash: 4269d427a8c1110386b4 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js - - WARNING in Dropping side-effect-free statement [./index.js:6,0] - - WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] - - WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] - - WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] - - WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] - - WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] - - WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] - - WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] - - WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] - - WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] - - WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] -Child +Child /UglifyJs/: Hash: 4269d427a8c1110386b4 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js - - WARNING in Dropping side-effect-free statement [./index.js:6,0] - - WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] - - WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] - - WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] - - WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] - - WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] - - WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] - - WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] - - WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] - - WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] - - WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] -Child +Child warnings => true: Hash: 4269d427a8c1110386b4 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js -Child +Child [UglifyJs]: Hash: 4269d427a8c1110386b4 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js - - WARNING in Dropping side-effect-free statement [./index.js:6,0] - - WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] - - WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] - - WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] - - WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] - - WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] - - WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] - - WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] - - WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] - - WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] - - WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] -Child +Child [/UglifyJs/]: Hash: 4269d427a8c1110386b4 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js - - WARNING in Dropping side-effect-free statement [./index.js:6,0] - - WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] - - WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] - - WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] - - WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] - - WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] - - WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] - - WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] - - WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] - - WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] - - WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] -Child +Child [warnings => true]: Hash: 4269d427a8c1110386b4 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js -Child +Child should not filter: Hash: 4269d427a8c1110386b4 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT @@ -905,28 +817,28 @@ Child bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js - WARNING in Dropping side-effect-free statement [./index.js:6,0] + WARNING in UglifyJs Plugin: Dropping side-effect-free statement [./index.js:6,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction1 [./index.js:8,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction2 [./index.js:9,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction3 [./index.js:10,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction4 [./index.js:11,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction5 [./index.js:12,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] -Child + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] in bundle.js +Child /should not filter/: Hash: 4269d427a8c1110386b4 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT @@ -934,28 +846,28 @@ Child bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js - WARNING in Dropping side-effect-free statement [./index.js:6,0] + WARNING in UglifyJs Plugin: Dropping side-effect-free statement [./index.js:6,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction1 [./index.js:8,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction2 [./index.js:9,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction3 [./index.js:10,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction4 [./index.js:11,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction5 [./index.js:12,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] -Child + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] in bundle.js +Child warnings => false: Hash: 4269d427a8c1110386b4 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT @@ -963,28 +875,28 @@ Child bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js - WARNING in Dropping side-effect-free statement [./index.js:6,0] + WARNING in UglifyJs Plugin: Dropping side-effect-free statement [./index.js:6,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction1 [./index.js:8,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction2 [./index.js:9,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction3 [./index.js:10,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction4 [./index.js:11,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction5 [./index.js:12,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] -Child + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] in bundle.js +Child [should not filter]: Hash: 4269d427a8c1110386b4 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT @@ -992,28 +904,28 @@ Child bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js - WARNING in Dropping side-effect-free statement [./index.js:6,0] + WARNING in UglifyJs Plugin: Dropping side-effect-free statement [./index.js:6,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction1 [./index.js:8,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction2 [./index.js:9,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction3 [./index.js:10,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction4 [./index.js:11,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction5 [./index.js:12,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] -Child + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] in bundle.js +Child [/should not filter/]: Hash: 4269d427a8c1110386b4 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT @@ -1021,28 +933,28 @@ Child bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js - WARNING in Dropping side-effect-free statement [./index.js:6,0] + WARNING in UglifyJs Plugin: Dropping side-effect-free statement [./index.js:6,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction1 [./index.js:8,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction2 [./index.js:9,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction3 [./index.js:10,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction4 [./index.js:11,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction5 [./index.js:12,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] -Child + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] in bundle.js +Child [warnings => false]: Hash: 4269d427a8c1110386b4 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT @@ -1050,27 +962,27 @@ Child bundle.js 2.89 KiB 0 [emitted] main Entrypoint main = bundle.js - WARNING in Dropping side-effect-free statement [./index.js:6,0] + WARNING in UglifyJs Plugin: Dropping side-effect-free statement [./index.js:6,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction1 [./index.js:8,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction1 [./index.js:8,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction2 [./index.js:9,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction2 [./index.js:9,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction3 [./index.js:10,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction3 [./index.js:10,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction4 [./index.js:11,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction4 [./index.js:11,0] in bundle.js - WARNING in Dropping unused function someUnUsedFunction5 [./index.js:12,0] + WARNING in UglifyJs Plugin: Dropping unused function someUnUsedFunction5 [./index.js:12,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction1 [./a.js:3,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction2 [./a.js:4,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction3 [./a.js:5,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction4 [./a.js:6,0] in bundle.js - WARNING in Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0]" + WARNING in UglifyJs Plugin: Dropping unused function someRemoteUnUsedFunction5 [./a.js:7,0] in bundle.js" `; exports[`StatsTestCases should print correct stats for graph-correctness-entries 1`] = ` @@ -2884,13 +2796,13 @@ Entrypoint main = bundle.js [1] ./a.js 249 bytes {0} [built] [2] (webpack)/buildin/module.js 497 bytes {0} [built] -WARNING in Dropping unused function someUnRemoteUsedFunction1 [./a.js:3,0] +WARNING in UglifyJs Plugin: Dropping unused function someUnRemoteUsedFunction1 [./a.js:3,0] in bundle.js -WARNING in Dropping unused function someUnRemoteUsedFunction2 [./a.js:4,0] +WARNING in UglifyJs Plugin: Dropping unused function someUnRemoteUsedFunction2 [./a.js:4,0] in bundle.js -WARNING in Dropping unused function someUnRemoteUsedFunction3 [./a.js:5,0] +WARNING in UglifyJs Plugin: Dropping unused function someUnRemoteUsedFunction3 [./a.js:5,0] in bundle.js -WARNING in Dropping unused function someUnRemoteUsedFunction4 [./a.js:6,0] +WARNING in UglifyJs Plugin: Dropping unused function someUnRemoteUsedFunction4 [./a.js:6,0] in bundle.js -WARNING in Dropping unused function someUnRemoteUsedFunction5 [./a.js:7,0]" +WARNING in UglifyJs Plugin: Dropping unused function someUnRemoteUsedFunction5 [./a.js:7,0] in bundle.js" `; diff --git a/test/statsCases/filter-warnings/webpack.config.js b/test/statsCases/filter-warnings/webpack.config.js index aad74a38865..ae23fcd948d 100644 --- a/test/statsCases/filter-warnings/webpack.config.js +++ b/test/statsCases/filter-warnings/webpack.config.js @@ -48,6 +48,7 @@ module.exports = [ [warnings => false] ].map(filter => Object.assign({}, baseConfig, { + name: Array.isArray(filter) ? `[${filter}]` : `${filter}`, stats: Object.assign({}, baseConfig.stats, { warningsFilter: filter }) From a41a0fb799ea6a53002215401ecafa0bf74a23c8 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 16:01:57 +0200 Subject: [PATCH 083/310] use correct Hash interface --- lib/AsyncDependenciesBlock.js | 2 +- lib/Chunk.js | 2 +- lib/DependenciesBlock.js | 2 +- lib/DependenciesBlockVariable.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/AsyncDependenciesBlock.js b/lib/AsyncDependenciesBlock.js index 113aa391af3..a7e029131fd 100644 --- a/lib/AsyncDependenciesBlock.js +++ b/lib/AsyncDependenciesBlock.js @@ -9,7 +9,7 @@ const DependenciesBlock = require("./DependenciesBlock"); /** @typedef {import("./ChunkGroup")} ChunkGroup */ /** @typedef {import("./Module")} Module */ /** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ -/** @typedef {import("crypto").Hash} Hash */ +/** @typedef {import("./util/createHash").Hash} Hash */ /** @typedef {TODO} GroupOptions */ module.exports = class AsyncDependenciesBlock extends DependenciesBlock { diff --git a/lib/Chunk.js b/lib/Chunk.js index 5cc8a8f96d6..ea144e13fae 100644 --- a/lib/Chunk.js +++ b/lib/Chunk.js @@ -17,7 +17,7 @@ const ERR_CHUNK_INITIAL = /** @typedef {import("./ChunkGroup")} ChunkGroup */ /** @typedef {import("./ModuleReason.js")} ModuleReason */ /** @typedef {import("webpack-sources").Source} Source */ -/** @typedef {import("crypto").Hash} Hash */ +/** @typedef {import("./util/createHash").Hash} Hash */ /** * @typedef {Object} WithId an object who has an id property * diff --git a/lib/DependenciesBlock.js b/lib/DependenciesBlock.js index 3277e8b7303..144884fbbed 100644 --- a/lib/DependenciesBlock.js +++ b/lib/DependenciesBlock.js @@ -11,7 +11,7 @@ const DependenciesBlockVariable = require("./DependenciesBlockVariable"); /** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ /** @typedef {import("./DependenciesBlockVariable")} DependenciesBlockVariable */ /** @typedef {(d: Dependency) => boolean} DependencyFilterFunction */ -/** @typedef {import("crypto").Hash} Hash */ +/** @typedef {import("./util/createHash").Hash} Hash */ class DependenciesBlock { constructor() { diff --git a/lib/DependenciesBlockVariable.js b/lib/DependenciesBlockVariable.js index 2081184699f..e123e16cae9 100644 --- a/lib/DependenciesBlockVariable.js +++ b/lib/DependenciesBlockVariable.js @@ -9,7 +9,7 @@ const { RawSource, ReplaceSource } = require("webpack-sources"); /** @typedef {import("./Dependency")} Dependency */ /** @typedef {import("./Dependency").DependencyTemplate} DependencyTemplate */ /** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ -/** @typedef {import("crypto").Hash} Hash */ +/** @typedef {import("./util/createHash").Hash} Hash */ /** @typedef {(d: Dependency) => boolean} DependencyFilterFunction */ /** @typedef {Map} DependencyFactoryConstruction */ From 2ac6a85482d132d3f1f20c7ef4f3fd8d57efbf24 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 16:07:33 +0200 Subject: [PATCH 084/310] cleanup DependencyTemplates --- lib/Compilation.js | 2 +- lib/DependenciesBlockVariable.js | 4 ++-- lib/MainTemplate.js | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/Compilation.js b/lib/Compilation.js index 47cbe07230b..d786c2886a8 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -48,6 +48,7 @@ const ModuleDependency = require("./dependencies/ModuleDependency"); /** @typedef {import("./DependenciesBlock")} DependenciesBlock */ /** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ /** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("./Dependency").DependencyTemplate} DependencyTemplate */ /** @typedef {import("./util/createHash").Hash} Hash */ // TODO use @callback @@ -56,7 +57,6 @@ const ModuleDependency = require("./dependencies/ModuleDependency"); /** @typedef {(err?: Error|null, result?: Module) => void } ModuleChainCallback */ /** @typedef {(module: Module) => void} OnModuleCallback */ /** @typedef {(err?: Error|null) => void} Callback */ -/** @typedef {{apply: (dep: Dependency, source: Source, runtime: RuntimeTemplate) => void}} DependencyTemplate */ /** @typedef {(d: Dependency) => any} DepBlockVarDependenciesCallback */ /** @typedef {new (...args: any[]) => Dependency} DepConstructor */ /** @typedef {{apply: () => void}} Plugin */ diff --git a/lib/DependenciesBlockVariable.js b/lib/DependenciesBlockVariable.js index e123e16cae9..4e32d96cde4 100644 --- a/lib/DependenciesBlockVariable.js +++ b/lib/DependenciesBlockVariable.js @@ -11,7 +11,7 @@ const { RawSource, ReplaceSource } = require("webpack-sources"); /** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ /** @typedef {import("./util/createHash").Hash} Hash */ /** @typedef {(d: Dependency) => boolean} DependencyFilterFunction */ -/** @typedef {Map} DependencyFactoryConstruction */ +/** @typedef {Map} DependencyTemplates */ class DependenciesBlockVariable { /** @@ -39,7 +39,7 @@ class DependenciesBlockVariable { } /** - * @param {DependencyFactoryConstruction} dependencyTemplates Dependency constructors and templates Map. + * @param {DependencyTemplates} dependencyTemplates Dependency constructors and templates Map. * @param {RuntimeTemplate} runtimeTemplate runtimeTemplate to generate expression souce * @returns {ReplaceSource} returns constructed source for expression via templates */ diff --git a/lib/MainTemplate.js b/lib/MainTemplate.js index d4ae152d9f8..2fe01ed933c 100644 --- a/lib/MainTemplate.js +++ b/lib/MainTemplate.js @@ -23,6 +23,7 @@ const Template = require("./Template"); /** @typedef {import("./Chunk")} Chunk */ /** @typedef {import("./Module")} Module} */ /** @typedef {import("./util/createHash").Hash} Hash} */ +/** @typedef {import("./Dependency").DependencyTemplate} DependencyTemplate} */ /** * @typedef {Object} RenderManifestOptions @@ -361,7 +362,7 @@ module.exports = class MainTemplate extends Tapable { * @param {string} hash hash to be used for render call * @param {Chunk} chunk Chunk instance * @param {ModuleTemplate} moduleTemplate ModuleTemplate instance for render - * @param {TODO} dependencyTemplates DependencyTemplate[]s + * @param {Map} dependencyTemplates dependency templates * @returns {ConcatSource} the newly generated source from rendering */ render(hash, chunk, moduleTemplate, dependencyTemplates) { From 9f596f63571450a3a30c50c124ca46705ecb2ab2 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 16:18:08 +0200 Subject: [PATCH 085/310] remove unneeded type --- lib/Compilation.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/Compilation.js b/lib/Compilation.js index d786c2886a8..1f544b72825 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -166,8 +166,6 @@ const iterationBlockVariable = (variables, fn) => { indexVariable < variables.length; indexVariable++ ) { - // TODO: Remove when Dependency + DependenciesBlockVariable is typed - /** @type {Dependency[]} */ const varDep = variables[indexVariable].dependencies; for (let indexVDep = 0; indexVDep < varDep.length; indexVDep++) { fn(varDep[indexVDep]); From 41343d1763d0a2088c43d0ffba775b9a886c2216 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 16:18:21 +0200 Subject: [PATCH 086/310] add TODO comments --- lib/Compilation.js | 1 + lib/NormalModule.js | 1 + lib/optimize/ConcatenatedModule.js | 1 + 3 files changed, 3 insertions(+) diff --git a/lib/Compilation.js b/lib/Compilation.js index 1f544b72825..0bbe006cbd7 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -446,6 +446,7 @@ class Compilation extends Tapable { this.dependencyFactories = new Map(); /** @type {Map} */ this.dependencyTemplates = new Map(); + // TODO refactor this in webpack 5 to a custom DependencyTemplates class with a hash property this.dependencyTemplates.set("hash", ""); this.childrenCounters = {}; /** @type {Set} */ diff --git a/lib/NormalModule.js b/lib/NormalModule.js index 4cc466ca057..828ed227d29 100644 --- a/lib/NormalModule.js +++ b/lib/NormalModule.js @@ -488,6 +488,7 @@ class NormalModule extends Module { } getHashDigest(dependencyTemplates) { + // TODO webpack 5 refactor let dtHash = dependencyTemplates.get("hash"); return `${this.hash}-${dtHash}`; } diff --git a/lib/optimize/ConcatenatedModule.js b/lib/optimize/ConcatenatedModule.js index f7c752949a3..4fafc1741ee 100644 --- a/lib/optimize/ConcatenatedModule.js +++ b/lib/optimize/ConcatenatedModule.js @@ -623,6 +623,7 @@ class ConcatenatedModule extends Module { // Must use full identifier in our cache here to ensure that the source // is updated should our dependencies list change. + // TODO webpack 5 refactor innerDependencyTemplates.set( "hash", innerDependencyTemplates.get("hash") + this.identifier() From a39c846c785c3ac56f96a7ebaebafa1d9ba516eb Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 16:23:40 +0200 Subject: [PATCH 087/310] Cast dependency.constructor to correct type --- lib/Compilation.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/Compilation.js b/lib/Compilation.js index 0bbe006cbd7..e31eba96837 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -915,11 +915,8 @@ class Compilation extends Tapable { ) { throw new Error("Parameter 'dependency' must be a Dependency"); } - // @ts-ignore - // TODO: Not sure how to handle the - // dependency.constructor error, - // maybe I typed it wrong - const moduleFactory = this.dependencyFactories.get(dependency.constructor); + const Dep = /** @type {DepConstructor} */ (dependency.constructor); + const moduleFactory = this.dependencyFactories.get(Dep); if (!moduleFactory) { throw new Error( `No dependency factory available for this dependency type: ${ From 5625647f059c039e9c23d257cbc4877da169004d Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 16:27:57 +0200 Subject: [PATCH 088/310] add description --- lib/Compilation.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Compilation.js b/lib/Compilation.js index e31eba96837..f0fb4269e39 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -1063,8 +1063,7 @@ class Compilation extends Tapable { /** * @param {Module} module module to be rebuilt - * @param {TODO} thisCallback //TODO need a great description for what - * the hell this code does here or rename "thisCallback" + * @param {Callback} thisCallback callback when module finishes rebuilding * @returns {void} */ rebuildModule(module, thisCallback) { From 3890b2b09b03bae3311f3babc236376736d21e92 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 16:30:02 +0200 Subject: [PATCH 089/310] fix type --- lib/Compilation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Compilation.js b/lib/Compilation.js index f0fb4269e39..b1361c94c0d 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -1454,7 +1454,7 @@ class Compilation extends Tapable { ]; /** - * @param {(Dependency|DependenciesBlockVariable)[]} d all dependencies of a block being added to queue + * @param {Dependency[]} d all dependencies of a block being added to queue * @returns {void} */ const iteratorAllDependencies = d => { From c6c3eba1c0d0182de5218067306de267a0e47a56 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 16:36:59 +0200 Subject: [PATCH 090/310] remove type duplication --- lib/Compiler.js | 10 ++++++++-- lib/DynamicEntryPlugin.js | 8 +------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/Compiler.js b/lib/Compiler.js index b75b743c0e2..bf7338fcae4 100644 --- a/lib/Compiler.js +++ b/lib/Compiler.js @@ -35,8 +35,14 @@ const ConcurrentCompilationError = require("./ConcurrentCompilationError"); */ /** @typedef {string|string[]} EntryValues */ -/** @typedef {{[entryKey: string]: EntryValues}} EntryOptionValues */ -/** @typedef {(() => EntryOptionValues) | EntryOptionValues | EntryValues} EntryOptions */ +/** @typedef {Record} EntryOptionValues */ + +/** + * @callback EntryOptionValuesFunction + * @returns {EntryOptionValues | EntryValues} the computed value + */ + +/** @typedef {EntryOptionValuesFunction | EntryOptionValues | EntryValues} EntryOptions */ class Compiler extends Tapable { constructor(context) { diff --git a/lib/DynamicEntryPlugin.js b/lib/DynamicEntryPlugin.js index 710e9908636..99c1be2bf12 100644 --- a/lib/DynamicEntryPlugin.js +++ b/lib/DynamicEntryPlugin.js @@ -11,13 +11,7 @@ const MultiEntryPlugin = require("./MultiEntryPlugin"); const SingleEntryPlugin = require("./SingleEntryPlugin"); /** @typedef {import("./Compiler")} Compiler */ -/** @typedef {string|string[]} EntryValues */ -/** @typedef {Record} EntryOptionValues */ - -/** - * @callback EntryOptionValuesFunction - * @returns {EntryOptionValues | EntryValues} the computed value - */ +/** @typedef {import("./Compiler").EntryOptionValuesFunction} EntryOptionValuesFunction */ class DynamicEntryPlugin { /** From ee5574dc1608e47bb4fe27ca66c526914f09c9db Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 16:37:20 +0200 Subject: [PATCH 091/310] allow iterable for SortableSet --- lib/Compilation.js | 4 +--- lib/util/SortableSet.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/Compilation.js b/lib/Compilation.js index b1361c94c0d..5ddd0656ef9 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -2097,9 +2097,7 @@ class Compilation extends Tapable { } summarizeDependencies() { - this.fileDependencies = new SortableSet( - Array.from(this.compilationDependencies) - ); + this.fileDependencies = new SortableSet(this.compilationDependencies); this.contextDependencies = new SortableSet(); this.missingDependencies = new SortableSet(); diff --git a/lib/util/SortableSet.js b/lib/util/SortableSet.js index c048d10350c..f391f07d0dd 100644 --- a/lib/util/SortableSet.js +++ b/lib/util/SortableSet.js @@ -7,7 +7,7 @@ class SortableSet extends Set { /** * Create a new sortable set - * @param {Array=} initialIterable The initial iterable value + * @param {Iterable=} initialIterable The initial iterable value * @typedef {function(T, T): number} SortFunction * @param {SortFunction=} defaultSort Default sorting function */ From deb798d8a7097181c1f08aceb81235b650631356 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 16:42:19 +0200 Subject: [PATCH 092/310] add TODO comment --- lib/NormalModule.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/NormalModule.js b/lib/NormalModule.js index 828ed227d29..d22b2eac9b0 100644 --- a/lib/NormalModule.js +++ b/lib/NormalModule.js @@ -191,6 +191,7 @@ class NormalModule extends Module { }) ); }, + // TODO remove in webpack 5 exec: (code, filename) => { // @ts-ignore Argument of type 'this' is not assignable to parameter of type 'Module'. const module = new NativeModule(filename, this); From 720f3b271aebef0feaef207f07adcdb6d2be5ecc Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 18:39:59 +0200 Subject: [PATCH 093/310] make hot cases better --- test/HotTestCases.test.js | 2 +- test/hotCases/fake-update-loader.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/HotTestCases.test.js b/test/HotTestCases.test.js index 22a5f852eb2..66001829d80 100644 --- a/test/HotTestCases.test.js +++ b/test/HotTestCases.test.js @@ -50,6 +50,7 @@ describe("HotTestCases", () => { let options = {}; if (fs.existsSync(configPath)) options = require(configPath); if (!options.mode) options.mode = "development"; + if (!options.devtool) options.devtool = false; if (!options.context) options.context = testDirectory; if (!options.entry) options.entry = "./index.js"; if (!options.output) options.output = {}; @@ -61,7 +62,6 @@ describe("HotTestCases", () => { if (!options.module) options.module = {}; if (!options.module.rules) options.module.rules = []; options.module.rules.push({ - test: /\.js$/, loader: path.join( __dirname, "hotCases", diff --git a/test/hotCases/fake-update-loader.js b/test/hotCases/fake-update-loader.js index abbffa4cac0..e2b1884bd74 100644 --- a/test/hotCases/fake-update-loader.js +++ b/test/hotCases/fake-update-loader.js @@ -1,6 +1,8 @@ module.exports = function(source) { - this.cacheable(false); var idx = this.updateIndex; var items = source.split(/---+\r?\n/g); + if (items.length > 1) { + this.cacheable(false); + } return items[idx] || items[items.length - 1]; -} +}; From a5e55de8e92a640ddc66c53d7264ed31a0fab606 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 18:40:29 +0200 Subject: [PATCH 094/310] skip harmony accept dependency in non-harmony modules --- lib/dependencies/HarmonyImportDependencyParserPlugin.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/dependencies/HarmonyImportDependencyParserPlugin.js b/lib/dependencies/HarmonyImportDependencyParserPlugin.js index 97e28ec4920..7f9fcde20d0 100644 --- a/lib/dependencies/HarmonyImportDependencyParserPlugin.js +++ b/lib/dependencies/HarmonyImportDependencyParserPlugin.js @@ -168,11 +168,16 @@ module.exports = class HarmonyImportDependencyParserPlugin { parser.hooks.hotAcceptCallback.tap( "HarmonyImportDependencyParserPlugin", (expr, requests) => { + const harmonyParserScope = parser.state.harmonyParserScope; + if (!harmonyParserScope) { + // This is not a harmony module, skip it + return; + } const dependencies = requests.map(request => { const dep = new HarmonyAcceptImportDependency( request, parser.state.module, - parser.state.harmonyParserScope + harmonyParserScope ); dep.loc = expr.loc; parser.state.module.addDependency(dep); From 4d57d78264b4d2eb90430e5b0ff44cf269af6d00 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 18:41:29 +0200 Subject: [PATCH 095/310] generate error code when json wasn't parsed --- lib/JsonGenerator.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/JsonGenerator.js b/lib/JsonGenerator.js index 455f09c64c0..5b4c739538f 100644 --- a/lib/JsonGenerator.js +++ b/lib/JsonGenerator.js @@ -4,7 +4,7 @@ */ "use strict"; -const { ConcatSource } = require("webpack-sources"); +const { ConcatSource, RawSource } = require("webpack-sources"); const stringifySafe = data => { const stringified = JSON.stringify(data); @@ -22,6 +22,13 @@ class JsonGenerator { generate(module, dependencyTemplates, runtimeTemplate) { const source = new ConcatSource(); const data = module.buildInfo.jsonData; + if (data === undefined) { + return new RawSource( + runtimeTemplate.missingModuleStatement({ + request: module.rawRequest + }) + ); + } if ( Array.isArray(module.buildMeta.providedExports) && !module.isUsed("default") From 35a7f6586db530cb980d057ecf6b7644ba3b1f62 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 25 Jun 2018 18:41:44 +0200 Subject: [PATCH 096/310] add test case --- test/hotCases/json/error-in-json/data.json | 3 +++ test/hotCases/json/error-in-json/errors.js | 1 + test/hotCases/json/error-in-json/index.js | 8 ++++++++ 3 files changed, 12 insertions(+) create mode 100644 test/hotCases/json/error-in-json/data.json create mode 100644 test/hotCases/json/error-in-json/errors.js create mode 100644 test/hotCases/json/error-in-json/index.js diff --git a/test/hotCases/json/error-in-json/data.json b/test/hotCases/json/error-in-json/data.json new file mode 100644 index 00000000000..c6e904ba9e5 --- /dev/null +++ b/test/hotCases/json/error-in-json/data.json @@ -0,0 +1,3 @@ +error +--- +42 diff --git a/test/hotCases/json/error-in-json/errors.js b/test/hotCases/json/error-in-json/errors.js new file mode 100644 index 00000000000..534e9facc4c --- /dev/null +++ b/test/hotCases/json/error-in-json/errors.js @@ -0,0 +1 @@ +module.exports = [[/Module parse failed/]]; diff --git a/test/hotCases/json/error-in-json/index.js b/test/hotCases/json/error-in-json/index.js new file mode 100644 index 00000000000..5b6a25ab2be --- /dev/null +++ b/test/hotCases/json/error-in-json/index.js @@ -0,0 +1,8 @@ +it("should be able to recover from json error", function(done) { + expect(() => require("./data.json")).toThrowError(); + module.hot.accept("./data.json", function() { + expect(require("./data.json")).toBe(42); + done(); + }); + NEXT(require("../../update")(done)); +}); From 2b4ed3d9429183062b688f3eafd4ba65fc2123b3 Mon Sep 17 00:00:00 2001 From: Spencer Elliott Date: Thu, 14 Jun 2018 11:39:42 -0700 Subject: [PATCH 097/310] require() webpack-cli/webpack-command's bin module Rather than require()-ing the "main" module in webpack-cli/ webpack-command, require() the "bin" module. This avoids the issue described in https://github.com/webpack-contrib/webpack-command/pull/30 where installing packages in this order results in no output from ./node_modules/.bin/webpack: $ npm install webpack-command $ npm install webpack $ ./node_modules/.bin/webpack # exit 0 with no output --- bin/webpack.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/webpack.js b/bin/webpack.js index 389bc9527e7..a34fba26b07 100755 --- a/bin/webpack.js +++ b/bin/webpack.js @@ -47,6 +47,7 @@ const isInstalled = packageName => { * @typedef {Object} CliOption * @property {string} name display name * @property {string} package npm package name + * @property {string} binName name of the executable file * @property {string} alias shortcut for choice * @property {boolean} installed currently installed? * @property {string} url homepage @@ -58,6 +59,7 @@ const CLIs = [ { name: "webpack-cli", package: "webpack-cli", + binName: "webpack-cli", alias: "cli", installed: isInstalled("webpack-cli"), url: "https://github.com/webpack/webpack-cli", @@ -66,6 +68,7 @@ const CLIs = [ { name: "webpack-command", package: "webpack-command", + binName: "webpack-command", alias: "command", installed: isInstalled("webpack-command"), url: "https://github.com/webpack-contrib/webpack-command", @@ -154,7 +157,10 @@ if (installedClis.length === 0) { }); }); } else if (installedClis.length === 1) { - require(installedClis[0].package); // eslint-disable-line + const path = require("path"); + const pkgPath = require.resolve(`${installedClis[0].package}/package.json`); + const pkg = require(pkgPath); // eslint-disable-line + require(path.resolve(path.dirname(pkgPath), pkg.bin[installedClis[0].binName])); // eslint-disable-line } else { console.warn( `You have installed ${installedClis From 3e3827e9944f124326b016cfc898b4c4161701e9 Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Tue, 26 Jun 2018 10:27:14 +0200 Subject: [PATCH 098/310] Remove CircleCI --- circle.yml | 23 ----------------------- package.json | 2 -- 2 files changed, 25 deletions(-) delete mode 100644 circle.yml diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 769cc72528b..00000000000 --- a/circle.yml +++ /dev/null @@ -1,23 +0,0 @@ -machine: - environment: - NO_WATCH_TESTS: 1 - -machine: - environment: - PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin" - -dependencies: - pre: - - case $CIRCLE_NODE_INDEX in 0) NODE_VERSION=6 ;; 1) NODE_VERSION=8 ;; esac; nvm install $NODE_VERSION && nvm alias default $NODE_VERSION - override: - - yarn - - yarn link || true && yarn link webpack - cache_directories: - - ~/.cache/yarn - -test: - override: - - node -v - - yarn --version - - yarn run circleci:lint - - yarn run circleci:test diff --git a/package.json b/package.json index 5b6f6dcfa97..b333c6c4afe 100644 --- a/package.json +++ b/package.json @@ -114,8 +114,6 @@ "appveyor:integration": "yarn cover:init && yarn cover:integration \"test/((?!TestCases)|TestCasesD)\" --ci %JEST% && move coverage\\coverage-final.json coverage\\coverage-final-1.json && yarn cover:integration \"test/TestCases(?!D)\" --ci %JEST% && move coverage\\coverage-final.json coverage\\coverage-final-2.json", "appveyor:unit": "yarn cover:init && yarn cover:unit --ci %JEST%", "appveyor:benchmark": "yarn benchmark --ci", - "circleci:test": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --ci", - "circleci:lint": "yarn lint", "build:examples": "cd examples && node buildAll.js", "pretest": "yarn lint", "prelint": "yarn setup", From ab7ecb30ee08abd719a7ab4d79bde498cd01e90c Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 26 Jun 2018 15:27:44 +0200 Subject: [PATCH 099/310] fixes #7499 --- lib/optimize/ConcatenatedModule.js | 1 + .../missing-module-7499/example/constants.js | 1 + .../side-effects/missing-module-7499/example/index.js | 2 ++ .../missing-module-7499/example/package.json | 3 +++ test/cases/side-effects/missing-module-7499/index.js | 10 ++++++++++ test/cases/side-effects/missing-module-7499/lazy.js | 5 +++++ 6 files changed, 22 insertions(+) create mode 100644 test/cases/side-effects/missing-module-7499/example/constants.js create mode 100644 test/cases/side-effects/missing-module-7499/example/index.js create mode 100644 test/cases/side-effects/missing-module-7499/example/package.json create mode 100644 test/cases/side-effects/missing-module-7499/index.js create mode 100644 test/cases/side-effects/missing-module-7499/lazy.js diff --git a/lib/optimize/ConcatenatedModule.js b/lib/optimize/ConcatenatedModule.js index 2ec0d4bc775..2c44fa028b5 100644 --- a/lib/optimize/ConcatenatedModule.js +++ b/lib/optimize/ConcatenatedModule.js @@ -281,6 +281,7 @@ class ConcatenatedModule extends Module { // Info from Factory this.rootModule = rootModule; + this.factoryMeta = rootModule.factoryMeta; // Info from Compilation this.index = rootModule.index; diff --git a/test/cases/side-effects/missing-module-7499/example/constants.js b/test/cases/side-effects/missing-module-7499/example/constants.js new file mode 100644 index 00000000000..9b857576f70 --- /dev/null +++ b/test/cases/side-effects/missing-module-7499/example/constants.js @@ -0,0 +1 @@ +export const hello = 'world' diff --git a/test/cases/side-effects/missing-module-7499/example/index.js b/test/cases/side-effects/missing-module-7499/example/index.js new file mode 100644 index 00000000000..a06738b7396 --- /dev/null +++ b/test/cases/side-effects/missing-module-7499/example/index.js @@ -0,0 +1,2 @@ +import * as constants from './constants' +export { constants } diff --git a/test/cases/side-effects/missing-module-7499/example/package.json b/test/cases/side-effects/missing-module-7499/example/package.json new file mode 100644 index 00000000000..a43829151e1 --- /dev/null +++ b/test/cases/side-effects/missing-module-7499/example/package.json @@ -0,0 +1,3 @@ +{ + "sideEffects": false +} diff --git a/test/cases/side-effects/missing-module-7499/index.js b/test/cases/side-effects/missing-module-7499/index.js new file mode 100644 index 00000000000..714aabf74b4 --- /dev/null +++ b/test/cases/side-effects/missing-module-7499/index.js @@ -0,0 +1,10 @@ +import './example' + +it("should run correctly", function() { + return import('./lazy').then(lazy => { + expect(lazy.default()).toEqual({ + hello: "world", + [Symbol.toStringTag]: "Module" + }); + }) +}); diff --git a/test/cases/side-effects/missing-module-7499/lazy.js b/test/cases/side-effects/missing-module-7499/lazy.js new file mode 100644 index 00000000000..f916eaa5b10 --- /dev/null +++ b/test/cases/side-effects/missing-module-7499/lazy.js @@ -0,0 +1,5 @@ +import { constants } from './example' + +export default function getConstants() { + return constants; +} From e38e076b985b4e7a0403f0391c0bc568379894e6 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 26 Jun 2018 16:07:19 +0200 Subject: [PATCH 100/310] fixes #7577 --- lib/web/JsonpChunkTemplatePlugin.js | 31 ++- .../__snapshots__/StatsTestCases.test.js.snap | 192 +++++++++++------- test/statsCases/issue-7577/a.js | 1 + test/statsCases/issue-7577/b.js | 1 + test/statsCases/issue-7577/c.js | 2 + .../issue-7577/node_modules/vendor.js | 1 + test/statsCases/issue-7577/webpack.config.js | 45 ++++ 7 files changed, 190 insertions(+), 83 deletions(-) create mode 100644 test/statsCases/issue-7577/a.js create mode 100644 test/statsCases/issue-7577/b.js create mode 100644 test/statsCases/issue-7577/c.js create mode 100644 test/statsCases/issue-7577/node_modules/vendor.js create mode 100644 test/statsCases/issue-7577/webpack.config.js diff --git a/lib/web/JsonpChunkTemplatePlugin.js b/lib/web/JsonpChunkTemplatePlugin.js index bd2bdcb2684..123dd52046a 100644 --- a/lib/web/JsonpChunkTemplatePlugin.js +++ b/lib/web/JsonpChunkTemplatePlugin.js @@ -6,7 +6,23 @@ const { ConcatSource } = require("webpack-sources"); +/** @typedef {import("../ChunkTemplate")} ChunkTemplate */ + +const getEntryInfo = chunk => { + return [chunk.entryModule].filter(Boolean).map(m => + [m.id].concat( + Array.from(chunk.groupsIterable)[0] + .chunks.filter(c => c !== chunk) + .map(c => c.id) + ) + ); +}; + class JsonpChunkTemplatePlugin { + /** + * @param {ChunkTemplate} chunkTemplate the chunk template + * @returns {void} + */ apply(chunkTemplate) { chunkTemplate.hooks.render.tap( "JsonpChunkTemplatePlugin", @@ -23,13 +39,7 @@ class JsonpChunkTemplatePlugin { )}] || []).push([${JSON.stringify(chunk.ids)},` ); source.add(modules); - const entries = [chunk.entryModule].filter(Boolean).map(m => - [m.id].concat( - Array.from(chunk.groupsIterable)[0] - .chunks.filter(c => c !== chunk) - .map(c => c.id) - ) - ); + const entries = getEntryInfo(chunk); if (entries.length > 0) { source.add(`,${JSON.stringify(entries)}`); } else if (prefetchChunks && prefetchChunks.length) { @@ -49,6 +59,13 @@ class JsonpChunkTemplatePlugin { hash.update(`${chunkTemplate.outputOptions.jsonpFunction}`); hash.update(`${chunkTemplate.outputOptions.globalObject}`); }); + chunkTemplate.hooks.hashForChunk.tap( + "JsonpChunkTemplatePlugin", + (hash, chunk) => { + hash.update(JSON.stringify(getEntryInfo(chunk))); + hash.update(JSON.stringify(chunk.getChildIdsByOrders().prefetch) || ""); + } + ); } } module.exports = JsonpChunkTemplatePlugin; diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index 1fe3e735870..ecdb872c821 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -1,124 +1,124 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`StatsTestCases should print correct stats for aggressive-splitting-entry 1`] = ` -"Hash: 4aa5beb3bbe987f505a74aa5beb3bbe987f505a7 +"Hash: 117441fc09d4a86a78de117441fc09d4a86a78de Child fitting: - Hash: 4aa5beb3bbe987f505a7 + Hash: 117441fc09d4a86a78de Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names - 9ac13fb7087e9ff1b93e.js 1.05 KiB 0 [emitted] - 2b4c8b62a524452d2de1.js 11.1 KiB 1 [emitted] - d1ba53816ff760e185b0.js 1.94 KiB 2 [emitted] - 7b5b0a943e9362bc88c6.js 1.94 KiB 3 [emitted] - Entrypoint main = d1ba53816ff760e185b0.js 7b5b0a943e9362bc88c6.js 2b4c8b62a524452d2de1.js - chunk {0} 9ac13fb7087e9ff1b93e.js 916 bytes <{1}> <{2}> <{3}> + d4b551c6319035df2898.js 1.05 KiB 0 [emitted] + 330c6c101c7e6fb1007a.js 11.1 KiB 1 [emitted] + 33966214360bbbb31383.js 1.94 KiB 2 [emitted] + 445d4c6a1d7381d6cb2c.js 1.94 KiB 3 [emitted] + Entrypoint main = 33966214360bbbb31383.js 445d4c6a1d7381d6cb2c.js 330c6c101c7e6fb1007a.js + chunk {0} d4b551c6319035df2898.js 916 bytes <{1}> <{2}> <{3}> > ./g [4] ./index.js 7:0-13 [7] ./g.js 916 bytes {0} [built] - chunk {1} 2b4c8b62a524452d2de1.js 1.87 KiB ={2}= ={3}= >{0}< [entry] [rendered] + chunk {1} 330c6c101c7e6fb1007a.js 1.87 KiB ={2}= ={3}= >{0}< [entry] [rendered] > ./index main [3] ./e.js 899 bytes {1} [built] [4] ./index.js 111 bytes {1} [built] [6] ./f.js 900 bytes {1} [built] - chunk {2} d1ba53816ff760e185b0.js 1.76 KiB ={1}= ={3}= >{0}< [initial] [rendered] [recorded] aggressive splitted + chunk {2} 33966214360bbbb31383.js 1.76 KiB ={1}= ={3}= >{0}< [initial] [rendered] [recorded] aggressive splitted > ./index main [0] ./b.js 899 bytes {2} [built] [5] ./a.js 899 bytes {2} [built] - chunk {3} 7b5b0a943e9362bc88c6.js 1.76 KiB ={1}= ={2}= >{0}< [initial] [rendered] [recorded] aggressive splitted + chunk {3} 445d4c6a1d7381d6cb2c.js 1.76 KiB ={1}= ={2}= >{0}< [initial] [rendered] [recorded] aggressive splitted > ./index main [1] ./c.js 899 bytes {3} [built] [2] ./d.js 899 bytes {3} [built] Child content-change: - Hash: 4aa5beb3bbe987f505a7 + Hash: 117441fc09d4a86a78de Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names - 9ac13fb7087e9ff1b93e.js 1.05 KiB 0 [emitted] - 2b4c8b62a524452d2de1.js 11.1 KiB 1 [emitted] - d1ba53816ff760e185b0.js 1.94 KiB 2 [emitted] - 7b5b0a943e9362bc88c6.js 1.94 KiB 3 [emitted] - Entrypoint main = d1ba53816ff760e185b0.js 7b5b0a943e9362bc88c6.js 2b4c8b62a524452d2de1.js - chunk {0} 9ac13fb7087e9ff1b93e.js 916 bytes <{1}> <{2}> <{3}> + d4b551c6319035df2898.js 1.05 KiB 0 [emitted] + 330c6c101c7e6fb1007a.js 11.1 KiB 1 [emitted] + 33966214360bbbb31383.js 1.94 KiB 2 [emitted] + 445d4c6a1d7381d6cb2c.js 1.94 KiB 3 [emitted] + Entrypoint main = 33966214360bbbb31383.js 445d4c6a1d7381d6cb2c.js 330c6c101c7e6fb1007a.js + chunk {0} d4b551c6319035df2898.js 916 bytes <{1}> <{2}> <{3}> > ./g [4] ./index.js 7:0-13 [7] ./g.js 916 bytes {0} [built] - chunk {1} 2b4c8b62a524452d2de1.js 1.87 KiB ={2}= ={3}= >{0}< [entry] [rendered] + chunk {1} 330c6c101c7e6fb1007a.js 1.87 KiB ={2}= ={3}= >{0}< [entry] [rendered] > ./index main [3] ./e.js 899 bytes {1} [built] [4] ./index.js 111 bytes {1} [built] [6] ./f.js 900 bytes {1} [built] - chunk {2} d1ba53816ff760e185b0.js 1.76 KiB ={1}= ={3}= >{0}< [initial] [rendered] [recorded] aggressive splitted + chunk {2} 33966214360bbbb31383.js 1.76 KiB ={1}= ={3}= >{0}< [initial] [rendered] [recorded] aggressive splitted > ./index main [0] ./b.js 899 bytes {2} [built] [5] ./a.js 899 bytes {2} [built] - chunk {3} 7b5b0a943e9362bc88c6.js 1.76 KiB ={1}= ={2}= >{0}< [initial] [rendered] [recorded] aggressive splitted + chunk {3} 445d4c6a1d7381d6cb2c.js 1.76 KiB ={1}= ={2}= >{0}< [initial] [rendered] [recorded] aggressive splitted > ./index main [1] ./c.js 899 bytes {3} [built] [2] ./d.js 899 bytes {3} [built]" `; exports[`StatsTestCases should print correct stats for aggressive-splitting-on-demand 1`] = ` -"Hash: 2e21ab9d4836a0caedb1 +"Hash: 6fd6445da5532a699ea4 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names -cf8697fa2c994f39a5d4.js 1.94 KiB 6, 7 [emitted] -fd868baa40dab4fc30fd.js 1.93 KiB 0 [emitted] -79c527bb5bf9cba1dc12.js 1.96 KiB 2 [emitted] -e9d82e81fefd7353e8df.js 1.94 KiB 3, 1 [emitted] -ae76098eeb55b9c448f2.js 1.01 KiB 4 [emitted] -05d92aaacfbffa4b7e56.js 1.94 KiB 5 [emitted] -d6418937dfae4b3ee922.js 1 KiB 1 [emitted] -685acdc95ff4af957f47.js 1 KiB 7 [emitted] -606f48c13070850338b1.js 1.94 KiB 8 [emitted] -c5a8eae840969538f450.js 1.94 KiB 9 [emitted] -7bf22146f3e40919bde5.js 9.7 KiB 10 [emitted] main -fcdf398c8972e4dcf788.js 1.94 KiB 11 [emitted] -Entrypoint main = 7bf22146f3e40919bde5.js -chunk {0} fd868baa40dab4fc30fd.js 1.76 KiB <{10}> ={1}= ={2}= ={3}= ={7}= ={9}= [recorded] aggressive splitted +58f368c01f66002b0eb3.js 1.94 KiB 6, 7 [emitted] +2736cf9d79233cd0a9b6.js 1.93 KiB 0 [emitted] +7f83e5c2f4e52435dd2c.js 1.96 KiB 2 [emitted] +43c1ac24102c075ecb2d.js 1.94 KiB 3, 1 [emitted] +a35356222d6a2151f7d3.js 1.01 KiB 4 [emitted] +e5fb899955fa03a8053b.js 1.94 KiB 5 [emitted] +29de52df747b400f6177.js 1 KiB 1 [emitted] +6a8e74d82c35e3f013d2.js 1 KiB 7 [emitted] +5bc7f208cd99a83b4e33.js 1.94 KiB 8 [emitted] +13713792eb1b5038ab8b.js 1.94 KiB 9 [emitted] +d886db099ddf05aadc6d.js 9.7 KiB 10 [emitted] main +ba9fedb7aa0c69201639.js 1.94 KiB 11 [emitted] +Entrypoint main = d886db099ddf05aadc6d.js +chunk {0} 2736cf9d79233cd0a9b6.js 1.76 KiB <{10}> ={1}= ={2}= ={3}= ={7}= ={9}= [recorded] aggressive splitted > ./b ./d ./e ./f ./g [11] ./index.js 5:0-44 > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 [0] ./b.js 899 bytes {0} {5} [built] [1] ./d.js 899 bytes {0} {8} [built] -chunk {1} d6418937dfae4b3ee922.js 899 bytes <{10}> ={0}= ={2}= ={8}= +chunk {1} 29de52df747b400f6177.js 899 bytes <{10}> ={0}= ={2}= ={8}= > ./c ./d ./e [11] ./index.js 3:0-30 > ./b ./d ./e ./f ./g [11] ./index.js 5:0-44 [2] ./e.js 899 bytes {1} {3} [built] -chunk {2} 79c527bb5bf9cba1dc12.js 1.76 KiB <{10}> ={0}= ={1}= ={11}= ={3}= ={6}= ={7}= ={9}= [recorded] aggressive splitted +chunk {2} 7f83e5c2f4e52435dd2c.js 1.76 KiB <{10}> ={0}= ={1}= ={11}= ={3}= ={6}= ={7}= ={9}= [recorded] aggressive splitted > ./f ./g ./h ./i ./j ./k [11] ./index.js 4:0-51 > ./b ./d ./e ./f ./g [11] ./index.js 5:0-44 > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 [3] ./f.js 899 bytes {2} [built] [4] ./g.js 901 bytes {2} [built] -chunk {3} e9d82e81fefd7353e8df.js 1.76 KiB <{10}> ={0}= ={2}= ={7}= ={9}= [rendered] [recorded] aggressive splitted +chunk {3} 43c1ac24102c075ecb2d.js 1.76 KiB <{10}> ={0}= ={2}= ={7}= ={9}= [rendered] [recorded] aggressive splitted > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 [2] ./e.js 899 bytes {1} {3} [built] [6] ./h.js 899 bytes {3} {11} [built] -chunk {4} ae76098eeb55b9c448f2.js 899 bytes <{10}> +chunk {4} a35356222d6a2151f7d3.js 899 bytes <{10}> > ./a [11] ./index.js 1:0-16 [10] ./a.js 899 bytes {4} [built] -chunk {5} 05d92aaacfbffa4b7e56.js 1.76 KiB <{10}> +chunk {5} e5fb899955fa03a8053b.js 1.76 KiB <{10}> > ./b ./c [11] ./index.js 2:0-23 [0] ./b.js 899 bytes {0} {5} [built] [5] ./c.js 899 bytes {5} {8} [built] -chunk {6} cf8697fa2c994f39a5d4.js 1.76 KiB <{10}> ={11}= ={2}= +chunk {6} 58f368c01f66002b0eb3.js 1.76 KiB <{10}> ={11}= ={2}= > ./f ./g ./h ./i ./j ./k [11] ./index.js 4:0-51 [8] ./j.js 901 bytes {6} {9} [built] [9] ./k.js 899 bytes {6} {7} [built] -chunk {7} 685acdc95ff4af957f47.js 899 bytes <{10}> ={0}= ={2}= ={3}= ={9}= +chunk {7} 6a8e74d82c35e3f013d2.js 899 bytes <{10}> ={0}= ={2}= ={3}= ={9}= > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 [9] ./k.js 899 bytes {6} {7} [built] -chunk {8} 606f48c13070850338b1.js 1.76 KiB <{10}> ={1}= [recorded] aggressive splitted +chunk {8} 5bc7f208cd99a83b4e33.js 1.76 KiB <{10}> ={1}= [recorded] aggressive splitted > ./c ./d ./e [11] ./index.js 3:0-30 [1] ./d.js 899 bytes {0} {8} [built] [5] ./c.js 899 bytes {5} {8} [built] -chunk {9} c5a8eae840969538f450.js 1.76 KiB <{10}> ={0}= ={2}= ={3}= ={7}= [rendered] [recorded] aggressive splitted +chunk {9} 13713792eb1b5038ab8b.js 1.76 KiB <{10}> ={0}= ={2}= ={3}= ={7}= [rendered] [recorded] aggressive splitted > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 [7] ./i.js 899 bytes {9} {11} [built] [8] ./j.js 901 bytes {6} {9} [built] -chunk {10} 7bf22146f3e40919bde5.js (main) 248 bytes >{0}< >{1}< >{11}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< >{8}< >{9}< [entry] [rendered] +chunk {10} d886db099ddf05aadc6d.js (main) 248 bytes >{0}< >{1}< >{11}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< >{8}< >{9}< [entry] [rendered] > ./index main [11] ./index.js 248 bytes {10} [built] -chunk {11} fcdf398c8972e4dcf788.js 1.76 KiB <{10}> ={2}= ={6}= [rendered] [recorded] aggressive splitted +chunk {11} ba9fedb7aa0c69201639.js 1.76 KiB <{10}> ={2}= ={6}= [rendered] [recorded] aggressive splitted > ./f ./g ./h ./i ./j ./k [11] ./index.js 4:0-51 [6] ./h.js 899 bytes {3} {11} [built] [7] ./i.js 899 bytes {9} {11} [built]" @@ -492,7 +492,7 @@ chunk {1} main1.js (main1) 136 bytes [entry] [rendered] `; exports[`StatsTestCases should print correct stats for chunks 1`] = ` -"Hash: 7762656cf5adce7c4f04 +"Hash: 337155e238d6550ce6f7 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -530,7 +530,7 @@ chunk {3} 3.bundle.js 44 bytes <{1}> [rendered] `; exports[`StatsTestCases should print correct stats for chunks-development 1`] = ` -"Hash: e9e5a35c80318dd22050 +"Hash: 491964abb8a9925c2f65 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -611,7 +611,7 @@ Entrypoint main = main.js `; exports[`StatsTestCases should print correct stats for commons-chunk-min-size-0 1`] = ` -"Hash: bace8077f1ed02050b2f +"Hash: 54d4e5458e5d48cb25ea Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -628,7 +628,7 @@ Entrypoint entry-1 = vendor-1~entry-1.js entry-1.js `; exports[`StatsTestCases should print correct stats for commons-chunk-min-size-Infinity 1`] = ` -"Hash: cb8c4bb6c365b0a67d67 +"Hash: 275af2436329c6c382a9 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -645,28 +645,28 @@ Entrypoint entry-1 = vendor-1.js entry-1.js `; exports[`StatsTestCases should print correct stats for commons-plugin-issue-4980 1`] = ` -"Hash: 707868320b2a03412b3fe3b00ef4ecd794b284d6 +"Hash: 5286c80f4c16bf81543737bb351d3f1e0a824495 Child - Hash: 707868320b2a03412b3f + Hash: 5286c80f4c16bf815437 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names app.js 6.69 KiB 0 [emitted] app - vendor.6a3bdffda9f0de672978.js 619 bytes 1 [emitted] vendor - Entrypoint app = vendor.6a3bdffda9f0de672978.js app.js + vendor.aa94f0c872c214f6cb2e.js 619 bytes 1 [emitted] vendor + Entrypoint app = vendor.aa94f0c872c214f6cb2e.js app.js [./constants.js] 87 bytes {1} [built] [./entry-1.js] ./entry-1.js + 2 modules 190 bytes {0} [built] | ./entry-1.js 67 bytes [built] | ./submodule-a.js 59 bytes [built] | ./submodule-b.js 59 bytes [built] Child - Hash: e3b00ef4ecd794b284d6 + Hash: 37bb351d3f1e0a824495 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names app.js 6.7 KiB 0 [emitted] app - vendor.6a3bdffda9f0de672978.js 619 bytes 1 [emitted] vendor - Entrypoint app = vendor.6a3bdffda9f0de672978.js app.js + vendor.aa94f0c872c214f6cb2e.js 619 bytes 1 [emitted] vendor + Entrypoint app = vendor.aa94f0c872c214f6cb2e.js app.js [./constants.js] 87 bytes {1} [built] [./entry-2.js] ./entry-2.js + 2 modules 197 bytes {0} [built] | ./entry-2.js 67 bytes [built] @@ -978,7 +978,7 @@ chunk {5} b.js (b) 179 bytes <{2}> >{1}< [rendered] `; exports[`StatsTestCases should print correct stats for import-context-filter 1`] = ` -"Hash: 2a0d654db3e185182232 +"Hash: 65813f100580fd1539bf Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -995,7 +995,7 @@ Entrypoint entry = entry.js `; exports[`StatsTestCases should print correct stats for import-weak 1`] = ` -"Hash: 34cdd6c85db0facc427a +"Hash: 5043a861e2975c70a2e7 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -1029,8 +1029,48 @@ Compilation error while processing magic comment(-s): /* webpackPrefetch: true, @ ./index.js 1:0-49" `; +exports[`StatsTestCases should print correct stats for issue-7577 1`] = ` +"Hash: 343642fcbd3799129ba328960aea386766e9b4685f5e642073649561789d +Child + Hash: 343642fcbd3799129ba3 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + a-all~main-0034bb84916bcade4cc7.js 154 bytes all~main [emitted] all~main + a-main-14ee9c594789bd77b887.js 108 bytes main [emitted] main + a-runtime~main-aa303e56a90b4559481f.js 6.05 KiB runtime~main [emitted] runtime~main + Entrypoint main = a-runtime~main-aa303e56a90b4559481f.js a-all~main-0034bb84916bcade4cc7.js a-main-14ee9c594789bd77b887.js + [0] ./a.js 18 bytes {all~main} [built] +Child + Hash: 28960aea386766e9b468 + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + b-all~main-3f0b62a9e243706ccaf8.js 468 bytes all~main [emitted] all~main + b-main-09f4ddfc4098d7f3f188.js 123 bytes main [emitted] main + b-runtime~main-937400e6bee421a9af47.js 6.05 KiB runtime~main [emitted] runtime~main + b-vendors~main-f7664221ad5d986cf06a.js 163 bytes vendors~main [emitted] vendors~main + Entrypoint main = b-runtime~main-937400e6bee421a9af47.js b-vendors~main-f7664221ad5d986cf06a.js b-all~main-3f0b62a9e243706ccaf8.js b-main-09f4ddfc4098d7f3f188.js + [0] ./node_modules/vendor.js 23 bytes {vendors~main} [built] + [1] ./b.js 17 bytes {all~main} [built] +Child + Hash: 5f5e642073649561789d + Time: Xms + Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + c-0-6bb505f933a38ad423d3.js 150 bytes 0 [emitted] + c-1-e2f2199a8d3d8508c29c.js 459 bytes 1 [emitted] + c-all~main-5bf91ad3502dd7005727.js 299 bytes all~main [emitted] all~main + c-main-b48f733d0f40de7539ce.js 114 bytes main [emitted] main + c-runtime~main-4582dbde6a81040ef3aa.js 8.84 KiB runtime~main [emitted] runtime~main + Entrypoint main = c-runtime~main-4582dbde6a81040ef3aa.js c-all~main-5bf91ad3502dd7005727.js c-main-b48f733d0f40de7539ce.js (prefetch: c-0-6bb505f933a38ad423d3.js c-1-e2f2199a8d3d8508c29c.js) + [0] ./node_modules/vendor.js 23 bytes {0} [built] + [1] ./b.js 17 bytes {1} [built] + [2] ./c.js 61 bytes {all~main} [built]" +`; + exports[`StatsTestCases should print correct stats for limit-chunk-count-plugin 1`] = ` -"Hash: 3f682d19df3a78cc355b84831557db9bd7a90e1a059dbb5576e98cee97e4f44eff82b7d35dbb5021 +"Hash: 3f682d19df3a78cc355bf6b5cf6affcd0a3789f4d4554dbae635e8619c03ae9e4a73fc96c164d6f0 Child 1 chunks: Hash: 3f682d19df3a78cc355b Time: Xms @@ -1046,7 +1086,7 @@ Child 1 chunks: [4] ./d.js 22 bytes {0} [built] [5] ./e.js 22 bytes {0} [built] Child 2 chunks: - Hash: 84831557db9bd7a90e1a + Hash: f6b5cf6affcd0a3789f4 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -1062,7 +1102,7 @@ Child 2 chunks: chunk {1} bundle.js (main) 73 bytes >{0}< [entry] [rendered] [5] ./index.js 73 bytes {1} [built] Child 3 chunks: - Hash: 059dbb5576e98cee97e4 + Hash: d4554dbae635e8619c03 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -1080,7 +1120,7 @@ Child 3 chunks: chunk {2} bundle.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] [5] ./index.js 73 bytes {2} [built] Child 4 chunks: - Hash: f44eff82b7d35dbb5021 + Hash: ae9e4a73fc96c164d6f0 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -1157,7 +1197,7 @@ Entrypoint main = main.js `; exports[`StatsTestCases should print correct stats for module-assets 1`] = ` -"Hash: e1ecf80df7148b69327b +"Hash: ceae20d6bebac3a4387e Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Entrypoint main = main.js @@ -1339,7 +1379,7 @@ Child `; exports[`StatsTestCases should print correct stats for named-chunks-plugin 1`] = ` -"Hash: ae58e4539a3d3b521cc7 +"Hash: 0c5756674e2dda021828 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -1353,7 +1393,7 @@ Entrypoint entry = vendor.js entry.js `; exports[`StatsTestCases should print correct stats for named-chunks-plugin-async 1`] = ` -"Hash: b6aa15eeabc33e889828 +"Hash: 8c348decadc8408ab829 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -1389,7 +1429,7 @@ Child child: `; exports[`StatsTestCases should print correct stats for optimize-chunks 1`] = ` -"Hash: c52867ded6f77bcf50cc +"Hash: 5410f0485ae94208c671 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -1741,7 +1781,7 @@ chunk {6} inner2.js (inner2) 0 bytes <{0}> [rendered]" `; exports[`StatsTestCases should print correct stats for preset-detailed 1`] = ` -"Hash: 2eb3274d0272da6a7a14 +"Hash: d0fce43b3c0175d4cc8a Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -1800,7 +1840,7 @@ exports[`StatsTestCases should print correct stats for preset-none-array 1`] = ` exports[`StatsTestCases should print correct stats for preset-none-error 1`] = `""`; exports[`StatsTestCases should print correct stats for preset-normal 1`] = ` -"Hash: 2eb3274d0272da6a7a14 +"Hash: d0fce43b3c0175d4cc8a Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -1878,7 +1918,7 @@ Entrypoints: `; exports[`StatsTestCases should print correct stats for preset-verbose 1`] = ` -"Hash: 2eb3274d0272da6a7a14 +"Hash: d0fce43b3c0175d4cc8a Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -2006,7 +2046,7 @@ Entrypoint e2 = runtime.js e2.js" `; exports[`StatsTestCases should print correct stats for scope-hoisting-bailouts 1`] = ` -"Hash: df49e15bdf57c432360e +"Hash: 900e01719757ad40b4ee Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Entrypoint index = index.js @@ -2038,9 +2078,9 @@ Entrypoint entry = entry.js `; exports[`StatsTestCases should print correct stats for scope-hoisting-multi 1`] = ` -"Hash: f47bea8ea571296b32b82a4cd6b69820dd6e8c36 +"Hash: a786614ea171d67e9632b9989eac65394295ae64 Child - Hash: f47bea8ea571296b32b8 + Hash: a786614ea171d67e9632 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Entrypoint first = vendor.js first.js @@ -2057,7 +2097,7 @@ Child [9] ./module_first.js 31 bytes {4} [built] [10] ./second.js 177 bytes {5} [built] Child - Hash: 2a4cd6b69820dd6e8c36 + Hash: b9989eac65394295ae64 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Entrypoint first = vendor.js first.js @@ -2085,7 +2125,7 @@ Child `; exports[`StatsTestCases should print correct stats for side-effects-issue-7428 1`] = ` -"Hash: b1ef68bcfacb3ad18417 +"Hash: a9b58d04269fe092c240 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names diff --git a/test/statsCases/issue-7577/a.js b/test/statsCases/issue-7577/a.js new file mode 100644 index 00000000000..7b2a3460115 --- /dev/null +++ b/test/statsCases/issue-7577/a.js @@ -0,0 +1 @@ +console.log("a"); diff --git a/test/statsCases/issue-7577/b.js b/test/statsCases/issue-7577/b.js new file mode 100644 index 00000000000..e08a1b185c2 --- /dev/null +++ b/test/statsCases/issue-7577/b.js @@ -0,0 +1 @@ +import "vendor"; diff --git a/test/statsCases/issue-7577/c.js b/test/statsCases/issue-7577/c.js new file mode 100644 index 00000000000..a483cc728df --- /dev/null +++ b/test/statsCases/issue-7577/c.js @@ -0,0 +1,2 @@ +console.log("c"); +import(/* webpackPrefetch: true */ "./b"); diff --git a/test/statsCases/issue-7577/node_modules/vendor.js b/test/statsCases/issue-7577/node_modules/vendor.js new file mode 100644 index 00000000000..d9e298f6dc9 --- /dev/null +++ b/test/statsCases/issue-7577/node_modules/vendor.js @@ -0,0 +1 @@ +console.log("vendor"); diff --git a/test/statsCases/issue-7577/webpack.config.js b/test/statsCases/issue-7577/webpack.config.js new file mode 100644 index 00000000000..50e73e91765 --- /dev/null +++ b/test/statsCases/issue-7577/webpack.config.js @@ -0,0 +1,45 @@ +const base = { + mode: "production", + optimization: { + runtimeChunk: true, + namedChunks: true, + splitChunks: { + minSize: 0, + chunks: "all", + cacheGroups: { + all: { + priority: -30 + } + } + } + } +}; +module.exports = [ + Object.assign( + { + entry: "./a.js", + output: { + filename: "a-[name]-[chunkhash].js" + } + }, + base + ), + Object.assign( + { + entry: "./b.js", + output: { + filename: "b-[name]-[chunkhash].js" + } + }, + base + ), + Object.assign( + { + entry: "./c.js", + output: { + filename: "c-[name]-[chunkhash].js" + } + }, + base + ) +]; From 0f587763e138017afb11592070c81fdab5ca047d Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 11 May 2018 18:12:30 +0200 Subject: [PATCH 101/310] add per chunk index and index2 refactor index generation --- lib/ChunkGroup.js | 44 ++ lib/Compilation.js | 257 ++++--- lib/util/Queue.js | 2 +- .../__snapshots__/StatsTestCases.test.js.snap | 700 +++++++++--------- .../chunk-index/order-multiple-entries/a.js | 1 + .../order-multiple-entries/async.js | 0 .../chunk-index/order-multiple-entries/b.js | 1 + .../chunk-index/order-multiple-entries/c.js | 0 .../order-multiple-entries/entry1.js | 6 + .../order-multiple-entries/entry2.js | 6 + .../order-multiple-entries/shared.js | 0 .../order-multiple-entries/test.config.js | 5 + .../order-multiple-entries/webpack.config.js | 95 +++ 13 files changed, 665 insertions(+), 452 deletions(-) create mode 100644 test/configCases/chunk-index/order-multiple-entries/a.js create mode 100644 test/configCases/chunk-index/order-multiple-entries/async.js create mode 100644 test/configCases/chunk-index/order-multiple-entries/b.js create mode 100644 test/configCases/chunk-index/order-multiple-entries/c.js create mode 100644 test/configCases/chunk-index/order-multiple-entries/entry1.js create mode 100644 test/configCases/chunk-index/order-multiple-entries/entry2.js create mode 100644 test/configCases/chunk-index/order-multiple-entries/shared.js create mode 100644 test/configCases/chunk-index/order-multiple-entries/test.config.js create mode 100644 test/configCases/chunk-index/order-multiple-entries/webpack.config.js diff --git a/lib/ChunkGroup.js b/lib/ChunkGroup.js index 482800b7ed4..764ca9b17b6 100644 --- a/lib/ChunkGroup.js +++ b/lib/ChunkGroup.js @@ -70,6 +70,12 @@ class ChunkGroup { this.chunks = []; /** @type {OriginRecord[]} */ this.origins = []; + /** Indicies in top-down order */ + /** @private @type {Map} */ + this._moduleIndicies = new Map(); + /** Indicies in bottom-up order */ + /** @private @type {Map} */ + this._moduleIndicies2 = new Map(); } /** @@ -447,6 +453,44 @@ class ChunkGroup { return result; } + /** + * Sets the top-down index of a module in this ChunkGroup + * @param {Module} module module for which the index should be set + * @param {number} index the index of the module + * @returns {void} + */ + setModuleIndex(module, index) { + this._moduleIndicies.set(module, index); + } + + /** + * Gets the top-down index of a module in this ChunkGroup + * @param {Module} module the module + * @returns {number} index + */ + getModuleIndex(module) { + return this._moduleIndicies.get(module); + } + + /** + * Sets the bottom-up index of a module in this ChunkGroup + * @param {Module} module module for which the index should be set + * @param {number} index the index of the module + * @returns {void} + */ + setModuleIndex2(module, index) { + this._moduleIndicies2.set(module, index); + } + + /** + * Gets the bottom-up index of a module in this ChunkGroup + * @param {Module} module the module + * @returns {number} index + */ + getModuleIndex2(module) { + return this._moduleIndicies2.get(module); + } + checkConstraints() { const chunk = this; for (const child of chunk._children) { diff --git a/lib/Compilation.js b/lib/Compilation.js index 1fd02ed4f6f..ea2d08d2244 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -36,6 +36,10 @@ const Queue = require("./util/Queue"); const SortableSet = require("./util/SortableSet"); const GraphHelpers = require("./GraphHelpers"); +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./DependenciesBlock")} DependenciesBlock */ +/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ + const byId = (a, b) => { if (a.id < b.id) return -1; if (a.id > b.id) return 1; @@ -247,8 +251,6 @@ class Compilation extends Tapable { this._modules = new Map(); this.cache = null; this.records = null; - this.nextFreeModuleIndex = undefined; - this.nextFreeModuleIndex2 = undefined; this.additionalChunkAssets = []; this.assets = {}; this.errors = []; @@ -858,8 +860,6 @@ class Compilation extends Tapable { } this.hooks.afterOptimizeDependencies.call(this.modules); - this.nextFreeModuleIndex = 0; - this.nextFreeModuleIndex2 = 0; for (const preparedEntrypoint of this._preparedEntrypoints) { const module = preparedEntrypoint.module; const name = preparedEntrypoint.name; @@ -877,7 +877,6 @@ class Compilation extends Tapable { chunk.entryModule = module; chunk.name = name; - this.assignIndex(module); this.assignDepth(module); } this.processDependenciesBlocksForChunkGroups(this.chunkGroups.slice()); @@ -1026,6 +1025,13 @@ class Compilation extends Tapable { } } + /** + * @param {TODO} groupOptions options for the chunk group + * @param {Module} module the module the references the chunk group + * @param {TODO} loc the location from with the chunk group is reference (inside of module) + * @param {string} request the request from which the the chunk group is referenced + * @returns {ChunkGroup} the new or existing chunk group + */ addChunkInGroup(groupOptions, module, loc, request) { if (typeof groupOptions === "string") { groupOptions = { name: groupOptions }; @@ -1069,70 +1075,6 @@ class Compilation extends Tapable { return chunk; } - assignIndex(module) { - const assignIndexToModule = module => { - // enter module - if (typeof module.index !== "number") { - module.index = this.nextFreeModuleIndex++; - - // leave module - queue.push(() => (module.index2 = this.nextFreeModuleIndex2++)); - - // enter it as block - assignIndexToDependencyBlock(module); - } - }; - - const assignIndexToDependency = dependency => { - if (dependency.module) { - queue.push(() => assignIndexToModule(dependency.module)); - } - }; - - const assignIndexToDependencyBlock = block => { - let allDependencies = []; - - const iteratorDependency = d => allDependencies.push(d); - - const iteratorBlock = b => - queue.push(() => assignIndexToDependencyBlock(b)); - - if (block.variables) { - iterationBlockVariable(block.variables, iteratorDependency); - } - - if (block.dependencies) { - iterationOfArrayCallback(block.dependencies, iteratorDependency); - } - if (block.blocks) { - const blocks = block.blocks; - let indexBlock = blocks.length; - while (indexBlock--) { - iteratorBlock(blocks[indexBlock]); - } - } - - let indexAll = allDependencies.length; - while (indexAll--) { - iteratorAllDependencies(allDependencies[indexAll]); - } - }; - - const queue = [ - () => { - assignIndexToModule(module); - } - ]; - - const iteratorAllDependencies = d => { - queue.push(() => assignIndexToDependency(d)); - }; - - while (queue.length) { - queue.pop()(); - } - } - assignDepth(module) { const queue = new Set([module]); let depth; @@ -1175,7 +1117,12 @@ class Compilation extends Tapable { } } - // This method creates the Chunk graph from the Module graph + /** + * This method creates the Chunk graph from the Module graph + * @private + * @param {TODO[]} inputChunkGroups chunk groups which are processed + * @returns {void} + */ processDependenciesBlocksForChunkGroups(inputChunkGroups) { // Process is splitting into two parts: // Part one traverse the module graph and builds a very basic chunks graph @@ -1185,10 +1132,12 @@ class Compilation extends Tapable { // eachother and Blocks with Chunks. It stops traversing when all modules // for a chunk are already available. So it doesn't connect unneeded chunks. - const chunkDependencies = new Map(); // Map> + /** @type {Map} */ + const chunkDependencies = new Map(); const allCreatedChunkGroups = new Set(); // PREPARE + /** @type {Map} */ const blockInfoMap = new Map(); const iteratorDependency = d => { @@ -1215,7 +1164,15 @@ class Compilation extends Tapable { blockQueue.push(b); }; - let block, blockQueue, blockInfoModules, blockInfoBlocks; + /** @type {DependenciesBlock} */ + let block; + /** @type {TODO} */ + let blockQueue; + /** @type {Set} */ + let blockInfoModules; + /** @type {TODO[]} */ + let blockInfoBlocks; + for (const module of this.modules) { blockQueue = [module]; while (blockQueue.length > 0) { @@ -1236,7 +1193,7 @@ class Compilation extends Tapable { } const blockInfo = { - modules: blockInfoModules, + modules: Array.from(blockInfoModules), blocks: blockInfoBlocks }; blockInfoMap.set(block, blockInfo); @@ -1245,15 +1202,49 @@ class Compilation extends Tapable { // PART ONE + /** @type {Map} */ + const chunkGroupCounters = new Map(); + for (const chunkGroup of inputChunkGroups) { + chunkGroupCounters.set(chunkGroup, { index: 0, index2: 0 }); + } + + let nextFreeModuleIndex = 0; + let nextFreeModuleIndex2 = 0; + + /** @type {Map} */ const blockChunkGroups = new Map(); - // Start with the provided modules/chunks - const queue = inputChunkGroups.map(chunkGroup => ({ + const ADD_AND_ENTER_MODULE = 0; + const ENTER_MODULE = 1; + const PROCESS_BLOCK = 2; + const LEAVE_MODULE = 3; + + /** + * @typedef {Object} QueueItem + * @property {number} action + * @property {DependenciesBlock} block + * @property {Module} module + * @property {Chunk} chunk + * @property {ChunkGroup} chunkGroup + */ + + /** + * @param {ChunkGroup} chunkGroup chunk group + * @returns {QueueItem} queue item + */ + const chunkGroupToQueueItem = chunkGroup => ({ + action: ENTER_MODULE, block: chunkGroup.chunks[0].entryModule, module: chunkGroup.chunks[0].entryModule, chunk: chunkGroup.chunks[0], chunkGroup - })); + }); + + // Start with the provided modules/chunks + /** @type {QueueItem[]} */ + let queue = inputChunkGroups.map(chunkGroupToQueueItem).reverse(); + /** @type {QueueItem[]} */ + let queueDelayed = []; let module, chunk, chunkGroup; @@ -1276,6 +1267,7 @@ class Compilation extends Tapable { b.loc, b.request ); + chunkGroupCounters.set(c, { index: 0, index2: 0 }); blockChunkGroups.set(b, c); allCreatedChunkGroups.add(c); } @@ -1294,7 +1286,8 @@ class Compilation extends Tapable { }); // 3. We enqueue the DependenciesBlock for traversal - queue.push({ + queueDelayed.push({ + action: PROCESS_BLOCK, block: b, module: module, chunk: c.chunks[0], @@ -1305,33 +1298,95 @@ class Compilation extends Tapable { // Iterative traversal of the Module graph // Recursive would be simpler to write but could result in Stack Overflows while (queue.length) { - const queueItem = queue.pop(); - module = queueItem.module; - block = queueItem.block; - chunk = queueItem.chunk; - chunkGroup = queueItem.chunkGroup; + while (queue.length) { + const queueItem = queue.pop(); + module = queueItem.module; + block = queueItem.block; + chunk = queueItem.chunk; + chunkGroup = queueItem.chunkGroup; + + switch (queueItem.action) { + case ADD_AND_ENTER_MODULE: { + // We connect Module and Chunk when not already done + if (chunk.addModule(module)) { + module.addChunk(chunk); + } else { + // already connected, skip it + break; + } + } + // fallthrough + case ENTER_MODULE: { + if (chunkGroup !== undefined) { + const index = chunkGroup.getModuleIndex(module); + if (index === undefined) { + chunkGroup.setModuleIndex( + module, + chunkGroupCounters.get(chunkGroup).index++ + ); + } + } - // get prepared block info - const blockInfo = blockInfoMap.get(block); - - // Traverse all referenced modules - for (const refModule of blockInfo.modules) { - // We connect Module and Chunk when not already done - if (chunk.addModule(refModule)) { - refModule.addChunk(chunk); - - // And enqueue the Module for traversal - queue.push({ - block: refModule, - module: refModule, - chunk, - chunkGroup - }); + if (module.index === null) { + module.index = nextFreeModuleIndex++; + } + + queue.push({ + action: LEAVE_MODULE, + block, + module, + chunk, + chunkGroup + }); + } + // fallthrough + case PROCESS_BLOCK: { + // get prepared block info + const blockInfo = blockInfoMap.get(block); + + // Traverse all referenced modules + for (let i = blockInfo.modules.length - 1; i >= 0; i--) { + const refModule = blockInfo.modules[i]; + if (chunk.containsModule(refModule)) { + // skip early if already connected + continue; + } + // enqueue the add and enter to enter in the correct order + // this is relevant with circular dependencies + queue.push({ + action: ADD_AND_ENTER_MODULE, + block: refModule, + module: refModule, + chunk, + chunkGroup + }); + } + + // Traverse all Blocks + iterationOfArrayCallback(blockInfo.blocks, iteratorBlock); + break; + } + case LEAVE_MODULE: { + if (chunkGroup !== undefined) { + const index = chunkGroup.getModuleIndex2(module); + if (index === undefined) { + chunkGroup.setModuleIndex2( + module, + chunkGroupCounters.get(chunkGroup).index2++ + ); + } + } + + if (module.index2 === null) { + module.index2 = nextFreeModuleIndex2++; + } + break; + } } } - - // Traverse all Blocks - iterationOfArrayCallback(blockInfo.blocks, iteratorBlock); + const tempQueue = queue; + queue = queueDelayed.reverse(); + queueDelayed = tempQueue; } // PART TWO diff --git a/lib/util/Queue.js b/lib/util/Queue.js index 385b3a9bf51..6615e9f7759 100644 --- a/lib/util/Queue.js +++ b/lib/util/Queue.js @@ -5,7 +5,7 @@ */ class Queue { /** - * @param {IterableIterator=} items The initial elements. + * @param {Iterable=} items The initial elements. */ constructor(items) { /** @private @type {Set} */ diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index 1fe3e735870..86ee71aa875 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -148,58 +148,58 @@ exports[`StatsTestCases should print correct stats for async-commons-chunk-auto Entrypoint a = disabled/a.js Entrypoint b = disabled/b.js Entrypoint c = disabled/c.js - chunk {0} disabled/async-g.js (async-g) 54 bytes <{1}> <{5}> [rendered] - > ./g [] 6:0-47 - > ./g [] 6:0-47 - [2] ./f.js 20 bytes {0} {2} {3} {6} {7} [built] - [8] ./g.js 34 bytes {0} [built] - chunk {1} disabled/async-a.js (async-a) 216 bytes <{4}> >{0}< [rendered] + chunk {0} disabled/async-a.js (async-a) 216 bytes <{4}> >{3}< [rendered] > ./a [7] ./index.js 1:0-47 - [0] ./d.js 20 bytes {1} {2} {3} {5} {6} {7} [built] - [1] ./node_modules/x.js 20 bytes {1} {2} {3} {5} {6} {7} [built] - [3] ./node_modules/y.js 20 bytes {1} {2} {5} {6} [built] - [5] ./a.js + 1 modules 156 bytes {1} {5} [built] + [0] ./d.js 20 bytes {0} {1} {2} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {0} {1} {2} {5} {6} {7} [built] + [3] ./node_modules/y.js 20 bytes {0} {1} {5} {6} [built] + [5] ./a.js + 1 modules 156 bytes {0} {5} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {2} disabled/async-b.js (async-b) 152 bytes <{4}> [rendered] + chunk {1} disabled/async-b.js (async-b) 152 bytes <{4}> [rendered] > ./b [7] ./index.js 2:0-47 - [0] ./d.js 20 bytes {1} {2} {3} {5} {6} {7} [built] - [1] ./node_modules/x.js 20 bytes {1} {2} {3} {5} {6} {7} [built] - [2] ./f.js 20 bytes {0} {2} {3} {6} {7} [built] - [3] ./node_modules/y.js 20 bytes {1} {2} {5} {6} [built] - [4] ./b.js 72 bytes {2} {6} [built] - chunk {3} disabled/async-c.js (async-c) 167 bytes <{4}> [rendered] + [0] ./d.js 20 bytes {0} {1} {2} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {0} {1} {2} {5} {6} {7} [built] + [2] ./f.js 20 bytes {1} {2} {3} {6} {7} [built] + [3] ./node_modules/y.js 20 bytes {0} {1} {5} {6} [built] + [4] ./b.js 72 bytes {1} {6} [built] + chunk {2} disabled/async-c.js (async-c) 167 bytes <{4}> [rendered] > ./c [7] ./index.js 3:0-47 - [0] ./d.js 20 bytes {1} {2} {3} {5} {6} {7} [built] - [1] ./node_modules/x.js 20 bytes {1} {2} {3} {5} {6} {7} [built] - [2] ./f.js 20 bytes {0} {2} {3} {6} {7} [built] - [6] ./c.js + 1 modules 107 bytes {3} {7} [built] + [0] ./d.js 20 bytes {0} {1} {2} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {0} {1} {2} {5} {6} {7} [built] + [2] ./f.js 20 bytes {1} {2} {3} {6} {7} [built] + [6] ./c.js + 1 modules 107 bytes {2} {7} [built] | ./c.js 72 bytes [built] | ./node_modules/z.js 20 bytes [built] - chunk {4} disabled/main.js (main) 147 bytes >{1}< >{2}< >{3}< [entry] [rendered] + chunk {3} disabled/async-g.js (async-g) 54 bytes <{0}> <{5}> [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [2] ./f.js 20 bytes {1} {2} {3} {6} {7} [built] + [8] ./g.js 34 bytes {3} [built] + chunk {4} disabled/main.js (main) 147 bytes >{0}< >{1}< >{2}< [entry] [rendered] > ./ main [7] ./index.js 147 bytes {4} [built] - chunk {5} disabled/a.js (a) 216 bytes >{0}< [entry] [rendered] + chunk {5} disabled/a.js (a) 216 bytes >{3}< [entry] [rendered] > ./a a - [0] ./d.js 20 bytes {1} {2} {3} {5} {6} {7} [built] - [1] ./node_modules/x.js 20 bytes {1} {2} {3} {5} {6} {7} [built] - [3] ./node_modules/y.js 20 bytes {1} {2} {5} {6} [built] - [5] ./a.js + 1 modules 156 bytes {1} {5} [built] + [0] ./d.js 20 bytes {0} {1} {2} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {0} {1} {2} {5} {6} {7} [built] + [3] ./node_modules/y.js 20 bytes {0} {1} {5} {6} [built] + [5] ./a.js + 1 modules 156 bytes {0} {5} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] chunk {6} disabled/b.js (b) 152 bytes [entry] [rendered] > ./b b - [0] ./d.js 20 bytes {1} {2} {3} {5} {6} {7} [built] - [1] ./node_modules/x.js 20 bytes {1} {2} {3} {5} {6} {7} [built] - [2] ./f.js 20 bytes {0} {2} {3} {6} {7} [built] - [3] ./node_modules/y.js 20 bytes {1} {2} {5} {6} [built] - [4] ./b.js 72 bytes {2} {6} [built] + [0] ./d.js 20 bytes {0} {1} {2} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {0} {1} {2} {5} {6} {7} [built] + [2] ./f.js 20 bytes {1} {2} {3} {6} {7} [built] + [3] ./node_modules/y.js 20 bytes {0} {1} {5} {6} [built] + [4] ./b.js 72 bytes {1} {6} [built] chunk {7} disabled/c.js (c) 167 bytes [entry] [rendered] > ./c c - [0] ./d.js 20 bytes {1} {2} {3} {5} {6} {7} [built] - [1] ./node_modules/x.js 20 bytes {1} {2} {3} {5} {6} {7} [built] - [2] ./f.js 20 bytes {0} {2} {3} {6} {7} [built] - [6] ./c.js + 1 modules 107 bytes {3} {7} [built] + [0] ./d.js 20 bytes {0} {1} {2} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {0} {1} {2} {5} {6} {7} [built] + [2] ./f.js 20 bytes {1} {2} {3} {6} {7} [built] + [6] ./c.js + 1 modules 107 bytes {2} {7} [built] | ./c.js 72 bytes [built] | ./node_modules/z.js 20 bytes [built] Child default: @@ -207,53 +207,53 @@ Child default: Entrypoint a = default/a.js Entrypoint b = default/b.js Entrypoint c = default/c.js - chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{9}> ={1}= ={2}= ={3}= ={5}= ={6}= ={7}= ={8}= >{2}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) + chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{9}> ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={8}= >{2}< >{7}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] - chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={5}= ={6}= ={7}= ={8}= >{2}< >{4}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={5}= ={6}= ={8}= >{2}< >{7}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{5}> <{9}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{4}> <{9}> ={0}= ={1}= ={3}= ={5}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [2] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} default/vendors~async-a~async-b.js (vendors~async-a~async-b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={5}= ={6}= >{2}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) + chunk {3} default/vendors~async-a~async-b.js (vendors~async-a~async-b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={4}= ={5}= >{2}< >{7}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] - chunk {4} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{5}> ={2}= [rendered] - > ./g [] 6:0-47 - > ./g [] 6:0-47 - [9] ./g.js 34 bytes {4} [built] - chunk {5} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{4}< [rendered] + chunk {4} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{7}< [rendered] > ./a [8] ./index.js 1:0-47 - [7] ./a.js + 1 modules 156 bytes {5} {10} [built] + [7] ./a.js + 1 modules 156 bytes {4} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {6} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] + chunk {5} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] > ./b [8] ./index.js 2:0-47 - [5] ./b.js 72 bytes {6} {11} [built] - chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={8}= [rendered] + [5] ./b.js 72 bytes {5} {11} [built] + chunk {6} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={8}= [rendered] > ./c [8] ./index.js 3:0-47 - [6] ./c.js 72 bytes {7} {12} [built] - chunk {8} default/vendors~async-c.js (vendors~async-c) 20 bytes <{9}> ={0}= ={1}= ={2}= ={7}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c) + [6] ./c.js 72 bytes {6} {12} [built] + chunk {7} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{4}> ={2}= [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [9] ./g.js 34 bytes {7} [built] + chunk {8} default/vendors~async-c.js (vendors~async-c) 20 bytes <{9}> ={0}= ={1}= ={2}= ={6}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c) > ./c [8] ./index.js 3:0-47 [4] ./node_modules/z.js 20 bytes {8} {12} [built] - chunk {9} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{5}< >{6}< >{7}< >{8}< [entry] [rendered] + chunk {9} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{8}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] - chunk {10} default/a.js (a) 216 bytes >{2}< >{4}< [entry] [rendered] + chunk {10} default/a.js (a) 216 bytes >{2}< >{7}< [entry] [rendered] > ./a a [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] - [7] ./a.js + 1 modules 156 bytes {5} {10} [built] + [7] ./a.js + 1 modules 156 bytes {4} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] chunk {11} default/b.js (b) 152 bytes [entry] [rendered] @@ -262,78 +262,78 @@ Child default: [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] [2] ./f.js 20 bytes {2} {11} {12} [built] [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] - [5] ./b.js 72 bytes {6} {11} [built] + [5] ./b.js 72 bytes {5} {11} [built] chunk {12} default/c.js (c) 152 bytes [entry] [rendered] > ./c c [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] [2] ./f.js 20 bytes {2} {11} {12} [built] [4] ./node_modules/z.js 20 bytes {8} {12} [built] - [6] ./c.js 72 bytes {7} {12} [built] + [6] ./c.js 72 bytes {6} {12} [built] Child vendors: Entrypoint main = vendors/main.js Entrypoint a = vendors/vendors.js vendors/a.js Entrypoint b = vendors/vendors.js vendors/b.js Entrypoint c = vendors/vendors.js vendors/c.js - chunk {0} vendors/async-g.js (async-g) 54 bytes <{1}> <{4}> <{6}> [rendered] - > ./g [] 6:0-47 - > ./g [] 6:0-47 - [2] ./f.js 20 bytes {0} {2} {3} {7} {8} [built] - [9] ./g.js 34 bytes {0} [built] - chunk {1} vendors/async-a.js (async-a) 216 bytes <{5}> >{0}< [rendered] + chunk {0} vendors/async-a.js (async-a) 216 bytes <{5}> >{3}< [rendered] > ./a [8] ./index.js 1:0-47 - [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] - [1] ./node_modules/x.js 20 bytes {1} {2} {3} {4} [built] - [3] ./node_modules/y.js 20 bytes {1} {2} {4} [built] - [7] ./a.js + 1 modules 156 bytes {1} {6} [built] + [0] ./d.js 20 bytes {0} {1} {2} {6} {7} {8} [built] + [1] ./node_modules/x.js 20 bytes {0} {1} {2} {4} [built] + [3] ./node_modules/y.js 20 bytes {0} {1} {4} [built] + [7] ./a.js + 1 modules 156 bytes {0} {6} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {2} vendors/async-b.js (async-b) 152 bytes <{5}> [rendered] + chunk {1} vendors/async-b.js (async-b) 152 bytes <{5}> [rendered] > ./b [8] ./index.js 2:0-47 - [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] - [1] ./node_modules/x.js 20 bytes {1} {2} {3} {4} [built] - [2] ./f.js 20 bytes {0} {2} {3} {7} {8} [built] - [3] ./node_modules/y.js 20 bytes {1} {2} {4} [built] - [5] ./b.js 72 bytes {2} {7} [built] - chunk {3} vendors/async-c.js (async-c) 152 bytes <{5}> [rendered] + [0] ./d.js 20 bytes {0} {1} {2} {6} {7} {8} [built] + [1] ./node_modules/x.js 20 bytes {0} {1} {2} {4} [built] + [2] ./f.js 20 bytes {1} {2} {3} {7} {8} [built] + [3] ./node_modules/y.js 20 bytes {0} {1} {4} [built] + [5] ./b.js 72 bytes {1} {7} [built] + chunk {2} vendors/async-c.js (async-c) 152 bytes <{5}> [rendered] > ./c [8] ./index.js 3:0-47 - [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] - [1] ./node_modules/x.js 20 bytes {1} {2} {3} {4} [built] - [2] ./f.js 20 bytes {0} {2} {3} {7} {8} [built] - [4] ./node_modules/z.js 20 bytes {3} {4} [built] - [6] ./c.js 72 bytes {3} {8} [built] - chunk {4} vendors/vendors.js (vendors) 60 bytes ={6}= ={7}= ={8}= >{0}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) + [0] ./d.js 20 bytes {0} {1} {2} {6} {7} {8} [built] + [1] ./node_modules/x.js 20 bytes {0} {1} {2} {4} [built] + [2] ./f.js 20 bytes {1} {2} {3} {7} {8} [built] + [4] ./node_modules/z.js 20 bytes {2} {4} [built] + [6] ./c.js 72 bytes {2} {8} [built] + chunk {3} vendors/async-g.js (async-g) 54 bytes <{0}> <{4}> <{6}> [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [2] ./f.js 20 bytes {1} {2} {3} {7} {8} [built] + [9] ./g.js 34 bytes {3} [built] + chunk {4} vendors/vendors.js (vendors) 60 bytes ={6}= ={7}= ={8}= >{3}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) > ./a a > ./b b > ./c c - [1] ./node_modules/x.js 20 bytes {1} {2} {3} {4} [built] - [3] ./node_modules/y.js 20 bytes {1} {2} {4} [built] - [4] ./node_modules/z.js 20 bytes {3} {4} [built] - chunk {5} vendors/main.js (main) 147 bytes >{1}< >{2}< >{3}< [entry] [rendered] + [1] ./node_modules/x.js 20 bytes {0} {1} {2} {4} [built] + [3] ./node_modules/y.js 20 bytes {0} {1} {4} [built] + [4] ./node_modules/z.js 20 bytes {2} {4} [built] + chunk {5} vendors/main.js (main) 147 bytes >{0}< >{1}< >{2}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {5} [built] - chunk {6} vendors/a.js (a) 176 bytes ={4}= >{0}< [entry] [rendered] + chunk {6} vendors/a.js (a) 176 bytes ={4}= >{3}< [entry] [rendered] > ./a a - [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] - [7] ./a.js + 1 modules 156 bytes {1} {6} [built] + [0] ./d.js 20 bytes {0} {1} {2} {6} {7} {8} [built] + [7] ./a.js + 1 modules 156 bytes {0} {6} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] chunk {7} vendors/b.js (b) 112 bytes ={4}= [entry] [rendered] > ./b b - [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] - [2] ./f.js 20 bytes {0} {2} {3} {7} {8} [built] - [5] ./b.js 72 bytes {2} {7} [built] + [0] ./d.js 20 bytes {0} {1} {2} {6} {7} {8} [built] + [2] ./f.js 20 bytes {1} {2} {3} {7} {8} [built] + [5] ./b.js 72 bytes {1} {7} [built] chunk {8} vendors/c.js (c) 112 bytes ={4}= [entry] [rendered] > ./c c - [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] - [2] ./f.js 20 bytes {0} {2} {3} {7} {8} [built] - [6] ./c.js 72 bytes {3} {8} [built] + [0] ./d.js 20 bytes {0} {1} {2} {6} {7} {8} [built] + [2] ./f.js 20 bytes {1} {2} {3} {7} {8} [built] + [6] ./c.js 72 bytes {2} {8} [built] Child multiple-vendors: Entrypoint main = multiple-vendors/main.js Entrypoint a = multiple-vendors/libs-x.js multiple-vendors/vendors~a~async-a~async-b~b.js multiple-vendors/a.js Entrypoint b = multiple-vendors/libs-x.js multiple-vendors/vendors~a~async-a~async-b~b.js multiple-vendors/b.js Entrypoint c = multiple-vendors/libs-x.js multiple-vendors/vendors~async-c~c.js multiple-vendors/c.js - chunk {0} multiple-vendors/libs-x.js (libs-x) 20 bytes <{9}> ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: libs) (name: libs-x) + chunk {0} multiple-vendors/libs-x.js (libs-x) 20 bytes <{9}> ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: libs) (name: libs-x) > ./a a > ./b b > ./c c @@ -341,67 +341,67 @@ Child multiple-vendors: > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [2] ./node_modules/x.js 20 bytes {0} [built] - chunk {1} multiple-vendors/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + chunk {1} multiple-vendors/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= >{2}< >{8}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} multiple-vendors/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{6}> <{9}> ={0}= ={1}= ={3}= ={4}= ={5}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + chunk {2} multiple-vendors/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{5}> <{9}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [1] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} multiple-vendors/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={10}= ={11}= ={2}= ={6}= ={7}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) + chunk {3} multiple-vendors/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={10}= ={11}= ={2}= ={5}= ={6}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) > ./a a > ./b b > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 [3] ./node_modules/y.js 20 bytes {3} [built] - chunk {4} multiple-vendors/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={8}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + chunk {4} multiple-vendors/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={7}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) > ./c c > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] - chunk {5} multiple-vendors/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{6}> ={2}= [rendered] - > ./g [] 6:0-47 - > ./g [] 6:0-47 - [9] ./g.js 34 bytes {5} [built] - chunk {6} multiple-vendors/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{5}< [rendered] + chunk {5} multiple-vendors/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{8}< [rendered] > ./a [8] ./index.js 1:0-47 - [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + [6] ./a.js + 1 modules 156 bytes {5} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {7} multiple-vendors/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] + chunk {6} multiple-vendors/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] > ./b [8] ./index.js 2:0-47 - [4] ./b.js 72 bytes {7} {11} [built] - chunk {8} multiple-vendors/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] + [4] ./b.js 72 bytes {6} {11} [built] + chunk {7} multiple-vendors/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] > ./c [8] ./index.js 3:0-47 - [5] ./c.js 72 bytes {8} {12} [built] - chunk {9} multiple-vendors/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{6}< >{7}< >{8}< [entry] [rendered] + [5] ./c.js 72 bytes {7} {12} [built] + chunk {8} multiple-vendors/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{5}> ={2}= [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [9] ./g.js 34 bytes {8} [built] + chunk {9} multiple-vendors/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] - chunk {10} multiple-vendors/a.js (a) 176 bytes ={0}= ={3}= >{2}< >{5}< [entry] [rendered] + chunk {10} multiple-vendors/a.js (a) 176 bytes ={0}= ={3}= >{2}< >{8}< [entry] [rendered] > ./a a [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + [6] ./a.js + 1 modules 156 bytes {5} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] chunk {11} multiple-vendors/b.js (b) 112 bytes ={0}= ={3}= [entry] [rendered] > ./b b [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [1] ./f.js 20 bytes {2} {11} {12} [built] - [4] ./b.js 72 bytes {7} {11} [built] + [4] ./b.js 72 bytes {6} {11} [built] chunk {12} multiple-vendors/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] > ./c c [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [1] ./f.js 20 bytes {2} {11} {12} [built] - [5] ./c.js 72 bytes {8} {12} [built] + [5] ./c.js 72 bytes {7} {12} [built] Child all: Entrypoint main = all/main.js Entrypoint a = all/vendors~a~async-a~async-b~async-c~b~c.js all/vendors~a~async-a~async-b~b.js all/a.js Entrypoint b = all/vendors~a~async-a~async-b~async-c~b~c.js all/vendors~a~async-a~async-b~b.js all/b.js Entrypoint c = all/vendors~a~async-a~async-b~async-c~b~c.js all/vendors~async-c~c.js all/c.js - chunk {0} all/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) + chunk {0} all/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) > ./a a > ./b b > ./c c @@ -409,61 +409,61 @@ Child all: > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [2] ./node_modules/x.js 20 bytes {0} [built] - chunk {1} all/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + chunk {1} all/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= >{2}< >{8}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} all/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{6}> <{9}> ={0}= ={1}= ={3}= ={4}= ={5}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + chunk {2} all/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{5}> <{9}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [1] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} all/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={10}= ={11}= ={2}= ={6}= ={7}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) + chunk {3} all/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={10}= ={11}= ={2}= ={5}= ={6}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) > ./a a > ./b b > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 [3] ./node_modules/y.js 20 bytes {3} [built] - chunk {4} all/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={8}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + chunk {4} all/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={7}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) > ./c c > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] - chunk {5} all/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{6}> ={2}= [rendered] - > ./g [] 6:0-47 - > ./g [] 6:0-47 - [9] ./g.js 34 bytes {5} [built] - chunk {6} all/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{5}< [rendered] + chunk {5} all/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{8}< [rendered] > ./a [8] ./index.js 1:0-47 - [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + [6] ./a.js + 1 modules 156 bytes {5} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {7} all/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] + chunk {6} all/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] > ./b [8] ./index.js 2:0-47 - [4] ./b.js 72 bytes {7} {11} [built] - chunk {8} all/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] + [4] ./b.js 72 bytes {6} {11} [built] + chunk {7} all/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] > ./c [8] ./index.js 3:0-47 - [5] ./c.js 72 bytes {8} {12} [built] - chunk {9} all/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{6}< >{7}< >{8}< [entry] [rendered] + [5] ./c.js 72 bytes {7} {12} [built] + chunk {8} all/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{5}> ={2}= [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [9] ./g.js 34 bytes {8} [built] + chunk {9} all/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] - chunk {10} all/a.js (a) 176 bytes ={0}= ={3}= >{2}< >{5}< [entry] [rendered] + chunk {10} all/a.js (a) 176 bytes ={0}= ={3}= >{2}< >{8}< [entry] [rendered] > ./a a [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + [6] ./a.js + 1 modules 156 bytes {5} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] chunk {11} all/b.js (b) 112 bytes ={0}= ={3}= [entry] [rendered] > ./b b [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [1] ./f.js 20 bytes {2} {11} {12} [built] - [4] ./b.js 72 bytes {7} {11} [built] + [4] ./b.js 72 bytes {6} {11} [built] chunk {12} all/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] > ./c c [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [1] ./f.js 20 bytes {2} {11} {12} [built] - [5] ./c.js 72 bytes {8} {12} [built]" + [5] ./c.js 72 bytes {7} {12} [built]" `; exports[`StatsTestCases should print correct stats for chunk-module-id-range 1`] = ` @@ -925,21 +925,21 @@ Child exports[`StatsTestCases should print correct stats for graph-correctness-entries 1`] = ` "Entrypoint e1 = e1.js Entrypoint e2 = e2.js -chunk {0} c.js (c) 49 bytes <{3}> <{4}> >{1}< [rendered] - [1] ./module-c.js 49 bytes {0} [built] - import() ./module-c [2] ./module-b.js 1:0-47 - import() ./module-c [4] ./e2.js 1:0-47 -chunk {1} a.js (a) 49 bytes <{0}> <{2}> >{4}< [rendered] - [0] ./module-a.js 49 bytes {1} [built] +chunk {0} a.js (a) 49 bytes <{1}> <{2}> >{4}< [rendered] + [0] ./module-a.js 49 bytes {0} [built] import() ./module-a [1] ./module-c.js 1:0-47 import() ./module-a [3] ./e1.js 1:0-47 -chunk {2} e1.js (e1) 49 bytes >{1}< [entry] [rendered] +chunk {1} c.js (c) 49 bytes <{3}> <{4}> >{0}< [rendered] + [1] ./module-c.js 49 bytes {1} [built] + import() ./module-c [2] ./module-b.js 1:0-47 + import() ./module-c [4] ./e2.js 1:0-47 +chunk {2} e1.js (e1) 49 bytes >{0}< [entry] [rendered] [3] ./e1.js 49 bytes {2} [built] single entry ./e1 e1 -chunk {3} e2.js (e2) 49 bytes >{0}< [entry] [rendered] +chunk {3} e2.js (e2) 49 bytes >{1}< [entry] [rendered] [4] ./e2.js 49 bytes {3} [built] single entry ./e2 e2 -chunk {4} b.js (b) 49 bytes <{1}> >{0}< [rendered] +chunk {4} b.js (b) 49 bytes <{0}> >{1}< [rendered] [2] ./module-b.js 49 bytes {4} [built] import() ./module-b [0] ./module-a.js 1:0-47" `; @@ -950,29 +950,29 @@ Entrypoint e2 = e2.js chunk {0} y.js (y) 0 bytes <{3}> <{4}> [rendered] [3] ./module-y.js 0 bytes {0} [built] import() ./module-y [0] ./module-x.js 1:0-47 -chunk {1} c.js (c) 49 bytes <{4}> <{5}> >{2}< [rendered] - [2] ./module-c.js 49 bytes {1} [built] - import() ./module-c [4] ./module-b.js 1:0-47 - import() ./module-c [6] ./e2.js 2:0-47 -chunk {2} a.js (a) 49 bytes <{1}> <{3}> >{5}< [rendered] - [1] ./module-a.js 49 bytes {2} [built] +chunk {1} a.js (a) 49 bytes <{2}> <{3}> >{5}< [rendered] + [1] ./module-a.js 49 bytes {1} [built] import() ./module-a [2] ./module-c.js 1:0-47 import() ./module-a [5] ./e1.js 2:0-47 -chunk {3} e1.js (e1) 119 bytes >{0}< >{2}< [entry] [rendered] +chunk {2} c.js (c) 49 bytes <{4}> <{5}> >{1}< [rendered] + [2] ./module-c.js 49 bytes {2} [built] + import() ./module-c [4] ./module-b.js 1:0-47 + import() ./module-c [6] ./e2.js 2:0-47 +chunk {3} e1.js (e1) 119 bytes >{0}< >{1}< [entry] [rendered] [0] ./module-x.js 49 bytes {3} {4} [built] import() ./module-x [4] ./module-b.js 2:0-20 harmony side effect evaluation ./module-x [5] ./e1.js 1:0-20 harmony side effect evaluation ./module-x [6] ./e2.js 1:0-20 [5] ./e1.js 70 bytes {3} [built] single entry ./e1 e1 -chunk {4} e2.js (e2) 119 bytes >{0}< >{1}< [entry] [rendered] +chunk {4} e2.js (e2) 119 bytes >{0}< >{2}< [entry] [rendered] [0] ./module-x.js 49 bytes {3} {4} [built] import() ./module-x [4] ./module-b.js 2:0-20 harmony side effect evaluation ./module-x [5] ./e1.js 1:0-20 harmony side effect evaluation ./module-x [6] ./e2.js 1:0-20 [6] ./e2.js 70 bytes {4} [built] single entry ./e2 e2 -chunk {5} b.js (b) 179 bytes <{2}> >{1}< [rendered] +chunk {5} b.js (b) 179 bytes <{1}> >{2}< [rendered] [4] ./module-b.js 179 bytes {5} [built] import() ./module-b [1] ./module-a.js 1:0-47" `; @@ -1173,8 +1173,8 @@ chunk {1} main.js (main) 12 bytes >{0}< [entry] [rendered] exports[`StatsTestCases should print correct stats for module-deduplication 1`] = ` "Asset Size Chunks Chunk Names - 0.js 730 bytes 0, 5 [emitted] - 1.js 730 bytes 1, 4 [emitted] + 0.js 730 bytes 0, 4 [emitted] + 1.js 730 bytes 1, 5 [emitted] 2.js 730 bytes 2, 3 [emitted] 3.js 661 bytes 3 [emitted] 4.js 661 bytes 4 [emitted] @@ -1185,77 +1185,77 @@ e3.js 9.46 KiB 8 [emitted] e3 Entrypoint e1 = e1.js Entrypoint e2 = e2.js Entrypoint e3 = e3.js -chunk {0} 0.js 37 bytes <{7}> <{8}> [rendered] - [2] ./d.js 9 bytes {0} {6} [built] - [5] ./async1.js 28 bytes {0} {5} [built] -chunk {1} 1.js 37 bytes <{6}> <{8}> [rendered] - [3] ./f.js 9 bytes {1} {7} [built] - [6] ./async2.js 28 bytes {1} {4} [built] -chunk {2} 2.js 37 bytes <{6}> <{7}> [rendered] - [4] ./h.js 9 bytes {2} {8} [built] - [7] ./async3.js 28 bytes {2} {3} [built] -chunk {3} 3.js 28 bytes <{8}> [rendered] - [7] ./async3.js 28 bytes {2} {3} [built] +chunk {0} 0.js 37 bytes <{6}> <{8}> [rendered] + [3] ./f.js 9 bytes {0} {7} [built] + [6] ./async2.js 28 bytes {0} {4} [built] +chunk {1} 1.js 37 bytes <{6}> <{7}> [rendered] + [4] ./h.js 9 bytes {1} {8} [built] + [7] ./async3.js 28 bytes {1} {5} [built] +chunk {2} 2.js 37 bytes <{7}> <{8}> [rendered] + [2] ./d.js 9 bytes {2} {6} [built] + [5] ./async1.js 28 bytes {2} {3} [built] +chunk {3} 3.js 28 bytes <{6}> [rendered] + [5] ./async1.js 28 bytes {2} {3} [built] chunk {4} 4.js 28 bytes <{7}> [rendered] - [6] ./async2.js 28 bytes {1} {4} [built] -chunk {5} 5.js 28 bytes <{6}> [rendered] - [5] ./async1.js 28 bytes {0} {5} [built] -chunk {6} e1.js (e1) 152 bytes >{1}< >{2}< >{5}< [entry] [rendered] + [6] ./async2.js 28 bytes {0} {4} [built] +chunk {5} 5.js 28 bytes <{8}> [rendered] + [7] ./async3.js 28 bytes {1} {5} [built] +chunk {6} e1.js (e1) 152 bytes >{0}< >{1}< >{3}< [entry] [rendered] [0] ./b.js 9 bytes {6} {7} {8} [built] [1] ./a.js 9 bytes {6} {7} {8} [built] - [2] ./d.js 9 bytes {0} {6} [built] + [2] ./d.js 9 bytes {2} {6} [built] [8] ./e1.js 116 bytes {6} [built] [9] ./c.js 9 bytes {6} [built] -chunk {7} e2.js (e2) 152 bytes >{0}< >{2}< >{4}< [entry] [rendered] +chunk {7} e2.js (e2) 152 bytes >{1}< >{2}< >{4}< [entry] [rendered] [0] ./b.js 9 bytes {6} {7} {8} [built] [1] ./a.js 9 bytes {6} {7} {8} [built] - [3] ./f.js 9 bytes {1} {7} [built] + [3] ./f.js 9 bytes {0} {7} [built] [10] ./e2.js 116 bytes {7} [built] [11] ./e.js 9 bytes {7} [built] -chunk {8} e3.js (e3) 152 bytes >{0}< >{1}< >{3}< [entry] [rendered] +chunk {8} e3.js (e3) 152 bytes >{0}< >{2}< >{5}< [entry] [rendered] [0] ./b.js 9 bytes {6} {7} {8} [built] [1] ./a.js 9 bytes {6} {7} {8} [built] - [4] ./h.js 9 bytes {2} {8} [built] + [4] ./h.js 9 bytes {1} {8} [built] [12] ./e3.js 116 bytes {8} [built] [13] ./g.js 9 bytes {8} [built]" `; exports[`StatsTestCases should print correct stats for module-deduplication-named 1`] = ` " Asset Size Chunks Chunk Names -async3.js 818 bytes 0 [emitted] async3 -async1.js 818 bytes 1 [emitted] async1 -async2.js 818 bytes 2 [emitted] async2 +async1.js 818 bytes 0 [emitted] async1 +async2.js 818 bytes 1 [emitted] async2 +async3.js 818 bytes 2 [emitted] async3 e1.js 9.31 KiB 3 [emitted] e1 e2.js 9.33 KiB 4 [emitted] e2 e3.js 9.35 KiB 5 [emitted] e3 Entrypoint e1 = e1.js Entrypoint e2 = e2.js Entrypoint e3 = e3.js -chunk {0} async3.js (async3) 89 bytes <{2}> <{5}> >{1}< [rendered] - [4] ./h.js 9 bytes {0} {5} [built] - [7] ./async3.js 80 bytes {0} [built] -chunk {1} async1.js (async1) 89 bytes <{0}> <{3}> >{2}< [rendered] - [2] ./d.js 9 bytes {1} {3} [built] - [5] ./async1.js 80 bytes {1} [built] -chunk {2} async2.js (async2) 89 bytes <{1}> <{4}> >{0}< [rendered] - [3] ./f.js 9 bytes {2} {4} [built] - [6] ./async2.js 80 bytes {2} [built] -chunk {3} e1.js (e1) 144 bytes >{1}< [entry] [rendered] +chunk {0} async1.js (async1) 89 bytes <{2}> <{3}> >{1}< [rendered] + [2] ./d.js 9 bytes {0} {3} [built] + [5] ./async1.js 80 bytes {0} [built] +chunk {1} async2.js (async2) 89 bytes <{0}> <{4}> >{2}< [rendered] + [3] ./f.js 9 bytes {1} {4} [built] + [6] ./async2.js 80 bytes {1} [built] +chunk {2} async3.js (async3) 89 bytes <{1}> <{5}> >{0}< [rendered] + [4] ./h.js 9 bytes {2} {5} [built] + [7] ./async3.js 80 bytes {2} [built] +chunk {3} e1.js (e1) 144 bytes >{0}< [entry] [rendered] [0] ./b.js 9 bytes {3} {4} {5} [built] [1] ./a.js 9 bytes {3} {4} {5} [built] - [2] ./d.js 9 bytes {1} {3} [built] + [2] ./d.js 9 bytes {0} {3} [built] [8] ./e1.js 108 bytes {3} [built] [9] ./c.js 9 bytes {3} [built] -chunk {4} e2.js (e2) 144 bytes >{2}< [entry] [rendered] +chunk {4} e2.js (e2) 144 bytes >{1}< [entry] [rendered] [0] ./b.js 9 bytes {3} {4} {5} [built] [1] ./a.js 9 bytes {3} {4} {5} [built] - [3] ./f.js 9 bytes {2} {4} [built] + [3] ./f.js 9 bytes {1} {4} [built] [10] ./e2.js 108 bytes {4} [built] [11] ./e.js 9 bytes {4} [built] -chunk {5} e3.js (e3) 144 bytes >{0}< [entry] [rendered] +chunk {5} e3.js (e3) 144 bytes >{2}< [entry] [rendered] [0] ./b.js 9 bytes {3} {4} {5} [built] [1] ./a.js 9 bytes {3} {4} {5} [built] - [4] ./h.js 9 bytes {0} {5} [built] + [4] ./h.js 9 bytes {2} {5} [built] [12] ./e3.js 108 bytes {5} [built] [13] ./g.js 9 bytes {5} [built]" `; @@ -1389,25 +1389,25 @@ Child child: `; exports[`StatsTestCases should print correct stats for optimize-chunks 1`] = ` -"Hash: c52867ded6f77bcf50cc +"Hash: 1d0e2ce94b197ef0ad5d Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names cir1.js 299 bytes 0 [emitted] cir1 ab.js 183 bytes 1 [emitted] ab - abd.js 277 bytes 2, 1 [emitted] abd + abd.js 268 bytes 2, 1 [emitted] abd cir2.js 299 bytes 3 [emitted] cir2 main.js 9.09 KiB 4 [emitted] main -cir2 from cir1.js 359 bytes 5, 3 [emitted] cir2 from cir1 - chunk.js 190 bytes 6, 7 [emitted] chunk - ac in ab.js 130 bytes 7 [emitted] ac in ab + ac in ab.js 130 bytes 5 [emitted] ac in ab + chunk.js 190 bytes 6, 5 [emitted] chunk +cir2 from cir1.js 359 bytes 7, 3 [emitted] cir2 from cir1 Entrypoint main = main.js -chunk {0} cir1.js (cir1) 81 bytes <{3}> <{4}> >{5}< [rendered] +chunk {0} cir1.js (cir1) 81 bytes <{3}> <{4}> >{7}< [rendered] > [3] ./circular2.js 1:0-79 > [3] ./circular2.js 1:0-79 > [8] ./index.js 13:0-54 [2] ./circular1.js 81 bytes {0} [built] -chunk {1} ab.js (ab) 0 bytes <{4}> >{7}< [rendered] +chunk {1} ab.js (ab) 0 bytes <{4}> >{5}< [rendered] > [8] ./index.js 1:0-6:8 [0] ./modules/a.js 0 bytes {1} {2} [built] [1] ./modules/b.js 0 bytes {1} {2} [built] @@ -1415,27 +1415,27 @@ chunk {2} abd.js (abd) 0 bytes <{4}> >{6}< [rendered] > [8] ./index.js 8:0-11:9 [0] ./modules/a.js 0 bytes {1} {2} [built] [1] ./modules/b.js 0 bytes {1} {2} [built] - [6] ./modules/d.js 0 bytes {2} {6} [built] + [5] ./modules/d.js 0 bytes {2} {6} [built] chunk {3} cir2.js (cir2) 81 bytes <{4}> >{0}< [rendered] > [8] ./index.js 14:0-54 - [3] ./circular2.js 81 bytes {3} {5} [built] + [3] ./circular2.js 81 bytes {3} {7} [built] chunk {4} main.js (main) 523 bytes >{0}< >{1}< >{2}< >{3}< [entry] [rendered] > ./index main [4] ./modules/f.js 0 bytes {4} [built] [8] ./index.js 523 bytes {4} [built] -chunk {5} cir2 from cir1.js (cir2 from cir1) 81 bytes <{0}> [rendered] - > [2] ./circular1.js 1:0-79 - > [2] ./circular1.js 1:0-79 - [3] ./circular2.js 81 bytes {3} {5} [built] - [7] ./modules/e.js 0 bytes {5} [built] -chunk {6} chunk.js (chunk) 0 bytes <{2}> <{7}> [rendered] +chunk {5} ac in ab.js (ac in ab) 0 bytes <{1}> >{6}< [rendered] + > [8] ./index.js 2:1-5:15 + [6] ./modules/c.js 0 bytes {5} {6} [built] +chunk {6} chunk.js (chunk) 0 bytes <{2}> <{5}> [rendered] > [8] ./index.js 3:2-4:13 > [8] ./index.js 9:1-10:12 - [5] ./modules/c.js 0 bytes {6} {7} [built] - [6] ./modules/d.js 0 bytes {2} {6} [built] -chunk {7} ac in ab.js (ac in ab) 0 bytes <{1}> >{6}< [rendered] - > [8] ./index.js 2:1-5:15 - [5] ./modules/c.js 0 bytes {6} {7} [built]" + [5] ./modules/d.js 0 bytes {2} {6} [built] + [6] ./modules/c.js 0 bytes {5} {6} [built] +chunk {7} cir2 from cir1.js (cir2 from cir1) 81 bytes <{0}> [rendered] + > [2] ./circular1.js 1:0-79 + > [2] ./circular1.js 1:0-79 + [3] ./circular2.js 81 bytes {3} {7} [built] + [7] ./modules/e.js 0 bytes {7} [built]" `; exports[`StatsTestCases should print correct stats for parse-error 1`] = ` @@ -1708,17 +1708,17 @@ chunk {6} inner2.js (inner2) 0 bytes <{0}> [rendered]" `; exports[`StatsTestCases should print correct stats for prefetch-preload-mixed 1`] = ` -"chunk {0} a.js (a) 136 bytes <{3}> >{10}< >{9}< (prefetch: {9} {10}) [rendered] +"chunk {0} a.js (a) 136 bytes <{3}> >{4}< >{5}< (prefetch: {4} {5}) [rendered] chunk {1} b.js (b) 203 bytes <{3}> >{6}< >{7}< >{8}< (prefetch: {6} {8}) (preload: {7}) [rendered] -chunk {2} c.js (c) 134 bytes <{3}> >{4}< >{5}< (preload: {4} {5}) [rendered] +chunk {2} c.js (c) 134 bytes <{3}> >{10}< >{9}< (preload: {9} {10}) [rendered] chunk {3} main.js (main) 195 bytes >{0}< >{1}< >{2}< (prefetch: {0} {1} {2}) [entry] [rendered] -chunk {4} c1.js (c1) 0 bytes <{2}> [rendered] -chunk {5} c2.js (c2) 0 bytes <{2}> [rendered] +chunk {4} a1.js (a1) 0 bytes <{0}> [rendered] +chunk {5} a2.js (a2) 0 bytes <{0}> [rendered] chunk {6} b1.js (b1) 0 bytes <{1}> [rendered] chunk {7} b2.js (b2) 0 bytes <{1}> [rendered] chunk {8} b3.js (b3) 0 bytes <{1}> [rendered] -chunk {9} a1.js (a1) 0 bytes <{0}> [rendered] -chunk {10} a2.js (a2) 0 bytes <{0}> [rendered]" +chunk {9} c1.js (c1) 0 bytes <{2}> [rendered] +chunk {10} c2.js (c2) 0 bytes <{2}> [rendered]" `; exports[`StatsTestCases should print correct stats for preload 1`] = ` @@ -2038,9 +2038,9 @@ Entrypoint entry = entry.js `; exports[`StatsTestCases should print correct stats for scope-hoisting-multi 1`] = ` -"Hash: f47bea8ea571296b32b82a4cd6b69820dd6e8c36 +"Hash: cc16a0dfba6b532cf00e1421f841e8a050c2d66b Child - Hash: f47bea8ea571296b32b8 + Hash: cc16a0dfba6b532cf00e Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Entrypoint first = vendor.js first.js @@ -2051,13 +2051,13 @@ Child [3] ./common.js 37 bytes {4} {5} [built] [4] ./lazy_shared.js 31 bytes {0} [built] [5] ./vendor.js 25 bytes {3} [built] - [6] ./lazy_first.js 55 bytes {2} [built] - [7] ./lazy_second.js 55 bytes {1} [built] + [6] ./lazy_first.js 55 bytes {1} [built] + [7] ./lazy_second.js 55 bytes {2} [built] [8] ./first.js 207 bytes {4} [built] [9] ./module_first.js 31 bytes {4} [built] [10] ./second.js 177 bytes {5} [built] Child - Hash: 2a4cd6b69820dd6e8c36 + Hash: 1421f841e8a050c2d66b Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Entrypoint first = vendor.js first.js @@ -2070,7 +2070,7 @@ Child [3] ./vendor.js 25 bytes {3} [built] [4] ./lazy_shared.js 31 bytes {0} [built] ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./first.js (referenced with import()), ./second.js (referenced with import()) - [5] ./lazy_second.js 55 bytes {1} [built] + [5] ./lazy_second.js 55 bytes {2} [built] ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./second.js (referenced with import()) [6] ./second.js 177 bytes {5} [built] ModuleConcatenation bailout: Module is an entry point @@ -2080,7 +2080,7 @@ Child | ./first.js 207 bytes [built] | ModuleConcatenation bailout: Module is an entry point | ./module_first.js 31 bytes [built] - [8] ./lazy_first.js 55 bytes {2} [built] + [8] ./lazy_first.js 55 bytes {1} [built] ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./first.js (referenced with import())" `; @@ -2118,14 +2118,14 @@ Entrypoint main = main.js harmony import specifier ./components [3] ./foo.js 3:20-25 (skipped side-effect-free modules) harmony side effect evaluation ./CompA [7] ./components/src/CompAB/index.js 1:0-43 harmony export imported specifier ./CompA [7] ./components/src/CompAB/index.js 1:0-43 -[5] ./components/src/CompC/CompC.js 33 bytes [built] - [no exports used] - harmony side effect evaluation ./CompC [6] ./components/src/CompC/index.js 1:0-34 - harmony export imported specifier ./CompC [6] ./components/src/CompC/index.js 1:0-34 -[6] ./components/src/CompC/index.js 34 bytes [built] +[5] ./components/src/CompC/index.js 34 bytes [built] [no exports used] harmony side effect evaluation ./CompC [2] ./components/src/index.js 2:0-43 harmony export imported specifier ./CompC [2] ./components/src/index.js 2:0-43 +[6] ./components/src/CompC/CompC.js 33 bytes [built] + [no exports used] + harmony side effect evaluation ./CompC [5] ./components/src/CompC/index.js 1:0-34 + harmony export imported specifier ./CompC [5] ./components/src/CompC/index.js 1:0-34 [7] ./components/src/CompAB/index.js 87 bytes [built] [no exports used] harmony side effect evaluation ./CompAB [2] ./components/src/index.js 1:0-40 @@ -2180,53 +2180,53 @@ exports[`StatsTestCases should print correct stats for split-chunks 1`] = ` Entrypoint a = default/a.js Entrypoint b = default/b.js Entrypoint c = default/c.js - chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{9}> ={1}= ={2}= ={3}= ={5}= ={6}= ={7}= ={8}= >{2}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) + chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{9}> ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={8}= >{2}< >{7}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] - chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={5}= ={6}= ={7}= ={8}= >{2}< >{4}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={5}= ={6}= ={8}= >{2}< >{7}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{5}> <{9}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{4}> <{9}> ={0}= ={1}= ={3}= ={5}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [2] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} default/vendors~async-a~async-b.js (vendors~async-a~async-b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={5}= ={6}= >{2}< >{4}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) + chunk {3} default/vendors~async-a~async-b.js (vendors~async-a~async-b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={4}= ={5}= >{2}< >{7}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] - chunk {4} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{5}> ={2}= [rendered] - > ./g [] 6:0-47 - > ./g [] 6:0-47 - [9] ./g.js 34 bytes {4} [built] - chunk {5} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{4}< [rendered] + chunk {4} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{7}< [rendered] > ./a [8] ./index.js 1:0-47 - [7] ./a.js + 1 modules 156 bytes {5} {10} [built] + [7] ./a.js + 1 modules 156 bytes {4} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {6} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] + chunk {5} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] > ./b [8] ./index.js 2:0-47 - [5] ./b.js 72 bytes {6} {11} [built] - chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={8}= [rendered] + [5] ./b.js 72 bytes {5} {11} [built] + chunk {6} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={8}= [rendered] > ./c [8] ./index.js 3:0-47 - [6] ./c.js 72 bytes {7} {12} [built] - chunk {8} default/vendors~async-c.js (vendors~async-c) 20 bytes <{9}> ={0}= ={1}= ={2}= ={7}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c) + [6] ./c.js 72 bytes {6} {12} [built] + chunk {7} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{4}> ={2}= [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [9] ./g.js 34 bytes {7} [built] + chunk {8} default/vendors~async-c.js (vendors~async-c) 20 bytes <{9}> ={0}= ={1}= ={2}= ={6}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c) > ./c [8] ./index.js 3:0-47 [4] ./node_modules/z.js 20 bytes {8} {12} [built] - chunk {9} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{5}< >{6}< >{7}< >{8}< [entry] [rendered] + chunk {9} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{8}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] - chunk {10} default/a.js (a) 216 bytes >{2}< >{4}< [entry] [rendered] + chunk {10} default/a.js (a) 216 bytes >{2}< >{7}< [entry] [rendered] > ./a a [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] - [7] ./a.js + 1 modules 156 bytes {5} {10} [built] + [7] ./a.js + 1 modules 156 bytes {4} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] chunk {11} default/b.js (b) 152 bytes [entry] [rendered] @@ -2235,20 +2235,20 @@ exports[`StatsTestCases should print correct stats for split-chunks 1`] = ` [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] [2] ./f.js 20 bytes {2} {11} {12} [built] [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] - [5] ./b.js 72 bytes {6} {11} [built] + [5] ./b.js 72 bytes {5} {11} [built] chunk {12} default/c.js (c) 152 bytes [entry] [rendered] > ./c c [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] [2] ./f.js 20 bytes {2} {11} {12} [built] [4] ./node_modules/z.js 20 bytes {8} {12} [built] - [6] ./c.js 72 bytes {7} {12} [built] + [6] ./c.js 72 bytes {6} {12} [built] Child all-chunks: Entrypoint main = default/main.js Entrypoint a = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~a~async-a~async-b~b.js default/a.js Entrypoint b = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~a~async-a~async-b~b.js default/b.js Entrypoint c = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~async-c~c.js default/c.js - chunk {0} default/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) + chunk {0} default/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) > ./a a > ./b b > ./c c @@ -2256,117 +2256,117 @@ Child all-chunks: > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [2] ./node_modules/x.js 20 bytes {0} [built] - chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= >{2}< >{8}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{6}> <{9}> ={0}= ={1}= ={3}= ={4}= ={5}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{5}> <{9}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [1] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} default/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={10}= ={11}= ={2}= ={6}= ={7}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) + chunk {3} default/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={10}= ={11}= ={2}= ={5}= ={6}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) > ./a a > ./b b > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 [3] ./node_modules/y.js 20 bytes {3} [built] - chunk {4} default/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={8}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + chunk {4} default/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={7}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) > ./c c > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] - chunk {5} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{6}> ={2}= [rendered] - > ./g [] 6:0-47 - > ./g [] 6:0-47 - [9] ./g.js 34 bytes {5} [built] - chunk {6} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{5}< [rendered] + chunk {5} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{8}< [rendered] > ./a [8] ./index.js 1:0-47 - [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + [6] ./a.js + 1 modules 156 bytes {5} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {7} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] + chunk {6} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] > ./b [8] ./index.js 2:0-47 - [4] ./b.js 72 bytes {7} {11} [built] - chunk {8} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] + [4] ./b.js 72 bytes {6} {11} [built] + chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] > ./c [8] ./index.js 3:0-47 - [5] ./c.js 72 bytes {8} {12} [built] - chunk {9} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{6}< >{7}< >{8}< [entry] [rendered] + [5] ./c.js 72 bytes {7} {12} [built] + chunk {8} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{5}> ={2}= [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [9] ./g.js 34 bytes {8} [built] + chunk {9} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] - chunk {10} default/a.js (a) 176 bytes ={0}= ={3}= >{2}< >{5}< [entry] [rendered] + chunk {10} default/a.js (a) 176 bytes ={0}= ={3}= >{2}< >{8}< [entry] [rendered] > ./a a [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + [6] ./a.js + 1 modules 156 bytes {5} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] chunk {11} default/b.js (b) 112 bytes ={0}= ={3}= [entry] [rendered] > ./b b [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [1] ./f.js 20 bytes {2} {11} {12} [built] - [4] ./b.js 72 bytes {7} {11} [built] + [4] ./b.js 72 bytes {6} {11} [built] chunk {12} default/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] > ./c c [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [1] ./f.js 20 bytes {2} {11} {12} [built] - [5] ./c.js 72 bytes {8} {12} [built] + [5] ./c.js 72 bytes {7} {12} [built] Child manual: Entrypoint main = default/main.js Entrypoint a = default/vendors.js default/a.js Entrypoint b = default/vendors.js default/b.js Entrypoint c = default/vendors.js default/c.js - chunk {0} default/vendors.js (vendors) 112 bytes <{5}> ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{1}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) + chunk {0} default/vendors.js (vendors) 112 bytes <{5}> ={1}= ={2}= ={3}= ={6}= ={7}= ={8}= >{4}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) > ./a a > ./b b > ./c c > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - [2] ./node_modules/x.js 20 bytes {0} [built] - [3] ./node_modules/y.js 20 bytes {0} [built] - [6] ./node_modules/z.js 20 bytes {0} [built] - [10] multi x y z 52 bytes {0} [built] - chunk {1} default/async-g.js (async-g) 54 bytes <{0}> <{2}> <{6}> [rendered] - > ./g [] 6:0-47 - > ./g [] 6:0-47 - [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] - [9] ./g.js 34 bytes {1} [built] - chunk {2} default/async-a.js (async-a) 176 bytes <{5}> ={0}= >{1}< [rendered] + [2] ./node_modules/x.js 20 bytes {0} [built] + [3] ./node_modules/y.js 20 bytes {0} [built] + [6] ./node_modules/z.js 20 bytes {0} [built] + [9] multi x y z 52 bytes {0} [built] + chunk {1} default/async-a.js (async-a) 176 bytes <{5}> ={0}= >{4}< [rendered] > ./a [8] ./index.js 1:0-47 - [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] - [7] ./a.js + 1 modules 156 bytes {2} {6} [built] + [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] + [7] ./a.js + 1 modules 156 bytes {1} {6} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {3} default/async-b.js (async-b) 112 bytes <{5}> ={0}= [rendered] + chunk {2} default/async-b.js (async-b) 112 bytes <{5}> ={0}= [rendered] > ./b [8] ./index.js 2:0-47 - [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] - [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] - [4] ./b.js 72 bytes {3} {7} [built] - chunk {4} default/async-c.js (async-c) 112 bytes <{5}> ={0}= [rendered] + [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] + [1] ./f.js 20 bytes {2} {3} {4} {7} {8} [built] + [4] ./b.js 72 bytes {2} {7} [built] + chunk {3} default/async-c.js (async-c) 112 bytes <{5}> ={0}= [rendered] > ./c [8] ./index.js 3:0-47 - [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] - [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] - [5] ./c.js 72 bytes {4} {8} [built] - chunk {5} default/main.js (main) 147 bytes >{0}< >{2}< >{3}< >{4}< [entry] [rendered] + [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] + [1] ./f.js 20 bytes {2} {3} {4} {7} {8} [built] + [5] ./c.js 72 bytes {3} {8} [built] + chunk {4} default/async-g.js (async-g) 54 bytes <{0}> <{1}> <{6}> [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [1] ./f.js 20 bytes {2} {3} {4} {7} {8} [built] + [10] ./g.js 34 bytes {4} [built] + chunk {5} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {5} [built] - chunk {6} default/a.js (a) 176 bytes ={0}= >{1}< [entry] [rendered] + chunk {6} default/a.js (a) 176 bytes ={0}= >{4}< [entry] [rendered] > ./a a - [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] - [7] ./a.js + 1 modules 156 bytes {2} {6} [built] + [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] + [7] ./a.js + 1 modules 156 bytes {1} {6} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] chunk {7} default/b.js (b) 112 bytes ={0}= [entry] [rendered] > ./b b - [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] - [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] - [4] ./b.js 72 bytes {3} {7} [built] + [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] + [1] ./f.js 20 bytes {2} {3} {4} {7} {8} [built] + [4] ./b.js 72 bytes {2} {7} [built] chunk {8} default/c.js (c) 112 bytes ={0}= [entry] [rendered] > ./c c - [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] - [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] - [5] ./c.js 72 bytes {4} {8} [built] + [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] + [1] ./f.js 20 bytes {2} {3} {4} {7} {8} [built] + [5] ./c.js 72 bytes {3} {8} [built] Child name-too-long: Entrypoint main = main.js Entrypoint aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f.js vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793.js async-a.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.js @@ -2438,126 +2438,126 @@ Child custom-chunks-filter: Entrypoint a = default/a.js Entrypoint b = default/vendors~async-a~async-b~async-c~b~c.js default/vendors~async-a~async-b~b.js default/b.js Entrypoint c = default/vendors~async-a~async-b~async-c~b~c.js default/vendors~async-c~c.js default/c.js - chunk {0} default/vendors~async-a~async-b~async-c~b~c.js (vendors~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={1}= ={11}= ={12}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c~b~c) + chunk {0} default/vendors~async-a~async-b~async-c~b~c.js (vendors~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={1}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c~b~c) > ./b b > ./c c > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [2] ./node_modules/x.js 20 bytes {0} {10} [built] - chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= >{2}< >{5}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= >{2}< >{8}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{6}> <{9}> ={0}= ={1}= ={3}= ={4}= ={5}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{5}> <{9}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [1] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} default/vendors~async-a~async-b~b.js (vendors~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={11}= ={2}= ={6}= ={7}= >{2}< >{5}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~b) + chunk {3} default/vendors~async-a~async-b~b.js (vendors~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={11}= ={2}= ={5}= ={6}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~b) > ./b b > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 [3] ./node_modules/y.js 20 bytes {3} {10} [built] - chunk {4} default/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={8}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + chunk {4} default/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={7}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) > ./c c > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] - chunk {5} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{6}> ={2}= [rendered] - > ./g [] 6:0-47 - > ./g [] 6:0-47 - [9] ./g.js 34 bytes {5} [built] - chunk {6} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{5}< [rendered] + chunk {5} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{8}< [rendered] > ./a [8] ./index.js 1:0-47 - [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + [6] ./a.js + 1 modules 156 bytes {5} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {7} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] + chunk {6} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] > ./b [8] ./index.js 2:0-47 - [4] ./b.js 72 bytes {7} {11} [built] - chunk {8} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] + [4] ./b.js 72 bytes {6} {11} [built] + chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] > ./c [8] ./index.js 3:0-47 - [5] ./c.js 72 bytes {8} {12} [built] - chunk {9} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{6}< >{7}< >{8}< [entry] [rendered] + [5] ./c.js 72 bytes {7} {12} [built] + chunk {8} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{5}> ={2}= [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [9] ./g.js 34 bytes {8} [built] + chunk {9} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {9} [built] - chunk {10} default/a.js (a) 216 bytes >{2}< >{5}< [entry] [rendered] + chunk {10} default/a.js (a) 216 bytes >{2}< >{8}< [entry] [rendered] > ./a a [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [2] ./node_modules/x.js 20 bytes {0} {10} [built] [3] ./node_modules/y.js 20 bytes {3} {10} [built] - [6] ./a.js + 1 modules 156 bytes {6} {10} [built] + [6] ./a.js + 1 modules 156 bytes {5} {10} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] chunk {11} default/b.js (b) 112 bytes ={0}= ={3}= [entry] [rendered] > ./b b [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [1] ./f.js 20 bytes {2} {11} {12} [built] - [4] ./b.js 72 bytes {7} {11} [built] + [4] ./b.js 72 bytes {6} {11} [built] chunk {12} default/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] > ./c c [0] ./d.js 20 bytes {1} {10} {11} {12} [built] [1] ./f.js 20 bytes {2} {11} {12} [built] - [5] ./c.js 72 bytes {8} {12} [built] + [5] ./c.js 72 bytes {7} {12} [built] Child custom-chunks-filter-in-cache-groups: Entrypoint main = default/main.js Entrypoint a = default/a.js Entrypoint b = default/vendors.js default/b.js Entrypoint c = default/vendors.js default/c.js - chunk {0} default/vendors.js (vendors) 112 bytes <{5}> ={2}= ={3}= ={4}= ={7}= ={8}= >{1}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) + chunk {0} default/vendors.js (vendors) 112 bytes <{5}> ={1}= ={2}= ={3}= ={7}= ={8}= >{4}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) > ./b b > ./c c > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - [2] ./node_modules/x.js 20 bytes {0} {6} [built] - [3] ./node_modules/y.js 20 bytes {0} {6} [built] - [6] ./node_modules/z.js 20 bytes {0} [built] - [10] multi x y z 52 bytes {0} [built] - chunk {1} default/async-g.js (async-g) 54 bytes <{0}> <{2}> <{6}> [rendered] - > ./g [] 6:0-47 - > ./g [] 6:0-47 - [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] - [9] ./g.js 34 bytes {1} [built] - chunk {2} default/async-a.js (async-a) 176 bytes <{5}> ={0}= >{1}< [rendered] + [2] ./node_modules/x.js 20 bytes {0} {6} [built] + [3] ./node_modules/y.js 20 bytes {0} {6} [built] + [6] ./node_modules/z.js 20 bytes {0} [built] + [9] multi x y z 52 bytes {0} [built] + chunk {1} default/async-a.js (async-a) 176 bytes <{5}> ={0}= >{4}< [rendered] > ./a [8] ./index.js 1:0-47 - [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] - [7] ./a.js + 1 modules 156 bytes {2} {6} [built] + [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] + [7] ./a.js + 1 modules 156 bytes {1} {6} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {3} default/async-b.js (async-b) 112 bytes <{5}> ={0}= [rendered] + chunk {2} default/async-b.js (async-b) 112 bytes <{5}> ={0}= [rendered] > ./b [8] ./index.js 2:0-47 - [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] - [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] - [4] ./b.js 72 bytes {3} {7} [built] - chunk {4} default/async-c.js (async-c) 112 bytes <{5}> ={0}= [rendered] + [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] + [1] ./f.js 20 bytes {2} {3} {4} {7} {8} [built] + [4] ./b.js 72 bytes {2} {7} [built] + chunk {3} default/async-c.js (async-c) 112 bytes <{5}> ={0}= [rendered] > ./c [8] ./index.js 3:0-47 - [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] - [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] - [5] ./c.js 72 bytes {4} {8} [built] - chunk {5} default/main.js (main) 147 bytes >{0}< >{2}< >{3}< >{4}< [entry] [rendered] + [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] + [1] ./f.js 20 bytes {2} {3} {4} {7} {8} [built] + [5] ./c.js 72 bytes {3} {8} [built] + chunk {4} default/async-g.js (async-g) 54 bytes <{0}> <{1}> <{6}> [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [1] ./f.js 20 bytes {2} {3} {4} {7} {8} [built] + [10] ./g.js 34 bytes {4} [built] + chunk {5} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< [entry] [rendered] > ./ main [8] ./index.js 147 bytes {5} [built] - chunk {6} default/a.js (a) 216 bytes >{1}< [entry] [rendered] + chunk {6} default/a.js (a) 216 bytes >{4}< [entry] [rendered] > ./a a - [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] + [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] [2] ./node_modules/x.js 20 bytes {0} {6} [built] [3] ./node_modules/y.js 20 bytes {0} {6} [built] - [7] ./a.js + 1 modules 156 bytes {2} {6} [built] + [7] ./a.js + 1 modules 156 bytes {1} {6} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] chunk {7} default/b.js (b) 112 bytes ={0}= [entry] [rendered] > ./b b - [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] - [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] - [4] ./b.js 72 bytes {3} {7} [built] + [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] + [1] ./f.js 20 bytes {2} {3} {4} {7} {8} [built] + [4] ./b.js 72 bytes {2} {7} [built] chunk {8} default/c.js (c) 112 bytes ={0}= [entry] [rendered] > ./c c - [0] ./d.js 20 bytes {2} {3} {4} {6} {7} {8} [built] - [1] ./f.js 20 bytes {1} {3} {4} {7} {8} [built] - [5] ./c.js 72 bytes {4} {8} [built]" + [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] + [1] ./f.js 20 bytes {2} {3} {4} {7} {8} [built] + [5] ./c.js 72 bytes {3} {8} [built]" `; exports[`StatsTestCases should print correct stats for split-chunks-combinations 1`] = ` diff --git a/test/configCases/chunk-index/order-multiple-entries/a.js b/test/configCases/chunk-index/order-multiple-entries/a.js new file mode 100644 index 00000000000..7777e2e08e5 --- /dev/null +++ b/test/configCases/chunk-index/order-multiple-entries/a.js @@ -0,0 +1 @@ +import "./shared"; \ No newline at end of file diff --git a/test/configCases/chunk-index/order-multiple-entries/async.js b/test/configCases/chunk-index/order-multiple-entries/async.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/configCases/chunk-index/order-multiple-entries/b.js b/test/configCases/chunk-index/order-multiple-entries/b.js new file mode 100644 index 00000000000..7777e2e08e5 --- /dev/null +++ b/test/configCases/chunk-index/order-multiple-entries/b.js @@ -0,0 +1 @@ +import "./shared"; \ No newline at end of file diff --git a/test/configCases/chunk-index/order-multiple-entries/c.js b/test/configCases/chunk-index/order-multiple-entries/c.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/configCases/chunk-index/order-multiple-entries/entry1.js b/test/configCases/chunk-index/order-multiple-entries/entry1.js new file mode 100644 index 00000000000..32a5fa8c867 --- /dev/null +++ b/test/configCases/chunk-index/order-multiple-entries/entry1.js @@ -0,0 +1,6 @@ +import "./a"; +import(/* webpackChunkName: "async" */ "./async"); +import "./b"; +import "./c"; + +it("should compile", () => {}); diff --git a/test/configCases/chunk-index/order-multiple-entries/entry2.js b/test/configCases/chunk-index/order-multiple-entries/entry2.js new file mode 100644 index 00000000000..aa9ec2317ed --- /dev/null +++ b/test/configCases/chunk-index/order-multiple-entries/entry2.js @@ -0,0 +1,6 @@ +import "./c"; +import(/* webpackChunkName: "async" */ "./async"); +import "./b"; +import "./a"; + +it("should compile", () => {}); diff --git a/test/configCases/chunk-index/order-multiple-entries/shared.js b/test/configCases/chunk-index/order-multiple-entries/shared.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/configCases/chunk-index/order-multiple-entries/test.config.js b/test/configCases/chunk-index/order-multiple-entries/test.config.js new file mode 100644 index 00000000000..65c1791bce3 --- /dev/null +++ b/test/configCases/chunk-index/order-multiple-entries/test.config.js @@ -0,0 +1,5 @@ +module.exports = { + findBundle: function(i, options) { + return ["entry1.js", "entry2.js"]; + } +}; diff --git a/test/configCases/chunk-index/order-multiple-entries/webpack.config.js b/test/configCases/chunk-index/order-multiple-entries/webpack.config.js new file mode 100644 index 00000000000..52dd6319209 --- /dev/null +++ b/test/configCases/chunk-index/order-multiple-entries/webpack.config.js @@ -0,0 +1,95 @@ +/** @typedef {import("../../../../lib/Compilation")} Compilation */ +/** @typedef {import("../../../../lib/Module")} Module */ + +module.exports = { + entry: { + entry1: "./entry1", + entry2: "./entry2" + }, + output: { + filename: "[name].js" + }, + plugins: [ + function() { + /** + * @param {Compilation} compilation compilation + * @returns {void} + */ + const handler = compilation => { + compilation.hooks.afterSeal.tap("testcase", () => { + const data = {}; + for (const [name, group] of compilation.namedChunkGroups) { + /** @type {Map} */ + const modules = new Map(); + const modules2 = new Map(); + for (const chunk of group.chunks) { + for (const module of chunk.modulesIterable) { + modules.set(module, group.getModuleIndex(module)); + modules2.set(module, group.getModuleIndex2(module)); + } + } + const sortedModules = Array.from(modules).sort((a, b) => { + return a[1] - b[1]; + }); + const sortedModules2 = Array.from(modules2).sort((a, b) => { + return a[1] - b[1]; + }); + const text = sortedModules + .map( + ([m, index]) => + `${index}: ${m.readableIdentifier( + compilation.requestShortener + )}` + ) + .join(", "); + const text2 = sortedModules2 + .map( + ([m, index]) => + `${index}: ${m.readableIdentifier( + compilation.requestShortener + )}` + ) + .join(", "); + data[name + "Index"] = text; + data[name + "Index2"] = text2; + } + expect(data).toEqual({ + entry1Index: + "0: ./entry1.js, 1: ./a.js, 2: ./shared.js, 3: ./b.js, 4: ./c.js", + entry1Index2: + "0: ./shared.js, 1: ./a.js, 2: ./b.js, 3: ./c.js, 4: ./entry1.js", + entry2Index: + "0: ./entry2.js, 1: ./c.js, 2: ./b.js, 3: ./shared.js, 4: ./a.js", + entry2Index2: + "0: ./c.js, 1: ./shared.js, 2: ./b.js, 3: ./a.js, 4: ./entry2.js", + asyncIndex: "0: ./async.js", + asyncIndex2: "0: ./async.js" + }); + const indicies = compilation.modules + .map( + m => + `${m.index}: ${m.readableIdentifier( + compilation.requestShortener + )}` + ) + .join(", "); + const indicies2 = compilation.modules + .map( + m => + `${m.index2}: ${m.readableIdentifier( + compilation.requestShortener + )}` + ) + .join(", "); + expect(indicies).toEqual( + "2: ./shared.js, 4: ./c.js, 3: ./b.js, 1: ./a.js, 6: ./async.js, 5: ./entry2.js, 0: ./entry1.js" + ); + expect(indicies2).toEqual( + "0: ./shared.js, 3: ./c.js, 2: ./b.js, 1: ./a.js, 6: ./async.js, 5: ./entry2.js, 4: ./entry1.js" + ); + }); + }; + this.hooks.compilation.tap("testcase", handler); + } + ] +}; From 3113aea57d29c5426c7af9d6c96d270ae1faff38 Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Tue, 26 Jun 2018 10:18:33 -0700 Subject: [PATCH 102/310] fix: update snapshot --- test/__snapshots__/StatsTestCases.test.js.snap | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index 8f35f7780e0..684a5eceac9 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -2796,6 +2796,18 @@ Entrypoint main = bundle.js [1] ./a.js 249 bytes {0} [built] [2] (webpack)/buildin/module.js 497 bytes {0} [built] +WARNING in UglifyJs Plugin: null in bundle.js + +WARNING in UglifyJs Plugin: null in bundle.js + +WARNING in UglifyJs Plugin: null in bundle.js + +WARNING in UglifyJs Plugin: null in bundle.js + +WARNING in UglifyJs Plugin: null in bundle.js + +WARNING in UglifyJs Plugin: null in bundle.js + WARNING in UglifyJs Plugin: Dropping unused function someUnRemoteUsedFunction1 [./a.js:3,0] in bundle.js WARNING in UglifyJs Plugin: Dropping unused function someUnRemoteUsedFunction2 [./a.js:4,0] in bundle.js From 6c8fc73f2f747464e76e4a58e7d3daef3e216002 Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Tue, 26 Jun 2018 10:57:17 -0700 Subject: [PATCH 103/310] chore(pgk): add update-snapshot script for all tests --- _SETUP.md | 6 ++++++ package.json | 1 + 2 files changed, 7 insertions(+) diff --git a/_SETUP.md b/_SETUP.md index 8c080252e5b..ebd501013be 100644 --- a/_SETUP.md +++ b/_SETUP.md @@ -51,6 +51,12 @@ or in watch mode yarn test:unit --watch ``` +### To update Jest snapshots use + +```bash +yarn test:update-snapshots +``` + ### To run code formatter (prettier) run ```bash diff --git a/package.json b/package.json index b333c6c4afe..cc59d3c3caa 100644 --- a/package.json +++ b/package.json @@ -104,6 +104,7 @@ "scripts": { "setup": "node ./setup/setup.js", "test": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest", + "test:update-snapshots": "yarn test -u", "test:integration": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"/test/*.test.js\"", "test:basic": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"/test/{TestCasesNormal,StatsTestCases,ConfigTestCases}.test.js\"", "test:unit": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"/test/*.unittest.js\"", From c384c3fb1c162667d001f467db05e73570ddd4d2 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 27 Jun 2018 07:39:24 +0200 Subject: [PATCH 104/310] 4.12.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b333c6c4afe..cbcf062c3c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.12.1", + "version": "4.12.2", "author": "Tobias Koppers @sokra", "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", From 40ed1f0c8c274211c4109de12a056b934325eb9d Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 27 Jun 2018 12:58:52 +0200 Subject: [PATCH 105/310] Revert "fix: update snapshot" This reverts commit 3113aea57d29c5426c7af9d6c96d270ae1faff38. --- test/__snapshots__/StatsTestCases.test.js.snap | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index 684a5eceac9..8f35f7780e0 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -2796,18 +2796,6 @@ Entrypoint main = bundle.js [1] ./a.js 249 bytes {0} [built] [2] (webpack)/buildin/module.js 497 bytes {0} [built] -WARNING in UglifyJs Plugin: null in bundle.js - -WARNING in UglifyJs Plugin: null in bundle.js - -WARNING in UglifyJs Plugin: null in bundle.js - -WARNING in UglifyJs Plugin: null in bundle.js - -WARNING in UglifyJs Plugin: null in bundle.js - -WARNING in UglifyJs Plugin: null in bundle.js - WARNING in UglifyJs Plugin: Dropping unused function someUnRemoteUsedFunction1 [./a.js:3,0] in bundle.js WARNING in UglifyJs Plugin: Dropping unused function someUnRemoteUsedFunction2 [./a.js:4,0] in bundle.js From faf456585d9714b28d552742d5dea2d6427241ba Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 27 Jun 2018 13:01:45 +0200 Subject: [PATCH 106/310] upgrade uglifyjs-webpack-plugin fixes a bug with filtered warnings --- yarn.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index bf9efc22e6c..459841c8436 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6538,8 +6538,8 @@ uglify-to-browserify@~1.0.0: resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" uglifyjs-webpack-plugin@^1.2.4: - version "1.2.6" - resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.6.tgz#f4bb44f02431e82b301d8d4624330a6a35729381" + version "1.2.7" + resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.7.tgz#57638dd99c853a1ebfe9d97b42160a8a507f9d00" dependencies: cacache "^10.0.4" find-cache-dir "^1.0.0" From ad8f496745536670b2cc67ec8cd405cc0d779789 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 27 Jun 2018 13:48:13 +0200 Subject: [PATCH 107/310] arrow functions, remove or improve eslint-disable comments --- bin/webpack.js | 9 +++++-- lib/Chunk.js | 2 +- lib/ChunkGroup.js | 2 +- lib/Compilation.js | 4 ++-- lib/ExtendedAPIPlugin.js | 12 ++++++---- lib/ExternalModuleFactoryPlugin.js | 2 +- lib/HotModuleReplacement.runtime.js | 13 ++++++---- lib/RuleSet.js | 6 ++--- lib/Stats.js | 3 ++- lib/UmdMainTemplatePlugin.js | 24 +++++++++---------- lib/WebpackOptionsValidationError.js | 1 - lib/debug/ProfilingPlugin.js | 10 ++++---- .../AMDDefineDependencyParserPlugin.js | 10 ++++---- ...AMDRequireDependenciesBlockParserPlugin.js | 2 -- lib/node/NodeMainTemplateAsync.runtime.js | 2 +- lib/util/SetHelpers.js | 8 +++---- lib/wasm/WasmMainTemplatePlugin.js | 8 +++---- lib/wasm/WebAssemblyGenerator.js | 24 +++++++++---------- lib/webpack.web.js | 4 ++-- 19 files changed, 76 insertions(+), 70 deletions(-) diff --git a/bin/webpack.js b/bin/webpack.js index a34fba26b07..977fe5c93ea 100755 --- a/bin/webpack.js +++ b/bin/webpack.js @@ -159,8 +159,13 @@ if (installedClis.length === 0) { } else if (installedClis.length === 1) { const path = require("path"); const pkgPath = require.resolve(`${installedClis[0].package}/package.json`); - const pkg = require(pkgPath); // eslint-disable-line - require(path.resolve(path.dirname(pkgPath), pkg.bin[installedClis[0].binName])); // eslint-disable-line + // eslint-disable-next-line node/no-missing-require + const pkg = require(pkgPath); + // eslint-disable-next-line node/no-missing-require + require(path.resolve( + path.dirname(pkgPath), + pkg.bin[installedClis[0].binName] + )); } else { console.warn( `You have installed ${installedClis diff --git a/lib/Chunk.js b/lib/Chunk.js index 774eb445a95..3d2cea2f129 100644 --- a/lib/Chunk.js +++ b/lib/Chunk.js @@ -305,7 +305,7 @@ class Chunk { if (this._modules.size < otherChunk._modules.size) return 1; const a = this._modules[Symbol.iterator](); const b = otherChunk._modules[Symbol.iterator](); - // eslint-disable-next-line + // eslint-disable-next-line no-constant-condition while (true) { const aItem = a.next(); const bItem = b.next(); diff --git a/lib/ChunkGroup.js b/lib/ChunkGroup.js index 482800b7ed4..d84ac9d5811 100644 --- a/lib/ChunkGroup.js +++ b/lib/ChunkGroup.js @@ -401,7 +401,7 @@ class ChunkGroup { if (this.chunks.length < otherGroup.chunks.length) return 1; const a = this.chunks[Symbol.iterator](); const b = otherGroup.chunks[Symbol.iterator](); - // eslint-disable-next-line + // eslint-disable-next-line no-constant-condition while (true) { const aItem = a.next(); const bItem = b.next(); diff --git a/lib/Compilation.js b/lib/Compilation.js index 1fd02ed4f6f..7d9540b78af 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -89,11 +89,11 @@ const iterationOfArrayCallback = (arr, fn) => { } }; -function addAllToSet(set, otherSet) { +const addAllToSet = (set, otherSet) => { for (const item of otherSet) { set.add(item); } -} +}; class Compilation extends Tapable { constructor(compiler) { diff --git a/lib/ExtendedAPIPlugin.js b/lib/ExtendedAPIPlugin.js index a894a9faf7a..e41defb1fab 100644 --- a/lib/ExtendedAPIPlugin.js +++ b/lib/ExtendedAPIPlugin.js @@ -10,12 +10,16 @@ const ParserHelpers = require("./ParserHelpers"); const NullFactory = require("./NullFactory"); const REPLACEMENTS = { - __webpack_hash__: "__webpack_require__.h", // eslint-disable-line camelcase - __webpack_chunkname__: "__webpack_require__.cn" // eslint-disable-line camelcase + // eslint-disable-next-line camelcase + __webpack_hash__: "__webpack_require__.h", + // eslint-disable-next-line camelcase + __webpack_chunkname__: "__webpack_require__.cn" }; const REPLACEMENT_TYPES = { - __webpack_hash__: "string", // eslint-disable-line camelcase - __webpack_chunkname__: "string" // eslint-disable-line camelcase + // eslint-disable-next-line camelcase + __webpack_hash__: "string", + // eslint-disable-next-line camelcase + __webpack_chunkname__: "string" }; class ExtendedAPIPlugin { diff --git a/lib/ExternalModuleFactoryPlugin.js b/lib/ExternalModuleFactoryPlugin.js index 40c2156609e..390e305239e 100644 --- a/lib/ExternalModuleFactoryPlugin.js +++ b/lib/ExternalModuleFactoryPlugin.js @@ -64,7 +64,7 @@ class ExternalModuleFactoryPlugin { asyncFlag = true; if (i >= externals.length) return callback(); handleExternals(externals[i++], handleExternalsAndCallback); - } while (!asyncFlag); // eslint-disable-line keyword-spacing + } while (!asyncFlag); asyncFlag = false; }; diff --git a/lib/HotModuleReplacement.runtime.js b/lib/HotModuleReplacement.runtime.js index 4afddedc939..917ef45ba4c 100644 --- a/lib/HotModuleReplacement.runtime.js +++ b/lib/HotModuleReplacement.runtime.js @@ -5,12 +5,15 @@ /*global $hash$ $requestTimeout$ installedModules $require$ hotDownloadManifest hotDownloadUpdateChunk hotDisposeChunk modules */ module.exports = function() { var hotApplyOnUpdate = true; - var hotCurrentHash = $hash$; // eslint-disable-line no-unused-vars + // eslint-disable-next-line no-unused-vars + var hotCurrentHash = $hash$; var hotRequestTimeout = $requestTimeout$; var hotCurrentModuleData = {}; - var hotCurrentChildModule; // eslint-disable-line no-unused-vars - var hotCurrentParents = []; // eslint-disable-line no-unused-vars - var hotCurrentParentsTemp = []; // eslint-disable-line no-unused-vars + var hotCurrentChildModule; + // eslint-disable-next-line no-unused-vars + var hotCurrentParents = []; + // eslint-disable-next-line no-unused-vars + var hotCurrentParentsTemp = []; // eslint-disable-next-line no-unused-vars function hotCreateRequire(moduleId) { @@ -199,8 +202,8 @@ module.exports = function() { }); hotUpdate = {}; /*foreachInstalledChunks*/ + // eslint-disable-next-line no-lone-blocks { - // eslint-disable-line no-lone-blocks /*globals chunkId */ hotEnsureUpdateChunk(chunkId); } diff --git a/lib/RuleSet.js b/lib/RuleSet.js index abc44c1a9b4..7ed8eba6f5c 100644 --- a/lib/RuleSet.js +++ b/lib/RuleSet.js @@ -75,13 +75,13 @@ normalized: "use strict"; const notMatcher = matcher => { - return function(str) { + return str => { return !matcher(str); }; }; const orMatcher = items => { - return function(str) { + return str => { for (let i = 0; i < items.length; i++) { if (items[i](str)) return true; } @@ -90,7 +90,7 @@ const orMatcher = items => { }; const andMatcher = items => { - return function(str) { + return str => { for (let i = 0; i < items.length; i++) { if (!items[i](str)) return false; } diff --git a/lib/Stats.js b/lib/Stats.js index 5179c8108a0..b6db2396c15 100644 --- a/lib/Stats.js +++ b/lib/Stats.js @@ -108,10 +108,11 @@ class Stats { if (typeof item === "string") { const regExp = new RegExp( `[\\\\/]${item.replace( + // eslint-disable-next-line no-useless-escape /[-[\]{}()*+?.\\^$|]/g, "\\$&" )}([\\\\/]|$|!|\\?)` - ); // eslint-disable-line no-useless-escape + ); return ident => regExp.test(ident); } if (item && typeof item === "object" && typeof item.test === "function") { diff --git a/lib/UmdMainTemplatePlugin.js b/lib/UmdMainTemplatePlugin.js index 795ae278272..bb2e466290c 100644 --- a/lib/UmdMainTemplatePlugin.js +++ b/lib/UmdMainTemplatePlugin.js @@ -107,14 +107,14 @@ class UmdMainTemplatePlugin { requiredExternals = externals; } - function replaceKeys(str) { + const replaceKeys = str => { return mainTemplate.getAssetPath(str, { hash, chunk }); - } + }; - function externalsDepsArray(modules) { + const externalsDepsArray = modules => { return `[${replaceKeys( modules .map(m => @@ -124,9 +124,9 @@ class UmdMainTemplatePlugin { ) .join(", ") )}]`; - } + }; - function externalsRootArray(modules) { + const externalsRootArray = modules => { return replaceKeys( modules .map(m => { @@ -136,9 +136,9 @@ class UmdMainTemplatePlugin { }) .join(", ") ); - } + }; - function externalsRequireArray(type) { + const externalsRequireArray = type => { return replaceKeys( externals .map(m => { @@ -166,20 +166,20 @@ class UmdMainTemplatePlugin { }) .join(", ") ); - } + }; - function externalsArguments(modules) { + const externalsArguments = modules => { return modules .map( m => `__WEBPACK_EXTERNAL_MODULE_${Template.toIdentifier(`${m.id}`)}__` ) .join(", "); - } + }; - function libraryName(library) { + const libraryName = library => { return JSON.stringify(replaceKeys([].concat(library).pop())); - } + }; let amdFactory; if (optionalExternals.length > 0) { diff --git a/lib/WebpackOptionsValidationError.js b/lib/WebpackOptionsValidationError.js index 3fdbd0df6ba..d66cb2ccca2 100644 --- a/lib/WebpackOptionsValidationError.js +++ b/lib/WebpackOptionsValidationError.js @@ -332,7 +332,6 @@ class WebpackOptionsValidationError extends WebpackError { } return baseMessage; } else { - // eslint-disable-line no-fallthrough return `${dataPath} ${err.message} (${JSON.stringify( err, null, diff --git a/lib/debug/ProfilingPlugin.js b/lib/debug/ProfilingPlugin.js index bd6202fdbdb..1cb96271035 100644 --- a/lib/debug/ProfilingPlugin.js +++ b/lib/debug/ProfilingPlugin.js @@ -5,7 +5,8 @@ const schema = require("../../schemas/plugins/debug/ProfilingPlugin.json"); let inspector = undefined; try { - inspector = require("inspector"); // eslint-disable-line node/no-missing-require + // eslint-disable-next-line node/no-missing-require + inspector = require("inspector"); } catch (e) { console.log("Unable to CPU profile in < node 8.0"); } @@ -84,7 +85,7 @@ class Profiler { * @param {string} outputPath The location where to write the log. * @returns {Trace} The trace object */ -function createTrace(outputPath) { +const createTrace = outputPath => { const trace = new Tracer({ noStream: true }); @@ -139,7 +140,7 @@ function createTrace(outputPath) { trace.destroy(); } }; -} +}; const pluginName = "ProfilingPlugin"; @@ -354,7 +355,6 @@ const makeNewProfiledTapFn = (hookName, tracer, { name, type, fn }) => { switch (type) { case "promise": return (...args) => { - // eslint-disable-line const id = ++tracer.counter; tracer.trace.begin({ name, @@ -373,7 +373,6 @@ const makeNewProfiledTapFn = (hookName, tracer, { name, type, fn }) => { }; case "async": return (...args) => { - // eslint-disable-line const id = ++tracer.counter; tracer.trace.begin({ name, @@ -392,7 +391,6 @@ const makeNewProfiledTapFn = (hookName, tracer, { name, type, fn }) => { }; case "sync": return (...args) => { - // eslint-disable-line const id = ++tracer.counter; // Do not instrument ourself due to the CPU // profile needing to be the last event in the trace. diff --git a/lib/dependencies/AMDDefineDependencyParserPlugin.js b/lib/dependencies/AMDDefineDependencyParserPlugin.js index c4cb5789a22..95e862d1282 100644 --- a/lib/dependencies/AMDDefineDependencyParserPlugin.js +++ b/lib/dependencies/AMDDefineDependencyParserPlugin.js @@ -23,17 +23,17 @@ const isBoundFunctionExpression = expr => { return true; }; -function isUnboundFunctionExpression(expr) { +const isUnboundFunctionExpression = expr => { if (expr.type === "FunctionExpression") return true; if (expr.type === "ArrowFunctionExpression") return true; return false; -} +}; -function isCallable(expr) { +const isCallable = expr => { if (isUnboundFunctionExpression(expr)) return true; if (isBoundFunctionExpression(expr)) return true; return false; -} +}; class AMDDefineDependencyParserPlugin { constructor(options) { @@ -80,7 +80,6 @@ class AMDDefineDependencyParserPlugin { request )) ) { - // eslint-disable-line no-cond-assign dep = new LocalModuleDependency(localModule, undefined, false); dep.loc = expr.loc; parser.state.current.addDependency(dep); @@ -121,7 +120,6 @@ class AMDDefineDependencyParserPlugin { namedModule )) ) { - // eslint-disable-line no-cond-assign dep = new LocalModuleDependency(localModule, param.range, false); } else { dep = this.newRequireItemDependency(param.string, param.range); diff --git a/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js b/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js index 1173f982e89..e6826722e75 100644 --- a/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js +++ b/lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js @@ -79,7 +79,6 @@ class AMDRequireDependenciesBlockParserPlugin { request )) ) { - // eslint-disable-line no-cond-assign dep = new LocalModuleDependency(localModule, undefined, false); dep.loc = expr.loc; parser.state.current.addDependency(dep); @@ -127,7 +126,6 @@ class AMDRequireDependenciesBlockParserPlugin { param.string )) ) { - // eslint-disable-line no-cond-assign dep = new LocalModuleDependency(localModule, param.range, false); } else { dep = this.newRequireItemDependency(param.string, param.range); diff --git a/lib/node/NodeMainTemplateAsync.runtime.js b/lib/node/NodeMainTemplateAsync.runtime.js index bcdd57dabc6..35eb47b665e 100644 --- a/lib/node/NodeMainTemplateAsync.runtime.js +++ b/lib/node/NodeMainTemplateAsync.runtime.js @@ -37,7 +37,7 @@ module.exports = function() { }); } - //eslint-disable-next-line no-unused-vars + // eslint-disable-next-line no-unused-vars function hotDisposeChunk(chunkId) { delete installedChunks[chunkId]; } diff --git a/lib/util/SetHelpers.js b/lib/util/SetHelpers.js index 8833415f8e0..96c063c7edc 100644 --- a/lib/util/SetHelpers.js +++ b/lib/util/SetHelpers.js @@ -5,7 +5,7 @@ * @param {Set[]} sets an array of sets being checked for shared elements * @returns {Set} returns a new Set containing the intersecting items */ -function intersect(sets) { +const intersect = sets => { if (sets.length === 0) return new Set(); if (sets.length === 1) return new Set(sets[0]); let minSize = Infinity; @@ -28,7 +28,7 @@ function intersect(sets) { } } return current; -} +}; /** * Checks if a set is the subset of another set @@ -36,13 +36,13 @@ function intersect(sets) { * @param {Set} smallSet the set whos elements might be contained inside of bigSet * @returns {boolean} returns true if smallSet contains all elements inside of the bigSet */ -function isSubset(bigSet, smallSet) { +const isSubset = (bigSet, smallSet) => { if (bigSet.size < smallSet.size) return false; for (const item of smallSet) { if (!bigSet.has(item)) return false; } return true; -} +}; exports.intersect = intersect; exports.isSubset = isSubset; diff --git a/lib/wasm/WasmMainTemplatePlugin.js b/lib/wasm/WasmMainTemplatePlugin.js index b946c4e00c8..061087df6ac 100644 --- a/lib/wasm/WasmMainTemplatePlugin.js +++ b/lib/wasm/WasmMainTemplatePlugin.js @@ -10,7 +10,7 @@ const WebAssemblyUtils = require("./WebAssemblyUtils"); /** @typedef {import("../Module")} Module */ // Get all wasm modules -function getAllWasmModules(chunk) { +const getAllWasmModules = chunk => { const wasmModules = chunk.getAllAsyncChunks(); const array = []; for (const chunk of wasmModules) { @@ -22,7 +22,7 @@ function getAllWasmModules(chunk) { } return array; -} +}; /** * generates the import object function for a module @@ -30,7 +30,7 @@ function getAllWasmModules(chunk) { * @param {boolean} mangle mangle imports * @returns {string} source code */ -function generateImportObject(module, mangle) { +const generateImportObject = (module, mangle) => { const waitForInstances = new Map(); const properties = []; const usedWasmDependencies = WebAssemblyUtils.getUsedDependencies( @@ -151,7 +151,7 @@ function generateImportObject(module, mangle) { "}," ]); } -} +}; class WasmMainTemplatePlugin { constructor({ generateLoadBinaryCode, supportsStreaming, mangleImports }) { diff --git a/lib/wasm/WebAssemblyGenerator.js b/lib/wasm/WebAssemblyGenerator.js index d5fb13c4eb7..beafd9c465b 100644 --- a/lib/wasm/WebAssemblyGenerator.js +++ b/lib/wasm/WebAssemblyGenerator.js @@ -32,21 +32,21 @@ const WebAssemblyExportImportedDependency = require("../dependencies/WebAssembly * @param {ArrayBuffer} ab - original binary * @returns {ArrayBufferTransform} transform */ -function preprocess(ab) { +const preprocess = ab => { const optBin = shrinkPaddedLEB128(new Uint8Array(ab)); return optBin.buffer; -} +}; /** * @template T * @param {Function[]} fns transforms * @returns {Function} composed transform */ -function compose(...fns) { +const compose = (...fns) => { return fns.reduce((prevFn, nextFn) => { return value => nextFn(prevFn(value)); }, value => value); -} +}; // TODO replace with @callback @@ -70,7 +70,7 @@ const removeStartFunc = state => bin => { * @param {Object} ast - Module's AST * @returns {Array} - nodes */ -function getImportedGlobals(ast) { +const getImportedGlobals = ast => { const importedGlobals = []; t.traverse(ast, { @@ -82,9 +82,9 @@ function getImportedGlobals(ast) { }); return importedGlobals; -} +}; -function getCountImportedFunc(ast) { +const getCountImportedFunc = ast => { let count = 0; t.traverse(ast, { @@ -96,7 +96,7 @@ function getCountImportedFunc(ast) { }); return count; -} +}; /** * Get next type index @@ -104,7 +104,7 @@ function getCountImportedFunc(ast) { * @param {Object} ast - Module's AST * @returns {t.Index} - index */ -function getNextTypeIndex(ast) { +const getNextTypeIndex = ast => { const typeSectionMetadata = t.getSectionMetadata(ast, "type"); if (typeof typeSectionMetadata === "undefined") { @@ -112,7 +112,7 @@ function getNextTypeIndex(ast) { } return t.indexLiteral(typeSectionMetadata.vectorOfSize.value); -} +}; /** * Get next func index @@ -125,7 +125,7 @@ function getNextTypeIndex(ast) { * @param {Number} countImportedFunc - number of imported funcs * @returns {t.Index} - index */ -function getNextFuncIndex(ast, countImportedFunc) { +const getNextFuncIndex = (ast, countImportedFunc) => { const funcSectionMetadata = t.getSectionMetadata(ast, "func"); if (typeof funcSectionMetadata === "undefined") { @@ -135,7 +135,7 @@ function getNextFuncIndex(ast, countImportedFunc) { const vectorOfSize = funcSectionMetadata.vectorOfSize.value; return t.indexLiteral(vectorOfSize + countImportedFunc); -} +}; /** * Create a init instruction for a global diff --git a/lib/webpack.web.js b/lib/webpack.web.js index 365aa06ad31..1f60eab7f45 100644 --- a/lib/webpack.web.js +++ b/lib/webpack.web.js @@ -9,7 +9,7 @@ const WebEnvironmentPlugin = require("./web/WebEnvironmentPlugin"); const WebpackOptionsApply = require("./WebpackOptionsApply"); const WebpackOptionsDefaulter = require("./WebpackOptionsDefaulter"); -function webpack(options, callback) { +const webpack = (options, callback) => { new WebpackOptionsDefaulter().process(options); const compiler = new Compiler(); @@ -22,7 +22,7 @@ function webpack(options, callback) { compiler.run(callback); } return compiler; -} +}; module.exports = webpack; webpack.WebpackOptionsDefaulter = WebpackOptionsDefaulter; From f6a86d8c6c771c350bde59525e756f7b420a7c55 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 27 Jun 2018 14:02:37 +0200 Subject: [PATCH 108/310] improve test case --- test/configCases/optimization/hashed-module-ids/index.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/configCases/optimization/hashed-module-ids/index.js b/test/configCases/optimization/hashed-module-ids/index.js index 8741cc8173a..93aeb5474b8 100644 --- a/test/configCases/optimization/hashed-module-ids/index.js +++ b/test/configCases/optimization/hashed-module-ids/index.js @@ -1,10 +1,7 @@ -var path = require("path"); - it("should have named modules ids", function() { for (var i = 1; i <= 5; i++) { - var expectedModuleId = "file" + i + ".js"; var moduleId = require("./files/file" + i + ".js"); - expect(path.basename(moduleId)).not.toBe(expectedModuleId); + expect(moduleId).toMatch(/^[/=a-zA-Z0-9]{4,5}$/); } }); From 17fa26c0adab297e3579199080fa8a56b14a5bcd Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 27 Jun 2018 15:47:45 +0200 Subject: [PATCH 109/310] use jest directly --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cc59d3c3caa..d89dedbf7b1 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "scripts": { "setup": "node ./setup/setup.js", "test": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest", - "test:update-snapshots": "yarn test -u", + "test:update-snapshots": "yarn jest -u", "test:integration": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"/test/*.test.js\"", "test:basic": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"/test/{TestCasesNormal,StatsTestCases,ConfigTestCases}.test.js\"", "test:unit": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"/test/*.unittest.js\"", From db63d9fc50f2df939d8ab824e100a19900303d91 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 28 Jun 2018 10:21:25 +0200 Subject: [PATCH 110/310] fixes minor type issue --- lib/Compilation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Compilation.js b/lib/Compilation.js index d03b83d7aaa..f388cf4dc09 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -1444,7 +1444,7 @@ class Compilation extends Tapable { // eachother and Blocks with Chunks. It stops traversing when all modules // for a chunk are already available. So it doesn't connect unneeded chunks. - /** @type {Map} */ + /** @type {Map} */ const chunkDependencies = new Map(); const allCreatedChunkGroups = new Set(); From 5c4ffd5b90400ba245390ba9c0011f5bfd6747f7 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 28 Jun 2018 11:03:08 +0200 Subject: [PATCH 111/310] fix tests and code --- lib/web/JsonpMainTemplatePlugin.js | 4 +- test/ConfigTestCases.test.js | 9 ++- .../crossorigin/set-crossorigin/index.js | 23 ------- .../crossorigin/set-crossorigin/empty.js | 0 .../crossorigin/set-crossorigin/index.js | 67 +++++++++++++++++++ .../set-crossorigin/webpack.config.js | 13 ++++ .../split-chunks/runtime-chunk/a.js | 2 +- .../configCases/web/prefetch-preload/index.js | 4 +- test/helpers/FakeDocument.js | 38 +++++++++++ 9 files changed, 130 insertions(+), 30 deletions(-) delete mode 100644 test/cases/crossorigin/set-crossorigin/index.js rename test/{cases => configCases}/crossorigin/set-crossorigin/empty.js (100%) create mode 100644 test/configCases/crossorigin/set-crossorigin/index.js create mode 100644 test/configCases/crossorigin/set-crossorigin/webpack.config.js diff --git a/lib/web/JsonpMainTemplatePlugin.js b/lib/web/JsonpMainTemplatePlugin.js index 2890f44af45..018d2147b09 100644 --- a/lib/web/JsonpMainTemplatePlugin.js +++ b/lib/web/JsonpMainTemplatePlugin.js @@ -162,7 +162,7 @@ class JsonpMainTemplatePlugin { "script.src = jsonpScriptSrc(chunkId);", crossOriginLoading ? Template.asString([ - "if (script.src.indexOf(window.location.origin)) {", + "if (script.src.indexOf(window.location.origin + '/') !== 0) {", Template.indent( `script.crossOrigin = ${JSON.stringify(crossOriginLoading)};` ), @@ -224,7 +224,7 @@ class JsonpMainTemplatePlugin { "link.href = jsonpScriptSrc(chunkId);", crossOriginLoading ? Template.asString([ - "if (link.href.indexOf(window.location.origin)) {", + "if (link.href.indexOf(window.location.origin + '/') !== 0) {", Template.indent( `link.crossOrigin = ${JSON.stringify(crossOriginLoading)};` ), diff --git a/test/ConfigTestCases.test.js b/test/ConfigTestCases.test.js index 4f3808341bd..4923509f2dd 100644 --- a/test/ConfigTestCases.test.js +++ b/test/ConfigTestCases.test.js @@ -178,7 +178,14 @@ describe("ConfigTestCases", () => { expect: expect, setTimeout: setTimeout, clearTimeout: clearTimeout, - document: new FakeDocument() + document: new FakeDocument(), + location: { + href: "https://test.cases/path/index.html", + origin: "https://test.cases", + toString() { + return "https://test.cases/path/index.html"; + } + } }; function _require(currentDirectory, module) { diff --git a/test/cases/crossorigin/set-crossorigin/index.js b/test/cases/crossorigin/set-crossorigin/index.js deleted file mode 100644 index 07d57cc6f00..00000000000 --- a/test/cases/crossorigin/set-crossorigin/index.js +++ /dev/null @@ -1,23 +0,0 @@ -it("should load script without crossorigin attribute", function(done) { - import("./empty?a" /* webpackChunkName: "chunk-with-crossorigin-attr" */); - // if in browser context, test that crossorigin attribute was not added. - if (typeof document !== 'undefined') { - var script = document.querySelector('script[src="js/chunk-with-crossorigin-attr.web.js"]'); - script.getAttribute('crossorigin').should.be.exactly(null); - } - done(); -}); - -it("should load script with crossorigin attribute 'anonymous'", function(done) { - var originalValue = __webpack_public_path__; - __webpack_public_path__ = 'https://example.com/'; - import("./empty?b" /* webpackChunkName: "chunk-without-crossorigin-attr" */); - __webpack_public_path__ = originalValue; - // if in browser context, test that crossorigin attribute was added. - if (typeof document !== 'undefined') { - var script = document.querySelector('script[src="https://example.com/js/chunk-without-crossorigin-attr.web.js"]'); - script.getAttribute('crossorigin').should.be.exactly('anonymous'); - } - __webpack_public_path__ = originalValue; - done(); -}); diff --git a/test/cases/crossorigin/set-crossorigin/empty.js b/test/configCases/crossorigin/set-crossorigin/empty.js similarity index 100% rename from test/cases/crossorigin/set-crossorigin/empty.js rename to test/configCases/crossorigin/set-crossorigin/empty.js diff --git a/test/configCases/crossorigin/set-crossorigin/index.js b/test/configCases/crossorigin/set-crossorigin/index.js new file mode 100644 index 00000000000..6330978d157 --- /dev/null +++ b/test/configCases/crossorigin/set-crossorigin/index.js @@ -0,0 +1,67 @@ +it("should load script without crossorigin attribute (default)", function() { + const promise = import("./empty?a" /* webpackChunkName: "crossorigin-default" */); + + var script = document.head._children.pop(); + __non_webpack_require__("./crossorigin-default.web.js"); + expect(script.src).toBe("https://test.cases/path/crossorigin-default.web.js"); + expect(script.crossOrigin).toBe(undefined); + + return promise; +}); + +it("should load script without crossorigin attribute (relative)", function() { + var originalValue = __webpack_public_path__; + __webpack_public_path__ = "../"; + const promise = import("./empty?b" /* webpackChunkName: "crossorigin-relative" */); + __webpack_public_path__ = originalValue; + + var script = document.head._children.pop(); + __non_webpack_require__("./crossorigin-relative.web.js"); + expect(script.src).toBe("https://test.cases/crossorigin-relative.web.js"); + expect(script.crossOrigin).toBe(undefined); + + return promise; +}); + +it("should load script without crossorigin attribute (server relative)", function() { + var originalValue = __webpack_public_path__; + __webpack_public_path__ = "/server/"; + const promise = import("./empty?c" /* webpackChunkName: "crossorigin-server-relative" */); + __webpack_public_path__ = originalValue; + + var script = document.head._children.pop(); + __non_webpack_require__("./crossorigin-server-relative.web.js"); + expect(script.src).toBe("https://test.cases/server/crossorigin-server-relative.web.js"); + expect(script.crossOrigin).toBe(undefined); + + return promise; +}); + +it("should load script without crossorigin attribute (same origin)", function() { + var originalValue = __webpack_public_path__; + __webpack_public_path__ = "https://test.cases/"; + const promise = import("./empty?d" /* webpackChunkName: "crossorigin-same-origin" */); + __webpack_public_path__ = originalValue; + + var script = document.head._children.pop(); + __non_webpack_require__("./crossorigin-same-origin.web.js"); + expect(script.src).toBe("https://test.cases/crossorigin-same-origin.web.js"); + expect(script.crossOrigin).toBe(undefined); + + return promise; +}); + +it("should load script with crossorigin attribute anonymous (different origin)", function() { + var originalValue = __webpack_public_path__; + __webpack_public_path__ = "https://example.com/"; + const promise = import("./empty?e" /* webpackChunkName: "crossorigin-different-origin" */); + __webpack_public_path__ = originalValue; + + + var script = document.head._children.pop(); + __non_webpack_require__("./crossorigin-different-origin.web.js"); + expect(script.src).toBe("https://example.com/crossorigin-different-origin.web.js"); + expect(script.crossOrigin).toBe("anonymous"); + + return promise; +}); diff --git a/test/configCases/crossorigin/set-crossorigin/webpack.config.js b/test/configCases/crossorigin/set-crossorigin/webpack.config.js new file mode 100644 index 00000000000..68eeb96a523 --- /dev/null +++ b/test/configCases/crossorigin/set-crossorigin/webpack.config.js @@ -0,0 +1,13 @@ +module.exports = { + target: "web", + output: { + chunkFilename: "[name].web.js", + crossOriginLoading: "anonymous" + }, + performance: { + hints: false + }, + optimization: { + minimize: false + } +}; diff --git a/test/configCases/split-chunks/runtime-chunk/a.js b/test/configCases/split-chunks/runtime-chunk/a.js index e135684891b..fcae9162325 100644 --- a/test/configCases/split-chunks/runtime-chunk/a.js +++ b/test/configCases/split-chunks/runtime-chunk/a.js @@ -2,7 +2,7 @@ it("should be able to load the split chunk on demand", () => { const promise = import(/* webpackChunkName: "shared" */ "./shared"); const script = document.head._children[0]; - expect(script.src).toBe("dep~b~shared.js"); + expect(script.src).toBe("https://test.cases/path/dep~b~shared.js"); __non_webpack_require__("./dep~b~shared.js"); diff --git a/test/configCases/web/prefetch-preload/index.js b/test/configCases/web/prefetch-preload/index.js index 9c0086c7a42..dec98a7ccf4 100644 --- a/test/configCases/web/prefetch-preload/index.js +++ b/test/configCases/web/prefetch-preload/index.js @@ -5,18 +5,16 @@ let oldPublicPath; beforeEach(() => { oldNonce = __webpack_nonce__; oldPublicPath = __webpack_public_path__; - global.location = {origin: "https://example.com"}; }); afterEach(() => { __webpack_nonce__ = oldNonce; __webpack_public_path__ = oldPublicPath; - delete global.location; }); it("should prefetch and preload child chunks on chunk load", () => { __webpack_nonce__ = "nonce"; - __webpack_public_path__ = "/public/path/"; + __webpack_public_path__ = "https://example.com/public/path/"; let link, script; diff --git a/test/helpers/FakeDocument.js b/test/helpers/FakeDocument.js index 0c9d80de06f..680c5157640 100644 --- a/test/helpers/FakeDocument.js +++ b/test/helpers/FakeDocument.js @@ -20,6 +20,8 @@ class FakeElement { this._type = type; this._children = []; this._attributes = Object.create(null); + this._src = undefined; + this._href = undefined; } appendChild(node) { @@ -33,4 +35,40 @@ class FakeElement { getAttribute(name) { return this._attributes[name]; } + + _toRealUrl(value) { + if (/^\//.test(value)) { + return `https://test.cases${value}`; + } else if (/^\.\.\//.test(value)) { + return `https://test.cases${value.substr(2)}`; + } else if (/^\.\//.test(value)) { + return `https://test.cases/path${value.substr(1)}`; + } else if (/^\w+:\/\//.test(value)) { + return value; + } else if (/^\/\//.test(value)) { + return `https:${value}`; + } else { + return `https://test.cases/path/${value}`; + } + } + + set src(value) { + if (this._type === "script") { + this._src = this._toRealUrl(value); + } + } + + get src() { + return this._src; + } + + set href(value) { + if (this._type === "link") { + this._href = this._toRealUrl(value); + } + } + + get href() { + return this._href; + } } From ef2ec255dd30e216ca6f6f88084229d6b6289410 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 28 Jun 2018 11:17:41 +0200 Subject: [PATCH 112/310] update template.md too --- examples/dll-app-and-vendor/0-vendor/template.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/dll-app-and-vendor/0-vendor/template.md b/examples/dll-app-and-vendor/0-vendor/template.md index e66f844f1ce..358db39d4c7 100644 --- a/examples/dll-app-and-vendor/0-vendor/template.md +++ b/examples/dll-app-and-vendor/0-vendor/template.md @@ -1,10 +1,10 @@ This is the vendor build part. -It's built separately from the app part. The vendors dll is only built when vendors has changed and not while the normal development cycle. +It's built separately from the app part. The vendors dll is only built when the array of vendors has changed and not during the normal development cycle. The DllPlugin in combination with the `output.library` option exposes the internal require function as global variable in the target environment. -A manifest is creates which includes mappings from module names to internal ids. +A manifest is created which includes mappings from module names to internal ids. ### webpack.config.js From 7b7d323c5b9de132d57910e751908c561c0ff514 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 28 Jun 2018 15:20:23 +0200 Subject: [PATCH 113/310] upgrade enhanced-resolve --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 1e39fad1349..d11ca569356 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "ajv": "^6.1.0", "ajv-keywords": "^3.1.0", "chrome-trace-event": "^1.0.0", - "enhanced-resolve": "^4.0.0", + "enhanced-resolve": "^4.1.0", "eslint-scope": "^3.7.1", "json-parse-better-errors": "^1.0.2", "loader-runner": "^2.3.0", diff --git a/yarn.lock b/yarn.lock index 4f12dc3fd51..43aaf9ca7f9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1750,9 +1750,9 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" -enhanced-resolve@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz#e34a6eaa790f62fccd71d93959f56b2b432db10a" +enhanced-resolve@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f" dependencies: graceful-fs "^4.1.2" memory-fs "^0.4.0" From 43563b3afbade93bae91e576ba77423c1444f222 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 28 Jun 2018 17:32:41 +0200 Subject: [PATCH 114/310] hotfix merge issue in watchCases (not in CI) --- test/watchCases/plugins/define-plugin/0/index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/watchCases/plugins/define-plugin/0/index.js b/test/watchCases/plugins/define-plugin/0/index.js index f0b05c51d7c..182e0f038f8 100644 --- a/test/watchCases/plugins/define-plugin/0/index.js +++ b/test/watchCases/plugins/define-plugin/0/index.js @@ -1,15 +1,17 @@ it("should be able to use dynamic defines in watch mode", function() { const module = require("./module"); - module.should.be.eql({ + expect(module).toEqual({ default: WATCH_STEP, - type: "string" + type: "string", + [Symbol.toStringTag]: "Module" }); }); it("should not update a define when dependencies list is missing", function() { const module2 = require("./module2"); - module2.should.be.eql({ + expect(module2).toEqual({ default: "0", - type: "string" + type: "string", + [Symbol.toStringTag]: "Module" }); }); From e3678aa3767aaeb26ebcf5e3028412bbebdb4f9f Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 28 Jun 2018 17:34:17 +0200 Subject: [PATCH 115/310] 4.13.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d11ca569356..c7cde371d4a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.12.2", + "version": "4.13.0", "author": "Tobias Koppers @sokra", "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", From 522b324f615a6ee134a7dea941dd91b9e4946d9c Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 29 Jun 2018 10:03:21 +0200 Subject: [PATCH 116/310] allow emitting to the same filename when hash matches fixes webpack-contrib/mini-css-extract-plugin#190 fixes webpack-contrib/mini-css-extract-plugin#194 --- lib/Compilation.js | 31 +++++++++++++++- test/configCases/wasm/identical/index.js | 13 +++++++ test/configCases/wasm/identical/module.js | 6 ++++ .../configCases/wasm/identical/test.filter.js | 5 +++ test/configCases/wasm/identical/wasm.wat | 10 ++++++ .../wasm/identical/webpack.config.js | 35 +++++++++++++++++++ 6 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 test/configCases/wasm/identical/index.js create mode 100644 test/configCases/wasm/identical/module.js create mode 100644 test/configCases/wasm/identical/test.filter.js create mode 100644 test/configCases/wasm/identical/wasm.wat create mode 100644 test/configCases/wasm/identical/webpack.config.js diff --git a/lib/Compilation.js b/lib/Compilation.js index ea2d08d2244..540b3d39526 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -39,6 +39,7 @@ const GraphHelpers = require("./GraphHelpers"); /** @typedef {import("./Module")} Module */ /** @typedef {import("./DependenciesBlock")} DependenciesBlock */ /** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */ +/** @typedef {import("webpack-sources").Source} Source */ const byId = (a, b) => { if (a.id < b.id) return -1; @@ -1869,6 +1870,8 @@ class Compilation extends Tapable { createChunkAssets() { const outputOptions = this.outputOptions; const cachedSourceMap = new Map(); + /** @type {Map} */ + const alreadyWrittenFiles = new Map(); for (let i = 0; i < this.chunks.length; i++) { const chunk = this.chunks[i]; chunk.files = []; @@ -1891,6 +1894,28 @@ class Compilation extends Tapable { const cacheName = fileManifest.identifier; const usedHash = fileManifest.hash; filenameTemplate = fileManifest.filenameTemplate; + file = this.getPath(filenameTemplate, fileManifest.pathOptions); + + // check if the same filename was already written by another chunk + const alreadyWritten = alreadyWrittenFiles.get(file); + if (alreadyWritten !== undefined) { + if (alreadyWritten.hash === usedHash) { + if (this.cache) { + this.cache[cacheName] = { + hash: usedHash, + source: alreadyWritten.source + }; + } + chunk.files.push(file); + this.hooks.chunkAsset.call(chunk, file); + continue; + } else { + throw new Error( + `Conflict: Multiple chunks emit assets to the same filename ${file}` + + ` (chunks ${alreadyWritten.chunk.id} and ${chunk.id})` + ); + } + } if ( this.cache && this.cache[cacheName] && @@ -1917,7 +1942,6 @@ class Compilation extends Tapable { }; } } - file = this.getPath(filenameTemplate, fileManifest.pathOptions); if (this.assets[file] && this.assets[file] !== source) { throw new Error( `Conflict: Multiple assets emit to the same filename ${file}` @@ -1926,6 +1950,11 @@ class Compilation extends Tapable { this.assets[file] = source; chunk.files.push(file); this.hooks.chunkAsset.call(chunk, file); + alreadyWrittenFiles.set(file, { + hash: usedHash, + source, + chunk + }); } } catch (err) { this.errors.push( diff --git a/test/configCases/wasm/identical/index.js b/test/configCases/wasm/identical/index.js new file mode 100644 index 00000000000..178e4d2b979 --- /dev/null +++ b/test/configCases/wasm/identical/index.js @@ -0,0 +1,13 @@ +it("should allow reference the same wasm multiple times", function() { + return import("./module").then(function(module) { + const result = module.run(); + expect(result).toEqual(84); + }); +}); + +it("should allow reference the same wasm multiple times (other chunk)", function() { + return import("./module?2").then(function(module) { + const result = module.run(); + expect(result).toEqual(84); + }); +}); diff --git a/test/configCases/wasm/identical/module.js b/test/configCases/wasm/identical/module.js new file mode 100644 index 00000000000..14eb8ae2f07 --- /dev/null +++ b/test/configCases/wasm/identical/module.js @@ -0,0 +1,6 @@ +import { getNumber } from "./wasm.wat?1"; +import { getNumber as getNumber2 } from "./wasm.wat?2"; + +export function run() { + return getNumber() + getNumber2(); +}; diff --git a/test/configCases/wasm/identical/test.filter.js b/test/configCases/wasm/identical/test.filter.js new file mode 100644 index 00000000000..23177349638 --- /dev/null +++ b/test/configCases/wasm/identical/test.filter.js @@ -0,0 +1,5 @@ +var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); + +module.exports = function(config) { + return supportsWebAssembly(); +}; diff --git a/test/configCases/wasm/identical/wasm.wat b/test/configCases/wasm/identical/wasm.wat new file mode 100644 index 00000000000..3a135271020 --- /dev/null +++ b/test/configCases/wasm/identical/wasm.wat @@ -0,0 +1,10 @@ +(module + (type $t0 (func (param i32 i32) (result i32))) + (type $t1 (func (result i32))) + (func $add (export "add") (type $t0) (param $p0 i32) (param $p1 i32) (result i32) + (i32.add + (get_local $p0) + (get_local $p1))) + (func $getNumber (export "getNumber") (type $t1) (result i32) + (i32.const 42))) + diff --git a/test/configCases/wasm/identical/webpack.config.js b/test/configCases/wasm/identical/webpack.config.js new file mode 100644 index 00000000000..2081ec1207c --- /dev/null +++ b/test/configCases/wasm/identical/webpack.config.js @@ -0,0 +1,35 @@ +const { CachedSource } = require("webpack-sources"); + +/** @typedef {import("../../../lib/Compilation")} Compilation */ + +module.exports = { + module: { + rules: [ + { + test: /\.wat$/, + loader: "wast-loader", + type: "webassembly/experimental" + } + ] + }, + plugins: [ + function() { + this.hooks.compilation.tap( + "Test", + /** + * @param {Compilation} compilation Compilation + * @returns {void} + */ + compilation => { + compilation.moduleTemplates.webassembly.hooks.package.tap( + "Test", + source => { + // this is important to make each returned value a new instance + return new CachedSource(source); + } + ); + } + ); + } + ] +}; From 190cf7b017c9d4106c83553a1de652e53452b095 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 29 Jun 2018 14:12:45 +0200 Subject: [PATCH 117/310] 4.14.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c7cde371d4a..b5f51816b6b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.13.0", + "version": "4.14.0", "author": "Tobias Koppers @sokra", "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", From 949df5bb5a679e91a28f5c7eef2e49e17c664ba4 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 29 Jun 2018 19:12:33 +0200 Subject: [PATCH 118/310] update webpack-sources types and remove second argument --- lib/DependenciesBlockVariable.js | 2 +- lib/JavascriptGenerator.js | 2 +- lib/optimize/ConcatenatedModule.js | 2 +- yarn.lock | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/DependenciesBlockVariable.js b/lib/DependenciesBlockVariable.js index a1a24d184d7..c4ed9162700 100644 --- a/lib/DependenciesBlockVariable.js +++ b/lib/DependenciesBlockVariable.js @@ -44,7 +44,7 @@ class DependenciesBlockVariable { * @returns {ReplaceSource} returns constructed source for expression via templates */ expressionSource(dependencyTemplates, runtimeTemplate) { - const source = new ReplaceSource(new RawSource(this.expression), null); + const source = new ReplaceSource(new RawSource(this.expression)); for (const dep of this.dependencies) { const template = dependencyTemplates.get(dep.constructor); if (!template) { diff --git a/lib/JavascriptGenerator.js b/lib/JavascriptGenerator.js index 57197e41975..882f7d4d4a6 100644 --- a/lib/JavascriptGenerator.js +++ b/lib/JavascriptGenerator.js @@ -18,7 +18,7 @@ class JavascriptGenerator { return new RawSource("throw new Error('No source available');"); } - const source = new ReplaceSource(originalSource, null); + const source = new ReplaceSource(originalSource); this.sourceBlock( module, diff --git a/lib/optimize/ConcatenatedModule.js b/lib/optimize/ConcatenatedModule.js index 05f06b501b7..254ae090f6d 100644 --- a/lib/optimize/ConcatenatedModule.js +++ b/lib/optimize/ConcatenatedModule.js @@ -682,7 +682,7 @@ class ConcatenatedModule extends Module { }); const globalScope = scopeManager.acquire(ast); const moduleScope = globalScope.childScopes[0]; - const resultSource = new ReplaceSource(source, null); + const resultSource = new ReplaceSource(source); info.ast = ast; info.internalSource = source; info.source = resultSource; diff --git a/yarn.lock b/yarn.lock index 128195fd789..69909238eeb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -27,8 +27,8 @@ "@types/babel-types" "*" "@types/node@*": - version "10.0.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.0.8.tgz#37b4d91d4e958e4c2ba0be2b86e7ed4ff19b0858" + version "10.5.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.5.1.tgz#d578446f4abff5c0b49ade9b4e5274f6badaadfc" "@types/node@^9.6.4": version "9.6.15" @@ -43,8 +43,8 @@ resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.2.tgz#e13182e1b69871a422d7863e11a4a6f5b814a4bd" "@types/webpack-sources@^0.1.4": - version "0.1.4" - resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-0.1.4.tgz#a52f1cec41e4d24b3df0bf87e8a538945f6d493f" + version "0.1.5" + resolved "https://registry.yarnpkg.com/@types/webpack-sources/-/webpack-sources-0.1.5.tgz#be47c10f783d3d6efe1471ff7f042611bd464a92" dependencies: "@types/node" "*" "@types/source-list-map" "*" From cb553050c304d344ae88643ef58c68b42fc963c1 Mon Sep 17 00:00:00 2001 From: reduckted Date: Sat, 30 Jun 2018 17:54:47 +1000 Subject: [PATCH 119/310] Catch errors while parsing DLL manifest If the DLL manifest is blank or malformed, parsing it will throw an error, and if left uncaught will kill the process if webpack is in watch mode. Catching the error and adding it to the compilation's errors will result in a failed compilation, but will keep the process running while in watch mode. --- lib/DllReferencePlugin.js | 40 +++++++++++++++++-- .../__snapshots__/StatsTestCases.test.js.snap | 23 +++++++++++ .../blank-manifest.json | 0 .../entry.js | 1 + .../webpack.config.js | 15 +++++++ .../dll-reference-plugin-issue-7624/entry.js | 1 + .../non-blank-manifest.json | 11 +++++ .../webpack.config.js | 15 +++++++ 8 files changed, 103 insertions(+), 3 deletions(-) create mode 100644 test/statsCases/dll-reference-plugin-issue-7624-error/blank-manifest.json create mode 100644 test/statsCases/dll-reference-plugin-issue-7624-error/entry.js create mode 100644 test/statsCases/dll-reference-plugin-issue-7624-error/webpack.config.js create mode 100644 test/statsCases/dll-reference-plugin-issue-7624/entry.js create mode 100644 test/statsCases/dll-reference-plugin-issue-7624/non-blank-manifest.json create mode 100644 test/statsCases/dll-reference-plugin-issue-7624/webpack.config.js diff --git a/lib/DllReferencePlugin.js b/lib/DllReferencePlugin.js index b8cf3013be3..d7ea58f079e 100644 --- a/lib/DllReferencePlugin.js +++ b/lib/DllReferencePlugin.js @@ -10,6 +10,7 @@ const DelegatedModuleFactoryPlugin = require("./DelegatedModuleFactoryPlugin"); const ExternalModuleFactoryPlugin = require("./ExternalModuleFactoryPlugin"); const DelegatedExportsDependency = require("./dependencies/DelegatedExportsDependency"); const NullFactory = require("./NullFactory"); +const makePathsRelative = require("./util/identifier").makePathsRelative; const validateOptions = require("schema-utils"); const schema = require("../schemas/plugins/DllReferencePlugin.json"); @@ -43,9 +44,21 @@ class DllReferencePlugin { params.compilationDependencies.add(manifest); compiler.inputFileSystem.readFile(manifest, (err, result) => { if (err) return callback(err); - params["dll reference " + manifest] = parseJson( - result.toString("utf-8") - ); + // Catch errors parsing the manifest so that blank + // or malformed manifest files don't kill the process. + try { + params["dll reference " + manifest] = parseJson( + result.toString("utf-8") + ); + } catch (e) { + // Store the error in the params so that it can + // be added as a compilation error later on. + const manifestPath = this.options.context + ? makePathsRelative(this.options.context, manifest) + : manifest; + e.message = `Dll manifest ${manifestPath}\n${e.message}`; + params["dll reference parse error " + manifest] = e; + } return callback(); }); } else { @@ -57,6 +70,12 @@ class DllReferencePlugin { compiler.hooks.compile.tap("DllReferencePlugin", params => { let manifest = this.options.manifest; if (typeof manifest === "string") { + // If there was an error parsing the manifest + // file, exit now because the error will be added + // as a compilation error in the "compilation" hook. + if (params["dll reference parse error " + manifest]) { + return; + } manifest = params["dll reference " + manifest]; } const name = this.options.name || manifest.name; @@ -78,6 +97,21 @@ class DllReferencePlugin { extensions: this.options.extensions }).apply(normalModuleFactory); }); + + compiler.hooks.compilation.tap( + "DllReferencePlugin", + (compilation, params) => { + let manifest = this.options.manifest; + if (typeof manifest === "string") { + // If there was an error parsing the manifest file, add the + // error as a compilation error to make the compilation fail. + let e = params["dll reference parse error " + manifest]; + if (e) { + compilation.errors.push(e); + } + } + } + ); } } diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index 0dfae7d176a..b0c48a4a925 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -720,6 +720,29 @@ Child [0] ./index.js 24 bytes {0} [built]" `; +exports[`StatsTestCases should print correct stats for dll-reference-plugin-issue-7624 1`] = ` +"Hash: 29b62432962bce4c54c0 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +bundle.js 3.6 KiB 0 [emitted] main +Entrypoint main = bundle.js +[0] ./entry.js 29 bytes {0} [built]" +`; + +exports[`StatsTestCases should print correct stats for dll-reference-plugin-issue-7624-error 1`] = ` +"Hash: db465df0da5d95ebf88f +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names +bundle.js 3.6 KiB 0 main +Entrypoint main = bundle.js +[0] ./entry.js 29 bytes {0} [built] + +ERROR in Dll manifest Xdir/dll-reference-plugin-issue-7624-error/blank-manifest.json +Unexpected end of JSON input while parsing near ''" +`; + exports[`StatsTestCases should print correct stats for exclude-with-loader 1`] = ` "Hash: 52eadc5de721f000106b Time: Xms diff --git a/test/statsCases/dll-reference-plugin-issue-7624-error/blank-manifest.json b/test/statsCases/dll-reference-plugin-issue-7624-error/blank-manifest.json new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/statsCases/dll-reference-plugin-issue-7624-error/entry.js b/test/statsCases/dll-reference-plugin-issue-7624-error/entry.js new file mode 100644 index 00000000000..7215576fcc1 --- /dev/null +++ b/test/statsCases/dll-reference-plugin-issue-7624-error/entry.js @@ -0,0 +1 @@ +// Intentionally left blank. diff --git a/test/statsCases/dll-reference-plugin-issue-7624-error/webpack.config.js b/test/statsCases/dll-reference-plugin-issue-7624-error/webpack.config.js new file mode 100644 index 00000000000..aa0403c269b --- /dev/null +++ b/test/statsCases/dll-reference-plugin-issue-7624-error/webpack.config.js @@ -0,0 +1,15 @@ +var webpack = require("../../../"); + +module.exports = { + mode: "production", + entry: "./entry.js", + output: { + filename: "bundle.js" + }, + plugins: [ + new webpack.DllReferencePlugin({ + manifest: __dirname + "/blank-manifest.json", + name: "blank-manifest" + }) + ] +}; diff --git a/test/statsCases/dll-reference-plugin-issue-7624/entry.js b/test/statsCases/dll-reference-plugin-issue-7624/entry.js new file mode 100644 index 00000000000..7215576fcc1 --- /dev/null +++ b/test/statsCases/dll-reference-plugin-issue-7624/entry.js @@ -0,0 +1 @@ +// Intentionally left blank. diff --git a/test/statsCases/dll-reference-plugin-issue-7624/non-blank-manifest.json b/test/statsCases/dll-reference-plugin-issue-7624/non-blank-manifest.json new file mode 100644 index 00000000000..6f0100bea85 --- /dev/null +++ b/test/statsCases/dll-reference-plugin-issue-7624/non-blank-manifest.json @@ -0,0 +1,11 @@ +{ + "name": "foo", + "content": { + "./foo.js": { + "id": 0, + "buildMeta": { + "providedExports": true + } + } + } +} diff --git a/test/statsCases/dll-reference-plugin-issue-7624/webpack.config.js b/test/statsCases/dll-reference-plugin-issue-7624/webpack.config.js new file mode 100644 index 00000000000..cfd2bfe9301 --- /dev/null +++ b/test/statsCases/dll-reference-plugin-issue-7624/webpack.config.js @@ -0,0 +1,15 @@ +var webpack = require("../../../"); + +module.exports = { + mode: "production", + entry: "./entry.js", + output: { + filename: "bundle.js" + }, + plugins: [ + new webpack.DllReferencePlugin({ + manifest: __dirname + "/non-blank-manifest.json", + name: "non-blank-manifest" + }) + ] +}; From e0ad09e12e2993d93295bb0334fb0d16b146cd73 Mon Sep 17 00:00:00 2001 From: Sven SAULEAU Date: Sat, 30 Jun 2018 16:48:18 +0200 Subject: [PATCH 120/310] chore: bump webassemblyjs --- package.json | 10 +-- yarn.lock | 200 +++++++++++++++++++++++++-------------------------- 2 files changed, 105 insertions(+), 105 deletions(-) diff --git a/package.json b/package.json index b5f51816b6b..811e6769809 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,11 @@ "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.5.12", - "@webassemblyjs/helper-module-context": "1.5.12", - "@webassemblyjs/wasm-edit": "1.5.12", - "@webassemblyjs/wasm-opt": "1.5.12", - "@webassemblyjs/wasm-parser": "1.5.12", + "@webassemblyjs/ast": "1.5.13", + "@webassemblyjs/helper-module-context": "1.5.13", + "@webassemblyjs/wasm-edit": "1.5.13", + "@webassemblyjs/wasm-opt": "1.5.13", + "@webassemblyjs/wasm-parser": "1.5.13", "acorn": "^5.6.2", "acorn-dynamic-import": "^3.0.0", "ajv": "^6.1.0", diff --git a/yarn.lock b/yarn.lock index 43aaf9ca7f9..6a8db366f61 100644 --- a/yarn.lock +++ b/yarn.lock @@ -34,140 +34,140 @@ version "1.0.2" resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.2.tgz#e13182e1b69871a422d7863e11a4a6f5b814a4bd" -"@webassemblyjs/ast@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.5.12.tgz#a9acbcb3f25333c4edfa1fdf3186b1ccf64e6664" +"@webassemblyjs/ast@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.5.13.tgz#81155a570bd5803a30ec31436bc2c9c0ede38f25" dependencies: - "@webassemblyjs/helper-module-context" "1.5.12" - "@webassemblyjs/helper-wasm-bytecode" "1.5.12" - "@webassemblyjs/wast-parser" "1.5.12" + "@webassemblyjs/helper-module-context" "1.5.13" + "@webassemblyjs/helper-wasm-bytecode" "1.5.13" + "@webassemblyjs/wast-parser" "1.5.13" debug "^3.1.0" mamacro "^0.0.3" -"@webassemblyjs/floating-point-hex-parser@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.5.12.tgz#0f36044ffe9652468ce7ae5a08716a4eeff9cd9c" +"@webassemblyjs/floating-point-hex-parser@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.5.13.tgz#29ce0baa97411f70e8cce68ce9c0f9d819a4e298" -"@webassemblyjs/helper-api-error@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.5.12.tgz#05466833ff2f9d8953a1a327746e1d112ea62aaf" +"@webassemblyjs/helper-api-error@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.5.13.tgz#e49b051d67ee19a56e29b9aa8bd949b5b4442a59" -"@webassemblyjs/helper-buffer@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.5.12.tgz#1f0de5aaabefef89aec314f7f970009cd159c73d" +"@webassemblyjs/helper-buffer@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.5.13.tgz#873bb0a1b46449231137c1262ddfd05695195a1e" dependencies: debug "^3.1.0" -"@webassemblyjs/helper-code-frame@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.5.12.tgz#3cdc1953093760d1c0f0caf745ccd62bdb6627c7" +"@webassemblyjs/helper-code-frame@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.5.13.tgz#1bd2181b6a0be14e004f0fe9f5a660d265362b58" dependencies: - "@webassemblyjs/wast-printer" "1.5.12" + "@webassemblyjs/wast-printer" "1.5.13" -"@webassemblyjs/helper-fsm@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.5.12.tgz#6bc1442b037f8e30f2e57b987cee5c806dd15027" +"@webassemblyjs/helper-fsm@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.5.13.tgz#cdf3d9d33005d543a5c5e5adaabf679ffa8db924" -"@webassemblyjs/helper-module-context@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.5.12.tgz#b5588ca78b33b8a0da75f9ab8c769a3707baa861" +"@webassemblyjs/helper-module-context@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.5.13.tgz#dc29ddfb51ed657655286f94a5d72d8a489147c5" dependencies: debug "^3.1.0" mamacro "^0.0.3" -"@webassemblyjs/helper-wasm-bytecode@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.5.12.tgz#d12a3859db882a448891a866a05d0be63785b616" +"@webassemblyjs/helper-wasm-bytecode@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.5.13.tgz#03245817f0a762382e61733146f5773def15a747" -"@webassemblyjs/helper-wasm-section@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.5.12.tgz#ff9fe1507d368ad437e7969d25e8c1693dac1884" +"@webassemblyjs/helper-wasm-section@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.5.13.tgz#efc76f44a10d3073b584b43c38a179df173d5c7d" dependencies: - "@webassemblyjs/ast" "1.5.12" - "@webassemblyjs/helper-buffer" "1.5.12" - "@webassemblyjs/helper-wasm-bytecode" "1.5.12" - "@webassemblyjs/wasm-gen" "1.5.12" + "@webassemblyjs/ast" "1.5.13" + "@webassemblyjs/helper-buffer" "1.5.13" + "@webassemblyjs/helper-wasm-bytecode" "1.5.13" + "@webassemblyjs/wasm-gen" "1.5.13" debug "^3.1.0" -"@webassemblyjs/ieee754@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.5.12.tgz#ee9574bc558888f13097ce3e7900dff234ea19a4" +"@webassemblyjs/ieee754@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.5.13.tgz#573e97c8c12e4eebb316ca5fde0203ddd90b0364" dependencies: ieee754 "^1.1.11" -"@webassemblyjs/leb128@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.5.12.tgz#0308eec652765ee567d8a5fa108b4f0b25b458e1" +"@webassemblyjs/leb128@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.5.13.tgz#ab52ebab9cec283c1c1897ac1da833a04a3f4cee" dependencies: - leb "^0.3.0" + long "4.0.0" -"@webassemblyjs/utf8@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.5.12.tgz#d5916222ef314bf60d6806ed5ac045989bfd92ce" +"@webassemblyjs/utf8@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.5.13.tgz#6b53d2cd861cf94fa99c1f12779dde692fbc2469" -"@webassemblyjs/wasm-edit@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.5.12.tgz#821c9358e644a166f2c910e5af1b46ce795a17aa" +"@webassemblyjs/wasm-edit@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.5.13.tgz#c9cef5664c245cf11b3b3a73110c9155831724a8" dependencies: - "@webassemblyjs/ast" "1.5.12" - "@webassemblyjs/helper-buffer" "1.5.12" - "@webassemblyjs/helper-wasm-bytecode" "1.5.12" - "@webassemblyjs/helper-wasm-section" "1.5.12" - "@webassemblyjs/wasm-gen" "1.5.12" - "@webassemblyjs/wasm-opt" "1.5.12" - "@webassemblyjs/wasm-parser" "1.5.12" - "@webassemblyjs/wast-printer" "1.5.12" + "@webassemblyjs/ast" "1.5.13" + "@webassemblyjs/helper-buffer" "1.5.13" + "@webassemblyjs/helper-wasm-bytecode" "1.5.13" + "@webassemblyjs/helper-wasm-section" "1.5.13" + "@webassemblyjs/wasm-gen" "1.5.13" + "@webassemblyjs/wasm-opt" "1.5.13" + "@webassemblyjs/wasm-parser" "1.5.13" + "@webassemblyjs/wast-printer" "1.5.13" debug "^3.1.0" -"@webassemblyjs/wasm-gen@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.5.12.tgz#0b7ccfdb93dab902cc0251014e2e18bae3139bcb" +"@webassemblyjs/wasm-gen@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.5.13.tgz#8e6ea113c4b432fa66540189e79b16d7a140700e" dependencies: - "@webassemblyjs/ast" "1.5.12" - "@webassemblyjs/helper-wasm-bytecode" "1.5.12" - "@webassemblyjs/ieee754" "1.5.12" - "@webassemblyjs/leb128" "1.5.12" - "@webassemblyjs/utf8" "1.5.12" + "@webassemblyjs/ast" "1.5.13" + "@webassemblyjs/helper-wasm-bytecode" "1.5.13" + "@webassemblyjs/ieee754" "1.5.13" + "@webassemblyjs/leb128" "1.5.13" + "@webassemblyjs/utf8" "1.5.13" -"@webassemblyjs/wasm-opt@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.5.12.tgz#bd758a8bc670f585ff1ae85f84095a9e0229cbc9" +"@webassemblyjs/wasm-opt@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.5.13.tgz#147aad7717a7ee4211c36b21a5f4c30dddf33138" dependencies: - "@webassemblyjs/ast" "1.5.12" - "@webassemblyjs/helper-buffer" "1.5.12" - "@webassemblyjs/wasm-gen" "1.5.12" - "@webassemblyjs/wasm-parser" "1.5.12" + "@webassemblyjs/ast" "1.5.13" + "@webassemblyjs/helper-buffer" "1.5.13" + "@webassemblyjs/wasm-gen" "1.5.13" + "@webassemblyjs/wasm-parser" "1.5.13" debug "^3.1.0" -"@webassemblyjs/wasm-parser@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.5.12.tgz#7b10b4388ecf98bd7a22e702aa62ec2f46d0c75e" - dependencies: - "@webassemblyjs/ast" "1.5.12" - "@webassemblyjs/helper-api-error" "1.5.12" - "@webassemblyjs/helper-wasm-bytecode" "1.5.12" - "@webassemblyjs/ieee754" "1.5.12" - "@webassemblyjs/leb128" "1.5.12" - "@webassemblyjs/utf8" "1.5.12" - -"@webassemblyjs/wast-parser@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.5.12.tgz#9cf5ae600ecae0640437b5d4de5dd6b6088d0d8b" - dependencies: - "@webassemblyjs/ast" "1.5.12" - "@webassemblyjs/floating-point-hex-parser" "1.5.12" - "@webassemblyjs/helper-api-error" "1.5.12" - "@webassemblyjs/helper-code-frame" "1.5.12" - "@webassemblyjs/helper-fsm" "1.5.12" +"@webassemblyjs/wasm-parser@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.5.13.tgz#6f46516c5bb23904fbdf58009233c2dd8a54c72f" + dependencies: + "@webassemblyjs/ast" "1.5.13" + "@webassemblyjs/helper-api-error" "1.5.13" + "@webassemblyjs/helper-wasm-bytecode" "1.5.13" + "@webassemblyjs/ieee754" "1.5.13" + "@webassemblyjs/leb128" "1.5.13" + "@webassemblyjs/utf8" "1.5.13" + +"@webassemblyjs/wast-parser@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.5.13.tgz#5727a705d397ae6a3ae99d7f5460acf2ec646eea" + dependencies: + "@webassemblyjs/ast" "1.5.13" + "@webassemblyjs/floating-point-hex-parser" "1.5.13" + "@webassemblyjs/helper-api-error" "1.5.13" + "@webassemblyjs/helper-code-frame" "1.5.13" + "@webassemblyjs/helper-fsm" "1.5.13" long "^3.2.0" mamacro "^0.0.3" -"@webassemblyjs/wast-printer@1.5.12": - version "1.5.12" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.5.12.tgz#563ca4d01b22d21640b2463dc5e3d7f7d9dac520" +"@webassemblyjs/wast-printer@1.5.13": + version "1.5.13" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.5.13.tgz#bb34d528c14b4f579e7ec11e793ec50ad7cd7c95" dependencies: - "@webassemblyjs/ast" "1.5.12" - "@webassemblyjs/wast-parser" "1.5.12" + "@webassemblyjs/ast" "1.5.13" + "@webassemblyjs/wast-parser" "1.5.13" long "^3.2.0" abab@^1.0.4: @@ -3849,10 +3849,6 @@ lcov-parse@^1.x: version "1.0.0" resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-1.0.0.tgz#eb0d46b54111ebc561acb4c408ef9363bdc8f7e0" -leb@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/leb/-/leb-0.3.0.tgz#32bee9fad168328d6aea8522d833f4180eed1da3" - left-pad@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" @@ -4059,6 +4055,10 @@ log-update@^1.0.2: ansi-escapes "^1.0.0" cli-cursor "^1.0.2" +long@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" + long@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" From c3eecbd7b8bfcebf44e97deea13c2444f12d2643 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 2 Jul 2018 08:29:22 +0200 Subject: [PATCH 121/310] spacing --- lib/Compilation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Compilation.js b/lib/Compilation.js index a49ef8d374f..0ad96cf3b16 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -223,7 +223,7 @@ class Compilation extends Tapable { "module" ]), - /** @type {SyncHook} */ + /** @type {SyncHook} */ finishModules: new SyncHook(["modules"]), /** @type {SyncHook} */ finishRebuildingModule: new SyncHook(["module"]), From 8f748e266bf587f84c7370484f720936f9be1f94 Mon Sep 17 00:00:00 2001 From: reduckted Date: Mon, 2 Jul 2018 19:58:45 +1000 Subject: [PATCH 122/310] Created a new WebpackError derived class for dll manifest errors. --- lib/DllReferencePlugin.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/DllReferencePlugin.js b/lib/DllReferencePlugin.js index d7ea58f079e..1071ac6e22e 100644 --- a/lib/DllReferencePlugin.js +++ b/lib/DllReferencePlugin.js @@ -11,6 +11,7 @@ const ExternalModuleFactoryPlugin = require("./ExternalModuleFactoryPlugin"); const DelegatedExportsDependency = require("./dependencies/DelegatedExportsDependency"); const NullFactory = require("./NullFactory"); const makePathsRelative = require("./util/identifier").makePathsRelative; +const WebpackError = require("./WebpackError"); const validateOptions = require("schema-utils"); const schema = require("../schemas/plugins/DllReferencePlugin.json"); @@ -56,8 +57,9 @@ class DllReferencePlugin { const manifestPath = this.options.context ? makePathsRelative(this.options.context, manifest) : manifest; - e.message = `Dll manifest ${manifestPath}\n${e.message}`; - params["dll reference parse error " + manifest] = e; + params[ + "dll reference parse error " + manifest + ] = new DllManifestError(manifestPath, e.message); } return callback(); }); @@ -115,4 +117,15 @@ class DllReferencePlugin { } } +class DllManifestError extends WebpackError { + constructor(filename, message) { + super(); + + this.name = "DllManifestError"; + this.message = `Dll manifest ${filename}\n${message}`; + + Error.captureStackTrace(this, this.constructor); + } +} + module.exports = DllReferencePlugin; From 5b6f99b8d40af5f7bb6e3be570e13d8c1d81c9ee Mon Sep 17 00:00:00 2001 From: reduckted Date: Mon, 2 Jul 2018 21:50:30 +1000 Subject: [PATCH 123/310] Used the compiler's context to get a relative path to the manifest file. --- lib/DllReferencePlugin.js | 7 ++++--- test/__snapshots__/StatsTestCases.test.js.snap | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/DllReferencePlugin.js b/lib/DllReferencePlugin.js index 1071ac6e22e..151862e5f19 100644 --- a/lib/DllReferencePlugin.js +++ b/lib/DllReferencePlugin.js @@ -54,9 +54,10 @@ class DllReferencePlugin { } catch (e) { // Store the error in the params so that it can // be added as a compilation error later on. - const manifestPath = this.options.context - ? makePathsRelative(this.options.context, manifest) - : manifest; + const manifestPath = makePathsRelative( + compiler.options.context, + manifest + ); params[ "dll reference parse error " + manifest ] = new DllManifestError(manifestPath, e.message); diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index b0c48a4a925..65c621947a2 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -731,7 +731,7 @@ Entrypoint main = bundle.js `; exports[`StatsTestCases should print correct stats for dll-reference-plugin-issue-7624-error 1`] = ` -"Hash: db465df0da5d95ebf88f +"Hash: 701dcf62b26d0347b899 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -739,7 +739,7 @@ bundle.js 3.6 KiB 0 main Entrypoint main = bundle.js [0] ./entry.js 29 bytes {0} [built] -ERROR in Dll manifest Xdir/dll-reference-plugin-issue-7624-error/blank-manifest.json +ERROR in Dll manifest blank-manifest.json Unexpected end of JSON input while parsing near ''" `; From 1ad71e01f931ca186f1aa5335c4bde41d997ac47 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 2 Jul 2018 16:18:49 +0200 Subject: [PATCH 124/310] add helpful error when importing wasm in initial chunk --- lib/Chunk.js | 2 +- lib/ChunkTemplate.js | 1 + lib/Compilation.js | 8 ++ lib/MainTemplate.js | 5 +- lib/Module.js | 3 + lib/ModuleReason.js | 8 ++ lib/wasm/WasmMainTemplatePlugin.js | 6 ++ lib/wasm/WebAssemblyInInitialChunkError.js | 88 +++++++++++++++++++ lib/wasm/WebAssemblyModulesPlugin.js | 28 ++++++ .../__snapshots__/StatsTestCases.test.js.snap | 36 ++++++++ .../wasm-in-initial-chunk-error/async.js | 0 .../wasm-in-initial-chunk-error/index.js | 1 + .../wasm-in-initial-chunk-error/module.js | 7 ++ .../wasm-in-initial-chunk-error/module2.js | 2 + .../wasm-in-initial-chunk-error/module3.js | 2 + .../wasm-in-initial-chunk-error/wasm.wat | 4 + .../wasm-in-initial-chunk-error/wasm2.wat | 4 + .../webpack.config.js | 12 +++ 18 files changed, 215 insertions(+), 2 deletions(-) create mode 100644 lib/wasm/WebAssemblyInInitialChunkError.js create mode 100644 test/statsCases/wasm-in-initial-chunk-error/async.js create mode 100644 test/statsCases/wasm-in-initial-chunk-error/index.js create mode 100644 test/statsCases/wasm-in-initial-chunk-error/module.js create mode 100644 test/statsCases/wasm-in-initial-chunk-error/module2.js create mode 100644 test/statsCases/wasm-in-initial-chunk-error/module3.js create mode 100644 test/statsCases/wasm-in-initial-chunk-error/wasm.wat create mode 100644 test/statsCases/wasm-in-initial-chunk-error/wasm2.wat create mode 100644 test/statsCases/wasm-in-initial-chunk-error/webpack.config.js diff --git a/lib/Chunk.js b/lib/Chunk.js index 6b66a8bd00f..46cd61d456c 100644 --- a/lib/Chunk.js +++ b/lib/Chunk.js @@ -298,7 +298,7 @@ class Chunk { } /** - * @returns {SortableSet} the chunkGroups that said chunk is referenced in + * @returns {SortableSet} the chunkGroups that said chunk is referenced in */ get groupsIterable() { return this._groups; diff --git a/lib/ChunkTemplate.js b/lib/ChunkTemplate.js index 7eebef8b590..373f43d5d06 100644 --- a/lib/ChunkTemplate.js +++ b/lib/ChunkTemplate.js @@ -26,6 +26,7 @@ module.exports = class ChunkTemplate extends Tapable { super(); this.outputOptions = outputOptions || {}; this.hooks = { + /** @type {SyncWaterfallHook} */ renderManifest: new SyncWaterfallHook(["result", "options"]), modules: new SyncWaterfallHook([ "source", diff --git a/lib/Compilation.js b/lib/Compilation.js index 0ad96cf3b16..3733f02943a 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -232,6 +232,11 @@ class Compilation extends Tapable { /** @type {SyncHook} */ seal: new SyncHook([]), + /** @type {SyncHook} */ + beforeChunks: new SyncHook([]), + /** @type {SyncHook} */ + afterChunks: new SyncHook(["chunks"]), + /** @type {SyncBailHook} */ optimizeDependenciesBasic: new SyncBailHook(["modules"]), /** @type {SyncBailHook} */ @@ -1150,6 +1155,7 @@ class Compilation extends Tapable { } this.hooks.afterOptimizeDependencies.call(this.modules); + this.hooks.beforeChunks.call(); for (const preparedEntrypoint of this._preparedEntrypoints) { const module = preparedEntrypoint.module; const name = preparedEntrypoint.name; @@ -1171,6 +1177,8 @@ class Compilation extends Tapable { } this.processDependenciesBlocksForChunkGroups(this.chunkGroups.slice()); this.sortModules(this.modules); + this.hooks.afterChunks.call(this.chunks); + this.hooks.optimize.call(); while ( diff --git a/lib/MainTemplate.js b/lib/MainTemplate.js index 2fe01ed933c..722fe6af440 100644 --- a/lib/MainTemplate.js +++ b/lib/MainTemplate.js @@ -19,6 +19,7 @@ const { const Template = require("./Template"); /** @typedef {import("webpack-sources").ConcatSource} ConcatSource */ +/** @typedef {import("webpack-sources").Source} Source */ /** @typedef {import("./ModuleTemplate")} ModuleTemplate */ /** @typedef {import("./Chunk")} Chunk */ /** @typedef {import("./Module")} Module} */ @@ -93,7 +94,9 @@ module.exports = class MainTemplate extends Tapable { localVars: new SyncWaterfallHook(["source", "chunk", "hash"]), require: new SyncWaterfallHook(["source", "chunk", "hash"]), requireExtensions: new SyncWaterfallHook(["source", "chunk", "hash"]), + /** @type {SyncWaterfallHook} */ beforeStartup: new SyncWaterfallHook(["source", "chunk", "hash"]), + /** @type {SyncWaterfallHook} */ startup: new SyncWaterfallHook(["source", "chunk", "hash"]), render: new SyncWaterfallHook([ "source", @@ -448,7 +451,7 @@ module.exports = class MainTemplate extends Tapable { /** * * @param {string} hash string hash - * @param {number} length length + * @param {number=} length length * @returns {string} call hook return */ renderCurrentHashCode(hash, length) { diff --git a/lib/Module.js b/lib/Module.js index 86cd81fcaf8..54997b54cb4 100644 --- a/lib/Module.js +++ b/lib/Module.js @@ -182,6 +182,9 @@ class Module extends DependenciesBlock { ); } + /** + * @returns {Chunk[]} all chunks which contain the module + */ getChunks() { return Array.from(this._chunks); } diff --git a/lib/ModuleReason.js b/lib/ModuleReason.js index 239584b6c1e..3697f849502 100644 --- a/lib/ModuleReason.js +++ b/lib/ModuleReason.js @@ -4,7 +4,15 @@ */ "use strict"; +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./Dependency")} Dependency */ + class ModuleReason { + /** + * @param {Module} module the referencing module + * @param {Dependency} dependency the referencing dependency + * @param {string=} explanation some extra detail + */ constructor(module, dependency, explanation) { this.module = module; this.dependency = dependency; diff --git a/lib/wasm/WasmMainTemplatePlugin.js b/lib/wasm/WasmMainTemplatePlugin.js index 061087df6ac..76df8361512 100644 --- a/lib/wasm/WasmMainTemplatePlugin.js +++ b/lib/wasm/WasmMainTemplatePlugin.js @@ -8,6 +8,7 @@ const Template = require("../Template"); const WebAssemblyUtils = require("./WebAssemblyUtils"); /** @typedef {import("../Module")} Module */ +/** @typedef {import("../MainTemplate")} MainTemplate */ // Get all wasm modules const getAllWasmModules = chunk => { @@ -159,6 +160,11 @@ class WasmMainTemplatePlugin { this.supportsStreaming = supportsStreaming; this.mangleImports = mangleImports; } + + /** + * @param {MainTemplate} mainTemplate main template + * @returns {void} + */ apply(mainTemplate) { mainTemplate.hooks.localVars.tap( "WasmMainTemplatePlugin", diff --git a/lib/wasm/WebAssemblyInInitialChunkError.js b/lib/wasm/WebAssemblyInInitialChunkError.js new file mode 100644 index 00000000000..319e757aece --- /dev/null +++ b/lib/wasm/WebAssemblyInInitialChunkError.js @@ -0,0 +1,88 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ +"use strict"; + +const WebpackError = require("../WebpackError"); + +/** @typedef {import("../Module")} Module */ +/** @typedef {import("../RequestShortener")} RequestShortener */ + +/** + * @param {Module} module module to get chains from + * @param {RequestShortener} requestShortener to make readable identifiers + * @returns {string[]} all chains to the module + */ +const getInitialModuleChains = (module, requestShortener) => { + const queue = [ + { head: module, message: module.readableIdentifier(requestShortener) } + ]; + /** @type {Set} */ + const results = new Set(); + /** @type {Set} */ + const incompleteResults = new Set(); + /** @type {Set} */ + const visitedModules = new Set(); + + for (const chain of queue) { + const { head, message } = chain; + let final = true; + /** @type {Set} */ + const alreadyReferencedModules = new Set(); + for (const reason of head.reasons) { + const newHead = reason.module; + if (newHead) { + if (!newHead.getChunks().some(c => c.canBeInitial())) continue; + final = false; + if (alreadyReferencedModules.has(newHead)) continue; + alreadyReferencedModules.add(newHead); + const moduleName = newHead.readableIdentifier(requestShortener); + const detail = reason.explanation ? ` (${reason.explanation})` : ""; + const newMessage = `${moduleName}${detail} --> ${message}`; + if (visitedModules.has(newHead)) { + incompleteResults.add(`... --> ${newMessage}`); + continue; + } + visitedModules.add(newHead); + queue.push({ + head: newHead, + message: newMessage + }); + } else { + final = false; + const newMessage = reason.explanation + ? `(${reason.explanation}) --> ${message}` + : message; + results.add(newMessage); + } + } + if (final) { + results.add(message); + } + } + for (const result of incompleteResults) { + results.add(result); + } + return Array.from(results); +}; + +module.exports = class WebAssemblyInInitialChunkError extends WebpackError { + /** + * @param {Module} module WASM module + * @param {RequestShortener} requestShortener request shortener + */ + constructor(module, requestShortener) { + const moduleChains = getInitialModuleChains(module, requestShortener); + const message = `WebAssembly module is included in initial chunk. +This is not allowed, because WebAssembly download and compilation must happen asynchronous. +Add an async splitpoint (i. e. import()) somewhere between your entrypoint and the WebAssembly module: +${moduleChains.map(s => `* ${s}`).join("\n")}`; + + super(message); + this.name = "WebAssemblyInInitialChunkError"; + this.hideStack = true; + this.module = module; + + Error.captureStackTrace(this, this.constructor); + } +}; diff --git a/lib/wasm/WebAssemblyModulesPlugin.js b/lib/wasm/WebAssemblyModulesPlugin.js index e1ac050c531..ca9bf26bce6 100644 --- a/lib/wasm/WebAssemblyModulesPlugin.js +++ b/lib/wasm/WebAssemblyModulesPlugin.js @@ -10,12 +10,19 @@ const WebAssemblyGenerator = require("./WebAssemblyGenerator"); const WebAssemblyJavascriptGenerator = require("./WebAssemblyJavascriptGenerator"); const WebAssemblyImportDependency = require("../dependencies/WebAssemblyImportDependency"); const WebAssemblyExportImportedDependency = require("../dependencies/WebAssemblyExportImportedDependency"); +const WebAssemblyInInitialChunkError = require("./WebAssemblyInInitialChunkError"); + +/** @typedef {import("../Compiler")} Compiler */ class WebAssemblyModulesPlugin { constructor(options) { this.options = options; } + /** + * @param {Compiler} compiler compiler + * @returns {void} + */ apply(compiler) { compiler.hooks.compilation.tap( "WebAssemblyModulesPlugin", @@ -78,6 +85,27 @@ class WebAssemblyModulesPlugin { return result; } ); + + compilation.hooks.afterChunks.tap("WebAssemblyModulesPlugin", () => { + const initialWasmModules = new Set(); + for (const chunk of compilation.chunks) { + if (chunk.canBeInitial()) { + for (const module of chunk.modulesIterable) { + if (module.type.startsWith("webassembly")) { + initialWasmModules.add(module); + } + } + } + } + for (const module of initialWasmModules) { + compilation.errors.push( + new WebAssemblyInInitialChunkError( + module, + compilation.requestShortener + ) + ); + } + }); } ); } diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index 3808b4ea6a8..288826bfd47 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -2854,3 +2854,39 @@ WARNING in UglifyJs Plugin: Dropping unused function someUnRemoteUsedFunction4 [ WARNING in UglifyJs Plugin: Dropping unused function someUnRemoteUsedFunction5 [./a.js:7,0] in bundle.js" `; + +exports[`StatsTestCases should print correct stats for wasm-in-initial-chunk-error 1`] = ` +"Hash: 9f32353d97d5973caae9 +Time: Xms +Built at: Thu Jan 01 1970 00:00:00 GMT + Asset Size Chunks Chunk Names + 0.js 130 bytes 0 +main.js 9.54 KiB 1 main +Entrypoint main = main.js +[0] ./wasm.wat 42 bytes {1} [built] +[1] ./module2.js 45 bytes {1} [built] +[2] ./module3.js 47 bytes {1} [built] +[3] ./wasm2.wat 42 bytes {1} [built] +[4] ./index.js + 1 modules 124 bytes {1} [built] + | ./index.js 19 bytes [built] + | ./module.js 100 bytes [built] +[5] ./async.js 0 bytes {0} [built] + +WARNING in configuration +The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment. +You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/ + +ERROR in ./wasm2.wat +WebAssembly module is included in initial chunk. +This is not allowed, because WebAssembly download and compilation must happen asynchronous. +Add an async splitpoint (i. e. import()) somewhere between your entrypoint and the WebAssembly module: +* ./index.js --> ./module.js --> ./module2.js --> ./module3.js --> ./wasm2.wat + +ERROR in ./wasm.wat +WebAssembly module is included in initial chunk. +This is not allowed, because WebAssembly download and compilation must happen asynchronous. +Add an async splitpoint (i. e. import()) somewhere between your entrypoint and the WebAssembly module: +* ./index.js --> ./module.js --> ./wasm.wat +* ... --> ./module.js --> ./module2.js --> ./wasm.wat +* ... --> ./module2.js --> ./module3.js --> ./wasm.wat" +`; diff --git a/test/statsCases/wasm-in-initial-chunk-error/async.js b/test/statsCases/wasm-in-initial-chunk-error/async.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/statsCases/wasm-in-initial-chunk-error/index.js b/test/statsCases/wasm-in-initial-chunk-error/index.js new file mode 100644 index 00000000000..78b4fb26bba --- /dev/null +++ b/test/statsCases/wasm-in-initial-chunk-error/index.js @@ -0,0 +1 @@ +import "./module"; diff --git a/test/statsCases/wasm-in-initial-chunk-error/module.js b/test/statsCases/wasm-in-initial-chunk-error/module.js new file mode 100644 index 00000000000..8f207aeccd7 --- /dev/null +++ b/test/statsCases/wasm-in-initial-chunk-error/module.js @@ -0,0 +1,7 @@ +import { getNumber } from "./wasm.wat"; + +import("./async.js"); + +require("./module2"); + +getNumber(); diff --git a/test/statsCases/wasm-in-initial-chunk-error/module2.js b/test/statsCases/wasm-in-initial-chunk-error/module2.js new file mode 100644 index 00000000000..becf9480ced --- /dev/null +++ b/test/statsCases/wasm-in-initial-chunk-error/module2.js @@ -0,0 +1,2 @@ +require("./wasm.wat"); +require("./module3"); diff --git a/test/statsCases/wasm-in-initial-chunk-error/module3.js b/test/statsCases/wasm-in-initial-chunk-error/module3.js new file mode 100644 index 00000000000..8974b1b8d2c --- /dev/null +++ b/test/statsCases/wasm-in-initial-chunk-error/module3.js @@ -0,0 +1,2 @@ +require("./wasm.wat"); +require("./wasm2.wat"); diff --git a/test/statsCases/wasm-in-initial-chunk-error/wasm.wat b/test/statsCases/wasm-in-initial-chunk-error/wasm.wat new file mode 100644 index 00000000000..d8081e18c3b --- /dev/null +++ b/test/statsCases/wasm-in-initial-chunk-error/wasm.wat @@ -0,0 +1,4 @@ +(module + (func $getNumber (export "getNumber") (result i32) + (i32.const 42))) + diff --git a/test/statsCases/wasm-in-initial-chunk-error/wasm2.wat b/test/statsCases/wasm-in-initial-chunk-error/wasm2.wat new file mode 100644 index 00000000000..d8081e18c3b --- /dev/null +++ b/test/statsCases/wasm-in-initial-chunk-error/wasm2.wat @@ -0,0 +1,4 @@ +(module + (func $getNumber (export "getNumber") (result i32) + (i32.const 42))) + diff --git a/test/statsCases/wasm-in-initial-chunk-error/webpack.config.js b/test/statsCases/wasm-in-initial-chunk-error/webpack.config.js new file mode 100644 index 00000000000..c673c27b334 --- /dev/null +++ b/test/statsCases/wasm-in-initial-chunk-error/webpack.config.js @@ -0,0 +1,12 @@ +module.exports = { + entry: "./index", + module: { + rules: [ + { + test: /\.wat$/, + loader: "wast-loader", + type: "webassembly/experimental" + } + ] + } +}; From 5b30edebfcbb12ec78168061502cb2d618bf01ae Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 2 Jul 2018 17:44:47 +0200 Subject: [PATCH 125/310] allow filtering of tests in statsCases --- test/StatsTestCases.test.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/StatsTestCases.test.js b/test/StatsTestCases.test.js index 6ab8049d6d0..0bc804ecdf6 100644 --- a/test/StatsTestCases.test.js +++ b/test/StatsTestCases.test.js @@ -15,7 +15,16 @@ const tests = fs testName => fs.existsSync(path.join(base, testName, "index.js")) || fs.existsSync(path.join(base, testName, "webpack.config.js")) - ); + ) + .filter(testName => { + const testDirectory = path.join(base, testName); + const filterPath = path.join(testDirectory, "test.filter.js"); + if (fs.existsSync(filterPath) && !require(filterPath)()) { + describe.skip(testName, () => it("filtered")); + return false; + } + return true; + }); describe("StatsTestCases", () => { tests.forEach(testName => { From a39d6b0a6dc80561cd8a8b30420b594046adb0fc Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 2 Jul 2018 17:45:07 +0200 Subject: [PATCH 126/310] check for wasm support in test case --- test/statsCases/wasm-in-initial-chunk-error/test.filter.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 test/statsCases/wasm-in-initial-chunk-error/test.filter.js diff --git a/test/statsCases/wasm-in-initial-chunk-error/test.filter.js b/test/statsCases/wasm-in-initial-chunk-error/test.filter.js new file mode 100644 index 00000000000..370f3849cb1 --- /dev/null +++ b/test/statsCases/wasm-in-initial-chunk-error/test.filter.js @@ -0,0 +1,5 @@ +var supportsWebAssembly = require("../../helpers/supportsWebAssembly"); + +module.exports = function() { + return supportsWebAssembly(); +}; From 0bb917bf3fc62dd461300ca69ea79c33cbcfd3eb Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 2 Jul 2018 19:05:03 +0200 Subject: [PATCH 127/310] convert to a config test cases --- .../__snapshots__/StatsTestCases.test.js.snap | 36 ------------------- .../wasm-in-initial-chunk-error/async.js | 0 .../wasm-in-initial-chunk-error/errors.js | 14 ++++++++ .../wasm-in-initial-chunk-error/index.js | 0 .../wasm-in-initial-chunk-error/module.js | 0 .../wasm-in-initial-chunk-error/module2.js | 0 .../wasm-in-initial-chunk-error/module3.js | 0 .../test.filter.js | 5 +++ .../wasm-in-initial-chunk-error/wasm.wat | 0 .../wasm-in-initial-chunk-error/wasm2.wat | 0 .../webpack.config.js | 0 .../test.filter.js | 5 --- 12 files changed, 19 insertions(+), 41 deletions(-) rename test/{statsCases => configCases/wasm}/wasm-in-initial-chunk-error/async.js (100%) create mode 100644 test/configCases/wasm/wasm-in-initial-chunk-error/errors.js rename test/{statsCases => configCases/wasm}/wasm-in-initial-chunk-error/index.js (100%) rename test/{statsCases => configCases/wasm}/wasm-in-initial-chunk-error/module.js (100%) rename test/{statsCases => configCases/wasm}/wasm-in-initial-chunk-error/module2.js (100%) rename test/{statsCases => configCases/wasm}/wasm-in-initial-chunk-error/module3.js (100%) create mode 100644 test/configCases/wasm/wasm-in-initial-chunk-error/test.filter.js rename test/{statsCases => configCases/wasm}/wasm-in-initial-chunk-error/wasm.wat (100%) rename test/{statsCases => configCases/wasm}/wasm-in-initial-chunk-error/wasm2.wat (100%) rename test/{statsCases => configCases/wasm}/wasm-in-initial-chunk-error/webpack.config.js (100%) delete mode 100644 test/statsCases/wasm-in-initial-chunk-error/test.filter.js diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index 288826bfd47..3808b4ea6a8 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -2854,39 +2854,3 @@ WARNING in UglifyJs Plugin: Dropping unused function someUnRemoteUsedFunction4 [ WARNING in UglifyJs Plugin: Dropping unused function someUnRemoteUsedFunction5 [./a.js:7,0] in bundle.js" `; - -exports[`StatsTestCases should print correct stats for wasm-in-initial-chunk-error 1`] = ` -"Hash: 9f32353d97d5973caae9 -Time: Xms -Built at: Thu Jan 01 1970 00:00:00 GMT - Asset Size Chunks Chunk Names - 0.js 130 bytes 0 -main.js 9.54 KiB 1 main -Entrypoint main = main.js -[0] ./wasm.wat 42 bytes {1} [built] -[1] ./module2.js 45 bytes {1} [built] -[2] ./module3.js 47 bytes {1} [built] -[3] ./wasm2.wat 42 bytes {1} [built] -[4] ./index.js + 1 modules 124 bytes {1} [built] - | ./index.js 19 bytes [built] - | ./module.js 100 bytes [built] -[5] ./async.js 0 bytes {0} [built] - -WARNING in configuration -The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment. -You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/concepts/mode/ - -ERROR in ./wasm2.wat -WebAssembly module is included in initial chunk. -This is not allowed, because WebAssembly download and compilation must happen asynchronous. -Add an async splitpoint (i. e. import()) somewhere between your entrypoint and the WebAssembly module: -* ./index.js --> ./module.js --> ./module2.js --> ./module3.js --> ./wasm2.wat - -ERROR in ./wasm.wat -WebAssembly module is included in initial chunk. -This is not allowed, because WebAssembly download and compilation must happen asynchronous. -Add an async splitpoint (i. e. import()) somewhere between your entrypoint and the WebAssembly module: -* ./index.js --> ./module.js --> ./wasm.wat -* ... --> ./module.js --> ./module2.js --> ./wasm.wat -* ... --> ./module2.js --> ./module3.js --> ./wasm.wat" -`; diff --git a/test/statsCases/wasm-in-initial-chunk-error/async.js b/test/configCases/wasm/wasm-in-initial-chunk-error/async.js similarity index 100% rename from test/statsCases/wasm-in-initial-chunk-error/async.js rename to test/configCases/wasm/wasm-in-initial-chunk-error/async.js diff --git a/test/configCases/wasm/wasm-in-initial-chunk-error/errors.js b/test/configCases/wasm/wasm-in-initial-chunk-error/errors.js new file mode 100644 index 00000000000..1a501f8505e --- /dev/null +++ b/test/configCases/wasm/wasm-in-initial-chunk-error/errors.js @@ -0,0 +1,14 @@ +module.exports = [ + [ + /\.\/wasm.wat/, + /WebAssembly module is included in initial chunk/, + /\* \.\/index.js --> \.\/module.js --> \.\/wasm.wat/, + /\* \.\.\. --> \.\/module.js --> \.\/module2.js --> \.\/wasm.wat/, + /\* \.\.\. --> \.\/module2.js --> \.\/module3.js --> \.\/wasm.wat/ + ], + [ + /\.\/wasm2\.wat/, + /WebAssembly module is included in initial chunk/, + /\* \.\/index.js --> \.\/module.js --> \.\/module2.js --> \.\/module3.js --> \.\/wasm2.wat/ + ] +]; diff --git a/test/statsCases/wasm-in-initial-chunk-error/index.js b/test/configCases/wasm/wasm-in-initial-chunk-error/index.js similarity index 100% rename from test/statsCases/wasm-in-initial-chunk-error/index.js rename to test/configCases/wasm/wasm-in-initial-chunk-error/index.js diff --git a/test/statsCases/wasm-in-initial-chunk-error/module.js b/test/configCases/wasm/wasm-in-initial-chunk-error/module.js similarity index 100% rename from test/statsCases/wasm-in-initial-chunk-error/module.js rename to test/configCases/wasm/wasm-in-initial-chunk-error/module.js diff --git a/test/statsCases/wasm-in-initial-chunk-error/module2.js b/test/configCases/wasm/wasm-in-initial-chunk-error/module2.js similarity index 100% rename from test/statsCases/wasm-in-initial-chunk-error/module2.js rename to test/configCases/wasm/wasm-in-initial-chunk-error/module2.js diff --git a/test/statsCases/wasm-in-initial-chunk-error/module3.js b/test/configCases/wasm/wasm-in-initial-chunk-error/module3.js similarity index 100% rename from test/statsCases/wasm-in-initial-chunk-error/module3.js rename to test/configCases/wasm/wasm-in-initial-chunk-error/module3.js diff --git a/test/configCases/wasm/wasm-in-initial-chunk-error/test.filter.js b/test/configCases/wasm/wasm-in-initial-chunk-error/test.filter.js new file mode 100644 index 00000000000..0e71c44cb38 --- /dev/null +++ b/test/configCases/wasm/wasm-in-initial-chunk-error/test.filter.js @@ -0,0 +1,5 @@ +var supportsWebAssembly = require("../../../helpers/supportsWebAssembly"); + +module.exports = function() { + return supportsWebAssembly(); +}; diff --git a/test/statsCases/wasm-in-initial-chunk-error/wasm.wat b/test/configCases/wasm/wasm-in-initial-chunk-error/wasm.wat similarity index 100% rename from test/statsCases/wasm-in-initial-chunk-error/wasm.wat rename to test/configCases/wasm/wasm-in-initial-chunk-error/wasm.wat diff --git a/test/statsCases/wasm-in-initial-chunk-error/wasm2.wat b/test/configCases/wasm/wasm-in-initial-chunk-error/wasm2.wat similarity index 100% rename from test/statsCases/wasm-in-initial-chunk-error/wasm2.wat rename to test/configCases/wasm/wasm-in-initial-chunk-error/wasm2.wat diff --git a/test/statsCases/wasm-in-initial-chunk-error/webpack.config.js b/test/configCases/wasm/wasm-in-initial-chunk-error/webpack.config.js similarity index 100% rename from test/statsCases/wasm-in-initial-chunk-error/webpack.config.js rename to test/configCases/wasm/wasm-in-initial-chunk-error/webpack.config.js diff --git a/test/statsCases/wasm-in-initial-chunk-error/test.filter.js b/test/statsCases/wasm-in-initial-chunk-error/test.filter.js deleted file mode 100644 index 370f3849cb1..00000000000 --- a/test/statsCases/wasm-in-initial-chunk-error/test.filter.js +++ /dev/null @@ -1,5 +0,0 @@ -var supportsWebAssembly = require("../../helpers/supportsWebAssembly"); - -module.exports = function() { - return supportsWebAssembly(); -}; From b01f378a085dbd0af5b7d502707ba06a6adaf9f1 Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Tue, 3 Jul 2018 16:57:16 -0700 Subject: [PATCH 128/310] Fix @template syntax error in Compilation.js iterationOfArrayCallback --- lib/Compilation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Compilation.js b/lib/Compilation.js index 3733f02943a..c1be909f17a 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -176,7 +176,7 @@ const iterationBlockVariable = (variables, fn) => { }; /** - * @template {T} + * @template T * @param {T[]} arr array of elements to iterate over * @param {function(T): void} fn callback applied to each element * @returns {void} From fb2c24bf766529266b589b8e967ff09c35e83794 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 4 Jul 2018 09:59:22 +0200 Subject: [PATCH 129/310] add `splitChunks.maxSize` option add `splitChunks.fallbackCacheGroup` add `splitChunks.hidePathInfo` move `contextify` into utils add some types --- lib/Chunk.js | 2 + lib/ContextModule.js | 18 +- lib/Module.js | 2 + lib/NormalModule.js | 24 +- lib/WebpackOptionsDefaulter.js | 3 + lib/optimize/SplitChunksPlugin.js | 136 +++++++++- lib/util/deterministicGrouping.js | 251 ++++++++++++++++++ lib/util/identifier.js | 27 ++ schemas/WebpackOptions.json | 38 ++- .../__snapshots__/StatsTestCases.test.js.snap | 133 ++++++++++ test/statsCases/split-chunks-max-size/big.js | 4 + .../in-some-directory/big.js | 4 + .../in-some-directory/small.js | 1 + .../in-some-directory/very-big.js | 24 ++ .../statsCases/split-chunks-max-size/index.js | 43 +++ .../split-chunks-max-size/inner-module/big.js | 4 + .../inner-module/small.js | 1 + .../inner-module/very-big.js | 24 ++ .../statsCases/split-chunks-max-size/small.js | 1 + .../split-chunks-max-size/subfolder/big.js | 4 + .../split-chunks-max-size/subfolder/small.js | 1 + .../subfolder/very-big.js | 24 ++ .../split-chunks-max-size/very-big.js | 24 ++ .../split-chunks-max-size/webpack.config.js | 46 ++++ 24 files changed, 799 insertions(+), 40 deletions(-) create mode 100644 lib/util/deterministicGrouping.js create mode 100644 test/statsCases/split-chunks-max-size/big.js create mode 100644 test/statsCases/split-chunks-max-size/in-some-directory/big.js create mode 100644 test/statsCases/split-chunks-max-size/in-some-directory/small.js create mode 100644 test/statsCases/split-chunks-max-size/in-some-directory/very-big.js create mode 100644 test/statsCases/split-chunks-max-size/index.js create mode 100644 test/statsCases/split-chunks-max-size/inner-module/big.js create mode 100644 test/statsCases/split-chunks-max-size/inner-module/small.js create mode 100644 test/statsCases/split-chunks-max-size/inner-module/very-big.js create mode 100644 test/statsCases/split-chunks-max-size/small.js create mode 100644 test/statsCases/split-chunks-max-size/subfolder/big.js create mode 100644 test/statsCases/split-chunks-max-size/subfolder/small.js create mode 100644 test/statsCases/split-chunks-max-size/subfolder/very-big.js create mode 100644 test/statsCases/split-chunks-max-size/very-big.js create mode 100644 test/statsCases/split-chunks-max-size/webpack.config.js diff --git a/lib/Chunk.js b/lib/Chunk.js index 46cd61d456c..7d9ad3a05c5 100644 --- a/lib/Chunk.js +++ b/lib/Chunk.js @@ -121,6 +121,8 @@ class Chunk { this.entryModule = undefined; /** @private @type {SortableSet} */ this._modules = new SortableSet(undefined, sortByIdentifier); + /** @type {string?} */ + this.filenameTemplate = undefined; /** @private */ this._groups = new SortableSet(undefined, sortChunkGroupById); diff --git a/lib/ContextModule.js b/lib/ContextModule.js index 175187a6973..9db2914b713 100644 --- a/lib/ContextModule.js +++ b/lib/ContextModule.js @@ -3,12 +3,12 @@ Author Tobias Koppers @sokra */ "use strict"; -const path = require("path"); const util = require("util"); const { OriginalSource, RawSource } = require("webpack-sources"); const Module = require("./Module"); const AsyncDependenciesBlock = require("./AsyncDependenciesBlock"); const Template = require("./Template"); +const contextify = require("./util/identifier").contextify; /** @typedef {import("./dependencies/ContextElementDependency")} ContextElementDependency */ @@ -63,18 +63,6 @@ class ContextModule extends Module { return regexString.substring(1, regexString.length - 1); } - contextify(context, request) { - return request - .split("!") - .map(subrequest => { - let rp = path.relative(context, subrequest); - if (path.sep === "\\") rp = rp.replace(/\\/g, "/"); - if (rp.indexOf("../") !== 0) rp = "./" + rp; - return rp; - }) - .join("!"); - } - _createIdentifier() { let identifier = this.context; if (this.options.resourceQuery) { @@ -155,7 +143,7 @@ class ContextModule extends Module { } libIdent(options) { - let identifier = this.contextify(options.context, this.context); + let identifier = contextify(options.context, this.context); if (this.options.mode) { identifier += ` ${this.options.mode}`; } @@ -163,7 +151,7 @@ class ContextModule extends Module { identifier += " recursive"; } if (this.options.addon) { - identifier += ` ${this.contextify(options.context, this.options.addon)}`; + identifier += ` ${contextify(options.context, this.options.addon)}`; } if (this.options.regExp) { identifier += ` ${this.prettyRegExp(this.options.regExp + "")}`; diff --git a/lib/Module.js b/lib/Module.js index 54997b54cb4..b0a533a85a4 100644 --- a/lib/Module.js +++ b/lib/Module.js @@ -384,6 +384,8 @@ Module.prototype.build = null; Module.prototype.source = null; Module.prototype.size = null; Module.prototype.nameForCondition = null; +/** @type {null | function(Chunk): boolean} */ +Module.prototype.chunkCondition = null; Module.prototype.updateCacheModule = null; module.exports = Module; diff --git a/lib/NormalModule.js b/lib/NormalModule.js index d22b2eac9b0..9c5dff5925d 100644 --- a/lib/NormalModule.js +++ b/lib/NormalModule.js @@ -4,7 +4,6 @@ */ "use strict"; -const path = require("path"); const NativeModule = require("module"); const { @@ -23,6 +22,7 @@ const ModuleBuildError = require("./ModuleBuildError"); const ModuleError = require("./ModuleError"); const ModuleWarning = require("./ModuleWarning"); const createHash = require("./util/createHash"); +const contextify = require("./util/identifier").contextify; const asString = buf => { if (Buffer.isBuffer(buf)) { @@ -38,28 +38,6 @@ const asBuffer = str => { return str; }; -const contextify = (context, request) => { - return request - .split("!") - .map(r => { - const splitPath = r.split("?"); - if (/^[a-zA-Z]:\\/.test(splitPath[0])) { - splitPath[0] = path.win32.relative(context, splitPath[0]); - if (!/^[a-zA-Z]:\\/.test(splitPath[0])) { - splitPath[0] = splitPath[0].replace(/\\/g, "/"); - } - } - if (/^\//.test(splitPath[0])) { - splitPath[0] = path.posix.relative(context, splitPath[0]); - } - if (!/^(\.\.\/|\/|[a-zA-Z]:\\)/.test(splitPath[0])) { - splitPath[0] = "./" + splitPath[0]; - } - return splitPath.join("?"); - }) - .join("!"); -}; - class NonErrorEmittedError extends WebpackError { constructor(error) { super(); diff --git a/lib/WebpackOptionsDefaulter.js b/lib/WebpackOptionsDefaulter.js index f0d3f8922e0..3f9da0b72d2 100644 --- a/lib/WebpackOptionsDefaulter.js +++ b/lib/WebpackOptionsDefaulter.js @@ -215,6 +215,9 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { isProductionLikeMode(options) ); this.set("optimization.splitChunks", {}); + this.set("optimization.splitChunks.hidePathInfo", "make", options => { + return isProductionLikeMode(options); + }); this.set("optimization.splitChunks.chunks", "async"); this.set("optimization.splitChunks.minSize", "make", options => { return isProductionLikeMode(options) ? 30000 : 10000; diff --git a/lib/optimize/SplitChunksPlugin.js b/lib/optimize/SplitChunksPlugin.js index c49c5b1761e..d56e2699399 100644 --- a/lib/optimize/SplitChunksPlugin.js +++ b/lib/optimize/SplitChunksPlugin.js @@ -8,9 +8,16 @@ const crypto = require("crypto"); const SortableSet = require("../util/SortableSet"); const GraphHelpers = require("../GraphHelpers"); const { isSubset } = require("../util/SetHelpers"); +const deterministicGrouping = require("../util/deterministicGrouping"); +const contextify = require("../util/identifier").contextify; +/** @typedef {import("../Compiler")} Compiler */ /** @typedef {import("../Chunk")} Chunk */ /** @typedef {import("../Module")} Module */ +/** @typedef {import("../util/deterministicGrouping").Options} DeterministicGroupingOptionsForModule */ +/** @typedef {import("../util/deterministicGrouping").GroupedItems} DeterministicGroupingGroupedItemsForModule */ + +const deterministicGroupingForModules = /** @type {function(DeterministicGroupingOptionsForModule): DeterministicGroupingGroupedItemsForModule[]} */ (deterministicGrouping); const hashFilename = name => { return crypto @@ -104,6 +111,7 @@ module.exports = class SplitChunksPlugin { options.chunks || "all" ), minSize: options.minSize || 0, + maxSize: options.maxSize || 0, minChunks: options.minChunks || 1, maxAsyncRequests: options.maxAsyncRequests || 1, maxInitialRequests: options.maxInitialRequests || 1, @@ -112,11 +120,16 @@ module.exports = class SplitChunksPlugin { name: options.name, automaticNameDelimiter: options.automaticNameDelimiter }) || (() => {}), + hidePathInfo: options.hidePathInfo || false, filename: options.filename || undefined, getCacheGroups: SplitChunksPlugin.normalizeCacheGroups({ cacheGroups: options.cacheGroups, automaticNameDelimiter: options.automaticNameDelimiter - }) + }), + fallbackCacheGroup: SplitChunksPlugin.normalizeFallbackCacheGroup( + options.fallbackCacheGroup || {}, + options + ) }; } @@ -177,6 +190,26 @@ module.exports = class SplitChunksPlugin { if (typeof chunks === "function") return chunks; } + static normalizeFallbackCacheGroup( + { + minSize = undefined, + maxSize = undefined, + automaticNameDelimiter = undefined + }, + { + minSize: defaultMinSize = undefined, + maxSize: defaultMaxSize = undefined, + automaticNameDelimiter: defaultAutomaticNameDelimiter = undefined + } + ) { + return { + minSize: typeof minSize === "number" ? minSize : defaultMinSize || 0, + maxSize: typeof maxSize === "number" ? maxSize : defaultMaxSize || 0, + automaticNameDelimiter: + automaticNameDelimiter || defaultAutomaticNameDelimiter || "~" + }; + } + static normalizeCacheGroups({ cacheGroups, automaticNameDelimiter }) { if (typeof cacheGroups === "function") { // TODO webpack 5 remove this @@ -225,6 +258,7 @@ module.exports = class SplitChunksPlugin { ), enforce: option.enforce, minSize: option.minSize, + maxSize: option.maxSize, minChunks: option.minChunks, maxAsyncRequests: option.maxAsyncRequests, maxInitialRequests: option.maxInitialRequests, @@ -278,6 +312,10 @@ module.exports = class SplitChunksPlugin { return false; } + /** + * @param {Compiler} compiler webpack compiler + * @returns {void} + */ apply(compiler) { compiler.hooks.thisCompilation.tap("SplitChunksPlugin", compilation => { let alreadyOptimized = false; @@ -486,6 +524,12 @@ module.exports = class SplitChunksPlugin { : cacheGroupSource.enforce ? 0 : this.options.minSize, + maxSize: + cacheGroupSource.maxSize !== undefined + ? cacheGroupSource.maxSize + : cacheGroupSource.enforce + ? 0 + : this.options.maxSize, minChunks: cacheGroupSource.minChunks !== undefined ? cacheGroupSource.minChunks @@ -537,6 +581,9 @@ module.exports = class SplitChunksPlugin { } } + /** @type {Map} */ + const maxSizeQueueMap = new Map(); + while (chunksInfoMap.size > 0) { // Find best matching entry let bestEntryKey; @@ -563,6 +610,7 @@ module.exports = class SplitChunksPlugin { let chunkName = item.name; // Variable for the new chunk (lazy created) + /** @type {Chunk} */ let newChunk; // When no chunk name, check if we can reuse a chunk instead of creating a new one let isReused = false; @@ -689,6 +737,22 @@ module.exports = class SplitChunksPlugin { } } } + + if (item.cacheGroup.maxSize > 0) { + const oldMaxSizeSettings = maxSizeQueueMap.get(newChunk); + maxSizeQueueMap.set(newChunk, { + minSize: Math.max( + oldMaxSizeSettings ? oldMaxSizeSettings.minSize : 0, + item.cacheGroup.minSize + ), + maxSize: Math.min( + oldMaxSizeSettings ? oldMaxSizeSettings.maxSize : Infinity, + item.cacheGroup.maxSize + ), + automaticNameDelimiter: item.cacheGroup.automaticNameDelimiter + }); + } + // remove all modules from other entries and update size for (const [key, info] of chunksInfoMap) { if (isOverlap(info.chunks, item.chunks)) { @@ -709,6 +773,76 @@ module.exports = class SplitChunksPlugin { } } } + + // Make sure that maxSize is fulfilled + for (const chunk of compilation.chunks.slice()) { + const { minSize, maxSize, automaticNameDelimiter } = + maxSizeQueueMap.get(chunk) || this.options.fallbackCacheGroup; + if (!maxSize) continue; + const results = deterministicGroupingForModules({ + maxSize, + minSize, + items: chunk.modulesIterable, + getKey(module) { + const ident = contextify( + compilation.options.context, + module.identifier() + ); + const name = module.nameForCondition + ? contextify( + compilation.options.context, + module.nameForCondition() + ) + : ident.replace(/^.*!|\?[^?!]*$/g, ""); + const fullKey = + name + automaticNameDelimiter + hashFilename(ident); + return fullKey.replace(/[\\/?]/g, "_"); + }, + getSize(module) { + return module.size(); + } + }); + results.sort((a, b) => { + if (a.key < b.key) return -1; + if (a.key > b.key) return 1; + return 0; + }); + for (let i = 0; i < results.length; i++) { + const group = results[i]; + const key = this.options.hidePathInfo + ? hashFilename(group.key) + : group.key; + let name = chunk.name + ? chunk.name + automaticNameDelimiter + key + : null; + if (name && name.length > 100) { + name = + name.slice(0, 100) + + automaticNameDelimiter + + hashFilename(name); + } + let newPart; + if (i !== results.length - 1) { + newPart = compilation.addChunk(name); + chunk.split(newPart); + // Add all modules to the new chunk + for (const module of group.items) { + if (typeof module.chunkCondition === "function") { + if (!module.chunkCondition(newPart)) continue; + } + // Add module to new chunk + GraphHelpers.connectChunkAndModule(newPart, module); + // Remove module from used chunks + chunk.removeModule(module); + module.rewriteChunkInReasons(chunk, [newPart]); + } + } else { + // change the chunk to be a part + newPart = chunk; + chunk.name = name; + } + } + } } ); }); diff --git a/lib/util/deterministicGrouping.js b/lib/util/deterministicGrouping.js new file mode 100644 index 00000000000..75827b0c1bb --- /dev/null +++ b/lib/util/deterministicGrouping.js @@ -0,0 +1,251 @@ +"use strict"; + +// Simulations show these probabilities for a single change +// 93.1% that one group is invalidated +// 4.8% that two groups are invalidated +// 1.1% that 3 groups are invalidated +// 0.1% that 4 or more groups are invalidated +// +// And these for removing/adding 10 lexically adjacent files +// 64.5% that one group is invalidated +// 24.8% that two groups are invalidated +// 7.8% that 3 groups are invalidated +// 2.7% that 4 or more groups are invalidated +// +// And these for removing/adding 3 random files +// 0% that one group is invalidated +// 3.7% that two groups are invalidated +// 80.8% that 3 groups are invalidated +// 12.3% that 4 groups are invalidated +// 3.2% that 5 or more groups are invalidated + +/** + * + * @param {string} a key + * @param {string} b key + * @returns {number} the similarity as number + */ +const similarity = (a, b) => { + const l = Math.min(a.length, b.length); + let dist = 0; + for (let i = 0; i < l; i++) { + const ca = a.charCodeAt(i); + const cb = b.charCodeAt(i); + dist += Math.max(0, 10 - Math.abs(ca - cb)); + } + return dist; +}; + +/** + * @param {string} a key + * @param {string} b key + * @returns {string} the common part and a single char for the difference + */ +const getName = (a, b) => { + const l = Math.min(a.length, b.length); + let r = ""; + for (let i = 0; i < l; i++) { + const ca = a.charAt(i); + const cb = b.charAt(i); + r += ca; + if (ca === cb) { + continue; + } + return r; + } + return a; +}; + +/** + * @template T + */ +class Node { + /** + * @param {T} item item + * @param {string} key key + * @param {number} size size + */ + constructor(item, key, size) { + this.item = item; + this.key = key; + this.size = size; + } +} + +/** + * @template T + */ +class Group { + /** + * @param {Node[]} nodes nodes + * @param {number[]} similarities similarities between the nodes (length = nodes.length - 1) + */ + constructor(nodes, similarities) { + this.nodes = nodes; + this.similarities = similarities; + this.size = nodes.reduce((size, node) => size + node.size, 0); + /** @type {string} */ + this.key = undefined; + } +} + +/** + * @template T + * @typedef {Object} GroupedItems + * @property {string} key + * @property {T[]} items + * @property {number} size + */ + +/** + * @template T + * @typedef {Object} Options + * @property {number} maxSize maximum size of a group + * @property {number} minSize minimum size of a group (preferred over maximum size) + * @property {Iterable} items a list of items + * @property {function(T): number} getSize function to get size of an item + * @property {function(T): string} getKey function to get the key of an item + */ + +/** + * @template T + * @param {Options} options options object + * @returns {GroupedItems[]} grouped items + */ +module.exports = ({ maxSize, minSize, items, getSize, getKey }) => { + /** @type {Group[]} */ + const result = []; + + const nodes = Array.from( + items, + item => new Node(item, getKey(item), getSize(item)) + ); + + /** @type {Node[]} */ + const initialNodes = []; + + // return nodes bigger than maxSize directly as group + for (const node of nodes) { + if (node.size >= maxSize) { + result.push(new Group([node], [])); + } else { + initialNodes.push(node); + } + } + + if (initialNodes.length > 0) { + // lexically ordering of keys + initialNodes.sort((a, b) => { + if (a.key < b.key) return -1; + if (a.key > b.key) return 1; + return 0; + }); + + // calculate similarities between lexically adjacent nodes + /** @type {number[]} */ + const similarities = []; + for (let i = 1; i < initialNodes.length; i++) { + const a = initialNodes[i - 1]; + const b = initialNodes[i]; + similarities.push(similarity(a.key, b.key)); + } + + const queue = [new Group(initialNodes, similarities)]; + + while (queue.length) { + const group = queue.pop(); + // only groups bigger than maxSize need to be splitted + if (group.size < maxSize) { + result.push(group); + continue; + } + + // find unsplittable area from left and right + // going minSize from left and right + let left = 0; + let leftSize = 0; + while (leftSize < minSize) { + leftSize += group.nodes[left].size; + left++; + } + let right = group.nodes.length - 1; + let rightSize = 0; + while (rightSize < minSize) { + rightSize += group.nodes[right].size; + right--; + } + + if (left - 1 > right) { + // can't split group while holding minSize + // because minSize is preferred of maxSize we return + // the group here even while it's too big + // To avoid this make sure maxSize > minSize * 3 + result.push(group); + continue; + } + if (left <= right) { + // when there is a area between left and right + // we look for best split point + // we split at the minimum similiarity + // here key space is separated the most + let best = left - 1; + let bestSimilarity = group.similarities[best]; + for (let i = left; i <= right; i++) { + const similarity = group.similarities[i]; + if (similarity < bestSimilarity) { + best = i; + bestSimilarity = similarity; + } + } + left = best + 1; + right = best; + } + + // create two new groups for left and right area + // and queue them up + const rightNodes = [group.nodes[right + 1]]; + /** @type {number[]} */ + const rightSimilaries = []; + for (let i = right + 2; i < group.nodes.length; i++) { + rightSimilaries.push(group.similarities[i - 1]); + rightNodes.push(group.nodes[i]); + } + queue.push(new Group(rightNodes, rightSimilaries)); + + const leftNodes = [group.nodes[0]]; + /** @type {number[]} */ + const leftSimilaries = []; + for (let i = 1; i < left; i++) { + leftSimilaries.push(group.similarities[i - 1]); + leftNodes.push(group.nodes[i]); + } + queue.push(new Group(leftNodes, leftSimilaries)); + } + } + + // lexically ordering + result.sort((a, b) => { + if (a.nodes[0].key < b.nodes[0].key) return -1; + if (a.nodes[0].key > b.nodes[0].key) return 1; + return 0; + }); + + // give every group a name + for (let i = 0; i < result.length; i++) { + const group = result[i]; + const first = group.nodes[0]; + const last = group.nodes[group.nodes.length - 1]; + let name = getName(first.key, last.key); + group.key = name; + } + + // return the results + return result.map(group => { + /** @type {GroupedItems} */ + return { + key: group.key, + items: group.nodes.map(node => node.item), + size: group.size + }; + }); +}; diff --git a/lib/util/identifier.js b/lib/util/identifier.js index 9176facd0fd..ade63590821 100644 --- a/lib/util/identifier.js +++ b/lib/util/identifier.js @@ -74,3 +74,30 @@ exports.makePathsRelative = (context, identifier, cache) => { return relativePath; } }; + +/** + * @param {string} context absolute context path + * @param {string} request any request string may containing absolute paths, query string, etc. + * @returns {string} a new request string avoiding absolute paths when possible + */ +exports.contextify = (context, request) => { + return request + .split("!") + .map(r => { + const splitPath = r.split("?", 2); + if (/^[a-zA-Z]:\\/.test(splitPath[0])) { + splitPath[0] = path.win32.relative(context, splitPath[0]); + if (!/^[a-zA-Z]:\\/.test(splitPath[0])) { + splitPath[0] = splitPath[0].replace(/\\/g, "/"); + } + } + if (/^\//.test(splitPath[0])) { + splitPath[0] = path.posix.relative(context, splitPath[0]); + } + if (!/^(\.\.\/|\/|[a-zA-Z]:\\)/.test(splitPath[0])) { + splitPath[0] = "./" + splitPath[0]; + } + return splitPath.join("?"); + }) + .join("!"); +}; diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json index 2fe65fb16b3..7581fe8dd22 100644 --- a/schemas/WebpackOptions.json +++ b/schemas/WebpackOptions.json @@ -1351,7 +1351,12 @@ ] }, "minSize": { - "description": "Minimal size for the created chunk", + "description": "Minimal size for the created chunks", + "type": "number", + "minimum": 0 + }, + "maxSize": { + "description": "Maximal size hint for the created chunks", "type": "number", "minimum": 0 }, @@ -1394,6 +1399,32 @@ "type": "string", "minLength": 1 }, + "hidePathInfo": { + "description": "Prevents exposing path info when creating names for parts splitted by maxSize", + "type": "boolean" + }, + "fallbackCacheGroup": { + "description": "Options for modules not selected by any other cache group", + "type": "object", + "additionalProperties": false, + "properties": { + "minSize": { + "description": "Minimal size for the created chunk", + "type": "number", + "minimum": 0 + }, + "maxSize": { + "description": "Maximal size hint for the created chunks", + "type": "number", + "minimum": 0 + }, + "automaticNameDelimiter": { + "description": "Sets the name delimiter for created chunks", + "type": "string", + "minLength": 1 + } + } + }, "cacheGroups": { "description": "Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks)", "type": "object", @@ -1460,6 +1491,11 @@ "type": "number", "minimum": 0 }, + "maxSize": { + "description": "Maximal size hint for the created chunks", + "type": "number", + "minimum": 0 + }, "minChunks": { "description": "Minimum number of times a module has to be duplicated until it's considered for splitting", "type": "number", diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index 3808b4ea6a8..ca7b99a36fc 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -2772,6 +2772,139 @@ chunk {3} b.js (b) 43 bytes >{0}< >{1}< [entry] [rendered] [3] ./b.js 43 bytes {3} [built]" `; +exports[`StatsTestCases should print correct stats for split-chunks-max-size 1`] = ` +"Child production: + Entrypoint main = prod-main~6e7ead72.js prod-main~6a2ae26b.js prod-main~17acad98.js prod-main~b2c7414a.js prod-main~75f09de8.js prod-main~052b3814.js prod-main~3ff27526.js prod-main~11485824.js prod-main~c6931360.js prod-main~cd7c5bfc.js prod-main~02369f19.js + chunk {0} prod-main~02369f19.js (main~02369f19) 1.57 KiB ={1}= ={10}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [entry] [rendered] + > ./ main + [11] ./very-big.js?1 1.57 KiB {0} [built] + chunk {1} prod-main~6e7ead72.js (main~6e7ead72) 536 bytes ={0}= ={10}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + > ./ main + [0] ./big.js?1 268 bytes {1} [built] + [1] ./big.js?2 268 bytes {1} [built] + chunk {2} prod-main~6a2ae26b.js (main~6a2ae26b) 536 bytes ={0}= ={1}= ={10}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + > ./ main + [34] ./in-some-directory/big.js?1 268 bytes {2} [built] + [35] ./in-some-directory/small.js?1 67 bytes {2} [built] + [36] ./in-some-directory/small.js?2 67 bytes {2} [built] + [37] ./in-some-directory/small.js?3 67 bytes {2} [built] + [38] ./in-some-directory/small.js?4 67 bytes {2} [built] + chunk {3} prod-main~17acad98.js (main~17acad98) 1.57 KiB ={0}= ={1}= ={10}= ={2}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + > ./ main + [39] ./in-some-directory/very-big.js?1 1.57 KiB {3} [built] + chunk {4} prod-main~b2c7414a.js (main~b2c7414a) 1.11 KiB ={0}= ={1}= ={10}= ={2}= ={3}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + > ./ main + [40] ./index.js 1.11 KiB {4} [built] + chunk {5} prod-main~75f09de8.js (main~75f09de8) 603 bytes ={0}= ={1}= ={10}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + > ./ main + [25] ./inner-module/small.js?1 67 bytes {5} [built] + [26] ./inner-module/small.js?2 67 bytes {5} [built] + [27] ./inner-module/small.js?3 67 bytes {5} [built] + [28] ./inner-module/small.js?4 67 bytes {5} [built] + [29] ./inner-module/small.js?5 67 bytes {5} [built] + [30] ./inner-module/small.js?6 67 bytes {5} [built] + [31] ./inner-module/small.js?7 67 bytes {5} [built] + [32] ./inner-module/small.js?8 67 bytes {5} [built] + [33] ./inner-module/small.js?9 67 bytes {5} [built] + chunk {6} prod-main~052b3814.js (main~052b3814) 603 bytes ={0}= ={1}= ={10}= ={2}= ={3}= ={4}= ={5}= ={7}= ={8}= ={9}= [initial] [rendered] + > ./ main + [2] ./small.js?1 67 bytes {6} [built] + [3] ./small.js?2 67 bytes {6} [built] + [4] ./small.js?3 67 bytes {6} [built] + [5] ./small.js?4 67 bytes {6} [built] + [6] ./small.js?5 67 bytes {6} [built] + [7] ./small.js?6 67 bytes {6} [built] + [8] ./small.js?7 67 bytes {6} [built] + [9] ./small.js?8 67 bytes {6} [built] + [10] ./small.js?9 67 bytes {6} [built] + chunk {7} prod-main~3ff27526.js (main~3ff27526) 536 bytes ={0}= ={1}= ={10}= ={2}= ={3}= ={4}= ={5}= ={6}= ={8}= ={9}= [initial] [rendered] + > ./ main + [14] ./subfolder/big.js?1 268 bytes {7} [built] + [15] ./subfolder/big.js?2 268 bytes {7} [built] + chunk {8} prod-main~11485824.js (main~11485824) 603 bytes ={0}= ={1}= ={10}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={9}= [initial] [rendered] + > ./ main + [16] ./subfolder/small.js?1 67 bytes {8} [built] + [17] ./subfolder/small.js?2 67 bytes {8} [built] + [18] ./subfolder/small.js?3 67 bytes {8} [built] + [19] ./subfolder/small.js?4 67 bytes {8} [built] + [20] ./subfolder/small.js?5 67 bytes {8} [built] + [21] ./subfolder/small.js?6 67 bytes {8} [built] + [22] ./subfolder/small.js?7 67 bytes {8} [built] + [23] ./subfolder/small.js?8 67 bytes {8} [built] + [24] ./subfolder/small.js?9 67 bytes {8} [built] + chunk {9} prod-main~c6931360.js (main~c6931360) 1.57 KiB ={0}= ={1}= ={10}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= [initial] [rendered] + > ./ main + [12] ./very-big.js?2 1.57 KiB {9} [built] + chunk {10} prod-main~cd7c5bfc.js (main~cd7c5bfc) 1.57 KiB ={0}= ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + > ./ main + [13] ./very-big.js?3 1.57 KiB {10} [built] +Child development: + Entrypoint main = dev-main~._big.js~1.js dev-main~._in-some-directory_b.js dev-main~._in-some-directory_very-big.js~8d76cf03.js dev-main~._index.js~41f5a26e.js dev-main~._inner-module_small.js~3.js dev-main~._small.js~1.js dev-main~._subfolder_big.js~b.js dev-main~._subfolder_small.js~1.js dev-main~._very-big.js~08cf55cf.js dev-main~._very-big.js~4647fb9d.js dev-main~._very-big.js~62f7f644.js + chunk {main~._big.js~1} dev-main~._big.js~1.js (main~._big.js~1) 536 bytes ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= [initial] [rendered] + > ./ main + [./big.js?1] 268 bytes {main~._big.js~1} [built] + [./big.js?2] 268 bytes {main~._big.js~1} [built] + chunk {main~._in-some-directory_b} dev-main~._in-some-directory_b.js (main~._in-some-directory_b) 536 bytes ={main~._big.js~1}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= [initial] [rendered] + > ./ main + [./in-some-directory/big.js?1] 268 bytes {main~._in-some-directory_b} [built] + [./in-some-directory/small.js?1] 67 bytes {main~._in-some-directory_b} [built] + [./in-some-directory/small.js?2] 67 bytes {main~._in-some-directory_b} [built] + [./in-some-directory/small.js?3] 67 bytes {main~._in-some-directory_b} [built] + [./in-some-directory/small.js?4] 67 bytes {main~._in-some-directory_b} [built] + chunk {main~._in-some-directory_very-big.js~8d76cf03} dev-main~._in-some-directory_very-big.js~8d76cf03.js (main~._in-some-directory_very-big.js~8d76cf03) 1.57 KiB ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= [initial] [rendered] + > ./ main + [./in-some-directory/very-big.js?1] 1.57 KiB {main~._in-some-directory_very-big.js~8d76cf03} [built] + chunk {main~._index.js~41f5a26e} dev-main~._index.js~41f5a26e.js (main~._index.js~41f5a26e) 1.11 KiB ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= [initial] [rendered] + > ./ main + [./index.js] 1.11 KiB {main~._index.js~41f5a26e} [built] + chunk {main~._inner-module_small.js~3} dev-main~._inner-module_small.js~3.js (main~._inner-module_small.js~3) 603 bytes ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= [initial] [rendered] + > ./ main + [./inner-module/small.js?1] 67 bytes {main~._inner-module_small.js~3} [built] + [./inner-module/small.js?2] 67 bytes {main~._inner-module_small.js~3} [built] + [./inner-module/small.js?3] 67 bytes {main~._inner-module_small.js~3} [built] + [./inner-module/small.js?4] 67 bytes {main~._inner-module_small.js~3} [built] + [./inner-module/small.js?5] 67 bytes {main~._inner-module_small.js~3} [built] + [./inner-module/small.js?6] 67 bytes {main~._inner-module_small.js~3} [built] + [./inner-module/small.js?7] 67 bytes {main~._inner-module_small.js~3} [built] + [./inner-module/small.js?8] 67 bytes {main~._inner-module_small.js~3} [built] + [./inner-module/small.js?9] 67 bytes {main~._inner-module_small.js~3} [built] + chunk {main~._small.js~1} dev-main~._small.js~1.js (main~._small.js~1) 603 bytes ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= [initial] [rendered] + > ./ main + [./small.js?1] 67 bytes {main~._small.js~1} [built] + [./small.js?2] 67 bytes {main~._small.js~1} [built] + [./small.js?3] 67 bytes {main~._small.js~1} [built] + [./small.js?4] 67 bytes {main~._small.js~1} [built] + [./small.js?5] 67 bytes {main~._small.js~1} [built] + [./small.js?6] 67 bytes {main~._small.js~1} [built] + [./small.js?7] 67 bytes {main~._small.js~1} [built] + [./small.js?8] 67 bytes {main~._small.js~1} [built] + [./small.js?9] 67 bytes {main~._small.js~1} [built] + chunk {main~._subfolder_big.js~b} dev-main~._subfolder_big.js~b.js (main~._subfolder_big.js~b) 536 bytes ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= [initial] [rendered] + > ./ main + [./subfolder/big.js?1] 268 bytes {main~._subfolder_big.js~b} [built] + [./subfolder/big.js?2] 268 bytes {main~._subfolder_big.js~b} [built] + chunk {main~._subfolder_small.js~1} dev-main~._subfolder_small.js~1.js (main~._subfolder_small.js~1) 603 bytes ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= [initial] [rendered] + > ./ main + [./subfolder/small.js?1] 67 bytes {main~._subfolder_small.js~1} [built] + [./subfolder/small.js?2] 67 bytes {main~._subfolder_small.js~1} [built] + [./subfolder/small.js?3] 67 bytes {main~._subfolder_small.js~1} [built] + [./subfolder/small.js?4] 67 bytes {main~._subfolder_small.js~1} [built] + [./subfolder/small.js?5] 67 bytes {main~._subfolder_small.js~1} [built] + [./subfolder/small.js?6] 67 bytes {main~._subfolder_small.js~1} [built] + [./subfolder/small.js?7] 67 bytes {main~._subfolder_small.js~1} [built] + [./subfolder/small.js?8] 67 bytes {main~._subfolder_small.js~1} [built] + [./subfolder/small.js?9] 67 bytes {main~._subfolder_small.js~1} [built] + chunk {main~._very-big.js~08cf55cf} dev-main~._very-big.js~08cf55cf.js (main~._very-big.js~08cf55cf) 1.57 KiB ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= [initial] [rendered] + > ./ main + [./very-big.js?2] 1.57 KiB {main~._very-big.js~08cf55cf} [built] + chunk {main~._very-big.js~4647fb9d} dev-main~._very-big.js~4647fb9d.js (main~._very-big.js~4647fb9d) 1.57 KiB ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~62f7f644}= [initial] [rendered] + > ./ main + [./very-big.js?3] 1.57 KiB {main~._very-big.js~4647fb9d} [built] + chunk {main~._very-big.js~62f7f644} dev-main~._very-big.js~62f7f644.js (main~._very-big.js~62f7f644) 1.57 KiB ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= [entry] [rendered] + > ./ main + [./very-big.js?1] 1.57 KiB {main~._very-big.js~62f7f644} [built]" +`; + exports[`StatsTestCases should print correct stats for split-chunks-prefer-bigger-splits 1`] = ` "Entrypoint main = default/main.js chunk {0} default/async-b~async-c.js (async-b~async-c) 110 bytes <{4}> ={2}= ={3}= [rendered] split chunk (cache group: default) (name: async-b~async-c) diff --git a/test/statsCases/split-chunks-max-size/big.js b/test/statsCases/split-chunks-max-size/big.js new file mode 100644 index 00000000000..40380e42352 --- /dev/null +++ b/test/statsCases/split-chunks-max-size/big.js @@ -0,0 +1,4 @@ +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content diff --git a/test/statsCases/split-chunks-max-size/in-some-directory/big.js b/test/statsCases/split-chunks-max-size/in-some-directory/big.js new file mode 100644 index 00000000000..40380e42352 --- /dev/null +++ b/test/statsCases/split-chunks-max-size/in-some-directory/big.js @@ -0,0 +1,4 @@ +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content diff --git a/test/statsCases/split-chunks-max-size/in-some-directory/small.js b/test/statsCases/split-chunks-max-size/in-some-directory/small.js new file mode 100644 index 00000000000..1f44b439eae --- /dev/null +++ b/test/statsCases/split-chunks-max-size/in-some-directory/small.js @@ -0,0 +1 @@ +// content content content content content content content content diff --git a/test/statsCases/split-chunks-max-size/in-some-directory/very-big.js b/test/statsCases/split-chunks-max-size/in-some-directory/very-big.js new file mode 100644 index 00000000000..4c943771c37 --- /dev/null +++ b/test/statsCases/split-chunks-max-size/in-some-directory/very-big.js @@ -0,0 +1,24 @@ +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content diff --git a/test/statsCases/split-chunks-max-size/index.js b/test/statsCases/split-chunks-max-size/index.js new file mode 100644 index 00000000000..5b5a81edd66 --- /dev/null +++ b/test/statsCases/split-chunks-max-size/index.js @@ -0,0 +1,43 @@ +import "./big?1"; +import "./big?2"; +import "./small?1"; +import "./small?2"; +import "./small?3"; +import "./small?4"; +import "./small?5"; +import "./small?6"; +import "./small?7"; +import "./small?8"; +import "./small?9"; +import "./very-big?1"; +import "./very-big?2"; +import "./very-big?3"; + +import "./subfolder/big?1"; +import "./subfolder/big?2"; +import "./subfolder/small?1"; +import "./subfolder/small?2"; +import "./subfolder/small?3"; +import "./subfolder/small?4"; +import "./subfolder/small?5"; +import "./subfolder/small?6"; +import "./subfolder/small?7"; +import "./subfolder/small?8"; +import "./subfolder/small?9"; + +import "./inner-module/small?1"; +import "./inner-module/small?2"; +import "./inner-module/small?3"; +import "./inner-module/small?4"; +import "./inner-module/small?5"; +import "./inner-module/small?6"; +import "./inner-module/small?7"; +import "./inner-module/small?8"; +import "./inner-module/small?9"; + +import "./in-some-directory/big?1"; +import "./in-some-directory/small?1"; +import "./in-some-directory/small?2"; +import "./in-some-directory/small?3"; +import "./in-some-directory/small?4"; +import "./in-some-directory/very-big?1"; diff --git a/test/statsCases/split-chunks-max-size/inner-module/big.js b/test/statsCases/split-chunks-max-size/inner-module/big.js new file mode 100644 index 00000000000..40380e42352 --- /dev/null +++ b/test/statsCases/split-chunks-max-size/inner-module/big.js @@ -0,0 +1,4 @@ +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content diff --git a/test/statsCases/split-chunks-max-size/inner-module/small.js b/test/statsCases/split-chunks-max-size/inner-module/small.js new file mode 100644 index 00000000000..1f44b439eae --- /dev/null +++ b/test/statsCases/split-chunks-max-size/inner-module/small.js @@ -0,0 +1 @@ +// content content content content content content content content diff --git a/test/statsCases/split-chunks-max-size/inner-module/very-big.js b/test/statsCases/split-chunks-max-size/inner-module/very-big.js new file mode 100644 index 00000000000..4c943771c37 --- /dev/null +++ b/test/statsCases/split-chunks-max-size/inner-module/very-big.js @@ -0,0 +1,24 @@ +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content diff --git a/test/statsCases/split-chunks-max-size/small.js b/test/statsCases/split-chunks-max-size/small.js new file mode 100644 index 00000000000..1f44b439eae --- /dev/null +++ b/test/statsCases/split-chunks-max-size/small.js @@ -0,0 +1 @@ +// content content content content content content content content diff --git a/test/statsCases/split-chunks-max-size/subfolder/big.js b/test/statsCases/split-chunks-max-size/subfolder/big.js new file mode 100644 index 00000000000..40380e42352 --- /dev/null +++ b/test/statsCases/split-chunks-max-size/subfolder/big.js @@ -0,0 +1,4 @@ +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content diff --git a/test/statsCases/split-chunks-max-size/subfolder/small.js b/test/statsCases/split-chunks-max-size/subfolder/small.js new file mode 100644 index 00000000000..1f44b439eae --- /dev/null +++ b/test/statsCases/split-chunks-max-size/subfolder/small.js @@ -0,0 +1 @@ +// content content content content content content content content diff --git a/test/statsCases/split-chunks-max-size/subfolder/very-big.js b/test/statsCases/split-chunks-max-size/subfolder/very-big.js new file mode 100644 index 00000000000..4c943771c37 --- /dev/null +++ b/test/statsCases/split-chunks-max-size/subfolder/very-big.js @@ -0,0 +1,24 @@ +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content diff --git a/test/statsCases/split-chunks-max-size/very-big.js b/test/statsCases/split-chunks-max-size/very-big.js new file mode 100644 index 00000000000..4c943771c37 --- /dev/null +++ b/test/statsCases/split-chunks-max-size/very-big.js @@ -0,0 +1,24 @@ +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content diff --git a/test/statsCases/split-chunks-max-size/webpack.config.js b/test/statsCases/split-chunks-max-size/webpack.config.js new file mode 100644 index 00000000000..3987fc2a86f --- /dev/null +++ b/test/statsCases/split-chunks-max-size/webpack.config.js @@ -0,0 +1,46 @@ +const stats = { + hash: false, + timings: false, + builtAt: false, + assets: false, + chunks: true, + chunkOrigins: true, + entrypoints: true, + modules: false +}; +module.exports = [ + { + name: "production", + mode: "production", + entry: { + main: "./" + }, + output: { + filename: "prod-[name].js" + }, + optimization: { + splitChunks: { + minSize: 100, + maxSize: 1000 + } + }, + stats + }, + { + name: "development", + mode: "development", + entry: { + main: "./" + }, + output: { + filename: "dev-[name].js" + }, + optimization: { + splitChunks: { + minSize: 100, + maxSize: 1000 + } + }, + stats + } +]; From 6705141ef626dfb295d8ca9c737d1ae8eab4829a Mon Sep 17 00:00:00 2001 From: skratchdot Date: Wed, 4 Jul 2018 11:02:07 -0400 Subject: [PATCH 130/310] prevent UnhandledPromiseRejectionWarning in node 6 Fixes #7654 --- lib/debug/ProfilingPlugin.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/debug/ProfilingPlugin.js b/lib/debug/ProfilingPlugin.js index 1cb96271035..a8ba8a2165c 100644 --- a/lib/debug/ProfilingPlugin.js +++ b/lib/debug/ProfilingPlugin.js @@ -137,7 +137,9 @@ const createTrace = outputPath => { callback(); }); // Tear down the readable trace stream. - trace.destroy(); + if (trace.destroy) { + trace.destroy(); + } } }; }; From bdd4442c449b41d2a0ea7ed0de9cded3ba0e2e31 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 4 Jul 2018 21:42:27 +0200 Subject: [PATCH 131/310] 4.15.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 44ac63915e0..a22497fff82 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.14.0", + "version": "4.15.0", "author": "Tobias Koppers @sokra", "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", From a0e1ad920e22de7630a5b954f2cf925b51becf4e Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Thu, 5 Jul 2018 08:07:46 +0300 Subject: [PATCH 132/310] Enable noImplicitThis TypeScript compiler option --- .eslintrc.js | 1 - lib/Chunk.js | 41 ++++++++--- lib/ChunkGroup.js | 6 +- lib/Compilation.js | 49 ++++++++++--- lib/ContextModule.js | 146 ++++++++++++++++++++++++++++++-------- lib/Module.js | 59 +++++++++++---- lib/Parser.js | 15 +++- lib/util/SortableSet.js | 1 + lib/util/StackedSetMap.js | 15 +++- lib/webpack.js | 1 + package.json | 2 +- tsconfig.json | 1 + yarn.lock | 10 +-- 13 files changed, 270 insertions(+), 77 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 477b21dbaef..b7b50becaae 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -35,7 +35,6 @@ module.exports = { "prop": "property", "memberof": "DONTUSE", "class": "DONTUSE", - "extends": "DONTUSE", "inheritdoc": "DONTUSE", "description": "DONTUSE", "readonly": "DONTUSE" diff --git a/lib/Chunk.js b/lib/Chunk.js index 7d9ad3a05c5..95d3588f040 100644 --- a/lib/Chunk.js +++ b/lib/Chunk.js @@ -15,6 +15,7 @@ const ERR_CHUNK_INITIAL = /** @typedef {import("./Module.js")} Module */ /** @typedef {import("./ChunkGroup")} ChunkGroup */ +/** @typedef {import("./Entrypoint")} Entrypoint */ /** @typedef {import("./ModuleReason.js")} ModuleReason */ /** @typedef {import("webpack-sources").Source} Source */ /** @typedef {import("./util/createHash").Hash} Hash */ @@ -126,7 +127,7 @@ class Chunk { /** @private */ this._groups = new SortableSet(undefined, sortChunkGroupById); - /** @private @type {SortableSet} */ + /** @private @type {SortableSet} */ this._groups = new SortableSet(undefined, sortChunkGroupById); /** @type {string[]} */ this.files = []; @@ -185,7 +186,11 @@ class Chunk { hasRuntime() { for (const chunkGroup of this._groups) { // We only need to check the first one - return chunkGroup.isInitial() && chunkGroup.getRuntimeChunk() === this; + return ( + chunkGroup.isInitial() && + // prettier-ignore + /** @type {Entrypoint} */ (chunkGroup).getRuntimeChunk() === this + ); } return false; } @@ -749,17 +754,37 @@ class Chunk { // TODO remove in webpack 5 Object.defineProperty(Chunk.prototype, "forEachModule", { configurable: false, - value: util.deprecate(function(fn) { - this._modules.forEach(fn); - }, "Chunk.forEachModule: Use for(const module of chunk.modulesIterable) instead") + value: util.deprecate( + /** + * @deprecated + * @this {Chunk} + * @typedef {function(any, any, Set): void} ForEachModuleCallback + * @param {ForEachModuleCallback} fn Callback function + * @returns {void} + */ + function(fn) { + this._modules.forEach(fn); + }, + "Chunk.forEachModule: Use for(const module of chunk.modulesIterable) instead" + ) }); // TODO remove in webpack 5 Object.defineProperty(Chunk.prototype, "mapModules", { configurable: false, - value: util.deprecate(function(fn) { - return Array.from(this._modules, fn); - }, "Chunk.mapModules: Use Array.from(chunk.modulesIterable, fn) instead") + value: util.deprecate( + /** + * @deprecated + * @this {Chunk} + * @typedef {function(any, number): any} MapModulesCallback + * @param {MapModulesCallback} fn Callback function + * @returns {TODO[]} result of mapped modules + */ + function(fn) { + return Array.from(this._modules, fn); + }, + "Chunk.mapModules: Use Array.from(chunk.modulesIterable, fn) instead" + ) }); // TODO remove in webpack 5 diff --git a/lib/ChunkGroup.js b/lib/ChunkGroup.js index 19e8f3c67ee..4acbc46c357 100644 --- a/lib/ChunkGroup.js +++ b/lib/ChunkGroup.js @@ -11,7 +11,6 @@ const compareLocations = require("./compareLocations"); /** @typedef {import("./Module")} Module */ /** @typedef {import("./ModuleReason")} ModuleReason */ -/** @typedef {{id: number}} HasId */ /** @typedef {{module: Module, loc: TODO, request: string}} OriginRecord */ /** @typedef {string|{name: string}} ChunkGroupOptions */ @@ -26,8 +25,8 @@ const getArray = set => Array.from(set); /** * A convenience method used to sort chunks based on their id's - * @param {HasId} a first sorting comparator - * @param {HasId} b second sorting comparator + * @param {ChunkGroup} a first sorting comparator + * @param {ChunkGroup} b second sorting comparator * @returns {1|0|-1} a sorting index to determine order */ const sortById = (a, b) => { @@ -63,6 +62,7 @@ class ChunkGroup { /** @type {number} */ this.groupDebugId = debugId++; this.options = options; + /** @type {SortableSet} */ this._children = new SortableSet(undefined, sortById); this._parents = new SortableSet(undefined, sortById); this._blocks = new SortableSet(); diff --git a/lib/Compilation.js b/lib/Compilation.js index c1be909f17a..1008ee3e994 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -2438,21 +2438,48 @@ class Compilation extends Tapable { } // TODO remove in webpack 5 -Compilation.prototype.applyPlugins = util.deprecate(function(name, ...args) { - this.hooks[ - name.replace(/[- ]([a-z])/g, match => match[1].toUpperCase()) - ].call(...args); -}, "Compilation.applyPlugins is deprecated. Use new API on `.hooks` instead"); +Compilation.prototype.applyPlugins = util.deprecate( + /** + * @deprecated + * @param {string} name Name + * @param {any[]} args Other arguments + * @returns {void} + * @this {Compilation} + */ + function(name, ...args) { + this.hooks[ + name.replace(/[- ]([a-z])/g, match => match[1].toUpperCase()) + ].call(...args); + }, + "Compilation.applyPlugins is deprecated. Use new API on `.hooks` instead" +); // TODO remove in webpack 5 Object.defineProperty(Compilation.prototype, "moduleTemplate", { configurable: false, - get: util.deprecate(function() { - return this.moduleTemplates.javascript; - }, "Compilation.moduleTemplate: Use Compilation.moduleTemplates.javascript instead"), - set: util.deprecate(function(value) { - this.moduleTemplates.javascript = value; - }, "Compilation.moduleTemplate: Use Compilation.moduleTemplates.javascript instead.") + get: util.deprecate( + /** + * @deprecated + * @this {Compilation} + * @returns {TODO} module template + */ + function() { + return this.moduleTemplates.javascript; + }, + "Compilation.moduleTemplate: Use Compilation.moduleTemplates.javascript instead" + ), + set: util.deprecate( + /** + * @deprecated + * @param {ModuleTemplate} value Template value + * @this {Compilation} + * @returns {void} + */ + function(value) { + this.moduleTemplates.javascript = value; + }, + "Compilation.moduleTemplate: Use Compilation.moduleTemplates.javascript instead." + ) }); module.exports = Compilation; diff --git a/lib/ContextModule.js b/lib/ContextModule.js index 9db2914b713..dbf197ecc6c 100644 --- a/lib/ContextModule.js +++ b/lib/ContextModule.js @@ -10,6 +10,7 @@ const AsyncDependenciesBlock = require("./AsyncDependenciesBlock"); const Template = require("./Template"); const contextify = require("./util/identifier").contextify; +/** @typedef {"sync" | "eager" | "weak" | "async-weak" | "lazy" | "lazy-once"} ContextMode Context mode */ /** @typedef {import("./dependencies/ContextElementDependency")} ContextElementDependency */ class ContextModule extends Module { @@ -684,56 +685,141 @@ webpackEmptyAsyncContext.id = ${JSON.stringify(id)};`; // TODO remove in webpack 5 Object.defineProperty(ContextModule.prototype, "recursive", { configurable: false, - get: util.deprecate(function() { - return this.options.recursive; - }, "ContextModule.recursive has been moved to ContextModule.options.recursive"), - set: util.deprecate(function(value) { - this.options.recursive = value; - }, "ContextModule.recursive has been moved to ContextModule.options.recursive") + get: util.deprecate( + /** + * @deprecated + * @this {ContextModule} + * @returns {boolean} is recursive + */ + function() { + return this.options.recursive; + }, + "ContextModule.recursive has been moved to ContextModule.options.recursive" + ), + set: util.deprecate( + /** + * @deprecated + * @this {ContextModule} + * @param {boolean} value is recursive + * @returns {void} + */ + function(value) { + this.options.recursive = value; + }, + "ContextModule.recursive has been moved to ContextModule.options.recursive" + ) }); // TODO remove in webpack 5 Object.defineProperty(ContextModule.prototype, "regExp", { configurable: false, - get: util.deprecate(function() { - return this.options.regExp; - }, "ContextModule.regExp has been moved to ContextModule.options.regExp"), - set: util.deprecate(function(value) { - this.options.regExp = value; - }, "ContextModule.regExp has been moved to ContextModule.options.regExp") + get: util.deprecate( + /** + * @deprecated + * @this {ContextModule} + * @returns {RegExp} regular expression + */ + function() { + return this.options.regExp; + }, + "ContextModule.regExp has been moved to ContextModule.options.regExp" + ), + set: util.deprecate( + /** + * @deprecated + * @this {ContextModule} + * @param {RegExp} value Regular expression + * @returns {void} + */ + function(value) { + this.options.regExp = value; + }, + "ContextModule.regExp has been moved to ContextModule.options.regExp" + ) }); // TODO remove in webpack 5 Object.defineProperty(ContextModule.prototype, "addon", { configurable: false, - get: util.deprecate(function() { - return this.options.addon; - }, "ContextModule.addon has been moved to ContextModule.options.addon"), - set: util.deprecate(function(value) { - this.options.addon = value; - }, "ContextModule.addon has been moved to ContextModule.options.addon") + get: util.deprecate( + /** + * @deprecated + * @this {ContextModule} + * @returns {string} addon + */ + function() { + return this.options.addon; + }, + "ContextModule.addon has been moved to ContextModule.options.addon" + ), + set: util.deprecate( + /** + * @deprecated + * @this {ContextModule} + * @param {string} value addon + * @returns {void} + */ + function(value) { + this.options.addon = value; + }, + "ContextModule.addon has been moved to ContextModule.options.addon" + ) }); // TODO remove in webpack 5 Object.defineProperty(ContextModule.prototype, "async", { configurable: false, - get: util.deprecate(function() { - return this.options.mode; - }, "ContextModule.async has been moved to ContextModule.options.mode"), - set: util.deprecate(function(value) { - this.options.mode = value; - }, "ContextModule.async has been moved to ContextModule.options.mode") + get: util.deprecate( + /** + * @deprecated + * @this {ContextModule} + * @returns {boolean} is async + */ + function() { + return this.options.mode; + }, + "ContextModule.async has been moved to ContextModule.options.mode" + ), + set: util.deprecate( + /** + * @deprecated + * @this {ContextModule} + * @param {ContextMode} value Context mode + * @returns {void} + */ + function(value) { + this.options.mode = value; + }, + "ContextModule.async has been moved to ContextModule.options.mode" + ) }); // TODO remove in webpack 5 Object.defineProperty(ContextModule.prototype, "chunkName", { configurable: false, - get: util.deprecate(function() { - return this.options.chunkName; - }, "ContextModule.chunkName has been moved to ContextModule.options.chunkName"), - set: util.deprecate(function(value) { - this.options.chunkName = value; - }, "ContextModule.chunkName has been moved to ContextModule.options.chunkName") + get: util.deprecate( + /** + * @deprecated + * @this {ContextModule} + * @returns {string} chunk name + */ + function() { + return this.options.chunkName; + }, + "ContextModule.chunkName has been moved to ContextModule.options.chunkName" + ), + set: util.deprecate( + /** + * @deprecated + * @this {ContextModule} + * @param {string} value chunk name + * @returns {void} + */ + function(value) { + this.options.chunkName = value; + }, + "ContextModule.chunkName has been moved to ContextModule.options.chunkName" + ) }); module.exports = ContextModule; diff --git a/lib/Module.js b/lib/Module.js index b0a533a85a4..6af4415596d 100644 --- a/lib/Module.js +++ b/lib/Module.js @@ -339,17 +339,35 @@ class Module extends DependenciesBlock { // TODO remove in webpack 5 Object.defineProperty(Module.prototype, "forEachChunk", { configurable: false, - value: util.deprecate(function(fn) { - this._chunks.forEach(fn); - }, "Module.forEachChunk: Use for(const chunk of module.chunksIterable) instead") + value: util.deprecate( + /** + * @deprecated + * @param {function(any, any, Set): void} fn callback function + * @returns {void} + * @this {Module} + */ + function(fn) { + this._chunks.forEach(fn); + }, + "Module.forEachChunk: Use for(const chunk of module.chunksIterable) instead" + ) }); // TODO remove in webpack 5 Object.defineProperty(Module.prototype, "mapChunks", { configurable: false, - value: util.deprecate(function(fn) { - return Array.from(this._chunks, fn); - }, "Module.mapChunks: Use Array.from(module.chunksIterable, fn) instead") + value: util.deprecate( + /** + * @deprecated + * @param {function(any, any): void} fn Mapper function + * @returns {Array} Array of chunks mapped + * @this {Module} + */ + function(fn) { + return Array.from(this._chunks, fn); + }, + "Module.mapChunks: Use Array.from(module.chunksIterable, fn) instead" + ) }); // TODO remove in webpack 5 @@ -366,12 +384,29 @@ Object.defineProperty(Module.prototype, "entry", { // TODO remove in webpack 5 Object.defineProperty(Module.prototype, "meta", { configurable: false, - get: util.deprecate(function() { - return this.buildMeta; - }, "Module.meta was renamed to Module.buildMeta"), - set: util.deprecate(function(value) { - this.buildMeta = value; - }, "Module.meta was renamed to Module.buildMeta") + get: util.deprecate( + /** + * @deprecated + * @returns {void} + * @this {Module} + */ + function() { + return this.buildMeta; + }, + "Module.meta was renamed to Module.buildMeta" + ), + set: util.deprecate( + /** + * @deprecated + * @param {TODO} value Value + * @returns {void} + * @this {Module} + */ + function(value) { + this.buildMeta = value; + }, + "Module.meta was renamed to Module.buildMeta" + ) }); /** @type {function(): string} */ diff --git a/lib/Parser.js b/lib/Parser.js index 515df38771f..787f67d6102 100644 --- a/lib/Parser.js +++ b/lib/Parser.js @@ -2185,9 +2185,18 @@ class Parser extends Tapable { // TODO remove in webpack 5 Object.defineProperty(Parser.prototype, "getCommentOptions", { configurable: false, - value: util.deprecate(function(range) { - return this.parseCommentOptions(range).options; - }, "Parser.getCommentOptions: Use Parser.parseCommentOptions(range) instead") + value: util.deprecate( + /** + * @deprecated + * @param {TODO} range Range + * @returns {void} + * @this {Parser} + */ + function(range) { + return this.parseCommentOptions(range).options; + }, + "Parser.getCommentOptions: Use Parser.parseCommentOptions(range) instead" + ) }); module.exports = Parser; diff --git a/lib/util/SortableSet.js b/lib/util/SortableSet.js index f391f07d0dd..44b692f37ca 100644 --- a/lib/util/SortableSet.js +++ b/lib/util/SortableSet.js @@ -3,6 +3,7 @@ /** * A subset of Set that offers sorting functionality * @template T item type in set + * @extends {Set} */ class SortableSet extends Set { /** diff --git a/lib/util/StackedSetMap.js b/lib/util/StackedSetMap.js index 589b68d52b8..fcf628b0deb 100644 --- a/lib/util/StackedSetMap.js +++ b/lib/util/StackedSetMap.js @@ -128,8 +128,17 @@ class StackedSetMap { } // TODO remove in webpack 5 -StackedSetMap.prototype.push = util.deprecate(function(item) { - this.add(item); -}, "This is no longer an Array: Use add instead."); +StackedSetMap.prototype.push = util.deprecate( + /** + * @deprecated + * @this {StackedSetMap} + * @param {any} item Item to add + * @returns {void} + */ + function(item) { + this.add(item); + }, + "This is no longer an Array: Use add instead." +); module.exports = StackedSetMap; diff --git a/lib/webpack.js b/lib/webpack.js index f5a8af68f95..a8e47460512 100644 --- a/lib/webpack.js +++ b/lib/webpack.js @@ -69,6 +69,7 @@ webpack.WebpackOptionsApply = WebpackOptionsApply; webpack.Compiler = Compiler; webpack.MultiCompiler = MultiCompiler; webpack.NodeEnvironmentPlugin = NodeEnvironmentPlugin; +// @ts-ignore Global @this directive is not supported webpack.validate = validateSchema.bind(this, webpackOptionsSchema); webpack.validateSchema = validateSchema; webpack.WebpackOptionsValidationError = WebpackOptionsValidationError; diff --git a/package.json b/package.json index a22497fff82..d4fbe036ba9 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "script-loader": "~0.7.0", "simple-git": "^1.65.0", "style-loader": "^0.19.1", - "typescript": "^2.9.1", + "typescript": "^3.0.0-dev.20180628", "url-loader": "^0.6.2", "val-loader": "^1.0.2", "vm-browserify": "~0.0.0", diff --git a/tsconfig.json b/tsconfig.json index ab2f8191e11..b4a8a3be59c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,6 +7,7 @@ "checkJs": true, "noEmit": true, "strict": false, + "noImplicitThis": true, "alwaysStrict": true, "types": ["node"], "esModuleInterop": true diff --git a/yarn.lock b/yarn.lock index 037df12f40a..9f4adfa45a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5130,8 +5130,8 @@ preserve@^0.2.0: resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" prettier@^1.13.5: - version "1.13.5" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.5.tgz#7ae2076998c8edce79d63834e9b7b09fead6bfd0" + version "1.13.7" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.7.tgz#850f3b8af784a49a6ea2d2eaa7ed1428a34b7281" pretty-format@^22.4.3: version "22.4.3" @@ -6502,9 +6502,9 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -typescript@^2.9.1: - version "2.9.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c" +typescript@^3.0.0-dev.20180628: + version "3.0.0-dev.20180628" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.0-dev.20180628.tgz#9f70006d4e04daa5bb7a8b9db96e3728683330a6" ua-parser-js@^0.7.9: version "0.7.18" From 57f21c0d2094bef96582f17b28050657d5813fec Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Thu, 5 Jul 2018 08:20:24 +0300 Subject: [PATCH 133/310] Add JSDoc types for ContextExclusionPlugin --- lib/ContextExclusionPlugin.js | 15 ++++++++++++++- lib/ContextModuleFactory.js | 6 ++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/lib/ContextExclusionPlugin.js b/lib/ContextExclusionPlugin.js index 1333e9dbcfd..092ca04fe67 100644 --- a/lib/ContextExclusionPlugin.js +++ b/lib/ContextExclusionPlugin.js @@ -1,12 +1,25 @@ "use strict"; +/** @typedef {import("./Compiler")} Compiler */ +/** @typedef {import("./ContextModuleFactory")} ContextModuleFactory */ + class ContextExclusionPlugin { + /** + * @param {RegExp} negativeMatcher Matcher regular expression + */ constructor(negativeMatcher) { this.negativeMatcher = negativeMatcher; } + /** + * Apply the plugin + * @param {Compiler} compiler Webpack Compiler + * @returns {void} + */ apply(compiler) { - compiler.hooks.contextModuleFactory.tap("ContextExclusionPlugin", cmf => { + compiler.hooks.contextModuleFactory.tap("ContextExclusionPlugin", ( + /** @type {ContextModuleFactory} */ cmf + ) => { cmf.hooks.contextModuleFiles.tap("ContextExclusionPlugin", files => { return files.filter(filePath => !this.negativeMatcher.test(filePath)); }); diff --git a/lib/ContextModuleFactory.js b/lib/ContextModuleFactory.js index 2a52a58f058..f5941128813 100644 --- a/lib/ContextModuleFactory.js +++ b/lib/ContextModuleFactory.js @@ -15,15 +15,21 @@ const { const ContextModule = require("./ContextModule"); const ContextElementDependency = require("./dependencies/ContextElementDependency"); +/** @typedef {import("./Module")} Module */ + const EMPTY_RESOLVE_OPTIONS = {}; module.exports = class ContextModuleFactory extends Tapable { constructor(resolverFactory) { super(); this.hooks = { + /** @type {AsyncSeriesWaterfallHook} */ beforeResolve: new AsyncSeriesWaterfallHook(["data"]), + /** @type {AsyncSeriesWaterfallHook} */ afterResolve: new AsyncSeriesWaterfallHook(["data"]), + /** @type {SyncWaterfallHook} */ contextModuleFiles: new SyncWaterfallHook(["files"]), + /** @type {SyncWaterfallHook} */ alternatives: new AsyncSeriesWaterfallHook(["modules"]) }; this._pluginCompat.tap("ContextModuleFactory", options => { From 3b6f4756351d95fde359695fbc317b4e3f2c4e2f Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 5 Jul 2018 10:32:53 +0200 Subject: [PATCH 134/310] Use push null to end the stream --- lib/debug/ProfilingPlugin.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/debug/ProfilingPlugin.js b/lib/debug/ProfilingPlugin.js index a8ba8a2165c..ea65b35905d 100644 --- a/lib/debug/ProfilingPlugin.js +++ b/lib/debug/ProfilingPlugin.js @@ -137,9 +137,7 @@ const createTrace = outputPath => { callback(); }); // Tear down the readable trace stream. - if (trace.destroy) { - trace.destroy(); - } + trace.push(null); } }; }; From 6172d3c2ebddceedec1c28e0e92fe3b2a3dc0c38 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 5 Jul 2018 11:25:34 +0200 Subject: [PATCH 135/310] fix memory leak with HMR fixes #6929 --- lib/HotModuleReplacementPlugin.js | 230 +++++++++++++++--------------- 1 file changed, 114 insertions(+), 116 deletions(-) diff --git a/lib/HotModuleReplacementPlugin.js b/lib/HotModuleReplacementPlugin.js index 4b0edac7241..fa893aa3d69 100644 --- a/lib/HotModuleReplacementPlugin.js +++ b/lib/HotModuleReplacementPlugin.js @@ -35,6 +35,118 @@ module.exports = class HotModuleReplacementPlugin { return callback(); } ); + + const addParserPlugins = (parser, parserOptions) => { + parser.hooks.expression + .for("__webpack_hash__") + .tap( + "HotModuleReplacementPlugin", + ParserHelpers.toConstantDependencyWithWebpackRequire( + parser, + "__webpack_require__.h()" + ) + ); + parser.hooks.evaluateTypeof + .for("__webpack_hash__") + .tap( + "HotModuleReplacementPlugin", + ParserHelpers.evaluateToString("string") + ); + parser.hooks.evaluateIdentifier.for("module.hot").tap( + { + name: "HotModuleReplacementPlugin", + before: "NodeStuffPlugin" + }, + expr => { + return ParserHelpers.evaluateToIdentifier( + "module.hot", + !!parser.state.compilation.hotUpdateChunkTemplate + )(expr); + } + ); + // TODO webpack 5: refactor this, no custom hooks + if (!parser.hooks.hotAcceptCallback) { + parser.hooks.hotAcceptCallback = new SyncBailHook([ + "expression", + "requests" + ]); + } + if (!parser.hooks.hotAcceptWithoutCallback) { + parser.hooks.hotAcceptWithoutCallback = new SyncBailHook([ + "expression", + "requests" + ]); + } + parser.hooks.call + .for("module.hot.accept") + .tap("HotModuleReplacementPlugin", expr => { + if (!parser.state.compilation.hotUpdateChunkTemplate) { + return false; + } + if (expr.arguments.length >= 1) { + const arg = parser.evaluateExpression(expr.arguments[0]); + let params = []; + let requests = []; + if (arg.isString()) { + params = [arg]; + } else if (arg.isArray()) { + params = arg.items.filter(param => param.isString()); + } + if (params.length > 0) { + params.forEach((param, idx) => { + const request = param.string; + const dep = new ModuleHotAcceptDependency(request, param.range); + dep.optional = true; + dep.loc = Object.create(expr.loc); + dep.loc.index = idx; + parser.state.module.addDependency(dep); + requests.push(request); + }); + if (expr.arguments.length > 1) { + parser.hooks.hotAcceptCallback.call( + expr.arguments[1], + requests + ); + parser.walkExpression(expr.arguments[1]); // other args are ignored + return true; + } else { + parser.hooks.hotAcceptWithoutCallback.call(expr, requests); + return true; + } + } + } + }); + parser.hooks.call + .for("module.hot.decline") + .tap("HotModuleReplacementPlugin", expr => { + if (!parser.state.compilation.hotUpdateChunkTemplate) { + return false; + } + if (expr.arguments.length === 1) { + const arg = parser.evaluateExpression(expr.arguments[0]); + let params = []; + if (arg.isString()) { + params = [arg]; + } else if (arg.isArray()) { + params = arg.items.filter(param => param.isString()); + } + params.forEach((param, idx) => { + const dep = new ModuleHotDeclineDependency( + param.string, + param.range + ); + dep.optional = true; + dep.loc = Object.create(expr.loc); + dep.loc.index = idx; + parser.state.module.addDependency(dep); + }); + } + }); + parser.hooks.expression + .for("module.hot") + .tap("HotModuleReplacementPlugin", ParserHelpers.skipTraversal); + }; + compiler.hooks.compilation.tap( "HotModuleReplacementPlugin", (compilation, { normalModuleFactory }) => { @@ -275,127 +387,13 @@ module.exports = class HotModuleReplacementPlugin { } ); - const handler = (parser, parserOptions) => { - parser.hooks.expression - .for("__webpack_hash__") - .tap( - "HotModuleReplacementPlugin", - ParserHelpers.toConstantDependencyWithWebpackRequire( - parser, - "__webpack_require__.h()" - ) - ); - parser.hooks.evaluateTypeof - .for("__webpack_hash__") - .tap( - "HotModuleReplacementPlugin", - ParserHelpers.evaluateToString("string") - ); - parser.hooks.evaluateIdentifier.for("module.hot").tap( - { - name: "HotModuleReplacementPlugin", - before: "NodeStuffPlugin" - }, - expr => { - return ParserHelpers.evaluateToIdentifier( - "module.hot", - !!parser.state.compilation.hotUpdateChunkTemplate - )(expr); - } - ); - // TODO webpack 5: refactor this, no custom hooks - if (!parser.hooks.hotAcceptCallback) { - parser.hooks.hotAcceptCallback = new SyncBailHook([ - "expression", - "requests" - ]); - } - if (!parser.hooks.hotAcceptWithoutCallback) { - parser.hooks.hotAcceptWithoutCallback = new SyncBailHook([ - "expression", - "requests" - ]); - } - parser.hooks.call - .for("module.hot.accept") - .tap("HotModuleReplacementPlugin", expr => { - if (!parser.state.compilation.hotUpdateChunkTemplate) { - return false; - } - if (expr.arguments.length >= 1) { - const arg = parser.evaluateExpression(expr.arguments[0]); - let params = []; - let requests = []; - if (arg.isString()) { - params = [arg]; - } else if (arg.isArray()) { - params = arg.items.filter(param => param.isString()); - } - if (params.length > 0) { - params.forEach((param, idx) => { - const request = param.string; - const dep = new ModuleHotAcceptDependency( - request, - param.range - ); - dep.optional = true; - dep.loc = Object.create(expr.loc); - dep.loc.index = idx; - parser.state.module.addDependency(dep); - requests.push(request); - }); - if (expr.arguments.length > 1) { - parser.hooks.hotAcceptCallback.call( - expr.arguments[1], - requests - ); - parser.walkExpression(expr.arguments[1]); // other args are ignored - return true; - } else { - parser.hooks.hotAcceptWithoutCallback.call(expr, requests); - return true; - } - } - } - }); - parser.hooks.call - .for("module.hot.decline") - .tap("HotModuleReplacementPlugin", expr => { - if (!parser.state.compilation.hotUpdateChunkTemplate) { - return false; - } - if (expr.arguments.length === 1) { - const arg = parser.evaluateExpression(expr.arguments[0]); - let params = []; - if (arg.isString()) { - params = [arg]; - } else if (arg.isArray()) { - params = arg.items.filter(param => param.isString()); - } - params.forEach((param, idx) => { - const dep = new ModuleHotDeclineDependency( - param.string, - param.range - ); - dep.optional = true; - dep.loc = Object.create(expr.loc); - dep.loc.index = idx; - parser.state.module.addDependency(dep); - }); - } - }); - parser.hooks.expression - .for("module.hot") - .tap("HotModuleReplacementPlugin", ParserHelpers.skipTraversal); - }; - // TODO add HMR support for javascript/esm normalModuleFactory.hooks.parser .for("javascript/auto") - .tap("HotModuleReplacementPlugin", handler); + .tap("HotModuleReplacementPlugin", addParserPlugins); normalModuleFactory.hooks.parser .for("javascript/dynamic") - .tap("HotModuleReplacementPlugin", handler); + .tap("HotModuleReplacementPlugin", addParserPlugins); compilation.hooks.normalModuleLoader.tap( "HotModuleReplacementPlugin", From 64b22c4806f0888f99081c322266d584d24fbed9 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 5 Jul 2018 12:50:51 +0200 Subject: [PATCH 136/310] make the cache a WeakMap to not leak memory fixes #6929 --- lib/optimize/SplitChunksPlugin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/optimize/SplitChunksPlugin.js b/lib/optimize/SplitChunksPlugin.js index d56e2699399..60293603bf8 100644 --- a/lib/optimize/SplitChunksPlugin.js +++ b/lib/optimize/SplitChunksPlugin.js @@ -135,7 +135,8 @@ module.exports = class SplitChunksPlugin { static normalizeName({ name, automaticNameDelimiter }) { if (name === true) { - const cache = new Map(); + /** @type {WeakMap>} */ + const cache = new WeakMap(); const fn = (module, chunks, cacheGroup) => { let cacheEntry = cache.get(chunks); if (cacheEntry === undefined) { From 8e8f1856e95dd59bfe9313e07f9e25e2ac6c062c Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 5 Jul 2018 13:19:55 +0200 Subject: [PATCH 137/310] fixes usage of automaticNameDelimiter in cache groups --- lib/optimize/SplitChunksPlugin.js | 5 + .../__snapshots__/StatsTestCases.test.js.snap | 148 ++++++++++-------- .../statsCases/split-chunks-max-size/index.js | 5 + .../split-chunks-max-size/node_modules/big.js | 4 + .../node_modules/small.js | 1 + .../node_modules/very-big.js | 24 +++ .../split-chunks-max-size/webpack.config.js | 6 +- 7 files changed, 125 insertions(+), 68 deletions(-) create mode 100644 test/statsCases/split-chunks-max-size/node_modules/big.js create mode 100644 test/statsCases/split-chunks-max-size/node_modules/small.js create mode 100644 test/statsCases/split-chunks-max-size/node_modules/very-big.js diff --git a/lib/optimize/SplitChunksPlugin.js b/lib/optimize/SplitChunksPlugin.js index d56e2699399..e607230a6df 100644 --- a/lib/optimize/SplitChunksPlugin.js +++ b/lib/optimize/SplitChunksPlugin.js @@ -126,6 +126,7 @@ module.exports = class SplitChunksPlugin { cacheGroups: options.cacheGroups, automaticNameDelimiter: options.automaticNameDelimiter }), + automaticNameDelimiter: options.automaticNameDelimiter, fallbackCacheGroup: SplitChunksPlugin.normalizeFallbackCacheGroup( options.fallbackCacheGroup || {}, options @@ -556,6 +557,10 @@ module.exports = class SplitChunksPlugin { cacheGroupSource.filename !== undefined ? cacheGroupSource.filename : this.options.filename, + automaticNameDelimiter: + cacheGroupSource.automaticNameDelimiter !== undefined + ? cacheGroupSource.automaticNameDelimiter + : this.options.automaticNameDelimiter, reuseExistingChunk: cacheGroupSource.reuseExistingChunk }; // For all combination of chunk selection diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index ca7b99a36fc..babc4a7d2c5 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -2774,90 +2774,98 @@ chunk {3} b.js (b) 43 bytes >{0}< >{1}< [entry] [rendered] exports[`StatsTestCases should print correct stats for split-chunks-max-size 1`] = ` "Child production: - Entrypoint main = prod-main~6e7ead72.js prod-main~6a2ae26b.js prod-main~17acad98.js prod-main~b2c7414a.js prod-main~75f09de8.js prod-main~052b3814.js prod-main~3ff27526.js prod-main~11485824.js prod-main~c6931360.js prod-main~cd7c5bfc.js prod-main~02369f19.js - chunk {0} prod-main~02369f19.js (main~02369f19) 1.57 KiB ={1}= ={10}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [entry] [rendered] + Entrypoint main = prod-vendors~main~7274e1de.js prod-vendors~main~0feae4ad.js prod-main~6e7ead72.js prod-main~6a2ae26b.js prod-main~17acad98.js prod-main~b2c7414a.js prod-main~75f09de8.js prod-main~052b3814.js prod-main~3ff27526.js prod-main~11485824.js prod-main~c6931360.js prod-main~cd7c5bfc.js prod-main~02369f19.js + chunk {0} prod-main~02369f19.js (main~02369f19) 1.57 KiB ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [entry] [rendered] > ./ main [11] ./very-big.js?1 1.57 KiB {0} [built] - chunk {1} prod-main~6e7ead72.js (main~6e7ead72) 536 bytes ={0}= ={10}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + chunk {1} prod-vendors~main~0feae4ad.js (vendors~main~0feae4ad) 1.57 KiB ={0}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~main) > ./ main - [0] ./big.js?1 268 bytes {1} [built] - [1] ./big.js?2 268 bytes {1} [built] - chunk {2} prod-main~6a2ae26b.js (main~6a2ae26b) 536 bytes ={0}= ={1}= ={10}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + [43] ./node_modules/very-big.js?1 1.57 KiB {1} [built] + chunk {2} prod-main~6e7ead72.js (main~6e7ead72) 536 bytes ={0}= ={1}= ={10}= ={11}= ={12}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] > ./ main - [34] ./in-some-directory/big.js?1 268 bytes {2} [built] - [35] ./in-some-directory/small.js?1 67 bytes {2} [built] - [36] ./in-some-directory/small.js?2 67 bytes {2} [built] - [37] ./in-some-directory/small.js?3 67 bytes {2} [built] - [38] ./in-some-directory/small.js?4 67 bytes {2} [built] - chunk {3} prod-main~17acad98.js (main~17acad98) 1.57 KiB ={0}= ={1}= ={10}= ={2}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + [0] ./big.js?1 268 bytes {2} [built] + [1] ./big.js?2 268 bytes {2} [built] + chunk {3} prod-main~6a2ae26b.js (main~6a2ae26b) 536 bytes ={0}= ={1}= ={10}= ={11}= ={12}= ={2}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] > ./ main - [39] ./in-some-directory/very-big.js?1 1.57 KiB {3} [built] - chunk {4} prod-main~b2c7414a.js (main~b2c7414a) 1.11 KiB ={0}= ={1}= ={10}= ={2}= ={3}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + [34] ./in-some-directory/big.js?1 268 bytes {3} [built] + [35] ./in-some-directory/small.js?1 67 bytes {3} [built] + [36] ./in-some-directory/small.js?2 67 bytes {3} [built] + [37] ./in-some-directory/small.js?3 67 bytes {3} [built] + [38] ./in-some-directory/small.js?4 67 bytes {3} [built] + chunk {4} prod-main~17acad98.js (main~17acad98) 1.57 KiB ={0}= ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] > ./ main - [40] ./index.js 1.11 KiB {4} [built] - chunk {5} prod-main~75f09de8.js (main~75f09de8) 603 bytes ={0}= ={1}= ={10}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + [39] ./in-some-directory/very-big.js?1 1.57 KiB {4} [built] + chunk {5} prod-main~b2c7414a.js (main~b2c7414a) 1.19 KiB ={0}= ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] > ./ main - [25] ./inner-module/small.js?1 67 bytes {5} [built] - [26] ./inner-module/small.js?2 67 bytes {5} [built] - [27] ./inner-module/small.js?3 67 bytes {5} [built] - [28] ./inner-module/small.js?4 67 bytes {5} [built] - [29] ./inner-module/small.js?5 67 bytes {5} [built] - [30] ./inner-module/small.js?6 67 bytes {5} [built] - [31] ./inner-module/small.js?7 67 bytes {5} [built] - [32] ./inner-module/small.js?8 67 bytes {5} [built] - [33] ./inner-module/small.js?9 67 bytes {5} [built] - chunk {6} prod-main~052b3814.js (main~052b3814) 603 bytes ={0}= ={1}= ={10}= ={2}= ={3}= ={4}= ={5}= ={7}= ={8}= ={9}= [initial] [rendered] + [44] ./index.js 1.19 KiB {5} [built] + chunk {6} prod-main~75f09de8.js (main~75f09de8) 603 bytes ={0}= ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={7}= ={8}= ={9}= [initial] [rendered] > ./ main - [2] ./small.js?1 67 bytes {6} [built] - [3] ./small.js?2 67 bytes {6} [built] - [4] ./small.js?3 67 bytes {6} [built] - [5] ./small.js?4 67 bytes {6} [built] - [6] ./small.js?5 67 bytes {6} [built] - [7] ./small.js?6 67 bytes {6} [built] - [8] ./small.js?7 67 bytes {6} [built] - [9] ./small.js?8 67 bytes {6} [built] - [10] ./small.js?9 67 bytes {6} [built] - chunk {7} prod-main~3ff27526.js (main~3ff27526) 536 bytes ={0}= ={1}= ={10}= ={2}= ={3}= ={4}= ={5}= ={6}= ={8}= ={9}= [initial] [rendered] + [25] ./inner-module/small.js?1 67 bytes {6} [built] + [26] ./inner-module/small.js?2 67 bytes {6} [built] + [27] ./inner-module/small.js?3 67 bytes {6} [built] + [28] ./inner-module/small.js?4 67 bytes {6} [built] + [29] ./inner-module/small.js?5 67 bytes {6} [built] + [30] ./inner-module/small.js?6 67 bytes {6} [built] + [31] ./inner-module/small.js?7 67 bytes {6} [built] + [32] ./inner-module/small.js?8 67 bytes {6} [built] + [33] ./inner-module/small.js?9 67 bytes {6} [built] + chunk {7} prod-main~052b3814.js (main~052b3814) 603 bytes ={0}= ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={8}= ={9}= [initial] [rendered] > ./ main - [14] ./subfolder/big.js?1 268 bytes {7} [built] - [15] ./subfolder/big.js?2 268 bytes {7} [built] - chunk {8} prod-main~11485824.js (main~11485824) 603 bytes ={0}= ={1}= ={10}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={9}= [initial] [rendered] + [2] ./small.js?1 67 bytes {7} [built] + [3] ./small.js?2 67 bytes {7} [built] + [4] ./small.js?3 67 bytes {7} [built] + [5] ./small.js?4 67 bytes {7} [built] + [6] ./small.js?5 67 bytes {7} [built] + [7] ./small.js?6 67 bytes {7} [built] + [8] ./small.js?7 67 bytes {7} [built] + [9] ./small.js?8 67 bytes {7} [built] + [10] ./small.js?9 67 bytes {7} [built] + chunk {8} prod-main~3ff27526.js (main~3ff27526) 536 bytes ={0}= ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={9}= [initial] [rendered] > ./ main - [16] ./subfolder/small.js?1 67 bytes {8} [built] - [17] ./subfolder/small.js?2 67 bytes {8} [built] - [18] ./subfolder/small.js?3 67 bytes {8} [built] - [19] ./subfolder/small.js?4 67 bytes {8} [built] - [20] ./subfolder/small.js?5 67 bytes {8} [built] - [21] ./subfolder/small.js?6 67 bytes {8} [built] - [22] ./subfolder/small.js?7 67 bytes {8} [built] - [23] ./subfolder/small.js?8 67 bytes {8} [built] - [24] ./subfolder/small.js?9 67 bytes {8} [built] - chunk {9} prod-main~c6931360.js (main~c6931360) 1.57 KiB ={0}= ={1}= ={10}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= [initial] [rendered] + [14] ./subfolder/big.js?1 268 bytes {8} [built] + [15] ./subfolder/big.js?2 268 bytes {8} [built] + chunk {9} prod-main~11485824.js (main~11485824) 603 bytes ={0}= ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= [initial] [rendered] > ./ main - [12] ./very-big.js?2 1.57 KiB {9} [built] - chunk {10} prod-main~cd7c5bfc.js (main~cd7c5bfc) 1.57 KiB ={0}= ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + [16] ./subfolder/small.js?1 67 bytes {9} [built] + [17] ./subfolder/small.js?2 67 bytes {9} [built] + [18] ./subfolder/small.js?3 67 bytes {9} [built] + [19] ./subfolder/small.js?4 67 bytes {9} [built] + [20] ./subfolder/small.js?5 67 bytes {9} [built] + [21] ./subfolder/small.js?6 67 bytes {9} [built] + [22] ./subfolder/small.js?7 67 bytes {9} [built] + [23] ./subfolder/small.js?8 67 bytes {9} [built] + [24] ./subfolder/small.js?9 67 bytes {9} [built] + chunk {10} prod-main~c6931360.js (main~c6931360) 1.57 KiB ={0}= ={1}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] > ./ main - [13] ./very-big.js?3 1.57 KiB {10} [built] + [12] ./very-big.js?2 1.57 KiB {10} [built] + chunk {11} prod-main~cd7c5bfc.js (main~cd7c5bfc) 1.57 KiB ={0}= ={1}= ={10}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + > ./ main + [13] ./very-big.js?3 1.57 KiB {11} [built] + chunk {12} prod-vendors~main~7274e1de.js (vendors~main~7274e1de) 402 bytes ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + > ./ main + [40] ./node_modules/big.js?1 268 bytes {12} [built] + [41] ./node_modules/small.js?1 67 bytes {12} [built] + [42] ./node_modules/small.js?2 67 bytes {12} [built] Child development: - Entrypoint main = dev-main~._big.js~1.js dev-main~._in-some-directory_b.js dev-main~._in-some-directory_very-big.js~8d76cf03.js dev-main~._index.js~41f5a26e.js dev-main~._inner-module_small.js~3.js dev-main~._small.js~1.js dev-main~._subfolder_big.js~b.js dev-main~._subfolder_small.js~1.js dev-main~._very-big.js~08cf55cf.js dev-main~._very-big.js~4647fb9d.js dev-main~._very-big.js~62f7f644.js - chunk {main~._big.js~1} dev-main~._big.js~1.js (main~._big.js~1) 536 bytes ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= [initial] [rendered] + Entrypoint main = dev-vendors~main~._node_modules_b.js dev-vendors~main~._node_modules_very-big.js~6bdbed7b.js dev-main~._big.js~1.js dev-main~._in-some-directory_b.js dev-main~._in-some-directory_very-big.js~8d76cf03.js dev-main~._index.js~41f5a26e.js dev-main~._inner-module_small.js~3.js dev-main~._small.js~1.js dev-main~._subfolder_big.js~b.js dev-main~._subfolder_small.js~1.js dev-main~._very-big.js~08cf55cf.js dev-main~._very-big.js~4647fb9d.js dev-main~._very-big.js~62f7f644.js + chunk {main~._big.js~1} dev-main~._big.js~1.js (main~._big.js~1) 536 bytes ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= ={vendors~main~._node_modules_b}= ={vendors~main~._node_modules_very-big.js~6bdbed7b}= [initial] [rendered] > ./ main [./big.js?1] 268 bytes {main~._big.js~1} [built] [./big.js?2] 268 bytes {main~._big.js~1} [built] - chunk {main~._in-some-directory_b} dev-main~._in-some-directory_b.js (main~._in-some-directory_b) 536 bytes ={main~._big.js~1}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= [initial] [rendered] + chunk {main~._in-some-directory_b} dev-main~._in-some-directory_b.js (main~._in-some-directory_b) 536 bytes ={main~._big.js~1}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= ={vendors~main~._node_modules_b}= ={vendors~main~._node_modules_very-big.js~6bdbed7b}= [initial] [rendered] > ./ main [./in-some-directory/big.js?1] 268 bytes {main~._in-some-directory_b} [built] [./in-some-directory/small.js?1] 67 bytes {main~._in-some-directory_b} [built] [./in-some-directory/small.js?2] 67 bytes {main~._in-some-directory_b} [built] [./in-some-directory/small.js?3] 67 bytes {main~._in-some-directory_b} [built] [./in-some-directory/small.js?4] 67 bytes {main~._in-some-directory_b} [built] - chunk {main~._in-some-directory_very-big.js~8d76cf03} dev-main~._in-some-directory_very-big.js~8d76cf03.js (main~._in-some-directory_very-big.js~8d76cf03) 1.57 KiB ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= [initial] [rendered] + chunk {main~._in-some-directory_very-big.js~8d76cf03} dev-main~._in-some-directory_very-big.js~8d76cf03.js (main~._in-some-directory_very-big.js~8d76cf03) 1.57 KiB ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= ={vendors~main~._node_modules_b}= ={vendors~main~._node_modules_very-big.js~6bdbed7b}= [initial] [rendered] > ./ main [./in-some-directory/very-big.js?1] 1.57 KiB {main~._in-some-directory_very-big.js~8d76cf03} [built] - chunk {main~._index.js~41f5a26e} dev-main~._index.js~41f5a26e.js (main~._index.js~41f5a26e) 1.11 KiB ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= [initial] [rendered] + chunk {main~._index.js~41f5a26e} dev-main~._index.js~41f5a26e.js (main~._index.js~41f5a26e) 1.19 KiB ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= ={vendors~main~._node_modules_b}= ={vendors~main~._node_modules_very-big.js~6bdbed7b}= [initial] [rendered] > ./ main - [./index.js] 1.11 KiB {main~._index.js~41f5a26e} [built] - chunk {main~._inner-module_small.js~3} dev-main~._inner-module_small.js~3.js (main~._inner-module_small.js~3) 603 bytes ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= [initial] [rendered] + [./index.js] 1.19 KiB {main~._index.js~41f5a26e} [built] + chunk {main~._inner-module_small.js~3} dev-main~._inner-module_small.js~3.js (main~._inner-module_small.js~3) 603 bytes ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= ={vendors~main~._node_modules_b}= ={vendors~main~._node_modules_very-big.js~6bdbed7b}= [initial] [rendered] > ./ main [./inner-module/small.js?1] 67 bytes {main~._inner-module_small.js~3} [built] [./inner-module/small.js?2] 67 bytes {main~._inner-module_small.js~3} [built] @@ -2868,7 +2876,7 @@ Child development: [./inner-module/small.js?7] 67 bytes {main~._inner-module_small.js~3} [built] [./inner-module/small.js?8] 67 bytes {main~._inner-module_small.js~3} [built] [./inner-module/small.js?9] 67 bytes {main~._inner-module_small.js~3} [built] - chunk {main~._small.js~1} dev-main~._small.js~1.js (main~._small.js~1) 603 bytes ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= [initial] [rendered] + chunk {main~._small.js~1} dev-main~._small.js~1.js (main~._small.js~1) 603 bytes ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= ={vendors~main~._node_modules_b}= ={vendors~main~._node_modules_very-big.js~6bdbed7b}= [initial] [rendered] > ./ main [./small.js?1] 67 bytes {main~._small.js~1} [built] [./small.js?2] 67 bytes {main~._small.js~1} [built] @@ -2879,11 +2887,11 @@ Child development: [./small.js?7] 67 bytes {main~._small.js~1} [built] [./small.js?8] 67 bytes {main~._small.js~1} [built] [./small.js?9] 67 bytes {main~._small.js~1} [built] - chunk {main~._subfolder_big.js~b} dev-main~._subfolder_big.js~b.js (main~._subfolder_big.js~b) 536 bytes ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= [initial] [rendered] + chunk {main~._subfolder_big.js~b} dev-main~._subfolder_big.js~b.js (main~._subfolder_big.js~b) 536 bytes ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= ={vendors~main~._node_modules_b}= ={vendors~main~._node_modules_very-big.js~6bdbed7b}= [initial] [rendered] > ./ main [./subfolder/big.js?1] 268 bytes {main~._subfolder_big.js~b} [built] [./subfolder/big.js?2] 268 bytes {main~._subfolder_big.js~b} [built] - chunk {main~._subfolder_small.js~1} dev-main~._subfolder_small.js~1.js (main~._subfolder_small.js~1) 603 bytes ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= [initial] [rendered] + chunk {main~._subfolder_small.js~1} dev-main~._subfolder_small.js~1.js (main~._subfolder_small.js~1) 603 bytes ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= ={vendors~main~._node_modules_b}= ={vendors~main~._node_modules_very-big.js~6bdbed7b}= [initial] [rendered] > ./ main [./subfolder/small.js?1] 67 bytes {main~._subfolder_small.js~1} [built] [./subfolder/small.js?2] 67 bytes {main~._subfolder_small.js~1} [built] @@ -2894,15 +2902,23 @@ Child development: [./subfolder/small.js?7] 67 bytes {main~._subfolder_small.js~1} [built] [./subfolder/small.js?8] 67 bytes {main~._subfolder_small.js~1} [built] [./subfolder/small.js?9] 67 bytes {main~._subfolder_small.js~1} [built] - chunk {main~._very-big.js~08cf55cf} dev-main~._very-big.js~08cf55cf.js (main~._very-big.js~08cf55cf) 1.57 KiB ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= [initial] [rendered] + chunk {main~._very-big.js~08cf55cf} dev-main~._very-big.js~08cf55cf.js (main~._very-big.js~08cf55cf) 1.57 KiB ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= ={vendors~main~._node_modules_b}= ={vendors~main~._node_modules_very-big.js~6bdbed7b}= [initial] [rendered] > ./ main [./very-big.js?2] 1.57 KiB {main~._very-big.js~08cf55cf} [built] - chunk {main~._very-big.js~4647fb9d} dev-main~._very-big.js~4647fb9d.js (main~._very-big.js~4647fb9d) 1.57 KiB ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~62f7f644}= [initial] [rendered] + chunk {main~._very-big.js~4647fb9d} dev-main~._very-big.js~4647fb9d.js (main~._very-big.js~4647fb9d) 1.57 KiB ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~62f7f644}= ={vendors~main~._node_modules_b}= ={vendors~main~._node_modules_very-big.js~6bdbed7b}= [initial] [rendered] > ./ main [./very-big.js?3] 1.57 KiB {main~._very-big.js~4647fb9d} [built] - chunk {main~._very-big.js~62f7f644} dev-main~._very-big.js~62f7f644.js (main~._very-big.js~62f7f644) 1.57 KiB ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= [entry] [rendered] + chunk {main~._very-big.js~62f7f644} dev-main~._very-big.js~62f7f644.js (main~._very-big.js~62f7f644) 1.57 KiB ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={vendors~main~._node_modules_b}= ={vendors~main~._node_modules_very-big.js~6bdbed7b}= [entry] [rendered] + > ./ main + [./very-big.js?1] 1.57 KiB {main~._very-big.js~62f7f644} [built] + chunk {vendors~main~._node_modules_b} dev-vendors~main~._node_modules_b.js (vendors~main~._node_modules_b) 402 bytes ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= ={vendors~main~._node_modules_very-big.js~6bdbed7b}= [initial] [rendered] + > ./ main + [./node_modules/big.js?1] 268 bytes {vendors~main~._node_modules_b} [built] + [./node_modules/small.js?1] 67 bytes {vendors~main~._node_modules_b} [built] + [./node_modules/small.js?2] 67 bytes {vendors~main~._node_modules_b} [built] + chunk {vendors~main~._node_modules_very-big.js~6bdbed7b} dev-vendors~main~._node_modules_very-big.js~6bdbed7b.js (vendors~main~._node_modules_very-big.js~6bdbed7b) 1.57 KiB ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= ={vendors~main~._node_modules_b}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~main) > ./ main - [./very-big.js?1] 1.57 KiB {main~._very-big.js~62f7f644} [built]" + [./node_modules/very-big.js?1] 1.57 KiB {vendors~main~._node_modules_very-big.js~6bdbed7b} [built]" `; exports[`StatsTestCases should print correct stats for split-chunks-prefer-bigger-splits 1`] = ` diff --git a/test/statsCases/split-chunks-max-size/index.js b/test/statsCases/split-chunks-max-size/index.js index 5b5a81edd66..28dd561398c 100644 --- a/test/statsCases/split-chunks-max-size/index.js +++ b/test/statsCases/split-chunks-max-size/index.js @@ -41,3 +41,8 @@ import "./in-some-directory/small?2"; import "./in-some-directory/small?3"; import "./in-some-directory/small?4"; import "./in-some-directory/very-big?1"; + +import "big?1"; +import "small?1"; +import "small?2"; +import "very-big?1"; diff --git a/test/statsCases/split-chunks-max-size/node_modules/big.js b/test/statsCases/split-chunks-max-size/node_modules/big.js new file mode 100644 index 00000000000..40380e42352 --- /dev/null +++ b/test/statsCases/split-chunks-max-size/node_modules/big.js @@ -0,0 +1,4 @@ +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content diff --git a/test/statsCases/split-chunks-max-size/node_modules/small.js b/test/statsCases/split-chunks-max-size/node_modules/small.js new file mode 100644 index 00000000000..1f44b439eae --- /dev/null +++ b/test/statsCases/split-chunks-max-size/node_modules/small.js @@ -0,0 +1 @@ +// content content content content content content content content diff --git a/test/statsCases/split-chunks-max-size/node_modules/very-big.js b/test/statsCases/split-chunks-max-size/node_modules/very-big.js new file mode 100644 index 00000000000..4c943771c37 --- /dev/null +++ b/test/statsCases/split-chunks-max-size/node_modules/very-big.js @@ -0,0 +1,24 @@ +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content +// content content content content content content content content diff --git a/test/statsCases/split-chunks-max-size/webpack.config.js b/test/statsCases/split-chunks-max-size/webpack.config.js index 3987fc2a86f..d153a580913 100644 --- a/test/statsCases/split-chunks-max-size/webpack.config.js +++ b/test/statsCases/split-chunks-max-size/webpack.config.js @@ -21,7 +21,8 @@ module.exports = [ optimization: { splitChunks: { minSize: 100, - maxSize: 1000 + maxSize: 1000, + chunks: "all" } }, stats @@ -38,7 +39,8 @@ module.exports = [ optimization: { splitChunks: { minSize: 100, - maxSize: 1000 + maxSize: 1000, + chunks: "all" } }, stats From 14968acc000d40dcc67b7ba8911dca40ce611f51 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 2 Jul 2018 10:15:13 +0200 Subject: [PATCH 138/310] add automaticNamePrefix option allow automaticNameDelimiter on cacheGroup level --- lib/WebpackOptionsDefaulter.js | 2 ++ lib/optimize/SplitChunksPlugin.js | 33 +++++++++++++++++-------------- schemas/WebpackOptions.json | 9 +++++++++ 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/lib/WebpackOptionsDefaulter.js b/lib/WebpackOptionsDefaulter.js index 3f9da0b72d2..f711b27de2f 100644 --- a/lib/WebpackOptionsDefaulter.js +++ b/lib/WebpackOptionsDefaulter.js @@ -233,11 +233,13 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { this.set("optimization.splitChunks.name", true); this.set("optimization.splitChunks.cacheGroups", {}); this.set("optimization.splitChunks.cacheGroups.default", { + automaticNamePrefix: "", reuseExistingChunk: true, minChunks: 2, priority: -20 }); this.set("optimization.splitChunks.cacheGroups.vendors", { + automaticNamePrefix: "vendors", test: /[\\/]node_modules[\\/]/, priority: -10 }); diff --git a/lib/optimize/SplitChunksPlugin.js b/lib/optimize/SplitChunksPlugin.js index d56e2699399..c33fec9db3e 100644 --- a/lib/optimize/SplitChunksPlugin.js +++ b/lib/optimize/SplitChunksPlugin.js @@ -115,15 +115,11 @@ module.exports = class SplitChunksPlugin { minChunks: options.minChunks || 1, maxAsyncRequests: options.maxAsyncRequests || 1, maxInitialRequests: options.maxInitialRequests || 1, - getName: - SplitChunksPlugin.normalizeName({ - name: options.name, - automaticNameDelimiter: options.automaticNameDelimiter - }) || (() => {}), hidePathInfo: options.hidePathInfo || false, filename: options.filename || undefined, getCacheGroups: SplitChunksPlugin.normalizeCacheGroups({ cacheGroups: options.cacheGroups, + name: options.name, automaticNameDelimiter: options.automaticNameDelimiter }), fallbackCacheGroup: SplitChunksPlugin.normalizeFallbackCacheGroup( @@ -133,7 +129,7 @@ module.exports = class SplitChunksPlugin { }; } - static normalizeName({ name, automaticNameDelimiter }) { + static normalizeName({ name, automaticNameDelimiter, automaticNamePrefix }) { if (name === true) { const cache = new Map(); const fn = (module, chunks, cacheGroup) => { @@ -150,10 +146,12 @@ module.exports = class SplitChunksPlugin { return; } names.sort(); - let name = - (cacheGroup && cacheGroup !== "default" - ? cacheGroup + automaticNameDelimiter - : "") + names.join(automaticNameDelimiter); + const prefix = + typeof automaticNamePrefix === "string" + ? automaticNamePrefix + : cacheGroup; + const namePrefix = prefix ? prefix + automaticNameDelimiter : ""; + let name = namePrefix + names.join(automaticNameDelimiter); // Filenames and paths can't be too long otherwise an // ENAMETOOLONG error is raised. If the generated name if too // long, it is truncated and a hash is appended. The limit has @@ -210,7 +208,7 @@ module.exports = class SplitChunksPlugin { }; } - static normalizeCacheGroups({ cacheGroups, automaticNameDelimiter }) { + static normalizeCacheGroups({ cacheGroups, name, automaticNameDelimiter }) { if (typeof cacheGroups === "function") { // TODO webpack 5 remove this if (cacheGroups.length !== 1) { @@ -249,10 +247,15 @@ module.exports = class SplitChunksPlugin { results.push({ key: key, priority: option.priority, - getName: SplitChunksPlugin.normalizeName({ - name: option.name, - automaticNameDelimiter - }), + getName: + SplitChunksPlugin.normalizeName({ + name: option.name || name, + automaticNameDelimiter: + typeof option.automaticNameDelimiter === "string" + ? option.automaticNameDelimiter + : automaticNameDelimiter, + automaticNamePrefix: option.automaticNamePrefix + }) || (() => {}), chunksFilter: SplitChunksPlugin.normalizeChunksFilter( option.chunks ), diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json index 7581fe8dd22..0ee1440b1fb 100644 --- a/schemas/WebpackOptions.json +++ b/schemas/WebpackOptions.json @@ -1529,6 +1529,15 @@ } ] }, + "automaticNameDelimiter": { + "description": "Sets the name delimiter for created chunks", + "type": "string", + "minLength": 1 + }, + "automaticNamePrefix": { + "description": "Sets the name prefix for created chunks", + "type": "string" + }, "filename": { "description": "Sets the template for the filename for created chunks (Only works for initial chunks)", "type": "string", From 9344801fb781418bc76eade7f3ce65c9790d488e Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 5 Jul 2018 14:39:07 +0200 Subject: [PATCH 139/310] fix wrong priority handling when merging multiple cache groups by name --- lib/optimize/SplitChunksPlugin.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/optimize/SplitChunksPlugin.js b/lib/optimize/SplitChunksPlugin.js index c33fec9db3e..da1469e0f6a 100644 --- a/lib/optimize/SplitChunksPlugin.js +++ b/lib/optimize/SplitChunksPlugin.js @@ -488,6 +488,12 @@ module.exports = class SplitChunksPlugin { chunksKeys: new Set() }) ); + } else { + if (info.cacheGroup !== cacheGroup) { + if (info.cacheGroup.priority < cacheGroup.priority) { + info.cacheGroup = cacheGroup; + } + } } info.modules.add(module); info.size += module.size(); From 0c2ea9d5d0e50c33547291c178d55e1bc6cf78ad Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 5 Jul 2018 14:39:17 +0200 Subject: [PATCH 140/310] add test case --- .../__snapshots__/StatsTestCases.test.js.snap | 35 ++++++++++++++++++ .../split-chunks-automatic-name/a.js | 5 +++ .../split-chunks-automatic-name/b.js | 5 +++ .../split-chunks-automatic-name/c.js | 5 +++ .../split-chunks-automatic-name/d.js | 1 + .../split-chunks-automatic-name/e.js | 1 + .../split-chunks-automatic-name/f.js | 1 + .../split-chunks-automatic-name/index.js | 3 ++ .../node_modules/x.js | 1 + .../node_modules/y.js | 1 + .../node_modules/z.js | 1 + .../webpack.config.js | 37 +++++++++++++++++++ 12 files changed, 96 insertions(+) create mode 100644 test/statsCases/split-chunks-automatic-name/a.js create mode 100644 test/statsCases/split-chunks-automatic-name/b.js create mode 100644 test/statsCases/split-chunks-automatic-name/c.js create mode 100644 test/statsCases/split-chunks-automatic-name/d.js create mode 100644 test/statsCases/split-chunks-automatic-name/e.js create mode 100644 test/statsCases/split-chunks-automatic-name/f.js create mode 100644 test/statsCases/split-chunks-automatic-name/index.js create mode 100644 test/statsCases/split-chunks-automatic-name/node_modules/x.js create mode 100644 test/statsCases/split-chunks-automatic-name/node_modules/y.js create mode 100644 test/statsCases/split-chunks-automatic-name/node_modules/z.js create mode 100644 test/statsCases/split-chunks-automatic-name/webpack.config.js diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index ca7b99a36fc..eaa9047160a 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -2671,6 +2671,41 @@ Child custom-chunks-filter-in-cache-groups: [5] ./c.js 72 bytes {3} {8} [built]" `; +exports[`StatsTestCases should print correct stats for split-chunks-automatic-name 1`] = ` +"Entrypoint main = main.js +chunk {0} common~async-a~async-b~async-c.js (common~async-a~async-b~async-c) 40 bytes <{7}> ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= [rendered] split chunk (cache group: vendors) (name: common~async-a~async-b~async-c) + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [0] ./d.js 20 bytes {0} [built] + [1] ./node_modules/x.js 20 bytes {0} [built] +chunk {1} common~async-b~async-c.js (common~async-b~async-c) 20 bytes <{7}> ={0}= ={2}= ={4}= ={5}= ={6}= [rendered] split chunk (cache group: vendors) (name: common~async-b~async-c) + > ./b [8] ./index.js 2:0-47 + > ./c [8] ./index.js 3:0-47 + [3] ./f.js 20 bytes {1} [built] +chunk {2} common~async-a~async-b.js (common~async-a~async-b) 20 bytes <{7}> ={0}= ={1}= ={3}= ={4}= [rendered] split chunk (cache group: vendors) (name: common~async-a~async-b) + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + [2] ./node_modules/y.js 20 bytes {2} [built] +chunk {3} async-a.js (async-a) 107 bytes <{7}> ={0}= ={2}= [rendered] + > ./a [8] ./index.js 1:0-47 + [7] ./a.js + 1 modules 107 bytes {3} [built] + | ./a.js 72 bytes [built] + | ./e.js 20 bytes [built] +chunk {4} async-b.js (async-b) 72 bytes <{7}> ={0}= ={1}= ={2}= [rendered] + > ./b [8] ./index.js 2:0-47 + [5] ./b.js 72 bytes {4} [built] +chunk {5} async-c.js (async-c) 72 bytes <{7}> ={0}= ={1}= ={6}= [rendered] + > ./c [8] ./index.js 3:0-47 + [6] ./c.js 72 bytes {5} [built] +chunk {6} common~async-c.js (common~async-c) 20 bytes <{7}> ={0}= ={1}= ={5}= [rendered] split chunk (cache group: vendors) (name: common~async-c) + > ./c [8] ./index.js 3:0-47 + [4] ./node_modules/z.js 20 bytes {6} [built] +chunk {7} main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< [entry] [rendered] + > ./ main + [8] ./index.js 147 bytes {7} [built]" +`; + exports[`StatsTestCases should print correct stats for split-chunks-combinations 1`] = ` "Entrypoint main = main.js chunk {0} async-a~async-b.js (async-a~async-b) 134 bytes <{8}> ={1}= ={2}= [rendered] split chunk (cache group: default) (name: async-a~async-b) diff --git a/test/statsCases/split-chunks-automatic-name/a.js b/test/statsCases/split-chunks-automatic-name/a.js new file mode 100644 index 00000000000..1fcabdcfdc0 --- /dev/null +++ b/test/statsCases/split-chunks-automatic-name/a.js @@ -0,0 +1,5 @@ +import "./d"; +import "./e"; +import "x"; +import "y"; +export default "a"; diff --git a/test/statsCases/split-chunks-automatic-name/b.js b/test/statsCases/split-chunks-automatic-name/b.js new file mode 100644 index 00000000000..fd909a7b63b --- /dev/null +++ b/test/statsCases/split-chunks-automatic-name/b.js @@ -0,0 +1,5 @@ +import "./d"; +import "./f"; +import "x"; +import "y"; +export default "b"; diff --git a/test/statsCases/split-chunks-automatic-name/c.js b/test/statsCases/split-chunks-automatic-name/c.js new file mode 100644 index 00000000000..6bbf24bfe50 --- /dev/null +++ b/test/statsCases/split-chunks-automatic-name/c.js @@ -0,0 +1,5 @@ +import "./d"; +import "./f"; +import "x"; +import "z"; +export default "c"; diff --git a/test/statsCases/split-chunks-automatic-name/d.js b/test/statsCases/split-chunks-automatic-name/d.js new file mode 100644 index 00000000000..987d6d7e401 --- /dev/null +++ b/test/statsCases/split-chunks-automatic-name/d.js @@ -0,0 +1 @@ +export default "d"; diff --git a/test/statsCases/split-chunks-automatic-name/e.js b/test/statsCases/split-chunks-automatic-name/e.js new file mode 100644 index 00000000000..d97e38b22f5 --- /dev/null +++ b/test/statsCases/split-chunks-automatic-name/e.js @@ -0,0 +1 @@ +export default "e"; diff --git a/test/statsCases/split-chunks-automatic-name/f.js b/test/statsCases/split-chunks-automatic-name/f.js new file mode 100644 index 00000000000..657d4dee8a8 --- /dev/null +++ b/test/statsCases/split-chunks-automatic-name/f.js @@ -0,0 +1 @@ +export default "f"; diff --git a/test/statsCases/split-chunks-automatic-name/index.js b/test/statsCases/split-chunks-automatic-name/index.js new file mode 100644 index 00000000000..5dfec91bc71 --- /dev/null +++ b/test/statsCases/split-chunks-automatic-name/index.js @@ -0,0 +1,3 @@ +import(/* webpackChunkName: "async-a" */ "./a"); +import(/* webpackChunkName: "async-b" */ "./b"); +import(/* webpackChunkName: "async-c" */ "./c"); diff --git a/test/statsCases/split-chunks-automatic-name/node_modules/x.js b/test/statsCases/split-chunks-automatic-name/node_modules/x.js new file mode 100644 index 00000000000..3fd5ecc7a40 --- /dev/null +++ b/test/statsCases/split-chunks-automatic-name/node_modules/x.js @@ -0,0 +1 @@ +export default "x"; diff --git a/test/statsCases/split-chunks-automatic-name/node_modules/y.js b/test/statsCases/split-chunks-automatic-name/node_modules/y.js new file mode 100644 index 00000000000..413e7c09da6 --- /dev/null +++ b/test/statsCases/split-chunks-automatic-name/node_modules/y.js @@ -0,0 +1 @@ +export default "y"; diff --git a/test/statsCases/split-chunks-automatic-name/node_modules/z.js b/test/statsCases/split-chunks-automatic-name/node_modules/z.js new file mode 100644 index 00000000000..0b388750767 --- /dev/null +++ b/test/statsCases/split-chunks-automatic-name/node_modules/z.js @@ -0,0 +1 @@ +export default "z"; diff --git a/test/statsCases/split-chunks-automatic-name/webpack.config.js b/test/statsCases/split-chunks-automatic-name/webpack.config.js new file mode 100644 index 00000000000..8216c7312c7 --- /dev/null +++ b/test/statsCases/split-chunks-automatic-name/webpack.config.js @@ -0,0 +1,37 @@ +const stats = { + hash: false, + timings: false, + builtAt: false, + assets: false, + chunks: true, + chunkOrigins: true, + entrypoints: true, + modules: false +}; +module.exports = { + name: "production", + mode: "production", + entry: { + main: "./" + }, + optimization: { + splitChunks: { + chunks: "all", + minSize: 1, + cacheGroups: { + default: { + automaticNamePrefix: "common", + reuseExistingChunk: true, + minChunks: 2, + priority: -20 + }, + vendors: { + automaticNamePrefix: "common", + test: /[\\/]node_modules[\\/]/, + priority: -10 + } + } + } + }, + stats +}; From 81149be5c1cd2a3ce70c3abcc179c5070fd6dd1c Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 5 Jul 2018 15:32:32 +0200 Subject: [PATCH 141/310] 4.15.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a22497fff82..2c217e80b9a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.15.0", + "version": "4.15.1", "author": "Tobias Koppers @sokra", "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", From 93a28126a6f732cde7b753ad1a9101225e00beed Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 5 Jul 2018 20:39:47 +0200 Subject: [PATCH 142/310] fixes order for reexported dependencies fixes #7665 --- .../HarmonyExportImportedSpecifierDependency.js | 3 ++- test/cases/side-effects/order-issue-7665/index.js | 7 +++++++ test/cases/side-effects/order-issue-7665/module/a.js | 5 +++++ test/cases/side-effects/order-issue-7665/module/b.js | 5 +++++ test/cases/side-effects/order-issue-7665/module/index.js | 4 ++++ .../side-effects/order-issue-7665/module/package.json | 6 ++++++ test/cases/side-effects/order-issue-7665/tracker.js | 1 + 7 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 test/cases/side-effects/order-issue-7665/index.js create mode 100644 test/cases/side-effects/order-issue-7665/module/a.js create mode 100644 test/cases/side-effects/order-issue-7665/module/b.js create mode 100644 test/cases/side-effects/order-issue-7665/module/index.js create mode 100644 test/cases/side-effects/order-issue-7665/module/package.json create mode 100644 test/cases/side-effects/order-issue-7665/tracker.js diff --git a/lib/dependencies/HarmonyExportImportedSpecifierDependency.js b/lib/dependencies/HarmonyExportImportedSpecifierDependency.js index 360c785b113..1965d0dbb8d 100644 --- a/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +++ b/lib/dependencies/HarmonyExportImportedSpecifierDependency.js @@ -244,7 +244,8 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency { return new DependencyReference( mode.module, Array.from(mode.map.values()), - false + false, + this.sourceOrder ); case "dynamic-reexport": diff --git a/test/cases/side-effects/order-issue-7665/index.js b/test/cases/side-effects/order-issue-7665/index.js new file mode 100644 index 00000000000..378de0e896e --- /dev/null +++ b/test/cases/side-effects/order-issue-7665/index.js @@ -0,0 +1,7 @@ +import array from "./tracker"; +import { b } from "./module"; + +it("should evaulate modules in the correct order", () => { + expect(b).toEqual("b"); + expect(array).toEqual(["b", "a"]); +}) diff --git a/test/cases/side-effects/order-issue-7665/module/a.js b/test/cases/side-effects/order-issue-7665/module/a.js new file mode 100644 index 00000000000..635f930d2ac --- /dev/null +++ b/test/cases/side-effects/order-issue-7665/module/a.js @@ -0,0 +1,5 @@ +import array from "../tracker"; + +array.push("a"); + +export default "a"; diff --git a/test/cases/side-effects/order-issue-7665/module/b.js b/test/cases/side-effects/order-issue-7665/module/b.js new file mode 100644 index 00000000000..3c47022b329 --- /dev/null +++ b/test/cases/side-effects/order-issue-7665/module/b.js @@ -0,0 +1,5 @@ +import array from "../tracker"; + +array.push("b"); + +export default "b"; diff --git a/test/cases/side-effects/order-issue-7665/module/index.js b/test/cases/side-effects/order-issue-7665/module/index.js new file mode 100644 index 00000000000..6303d91ada7 --- /dev/null +++ b/test/cases/side-effects/order-issue-7665/module/index.js @@ -0,0 +1,4 @@ +import b from './b'; +import './a'; + +export { b }; diff --git a/test/cases/side-effects/order-issue-7665/module/package.json b/test/cases/side-effects/order-issue-7665/module/package.json new file mode 100644 index 00000000000..a4ec69bc4ab --- /dev/null +++ b/test/cases/side-effects/order-issue-7665/module/package.json @@ -0,0 +1,6 @@ +{ + "sideEffects": [ + "./index.js", + "./a.js" + ] +} diff --git a/test/cases/side-effects/order-issue-7665/tracker.js b/test/cases/side-effects/order-issue-7665/tracker.js new file mode 100644 index 00000000000..d6d1738de67 --- /dev/null +++ b/test/cases/side-effects/order-issue-7665/tracker.js @@ -0,0 +1 @@ +export default []; From c38f8d4a63f396adde6e598c82f9eb0c5b0bab01 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 6 Jul 2018 11:10:09 +0200 Subject: [PATCH 143/310] split test cases on CI into smaller pieces --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2c217e80b9a..b6f5c9b309f 100644 --- a/package.json +++ b/package.json @@ -109,11 +109,11 @@ "test:integration": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"/test/*.test.js\"", "test:basic": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"/test/{TestCasesNormal,StatsTestCases,ConfigTestCases}.test.js\"", "test:unit": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"/test/*.unittest.js\"", - "travis:integration": "yarn cover:init && yarn cover:integration \"test/((?!TestCases)|TestCasesD)\" --ci $JEST && mv coverage/coverage-final.json coverage/coverage-final-1.json && yarn cover:integration \"test/TestCases(?!D)\" --ci $JEST && mv coverage/coverage-final.json coverage/coverage-final-2.json", + "travis:integration": "yarn cover:init && yarn cover:integration \"test/(?!TestCases)\" --ci $JEST && mv coverage/coverage-final.json coverage/coverage-final-1.json && yarn cover:integration \"test/TestCasesD\" --ci $JEST && mv coverage/coverage-final.json coverage/coverage-final-2.json && yarn cover:integration \"test/TestCases(?!D)\" --ci $JEST && mv coverage/coverage-final.json coverage/coverage-final-3.json", "travis:basic": "yarn test:basic --ci $JEST", "travis:lint-unit": "yarn lint && yarn cover:init && yarn cover:unit --ci $JEST", "travis:benchmark": "yarn benchmark --ci", - "appveyor:integration": "yarn cover:init && yarn cover:integration \"test/((?!TestCases)|TestCasesD)\" --ci %JEST% && move coverage\\coverage-final.json coverage\\coverage-final-1.json && yarn cover:integration \"test/TestCases(?!D)\" --ci %JEST% && move coverage\\coverage-final.json coverage\\coverage-final-2.json", + "appveyor:integration": "yarn cover:init && yarn cover:integration \"test/(?!TestCases)\" --ci %JEST% && move coverage\\coverage-final.json coverage\\coverage-final-1.json&& yarn cover:integration \"test/TestCasesD\" --ci %JEST% && move coverage\\coverage-final.json coverage\\coverage-final-2.json && yarn cover:integration \"test/TestCases(?!D)\" --ci %JEST% && move coverage\\coverage-final.json coverage\\coverage-final-3.json", "appveyor:unit": "yarn cover:init && yarn cover:unit --ci %JEST%", "appveyor:benchmark": "yarn benchmark --ci", "build:examples": "cd examples && node buildAll.js", From 2d9db1a1f633610b5df6afdbe5455f9ba9274965 Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Sun, 8 Jul 2018 08:15:02 +0100 Subject: [PATCH 144/310] chore(types): add types to EnvironmentPlugin --- lib/EnvironmentPlugin.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/EnvironmentPlugin.js b/lib/EnvironmentPlugin.js index 388ce817372..40353611130 100644 --- a/lib/EnvironmentPlugin.js +++ b/lib/EnvironmentPlugin.js @@ -5,6 +5,9 @@ "use strict"; +/** @typedef {import("./Compiler")} Compiler */ + +const WebpackError = require("./WebpackError"); const DefinePlugin = require("./DefinePlugin"); const needsEnvVarFix = @@ -25,6 +28,10 @@ class EnvironmentPlugin { } } + /** + * @param {Compiler} compiler webpack compiler instance + * @returns {void} + */ apply(compiler) { const definitions = this.keys.reduce((defs, key) => { // TODO remove once the fix has made its way into Node 8. @@ -41,7 +48,7 @@ class EnvironmentPlugin { if (value === undefined) { compiler.hooks.thisCompilation.tap("EnvironmentPlugin", compilation => { - const error = new Error( + const error = new WebpackError( `EnvironmentPlugin - ${key} environment variable is undefined.\n\n` + "You can pass an object with default values to suppress this warning.\n" + "See https://webpack.js.org/plugins/environment-plugin for example." From 378f31b4f96b9db85202167265a71d90eb85439c Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sun, 8 Jul 2018 21:37:12 +0200 Subject: [PATCH 145/310] increase timeout for ConfigTestCases --- test/ConfigTestCases.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/ConfigTestCases.test.js b/test/ConfigTestCases.test.js index 4923509f2dd..008d3b6d49d 100644 --- a/test/ConfigTestCases.test.js +++ b/test/ConfigTestCases.test.js @@ -17,7 +17,7 @@ describe("ConfigTestCases", () => { const casesPath = path.join(__dirname, "configCases"); let categories = fs.readdirSync(casesPath); - jest.setTimeout(10000); + jest.setTimeout(20000); categories = categories.map(cat => { return { From 5c8983f31fed54d943dbb071763ac2ccde17ccf1 Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Mon, 9 Jul 2018 08:48:34 +0200 Subject: [PATCH 146/310] Deprecate Dependency.compare --- lib/Dependency.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/Dependency.js b/lib/Dependency.js index c439d639a11..4b731a7323c 100644 --- a/lib/Dependency.js +++ b/lib/Dependency.js @@ -4,6 +4,7 @@ */ "use strict"; +const util = require("util"); const compareLocations = require("./compareLocations"); const DependencyReference = require("./dependencies/DependencyReference"); @@ -78,6 +79,11 @@ class Dependency { this.module = null; } } -Dependency.compare = (a, b) => compareLocations(a.loc, b.loc); + +// TODO remove in webpack 5 +Dependency.compare = util.deprecate( + (a, b) => compareLocations(a.loc, b.loc), + "Dependency.compare is deprecated and will be removed in the next major version" +); module.exports = Dependency; From b892065db057f99c5eee57accf489de7f4264339 Mon Sep 17 00:00:00 2001 From: zroug <37004975+zroug@users.noreply.github.com> Date: Mon, 9 Jul 2018 14:39:48 +0200 Subject: [PATCH 147/310] Added support for WebAssembly modules when target is `electron-renderer` --- lib/WebpackOptionsApply.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/WebpackOptionsApply.js b/lib/WebpackOptionsApply.js index f22ca8c3074..1b9e80e3f84 100644 --- a/lib/WebpackOptionsApply.js +++ b/lib/WebpackOptionsApply.js @@ -171,9 +171,13 @@ class WebpackOptionsApply extends OptionsApply { break; case "electron-renderer": JsonpTemplatePlugin = require("./web/JsonpTemplatePlugin"); + FetchCompileWasmTemplatePlugin = require("./web/FetchCompileWasmTemplatePlugin"); NodeTargetPlugin = require("./node/NodeTargetPlugin"); ExternalsPlugin = require("./ExternalsPlugin"); new JsonpTemplatePlugin().apply(compiler); + new FetchCompileWasmTemplatePlugin({ + mangleImports: options.optimization.mangleWasmImports + }).apply(compiler); new FunctionModulePlugin().apply(compiler); new NodeTargetPlugin().apply(compiler); new ExternalsPlugin("commonjs", [ From 3fc4eb752fb70e85f125e62b211fd555501a81da Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 9 Jul 2018 14:31:29 +0200 Subject: [PATCH 148/310] add new options moduleIds and chunkIds deprecate namedModules, hashedModuleIds, namedChunks add a lot of TODOs for webpack 5 split OccurenceOrderPlugin into separate plugins for modules and chunks add NaturalChunkOrderPlugin and enable it in development --- lib/Compilation.js | 3 + lib/WebpackOptionsApply.js | 98 +++++++++++++++-- lib/WebpackOptionsDefaulter.js | 7 ++ lib/optimize/NaturalChunkOrderPlugin.js | 41 +++++++ lib/optimize/OccurrenceChunkOrderPlugin.js | 61 +++++++++++ lib/optimize/OccurrenceModuleOrderPlugin.js | 103 ++++++++++++++++++ lib/optimize/OccurrenceOrderPlugin.js | 2 + lib/webpack.js | 4 + schemas/WebpackOptions.json | 27 ++++- .../OccurrenceOrderChunkIdsPlugin.json | 10 ++ .../OccurrenceOrderModuleIdsPlugin.json | 10 ++ .../__snapshots__/StatsTestCases.test.js.snap | 52 ++++----- 12 files changed, 379 insertions(+), 39 deletions(-) create mode 100644 lib/optimize/NaturalChunkOrderPlugin.js create mode 100644 lib/optimize/OccurrenceChunkOrderPlugin.js create mode 100644 lib/optimize/OccurrenceModuleOrderPlugin.js create mode 100644 schemas/plugins/optimize/OccurrenceOrderChunkIdsPlugin.json create mode 100644 schemas/plugins/optimize/OccurrenceOrderModuleIdsPlugin.json diff --git a/lib/Compilation.js b/lib/Compilation.js index c1be909f17a..f2377a649cb 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -1292,6 +1292,9 @@ class Compilation extends Tapable { * @returns {void} */ sortModules(modules) { + // TODO webpack 5: this should only be enabled when `moduleIds: "natural"` + // TODO move it into a plugin (NaturalModuleIdsPlugin) and use this in WebpackOptionsApply + // TODO remove this method modules.sort(byIndexOrIdentifier); } diff --git a/lib/WebpackOptionsApply.js b/lib/WebpackOptionsApply.js index f22ca8c3074..4ce97c79069 100644 --- a/lib/WebpackOptionsApply.js +++ b/lib/WebpackOptionsApply.js @@ -46,7 +46,9 @@ const RemoveParentModulesPlugin = require("./optimize/RemoveParentModulesPlugin" const RemoveEmptyChunksPlugin = require("./optimize/RemoveEmptyChunksPlugin"); const MergeDuplicateChunksPlugin = require("./optimize/MergeDuplicateChunksPlugin"); const FlagIncludedChunksPlugin = require("./optimize/FlagIncludedChunksPlugin"); -const OccurrenceOrderPlugin = require("./optimize/OccurrenceOrderPlugin"); +const OccurrenceChunkOrderPlugin = require("./optimize/OccurrenceChunkOrderPlugin"); +const OccurrenceModuleOrderPlugin = require("./optimize/OccurrenceModuleOrderPlugin"); +const NaturalChunkOrderPlugin = require("./optimize/NaturalChunkOrderPlugin"); const SideEffectsFlagPlugin = require("./optimize/SideEffectsFlagPlugin"); const FlagDependencyUsagePlugin = require("./FlagDependencyUsagePlugin"); const FlagDependencyExportsPlugin = require("./FlagDependencyExportsPlugin"); @@ -325,9 +327,6 @@ class WebpackOptionsApply extends OptionsApply { if (options.optimization.flagIncludedChunks) { new FlagIncludedChunksPlugin().apply(compiler); } - if (options.optimization.occurrenceOrder) { - new OccurrenceOrderPlugin(true).apply(compiler); - } if (options.optimization.sideEffects) { new SideEffectsFlagPlugin().apply(compiler); } @@ -352,14 +351,93 @@ class WebpackOptionsApply extends OptionsApply { if (options.optimization.checkWasmTypes) { new WasmFinalizeExportsPlugin().apply(compiler); } - if (options.optimization.namedModules) { - new NamedModulesPlugin().apply(compiler); + let moduleIds = options.optimization.moduleIds; + if (moduleIds === undefined) { + // TODO webpack 5 remove all these options + if (options.optimization.occurrenceOrder) { + moduleIds = "size"; + } + if (options.optimization.namedModules) { + moduleIds = "named"; + } + if (options.optimization.hashedModuleIds) { + moduleIds = "hashed"; + } + if (moduleIds === undefined) { + moduleIds = "natural"; + } } - if (options.optimization.hashedModuleIds) { - new HashedModuleIdsPlugin().apply(compiler); + if (moduleIds) { + switch (moduleIds) { + case "natural": + // TODO webpack 5: see hint in Compilation.sortModules + break; + case "named": + new NamedModulesPlugin().apply(compiler); + break; + case "hashed": + new HashedModuleIdsPlugin().apply(compiler); + break; + case "size": + new OccurrenceModuleOrderPlugin({ + prioritiseInitial: true + }).apply(compiler); + break; + case "total-size": + new OccurrenceModuleOrderPlugin({ + prioritiseInitial: false + }).apply(compiler); + break; + default: + throw new Error( + `webpack bug: moduleIds: ${moduleIds} is not implemented` + ); + } } - if (options.optimization.namedChunks) { - new NamedChunksPlugin().apply(compiler); + let chunkIds = options.optimization.chunkIds; + if (chunkIds === undefined) { + // TODO webpack 5 remove all these options + if (options.optimization.occurrenceOrder) { + // This looks weird but it's for backward-compat + // This bug already existed before adding this feature + chunkIds = "total-size"; + } + if (options.optimization.namedChunks) { + chunkIds = "named"; + } + if (chunkIds === undefined) { + chunkIds = "natural"; + } + } + if (chunkIds) { + switch (chunkIds) { + case "natural": + new NaturalChunkOrderPlugin().apply(compiler); + break; + case "named": + // TODO webapck 5: for backward-compat this need to have OccurrenceChunkOrderPlugin too + // The NamedChunksPlugin doesn't give every chunk a name + // This should be fixed, and the OccurrenceChunkOrderPlugin should be removed here. + new OccurrenceChunkOrderPlugin({ + prioritiseInitial: false + }).apply(compiler); + new NamedChunksPlugin().apply(compiler); + break; + case "size": + new OccurrenceChunkOrderPlugin({ + prioritiseInitial: true + }).apply(compiler); + break; + case "total-size": + new OccurrenceChunkOrderPlugin({ + prioritiseInitial: false + }).apply(compiler); + break; + default: + throw new Error( + `webpack bug: chunkIds: ${chunkIds} is not implemented` + ); + } } if (options.optimization.nodeEnv) { new DefinePlugin({ diff --git a/lib/WebpackOptionsDefaulter.js b/lib/WebpackOptionsDefaulter.js index 3f9da0b72d2..2416101f3b2 100644 --- a/lib/WebpackOptionsDefaulter.js +++ b/lib/WebpackOptionsDefaulter.js @@ -201,6 +201,9 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { this.set("optimization.flagIncludedChunks", "make", options => isProductionLikeMode(options) ); + // TODO webpack 5 add `moduleIds: "named"` default for development + // TODO webpack 5 add `moduleIds: "size"` default for production + // TODO webpack 5 remove optimization.occurrenceOrder this.set("optimization.occurrenceOrder", "make", options => isProductionLikeMode(options) ); @@ -261,12 +264,16 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { isProductionLikeMode(options) ); this.set("optimization.mangleWasmImports", false); + // TODO webpack 5 remove optimization.namedModules this.set( "optimization.namedModules", "make", options => options.mode === "development" ); this.set("optimization.hashedModuleIds", false); + // TODO webpack 5 add `chunkIds: "named"` default for development + // TODO webpack 5 add `chunkIds: "size"` default for production + // TODO webpack 5 remove optimization.namedChunks this.set( "optimization.namedChunks", "make", diff --git a/lib/optimize/NaturalChunkOrderPlugin.js b/lib/optimize/NaturalChunkOrderPlugin.js new file mode 100644 index 00000000000..00f8010d8b8 --- /dev/null +++ b/lib/optimize/NaturalChunkOrderPlugin.js @@ -0,0 +1,41 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +/** @typedef {import("../Compiler")} Compiler */ + +class NaturalChunkOrderPlugin { + /** + * @param {Compiler} compiler webpack compiler + * @returns {void} + */ + apply(compiler) { + compiler.hooks.compilation.tap("NaturalChunkOrderPlugin", compilation => { + compilation.hooks.optimizeChunkOrder.tap( + "NaturalChunkOrderPlugin", + chunks => { + chunks.sort((chunkA, chunkB) => { + const a = chunkA.modulesIterable[Symbol.iterator](); + const b = chunkB.modulesIterable[Symbol.iterator](); + // eslint-disable-next-line no-constant-condition + while (true) { + const aItem = a.next(); + const bItem = b.next(); + if (aItem.done && bItem.done) return 0; + if (aItem.done) return -1; + if (bItem.done) return 1; + const aModuleId = aItem.value.id; + const bModuleId = bItem.value.id; + if (aModuleId < bModuleId) return -1; + if (aModuleId > bModuleId) return 1; + } + }); + } + ); + }); + } +} + +module.exports = NaturalChunkOrderPlugin; diff --git a/lib/optimize/OccurrenceChunkOrderPlugin.js b/lib/optimize/OccurrenceChunkOrderPlugin.js new file mode 100644 index 00000000000..c7251c38d78 --- /dev/null +++ b/lib/optimize/OccurrenceChunkOrderPlugin.js @@ -0,0 +1,61 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const validateOptions = require("schema-utils"); +const schema = require("../../schemas/plugins/optimize/OccurrenceOrderChunkIdsPlugin.json"); + +class OccurrenceOrderChunkIdsPlugin { + constructor(options = {}) { + validateOptions(schema, options, "Occurrence Order Chunk Ids Plugin"); + this.options = options; + } + + apply(compiler) { + const prioritiseInitial = this.options.prioritiseInitial; + compiler.hooks.compilation.tap( + "OccurrenceOrderChunkIdsPlugin", + compilation => { + compilation.hooks.optimizeChunkOrder.tap( + "OccurrenceOrderChunkIdsPlugin", + chunks => { + const occursInInitialChunksMap = new Map(); + const originalOrder = new Map(); + + let i = 0; + for (const c of chunks) { + let occurs = 0; + for (const chunkGroup of c.groupsIterable) { + for (const parent of chunkGroup.parentsIterable) { + if (parent.isInitial()) occurs++; + } + } + occursInInitialChunksMap.set(c, occurs); + originalOrder.set(c, i++); + } + + chunks.sort((a, b) => { + if (prioritiseInitial) { + const aEntryOccurs = occursInInitialChunksMap.get(a); + const bEntryOccurs = occursInInitialChunksMap.get(b); + if (aEntryOccurs > bEntryOccurs) return -1; + if (aEntryOccurs < bEntryOccurs) return 1; + } + const aOccurs = a.getNumberOfGroups(); + const bOccurs = b.getNumberOfGroups(); + if (aOccurs > bOccurs) return -1; + if (aOccurs < bOccurs) return 1; + const orgA = originalOrder.get(a); + const orgB = originalOrder.get(b); + return orgB - orgA; + }); + } + ); + } + ); + } +} + +module.exports = OccurrenceOrderChunkIdsPlugin; diff --git a/lib/optimize/OccurrenceModuleOrderPlugin.js b/lib/optimize/OccurrenceModuleOrderPlugin.js new file mode 100644 index 00000000000..8e6509dadf7 --- /dev/null +++ b/lib/optimize/OccurrenceModuleOrderPlugin.js @@ -0,0 +1,103 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +"use strict"; + +const validateOptions = require("schema-utils"); +const schema = require("../../schemas/plugins/optimize/OccurrenceOrderModuleIdsPlugin.json"); + +class OccurrenceOrderModuleIdsPlugin { + constructor(options = {}) { + validateOptions(schema, options, "Occurrence Order Module Ids Plugin"); + this.options = options; + } + + apply(compiler) { + const prioritiseInitial = this.options.prioritiseInitial; + compiler.hooks.compilation.tap( + "OccurrenceOrderModuleIdsPlugin", + compilation => { + compilation.hooks.optimizeModuleOrder.tap( + "OccurrenceOrderModuleIdsPlugin", + modules => { + const occursInInitialChunksMap = new Map(); + const occursInAllChunksMap = new Map(); + + const initialChunkChunkMap = new Map(); + const entryCountMap = new Map(); + for (const m of modules) { + let initial = 0; + let entry = 0; + for (const c of m.chunksIterable) { + if (c.canBeInitial()) initial++; + if (c.entryModule === m) entry++; + } + initialChunkChunkMap.set(m, initial); + entryCountMap.set(m, entry); + } + + const countOccursInEntry = (sum, r) => { + if (!r.module) { + return sum; + } + return sum + initialChunkChunkMap.get(r.module); + }; + const countOccurs = (sum, r) => { + if (!r.module) { + return sum; + } + let factor = 1; + if (typeof r.dependency.getNumberOfIdOccurrences === "function") { + factor = r.dependency.getNumberOfIdOccurrences(); + } + if (factor === 0) { + return sum; + } + return sum + factor * r.module.getNumberOfChunks(); + }; + + if (prioritiseInitial) { + for (const m of modules) { + const result = + m.reasons.reduce(countOccursInEntry, 0) + + initialChunkChunkMap.get(m) + + entryCountMap.get(m); + occursInInitialChunksMap.set(m, result); + } + } + + const originalOrder = new Map(); + let i = 0; + for (const m of modules) { + const result = + m.reasons.reduce(countOccurs, 0) + + m.getNumberOfChunks() + + entryCountMap.get(m); + occursInAllChunksMap.set(m, result); + originalOrder.set(m, i++); + } + + modules.sort((a, b) => { + if (prioritiseInitial) { + const aEntryOccurs = occursInInitialChunksMap.get(a); + const bEntryOccurs = occursInInitialChunksMap.get(b); + if (aEntryOccurs > bEntryOccurs) return -1; + if (aEntryOccurs < bEntryOccurs) return 1; + } + const aOccurs = occursInAllChunksMap.get(a); + const bOccurs = occursInAllChunksMap.get(b); + if (aOccurs > bOccurs) return -1; + if (aOccurs < bOccurs) return 1; + const orgA = originalOrder.get(a); + const orgB = originalOrder.get(b); + return orgB - orgA; + }); + } + ); + } + ); + } +} + +module.exports = OccurrenceOrderModuleIdsPlugin; diff --git a/lib/optimize/OccurrenceOrderPlugin.js b/lib/optimize/OccurrenceOrderPlugin.js index 8e23f951473..1590be90a4a 100644 --- a/lib/optimize/OccurrenceOrderPlugin.js +++ b/lib/optimize/OccurrenceOrderPlugin.js @@ -4,6 +4,8 @@ */ "use strict"; +// TODO webpack 5 remove this plugin +// It has been splitted into separate plugins for modules and chunks class OccurrenceOrderPlugin { constructor(preferEntry) { if (preferEntry !== undefined && typeof preferEntry !== "boolean") { diff --git a/lib/webpack.js b/lib/webpack.js index f5a8af68f95..ff9fe62c1ab 100644 --- a/lib/webpack.js +++ b/lib/webpack.js @@ -137,6 +137,10 @@ exportPlugins((exports.optimize = {}), { ModuleConcatenationPlugin: () => require("./optimize/ModuleConcatenationPlugin"), OccurrenceOrderPlugin: () => require("./optimize/OccurrenceOrderPlugin"), + OccurrenceModuleOrderPlugin: () => + require("./optimize/OccurrenceModuleOrderPlugin"), + OccurrenceChunkOrderPlugin: () => + require("./optimize/OccurrenceChunkOrderPlugin"), RuntimeChunkPlugin: () => require("./optimize/RuntimeChunkPlugin"), SideEffectsFlagPlugin: () => require("./optimize/SideEffectsFlagPlugin"), SplitChunksPlugin: () => require("./optimize/SplitChunksPlugin") diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json index 7581fe8dd22..40ceb173c4d 100644 --- a/schemas/WebpackOptions.json +++ b/schemas/WebpackOptions.json @@ -1586,16 +1586,37 @@ "description": "Reduce size of WASM by changing imports to shorter strings.", "type": "boolean" }, + "moduleIds": { + "description": "Define the algorithm to choose module ids (natural: numeric ids in order for usage, named: readable ids for better debugging, hashed: short hashes as ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin)", + "enum": [ + "natural", + "named", + "hashed", + "size", + "total-size", + false + ] + }, + "chunkIds": { + "description": "Define the algorithm to choose chunk ids (named: readable ids for better debugging, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin)", + "enum": [ + "natural", + "named", + "size", + "total-size", + false + ] + }, "namedModules": { - "description": "Use readable module identifiers for better debugging", + "description": "Use readable module identifiers for better debugging (deprecated, used moduleIds: named instead)", "type": "boolean" }, "hashedModuleIds": { - "description": "Use hashed module id instead module identifiers for better long term caching", + "description": "Use hashed module id instead module identifiers for better long term caching (deprecated, used moduleIds: hashed instead)", "type": "boolean" }, "namedChunks": { - "description": "Use readable chunk identifiers for better debugging", + "description": "Use readable chunk identifiers for better debugging (deprecated, used chunkIds: named instead)", "type": "boolean" }, "portableRecords": { diff --git a/schemas/plugins/optimize/OccurrenceOrderChunkIdsPlugin.json b/schemas/plugins/optimize/OccurrenceOrderChunkIdsPlugin.json new file mode 100644 index 00000000000..f1e85ac5d6a --- /dev/null +++ b/schemas/plugins/optimize/OccurrenceOrderChunkIdsPlugin.json @@ -0,0 +1,10 @@ +{ + "additionalProperties": false, + "type": "object", + "properties": { + "prioritiseInitial": { + "description": "Prioritise initial size over total size", + "type": "boolean" + } + } +} diff --git a/schemas/plugins/optimize/OccurrenceOrderModuleIdsPlugin.json b/schemas/plugins/optimize/OccurrenceOrderModuleIdsPlugin.json new file mode 100644 index 00000000000..f1e85ac5d6a --- /dev/null +++ b/schemas/plugins/optimize/OccurrenceOrderModuleIdsPlugin.json @@ -0,0 +1,10 @@ +{ + "additionalProperties": false, + "type": "object", + "properties": { + "prioritiseInitial": { + "description": "Prioritise initial size over total size", + "type": "boolean" + } + } +} diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index babc4a7d2c5..4951bd664da 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -467,28 +467,28 @@ Child all: `; exports[`StatsTestCases should print correct stats for chunk-module-id-range 1`] = ` -"Hash: 7d8eb8b4418c6ae6a262 +"Hash: b385901db3d63ff731a3 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names -main2.js 4.85 KiB 0 [emitted] main2 -main1.js 4.86 KiB 1 [emitted] main1 +main1.js 4.86 KiB 0 [emitted] main1 +main2.js 4.85 KiB 1 [emitted] main2 Entrypoint main1 = main1.js Entrypoint main2 = main2.js -chunk {0} main2.js (main2) 136 bytes [entry] [rendered] - > ./main2 main2 - [0] ./e.js 20 bytes {0} [built] - [1] ./f.js 20 bytes {0} [built] - [2] ./main2.js 56 bytes {0} [built] - [100] ./d.js 20 bytes {0} {1} [built] - [101] ./a.js 20 bytes {0} {1} [built] -chunk {1} main1.js (main1) 136 bytes [entry] [rendered] +chunk {0} main1.js (main1) 136 bytes [entry] [rendered] > ./main1 main1 - [3] ./b.js 20 bytes {1} [built] - [4] ./main1.js 56 bytes {1} [built] + [3] ./b.js 20 bytes {0} [built] + [4] ./main1.js 56 bytes {0} [built] [100] ./d.js 20 bytes {0} {1} [built] [101] ./a.js 20 bytes {0} {1} [built] - [102] ./c.js 20 bytes {1} [built]" + [102] ./c.js 20 bytes {0} [built] +chunk {1} main2.js (main2) 136 bytes [entry] [rendered] + > ./main2 main2 + [0] ./e.js 20 bytes {1} [built] + [1] ./f.js 20 bytes {1} [built] + [2] ./main2.js 56 bytes {1} [built] + [100] ./d.js 20 bytes {0} {1} [built] + [101] ./a.js 20 bytes {0} {1} [built]" `; exports[`StatsTestCases should print correct stats for chunks 1`] = ` @@ -530,14 +530,14 @@ chunk {3} 3.bundle.js 44 bytes <{1}> [rendered] `; exports[`StatsTestCases should print correct stats for chunks-development 1`] = ` -"Hash: 491964abb8a9925c2f65 +"Hash: 83bf92a94bc3834801e8 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names -0.bundle.js 433 bytes 0 [emitted] -1.bundle.js 297 bytes 1 [emitted] -2.bundle.js 588 bytes 2 [emitted] +0.bundle.js 297 bytes 0 [emitted] +1.bundle.js 433 bytes 1 [emitted] bundle.js 8.67 KiB main [emitted] main +2.bundle.js 588 bytes 2 [emitted] Entrypoint main = bundle.js chunk {main} bundle.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] > ./index main @@ -548,17 +548,17 @@ chunk {main} bundle.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] [./index.js] 51 bytes {main} [built] single entry ./index main factory:Xms building:Xms = Xms -chunk {0} 0.bundle.js 54 bytes <{main}> >{2}< [rendered] - > ./c [./index.js] ./index.js 3:0-16 - [./c.js] 54 bytes {0} [built] - amd require ./c [./index.js] 3:0-16 - [./index.js] Xms -> factory:Xms building:Xms = Xms -chunk {1} 1.bundle.js 22 bytes <{main}> [rendered] +chunk {0} 0.bundle.js 22 bytes <{main}> [rendered] > ./b [./index.js] ./index.js 2:0-16 - [./b.js] 22 bytes {1} [built] + [./b.js] 22 bytes {0} [built] amd require ./b [./index.js] 2:0-16 [./index.js] Xms -> factory:Xms building:Xms = Xms -chunk {2} 2.bundle.js 60 bytes <{0}> [rendered] +chunk {1} 1.bundle.js 54 bytes <{main}> >{2}< [rendered] + > ./c [./index.js] ./index.js 3:0-16 + [./c.js] 54 bytes {1} [built] + amd require ./c [./index.js] 3:0-16 + [./index.js] Xms -> factory:Xms building:Xms = Xms +chunk {2} 2.bundle.js 60 bytes <{1}> [rendered] > [./c.js] ./c.js 1:0-52 [./d.js] 22 bytes {2} [built] require.ensure item ./d [./c.js] 1:0-52 From 559cf94edbd5172a96062c538d62190ad176b0bc Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 9 Jul 2018 14:48:28 +0200 Subject: [PATCH 149/310] Simplify imports --- lib/AutomaticPrefetchPlugin.js | 2 +- lib/Chunk.js | 4 ++-- lib/CommentCompilationWarning.js | 4 ++-- lib/CompatibilityPlugin.js | 2 +- lib/Entrypoint.js | 2 +- lib/HotModuleReplacementPlugin.js | 2 +- lib/IgnorePlugin.js | 2 +- lib/UseStrictPlugin.js | 2 +- lib/dependencies/SystemPlugin.js | 2 +- lib/node/NodeMainTemplatePlugin.js | 4 ++-- lib/node/NodeSourcePlugin.js | 2 +- lib/wasm/WasmFinalizeExportsPlugin.js | 2 +- lib/web/JsonpMainTemplatePlugin.js | 2 +- lib/webworker/WebWorkerMainTemplatePlugin.js | 2 +- 14 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/AutomaticPrefetchPlugin.js b/lib/AutomaticPrefetchPlugin.js index ccb7d856b4a..2d0db16ecdb 100644 --- a/lib/AutomaticPrefetchPlugin.js +++ b/lib/AutomaticPrefetchPlugin.js @@ -8,7 +8,7 @@ const asyncLib = require("neo-async"); const PrefetchDependency = require("./dependencies/PrefetchDependency"); const NormalModule = require("./NormalModule"); -/** @typedef {import("./Compiler.js")} Compiler */ +/** @typedef {import("./Compiler")} Compiler */ class AutomaticPrefetchPlugin { /** diff --git a/lib/Chunk.js b/lib/Chunk.js index 7d9ad3a05c5..95f9f955550 100644 --- a/lib/Chunk.js +++ b/lib/Chunk.js @@ -13,9 +13,9 @@ const ERR_CHUNK_ENTRY = "Chunk.entry was removed. Use hasRuntime()"; const ERR_CHUNK_INITIAL = "Chunk.initial was removed. Use canBeInitial/isOnlyInitial()"; -/** @typedef {import("./Module.js")} Module */ +/** @typedef {import("./Module")} Module */ /** @typedef {import("./ChunkGroup")} ChunkGroup */ -/** @typedef {import("./ModuleReason.js")} ModuleReason */ +/** @typedef {import("./ModuleReason")} ModuleReason */ /** @typedef {import("webpack-sources").Source} Source */ /** @typedef {import("./util/createHash").Hash} Hash */ diff --git a/lib/CommentCompilationWarning.js b/lib/CommentCompilationWarning.js index 1f8e233f3aa..79f0a2af5d5 100644 --- a/lib/CommentCompilationWarning.js +++ b/lib/CommentCompilationWarning.js @@ -6,9 +6,9 @@ const WebpackError = require("./WebpackError"); -/** @typedef {import("./Module.js")} Module */ +/** @typedef {import("./Module")} Module */ -/** @typedef {import("./Dependency.js").DependencyLocation} DependencyLocation */ +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ class CommentCompilationWarning extends WebpackError { /** diff --git a/lib/CompatibilityPlugin.js b/lib/CompatibilityPlugin.js index 5d2680245bb..7edea8336b8 100644 --- a/lib/CompatibilityPlugin.js +++ b/lib/CompatibilityPlugin.js @@ -8,7 +8,7 @@ const ConstDependency = require("./dependencies/ConstDependency"); const NullFactory = require("./NullFactory"); -/** @typedef {import("./Compiler.js")} Compiler */ +/** @typedef {import("./Compiler")} Compiler */ class CompatibilityPlugin { /** diff --git a/lib/Entrypoint.js b/lib/Entrypoint.js index 892855e1607..c67ff44ed7c 100644 --- a/lib/Entrypoint.js +++ b/lib/Entrypoint.js @@ -6,7 +6,7 @@ const ChunkGroup = require("./ChunkGroup"); -/** @typedef {import("./Chunk.js")} Chunk */ +/** @typedef {import("./Chunk")} Chunk */ /** * Entrypoint serves as an encapsulation primitive for chunks that are diff --git a/lib/HotModuleReplacementPlugin.js b/lib/HotModuleReplacementPlugin.js index fa893aa3d69..a6ca6986e05 100644 --- a/lib/HotModuleReplacementPlugin.js +++ b/lib/HotModuleReplacementPlugin.js @@ -407,5 +407,5 @@ module.exports = class HotModuleReplacementPlugin { }; const hotInitCode = Template.getFunctionContent( - require("./HotModuleReplacement.runtime.js") + require("./HotModuleReplacement.runtime") ); diff --git a/lib/IgnorePlugin.js b/lib/IgnorePlugin.js index fc280e88018..b2c84b12204 100644 --- a/lib/IgnorePlugin.js +++ b/lib/IgnorePlugin.js @@ -4,7 +4,7 @@ */ "use strict"; -/** @typedef {import("./Compiler.js")} Compiler */ +/** @typedef {import("./Compiler")} Compiler */ class IgnorePlugin { /** diff --git a/lib/UseStrictPlugin.js b/lib/UseStrictPlugin.js index 175c6028350..425be2e31c7 100644 --- a/lib/UseStrictPlugin.js +++ b/lib/UseStrictPlugin.js @@ -6,7 +6,7 @@ const ConstDependency = require("./dependencies/ConstDependency"); -/** @typedef {import("./Compiler.js")} Compiler */ +/** @typedef {import("./Compiler")} Compiler */ class UseStrictPlugin { /** diff --git a/lib/dependencies/SystemPlugin.js b/lib/dependencies/SystemPlugin.js index 69f3e8dc017..c85778861b8 100644 --- a/lib/dependencies/SystemPlugin.js +++ b/lib/dependencies/SystemPlugin.js @@ -72,7 +72,7 @@ class SystemPlugin { parser.hooks.expression.for("System").tap("SystemPlugin", () => { const systemPolyfillRequire = ParserHelpers.requireFileAsExpression( parser.state.module.context, - require.resolve("../../buildin/system.js") + require.resolve("../../buildin/system") ); return ParserHelpers.addParsedVariableToModule( parser, diff --git a/lib/node/NodeMainTemplatePlugin.js b/lib/node/NodeMainTemplatePlugin.js index c32ae38da56..a7b88867254 100644 --- a/lib/node/NodeMainTemplatePlugin.js +++ b/lib/node/NodeMainTemplatePlugin.js @@ -305,8 +305,8 @@ module.exports = class NodeMainTemplatePlugin { ); return Template.getFunctionContent( asyncChunkLoading - ? require("./NodeMainTemplateAsync.runtime.js") - : require("./NodeMainTemplate.runtime.js") + ? require("./NodeMainTemplateAsync.runtime") + : require("./NodeMainTemplate.runtime") ) .replace(/\$require\$/g, mainTemplate.requireFn) .replace(/\$hotMainFilename\$/g, currentHotUpdateMainFilename) diff --git a/lib/node/NodeSourcePlugin.js b/lib/node/NodeSourcePlugin.js index 31825bb5c87..d5505f6f5be 100644 --- a/lib/node/NodeSourcePlugin.js +++ b/lib/node/NodeSourcePlugin.js @@ -71,7 +71,7 @@ module.exports = class NodeSourcePlugin { .tap("NodeSourcePlugin", () => { const retrieveGlobalModule = ParserHelpers.requireFileAsExpression( parser.state.module.context, - require.resolve("../../buildin/global.js") + require.resolve("../../buildin/global") ); return ParserHelpers.addParsedVariableToModule( parser, diff --git a/lib/wasm/WasmFinalizeExportsPlugin.js b/lib/wasm/WasmFinalizeExportsPlugin.js index 09584222bb3..d665a5b81c2 100644 --- a/lib/wasm/WasmFinalizeExportsPlugin.js +++ b/lib/wasm/WasmFinalizeExportsPlugin.js @@ -4,7 +4,7 @@ */ "use strict"; -const UnsupportedWebAssemblyFeatureError = require("../wasm/UnsupportedWebAssemblyFeatureError"); +const UnsupportedWebAssemblyFeatureError = require("./UnsupportedWebAssemblyFeatureError"); class WasmFinalizeExportsPlugin { apply(compiler) { diff --git a/lib/web/JsonpMainTemplatePlugin.js b/lib/web/JsonpMainTemplatePlugin.js index 018d2147b09..45a6eb42569 100644 --- a/lib/web/JsonpMainTemplatePlugin.js +++ b/lib/web/JsonpMainTemplatePlugin.js @@ -556,7 +556,7 @@ class JsonpMainTemplatePlugin { } ); const runtimeSource = Template.getFunctionContent( - require("./JsonpMainTemplate.runtime.js") + require("./JsonpMainTemplate.runtime") ) .replace(/\/\/\$semicolon/g, ";") .replace(/\$require\$/g, mainTemplate.requireFn) diff --git a/lib/webworker/WebWorkerMainTemplatePlugin.js b/lib/webworker/WebWorkerMainTemplatePlugin.js index 02d3d5d4265..a668f5d433f 100644 --- a/lib/webworker/WebWorkerMainTemplatePlugin.js +++ b/lib/webworker/WebWorkerMainTemplatePlugin.js @@ -172,7 +172,7 @@ class WebWorkerMainTemplatePlugin { )}];\n` + `${globalObject}[${JSON.stringify(hotUpdateFunction)}] = ` + Template.getFunctionContent( - require("./WebWorkerMainTemplate.runtime.js") + require("./WebWorkerMainTemplate.runtime") ) .replace(/\/\/\$semicolon/g, ";") .replace(/\$require\$/g, mainTemplate.requireFn) From c12ab8d5e4dc8e1abb4b2b0b689288e6c445b6a2 Mon Sep 17 00:00:00 2001 From: Raanan Weber Date: Mon, 9 Jul 2018 17:28:32 +0200 Subject: [PATCH 150/310] Recursive getDevtoolNamespace Supporting the case where options.output.library.root is an Array: ```javascript output: { library: { root: ["MyLibrary", "Sub"], amd: "my-library", commonjs: "my-common-library" }, libraryTarget: "umd" } ``` --- lib/WebpackOptionsDefaulter.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/lib/WebpackOptionsDefaulter.js b/lib/WebpackOptionsDefaulter.js index 3f9da0b72d2..95cef11179d 100644 --- a/lib/WebpackOptionsDefaulter.js +++ b/lib/WebpackOptionsDefaulter.js @@ -17,6 +17,16 @@ const isWebLikeTarget = options => { return options.target === "web" || options.target === "webworker"; }; +const getDevtoolNamespace = library => { + // if options.output.library is a string + if (Array.isArray(library)) { + return library.join("."); + } else if (typeof library === "object") { + return getDevtoolNamespace(library.root); + } + return library || ""; +} + class WebpackOptionsDefaulter extends OptionsDefaulter { constructor() { super(); @@ -60,8 +70,8 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { resolve: { mainFields: options.target === "web" || - options.target === "webworker" || - options.target === "electron-renderer" + options.target === "webworker" || + options.target === "electron-renderer" ? ["browser", "main"] : ["main"] } @@ -136,12 +146,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { } }); this.set("output.devtoolNamespace", "make", options => { - if (Array.isArray(options.output.library)) { - return options.output.library.join("."); - } else if (typeof options.output.library === "object") { - return options.output.library.root || ""; - } - return options.output.library || ""; + return getDevtoolNamespace(options.output.library); }); this.set("output.libraryTarget", "var"); this.set("output.path", path.join(process.cwd(), "dist")); From 47aa3d0ffee3f48d070701c05f5b620986718682 Mon Sep 17 00:00:00 2001 From: Raanan Weber Date: Mon, 9 Jul 2018 17:32:57 +0200 Subject: [PATCH 151/310] adding tests --- .../array-as-output-library-in-object-output/index.js | 1 + .../webpack.config.js | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 test/configCases/source-map/array-as-output-library-in-object-output/index.js create mode 100644 test/configCases/source-map/array-as-output-library-in-object-output/webpack.config.js diff --git a/test/configCases/source-map/array-as-output-library-in-object-output/index.js b/test/configCases/source-map/array-as-output-library-in-object-output/index.js new file mode 100644 index 00000000000..e0b8201c32b --- /dev/null +++ b/test/configCases/source-map/array-as-output-library-in-object-output/index.js @@ -0,0 +1 @@ +it("should compile successfully when output.library.root is an array of strings", function () { }); diff --git a/test/configCases/source-map/array-as-output-library-in-object-output/webpack.config.js b/test/configCases/source-map/array-as-output-library-in-object-output/webpack.config.js new file mode 100644 index 00000000000..d9c8900e51f --- /dev/null +++ b/test/configCases/source-map/array-as-output-library-in-object-output/webpack.config.js @@ -0,0 +1,11 @@ +module.exports = { + devtool: "source-map", + output: { + library: { + root: ["Foo", "[name]"], + amd: "[name]", + commonjs: "[name]" + }, + libraryTarget: "umd" + } +}; From fa7cf3b218c4651daf8a4d2cd478b6fa1e90d06c Mon Sep 17 00:00:00 2001 From: Raanan Weber Date: Mon, 9 Jul 2018 17:50:13 +0200 Subject: [PATCH 152/310] formatting --- lib/WebpackOptionsDefaulter.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/WebpackOptionsDefaulter.js b/lib/WebpackOptionsDefaulter.js index 95cef11179d..6cae0efa5d3 100644 --- a/lib/WebpackOptionsDefaulter.js +++ b/lib/WebpackOptionsDefaulter.js @@ -25,7 +25,7 @@ const getDevtoolNamespace = library => { return getDevtoolNamespace(library.root); } return library || ""; -} +}; class WebpackOptionsDefaulter extends OptionsDefaulter { constructor() { @@ -70,8 +70,8 @@ class WebpackOptionsDefaulter extends OptionsDefaulter { resolve: { mainFields: options.target === "web" || - options.target === "webworker" || - options.target === "electron-renderer" + options.target === "webworker" || + options.target === "electron-renderer" ? ["browser", "main"] : ["main"] } From 3e03edc2cfa481fda69b60fcd1bf43028a9f17a0 Mon Sep 17 00:00:00 2001 From: ferhat elmas Date: Mon, 9 Jul 2018 22:20:45 +0200 Subject: [PATCH 153/310] fix(hot): log messages group arguments of operator or (||) otherwise, nonempty string is always true --- hot/dev-server.js | 4 ++-- hot/only-dev-server.js | 4 ++-- hot/poll.js | 7 +++++-- hot/signal.js | 4 ++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/hot/dev-server.js b/hot/dev-server.js index a4cb0f50d24..682a47f8423 100644 --- a/hot/dev-server.js +++ b/hot/dev-server.js @@ -40,10 +40,10 @@ if (module.hot) { "warning", "[HMR] Cannot apply update. Need to do a full reload!" ); - log("warning", "[HMR] " + err.stack || err.message); + log("warning", "[HMR] " + (err.stack || err.message)); window.location.reload(); } else { - log("warning", "[HMR] Update failed: " + err.stack || err.message); + log("warning", "[HMR] Update failed: " + (err.stack || err.message)); } }); }; diff --git a/hot/only-dev-server.js b/hot/only-dev-server.js index cf452dc6e33..043f2430b54 100644 --- a/hot/only-dev-server.js +++ b/hot/only-dev-server.js @@ -72,11 +72,11 @@ if (module.hot) { "warning", "[HMR] Cannot check for update. Need to do a full reload!" ); - log("warning", "[HMR] " + err.stack || err.message); + log("warning", "[HMR] " + (err.stack || err.message)); } else { log( "warning", - "[HMR] Update check failed: " + err.stack || err.message + "[HMR] Update check failed: " + (err.stack || err.message) ); } }); diff --git a/hot/poll.js b/hot/poll.js index f615accef7a..8193db01f5c 100644 --- a/hot/poll.js +++ b/hot/poll.js @@ -23,10 +23,13 @@ if (module.hot) { var status = module.hot.status(); if (["abort", "fail"].indexOf(status) >= 0) { log("warning", "[HMR] Cannot apply update."); - log("warning", "[HMR] " + err.stack || err.message); + log("warning", "[HMR] " + (err.stack || err.message)); log("warning", "[HMR] You need to restart the application!"); } else { - log("warning", "[HMR] Update failed: " + err.stack || err.message); + log( + "warning", + "[HMR] Update failed: " + (err.stack || err.message) + ); } }); } diff --git a/hot/signal.js b/hot/signal.js index d3ce50e8cc5..24c4f5cb337 100644 --- a/hot/signal.js +++ b/hot/signal.js @@ -37,10 +37,10 @@ if (module.hot) { var status = module.hot.status(); if (["abort", "fail"].indexOf(status) >= 0) { log("warning", "[HMR] Cannot apply update."); - log("warning", "[HMR] " + err.stack || err.message); + log("warning", "[HMR] " + (err.stack || err.message)); log("warning", "[HMR] You need to restart the application!"); } else { - log("warning", "[HMR] Update failed: " + err.stack || err.message); + log("warning", "[HMR] Update failed: " + (err.stack || err.message)); } }); }; From 271b77d45f9c9d107f82b79df25a4fb673ddc411 Mon Sep 17 00:00:00 2001 From: ferhat elmas Date: Mon, 9 Jul 2018 22:48:12 +0200 Subject: [PATCH 154/310] all: typo fixes --- _SETUP.md | 2 +- examples/many-pages/README.md | 4 ++-- examples/many-pages/template.md | 2 +- examples/many-pages/webpack.config.js | 2 +- lib/Chunk.js | 2 +- lib/ChunkGroup.js | 2 +- lib/Compilation.js | 4 ++-- lib/Generator.js | 2 +- lib/optimize/SplitChunksPlugin.js | 2 +- lib/util/cachedMerge.js | 2 +- lib/util/deterministicGrouping.js | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/_SETUP.md b/_SETUP.md index ebd501013be..ce57ab77540 100644 --- a/_SETUP.md +++ b/_SETUP.md @@ -27,7 +27,7 @@ yarn link webpack yarn test ``` -### To run only intergration tests use +### To run only integration tests use ```bash yarn test:integration diff --git a/examples/many-pages/README.md b/examples/many-pages/README.md index 00d976fbc20..84ef71ada33 100644 --- a/examples/many-pages/README.md +++ b/examples/many-pages/README.md @@ -1,6 +1,6 @@ # Info -This example illustrates webpack's algorthim for automatic deduplication using `optimization.splitChunks`. +This example illustrates webpack's algorithm for automatic deduplication using `optimization.splitChunks`. This example application contains 7 pages, each of them importing 1-3 modules from the `node_modules` folder (vendor libs) and 0-3 modules from the `stuff` folder (application modules). In reallity an application is probably more complex, but the same mechanisms apply. @@ -41,7 +41,7 @@ module.exports = { chunks: "all", maxInitialRequests: 20, // for HTTP2 maxAsyncRequests: 20, // for HTTP2 - minSize: 40 // for example only: choosen to match 2 modules + minSize: 40 // for example only: chosen to match 2 modules // omit minSize in real use case to use the default of 30kb } } diff --git a/examples/many-pages/template.md b/examples/many-pages/template.md index 7bbc7b0dd44..b4633cf6dfb 100644 --- a/examples/many-pages/template.md +++ b/examples/many-pages/template.md @@ -1,6 +1,6 @@ # Info -This example illustrates webpack's algorthim for automatic deduplication using `optimization.splitChunks`. +This example illustrates webpack's algorithm for automatic deduplication using `optimization.splitChunks`. This example application contains 7 pages, each of them importing 1-3 modules from the `node_modules` folder (vendor libs) and 0-3 modules from the `stuff` folder (application modules). In reallity an application is probably more complex, but the same mechanisms apply. diff --git a/examples/many-pages/webpack.config.js b/examples/many-pages/webpack.config.js index f47598f6309..b5ce749f624 100644 --- a/examples/many-pages/webpack.config.js +++ b/examples/many-pages/webpack.config.js @@ -14,7 +14,7 @@ module.exports = { chunks: "all", maxInitialRequests: 20, // for HTTP2 maxAsyncRequests: 20, // for HTTP2 - minSize: 40 // for example only: choosen to match 2 modules + minSize: 40 // for example only: chosen to match 2 modules // omit minSize in real use case to use the default of 30kb } } diff --git a/lib/Chunk.js b/lib/Chunk.js index 7d9ad3a05c5..e7b27f52772 100644 --- a/lib/Chunk.js +++ b/lib/Chunk.js @@ -628,7 +628,7 @@ class Chunk { list.sort((a, b) => { const cmp = b.order - a.order; if (cmp !== 0) return cmp; - // TOOD webpack 5 remove this check of compareTo + // TODO webpack 5 remove this check of compareTo if (a.group.compareTo) { return a.group.compareTo(b.group); } diff --git a/lib/ChunkGroup.js b/lib/ChunkGroup.js index 19e8f3c67ee..d2b49501df8 100644 --- a/lib/ChunkGroup.js +++ b/lib/ChunkGroup.js @@ -442,7 +442,7 @@ class ChunkGroup { list.sort((a, b) => { const cmp = b.order - a.order; if (cmp !== 0) return cmp; - // TOOD webpack 5 remove this check of compareTo + // TODO webpack 5 remove this check of compareTo if (a.group.compareTo) { return a.group.compareTo(b.group); } diff --git a/lib/Compilation.js b/lib/Compilation.js index c1be909f17a..8c2d434373f 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -1453,7 +1453,7 @@ class Compilation extends Tapable { * @returns {DependencyReference} a reference for the dependency */ getDependencyReference(module, dependency) { - // TODO remove dep.getReference existance check in webpack 5 + // TODO remove dep.getReference existence check in webpack 5 if (typeof dependency.getReference !== "function") return null; const ref = dependency.getReference(); if (!ref) return null; @@ -2113,7 +2113,7 @@ class Compilation extends Tapable { /** * Used to sort errors and warnings in compilation. this.warnings, and - * this.errors contribute to the compilation hash and therefore shoudl be + * this.errors contribute to the compilation hash and therefore should be * updated whenever other references (having a chunk id) are sorted. This preserves the hash * integrity * diff --git a/lib/Generator.js b/lib/Generator.js index 441f22872de..5c93506d426 100644 --- a/lib/Generator.js +++ b/lib/Generator.js @@ -25,7 +25,7 @@ class Generator { * @returns {Source} generated code */ generate(module, dependencyTemplates, runtimeTemplate, type) { - throw new Error("Generator.generate: must be overriden"); + throw new Error("Generator.generate: must be overridden"); } } diff --git a/lib/optimize/SplitChunksPlugin.js b/lib/optimize/SplitChunksPlugin.js index 54081e544f2..5525c2c8aba 100644 --- a/lib/optimize/SplitChunksPlugin.js +++ b/lib/optimize/SplitChunksPlugin.js @@ -645,7 +645,7 @@ module.exports = class SplitChunksPlugin { isReused = true; } } - // Check if maxRequests condition can be fullfilled + // Check if maxRequests condition can be fulfilled const usedChunks = Array.from(item.chunks).filter(chunk => { // skip if we address ourself diff --git a/lib/util/cachedMerge.js b/lib/util/cachedMerge.js index ff7b4426a62..124f647a3f4 100644 --- a/lib/util/cachedMerge.js +++ b/lib/util/cachedMerge.js @@ -7,7 +7,7 @@ const mergeCache = new WeakMap(); /** - * Merges two given objects and caches the result to avoid computation if same objects passed as arguements again. + * Merges two given objects and caches the result to avoid computation if same objects passed as arguments again. * @example * // performs Object.assign(first, second), stores the result in WeakMap and returns result * cachedMerge({a: 1}, {a: 2}) diff --git a/lib/util/deterministicGrouping.js b/lib/util/deterministicGrouping.js index 75827b0c1bb..7c47b823d1a 100644 --- a/lib/util/deterministicGrouping.js +++ b/lib/util/deterministicGrouping.js @@ -186,7 +186,7 @@ module.exports = ({ maxSize, minSize, items, getSize, getKey }) => { if (left <= right) { // when there is a area between left and right // we look for best split point - // we split at the minimum similiarity + // we split at the minimum similarity // here key space is separated the most let best = left - 1; let bestSimilarity = group.similarities[best]; From 79846d138f8d902adf3fef9fa67c1baa55e5d300 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 10 Jul 2018 10:23:28 +0200 Subject: [PATCH 155/310] make loc in context dependencies a correct object --- lib/ContextModule.js | 21 ++++++++++++++++++++- lib/Dependency.js | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/lib/ContextModule.js b/lib/ContextModule.js index 9db2914b713..c2e4b81a3f8 100644 --- a/lib/ContextModule.js +++ b/lib/ContextModule.js @@ -12,11 +12,28 @@ const contextify = require("./util/identifier").contextify; /** @typedef {import("./dependencies/ContextElementDependency")} ContextElementDependency */ +/** + * @callback ResolveDependenciesCallback + * @param {Error=} err + * @param {ContextElementDependency[]} dependencies + */ + +/** + * @callback ResolveDependencies + * @param {TODO} fs + * @param {TODO} options + * @param {ResolveDependenciesCallback} callback + */ + class ContextModule extends Module { // type ContextMode = "sync" | "eager" | "weak" | "async-weak" | "lazy" | "lazy-once" // type ContextOptions = { resource: string, recursive: boolean, regExp: RegExp, addon?: string, mode?: ContextMode, chunkName?: string, include?: RegExp, exclude?: RegExp, groupOptions?: Object } // resolveDependencies: (fs: FS, options: ContextOptions, (err: Error?, dependencies: Dependency[]) => void) => void // options: ContextOptions + /** + * @param {ResolveDependencies} resolveDependencies function to get dependencies in this context + * @param {TODO} options options object + */ constructor(resolveDependencies, options) { let resource; let resourceQuery; @@ -194,7 +211,9 @@ class ContextModule extends Module { // enhance dependencies with meta info for (const dep of dependencies) { - dep.loc = dep.userRequest; + dep.loc = { + name: dep.userRequest + }; dep.request = this.options.addon + dep.request; } diff --git a/lib/Dependency.js b/lib/Dependency.js index 4b731a7323c..2f0c8fe0905 100644 --- a/lib/Dependency.js +++ b/lib/Dependency.js @@ -30,7 +30,7 @@ const DependencyReference = require("./dependencies/DependencyReference"); /** @typedef {Object} SynteticDependencyLocation * @property {string} name - * @property {number} index + * @property {number=} index */ /** @typedef {SynteticDependencyLocation|RealDependencyLocation} DependencyLocation */ From 9362a65287c2896891ac1d1dad050df3568e303a Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 10 Jul 2018 10:24:22 +0200 Subject: [PATCH 156/310] copy chunk reason to maxSize parts --- lib/optimize/SplitChunksPlugin.js | 1 + test/__snapshots__/StatsTestCases.test.js.snap | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/optimize/SplitChunksPlugin.js b/lib/optimize/SplitChunksPlugin.js index 5525c2c8aba..d53fb5375f2 100644 --- a/lib/optimize/SplitChunksPlugin.js +++ b/lib/optimize/SplitChunksPlugin.js @@ -831,6 +831,7 @@ module.exports = class SplitChunksPlugin { if (i !== results.length - 1) { newPart = compilation.addChunk(name); chunk.split(newPart); + newPart.chunkReason = chunk.chunkReason; // Add all modules to the new chunk for (const module of group.items) { if (typeof module.chunkCondition === "function") { diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index 4951bd664da..1b3e0277f93 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -2841,7 +2841,7 @@ exports[`StatsTestCases should print correct stats for split-chunks-max-size 1`] chunk {11} prod-main~cd7c5bfc.js (main~cd7c5bfc) 1.57 KiB ={0}= ={1}= ={10}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] > ./ main [13] ./very-big.js?3 1.57 KiB {11} [built] - chunk {12} prod-vendors~main~7274e1de.js (vendors~main~7274e1de) 402 bytes ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + chunk {12} prod-vendors~main~7274e1de.js (vendors~main~7274e1de) 402 bytes ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~main) > ./ main [40] ./node_modules/big.js?1 268 bytes {12} [built] [41] ./node_modules/small.js?1 67 bytes {12} [built] @@ -2911,7 +2911,7 @@ Child development: chunk {main~._very-big.js~62f7f644} dev-main~._very-big.js~62f7f644.js (main~._very-big.js~62f7f644) 1.57 KiB ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={vendors~main~._node_modules_b}= ={vendors~main~._node_modules_very-big.js~6bdbed7b}= [entry] [rendered] > ./ main [./very-big.js?1] 1.57 KiB {main~._very-big.js~62f7f644} [built] - chunk {vendors~main~._node_modules_b} dev-vendors~main~._node_modules_b.js (vendors~main~._node_modules_b) 402 bytes ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= ={vendors~main~._node_modules_very-big.js~6bdbed7b}= [initial] [rendered] + chunk {vendors~main~._node_modules_b} dev-vendors~main~._node_modules_b.js (vendors~main~._node_modules_b) 402 bytes ={main~._big.js~1}= ={main~._in-some-directory_b}= ={main~._in-some-directory_very-big.js~8d76cf03}= ={main~._index.js~41f5a26e}= ={main~._inner-module_small.js~3}= ={main~._small.js~1}= ={main~._subfolder_big.js~b}= ={main~._subfolder_small.js~1}= ={main~._very-big.js~08cf55cf}= ={main~._very-big.js~4647fb9d}= ={main~._very-big.js~62f7f644}= ={vendors~main~._node_modules_very-big.js~6bdbed7b}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~main) > ./ main [./node_modules/big.js?1] 268 bytes {vendors~main~._node_modules_b} [built] [./node_modules/small.js?1] 67 bytes {vendors~main~._node_modules_b} [built] From d8cd5d04deebb95a1186517d9b1f54eb402c42fb Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Mon, 9 Jul 2018 22:16:01 +0200 Subject: [PATCH 157/310] Add .mjs to default DelegatedModule options.extensions --- declarations.d.ts | 1 - lib/DelegatedModuleFactoryPlugin.js | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/declarations.d.ts b/declarations.d.ts index 81a0b7c0f29..bd50da6c9b9 100644 --- a/declarations.d.ts +++ b/declarations.d.ts @@ -7,7 +7,6 @@ declare namespace NodeJS { } } - declare module "neo-async" { export interface Dictionary { [key: string]: T; diff --git a/lib/DelegatedModuleFactoryPlugin.js b/lib/DelegatedModuleFactoryPlugin.js index 26db0066f75..a0a05a43878 100644 --- a/lib/DelegatedModuleFactoryPlugin.js +++ b/lib/DelegatedModuleFactoryPlugin.js @@ -15,7 +15,13 @@ class DelegatedModuleFactoryPlugin { constructor(options) { this.options = options; options.type = options.type || "require"; - options.extensions = options.extensions || ["", ".js"]; + options.extensions = options.extensions || [ + "", + ".wasm", + ".mjs", + ".js", + ".json" + ]; } apply(normalModuleFactory) { From 692faf2e45c6a0f8245d31d9d24f4dfdbc9fb75e Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 10 Jul 2018 10:24:04 +0200 Subject: [PATCH 158/310] sort ids in Stats numerical --- lib/Stats.js | 14 ++- .../__snapshots__/StatsTestCases.test.js.snap | 102 +++++++++--------- 2 files changed, 61 insertions(+), 55 deletions(-) diff --git a/lib/Stats.js b/lib/Stats.js index b6db2396c15..ecb373f00cb 100644 --- a/lib/Stats.js +++ b/lib/Stats.js @@ -15,6 +15,12 @@ const optionsOrFallback = (...args) => { return optionValues.find(optionValue => typeof optionValue !== "undefined"); }; +const compareId = (a, b) => { + if (a < b) return -1; + if (a > b) return 1; + return 0; +}; + class Stats { constructor(compilation) { this.compilation = compilation; @@ -543,7 +549,7 @@ class Stats { } return obj; }) - .sort((a, b) => a.moduleId - b.moduleId); + .sort(compareId); } if (showUsedExports) { if (module.used === true) { @@ -614,9 +620,9 @@ class Stats { names: chunk.name ? [chunk.name] : [], files: chunk.files.slice(), hash: chunk.renderedHash, - siblings: Array.from(siblings).sort(), - parents: Array.from(parents).sort(), - children: Array.from(children).sort(), + siblings: Array.from(siblings).sort(compareId), + parents: Array.from(parents).sort(compareId), + children: Array.from(children).sort(compareId), childrenByOrder: childIdByOrder }; if (showChunkModules) { diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index 4951bd664da..f125811ae30 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -83,7 +83,7 @@ chunk {1} 29de52df747b400f6177.js 899 bytes <{10}> ={0}= ={2}= ={8}= > ./c ./d ./e [11] ./index.js 3:0-30 > ./b ./d ./e ./f ./g [11] ./index.js 5:0-44 [2] ./e.js 899 bytes {1} {3} [built] -chunk {2} 7f83e5c2f4e52435dd2c.js 1.76 KiB <{10}> ={0}= ={1}= ={11}= ={3}= ={6}= ={7}= ={9}= [recorded] aggressive splitted +chunk {2} 7f83e5c2f4e52435dd2c.js 1.76 KiB <{10}> ={0}= ={1}= ={3}= ={6}= ={7}= ={9}= ={11}= [recorded] aggressive splitted > ./f ./g ./h ./i ./j ./k [11] ./index.js 4:0-51 > ./b ./d ./e ./f ./g [11] ./index.js 5:0-44 > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 @@ -100,7 +100,7 @@ chunk {5} e5fb899955fa03a8053b.js 1.76 KiB <{10}> > ./b ./c [11] ./index.js 2:0-23 [0] ./b.js 899 bytes {0} {5} [built] [5] ./c.js 899 bytes {5} {8} [built] -chunk {6} 58f368c01f66002b0eb3.js 1.76 KiB <{10}> ={11}= ={2}= +chunk {6} 58f368c01f66002b0eb3.js 1.76 KiB <{10}> ={2}= ={11}= > ./f ./g ./h ./i ./j ./k [11] ./index.js 4:0-51 [8] ./j.js 901 bytes {6} {9} [built] [9] ./k.js 899 bytes {6} {7} [built] @@ -115,7 +115,7 @@ chunk {9} 13713792eb1b5038ab8b.js 1.76 KiB <{10}> ={0}= ={2}= ={3}= ={7}= [re > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 [7] ./i.js 899 bytes {9} {11} [built] [8] ./j.js 901 bytes {6} {9} [built] -chunk {10} d886db099ddf05aadc6d.js (main) 248 bytes >{0}< >{1}< >{11}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< >{8}< >{9}< [entry] [rendered] +chunk {10} d886db099ddf05aadc6d.js (main) 248 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< >{8}< >{9}< >{11}< [entry] [rendered] > ./index main [11] ./index.js 248 bytes {10} [built] chunk {11} ba9fedb7aa0c69201639.js 1.76 KiB <{10}> ={2}= ={6}= [rendered] [recorded] aggressive splitted @@ -217,7 +217,7 @@ Child default: > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{4}> <{9}> ={0}= ={1}= ={3}= ={5}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{3}> <{4}> <{9}> <{10}> ={0}= ={1}= ={3}= ={5}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./b [8] ./index.js 2:0-47 @@ -238,7 +238,7 @@ Child default: chunk {6} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={8}= [rendered] > ./c [8] ./index.js 3:0-47 [6] ./c.js 72 bytes {6} {12} [built] - chunk {7} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{4}> ={2}= [rendered] + chunk {7} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{3}> <{4}> <{10}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {7} [built] @@ -333,7 +333,7 @@ Child multiple-vendors: Entrypoint a = multiple-vendors/libs-x.js multiple-vendors/vendors~a~async-a~async-b~b.js multiple-vendors/a.js Entrypoint b = multiple-vendors/libs-x.js multiple-vendors/vendors~a~async-a~async-b~b.js multiple-vendors/b.js Entrypoint c = multiple-vendors/libs-x.js multiple-vendors/vendors~async-c~c.js multiple-vendors/c.js - chunk {0} multiple-vendors/libs-x.js (libs-x) 20 bytes <{9}> ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: libs) (name: libs-x) + chunk {0} multiple-vendors/libs-x.js (libs-x) 20 bytes <{9}> ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={10}= ={11}= ={12}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: libs) (name: libs-x) > ./a a > ./b b > ./c c @@ -346,19 +346,19 @@ Child multiple-vendors: > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} multiple-vendors/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{5}> <{9}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + chunk {2} multiple-vendors/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{3}> <{5}> <{9}> <{10}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [1] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} multiple-vendors/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={10}= ={11}= ={2}= ={5}= ={6}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) + chunk {3} multiple-vendors/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={5}= ={6}= ={10}= ={11}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) > ./a a > ./b b > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 [3] ./node_modules/y.js 20 bytes {3} [built] - chunk {4} multiple-vendors/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={7}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + chunk {4} multiple-vendors/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={2}= ={7}= ={12}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) > ./c c > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] @@ -373,7 +373,7 @@ Child multiple-vendors: chunk {7} multiple-vendors/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] > ./c [8] ./index.js 3:0-47 [5] ./c.js 72 bytes {7} {12} [built] - chunk {8} multiple-vendors/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{5}> ={2}= [rendered] + chunk {8} multiple-vendors/async-g.js (async-g) 34 bytes <{0}> <{1}> <{3}> <{5}> <{10}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {8} [built] @@ -401,7 +401,7 @@ Child all: Entrypoint a = all/vendors~a~async-a~async-b~async-c~b~c.js all/vendors~a~async-a~async-b~b.js all/a.js Entrypoint b = all/vendors~a~async-a~async-b~async-c~b~c.js all/vendors~a~async-a~async-b~b.js all/b.js Entrypoint c = all/vendors~a~async-a~async-b~async-c~b~c.js all/vendors~async-c~c.js all/c.js - chunk {0} all/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) + chunk {0} all/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={10}= ={11}= ={12}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) > ./a a > ./b b > ./c c @@ -414,19 +414,19 @@ Child all: > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} all/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{5}> <{9}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + chunk {2} all/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{3}> <{5}> <{9}> <{10}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [1] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} all/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={10}= ={11}= ={2}= ={5}= ={6}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) + chunk {3} all/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={5}= ={6}= ={10}= ={11}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) > ./a a > ./b b > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 [3] ./node_modules/y.js 20 bytes {3} [built] - chunk {4} all/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={7}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + chunk {4} all/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={2}= ={7}= ={12}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) > ./c c > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] @@ -441,7 +441,7 @@ Child all: chunk {7} all/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] > ./c [8] ./index.js 3:0-47 [5] ./c.js 72 bytes {7} {12} [built] - chunk {8} all/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{5}> ={2}= [rendered] + chunk {8} all/async-g.js (async-g) 34 bytes <{0}> <{1}> <{3}> <{5}> <{10}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {8} [built] @@ -1821,7 +1821,7 @@ chunk {6} inner2.js (inner2) 0 bytes <{0}> [rendered]" exports[`StatsTestCases should print correct stats for prefetch-preload-mixed 1`] = ` "chunk {0} a.js (a) 136 bytes <{3}> >{4}< >{5}< (prefetch: {4} {5}) [rendered] chunk {1} b.js (b) 203 bytes <{3}> >{6}< >{7}< >{8}< (prefetch: {6} {8}) (preload: {7}) [rendered] -chunk {2} c.js (c) 134 bytes <{3}> >{10}< >{9}< (preload: {9} {10}) [rendered] +chunk {2} c.js (c) 134 bytes <{3}> >{9}< >{10}< (preload: {9} {10}) [rendered] chunk {3} main.js (main) 195 bytes >{0}< >{1}< >{2}< (prefetch: {0} {1} {2}) [entry] [rendered] chunk {4} a1.js (a1) 0 bytes <{0}> [rendered] chunk {5} a2.js (a2) 0 bytes <{0}> [rendered] @@ -2214,9 +2214,9 @@ Entrypoint main = main.js | single entry ./main.js main | ./components/src/CompAB/CompB.js 77 bytes [built] | [only some exports used: default] - | harmony import specifier ./components ./main.js 4:15-20 (skipped side-effect-free modules) | harmony side effect evaluation ./CompB [7] ./components/src/CompAB/index.js 2:0-43 | harmony export imported specifier ./CompB [7] ./components/src/CompAB/index.js 2:0-43 + | harmony import specifier ./components ./main.js 4:15-20 (skipped side-effect-free modules) [2] ./components/src/index.js 84 bytes [built] [no exports used] harmony side effect evaluation ./components [1] ./main.js + 1 modules 1:0-44 @@ -2301,7 +2301,7 @@ exports[`StatsTestCases should print correct stats for split-chunks 1`] = ` > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{4}> <{9}> ={0}= ={1}= ={3}= ={5}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{3}> <{4}> <{9}> <{10}> ={0}= ={1}= ={3}= ={5}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./b [8] ./index.js 2:0-47 @@ -2322,7 +2322,7 @@ exports[`StatsTestCases should print correct stats for split-chunks 1`] = ` chunk {6} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={8}= [rendered] > ./c [8] ./index.js 3:0-47 [6] ./c.js 72 bytes {6} {12} [built] - chunk {7} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{4}> ={2}= [rendered] + chunk {7} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{3}> <{4}> <{10}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {7} [built] @@ -2359,7 +2359,7 @@ Child all-chunks: Entrypoint a = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~a~async-a~async-b~b.js default/a.js Entrypoint b = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~a~async-a~async-b~b.js default/b.js Entrypoint c = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~async-c~c.js default/c.js - chunk {0} default/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) + chunk {0} default/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={10}= ={11}= ={12}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) > ./a a > ./b b > ./c c @@ -2372,19 +2372,19 @@ Child all-chunks: > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{5}> <{9}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{3}> <{5}> <{9}> <{10}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [1] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} default/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={10}= ={11}= ={2}= ={5}= ={6}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) + chunk {3} default/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={5}= ={6}= ={10}= ={11}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) > ./a a > ./b b > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 [3] ./node_modules/y.js 20 bytes {3} [built] - chunk {4} default/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={7}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + chunk {4} default/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={2}= ={7}= ={12}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) > ./c c > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] @@ -2399,7 +2399,7 @@ Child all-chunks: chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] > ./c [8] ./index.js 3:0-47 [5] ./c.js 72 bytes {7} {12} [built] - chunk {8} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{5}> ={2}= [rendered] + chunk {8} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{3}> <{5}> <{10}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {8} [built] @@ -2483,7 +2483,7 @@ Child name-too-long: Entrypoint aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f.js vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793.js async-a.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.js Entrypoint bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f.js vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793.js async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc.js async-b.js bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js Entrypoint cccccccccccccccccccccccccccccc = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f.js vendors~async-c~cccccccccccccccccccccccccccccc.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793.js async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc.js async-c.js cccccccccccccccccccccccccccccc.js - chunk {0} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f) 20 bytes <{9}> ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f) + chunk {0} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f) 20 bytes <{9}> ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={10}= ={11}= ={12}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f) > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb > ./c cccccccccccccccccccccccccccccc @@ -2491,7 +2491,7 @@ Child name-too-long: > ./b [4] ./index.js 2:0-47 > ./c [4] ./index.js 3:0-47 [2] ./node_modules/x.js 20 bytes {0} [built] - chunk {1} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793) 20 bytes <{9}> ={0}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: default) (name: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793) + chunk {1} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={10}= ={11}= ={12}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: default) (name: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793) > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb > ./c cccccccccccccccccccccccccccccc @@ -2499,7 +2499,7 @@ Child name-too-long: > ./b [4] ./index.js 2:0-47 > ./c [4] ./index.js 3:0-47 [1] ./d.js 20 bytes {1} [built] - chunk {2} async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc.js (async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) 20 bytes <{0}> <{1}> <{10}> <{3}> <{4}> <{9}> ={0}= ={1}= ={11}= ={12}= ={3}= ={5}= ={6}= ={7}= ={8}= [initial] [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) + chunk {2} async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc.js (async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) 20 bytes <{0}> <{1}> <{3}> <{4}> <{9}> <{10}> ={0}= ={1}= ={3}= ={5}= ={6}= ={7}= ={8}= ={11}= ={12}= [initial] [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb @@ -2507,31 +2507,31 @@ Child name-too-long: > ./b [4] ./index.js 2:0-47 > ./c [4] ./index.js 3:0-47 [0] ./f.js 20 bytes {2} [built] - chunk {3} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) 20 bytes <{9}> ={0}= ={1}= ={10}= ={11}= ={2}= ={4}= ={5}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) + chunk {3} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) 20 bytes <{9}> ={0}= ={1}= ={2}= ={4}= ={5}= ={10}= ={11}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb > ./a [4] ./index.js 1:0-47 > ./b [4] ./index.js 2:0-47 [3] ./node_modules/y.js 20 bytes {3} [built] - chunk {4} async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={10}= ={3}= >{2}< >{8}< [initial] [rendered] reused as split chunk (cache group: default) + chunk {4} async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= ={10}= >{2}< >{8}< [initial] [rendered] reused as split chunk (cache group: default) > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > ./a [4] ./index.js 1:0-47 [8] ./a.js + 1 modules 156 bytes {4} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {5} async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={11}= ={2}= ={3}= [initial] [rendered] reused as split chunk (cache group: default) + chunk {5} async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= ={11}= [initial] [rendered] reused as split chunk (cache group: default) > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb > ./b [4] ./index.js 2:0-47 [5] ./b.js 72 bytes {5} [built] - chunk {6} async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={7}= [initial] [rendered] reused as split chunk (cache group: default) + chunk {6} async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={7}= ={12}= [initial] [rendered] reused as split chunk (cache group: default) > ./c cccccccccccccccccccccccccccccc > ./c [4] ./index.js 3:0-47 [6] ./c.js 72 bytes {6} [built] - chunk {7} vendors~async-c~cccccccccccccccccccccccccccccc.js (vendors~async-c~cccccccccccccccccccccccccccccc) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={6}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~cccccccccccccccccccccccccccccc) + chunk {7} vendors~async-c~cccccccccccccccccccccccccccccc.js (vendors~async-c~cccccccccccccccccccccccccccccc) 20 bytes <{9}> ={0}= ={1}= ={2}= ={6}= ={12}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~cccccccccccccccccccccccccccccc) > ./c cccccccccccccccccccccccccccccc > ./c [4] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {7} [built] - chunk {8} async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{4}> ={2}= [rendered] + chunk {8} async-g.js (async-g) 34 bytes <{0}> <{1}> <{3}> <{4}> <{10}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {8} [built] @@ -2549,7 +2549,7 @@ Child custom-chunks-filter: Entrypoint a = default/a.js Entrypoint b = default/vendors~async-a~async-b~async-c~b~c.js default/vendors~async-a~async-b~b.js default/b.js Entrypoint c = default/vendors~async-a~async-b~async-c~b~c.js default/vendors~async-c~c.js default/c.js - chunk {0} default/vendors~async-a~async-b~async-c~b~c.js (vendors~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={1}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c~b~c) + chunk {0} default/vendors~async-a~async-b~async-c~b~c.js (vendors~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={11}= ={12}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c~b~c) > ./b b > ./c c > ./a [8] ./index.js 1:0-47 @@ -2561,18 +2561,18 @@ Child custom-chunks-filter: > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{10}> <{3}> <{5}> <{9}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{3}> <{5}> <{9}> <{10}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [1] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} default/vendors~async-a~async-b~b.js (vendors~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={11}= ={2}= ={5}= ={6}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~b) + chunk {3} default/vendors~async-a~async-b~b.js (vendors~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={5}= ={6}= ={11}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~b) > ./b b > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 [3] ./node_modules/y.js 20 bytes {3} {10} [built] - chunk {4} default/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={12}= ={2}= ={7}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + chunk {4} default/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={2}= ={7}= ={12}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) > ./c c > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] @@ -2587,7 +2587,7 @@ Child custom-chunks-filter: chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] > ./c [8] ./index.js 3:0-47 [5] ./c.js 72 bytes {7} {12} [built] - chunk {8} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{10}> <{3}> <{5}> ={2}= [rendered] + chunk {8} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{3}> <{5}> <{10}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 [9] ./g.js 34 bytes {8} [built] @@ -2775,30 +2775,30 @@ chunk {3} b.js (b) 43 bytes >{0}< >{1}< [entry] [rendered] exports[`StatsTestCases should print correct stats for split-chunks-max-size 1`] = ` "Child production: Entrypoint main = prod-vendors~main~7274e1de.js prod-vendors~main~0feae4ad.js prod-main~6e7ead72.js prod-main~6a2ae26b.js prod-main~17acad98.js prod-main~b2c7414a.js prod-main~75f09de8.js prod-main~052b3814.js prod-main~3ff27526.js prod-main~11485824.js prod-main~c6931360.js prod-main~cd7c5bfc.js prod-main~02369f19.js - chunk {0} prod-main~02369f19.js (main~02369f19) 1.57 KiB ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [entry] [rendered] + chunk {0} prod-main~02369f19.js (main~02369f19) 1.57 KiB ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= ={12}= [entry] [rendered] > ./ main [11] ./very-big.js?1 1.57 KiB {0} [built] - chunk {1} prod-vendors~main~0feae4ad.js (vendors~main~0feae4ad) 1.57 KiB ={0}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~main) + chunk {1} prod-vendors~main~0feae4ad.js (vendors~main~0feae4ad) 1.57 KiB ={0}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= ={12}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~main) > ./ main [43] ./node_modules/very-big.js?1 1.57 KiB {1} [built] - chunk {2} prod-main~6e7ead72.js (main~6e7ead72) 536 bytes ={0}= ={1}= ={10}= ={11}= ={12}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + chunk {2} prod-main~6e7ead72.js (main~6e7ead72) 536 bytes ={0}= ={1}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= ={12}= [initial] [rendered] > ./ main [0] ./big.js?1 268 bytes {2} [built] [1] ./big.js?2 268 bytes {2} [built] - chunk {3} prod-main~6a2ae26b.js (main~6a2ae26b) 536 bytes ={0}= ={1}= ={10}= ={11}= ={12}= ={2}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + chunk {3} prod-main~6a2ae26b.js (main~6a2ae26b) 536 bytes ={0}= ={1}= ={2}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= ={12}= [initial] [rendered] > ./ main [34] ./in-some-directory/big.js?1 268 bytes {3} [built] [35] ./in-some-directory/small.js?1 67 bytes {3} [built] [36] ./in-some-directory/small.js?2 67 bytes {3} [built] [37] ./in-some-directory/small.js?3 67 bytes {3} [built] [38] ./in-some-directory/small.js?4 67 bytes {3} [built] - chunk {4} prod-main~17acad98.js (main~17acad98) 1.57 KiB ={0}= ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + chunk {4} prod-main~17acad98.js (main~17acad98) 1.57 KiB ={0}= ={1}= ={2}= ={3}= ={5}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= ={12}= [initial] [rendered] > ./ main [39] ./in-some-directory/very-big.js?1 1.57 KiB {4} [built] - chunk {5} prod-main~b2c7414a.js (main~b2c7414a) 1.19 KiB ={0}= ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + chunk {5} prod-main~b2c7414a.js (main~b2c7414a) 1.19 KiB ={0}= ={1}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= ={12}= [initial] [rendered] > ./ main [44] ./index.js 1.19 KiB {5} [built] - chunk {6} prod-main~75f09de8.js (main~75f09de8) 603 bytes ={0}= ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={7}= ={8}= ={9}= [initial] [rendered] + chunk {6} prod-main~75f09de8.js (main~75f09de8) 603 bytes ={0}= ={1}= ={2}= ={3}= ={4}= ={5}= ={7}= ={8}= ={9}= ={10}= ={11}= ={12}= [initial] [rendered] > ./ main [25] ./inner-module/small.js?1 67 bytes {6} [built] [26] ./inner-module/small.js?2 67 bytes {6} [built] @@ -2809,7 +2809,7 @@ exports[`StatsTestCases should print correct stats for split-chunks-max-size 1`] [31] ./inner-module/small.js?7 67 bytes {6} [built] [32] ./inner-module/small.js?8 67 bytes {6} [built] [33] ./inner-module/small.js?9 67 bytes {6} [built] - chunk {7} prod-main~052b3814.js (main~052b3814) 603 bytes ={0}= ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={8}= ={9}= [initial] [rendered] + chunk {7} prod-main~052b3814.js (main~052b3814) 603 bytes ={0}= ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={8}= ={9}= ={10}= ={11}= ={12}= [initial] [rendered] > ./ main [2] ./small.js?1 67 bytes {7} [built] [3] ./small.js?2 67 bytes {7} [built] @@ -2820,11 +2820,11 @@ exports[`StatsTestCases should print correct stats for split-chunks-max-size 1`] [8] ./small.js?7 67 bytes {7} [built] [9] ./small.js?8 67 bytes {7} [built] [10] ./small.js?9 67 bytes {7} [built] - chunk {8} prod-main~3ff27526.js (main~3ff27526) 536 bytes ={0}= ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={9}= [initial] [rendered] + chunk {8} prod-main~3ff27526.js (main~3ff27526) 536 bytes ={0}= ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={9}= ={10}= ={11}= ={12}= [initial] [rendered] > ./ main [14] ./subfolder/big.js?1 268 bytes {8} [built] [15] ./subfolder/big.js?2 268 bytes {8} [built] - chunk {9} prod-main~11485824.js (main~11485824) 603 bytes ={0}= ={1}= ={10}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= [initial] [rendered] + chunk {9} prod-main~11485824.js (main~11485824) 603 bytes ={0}= ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={10}= ={11}= ={12}= [initial] [rendered] > ./ main [16] ./subfolder/small.js?1 67 bytes {9} [built] [17] ./subfolder/small.js?2 67 bytes {9} [built] @@ -2835,13 +2835,13 @@ exports[`StatsTestCases should print correct stats for split-chunks-max-size 1`] [22] ./subfolder/small.js?7 67 bytes {9} [built] [23] ./subfolder/small.js?8 67 bytes {9} [built] [24] ./subfolder/small.js?9 67 bytes {9} [built] - chunk {10} prod-main~c6931360.js (main~c6931360) 1.57 KiB ={0}= ={1}= ={11}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + chunk {10} prod-main~c6931360.js (main~c6931360) 1.57 KiB ={0}= ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= ={11}= ={12}= [initial] [rendered] > ./ main [12] ./very-big.js?2 1.57 KiB {10} [built] - chunk {11} prod-main~cd7c5bfc.js (main~cd7c5bfc) 1.57 KiB ={0}= ={1}= ={10}= ={12}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + chunk {11} prod-main~cd7c5bfc.js (main~cd7c5bfc) 1.57 KiB ={0}= ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= ={10}= ={12}= [initial] [rendered] > ./ main [13] ./very-big.js?3 1.57 KiB {11} [built] - chunk {12} prod-vendors~main~7274e1de.js (vendors~main~7274e1de) 402 bytes ={0}= ={1}= ={10}= ={11}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= [initial] [rendered] + chunk {12} prod-vendors~main~7274e1de.js (vendors~main~7274e1de) 402 bytes ={0}= ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= [initial] [rendered] > ./ main [40] ./node_modules/big.js?1 268 bytes {12} [built] [41] ./node_modules/small.js?1 67 bytes {12} [built] From a4825654eb4642b3c51d6f59a9b4dc3b410565df Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 10 Jul 2018 12:18:34 +0200 Subject: [PATCH 159/310] upgrade jest --- .eslintrc.js | 5 +- package.json | 10 +- test/ConfigTestCases.test.js | 2 + test/HotTestCases.test.js | 1 + test/TestCases.template.js | 1 + test/WatchTestCases.test.js | 2 + test/cases/chunks/import-context/index.js | 7 +- test/cases/chunks/import/index.js | 7 +- test/cases/chunks/inline-options/index.js | 14 +- test/cases/chunks/issue-2443/index.js | 7 +- test/cases/json/import-lazy/index.js | 49 +- test/cases/mjs/cjs-import-default/index.mjs | 35 +- .../cases/mjs/namespace-object-lazy/index.mjs | 28 +- .../non-mjs-namespace-object-lazy/index.js | 22 +- .../index.js | 2 +- .../optimize/tree-shaking-star2/index.js | 7 +- .../parsing/harmony-commonjs-mix/index.js | 7 +- test/cases/parsing/issue-2050/index.js | 7 +- test/cases/parsing/issue-2522/index.js | 7 +- test/cases/parsing/issue-3964/index.js | 2 +- test/cases/parsing/issue-4179/index.js | 2 +- .../scope-hoisting/export-namespace/index.js | 14 +- .../issue-5020-minimal/index.js | 19 +- test/cases/scope-hoisting/issue-5020/index.js | 51 +- test/cases/scope-hoisting/issue-5443/index.js | 7 +- .../side-effects/missing-module-7499/index.js | 7 +- .../System.import/index.js | 2 +- .../dll-plugin-entry/1-use-dll/index.js | 2 +- .../configCases/dll-plugin/1-use-dll/index.js | 2 +- .../2-use-dll-without-scope/index.js | 2 +- .../dll-plugin/3-use-dll-with-hashid/index.js | 2 +- .../parsing/system.import/index.js | 2 +- .../target/node-dynamic-import/index.js | 28 +- .../concat/reload-compat-flag/index.js | 14 +- .../plugins/define-plugin/0/index.js | 14 +- yarn.lock | 703 ++++++++++-------- 36 files changed, 561 insertions(+), 532 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 477b21dbaef..639c80155a3 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -61,7 +61,7 @@ module.exports = { browser: true }, globals: { - Promise: false, + Promise: false }, parserOptions: { ecmaVersion: 5 @@ -71,6 +71,9 @@ module.exports = { files: ["test/**/*.js"], env: { "jest/globals": true + }, + globals: { + nsObj: false } } ] diff --git a/package.json b/package.json index b6f5c9b309f..3649114fdd7 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "istanbul": "^0.4.5", "jade": "^1.11.0", "jade-loader": "~0.8.0", - "jest": "^23.0.1", + "jest": "^23.3.0", "jest-silent-reporter": "^0.0.5", "json-loader": "^0.5.7", "less": "^2.5.1", @@ -82,6 +82,14 @@ "worker-loader": "^1.1.1", "xxhashjs": "^0.2.1" }, + "resolutions": { + "**/jest-message-util/micromatch": "^2.3.11", + "**/jest-cli/micromatch": "^2.3.11", + "**/jest-runtime/micromatch": "^2.3.11", + "**/jest-haste-map/micromatch": "^2.3.11", + "**/jest-haste-map/sane/micromatch": "^2.3.11", + "**/jest-config/babel-jest/babel-plugin-istanbul/test-exclude/micromatch": "^2.3.11" + }, "engines": { "node": ">=6.11.5" }, diff --git a/test/ConfigTestCases.test.js b/test/ConfigTestCases.test.js index 008d3b6d49d..7776de34c39 100644 --- a/test/ConfigTestCases.test.js +++ b/test/ConfigTestCases.test.js @@ -211,6 +211,7 @@ describe("ConfigTestCases", () => { ) { fn = vm.runInNewContext( "(function(require, module, exports, __dirname, __filename, it, beforeEach, afterEach, expect, jest, window) {" + + 'function nsObj(m) { Object.defineProperty(m, Symbol.toStringTag, { value: "Module" }); return m; }' + content + "\n})", globalContext, @@ -220,6 +221,7 @@ describe("ConfigTestCases", () => { fn = vm.runInThisContext( "(function(require, module, exports, __dirname, __filename, it, beforeEach, afterEach, expect, jest) {" + "global.expect = expect; " + + 'function nsObj(m) { Object.defineProperty(m, Symbol.toStringTag, { value: "Module" }); return m; }' + content + "\n})", p diff --git a/test/HotTestCases.test.js b/test/HotTestCases.test.js index 66001829d80..6c64a6e03a0 100644 --- a/test/HotTestCases.test.js +++ b/test/HotTestCases.test.js @@ -151,6 +151,7 @@ describe("HotTestCases", () => { const fn = vm.runInThisContext( "(function(require, module, exports, __dirname, __filename, it, expect, NEXT, STATS) {" + "global.expect = expect;" + + 'function nsObj(m) { Object.defineProperty(m, Symbol.toStringTag, { value: "Module" }); return m; }' + fs.readFileSync(p, "utf-8") + "\n})", p diff --git a/test/TestCases.template.js b/test/TestCases.template.js index 89e63c7cadb..39ff2bdf5a9 100644 --- a/test/TestCases.template.js +++ b/test/TestCases.template.js @@ -216,6 +216,7 @@ const describeCases = config => { const fn = vm.runInThisContext( "(function(require, module, exports, __dirname, it, expect) {" + "global.expect = expect;" + + 'function nsObj(m) { Object.defineProperty(m, Symbol.toStringTag, { value: "Module" }); return m; }' + fs.readFileSync(p, "utf-8") + "\n})", p diff --git a/test/WatchTestCases.test.js b/test/WatchTestCases.test.js index a1d957aacbc..b425f099a8a 100644 --- a/test/WatchTestCases.test.js +++ b/test/WatchTestCases.test.js @@ -245,6 +245,7 @@ describe("WatchTestCases", () => { ) { fn = vm.runInNewContext( "(function(require, module, exports, __dirname, __filename, it, WATCH_STEP, STATS_JSON, STATE, expect, window) {" + + 'function nsObj(m) { Object.defineProperty(m, Symbol.toStringTag, { value: "Module" }); return m; }' + content + "\n})", globalContext, @@ -254,6 +255,7 @@ describe("WatchTestCases", () => { fn = vm.runInThisContext( "(function(require, module, exports, __dirname, __filename, it, WATCH_STEP, STATS_JSON, STATE, expect) {" + "global.expect = expect;" + + 'function nsObj(m) { Object.defineProperty(m, Symbol.toStringTag, { value: "Module" }); return m; }' + content + "\n})", p diff --git a/test/cases/chunks/import-context/index.js b/test/cases/chunks/import-context/index.js index 9392c88775f..3f5e41d5ad6 100644 --- a/test/cases/chunks/import-context/index.js +++ b/test/cases/chunks/import-context/index.js @@ -23,10 +23,9 @@ function testCase(load, done) { it("should be able to use expressions in import", function(done) { function load(name, expected, callback) { import("./dir/" + name).then(function(result) { - expect(result).toEqual({ - default: expected, - [Symbol.toStringTag]: "Module" - }); + expect(result).toEqual(nsObj({ + default: expected + })); callback(); }).catch(function(err) { done(err); diff --git a/test/cases/chunks/import/index.js b/test/cases/chunks/import/index.js index e9bbf35d5df..0810e5c7e88 100644 --- a/test/cases/chunks/import/index.js +++ b/test/cases/chunks/import/index.js @@ -1,9 +1,8 @@ it("should be able to use import", function(done) { import("./two").then(function(two) { - expect(two).toEqual({ - default: 2, - [Symbol.toStringTag]: "Module" - }); + expect(two).toEqual(nsObj({ + default: 2 + })); done(); }).catch(function(err) { done(err); diff --git a/test/cases/chunks/inline-options/index.js b/test/cases/chunks/inline-options/index.js index 23c60da711a..def7f37a3bf 100644 --- a/test/cases/chunks/inline-options/index.js +++ b/test/cases/chunks/inline-options/index.js @@ -110,17 +110,15 @@ function testChunkLoading(load, expectedSyncInitial, expectedSyncRequested) { sync = true; var p = Promise.all([ load("a").then(function(a) { - expect(a).toEqual({ - default: "a", - [Symbol.toStringTag]: "Module" - }); + expect(a).toEqual(nsObj({ + default: "a" + })); expect(sync).toBe(true); }), load("c").then(function(c) { - expect(c).toEqual({ - default: "c", - [Symbol.toStringTag]: "Module" - }); + expect(c).toEqual(nsObj({ + default: "c" + })); expect(sync).toBe(expectedSyncRequested); }) ]); diff --git a/test/cases/chunks/issue-2443/index.js b/test/cases/chunks/issue-2443/index.js index 76388fef631..731b88a8128 100644 --- a/test/cases/chunks/issue-2443/index.js +++ b/test/cases/chunks/issue-2443/index.js @@ -1,10 +1,9 @@ it("should be able to use expressions in import (directory)", function(done) { function load(name, expected, callback) { import("./dir/" + name + "/file.js").then(function(result) { - expect(result).toEqual({ - default: expected, - [Symbol.toStringTag]: "Module" - }); + expect(result).toEqual(nsObj({ + default: expected + })); callback(); }).catch(function(err) { done(err); diff --git a/test/cases/json/import-lazy/index.js b/test/cases/json/import-lazy/index.js index 2f01d1b61fa..2837ad304e6 100644 --- a/test/cases/json/import-lazy/index.js +++ b/test/cases/json/import-lazy/index.js @@ -9,27 +9,23 @@ it("should be possible to import json data async", function() { import("../data/f.json"), import("../data/g.json") ]).then(([a, b, c, d, e, f, g]) => { - expect(a).toEqual({ - default: null, - [Symbol.toStringTag]: "Module" - }); - expect(b).toEqual({ - default: 123, - [Symbol.toStringTag]: "Module" - }); - expect(c).toEqual({ + expect(a).toEqual(nsObj({ + default: null + })); + expect(b).toEqual(nsObj({ + default: 123 + })); + expect(c).toEqual(nsObj({ 0: 1, 1: 2, 2: 3, 3: 4, - default: [1, 2, 3, 4], - [Symbol.toStringTag]: "Module" - }); - expect(d).toEqual({ - default: {}, - [Symbol.toStringTag]: "Module" - }); - expect(e).toEqual({ + default: [1, 2, 3, 4] + })); + expect(d).toEqual(nsObj({ + default: {} + })); + expect(e).toEqual(nsObj({ aa: 1, bb: 2, 1: "x", @@ -37,25 +33,22 @@ it("should be possible to import json data async", function() { aa: 1, bb: 2, "1": "x" - }, - [Symbol.toStringTag]: "Module" - }); - expect(f).toEqual({ + } + })); + expect(f).toEqual(nsObj({ named: "named", default: { named: "named", "default": "default", __esModule: true - }, - [Symbol.toStringTag]: "Module" - }); - expect(g).toEqual({ + } + })); + expect(g).toEqual(nsObj({ named: {}, default: { named: {} - }, - [Symbol.toStringTag]: "Module" - }); + } + })); expect(g.named).toBe(g.default.named); }); }); diff --git a/test/cases/mjs/cjs-import-default/index.mjs b/test/cases/mjs/cjs-import-default/index.mjs index 2094d704219..1168325a807 100644 --- a/test/cases/mjs/cjs-import-default/index.mjs +++ b/test/cases/mjs/cjs-import-default/index.mjs @@ -17,33 +17,30 @@ it("should get correct values when importing named exports from a CommonJs modul default: "default" } }); - expect(star).toEqual({ + expect(star).toEqual(nsObj({ default: { data: "ok", default: "default" - }, - [Symbol.toStringTag]: "Module" - }); + } + })); expect({ star }).toEqual({ - star: { + star: nsObj({ default: { data: "ok", default: "default" - }, - [Symbol.toStringTag]: "Module" - } + } + }) }); expect(star.default).toEqual({ data: "ok", default: "default" }); - expect(ns).toEqual({ + expect(ns).toEqual(nsObj({ default: { data: "ok", default: "default" - }, - [Symbol.toStringTag]: "Module" - }); + } + })); expect(def1).toEqual({ data: "ok", default: "default" @@ -53,14 +50,13 @@ it("should get correct values when importing named exports from a CommonJs modul default: "default" }); expect((typeof data2)).toBe("undefined"); - expect(reexport).toEqual({ - ns: { + expect(reexport).toEqual(nsObj({ + ns: nsObj({ default: { data: "ok", default: "default" - }, - [Symbol.toStringTag]: "Module" - }, + } + }), default: { data: "ok", default: "default" @@ -69,7 +65,6 @@ it("should get correct values when importing named exports from a CommonJs modul data: "ok", default: "default" }, - data: undefined, - [Symbol.toStringTag]: "Module" - }); + data: undefined + })); }); diff --git a/test/cases/mjs/namespace-object-lazy/index.mjs b/test/cases/mjs/namespace-object-lazy/index.mjs index 539e66910d8..daf92e19219 100644 --- a/test/cases/mjs/namespace-object-lazy/index.mjs +++ b/test/cases/mjs/namespace-object-lazy/index.mjs @@ -1,13 +1,13 @@ it("should receive a namespace object when importing commonjs", function(done) { import("./cjs.js").then(function(result) { - expect(result).toEqual({ default: { named: "named", default: "default" }, [Symbol.toStringTag]: "Module" }); + expect(result).toEqual(nsObj({ default: { named: "named", default: "default" } })); done(); }).catch(done); }); it("should receive a namespace object when importing commonjs with __esModule", function(done) { import("./cjs-esmodule.js").then(function(result) { - expect(result).toEqual({ default: { __esModule: true, named: "named", default: "default" }, [Symbol.toStringTag]: "Module" }); + expect(result).toEqual(nsObj({ default: { __esModule: true, named: "named", default: "default" } })); done(); }).catch(done); }); @@ -60,27 +60,27 @@ function promiseTest(promise, equalsTo) { it("should receive a namespace object when importing commonjs via context", function() { return Promise.all([ - promiseTest(contextCJS("one"), { default: { named: "named", default: "default" }, [Symbol.toStringTag]: "Module" }), - promiseTest(contextCJS("two"), { default: { __esModule: true, named: "named", default: "default" }, [Symbol.toStringTag]: "Module" }), - promiseTest(contextCJS("three"), { default: { named: "named", default: "default" }, [Symbol.toStringTag]: "Module" }), - promiseTest(contextCJS("null"), { default: null, [Symbol.toStringTag]: "Module" }) + promiseTest(contextCJS("one"), nsObj({ default: { named: "named", default: "default" } })), + promiseTest(contextCJS("two"), nsObj({ default: { __esModule: true, named: "named", default: "default" } })), + promiseTest(contextCJS("three"), nsObj({ default: { named: "named", default: "default" } })), + promiseTest(contextCJS("null"), nsObj({ default: null })) ]); }); it("should receive a namespace object when importing harmony via context", function() { return Promise.all([ - promiseTest(contextHarmony("one"), { named: "named", default: "default", [Symbol.toStringTag]: "Module" }), - promiseTest(contextHarmony("two"), { named: "named", default: "default", [Symbol.toStringTag]: "Module" }), - promiseTest(contextHarmony("three"), { named: "named", default: "default", [Symbol.toStringTag]: "Module" }) + promiseTest(contextHarmony("one"), nsObj({ named: "named", default: "default" })), + promiseTest(contextHarmony("two"), nsObj({ named: "named", default: "default" })), + promiseTest(contextHarmony("three"), nsObj({ named: "named", default: "default" })) ]); }); it("should receive a namespace object when importing mixed content via context", function() { return Promise.all([ - promiseTest(contextMixed("one"), { default: { named: "named", default: "default" }, [Symbol.toStringTag]: "Module" }), - promiseTest(contextMixed("two"), { default: { __esModule: true, named: "named", default: "default" }, [Symbol.toStringTag]: "Module" }), - promiseTest(contextMixed("three"), { named: "named", default: "default", [Symbol.toStringTag]: "Module" }), - promiseTest(contextMixed("null"), { default: null, [Symbol.toStringTag]: "Module" }), - promiseTest(contextMixed("json.json"), { named: "named", default: { named: "named", default: "default" }, [Symbol.toStringTag]: "Module" }) + promiseTest(contextMixed("one"), nsObj({ default: { named: "named", default: "default" } })), + promiseTest(contextMixed("two"), nsObj({ default: { __esModule: true, named: "named", default: "default" } })), + promiseTest(contextMixed("three"), nsObj({ named: "named", default: "default" })), + promiseTest(contextMixed("null"), nsObj({ default: null })), + promiseTest(contextMixed("json.json"), nsObj({ named: "named", default: { named: "named", default: "default" } })) ]); }); diff --git a/test/cases/mjs/non-mjs-namespace-object-lazy/index.js b/test/cases/mjs/non-mjs-namespace-object-lazy/index.js index 936032eb9b6..1059b4dc9d4 100644 --- a/test/cases/mjs/non-mjs-namespace-object-lazy/index.js +++ b/test/cases/mjs/non-mjs-namespace-object-lazy/index.js @@ -1,6 +1,6 @@ it("should receive a namespace object when importing commonjs", function(done) { import("./cjs").then(function(result) { - expect(result).toEqual({ named: "named", default: { named: "named", default: "default" }, [Symbol.toStringTag]: "Module" }); + expect(result).toEqual(nsObj({ named: "named", default: { named: "named", default: "default" } })); done(); }).catch(done); }); @@ -60,27 +60,27 @@ function promiseTest(promise, equalsTo) { it("should receive a namespace object when importing commonjs via context", function() { return Promise.all([ - promiseTest(contextCJS("one"), { named: "named", default: { named: "named", default: "default" }, [Symbol.toStringTag]: "Module" }), + promiseTest(contextCJS("one"), nsObj({ named: "named", default: { named: "named", default: "default" } })), promiseTest(contextCJS("two"), { __esModule: true, named: "named", default: "default" }), - promiseTest(contextCJS("three"), { named: "named", default: { named: "named", default: "default" }, [Symbol.toStringTag]: "Module" }), - promiseTest(contextCJS("null"), { default: null, [Symbol.toStringTag]: "Module" }) + promiseTest(contextCJS("three"), nsObj({ named: "named", default: { named: "named", default: "default" } })), + promiseTest(contextCJS("null"), nsObj({ default: null })) ]); }); it("should receive a namespace object when importing harmony via context", function() { return Promise.all([ - promiseTest(contextHarmony("one"), { named: "named", default: "default", [Symbol.toStringTag]: "Module" }), - promiseTest(contextHarmony("two"), { named: "named", default: "default", [Symbol.toStringTag]: "Module" }), - promiseTest(contextHarmony("three"), { named: "named", default: "default", [Symbol.toStringTag]: "Module" }) + promiseTest(contextHarmony("one"), nsObj({ named: "named", default: "default" })), + promiseTest(contextHarmony("two"), nsObj({ named: "named", default: "default" })), + promiseTest(contextHarmony("three"), nsObj({ named: "named", default: "default" })) ]); }); it("should receive a namespace object when importing mixed content via context", function() { return Promise.all([ - promiseTest(contextMixed("one"), { named: "named", default: { named: "named", default: "default" }, [Symbol.toStringTag]: "Module" }), + promiseTest(contextMixed("one"), nsObj({ named: "named", default: { named: "named", default: "default" } })), promiseTest(contextMixed("two"), { __esModule: true, named: "named", default: "default" }), - promiseTest(contextMixed("three"), { named: "named", default: "default", [Symbol.toStringTag]: "Module" }), - promiseTest(contextMixed("null"), { default: null, [Symbol.toStringTag]: "Module" }), - promiseTest(contextMixed("json.json"), { named: "named", default: { named: "named", default: "default" }, [Symbol.toStringTag]: "Module" }) + promiseTest(contextMixed("three"), nsObj({ named: "named", default: "default" })), + promiseTest(contextMixed("null"), nsObj({ default: null })), + promiseTest(contextMixed("json.json"), nsObj({ named: "named", default: { named: "named", default: "default" } })) ]); }); diff --git a/test/cases/optimize/side-effects-reexport-start-unknown/index.js b/test/cases/optimize/side-effects-reexport-start-unknown/index.js index 4c1a54309e3..2bdff81530b 100644 --- a/test/cases/optimize/side-effects-reexport-start-unknown/index.js +++ b/test/cases/optimize/side-effects-reexport-start-unknown/index.js @@ -2,5 +2,5 @@ import * as m from "m"; it("should handle unknown exports fine", function() { var x = m; - expect(x).toEqual({ foo: "foo", [Symbol.toStringTag]: "Module" }); + expect(x).toEqual(nsObj({ foo: "foo" })); }); diff --git a/test/cases/optimize/tree-shaking-star2/index.js b/test/cases/optimize/tree-shaking-star2/index.js index 676392638a8..0d1e070818d 100644 --- a/test/cases/optimize/tree-shaking-star2/index.js +++ b/test/cases/optimize/tree-shaking-star2/index.js @@ -6,9 +6,8 @@ it("should correctly tree shake star exports", function() { expect(aa).toBe("aa"); expect(aa2).toBe("aa"); expect(d).toBe("d"); - expect(root6).toEqual({ + expect(root6).toEqual(nsObj({ aa: "aa", - c: "c", - [Symbol.toStringTag]: "Module" - }); + c: "c" + })); }); diff --git a/test/cases/parsing/harmony-commonjs-mix/index.js b/test/cases/parsing/harmony-commonjs-mix/index.js index 7947bbf08a2..745a4323c78 100644 --- a/test/cases/parsing/harmony-commonjs-mix/index.js +++ b/test/cases/parsing/harmony-commonjs-mix/index.js @@ -1,7 +1,6 @@ it("should result in a warning when using module.exports in harmony module", function() { var x = require("./module1"); - expect(x).toEqual({ - default: 1234, - [Symbol.toStringTag]: "Module" - }); + expect(x).toEqual(nsObj({ + default: 1234 + })); }); diff --git a/test/cases/parsing/issue-2050/index.js b/test/cases/parsing/issue-2050/index.js index 4c28c4bac3e..6b05b3d8066 100644 --- a/test/cases/parsing/issue-2050/index.js +++ b/test/cases/parsing/issue-2050/index.js @@ -1,9 +1,8 @@ it("should support multiple reexports", function() { - expect(require("./x")).toEqual({ + expect(require("./x")).toEqual(nsObj({ xa: "a", xb: "b", xc: "c", - xd: "d", - [Symbol.toStringTag]: "Module" - }); + xd: "d" + })); }); diff --git a/test/cases/parsing/issue-2522/index.js b/test/cases/parsing/issue-2522/index.js index a727d989f25..e28c668496e 100644 --- a/test/cases/parsing/issue-2522/index.js +++ b/test/cases/parsing/issue-2522/index.js @@ -13,10 +13,9 @@ it("should import into object shorthand", function() { a: 123, aa: 123, b: 456, - c: { + c: nsObj({ a: 123, - default: 456, - [Symbol.toStringTag]: "Module" - } + default: 456 + }) }); }) diff --git a/test/cases/parsing/issue-3964/index.js b/test/cases/parsing/issue-3964/index.js index 9671c573578..f5765f4be7f 100644 --- a/test/cases/parsing/issue-3964/index.js +++ b/test/cases/parsing/issue-3964/index.js @@ -1,4 +1,4 @@ it("should be possible to export default an imported name", function() { var x = require("./module"); - expect(x).toEqual({ default: 1234, [Symbol.toStringTag]: "Module" }); + expect(x).toEqual(nsObj({ default: 1234 })); }); diff --git a/test/cases/parsing/issue-4179/index.js b/test/cases/parsing/issue-4179/index.js index 475b9e1ee1e..ff5224b2338 100644 --- a/test/cases/parsing/issue-4179/index.js +++ b/test/cases/parsing/issue-4179/index.js @@ -2,7 +2,7 @@ import def from "./module?harmony"; import * as mod from "./module?harmony-start" it("should export a sequence expression correctly", function() { - expect(require("./module?cjs")).toEqual({ default: 2, [Symbol.toStringTag]: "Module" }); + expect(require("./module?cjs")).toEqual(nsObj({ default: 2 })); expect(def).toBe(2); expect(mod.default).toBe(2); }); diff --git a/test/cases/scope-hoisting/export-namespace/index.js b/test/cases/scope-hoisting/export-namespace/index.js index f551d349e83..8020f45e589 100644 --- a/test/cases/scope-hoisting/export-namespace/index.js +++ b/test/cases/scope-hoisting/export-namespace/index.js @@ -2,17 +2,15 @@ import { ns as ns1 } from "./module1"; const ns2 = require("./module2").ns; it("should allow to export a namespace object (concated)", function() { - expect(ns1).toEqual({ + expect(ns1).toEqual(nsObj({ a: "a", - b: "b", - [Symbol.toStringTag]: "Module" - }); + b: "b" + })); }); it("should allow to export a namespace object (exposed)", function() { - expect(ns2).toEqual({ + expect(ns2).toEqual(nsObj({ a: "a", - b: "b", - [Symbol.toStringTag]: "Module" - }); + b: "b" + })); }); diff --git a/test/cases/scope-hoisting/issue-5020-minimal/index.js b/test/cases/scope-hoisting/issue-5020-minimal/index.js index c664793105a..cd70d349d65 100644 --- a/test/cases/scope-hoisting/issue-5020-minimal/index.js +++ b/test/cases/scope-hoisting/issue-5020-minimal/index.js @@ -1,14 +1,13 @@ var testData = require("./src/index.js"); it("should export the correct values", function() { - expect(testData).toEqual({ - icon: { - svg: { - default: 1, - [Symbol.toStringTag]: "Module" - }, - [Symbol.toStringTag]: "Module" - }, - [Symbol.toStringTag]: "Module" - }); + expect(testData).toEqual( + nsObj({ + icon: nsObj({ + svg: nsObj({ + default: 1 + }) + }) + }) + ); }); diff --git a/test/cases/scope-hoisting/issue-5020/index.js b/test/cases/scope-hoisting/issue-5020/index.js index df60a977d4e..a841b19370a 100644 --- a/test/cases/scope-hoisting/issue-5020/index.js +++ b/test/cases/scope-hoisting/issue-5020/index.js @@ -1,31 +1,28 @@ var testData = require("./src/index.js"); it("should export the correct values", function() { - expect(testData).toEqual({ - svg5: { - svg: { - clinical1: { - svg1: 1 - }, - clinical2: { - svg2: 2 - }, - [Symbol.toStringTag]: "Module" - }, - [Symbol.toStringTag]: "Module" - }, - svg6: { - svg: { - test: { - svg1: 10 - }, - clinical2: { - svg2: 20 - }, - [Symbol.toStringTag]: "Module" - }, - [Symbol.toStringTag]: "Module" - }, - [Symbol.toStringTag]: "Module" - }); + expect(testData).toEqual( + nsObj({ + svg5: nsObj({ + svg: nsObj({ + clinical1: { + svg1: 1 + }, + clinical2: { + svg2: 2 + } + }) + }), + svg6: nsObj({ + svg: nsObj({ + test: { + svg1: 10 + }, + clinical2: { + svg2: 20 + } + }) + }) + }) + ); }) diff --git a/test/cases/scope-hoisting/issue-5443/index.js b/test/cases/scope-hoisting/issue-5443/index.js index 30c2bdb7de3..f6d76307bc0 100644 --- a/test/cases/scope-hoisting/issue-5443/index.js +++ b/test/cases/scope-hoisting/issue-5443/index.js @@ -1,9 +1,8 @@ import { module } from "./reexport"; it("should have the correct values", function() { - expect(module).toEqual({ + expect(module).toEqual(nsObj({ default: "default", - named: "named", - [Symbol.toStringTag]: "Module" - }); + named: "named" + })); }); diff --git a/test/cases/side-effects/missing-module-7499/index.js b/test/cases/side-effects/missing-module-7499/index.js index 714aabf74b4..fea57ceb0c5 100644 --- a/test/cases/side-effects/missing-module-7499/index.js +++ b/test/cases/side-effects/missing-module-7499/index.js @@ -2,9 +2,8 @@ import './example' it("should run correctly", function() { return import('./lazy').then(lazy => { - expect(lazy.default()).toEqual({ - hello: "world", - [Symbol.toStringTag]: "Module" - }); + expect(lazy.default()).toEqual(nsObj({ + hello: "world" + })); }) }); diff --git a/test/configCases/context-replacement/System.import/index.js b/test/configCases/context-replacement/System.import/index.js index c2afdd5a49e..c96946800d2 100644 --- a/test/configCases/context-replacement/System.import/index.js +++ b/test/configCases/context-replacement/System.import/index.js @@ -1,6 +1,6 @@ it("should replace a async context with a manual map", function() { var a = "a"; return import(a).then(function(a) { - expect(a).toEqual({ default: "b", [Symbol.toStringTag]: "Module" }); + expect(a).toEqual(nsObj({ default: "b" })); }); }); diff --git a/test/configCases/dll-plugin-entry/1-use-dll/index.js b/test/configCases/dll-plugin-entry/1-use-dll/index.js index ec66e9e5fd9..203fc2d122f 100644 --- a/test/configCases/dll-plugin-entry/1-use-dll/index.js +++ b/test/configCases/dll-plugin-entry/1-use-dll/index.js @@ -1,7 +1,7 @@ import Answer, { bar } from "dll/index"; it("should load a module from dll", function() { - expect(require("dll/index")).toEqual({ bar: "bar", default: 42, [Symbol.toStringTag]: "Module" }); + expect(require("dll/index")).toEqual(nsObj({ bar: "bar", default: 42 })); }); it("should load an harmony module from dll (default export)", function() { diff --git a/test/configCases/dll-plugin/1-use-dll/index.js b/test/configCases/dll-plugin/1-use-dll/index.js index 7f844261291..9d0f47340b7 100644 --- a/test/configCases/dll-plugin/1-use-dll/index.js +++ b/test/configCases/dll-plugin/1-use-dll/index.js @@ -12,7 +12,7 @@ it("should load a module of non-default type without extension from dll", functi it("should load an async module from dll", function(done) { require("dll/b")().then(function(c) { - expect(c).toEqual({ default: "c", [Symbol.toStringTag]: "Module" }); + expect(c).toEqual(nsObj({ default: "c" })); done(); }).catch(done); }); diff --git a/test/configCases/dll-plugin/2-use-dll-without-scope/index.js b/test/configCases/dll-plugin/2-use-dll-without-scope/index.js index 704f6b1589c..28f81259339 100644 --- a/test/configCases/dll-plugin/2-use-dll-without-scope/index.js +++ b/test/configCases/dll-plugin/2-use-dll-without-scope/index.js @@ -12,7 +12,7 @@ it("should load a module of non-default type without extension from dll", functi it("should load an async module from dll", function(done) { require("../0-create-dll/b")().then(function(c) { - expect(c).toEqual({ default: "c", [Symbol.toStringTag]: "Module" }); + expect(c).toEqual(nsObj({ default: "c" })); done(); }).catch(done); }); diff --git a/test/configCases/dll-plugin/3-use-dll-with-hashid/index.js b/test/configCases/dll-plugin/3-use-dll-with-hashid/index.js index 0967a518eea..224bc015e73 100644 --- a/test/configCases/dll-plugin/3-use-dll-with-hashid/index.js +++ b/test/configCases/dll-plugin/3-use-dll-with-hashid/index.js @@ -8,7 +8,7 @@ it("should load a module from dll", function() { it("should load an async module from dll", function(done) { require("../0-create-dll/b")().then(function(c) { - expect(c).toEqual({ default: "c", [Symbol.toStringTag]: "Module" }); + expect(c).toEqual(nsObj({ default: "c" })); done(); }).catch(done); }); diff --git a/test/configCases/parsing/system.import/index.js b/test/configCases/parsing/system.import/index.js index 754a325d9f3..8310bbaf461 100644 --- a/test/configCases/parsing/system.import/index.js +++ b/test/configCases/parsing/system.import/index.js @@ -22,7 +22,7 @@ it("should be able to use System.import()", done => { if(__SYSTEM__ === false) { done(new Error("System.import should not be parsed")); } else { - expect(mod).toEqual({ default: "ok", [Symbol.toStringTag]: "Module" }); + expect(mod).toEqual(nsObj({ default: "ok" })); done(); } }); diff --git a/test/configCases/target/node-dynamic-import/index.js b/test/configCases/target/node-dynamic-import/index.js index 2c354b52920..43f1453b418 100644 --- a/test/configCases/target/node-dynamic-import/index.js +++ b/test/configCases/target/node-dynamic-import/index.js @@ -23,10 +23,9 @@ function testCase(load, done) { it("should be able to use expressions in import", function(done) { function load(name, expected, callback) { import("./dir/" + name + '.js') - .then((result) => {expect(result).toEqual({ - default: expected, - [Symbol.toStringTag]: "Module" - }); callback()}) + .then((result) => {expect(result).toEqual(nsObj({ + default: expected + })); callback()}) .catch((err) => {done(err)}); } testCase(load, done); @@ -35,10 +34,9 @@ it("should be able to use expressions in import", function(done) { it("should be able to use expressions in lazy-once import", function(done) { function load(name, expected, callback) { import(/* webpackMode: "lazy-once" */ "./dir/" + name + '.js') - .then((result) => {expect(result).toEqual({ - default: expected, - [Symbol.toStringTag]: "Module" - }); callback()}) + .then((result) => {expect(result).toEqual(nsObj({ + default: expected + })); callback()}) .catch((err) => {done(err)}); } testCase(load, done); @@ -47,10 +45,9 @@ it("should be able to use expressions in lazy-once import", function(done) { it("should be able to use expressions in import", function(done) { function load(name, expected, callback) { import("./dir2/" + name).then((result) => { - expect(result).toEqual({ - default: expected, - [Symbol.toStringTag]: "Module" - }); + expect(result).toEqual(nsObj({ + default: expected + })); callback(); }).catch((err) => { done(err); @@ -65,10 +62,9 @@ it("should convert to function in node", function() { it("should be able to use import", function(done) { import("./two").then((two) => { - expect(two).toEqual({ - default: 2, - [Symbol.toStringTag]: "Module" - }); + expect(two).toEqual(nsObj({ + default: 2 + })); done(); }).catch(function(err) { done(err); diff --git a/test/hotCases/concat/reload-compat-flag/index.js b/test/hotCases/concat/reload-compat-flag/index.js index 495849e609e..ddb2584ebb0 100644 --- a/test/hotCases/concat/reload-compat-flag/index.js +++ b/test/hotCases/concat/reload-compat-flag/index.js @@ -1,16 +1,14 @@ var x = require("./module"); it("should allow to hot replace modules in a ConcatenatedModule", (done) => { - expect(x).toEqual({ - default: "ok1", - [Symbol.toStringTag]: "Module" - }); + expect(x).toEqual(nsObj({ + default: "ok1" + })); module.hot.accept("./module", () => { x = require("./module"); - expect(x).toEqual({ - default: "ok2", - [Symbol.toStringTag]: "Module" - }); + expect(x).toEqual(nsObj({ + default: "ok2" + })); done(); }); NEXT(require("../../update")(done)); diff --git a/test/watchCases/plugins/define-plugin/0/index.js b/test/watchCases/plugins/define-plugin/0/index.js index 182e0f038f8..0a53ea7ddc2 100644 --- a/test/watchCases/plugins/define-plugin/0/index.js +++ b/test/watchCases/plugins/define-plugin/0/index.js @@ -1,17 +1,15 @@ it("should be able to use dynamic defines in watch mode", function() { const module = require("./module"); - expect(module).toEqual({ + expect(module).toEqual(nsObj({ default: WATCH_STEP, - type: "string", - [Symbol.toStringTag]: "Module" - }); + type: "string" + })); }); it("should not update a define when dependencies list is missing", function() { const module2 = require("./module2"); - expect(module2).toEqual({ + expect(module2).toEqual(nsObj({ default: "0", - type: "string", - [Symbol.toStringTag]: "Module" - }); + type: "string" + })); }); diff --git a/yarn.lock b/yarn.lock index 037df12f40a..739f52895d2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,14 +3,14 @@ "@babel/code-frame@^7.0.0-beta.35": - version "7.0.0-beta.47" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.47.tgz#d18c2f4c4ba8d093a2bcfab5616593bfe2441a27" + version "7.0.0-beta.52" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.52.tgz#192483bfa0d1e467c101571c21029ccb74af2801" dependencies: - "@babel/highlight" "7.0.0-beta.47" + "@babel/highlight" "7.0.0-beta.52" -"@babel/highlight@7.0.0-beta.47": - version "7.0.0-beta.47" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.47.tgz#8fbc83fb2a21f0bd2b95cdbeb238cf9689cad494" +"@babel/highlight@7.0.0-beta.52": + version "7.0.0-beta.52" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.52.tgz#ef24931432f06155e7bc39cdb8a6b37b4a28b3d0" dependencies: chalk "^2.0.0" esutils "^2.0.2" @@ -251,7 +251,11 @@ acorn@^4.0.4, acorn@~4.0.2: version "4.0.13" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" -acorn@^5.0.0, acorn@^5.3.0, acorn@^5.5.0, acorn@^5.6.2: +acorn@^5.0.0, acorn@^5.3.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" + +acorn@^5.5.0, acorn@^5.6.2: version "5.6.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.6.2.tgz#b1da1d7be2ac1b4a327fb9eab851702c5045b4e7" @@ -324,18 +328,12 @@ ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" -ansi-styles@^3.1.0, ansi-styles@^3.2.1: +ansi-styles@^3.1.0, ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" dependencies: color-convert "^1.9.0" -ansi-styles@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" - dependencies: - color-convert "^1.9.0" - any-observable@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.2.0.tgz#c67870058003579009083f54ac0abafb5c33d242" @@ -351,19 +349,19 @@ app-root-path@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.0.1.tgz#cd62dcf8e4fd5a417efc664d2e5b10653c651b46" -append-transform@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" +append-transform@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" dependencies: - default-require-extensions "^1.0.0" + default-require-extensions "^2.0.0" aproba@^1.0.3, aproba@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" are-we-there-yet@~1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" dependencies: delegates "^1.0.0" readable-stream "^2.0.6" @@ -477,10 +475,10 @@ async@1.x, async@^1.4.0: resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" async@^2.1.4: - version "2.6.0" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4" + version "2.6.1" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" dependencies: - lodash "^4.14.0" + lodash "^4.17.10" asynckit@^0.4.0: version "0.4.0" @@ -565,12 +563,12 @@ babel-helpers@^6.24.1: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-jest@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.0.1.tgz#bbad3bf523fb202da05ed0a6540b48c84eed13a6" +babel-jest@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.2.0.tgz#14a9d6a3f4122dfea6069d37085adf26a53a4dba" dependencies: babel-plugin-istanbul "^4.1.6" - babel-preset-jest "^23.0.1" + babel-preset-jest "^23.2.0" babel-messages@^6.23.0: version "6.23.0" @@ -587,19 +585,19 @@ babel-plugin-istanbul@^4.1.6: istanbul-lib-instrument "^1.10.1" test-exclude "^4.2.1" -babel-plugin-jest-hoist@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.0.1.tgz#eaa11c964563aea9c21becef2bdf7853f7f3c148" +babel-plugin-jest-hoist@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz#e61fae05a1ca8801aadee57a6d66b8cefaf44167" babel-plugin-syntax-object-rest-spread@^6.13.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" -babel-preset-jest@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.0.1.tgz#631cc545c6cf021943013bcaf22f45d87fe62198" +babel-preset-jest@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz#8ec7a03a138f001a1a8fb1e8113652bf1a55da46" dependencies: - babel-plugin-jest-hoist "^23.0.1" + babel-plugin-jest-hoist "^23.2.0" babel-plugin-syntax-object-rest-spread "^6.13.0" babel-register@^6.26.0: @@ -631,7 +629,7 @@ babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: babylon "^6.18.0" lodash "^4.17.4" -babel-traverse@^6.18.0, babel-traverse@^6.26.0: +babel-traverse@^6.0.0, babel-traverse@^6.18.0, babel-traverse@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" dependencies: @@ -645,7 +643,7 @@ babel-traverse@^6.18.0, babel-traverse@^6.26.0: invariant "^2.2.2" lodash "^4.17.4" -babel-types@^6.18.0, babel-types@^6.26.0: +babel-types@^6.0.0, babel-types@^6.18.0, babel-types@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" dependencies: @@ -683,8 +681,8 @@ base@^0.11.1: pascalcase "^0.1.1" bcrypt-pbkdf@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d" + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" dependencies: tweetnacl "^0.14.3" @@ -717,18 +715,6 @@ boom@2.x.x: dependencies: hoek "2.x.x" -boom@4.x.x: - version "4.3.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" - dependencies: - hoek "4.x.x" - -boom@5.x.x: - version "5.2.0" - resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02" - dependencies: - hoek "4.x.x" - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -767,9 +753,9 @@ browser-process-hrtime@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz#425d68a58d3447f02a04aa894187fce8af8b7b8e" -browser-resolve@^1.11.2: - version "1.11.2" - resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" +browser-resolve@^1.11.2, browser-resolve@^1.11.3: + version "1.11.3" + resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" dependencies: resolve "1.1.7" @@ -1126,6 +1112,10 @@ clone@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" +clorox@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/clorox/-/clorox-1.0.3.tgz#6fa63653f280c33d69f548fb14d239ddcfa1590d" + co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -1170,12 +1160,22 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" -color-convert@^1.3.0, color-convert@^1.9.0: +color-convert@^1.3.0: version "1.9.1" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" dependencies: color-name "^1.1.1" +color-convert@^1.9.0: + version "1.9.2" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.2.tgz#49881b8fba67df12a96bdf3f56c0aab9e7913147" + dependencies: + color-name "1.1.1" + +color-name@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689" + color-name@^1.0.0, color-name@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" @@ -1235,8 +1235,8 @@ commondir@^1.0.1: resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" compare-versions@^3.1.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.2.1.tgz#a49eb7689d4caaf0b6db5220173fd279614000f7" + version "3.3.0" + resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.3.0.tgz#af93ea705a96943f622ab309578b9b90586f39c3" component-emitter@^1.2.1: version "1.2.1" @@ -1324,8 +1324,8 @@ core-js@^1.0.0: resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" core-js@^2.4.0, core-js@^2.5.0: - version "2.5.6" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.6.tgz#0fe6d45bf3cac3ac364a9d72de7576f4eb221b9d" + version "2.5.7" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -1400,12 +1400,6 @@ cryptiles@2.x.x: dependencies: boom "2.x.x" -cryptiles@3.x.x: - version "3.1.2" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe" - dependencies: - boom "5.x.x" - crypto-browserify@^3.11.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" @@ -1517,12 +1511,12 @@ csso@~2.3.1: source-map "^0.5.3" cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": - version "0.3.2" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" + version "0.3.4" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.4.tgz#8cd52e8a3acfd68d3aed38ee0a640177d2f9d797" -"cssstyle@>= 0.2.37 < 0.3.0": - version "0.2.37" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" +"cssstyle@>= 0.3.1 < 0.4.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.3.1.tgz#6da9b4cff1bc5d716e6e5fe8e04fcb1b50a49adf" dependencies: cssom "0.3.x" @@ -1586,19 +1580,19 @@ dedent@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" -deep-extend@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.5.1.tgz#b894a9dd90d3023fbf1c55a394fb858eb2066f1f" +deep-extend@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" -default-require-extensions@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" +default-require-extensions@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-2.0.0.tgz#f5f8fbb18a7d6d50b21f641f649ebb522cfe24f7" dependencies: - strip-bom "^2.0.0" + strip-bom "^3.0.0" define-properties@^1.1.2: version "1.1.2" @@ -1780,15 +1774,21 @@ errno@^0.1.1, errno@^0.1.3, errno@~0.1.7: dependencies: prr "~1.0.1" -error-ex@^1.2.0, error-ex@^1.3.1: +error-ex@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + dependencies: + is-arrayish "^0.2.1" + +error-ex@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" dependencies: is-arrayish "^0.2.1" es-abstract@^1.5.1: - version "1.11.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.11.0.tgz#cce87d518f0496893b1a30cd8461835535480681" + version "1.12.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" dependencies: es-to-primitive "^1.1.1" function-bind "^1.1.1" @@ -1828,8 +1828,8 @@ escodegen@1.8.x: source-map "~0.2.0" escodegen@^1.9.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.9.1.tgz#dbae17ef96c8e4bedb1356f4504fa4cc2f7cb7e2" + version "1.10.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.10.0.tgz#f647395de22519fbd0d928ffcf1d17e0dec2603e" dependencies: esprima "^3.1.3" estraverse "^4.2.0" @@ -1977,10 +1977,10 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: safe-buffer "^5.1.1" exec-sh@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.1.tgz#163b98a6e89e6b65b47c2a28d215bc1f63989c38" + version "0.2.2" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.2.tgz#2a5e7ffcbd7d0ba2755bdecb16e5a427dfbdec36" dependencies: - merge "^1.1.3" + merge "^1.2.0" execa@^0.7.0: version "0.7.0" @@ -2049,16 +2049,16 @@ expect@^22.4.3: jest-message-util "^22.4.3" jest-regex-util "^22.4.3" -expect@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/expect/-/expect-23.0.1.tgz#99131f2fd9115595f8cc3697401e7f0734d45fef" +expect@^23.3.0: + version "23.3.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-23.3.0.tgz#ecb051adcbdc40ac4db576c16067f12fdb13cc61" dependencies: ansi-styles "^3.2.0" - jest-diff "^23.0.1" + jest-diff "^23.2.0" jest-get-type "^22.1.0" - jest-matcher-utils "^23.0.1" - jest-message-util "^23.0.0" - jest-regex-util "^23.0.0" + jest-matcher-utils "^23.2.0" + jest-message-util "^23.3.0" + jest-regex-util "^23.3.0" express@~4.13.1: version "4.13.4" @@ -2383,7 +2383,7 @@ fsevents@^1.2.3: nan "^2.9.2" node-pre-gyp "^0.10.0" -function-bind@^1.0.2, function-bind@^1.1.1: +function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -2603,10 +2603,10 @@ has-values@^1.0.0: kind-of "^4.0.0" has@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" dependencies: - function-bind "^1.0.2" + function-bind "^1.1.1" hash-base@^3.0.0: version "3.0.4" @@ -2631,15 +2631,6 @@ hawk@~3.1.3: hoek "2.x.x" sntp "1.x.x" -hawk@~6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038" - dependencies: - boom "4.x.x" - cryptiles "3.x.x" - hoek "4.x.x" - sntp "2.x.x" - hmac-drbg@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -2664,8 +2655,8 @@ home-or-tmp@^2.0.0: os-tmpdir "^1.0.1" hosted-git-info@^2.1.4: - version "2.6.0" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.6.0.tgz#23235b29ab230c576aab0d4f13fc046b0b038222" + version "2.7.1" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" html-comment-regex@^1.1.0: version "1.1.1" @@ -2888,8 +2879,8 @@ is-builtin-module@^1.0.0: builtin-modules "^1.0.0" is-callable@^1.1.1, is-callable@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2" + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" is-ci@^1.0.10, is-ci@^1.1.0: version "1.1.0" @@ -3046,12 +3037,6 @@ is-observable@^0.2.0: dependencies: symbol-observable "^0.2.2" -is-odd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-2.0.0.tgz#7646624671fd7ea558ccd9a2795182f2958f1b24" - dependencies: - is-number "^4.0.0" - is-path-cwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" @@ -3174,8 +3159,8 @@ isstream@~0.1.2: resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" istanbul-api@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.2.tgz#b2cfe6d15ae6a28ee282e7a823b8e9faa235e6cf" + version "1.3.1" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.1.tgz#4c3b05d18c0016d1022e079b98dc82c40f488954" dependencies: async "^2.1.4" compare-versions "^3.1.0" @@ -3185,7 +3170,7 @@ istanbul-api@^1.3.1: istanbul-lib-instrument "^1.10.1" istanbul-lib-report "^1.1.4" istanbul-lib-source-maps "^1.2.4" - istanbul-reports "^1.4.0" + istanbul-reports "^1.3.0" js-yaml "^3.7.0" mkdirp "^0.5.1" once "^1.4.0" @@ -3195,10 +3180,10 @@ istanbul-lib-coverage@^1.2.0: resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz#f7d8f2e42b97e37fe796114cb0f9d68b5e3a4341" istanbul-lib-hook@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.0.tgz#ae556fd5a41a6e8efa0b1002b1e416dfeaf9816c" + version "1.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz#f614ec45287b2a8fc4f07f5660af787575601805" dependencies: - append-transform "^0.4.0" + append-transform "^1.0.0" istanbul-lib-instrument@^1.10.1: version "1.10.1" @@ -3222,8 +3207,8 @@ istanbul-lib-report@^1.1.4: supports-color "^3.1.2" istanbul-lib-source-maps@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.4.tgz#cc7ccad61629f4efff8e2f78adb8c522c9976ec7" + version "1.2.5" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz#ffe6be4e7ab86d3603e4290d54990b14506fc9b1" dependencies: debug "^3.1.0" istanbul-lib-coverage "^1.2.0" @@ -3231,9 +3216,9 @@ istanbul-lib-source-maps@^1.2.4: rimraf "^2.6.1" source-map "^0.5.3" -istanbul-reports@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.4.0.tgz#3d7b44b912ecbe7652a603662b962120739646a1" +istanbul-reports@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.3.0.tgz#2f322e81e1d9520767597dca3c20a0cce89a3554" dependencies: handlebars "^4.0.3" @@ -3277,15 +3262,15 @@ jade@^1.11.0: void-elements "~2.0.1" with "~4.0.0" -jest-changed-files@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.0.1.tgz#f79572d0720844ea5df84c2a448e862c2254f60c" +jest-changed-files@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.2.0.tgz#a145a6e4b66d0129fc7c99cee134dc937a643d9c" dependencies: throat "^4.0.0" -jest-cli@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.0.1.tgz#351a5ba51cf28ecf20336d97a30b970d1f530a56" +jest-cli@^23.3.0: + version "23.3.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.3.0.tgz#307e9be7733443b789a8279d694054d051a9e5e2" dependencies: ansi-escapes "^3.0.0" chalk "^2.0.1" @@ -3298,22 +3283,24 @@ jest-cli@^23.0.1: istanbul-lib-coverage "^1.2.0" istanbul-lib-instrument "^1.10.1" istanbul-lib-source-maps "^1.2.4" - jest-changed-files "^23.0.1" - jest-config "^23.0.1" - jest-environment-jsdom "^23.0.1" + jest-changed-files "^23.2.0" + jest-config "^23.3.0" + jest-environment-jsdom "^23.3.0" jest-get-type "^22.1.0" - jest-haste-map "^23.0.1" - jest-message-util "^23.0.0" - jest-regex-util "^23.0.0" - jest-resolve-dependencies "^23.0.1" - jest-runner "^23.0.1" - jest-runtime "^23.0.1" - jest-snapshot "^23.0.1" - jest-util "^23.0.1" - jest-validate "^23.0.1" - jest-worker "^23.0.1" - micromatch "^2.3.11" + jest-haste-map "^23.2.0" + jest-message-util "^23.3.0" + jest-regex-util "^23.3.0" + jest-resolve-dependencies "^23.3.0" + jest-runner "^23.3.0" + jest-runtime "^23.3.0" + jest-snapshot "^23.3.0" + jest-util "^23.3.0" + jest-validate "^23.3.0" + jest-watcher "^23.2.0" + jest-worker "^23.2.0" + micromatch "^3.1.10" node-notifier "^5.2.1" + prompts "^0.1.9" realpath-native "^1.0.0" rimraf "^2.5.4" slash "^1.0.0" @@ -3338,23 +3325,23 @@ jest-config@^22.4.3: jest-validate "^22.4.3" pretty-format "^22.4.3" -jest-config@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.0.1.tgz#6798bff1247c7a390b1327193305001582fc58fa" +jest-config@^23.3.0: + version "23.3.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.3.0.tgz#bb4d53b70f9500fafddf718d226abb53b13b8323" dependencies: babel-core "^6.0.0" - babel-jest "^23.0.1" + babel-jest "^23.2.0" chalk "^2.0.1" glob "^7.1.1" - jest-environment-jsdom "^23.0.1" - jest-environment-node "^23.0.1" + jest-environment-jsdom "^23.3.0" + jest-environment-node "^23.3.0" jest-get-type "^22.1.0" - jest-jasmine2 "^23.0.1" - jest-regex-util "^23.0.0" - jest-resolve "^23.0.1" - jest-util "^23.0.1" - jest-validate "^23.0.1" - pretty-format "^23.0.1" + jest-jasmine2 "^23.3.0" + jest-regex-util "^23.3.0" + jest-resolve "^23.2.0" + jest-util "^23.3.0" + jest-validate "^23.3.0" + pretty-format "^23.2.0" jest-diff@^22.4.3: version "22.4.3" @@ -3365,31 +3352,31 @@ jest-diff@^22.4.3: jest-get-type "^22.4.3" pretty-format "^22.4.3" -jest-diff@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.0.1.tgz#3d49137cee12c320a4b4d2b4a6fa6e82d491a16a" +jest-diff@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.2.0.tgz#9f2cf4b51e12c791550200abc16b47130af1062a" dependencies: chalk "^2.0.1" diff "^3.2.0" jest-get-type "^22.1.0" - pretty-format "^23.0.1" + pretty-format "^23.2.0" jest-docblock@^21.0.0: version "21.2.0" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-21.2.0.tgz#51529c3b30d5fd159da60c27ceedc195faf8d414" -jest-docblock@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-23.0.1.tgz#deddd18333be5dc2415260a04ef3fce9276b5725" +jest-docblock@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-23.2.0.tgz#f085e1f18548d99fdd69b20207e6fd55d91383a7" dependencies: detect-newline "^2.1.0" -jest-each@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.0.1.tgz#a6e5dbf530afc6bf9d74792dde69d8db70f84706" +jest-each@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.2.0.tgz#a400f81c857083f50c4f53399b109f12023fb19d" dependencies: chalk "^2.0.1" - pretty-format "^23.0.1" + pretty-format "^23.2.0" jest-environment-jsdom@^22.4.3: version "22.4.3" @@ -3399,12 +3386,12 @@ jest-environment-jsdom@^22.4.3: jest-util "^22.4.3" jsdom "^11.5.1" -jest-environment-jsdom@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.0.1.tgz#da689eb9358dc16e5708abb208f4eb26a439575c" +jest-environment-jsdom@^23.3.0: + version "23.3.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.3.0.tgz#190457f91c9e615454c4186056065db6ed7a4e2a" dependencies: - jest-mock "^23.0.1" - jest-util "^23.0.1" + jest-mock "^23.2.0" + jest-util "^23.3.0" jsdom "^11.5.1" jest-environment-node@^22.4.3: @@ -3414,27 +3401,27 @@ jest-environment-node@^22.4.3: jest-mock "^22.4.3" jest-util "^22.4.3" -jest-environment-node@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.0.1.tgz#676b740e205f1f2be77241969e7812be824ee795" +jest-environment-node@^23.3.0: + version "23.3.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.3.0.tgz#1e8df21c847aa5d03b76573f0dc16fcde5034c32" dependencies: - jest-mock "^23.0.1" - jest-util "^23.0.1" + jest-mock "^23.2.0" + jest-util "^23.3.0" jest-get-type@^22.1.0, jest-get-type@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4" -jest-haste-map@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.0.1.tgz#cd89052abfc8cba01f560bbec09d4f36aec25d4f" +jest-haste-map@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.2.0.tgz#d10cbac007c695948c8ef1821a2b2ed2d4f2d4d8" dependencies: fb-watchman "^2.0.0" graceful-fs "^4.1.11" - jest-docblock "^23.0.1" + jest-docblock "^23.2.0" jest-serializer "^23.0.1" - jest-worker "^23.0.1" - micromatch "^2.3.11" + jest-worker "^23.2.0" + micromatch "^3.1.10" sane "^2.0.0" jest-jasmine2@^22.4.3: @@ -3453,27 +3440,27 @@ jest-jasmine2@^22.4.3: jest-util "^22.4.3" source-map-support "^0.5.0" -jest-jasmine2@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.0.1.tgz#16d875356e6360872bba48426f7d31fdc1b0bcea" +jest-jasmine2@^23.3.0: + version "23.3.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.3.0.tgz#a8706baac23c8a130d5aa8ef5464a9d49096d1b5" dependencies: chalk "^2.0.1" co "^4.6.0" - expect "^23.0.1" + expect "^23.3.0" is-generator-fn "^1.0.0" - jest-diff "^23.0.1" - jest-each "^23.0.1" - jest-matcher-utils "^23.0.1" - jest-message-util "^23.0.0" - jest-snapshot "^23.0.1" - jest-util "^23.0.1" - pretty-format "^23.0.1" + jest-diff "^23.2.0" + jest-each "^23.2.0" + jest-matcher-utils "^23.2.0" + jest-message-util "^23.3.0" + jest-snapshot "^23.3.0" + jest-util "^23.3.0" + pretty-format "^23.2.0" -jest-leak-detector@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.0.1.tgz#9dba07505ac3495c39d3ec09ac1e564599e861a0" +jest-leak-detector@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.2.0.tgz#c289d961dc638f14357d4ef96e0431ecc1aa377d" dependencies: - pretty-format "^23.0.1" + pretty-format "^23.2.0" jest-matcher-utils@^22.4.3: version "22.4.3" @@ -3483,13 +3470,13 @@ jest-matcher-utils@^22.4.3: jest-get-type "^22.4.3" pretty-format "^22.4.3" -jest-matcher-utils@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.0.1.tgz#0c6c0daedf9833c2a7f36236069efecb4c3f6e5f" +jest-matcher-utils@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.2.0.tgz#4d4981f23213e939e3cedf23dc34c747b5ae1913" dependencies: chalk "^2.0.1" jest-get-type "^22.1.0" - pretty-format "^23.0.1" + pretty-format "^23.2.0" jest-message-util@^22.4.3: version "22.4.3" @@ -3501,13 +3488,13 @@ jest-message-util@^22.4.3: slash "^1.0.0" stack-utils "^1.0.1" -jest-message-util@^23.0.0: - version "23.0.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.0.0.tgz#073f3d76c701f7c718a4b9af1eb7f138792c4796" +jest-message-util@^23.0.0, jest-message-util@^23.3.0: + version "23.3.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.3.0.tgz#bc07b11cec6971fb5dd9de2dfb60ebc22150c160" dependencies: "@babel/code-frame" "^7.0.0-beta.35" chalk "^2.0.1" - micromatch "^2.3.11" + micromatch "^3.1.10" slash "^1.0.0" stack-utils "^1.0.1" @@ -3515,24 +3502,24 @@ jest-mock@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-22.4.3.tgz#f63ba2f07a1511772cdc7979733397df770aabc7" -jest-mock@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.0.1.tgz#1569f477968c668fc728273a17c3767773b46357" +jest-mock@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.2.0.tgz#ad1c60f29e8719d47c26e1138098b6d18b261134" jest-regex-util@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-22.4.3.tgz#a826eb191cdf22502198c5401a1fc04de9cef5af" -jest-regex-util@^23.0.0: - version "23.0.0" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.0.0.tgz#dd5c1fde0c46f4371314cf10f7a751a23f4e8f76" +jest-regex-util@^23.3.0: + version "23.3.0" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.3.0.tgz#5f86729547c2785c4002ceaa8f849fe8ca471bc5" -jest-resolve-dependencies@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.0.1.tgz#d01a10ddad9152c4cecdf5eac2b88571c4b6a64d" +jest-resolve-dependencies@^23.3.0: + version "23.3.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.3.0.tgz#8444d3b0b1288b80864d8801ff50b44a4d695d1d" dependencies: - jest-regex-util "^23.0.0" - jest-snapshot "^23.0.1" + jest-regex-util "^23.3.0" + jest-snapshot "^23.3.0" jest-resolve@^22.4.3: version "22.4.3" @@ -3541,35 +3528,35 @@ jest-resolve@^22.4.3: browser-resolve "^1.11.2" chalk "^2.0.1" -jest-resolve@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.0.1.tgz#3f8403462b10a34c2df1d47aab5574c4935bcd24" +jest-resolve@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.2.0.tgz#a0790ad5a3b99002ab4dbfcbf8d9e2d6a69b3d99" dependencies: - browser-resolve "^1.11.2" + browser-resolve "^1.11.3" chalk "^2.0.1" realpath-native "^1.0.0" -jest-runner@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.0.1.tgz#b176ae3ecf9e194aa4b84a7fcf70d1b8db231aa7" +jest-runner@^23.3.0: + version "23.3.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.3.0.tgz#04c7e458a617501a4875db0d7ffbe0e3cbd43bfb" dependencies: exit "^0.1.2" graceful-fs "^4.1.11" - jest-config "^23.0.1" - jest-docblock "^23.0.1" - jest-haste-map "^23.0.1" - jest-jasmine2 "^23.0.1" - jest-leak-detector "^23.0.1" - jest-message-util "^23.0.0" - jest-runtime "^23.0.1" - jest-util "^23.0.1" - jest-worker "^23.0.1" + jest-config "^23.3.0" + jest-docblock "^23.2.0" + jest-haste-map "^23.2.0" + jest-jasmine2 "^23.3.0" + jest-leak-detector "^23.2.0" + jest-message-util "^23.3.0" + jest-runtime "^23.3.0" + jest-util "^23.3.0" + jest-worker "^23.2.0" source-map-support "^0.5.6" throat "^4.0.0" -jest-runtime@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.0.1.tgz#b1d765fb03fb6d4043805af270676a693f504d57" +jest-runtime@^23.3.0: + version "23.3.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.3.0.tgz#4865aab4ceff82f9cec6335fd7ae1422cc1de7df" dependencies: babel-core "^6.0.0" babel-plugin-istanbul "^4.1.6" @@ -3578,15 +3565,15 @@ jest-runtime@^23.0.1: exit "^0.1.2" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.1.11" - jest-config "^23.0.1" - jest-haste-map "^23.0.1" - jest-message-util "^23.0.0" - jest-regex-util "^23.0.0" - jest-resolve "^23.0.1" - jest-snapshot "^23.0.1" - jest-util "^23.0.1" - jest-validate "^23.0.1" - micromatch "^2.3.11" + jest-config "^23.3.0" + jest-haste-map "^23.2.0" + jest-message-util "^23.3.0" + jest-regex-util "^23.3.0" + jest-resolve "^23.2.0" + jest-snapshot "^23.3.0" + jest-util "^23.3.0" + jest-validate "^23.3.0" + micromatch "^3.1.10" realpath-native "^1.0.0" slash "^1.0.0" strip-bom "3.0.0" @@ -3615,16 +3602,21 @@ jest-snapshot@^22.4.3: natural-compare "^1.4.0" pretty-format "^22.4.3" -jest-snapshot@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.0.1.tgz#6674fa19b9eb69a99cabecd415bddc42d6af3e7e" +jest-snapshot@^23.3.0: + version "23.3.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.3.0.tgz#fc4e9f81e45432d10507e27f50bce60f44d81424" dependencies: + babel-traverse "^6.0.0" + babel-types "^6.0.0" chalk "^2.0.1" - jest-diff "^23.0.1" - jest-matcher-utils "^23.0.1" + jest-diff "^23.2.0" + jest-matcher-utils "^23.2.0" + jest-message-util "^23.3.0" + jest-resolve "^23.2.0" mkdirp "^0.5.1" natural-compare "^1.4.0" - pretty-format "^23.0.1" + pretty-format "^23.2.0" + semver "^5.5.0" jest-util@^22.4.3: version "22.4.3" @@ -3638,7 +3630,7 @@ jest-util@^22.4.3: mkdirp "^0.5.1" source-map "^0.6.0" -jest-util@^23.0.0, jest-util@^23.0.1: +jest-util@^23.0.0: version "23.0.1" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.0.1.tgz#68ea5bd7edb177d3059f9797259f8e0dacce2f99" dependencies: @@ -3650,6 +3642,19 @@ jest-util@^23.0.0, jest-util@^23.0.1: mkdirp "^0.5.1" source-map "^0.6.0" +jest-util@^23.3.0: + version "23.3.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.3.0.tgz#79f35bb0c30100ef611d963ee6b88f8ed873a81d" + dependencies: + callsites "^2.0.0" + chalk "^2.0.1" + graceful-fs "^4.1.11" + is-ci "^1.0.10" + jest-message-util "^23.3.0" + mkdirp "^0.5.1" + slash "^1.0.0" + source-map "^0.6.0" + jest-validate@^22.4.0, jest-validate@^22.4.3: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-22.4.3.tgz#0780954a5a7daaeec8d3c10834b9280865976b30" @@ -3660,27 +3665,35 @@ jest-validate@^22.4.0, jest-validate@^22.4.3: leven "^2.1.0" pretty-format "^22.4.3" -jest-validate@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.0.1.tgz#cd9f01a89d26bb885f12a8667715e9c865a5754f" +jest-validate@^23.3.0: + version "23.3.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.3.0.tgz#d49bea6aad98c30acd2cbb542434798a0cc13f76" dependencies: chalk "^2.0.1" jest-get-type "^22.1.0" leven "^2.1.0" - pretty-format "^23.0.1" + pretty-format "^23.2.0" -jest-worker@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.0.1.tgz#9e649dd963ff4046026f91c4017f039a6aa4a7bc" +jest-watcher@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-23.2.0.tgz#678e852896e919e9d9a0eb4b8baf1ae279620ea9" + dependencies: + ansi-escapes "^3.0.0" + chalk "^2.0.1" + string-length "^2.0.0" + +jest-worker@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.2.0.tgz#faf706a8da36fae60eb26957257fa7b5d8ea02b9" dependencies: merge-stream "^1.0.1" -jest@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jest/-/jest-23.0.1.tgz#0d083290ee4112cecfb780df6ff81332ed373201" +jest@^23.3.0: + version "23.3.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-23.3.0.tgz#1355cd792f38cf20fba4da02dddb7ca14d9484b5" dependencies: import-local "^1.0.0" - jest-cli "^23.0.1" + jest-cli "^23.3.0" joi@^12.x: version "12.0.0" @@ -3709,13 +3722,20 @@ js-yaml@3.6.1: argparse "^1.0.7" esprima "^2.6.0" -js-yaml@3.x, js-yaml@^3.7.0, js-yaml@^3.9.0, js-yaml@^3.9.1: +js-yaml@3.x, js-yaml@^3.9.0, js-yaml@^3.9.1: version "3.11.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef" dependencies: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^3.7.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + js-yaml@~3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" @@ -3728,21 +3748,21 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" jsdom@^11.5.1: - version "11.10.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.10.0.tgz#a42cd54e88895dc765f03f15b807a474962ac3b5" + version "11.11.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.11.0.tgz#df486efad41aee96c59ad7a190e2449c7eb1110e" dependencies: abab "^1.0.4" acorn "^5.3.0" acorn-globals "^4.1.0" array-equal "^1.0.0" cssom ">= 0.3.2 < 0.4.0" - cssstyle ">= 0.2.37 < 0.3.0" + cssstyle ">= 0.3.1 < 0.4.0" data-urls "^1.0.0" domexception "^1.0.0" escodegen "^1.9.0" html-encoding-sniffer "^1.0.2" left-pad "^1.2.0" - nwmatcher "^1.4.3" + nwsapi "^2.0.0" parse5 "4.0.0" pn "^1.1.0" request "^2.83.0" @@ -3754,7 +3774,7 @@ jsdom@^11.5.1: webidl-conversions "^4.0.2" whatwg-encoding "^1.0.3" whatwg-mimetype "^2.1.0" - whatwg-url "^6.4.0" + whatwg-url "^6.4.1" ws "^4.0.0" xml-name-validator "^3.0.0" @@ -4044,7 +4064,7 @@ lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" -lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0: +lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" @@ -4172,7 +4192,7 @@ merge-stream@^1.0.1: dependencies: readable-stream "^2.0.1" -merge@^1.1.3: +merge@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" @@ -4180,7 +4200,7 @@ methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" -micromatch@^2.3.11: +micromatch@^2.3.11, micromatch@^3.1.10: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" dependencies: @@ -4271,11 +4291,11 @@ minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" -minipass@^2.2.1, minipass@^2.2.4: - version "2.3.1" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.1.tgz#4e872b959131a672837ab3cb554962bc84b1537d" +minipass@^2.2.1, minipass@^2.3.3: + version "2.3.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.3.tgz#a7dcc8b7b833f5d368759cce544dccb55f50f233" dependencies: - safe-buffer "^5.1.1" + safe-buffer "^5.1.2" yallist "^3.0.0" minizlib@^1.1.0: @@ -4340,15 +4360,14 @@ nan@^2.9.2: resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" nanomatch@^1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2" + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" dependencies: arr-diff "^4.0.0" array-unique "^0.3.2" define-property "^2.0.2" extend-shallow "^3.0.2" fragment-cache "^0.2.1" - is-odd "^2.0.0" is-windows "^1.0.2" kind-of "^6.0.2" object.pick "^1.3.0" @@ -4360,7 +4379,7 @@ natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" -needle@^2.2.0: +needle@^2.2.0, needle@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.1.tgz#b5e325bd3aae8c2678902fa296f729455d1d3a7d" dependencies: @@ -4425,16 +4444,16 @@ node-notifier@^5.2.1: which "^1.3.0" node-pre-gyp@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.0.tgz#6e4ef5bb5c5203c6552448828c852c40111aac46" + version "0.10.3" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" dependencies: detect-libc "^1.0.2" mkdirp "^0.5.1" - needle "^2.2.0" + needle "^2.2.1" nopt "^4.0.1" npm-packlist "^1.1.6" npmlog "^4.0.2" - rc "^1.1.7" + rc "^1.2.7" rimraf "^2.6.1" semver "^5.3.0" tar "^4" @@ -4543,9 +4562,9 @@ number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" -nwmatcher@^1.4.3: - version "1.4.4" - resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.4.4.tgz#2285631f34a95f0d0395cd900c96ed39b58f346e" +nwsapi@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.0.4.tgz#dc79040a5f77b97716dc79565fc7fc3ef7d50570" oauth-sign@~0.8.1, oauth-sign@~0.8.2: version "0.8.2" @@ -4564,8 +4583,8 @@ object-copy@^0.1.0: kind-of "^3.0.3" object-keys@^1.0.8: - version "1.0.11" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" + version "1.0.12" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" object-visit@^1.0.0: version "1.0.1" @@ -5140,9 +5159,9 @@ pretty-format@^22.4.3: ansi-regex "^3.0.0" ansi-styles "^3.2.0" -pretty-format@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.0.1.tgz#d61d065268e4c759083bccbca27a01ad7c7601f4" +pretty-format@^23.2.0: + version "23.2.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.2.0.tgz#3b0aaa63c018a53583373c1cb3a5d96cc5e83017" dependencies: ansi-regex "^3.0.0" ansi-styles "^3.2.0" @@ -5185,6 +5204,13 @@ promise@~2.0: dependencies: is-promise "~1" +prompts@^0.1.9: + version "0.1.11" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-0.1.11.tgz#fdfac72f61d2887f4eaf2e65e748a9d9ef87206f" + dependencies: + clorox "^1.0.3" + sisteransi "^0.1.1" + prop-types@^15.5.10: version "15.6.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.1.tgz#36644453564255ddda391191fb3a125cbdf654ca" @@ -5208,6 +5234,10 @@ pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" +psl@^1.1.24: + version "1.1.28" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.28.tgz#4fb6ceb08a1e2214d4fd4de0ca22dae13740bc7b" + public-encrypt@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.2.tgz#46eb9107206bf73489f8b85b69d91334c6610994" @@ -5338,7 +5368,7 @@ punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" -punycode@2.x.x, punycode@^2.1.0: +punycode@2.x.x: version "2.1.0" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" @@ -5346,6 +5376,10 @@ punycode@^1.2.4, punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" +punycode@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + pupa@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/pupa/-/pupa-1.0.0.tgz#9a9568a5af7e657b8462a6e9d5328743560ceff6" @@ -5418,11 +5452,11 @@ raw-loader@~0.5.0, raw-loader@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-0.5.1.tgz#0c3d0beaed8a01c966d9787bf778281252a979aa" -rc@^1.1.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.7.tgz#8a10ca30d588d00464360372b890d06dacd02297" +rc@^1.1.7, rc@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" dependencies: - deep-extend "^0.5.1" + deep-extend "^0.6.0" ini "~1.3.0" minimist "^1.2.0" strip-json-comments "~2.0.1" @@ -5491,8 +5525,8 @@ readdirp@^2.0.0: set-immediate-shim "^1.0.1" realpath-native@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.0.0.tgz#7885721a83b43bd5327609f0ddecb2482305fdf0" + version "1.0.1" + resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.0.1.tgz#07f40a0cce8f8261e2e8b7ebebf5c95965d7b633" dependencies: util.promisify "^1.0.0" @@ -5647,8 +5681,8 @@ request@2.81.0: uuid "^3.0.0" request@^2.83.0: - version "2.86.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.86.0.tgz#2b9497f449b0a32654c081a5cf426bbfb5bf5b69" + version "2.87.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.87.0.tgz#32f00235cd08d482b4d0d68db93a829c0ed5756e" dependencies: aws-sign2 "~0.7.0" aws4 "^1.6.0" @@ -5658,7 +5692,6 @@ request@^2.83.0: forever-agent "~0.6.1" form-data "~2.3.1" har-validator "~5.0.3" - hawk "~6.0.2" http-signature "~1.2.0" is-typedarray "~1.0.0" isstream "~0.1.2" @@ -5802,7 +5835,7 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.1.0: +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -5848,7 +5881,7 @@ semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1: +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" @@ -5959,6 +5992,10 @@ simple-git@^1.65.0: dependencies: debug "^3.1.0" +sisteransi@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-0.1.1.tgz#5431447d5f7d1675aac667ccd0b865a4994cb3ce" + slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" @@ -6010,12 +6047,6 @@ sntp@1.x.x: dependencies: hoek "2.x.x" -sntp@2.x.x: - version "2.1.0" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8" - dependencies: - hoek "4.x.x" - sort-keys@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" @@ -6112,13 +6143,14 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" sshpk@^1.7.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.1.tgz#130f5975eddad963f1d56f92b9ac6c51fa9f83eb" + version "1.14.2" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98" dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" dashdash "^1.12.0" getpass "^0.1.1" + safer-buffer "^2.0.2" optionalDependencies: bcrypt-pbkdf "^1.0.0" ecc-jsbn "~0.1.1" @@ -6207,7 +6239,7 @@ string-length@^2.0.0: astral-regex "^1.0.0" strip-ansi "^4.0.0" -string-width@^1.0.1, string-width@^1.0.2: +string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" dependencies: @@ -6215,7 +6247,7 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: +"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" dependencies: @@ -6339,12 +6371,12 @@ tapable@^1.0.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.0.0.tgz#cbb639d9002eed9c6b5975eb20598d7936f1f9f2" tar@^4: - version "4.4.2" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.2.tgz#60685211ba46b38847b1ae7ee1a24d744a2cd462" + version "4.4.4" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.4.tgz#ec8409fae9f665a4355cc3b4087d0820232bb8cd" dependencies: chownr "^1.0.1" fs-minipass "^1.2.5" - minipass "^2.2.4" + minipass "^2.3.3" minizlib "^1.1.0" mkdirp "^0.5.0" safe-buffer "^5.1.2" @@ -6439,7 +6471,14 @@ topo@2.x.x: dependencies: hoek "4.x.x" -tough-cookie@>=2.3.3, tough-cookie@^2.3.3, tough-cookie@~2.3.0, tough-cookie@~2.3.3: +tough-cookie@>=2.3.3, tough-cookie@^2.3.3: + version "2.4.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" + dependencies: + psl "^1.1.24" + punycode "^1.4.1" + +tough-cookie@~2.3.0, tough-cookie@~2.3.3: version "2.3.4" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" dependencies: @@ -6652,10 +6691,14 @@ utils-merge@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" -uuid@^3.0.0, uuid@^3.1.0: +uuid@^3.0.0: version "3.2.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14" +uuid@^3.1.0: + version "3.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + val-loader@^1.0.2: version "1.1.0" resolved "https://registry.yarnpkg.com/val-loader/-/val-loader-1.1.0.tgz#ed91537424d62a4ded98e846ccf07367756bf506" @@ -6767,9 +6810,9 @@ whatwg-mimetype@^2.0.0, whatwg-mimetype@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.1.0.tgz#f0f21d76cbba72362eb609dbed2a30cd17fcc7d4" -whatwg-url@^6.4.0: - version "6.4.1" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.4.1.tgz#fdb94b440fd4ad836202c16e9737d511f012fd67" +whatwg-url@^6.4.0, whatwg-url@^6.4.1: + version "6.5.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8" dependencies: lodash.sortby "^4.7.0" tr46 "^1.0.1" @@ -6783,17 +6826,23 @@ which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" -which@^1.1.1, which@^1.2.10, which@^1.2.12, which@^1.2.9, which@^1.3.0: +which@^1.1.1, which@^1.2.10: version "1.3.0" resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a" dependencies: isexe "^2.0.0" +which@^1.2.12, which@^1.2.9, which@^1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + dependencies: + isexe "^2.0.0" + wide-align@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" dependencies: - string-width "^1.0.2" + string-width "^1.0.2 || 2" window-size@0.1.0: version "0.1.0" From 8876514cdba5961094c6bfcf25829253a9b9f831 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 10 Jul 2018 12:09:14 +0200 Subject: [PATCH 160/310] replace deprecated method --- lib/Compilation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Compilation.js b/lib/Compilation.js index 659dcfae7f3..ec97accdd90 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -26,7 +26,6 @@ const ChunkTemplate = require("./ChunkTemplate"); const HotUpdateChunkTemplate = require("./HotUpdateChunkTemplate"); const ModuleTemplate = require("./ModuleTemplate"); const RuntimeTemplate = require("./RuntimeTemplate"); -const Dependency = require("./Dependency"); const ChunkRenderError = require("./ChunkRenderError"); const AsyncDependencyToInitialChunkError = require("./AsyncDependencyToInitialChunkError"); const Stats = require("./Stats"); @@ -36,6 +35,7 @@ const Queue = require("./util/Queue"); const SortableSet = require("./util/SortableSet"); const GraphHelpers = require("./GraphHelpers"); const ModuleDependency = require("./dependencies/ModuleDependency"); +const compareLocations = require("./compareLocations"); /** @typedef {import("./Module")} Module */ /** @typedef {import("./Compiler")} Compiler */ @@ -642,7 +642,7 @@ class Compilation extends Tapable { war.dependencies = dependencies; this.warnings.push(war); } - module.dependencies.sort(Dependency.compare); + module.dependencies.sort((a, b) => compareLocations(a.loc, b.loc)); if (error) { this.hooks.failedModule.call(module, error); return callback(error); From f0cd45102c76a66c79a1e72149fd29a23a60ad4b Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 10 Jul 2018 17:03:53 +0200 Subject: [PATCH 161/310] do not instrument node_modules --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 3649114fdd7..9af9a8c7347 100644 --- a/package.json +++ b/package.json @@ -187,7 +187,8 @@ "coveragePathIgnorePatterns": [ "\\.runtime\\.js$", "/test/", - "/schemas/" + "/schemas/", + "/node_modules/" ], "testEnvironment": "node", "coverageReporters": [ From b93225a6a120a4155c118a0c1a5f4b0823863c41 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 10 Jul 2018 17:18:45 +0200 Subject: [PATCH 162/310] add types and fix incorrect loc type fix formatLocation for types --- lib/Dependency.js | 6 +- lib/SingleEntryPlugin.js | 7 ++- lib/dependencies/LoaderPlugin.js | 19 ++++++- lib/formatLocation.js | 96 ++++++++++++++++++-------------- 4 files changed, 82 insertions(+), 46 deletions(-) diff --git a/lib/Dependency.js b/lib/Dependency.js index 4b731a7323c..6d27b1ed6d2 100644 --- a/lib/Dependency.js +++ b/lib/Dependency.js @@ -18,19 +18,19 @@ const DependencyReference = require("./dependencies/DependencyReference"); */ /** @typedef {Object} SourcePosition - * @property {number} column * @property {number} line + * @property {number=} column */ /** @typedef {Object} RealDependencyLocation * @property {SourcePosition} start - * @property {SourcePosition} end + * @property {SourcePosition=} end * @property {number=} index */ /** @typedef {Object} SynteticDependencyLocation * @property {string} name - * @property {number} index + * @property {number=} index */ /** @typedef {SynteticDependencyLocation|RealDependencyLocation} DependencyLocation */ diff --git a/lib/SingleEntryPlugin.js b/lib/SingleEntryPlugin.js index e049abc2ac8..4a1703b1f85 100644 --- a/lib/SingleEntryPlugin.js +++ b/lib/SingleEntryPlugin.js @@ -48,9 +48,14 @@ class SingleEntryPlugin { ); } + /** + * @param {string} entry entry request + * @param {string} name entry name + * @returns {SingleEntryDependency} the dependency + */ static createDependency(entry, name) { const dep = new SingleEntryDependency(entry); - dep.loc = name; + dep.loc = { name }; return dep; } } diff --git a/lib/dependencies/LoaderPlugin.js b/lib/dependencies/LoaderPlugin.js index a3ab3f14104..c781d063605 100644 --- a/lib/dependencies/LoaderPlugin.js +++ b/lib/dependencies/LoaderPlugin.js @@ -7,6 +7,16 @@ const LoaderDependency = require("./LoaderDependency"); const NormalModule = require("../NormalModule"); +/** @typedef {import("../Module")} Module */ + +/** + * @callback LoadModuleCallback + * @param {Error=} err error object + * @param {string=} source source code + * @param {object=} map source map + * @param {Module=} module loaded module if successful + */ + class LoaderPlugin { apply(compiler) { compiler.hooks.compilation.tap( @@ -23,9 +33,16 @@ class LoaderPlugin { compilation.hooks.normalModuleLoader.tap( "LoaderPlugin", (loaderContext, module) => { + /** + * @param {string} request the request string to load the module from + * @param {LoadModuleCallback} callback callback returning the loaded module or error + * @returns {void} + */ loaderContext.loadModule = (request, callback) => { const dep = new LoaderDependency(request); - dep.loc = request; + dep.loc = { + name: request + }; const factory = compilation.dependencyFactories.get( dep.constructor ); diff --git a/lib/formatLocation.js b/lib/formatLocation.js index 8bd574d0102..f608cd496dc 100644 --- a/lib/formatLocation.js +++ b/lib/formatLocation.js @@ -5,57 +5,71 @@ "use strict"; +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ +/** @typedef {import("./Dependency").SourcePosition} SourcePosition */ + +// TODO webpack 5: pos must be SourcePosition +/** + * @param {SourcePosition|DependencyLocation|string} pos position + * @returns {string} formatted position + */ const formatPosition = pos => { if (pos === null) return ""; - const typeOfPos = typeof pos; - switch (typeOfPos) { - case "string": - return pos; - case "number": - return `${pos}`; - case "object": - if (typeof pos.line === "number" && typeof pos.column === "number") { - return `${pos.line}:${pos.column}`; - } else if (typeof pos.line === "number") { - return `${pos.line}:?`; - } else if (typeof pos.index === "number") { - return `+${pos.index}`; - } else { - return ""; - } - default: + // TODO webpack 5: Simplify this + if (typeof pos === "string") return pos; + if (typeof pos === "number") return `${pos}`; + if (typeof pos === "object") { + if ("line" in pos && "column" in pos) { + return `${pos.line}:${pos.column}`; + } else if ("line" in pos) { + return `${pos.line}:?`; + } else if ("index" in pos) { + // TODO webpack 5 remove this case + return `+${pos.index}`; + } else { return ""; + } } + return ""; }; +// TODO webpack 5: loc must be DependencyLocation +/** + * @param {DependencyLocation|SourcePosition|string} loc location + * @returns {string} formatted location + */ const formatLocation = loc => { if (loc === null) return ""; - const typeOfLoc = typeof loc; - switch (typeOfLoc) { - case "string": - return loc; - case "number": - return `${loc}`; - case "object": - if (loc.start && loc.end) { - if ( - typeof loc.start.line === "number" && - typeof loc.end.line === "number" && - typeof loc.end.column === "number" && - loc.start.line === loc.end.line - ) { - return `${formatPosition(loc.start)}-${loc.end.column}`; - } else { - return `${formatPosition(loc.start)}-${formatPosition(loc.end)}`; - } - } - if (loc.start) { - return formatPosition(loc.start); + // TODO webpack 5: Simplify this + if (typeof loc === "string") return loc; + if (typeof loc === "number") return `${loc}`; + if (typeof loc === "object") { + if ("start" in loc && loc.start && "end" in loc && loc.end) { + if ( + typeof loc.start === "object" && + typeof loc.start.line === "number" && + typeof loc.end === "object" && + typeof loc.end.line === "number" && + typeof loc.end.column === "number" && + loc.start.line === loc.end.line + ) { + return `${formatPosition(loc.start)}-${loc.end.column}`; + } else { + return `${formatPosition(loc.start)}-${formatPosition(loc.end)}`; } - return formatPosition(loc); - default: - return ""; + } + if ("start" in loc && loc.start) { + return formatPosition(loc.start); + } + if ("name" in loc && "index" in loc) { + return `${loc.name}[${loc.index}]`; + } + if ("name" in loc) { + return loc.name; + } + return formatPosition(loc); } + return ""; }; module.exports = formatLocation; From 18d33c630f799e99e5e43fc0b6931713dc976529 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 11 Jul 2018 10:45:52 +0200 Subject: [PATCH 163/310] 4.16.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9af9a8c7347..4f614244399 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.15.1", + "version": "4.16.0", "author": "Tobias Koppers @sokra", "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", From d539bb1101cb847e5074b8d3cfe211a6c37cdb6f Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Wed, 11 Jul 2018 19:00:17 -0700 Subject: [PATCH 164/310] Drop entrypoint --- lib/Chunk.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/Chunk.js b/lib/Chunk.js index b9c7b75188d..02efa063fa9 100644 --- a/lib/Chunk.js +++ b/lib/Chunk.js @@ -124,10 +124,7 @@ class Chunk { this._modules = new SortableSet(undefined, sortByIdentifier); /** @type {string?} */ this.filenameTemplate = undefined; - - /** @private */ - this._groups = new SortableSet(undefined, sortChunkGroupById); - /** @private @type {SortableSet} */ + /** @private @type {SortableSet} */ this._groups = new SortableSet(undefined, sortChunkGroupById); /** @type {string[]} */ this.files = []; From 9d7764aec5d476d49601f4e07be34e9f4930bad1 Mon Sep 17 00:00:00 2001 From: Sebastian Werner Date: Thu, 12 Jul 2018 12:40:08 +0200 Subject: [PATCH 165/310] Relaxed type check for hashDigest to allow other non NodeJS-native digest methods e.g. base62. --- schemas/WebpackOptions.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json index 7e6648ab667..63b96b9ab87 100644 --- a/schemas/WebpackOptions.json +++ b/schemas/WebpackOptions.json @@ -410,11 +410,7 @@ }, "hashDigest": { "description": "Digest type used for the hash", - "enum": [ - "latin1", - "hex", - "base64" - ] + "type": "string" }, "hashDigestLength": { "description": "Number of chars which are used for the hash", From b0061c7fed7479b00527bc5d3f7cc6b834d029e5 Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Thu, 12 Jul 2018 18:00:44 -0700 Subject: [PATCH 166/310] Code review --- lib/Chunk.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Chunk.js b/lib/Chunk.js index 02efa063fa9..71b758304ae 100644 --- a/lib/Chunk.js +++ b/lib/Chunk.js @@ -8,6 +8,7 @@ const util = require("util"); const SortableSet = require("./util/SortableSet"); const intersect = require("./util/SetHelpers").intersect; const GraphHelpers = require("./GraphHelpers"); +const Entrypoint = require("./Entrypoint"); let debugId = 1000; const ERR_CHUNK_ENTRY = "Chunk.entry was removed. Use hasRuntime()"; const ERR_CHUNK_INITIAL = @@ -185,8 +186,8 @@ class Chunk { // We only need to check the first one return ( chunkGroup.isInitial() && - // prettier-ignore - /** @type {Entrypoint} */ (chunkGroup).getRuntimeChunk() === this + chunkGroup instanceof Entrypoint && + chunkGroup.getRuntimeChunk() === this ); } return false; From c3c4494a830f77274bc4708aaee7d14f63569375 Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Thu, 12 Jul 2018 18:06:21 -0700 Subject: [PATCH 167/310] cr --- lib/DefinePlugin.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/DefinePlugin.js b/lib/DefinePlugin.js index a99cb9a7666..805b055ef19 100644 --- a/lib/DefinePlugin.js +++ b/lib/DefinePlugin.js @@ -11,7 +11,8 @@ const NullFactory = require("./NullFactory"); /** @typedef {import("./Compiler")} Compiler */ /** @typedef {import("./Parser")} Parser */ -/** @typedef {null|undefined|RegExp|Function|Object} CodeValue */ +/** @typedef {null|undefined|RegExp|Function|string|number} CodeValuePrimitive */ +/** @typedef {CodeValuePrimitive|Record|RuntimeValue} CodeValue */ class RuntimeValue { constructor(fn, fileDependencies) { @@ -72,7 +73,7 @@ const toCode = (code, parser) => { class DefinePlugin { /** * Create a new define plugin - * @param {Object} definitions A map of global object definitions + * @param {Record} definitions A map of global object definitions */ constructor(definitions) { this.definitions = definitions; From 2fd5ddfea6fe95e4c58255dae7a7d505c17347a5 Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Thu, 12 Jul 2018 18:08:06 -0700 Subject: [PATCH 168/310] cr --- lib/ContextExclusionPlugin.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/ContextExclusionPlugin.js b/lib/ContextExclusionPlugin.js index 092ca04fe67..0b1dda0e9f5 100644 --- a/lib/ContextExclusionPlugin.js +++ b/lib/ContextExclusionPlugin.js @@ -17,9 +17,7 @@ class ContextExclusionPlugin { * @returns {void} */ apply(compiler) { - compiler.hooks.contextModuleFactory.tap("ContextExclusionPlugin", ( - /** @type {ContextModuleFactory} */ cmf - ) => { + compiler.hooks.contextModuleFactory.tap("ContextExclusionPlugin", cmf => { cmf.hooks.contextModuleFiles.tap("ContextExclusionPlugin", files => { return files.filter(filePath => !this.negativeMatcher.test(filePath)); }); From 5e80a92b4609b82ee23dbd840271e638750d7e4b Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Thu, 12 Jul 2018 18:09:50 -0700 Subject: [PATCH 169/310] Upgrade to TypeScript 3.0 (RC) --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 4f614244399..2120e5e4ec4 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "script-loader": "~0.7.0", "simple-git": "^1.65.0", "style-loader": "^0.19.1", - "typescript": "^2.9.1", + "typescript": "^3.0.0-rc", "url-loader": "^0.6.2", "val-loader": "^1.0.2", "vm-browserify": "~0.0.0", diff --git a/yarn.lock b/yarn.lock index 739f52895d2..40ab5125d53 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6541,9 +6541,9 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -typescript@^2.9.1: - version "2.9.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c" +typescript@^3.0.0-rc: + version "3.0.0-rc" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.0-rc.tgz#13553808426d393d3f92c054f4fa6f24589549c1" ua-parser-js@^0.7.9: version "0.7.18" From 8fcecf38b040d03f779f4d4d7757bc2eddc4d82d Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Fri, 13 Jul 2018 13:27:39 +0100 Subject: [PATCH 170/310] Correct moduleIds schema description Fixes the typo in #7686. --- schemas/WebpackOptions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json index 63b96b9ab87..bc2c3ff5879 100644 --- a/schemas/WebpackOptions.json +++ b/schemas/WebpackOptions.json @@ -1592,7 +1592,7 @@ "type": "boolean" }, "moduleIds": { - "description": "Define the algorithm to choose module ids (natural: numeric ids in order for usage, named: readable ids for better debugging, hashed: short hashes as ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin)", + "description": "Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: short hashes as ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin)", "enum": [ "natural", "named", From dc0e7ecc66a9f2492a9e3efa3cf077a462977dfd Mon Sep 17 00:00:00 2001 From: Josh Unger Date: Fri, 13 Jul 2018 07:23:07 -0600 Subject: [PATCH 171/310] Add mini-css-extract-plugin instead of extract-text-webpack-plugin I replaced extract-text-webpack-plugin with mini-css-extract-plugin since webpack v4 the extract-text-webpack-plugin should not be used for css. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3a3c583cf2b..f8dabebe47d 100644 --- a/README.md +++ b/README.md @@ -92,16 +92,16 @@ within webpack itself use this plugin interface. This makes webpack very |Name|Status|Install Size|Description| |:--:|:----:|:----------:|:----------| -|[extract-text-webpack-plugin][extract]|![extract-npm]|![extract-size]|Extracts Text (CSS) from your bundles into a separate file (app.bundle.css)| +|[mini-css-extract-plugin][mini-css]|![mini-css-npm]|![mini-css-size]|Extracts CSS into separate files. It creates a CSS file per JS file which contains CSS.| |[compression-webpack-plugin][compression]|![compression-npm]|![compression-size]|Prepares compressed versions of assets to serve them with Content-Encoding| |[i18n-webpack-plugin][i18n]|![i18n-npm]|![i18n-size]|Adds i18n support to your bundles| |[html-webpack-plugin][html-plugin]|![html-plugin-npm]|![html-plugin-size]| Simplifies creation of HTML files (`index.html`) to serve your bundles| [common-npm]: https://img.shields.io/npm/v/webpack.svg -[extract]: https://github.com/webpack/extract-text-webpack-plugin -[extract-npm]: https://img.shields.io/npm/v/extract-text-webpack-plugin.svg -[extract-size]: https://packagephobia.now.sh/badge?p=extract-text-webpack-plugin +[mini-css]: https://github.com/webpack-contrib/mini-css-extract-plugin +[mini-css-npm]: https://img.shields.io/npm/v/mini-css-extract-plugin.svg +[mini-css-size]: https://packagephobia.now.sh/badge?p=mini-css-extract-plugin [component]: https://github.com/webpack/component-webpack-plugin [component-npm]: https://img.shields.io/npm/v/component-webpack-plugin.svg [component-size]: https://packagephobia.now.sh/badge?p=component-webpack-plugin From 753dcce1885b3b61e8deb3a875687583d7ca7971 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 13 Jul 2018 15:37:06 +0200 Subject: [PATCH 172/310] fix order of occurrence order plugin remove enforced additional occurrence order plugin from test cases make test cases more independent of module/chunk order/ids --- lib/optimize/OccurrenceChunkOrderPlugin.js | 2 +- lib/optimize/OccurrenceModuleOrderPlugin.js | 2 +- lib/optimize/OccurrenceOrderPlugin.js | 4 +- test/Compiler.test.js | 6 +- test/HotModuleReplacementPlugin.test.js | 9 +- test/StatsTestCases.test.js | 1 - .../ConfigTestCases.test.js.snap | 20 +- .../__snapshots__/StatsTestCases.test.js.snap | 2322 ++++++++--------- .../order-multiple-entries/webpack.config.js | 8 +- .../code-generation/use-strict/index.js | 4 +- .../output-filename/test.config.js | 2 +- .../plugins/banner-plugin/index.js | 2 +- .../plugins/banner-plugin/webpack.config.js | 2 +- 13 files changed, 1195 insertions(+), 1189 deletions(-) diff --git a/lib/optimize/OccurrenceChunkOrderPlugin.js b/lib/optimize/OccurrenceChunkOrderPlugin.js index c7251c38d78..4730654fe67 100644 --- a/lib/optimize/OccurrenceChunkOrderPlugin.js +++ b/lib/optimize/OccurrenceChunkOrderPlugin.js @@ -49,7 +49,7 @@ class OccurrenceOrderChunkIdsPlugin { if (aOccurs < bOccurs) return 1; const orgA = originalOrder.get(a); const orgB = originalOrder.get(b); - return orgB - orgA; + return orgA - orgB; }); } ); diff --git a/lib/optimize/OccurrenceModuleOrderPlugin.js b/lib/optimize/OccurrenceModuleOrderPlugin.js index 8e6509dadf7..25561aea7e9 100644 --- a/lib/optimize/OccurrenceModuleOrderPlugin.js +++ b/lib/optimize/OccurrenceModuleOrderPlugin.js @@ -91,7 +91,7 @@ class OccurrenceOrderModuleIdsPlugin { if (aOccurs < bOccurs) return 1; const orgA = originalOrder.get(a); const orgB = originalOrder.get(b); - return orgB - orgA; + return orgA - orgB; }); } ); diff --git a/lib/optimize/OccurrenceOrderPlugin.js b/lib/optimize/OccurrenceOrderPlugin.js index 1590be90a4a..c73ec8e5750 100644 --- a/lib/optimize/OccurrenceOrderPlugin.js +++ b/lib/optimize/OccurrenceOrderPlugin.js @@ -91,7 +91,7 @@ class OccurrenceOrderPlugin { if (aOccurs < bOccurs) return 1; const orgA = originalOrder.get(a); const orgB = originalOrder.get(b); - return orgB - orgA; + return orgA - orgB; }); } ); @@ -124,7 +124,7 @@ class OccurrenceOrderPlugin { if (aOccurs < bOccurs) return 1; const orgA = originalOrder.get(a); const orgB = originalOrder.get(b); - return orgB - orgA; + return orgA - orgB; }); } ); diff --git a/test/Compiler.test.js b/test/Compiler.test.js index 0ce5d3ffabb..8f7d3a7c637 100644 --- a/test/Compiler.test.js +++ b/test/Compiler.test.js @@ -85,7 +85,7 @@ describe("Compiler", () => { expect(Object.keys(files)).toEqual(["/main.js"]); const bundle = files["/main.js"]; expect(bundle).toMatch("function __webpack_require__("); - expect(bundle).toMatch("__webpack_require__(/*! ./a */ 0);"); + expect(bundle).toMatch(/__webpack_require__\(\/\*! \.\/a \*\/ \d\);/); expect(bundle).toMatch("./c.js"); expect(bundle).toMatch("./a.js"); expect(bundle).toMatch("This is a"); @@ -145,9 +145,9 @@ describe("Compiler", () => { it("should compile a file with multiple chunks", done => { compile("./chunks", {}, (stats, files) => { expect(stats.chunks).toHaveLength(2); - expect(Object.keys(files)).toEqual(["/0.js", "/main.js"]); + expect(Object.keys(files)).toEqual(["/main.js", "/1.js"]); const bundle = files["/main.js"]; - const chunk = files["/0.js"]; + const chunk = files["/1.js"]; expect(bundle).toMatch("function __webpack_require__("); expect(bundle).toMatch("__webpack_require__(/*! ./b */"); expect(chunk).not.toMatch("__webpack_require__(/* ./b */"); diff --git a/test/HotModuleReplacementPlugin.test.js b/test/HotModuleReplacementPlugin.test.js index c86df04ed75..09a0578d12b 100644 --- a/test/HotModuleReplacementPlugin.test.js +++ b/test/HotModuleReplacementPlugin.test.js @@ -50,10 +50,11 @@ describe("HotModuleReplacementPlugin", () => { output: { path: path.join(__dirname, "js", "HotModuleReplacementPlugin") }, - plugins: [ - new webpack.HotModuleReplacementPlugin(), - new webpack.optimize.OccurrenceOrderPlugin() - ] + plugins: [new webpack.HotModuleReplacementPlugin()], + optimization: { + moduleIds: "size", + chunkIds: "size" + } }); fs.writeFileSync(entryFile, "1", "utf-8"); compiler.run((err, stats) => { diff --git a/test/StatsTestCases.test.js b/test/StatsTestCases.test.js index 0bc804ecdf6..f0ca3ae0e6e 100644 --- a/test/StatsTestCases.test.js +++ b/test/StatsTestCases.test.js @@ -75,7 +75,6 @@ describe("StatsTestCases", () => { ]) ); }; - new webpack.optimize.OccurrenceOrderPlugin().apply(c); }); c.run((err, stats) => { if (err) return done(err); diff --git a/test/__snapshots__/ConfigTestCases.test.js.snap b/test/__snapshots__/ConfigTestCases.test.js.snap index 0dab29d9c95..bf334e16f45 100644 --- a/test/__snapshots__/ConfigTestCases.test.js.snap +++ b/test/__snapshots__/ConfigTestCases.test.js.snap @@ -4,10 +4,10 @@ exports[`ConfigTestCases records issue-2991 exported tests should write relative "{ \\"modules\\": { \\"byIdentifier\\": { - \\"external \\\\\\"path\\\\\\"\\": 0, - \\"external \\\\\\"fs\\\\\\"\\": 1, - \\"ignored pkgs/somepackage/foo\\": 2, - \\"test.js\\": 3 + \\"test.js\\": 0, + \\"ignored pkgs/somepackage/foo\\": 1, + \\"external \\\\\\"fs\\\\\\"\\": 2, + \\"external \\\\\\"path\\\\\\"\\": 3 }, \\"usedIds\\": { \\"0\\": 0, @@ -32,12 +32,12 @@ exports[`ConfigTestCases records issue-7339 exported tests should write relative "{ \\"modules\\": { \\"byIdentifier\\": { - \\"dependencies/foo.js\\": 0, - \\"dependencies/bar.js\\": 1, - \\"external \\\\\\"path\\\\\\"\\": 2, - \\"external \\\\\\"fs\\\\\\"\\": 3, - \\"dependencies sync /^\\\\\\\\.\\\\\\\\/.*$/\\": 4, - \\"test.js\\": 5 + \\"dependencies/bar.js\\": 0, + \\"dependencies/foo.js\\": 1, + \\"test.js\\": 2, + \\"dependencies sync /^\\\\\\\\.\\\\\\\\/.*$/\\": 3, + \\"external \\\\\\"fs\\\\\\"\\": 4, + \\"external \\\\\\"path\\\\\\"\\": 5 }, \\"usedIds\\": { \\"0\\": 0, diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index 78afa6714a9..5a4e72f6998 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -57,89 +57,89 @@ Child content-change: `; exports[`StatsTestCases should print correct stats for aggressive-splitting-on-demand 1`] = ` -"Hash: 6fd6445da5532a699ea4 +"Hash: 22813fefc4dae997c5fe Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names -58f368c01f66002b0eb3.js 1.94 KiB 6, 7 [emitted] +a2fea791e74e99836233.js 1.94 KiB 6 [emitted] 2736cf9d79233cd0a9b6.js 1.93 KiB 0 [emitted] 7f83e5c2f4e52435dd2c.js 1.96 KiB 2 [emitted] 43c1ac24102c075ecb2d.js 1.94 KiB 3, 1 [emitted] -a35356222d6a2151f7d3.js 1.01 KiB 4 [emitted] -e5fb899955fa03a8053b.js 1.94 KiB 5 [emitted] +db744382311550539cad.js 9.7 KiB 4 [emitted] main +6a80fd33f274d3117a32.js 1.01 KiB 5 [emitted] 29de52df747b400f6177.js 1 KiB 1 [emitted] -6a8e74d82c35e3f013d2.js 1 KiB 7 [emitted] +a9463ba36646aa40b97c.js 1.94 KiB 7, 9 [emitted] 5bc7f208cd99a83b4e33.js 1.94 KiB 8 [emitted] -13713792eb1b5038ab8b.js 1.94 KiB 9 [emitted] -d886db099ddf05aadc6d.js 9.7 KiB 10 [emitted] main +819c28704a84308cd0f6.js 1 KiB 9 [emitted] +5ea68201264e1d2b28e9.js 1.94 KiB 10 [emitted] ba9fedb7aa0c69201639.js 1.94 KiB 11 [emitted] -Entrypoint main = d886db099ddf05aadc6d.js -chunk {0} 2736cf9d79233cd0a9b6.js 1.76 KiB <{10}> ={1}= ={2}= ={3}= ={7}= ={9}= [recorded] aggressive splitted +Entrypoint main = db744382311550539cad.js +chunk {0} 2736cf9d79233cd0a9b6.js 1.76 KiB <{4}> ={1}= ={2}= ={3}= ={9}= ={10}= [recorded] aggressive splitted > ./b ./d ./e ./f ./g [11] ./index.js 5:0-44 > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 - [0] ./b.js 899 bytes {0} {5} [built] + [0] ./b.js 899 bytes {0} {6} [built] [1] ./d.js 899 bytes {0} {8} [built] -chunk {1} 29de52df747b400f6177.js 899 bytes <{10}> ={0}= ={2}= ={8}= +chunk {1} 29de52df747b400f6177.js 899 bytes <{4}> ={0}= ={2}= ={8}= > ./c ./d ./e [11] ./index.js 3:0-30 > ./b ./d ./e ./f ./g [11] ./index.js 5:0-44 [2] ./e.js 899 bytes {1} {3} [built] -chunk {2} 7f83e5c2f4e52435dd2c.js 1.76 KiB <{10}> ={0}= ={1}= ={3}= ={6}= ={7}= ={9}= ={11}= [recorded] aggressive splitted +chunk {2} 7f83e5c2f4e52435dd2c.js 1.76 KiB <{4}> ={0}= ={1}= ={3}= ={7}= ={9}= ={10}= ={11}= [recorded] aggressive splitted > ./f ./g ./h ./i ./j ./k [11] ./index.js 4:0-51 > ./b ./d ./e ./f ./g [11] ./index.js 5:0-44 > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 [3] ./f.js 899 bytes {2} [built] [4] ./g.js 901 bytes {2} [built] -chunk {3} 43c1ac24102c075ecb2d.js 1.76 KiB <{10}> ={0}= ={2}= ={7}= ={9}= [rendered] [recorded] aggressive splitted +chunk {3} 43c1ac24102c075ecb2d.js 1.76 KiB <{4}> ={0}= ={2}= ={9}= ={10}= [rendered] [recorded] aggressive splitted > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 [2] ./e.js 899 bytes {1} {3} [built] [6] ./h.js 899 bytes {3} {11} [built] -chunk {4} a35356222d6a2151f7d3.js 899 bytes <{10}> +chunk {4} db744382311550539cad.js (main) 248 bytes >{0}< >{1}< >{2}< >{3}< >{5}< >{6}< >{7}< >{8}< >{9}< >{10}< >{11}< [entry] [rendered] + > ./index main + [11] ./index.js 248 bytes {4} [built] +chunk {5} 6a80fd33f274d3117a32.js 899 bytes <{4}> > ./a [11] ./index.js 1:0-16 - [10] ./a.js 899 bytes {4} [built] -chunk {5} e5fb899955fa03a8053b.js 1.76 KiB <{10}> + [10] ./a.js 899 bytes {5} [built] +chunk {6} a2fea791e74e99836233.js 1.76 KiB <{4}> > ./b ./c [11] ./index.js 2:0-23 - [0] ./b.js 899 bytes {0} {5} [built] - [5] ./c.js 899 bytes {5} {8} [built] -chunk {6} 58f368c01f66002b0eb3.js 1.76 KiB <{10}> ={2}= ={11}= + [0] ./b.js 899 bytes {0} {6} [built] + [5] ./c.js 899 bytes {6} {8} [built] +chunk {7} a9463ba36646aa40b97c.js 1.76 KiB <{4}> ={2}= ={11}= > ./f ./g ./h ./i ./j ./k [11] ./index.js 4:0-51 - [8] ./j.js 901 bytes {6} {9} [built] - [9] ./k.js 899 bytes {6} {7} [built] -chunk {7} 6a8e74d82c35e3f013d2.js 899 bytes <{10}> ={0}= ={2}= ={3}= ={9}= - > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 - [9] ./k.js 899 bytes {6} {7} [built] -chunk {8} 5bc7f208cd99a83b4e33.js 1.76 KiB <{10}> ={1}= [recorded] aggressive splitted + [8] ./j.js 901 bytes {7} {10} [built] + [9] ./k.js 899 bytes {7} {9} [built] +chunk {8} 5bc7f208cd99a83b4e33.js 1.76 KiB <{4}> ={1}= [recorded] aggressive splitted > ./c ./d ./e [11] ./index.js 3:0-30 [1] ./d.js 899 bytes {0} {8} [built] - [5] ./c.js 899 bytes {5} {8} [built] -chunk {9} 13713792eb1b5038ab8b.js 1.76 KiB <{10}> ={0}= ={2}= ={3}= ={7}= [rendered] [recorded] aggressive splitted + [5] ./c.js 899 bytes {6} {8} [built] +chunk {9} 819c28704a84308cd0f6.js 899 bytes <{4}> ={0}= ={2}= ={3}= ={10}= > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 - [7] ./i.js 899 bytes {9} {11} [built] - [8] ./j.js 901 bytes {6} {9} [built] -chunk {10} d886db099ddf05aadc6d.js (main) 248 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< >{8}< >{9}< >{11}< [entry] [rendered] - > ./index main - [11] ./index.js 248 bytes {10} [built] -chunk {11} ba9fedb7aa0c69201639.js 1.76 KiB <{10}> ={2}= ={6}= [rendered] [recorded] aggressive splitted + [9] ./k.js 899 bytes {7} {9} [built] +chunk {10} 5ea68201264e1d2b28e9.js 1.76 KiB <{4}> ={0}= ={2}= ={3}= ={9}= [rendered] [recorded] aggressive splitted + > ./b ./d ./e ./f ./g ./h ./i ./j ./k [11] ./index.js 6:0-72 + [7] ./i.js 899 bytes {10} {11} [built] + [8] ./j.js 901 bytes {7} {10} [built] +chunk {11} ba9fedb7aa0c69201639.js 1.76 KiB <{4}> ={2}= ={7}= [rendered] [recorded] aggressive splitted > ./f ./g ./h ./i ./j ./k [11] ./index.js 4:0-51 [6] ./h.js 899 bytes {3} {11} [built] - [7] ./i.js 899 bytes {9} {11} [built]" + [7] ./i.js 899 bytes {10} {11} [built]" `; exports[`StatsTestCases should print correct stats for async-commons-chunk 1`] = ` "Entrypoint main = main.js -chunk {0} 0.js 21 bytes <{3}> ={1}= ={2}= [rendered] reused as split chunk (cache group: default) - > [3] ./index.js 17:1-21:3 - > [3] ./index.js 2:1-5:3 - > ./a ./b [3] ./index.js 9:1-13:3 +chunk {0} 0.js 21 bytes <{1}> ={2}= ={3}= [rendered] reused as split chunk (cache group: default) + > [1] ./index.js 17:1-21:3 + > [1] ./index.js 2:1-5:3 + > ./a ./b [1] ./index.js 9:1-13:3 [0] ./a.js 21 bytes {0} [built] -chunk {1} 1.js 21 bytes <{3}> ={0}= [rendered] - > ./a ./b [3] ./index.js 9:1-13:3 - [1] ./b.js 21 bytes {1} [built] -chunk {2} 2.js 21 bytes <{3}> ={0}= [rendered] - > [3] ./index.js 17:1-21:3 - [2] ./c.js 21 bytes {2} [built] -chunk {3} main.js (main) 515 bytes >{0}< >{1}< >{2}< [entry] [rendered] +chunk {1} main.js (main) 515 bytes >{0}< >{2}< >{3}< [entry] [rendered] > ./ main - [3] ./index.js 515 bytes {3} [built]" + [1] ./index.js 515 bytes {1} [built] +chunk {2} 2.js 21 bytes <{1}> ={0}= [rendered] + > ./a ./b [1] ./index.js 9:1-13:3 + [2] ./b.js 21 bytes {2} [built] +chunk {3} 3.js 21 bytes <{1}> ={0}= [rendered] + > [1] ./index.js 17:1-21:3 + [3] ./c.js 21 bytes {3} [built]" `; exports[`StatsTestCases should print correct stats for async-commons-chunk-auto 1`] = ` @@ -148,192 +148,192 @@ exports[`StatsTestCases should print correct stats for async-commons-chunk-auto Entrypoint a = disabled/a.js Entrypoint b = disabled/b.js Entrypoint c = disabled/c.js - chunk {0} disabled/async-a.js (async-a) 216 bytes <{4}> >{3}< [rendered] + chunk {0} disabled/main.js (main) 147 bytes >{4}< >{5}< >{6}< [entry] [rendered] + > ./ main + [7] ./index.js 147 bytes {0} [built] + chunk {1} disabled/a.js (a) 216 bytes >{7}< [entry] [rendered] + > ./a a + [0] ./d.js 20 bytes {1} {2} {3} {4} {5} {6} [built] + [1] ./node_modules/x.js 20 bytes {1} {2} {3} {4} {5} {6} [built] + [3] ./node_modules/y.js 20 bytes {1} {2} {4} {5} [built] + [5] ./a.js + 1 modules 156 bytes {1} {4} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {2} disabled/b.js (b) 152 bytes [entry] [rendered] + > ./b b + [0] ./d.js 20 bytes {1} {2} {3} {4} {5} {6} [built] + [1] ./node_modules/x.js 20 bytes {1} {2} {3} {4} {5} {6} [built] + [2] ./f.js 20 bytes {2} {3} {5} {6} {7} [built] + [3] ./node_modules/y.js 20 bytes {1} {2} {4} {5} [built] + [4] ./b.js 72 bytes {2} {5} [built] + chunk {3} disabled/c.js (c) 167 bytes [entry] [rendered] + > ./c c + [0] ./d.js 20 bytes {1} {2} {3} {4} {5} {6} [built] + [1] ./node_modules/x.js 20 bytes {1} {2} {3} {4} {5} {6} [built] + [2] ./f.js 20 bytes {2} {3} {5} {6} {7} [built] + [6] ./c.js + 1 modules 107 bytes {3} {6} [built] + | ./c.js 72 bytes [built] + | ./node_modules/z.js 20 bytes [built] + chunk {4} disabled/async-a.js (async-a) 216 bytes <{0}> >{7}< [rendered] > ./a [7] ./index.js 1:0-47 - [0] ./d.js 20 bytes {0} {1} {2} {5} {6} {7} [built] - [1] ./node_modules/x.js 20 bytes {0} {1} {2} {5} {6} {7} [built] - [3] ./node_modules/y.js 20 bytes {0} {1} {5} {6} [built] - [5] ./a.js + 1 modules 156 bytes {0} {5} [built] + [0] ./d.js 20 bytes {1} {2} {3} {4} {5} {6} [built] + [1] ./node_modules/x.js 20 bytes {1} {2} {3} {4} {5} {6} [built] + [3] ./node_modules/y.js 20 bytes {1} {2} {4} {5} [built] + [5] ./a.js + 1 modules 156 bytes {1} {4} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {1} disabled/async-b.js (async-b) 152 bytes <{4}> [rendered] + chunk {5} disabled/async-b.js (async-b) 152 bytes <{0}> [rendered] > ./b [7] ./index.js 2:0-47 - [0] ./d.js 20 bytes {0} {1} {2} {5} {6} {7} [built] - [1] ./node_modules/x.js 20 bytes {0} {1} {2} {5} {6} {7} [built] - [2] ./f.js 20 bytes {1} {2} {3} {6} {7} [built] - [3] ./node_modules/y.js 20 bytes {0} {1} {5} {6} [built] - [4] ./b.js 72 bytes {1} {6} [built] - chunk {2} disabled/async-c.js (async-c) 167 bytes <{4}> [rendered] + [0] ./d.js 20 bytes {1} {2} {3} {4} {5} {6} [built] + [1] ./node_modules/x.js 20 bytes {1} {2} {3} {4} {5} {6} [built] + [2] ./f.js 20 bytes {2} {3} {5} {6} {7} [built] + [3] ./node_modules/y.js 20 bytes {1} {2} {4} {5} [built] + [4] ./b.js 72 bytes {2} {5} [built] + chunk {6} disabled/async-c.js (async-c) 167 bytes <{0}> [rendered] > ./c [7] ./index.js 3:0-47 - [0] ./d.js 20 bytes {0} {1} {2} {5} {6} {7} [built] - [1] ./node_modules/x.js 20 bytes {0} {1} {2} {5} {6} {7} [built] - [2] ./f.js 20 bytes {1} {2} {3} {6} {7} [built] - [6] ./c.js + 1 modules 107 bytes {2} {7} [built] + [0] ./d.js 20 bytes {1} {2} {3} {4} {5} {6} [built] + [1] ./node_modules/x.js 20 bytes {1} {2} {3} {4} {5} {6} [built] + [2] ./f.js 20 bytes {2} {3} {5} {6} {7} [built] + [6] ./c.js + 1 modules 107 bytes {3} {6} [built] | ./c.js 72 bytes [built] | ./node_modules/z.js 20 bytes [built] - chunk {3} disabled/async-g.js (async-g) 54 bytes <{0}> <{5}> [rendered] + chunk {7} disabled/async-g.js (async-g) 54 bytes <{1}> <{4}> [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 - [2] ./f.js 20 bytes {1} {2} {3} {6} {7} [built] - [8] ./g.js 34 bytes {3} [built] - chunk {4} disabled/main.js (main) 147 bytes >{0}< >{1}< >{2}< [entry] [rendered] - > ./ main - [7] ./index.js 147 bytes {4} [built] - chunk {5} disabled/a.js (a) 216 bytes >{3}< [entry] [rendered] - > ./a a - [0] ./d.js 20 bytes {0} {1} {2} {5} {6} {7} [built] - [1] ./node_modules/x.js 20 bytes {0} {1} {2} {5} {6} {7} [built] - [3] ./node_modules/y.js 20 bytes {0} {1} {5} {6} [built] - [5] ./a.js + 1 modules 156 bytes {0} {5} [built] - | ./a.js 121 bytes [built] - | ./e.js 20 bytes [built] - chunk {6} disabled/b.js (b) 152 bytes [entry] [rendered] - > ./b b - [0] ./d.js 20 bytes {0} {1} {2} {5} {6} {7} [built] - [1] ./node_modules/x.js 20 bytes {0} {1} {2} {5} {6} {7} [built] - [2] ./f.js 20 bytes {1} {2} {3} {6} {7} [built] - [3] ./node_modules/y.js 20 bytes {0} {1} {5} {6} [built] - [4] ./b.js 72 bytes {1} {6} [built] - chunk {7} disabled/c.js (c) 167 bytes [entry] [rendered] - > ./c c - [0] ./d.js 20 bytes {0} {1} {2} {5} {6} {7} [built] - [1] ./node_modules/x.js 20 bytes {0} {1} {2} {5} {6} {7} [built] - [2] ./f.js 20 bytes {1} {2} {3} {6} {7} [built] - [6] ./c.js + 1 modules 107 bytes {2} {7} [built] - | ./c.js 72 bytes [built] - | ./node_modules/z.js 20 bytes [built] + [2] ./f.js 20 bytes {2} {3} {5} {6} {7} [built] + [8] ./g.js 34 bytes {7} [built] Child default: Entrypoint main = default/main.js Entrypoint a = default/a.js Entrypoint b = default/b.js Entrypoint c = default/c.js - chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{9}> ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={8}= >{2}< >{7}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) + chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{4}> ={1}= ={2}= ={3}= ={8}= ={9}= ={10}= ={12}= >{2}< >{11}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] - chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={5}= ={6}= ={8}= >{2}< >{7}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + [1] ./node_modules/x.js 20 bytes {0} {5} {6} {7} [built] + chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{4}> ={0}= ={2}= ={3}= ={8}= ={9}= ={10}= ={12}= >{2}< >{11}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{3}> <{4}> <{9}> <{10}> ={0}= ={1}= ={3}= ={5}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + [0] ./d.js 20 bytes {1} {5} {6} {7} [built] + chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{3}> <{4}> <{5}> <{8}> ={0}= ={1}= ={3}= ={9}= ={10}= ={11}= ={12}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - [2] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} default/vendors~async-a~async-b.js (vendors~async-a~async-b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={4}= ={5}= >{2}< >{7}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) + [2] ./f.js 20 bytes {2} {6} {7} [built] + chunk {3} default/vendors~async-a~async-b.js (vendors~async-a~async-b) 20 bytes <{4}> ={0}= ={1}= ={2}= ={8}= ={9}= >{2}< >{11}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 - [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] - chunk {4} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{7}< [rendered] - > ./a [8] ./index.js 1:0-47 - [7] ./a.js + 1 modules 156 bytes {4} {10} [built] - | ./a.js 121 bytes [built] - | ./e.js 20 bytes [built] - chunk {5} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] - > ./b [8] ./index.js 2:0-47 - [5] ./b.js 72 bytes {5} {11} [built] - chunk {6} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={8}= [rendered] - > ./c [8] ./index.js 3:0-47 - [6] ./c.js 72 bytes {6} {12} [built] - chunk {7} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{3}> <{4}> <{10}> ={2}= [rendered] - > ./g [] 6:0-47 - > ./g [] 6:0-47 - [9] ./g.js 34 bytes {7} [built] - chunk {8} default/vendors~async-c.js (vendors~async-c) 20 bytes <{9}> ={0}= ={1}= ={2}= ={6}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c) - > ./c [8] ./index.js 3:0-47 - [4] ./node_modules/z.js 20 bytes {8} {12} [built] - chunk {9} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{8}< [entry] [rendered] + [3] ./node_modules/y.js 20 bytes {3} {5} {6} [built] + chunk {4} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{8}< >{9}< >{10}< >{12}< [entry] [rendered] > ./ main - [8] ./index.js 147 bytes {9} [built] - chunk {10} default/a.js (a) 216 bytes >{2}< >{7}< [entry] [rendered] + [8] ./index.js 147 bytes {4} [built] + chunk {5} default/a.js (a) 216 bytes >{2}< >{11}< [entry] [rendered] > ./a a - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] - [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] - [7] ./a.js + 1 modules 156 bytes {4} {10} [built] + [0] ./d.js 20 bytes {1} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {0} {5} {6} {7} [built] + [3] ./node_modules/y.js 20 bytes {3} {5} {6} [built] + [6] ./a.js + 1 modules 156 bytes {5} {8} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {11} default/b.js (b) 152 bytes [entry] [rendered] + chunk {6} default/b.js (b) 152 bytes [entry] [rendered] > ./b b - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] - [2] ./f.js 20 bytes {2} {11} {12} [built] - [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] - [5] ./b.js 72 bytes {5} {11} [built] - chunk {12} default/c.js (c) 152 bytes [entry] [rendered] + [0] ./d.js 20 bytes {1} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {0} {5} {6} {7} [built] + [2] ./f.js 20 bytes {2} {6} {7} [built] + [3] ./node_modules/y.js 20 bytes {3} {5} {6} [built] + [4] ./b.js 72 bytes {6} {9} [built] + chunk {7} default/c.js (c) 152 bytes [entry] [rendered] > ./c c - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] - [2] ./f.js 20 bytes {2} {11} {12} [built] - [4] ./node_modules/z.js 20 bytes {8} {12} [built] - [6] ./c.js 72 bytes {6} {12} [built] -Child vendors: - Entrypoint main = vendors/main.js - Entrypoint a = vendors/vendors.js vendors/a.js - Entrypoint b = vendors/vendors.js vendors/b.js - Entrypoint c = vendors/vendors.js vendors/c.js - chunk {0} vendors/async-a.js (async-a) 216 bytes <{5}> >{3}< [rendered] + [0] ./d.js 20 bytes {1} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {0} {5} {6} {7} [built] + [2] ./f.js 20 bytes {2} {6} {7} [built] + [5] ./c.js 72 bytes {7} {10} [built] + [7] ./node_modules/z.js 20 bytes {7} {12} [built] + chunk {8} default/async-a.js (async-a) 156 bytes <{4}> ={0}= ={1}= ={3}= >{2}< >{11}< [rendered] > ./a [8] ./index.js 1:0-47 - [0] ./d.js 20 bytes {0} {1} {2} {6} {7} {8} [built] - [1] ./node_modules/x.js 20 bytes {0} {1} {2} {4} [built] - [3] ./node_modules/y.js 20 bytes {0} {1} {4} [built] - [7] ./a.js + 1 modules 156 bytes {0} {6} [built] + [6] ./a.js + 1 modules 156 bytes {5} {8} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {1} vendors/async-b.js (async-b) 152 bytes <{5}> [rendered] + chunk {9} default/async-b.js (async-b) 72 bytes <{4}> ={0}= ={1}= ={2}= ={3}= [rendered] > ./b [8] ./index.js 2:0-47 - [0] ./d.js 20 bytes {0} {1} {2} {6} {7} {8} [built] - [1] ./node_modules/x.js 20 bytes {0} {1} {2} {4} [built] - [2] ./f.js 20 bytes {1} {2} {3} {7} {8} [built] - [3] ./node_modules/y.js 20 bytes {0} {1} {4} [built] - [5] ./b.js 72 bytes {1} {7} [built] - chunk {2} vendors/async-c.js (async-c) 152 bytes <{5}> [rendered] + [4] ./b.js 72 bytes {6} {9} [built] + chunk {10} default/async-c.js (async-c) 72 bytes <{4}> ={0}= ={1}= ={2}= ={12}= [rendered] > ./c [8] ./index.js 3:0-47 - [0] ./d.js 20 bytes {0} {1} {2} {6} {7} {8} [built] - [1] ./node_modules/x.js 20 bytes {0} {1} {2} {4} [built] - [2] ./f.js 20 bytes {1} {2} {3} {7} {8} [built] - [4] ./node_modules/z.js 20 bytes {2} {4} [built] - [6] ./c.js 72 bytes {2} {8} [built] - chunk {3} vendors/async-g.js (async-g) 54 bytes <{0}> <{4}> <{6}> [rendered] + [5] ./c.js 72 bytes {7} {10} [built] + chunk {11} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{3}> <{5}> <{8}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 - [2] ./f.js 20 bytes {1} {2} {3} {7} {8} [built] - [9] ./g.js 34 bytes {3} [built] - chunk {4} vendors/vendors.js (vendors) 60 bytes ={6}= ={7}= ={8}= >{3}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) + [9] ./g.js 34 bytes {11} [built] + chunk {12} default/vendors~async-c.js (vendors~async-c) 20 bytes <{4}> ={0}= ={1}= ={2}= ={10}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c) + > ./c [8] ./index.js 3:0-47 + [7] ./node_modules/z.js 20 bytes {7} {12} [built] +Child vendors: + Entrypoint main = vendors/main.js + Entrypoint a = vendors/vendors.js vendors/a.js + Entrypoint b = vendors/vendors.js vendors/b.js + Entrypoint c = vendors/vendors.js vendors/c.js + chunk {0} vendors/vendors.js (vendors) 60 bytes ={2}= ={3}= ={4}= >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) > ./a a > ./b b > ./c c - [1] ./node_modules/x.js 20 bytes {0} {1} {2} {4} [built] - [3] ./node_modules/y.js 20 bytes {0} {1} {4} [built] - [4] ./node_modules/z.js 20 bytes {2} {4} [built] - chunk {5} vendors/main.js (main) 147 bytes >{0}< >{1}< >{2}< [entry] [rendered] + [1] ./node_modules/x.js 20 bytes {0} {5} {6} {7} [built] + [3] ./node_modules/y.js 20 bytes {0} {5} {6} [built] + [7] ./node_modules/z.js 20 bytes {0} {7} [built] + chunk {1} vendors/main.js (main) 147 bytes >{5}< >{6}< >{7}< [entry] [rendered] > ./ main - [8] ./index.js 147 bytes {5} [built] - chunk {6} vendors/a.js (a) 176 bytes ={4}= >{3}< [entry] [rendered] + [8] ./index.js 147 bytes {1} [built] + chunk {2} vendors/a.js (a) 176 bytes ={0}= >{8}< [entry] [rendered] > ./a a - [0] ./d.js 20 bytes {0} {1} {2} {6} {7} {8} [built] - [7] ./a.js + 1 modules 156 bytes {0} {6} [built] + [0] ./d.js 20 bytes {2} {3} {4} {5} {6} {7} [built] + [6] ./a.js + 1 modules 156 bytes {2} {5} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {7} vendors/b.js (b) 112 bytes ={4}= [entry] [rendered] + chunk {3} vendors/b.js (b) 112 bytes ={0}= [entry] [rendered] > ./b b - [0] ./d.js 20 bytes {0} {1} {2} {6} {7} {8} [built] - [2] ./f.js 20 bytes {1} {2} {3} {7} {8} [built] - [5] ./b.js 72 bytes {1} {7} [built] - chunk {8} vendors/c.js (c) 112 bytes ={4}= [entry] [rendered] + [0] ./d.js 20 bytes {2} {3} {4} {5} {6} {7} [built] + [2] ./f.js 20 bytes {3} {4} {6} {7} {8} [built] + [4] ./b.js 72 bytes {3} {6} [built] + chunk {4} vendors/c.js (c) 112 bytes ={0}= [entry] [rendered] > ./c c - [0] ./d.js 20 bytes {0} {1} {2} {6} {7} {8} [built] - [2] ./f.js 20 bytes {1} {2} {3} {7} {8} [built] - [6] ./c.js 72 bytes {2} {8} [built] + [0] ./d.js 20 bytes {2} {3} {4} {5} {6} {7} [built] + [2] ./f.js 20 bytes {3} {4} {6} {7} {8} [built] + [5] ./c.js 72 bytes {4} {7} [built] + chunk {5} vendors/async-a.js (async-a) 216 bytes <{1}> >{8}< [rendered] + > ./a [8] ./index.js 1:0-47 + [0] ./d.js 20 bytes {2} {3} {4} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {0} {5} {6} {7} [built] + [3] ./node_modules/y.js 20 bytes {0} {5} {6} [built] + [6] ./a.js + 1 modules 156 bytes {2} {5} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {6} vendors/async-b.js (async-b) 152 bytes <{1}> [rendered] + > ./b [8] ./index.js 2:0-47 + [0] ./d.js 20 bytes {2} {3} {4} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {0} {5} {6} {7} [built] + [2] ./f.js 20 bytes {3} {4} {6} {7} {8} [built] + [3] ./node_modules/y.js 20 bytes {0} {5} {6} [built] + [4] ./b.js 72 bytes {3} {6} [built] + chunk {7} vendors/async-c.js (async-c) 152 bytes <{1}> [rendered] + > ./c [8] ./index.js 3:0-47 + [0] ./d.js 20 bytes {2} {3} {4} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {0} {5} {6} {7} [built] + [2] ./f.js 20 bytes {3} {4} {6} {7} {8} [built] + [5] ./c.js 72 bytes {4} {7} [built] + [7] ./node_modules/z.js 20 bytes {0} {7} [built] + chunk {8} vendors/async-g.js (async-g) 54 bytes <{0}> <{2}> <{5}> [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [2] ./f.js 20 bytes {3} {4} {6} {7} {8} [built] + [9] ./g.js 34 bytes {8} [built] Child multiple-vendors: Entrypoint main = multiple-vendors/main.js Entrypoint a = multiple-vendors/libs-x.js multiple-vendors/vendors~a~async-a~async-b~b.js multiple-vendors/a.js Entrypoint b = multiple-vendors/libs-x.js multiple-vendors/vendors~a~async-a~async-b~b.js multiple-vendors/b.js Entrypoint c = multiple-vendors/libs-x.js multiple-vendors/vendors~async-c~c.js multiple-vendors/c.js - chunk {0} multiple-vendors/libs-x.js (libs-x) 20 bytes <{9}> ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={10}= ={11}= ={12}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: libs) (name: libs-x) + chunk {0} multiple-vendors/libs-x.js (libs-x) 20 bytes <{5}> ={1}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= >{3}< >{12}< [initial] [rendered] split chunk (cache group: libs) (name: libs-x) > ./a a > ./b b > ./c c @@ -341,67 +341,67 @@ Child multiple-vendors: > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [2] ./node_modules/x.js 20 bytes {0} [built] - chunk {1} multiple-vendors/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= >{2}< >{8}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + chunk {1} multiple-vendors/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{5}> ={0}= ={2}= ={3}= ={6}= ={7}= ={9}= ={10}= >{3}< >{12}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) + > ./a a + > ./b b + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + [3] ./node_modules/y.js 20 bytes {1} [built] + chunk {2} multiple-vendors/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{5}> ={0}= ={1}= ={3}= ={4}= ={9}= ={10}= ={11}= >{3}< >{12}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} multiple-vendors/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{3}> <{5}> <{9}> <{10}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + [0] ./d.js 20 bytes {2} {6} {7} {8} [built] + chunk {3} multiple-vendors/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{2}> <{5}> <{6}> <{9}> ={0}= ={1}= ={2}= ={4}= ={10}= ={11}= ={12}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - [1] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} multiple-vendors/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={5}= ={6}= ={10}= ={11}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) - > ./a a - > ./b b - > ./a [8] ./index.js 1:0-47 - > ./b [8] ./index.js 2:0-47 - [3] ./node_modules/y.js 20 bytes {3} [built] - chunk {4} multiple-vendors/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={2}= ={7}= ={12}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + [1] ./f.js 20 bytes {3} {7} {8} [built] + chunk {4} multiple-vendors/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{5}> ={0}= ={2}= ={3}= ={8}= ={11}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) > ./c c > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] - chunk {5} multiple-vendors/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{8}< [rendered] + chunk {5} multiple-vendors/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{9}< >{10}< >{11}< [entry] [rendered] + > ./ main + [8] ./index.js 147 bytes {5} [built] + chunk {6} multiple-vendors/a.js (a) 176 bytes ={0}= ={1}= >{3}< >{12}< [entry] [rendered] + > ./a a + [0] ./d.js 20 bytes {2} {6} {7} {8} [built] + [6] ./a.js + 1 modules 156 bytes {6} {9} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {7} multiple-vendors/b.js (b) 112 bytes ={0}= ={1}= [entry] [rendered] + > ./b b + [0] ./d.js 20 bytes {2} {6} {7} {8} [built] + [1] ./f.js 20 bytes {3} {7} {8} [built] + [4] ./b.js 72 bytes {7} {10} [built] + chunk {8} multiple-vendors/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] + > ./c c + [0] ./d.js 20 bytes {2} {6} {7} {8} [built] + [1] ./f.js 20 bytes {3} {7} {8} [built] + [5] ./c.js 72 bytes {8} {11} [built] + chunk {9} multiple-vendors/async-a.js (async-a) 156 bytes <{5}> ={0}= ={1}= ={2}= >{3}< >{12}< [rendered] > ./a [8] ./index.js 1:0-47 - [6] ./a.js + 1 modules 156 bytes {5} {10} [built] + [6] ./a.js + 1 modules 156 bytes {6} {9} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {6} multiple-vendors/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] + chunk {10} multiple-vendors/async-b.js (async-b) 72 bytes <{5}> ={0}= ={1}= ={2}= ={3}= [rendered] > ./b [8] ./index.js 2:0-47 - [4] ./b.js 72 bytes {6} {11} [built] - chunk {7} multiple-vendors/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] + [4] ./b.js 72 bytes {7} {10} [built] + chunk {11} multiple-vendors/async-c.js (async-c) 72 bytes <{5}> ={0}= ={2}= ={3}= ={4}= [rendered] > ./c [8] ./index.js 3:0-47 - [5] ./c.js 72 bytes {7} {12} [built] - chunk {8} multiple-vendors/async-g.js (async-g) 34 bytes <{0}> <{1}> <{3}> <{5}> <{10}> ={2}= [rendered] + [5] ./c.js 72 bytes {8} {11} [built] + chunk {12} multiple-vendors/async-g.js (async-g) 34 bytes <{0}> <{1}> <{2}> <{6}> <{9}> ={3}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 - [9] ./g.js 34 bytes {8} [built] - chunk {9} multiple-vendors/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< [entry] [rendered] - > ./ main - [8] ./index.js 147 bytes {9} [built] - chunk {10} multiple-vendors/a.js (a) 176 bytes ={0}= ={3}= >{2}< >{8}< [entry] [rendered] - > ./a a - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [6] ./a.js + 1 modules 156 bytes {5} {10} [built] - | ./a.js 121 bytes [built] - | ./e.js 20 bytes [built] - chunk {11} multiple-vendors/b.js (b) 112 bytes ={0}= ={3}= [entry] [rendered] - > ./b b - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [1] ./f.js 20 bytes {2} {11} {12} [built] - [4] ./b.js 72 bytes {6} {11} [built] - chunk {12} multiple-vendors/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] - > ./c c - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [1] ./f.js 20 bytes {2} {11} {12} [built] - [5] ./c.js 72 bytes {7} {12} [built] + [9] ./g.js 34 bytes {12} [built] Child all: Entrypoint main = all/main.js Entrypoint a = all/vendors~a~async-a~async-b~async-c~b~c.js all/vendors~a~async-a~async-b~b.js all/a.js Entrypoint b = all/vendors~a~async-a~async-b~async-c~b~c.js all/vendors~a~async-a~async-b~b.js all/b.js Entrypoint c = all/vendors~a~async-a~async-b~async-c~b~c.js all/vendors~async-c~c.js all/c.js - chunk {0} all/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={10}= ={11}= ={12}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) + chunk {0} all/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{5}> ={1}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= >{3}< >{12}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) > ./a a > ./b b > ./c c @@ -409,124 +409,124 @@ Child all: > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [2] ./node_modules/x.js 20 bytes {0} [built] - chunk {1} all/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= >{2}< >{8}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + chunk {1} all/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{5}> ={0}= ={2}= ={3}= ={6}= ={7}= ={9}= ={10}= >{3}< >{12}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) + > ./a a + > ./b b + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + [3] ./node_modules/y.js 20 bytes {1} [built] + chunk {2} all/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{5}> ={0}= ={1}= ={3}= ={4}= ={9}= ={10}= ={11}= >{3}< >{12}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} all/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{3}> <{5}> <{9}> <{10}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + [0] ./d.js 20 bytes {2} {6} {7} {8} [built] + chunk {3} all/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{2}> <{5}> <{6}> <{9}> ={0}= ={1}= ={2}= ={4}= ={10}= ={11}= ={12}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - [1] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} all/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={5}= ={6}= ={10}= ={11}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) - > ./a a - > ./b b - > ./a [8] ./index.js 1:0-47 - > ./b [8] ./index.js 2:0-47 - [3] ./node_modules/y.js 20 bytes {3} [built] - chunk {4} all/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={2}= ={7}= ={12}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + [1] ./f.js 20 bytes {3} {7} {8} [built] + chunk {4} all/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{5}> ={0}= ={2}= ={3}= ={8}= ={11}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) > ./c c > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] - chunk {5} all/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{8}< [rendered] + chunk {5} all/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{9}< >{10}< >{11}< [entry] [rendered] + > ./ main + [8] ./index.js 147 bytes {5} [built] + chunk {6} all/a.js (a) 176 bytes ={0}= ={1}= >{3}< >{12}< [entry] [rendered] + > ./a a + [0] ./d.js 20 bytes {2} {6} {7} {8} [built] + [6] ./a.js + 1 modules 156 bytes {6} {9} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {7} all/b.js (b) 112 bytes ={0}= ={1}= [entry] [rendered] + > ./b b + [0] ./d.js 20 bytes {2} {6} {7} {8} [built] + [1] ./f.js 20 bytes {3} {7} {8} [built] + [4] ./b.js 72 bytes {7} {10} [built] + chunk {8} all/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] + > ./c c + [0] ./d.js 20 bytes {2} {6} {7} {8} [built] + [1] ./f.js 20 bytes {3} {7} {8} [built] + [5] ./c.js 72 bytes {8} {11} [built] + chunk {9} all/async-a.js (async-a) 156 bytes <{5}> ={0}= ={1}= ={2}= >{3}< >{12}< [rendered] > ./a [8] ./index.js 1:0-47 - [6] ./a.js + 1 modules 156 bytes {5} {10} [built] + [6] ./a.js + 1 modules 156 bytes {6} {9} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {6} all/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] + chunk {10} all/async-b.js (async-b) 72 bytes <{5}> ={0}= ={1}= ={2}= ={3}= [rendered] > ./b [8] ./index.js 2:0-47 - [4] ./b.js 72 bytes {6} {11} [built] - chunk {7} all/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] + [4] ./b.js 72 bytes {7} {10} [built] + chunk {11} all/async-c.js (async-c) 72 bytes <{5}> ={0}= ={2}= ={3}= ={4}= [rendered] > ./c [8] ./index.js 3:0-47 - [5] ./c.js 72 bytes {7} {12} [built] - chunk {8} all/async-g.js (async-g) 34 bytes <{0}> <{1}> <{3}> <{5}> <{10}> ={2}= [rendered] + [5] ./c.js 72 bytes {8} {11} [built] + chunk {12} all/async-g.js (async-g) 34 bytes <{0}> <{1}> <{2}> <{6}> <{9}> ={3}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 - [9] ./g.js 34 bytes {8} [built] - chunk {9} all/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< [entry] [rendered] - > ./ main - [8] ./index.js 147 bytes {9} [built] - chunk {10} all/a.js (a) 176 bytes ={0}= ={3}= >{2}< >{8}< [entry] [rendered] - > ./a a - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [6] ./a.js + 1 modules 156 bytes {5} {10} [built] - | ./a.js 121 bytes [built] - | ./e.js 20 bytes [built] - chunk {11} all/b.js (b) 112 bytes ={0}= ={3}= [entry] [rendered] - > ./b b - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [1] ./f.js 20 bytes {2} {11} {12} [built] - [4] ./b.js 72 bytes {6} {11} [built] - chunk {12} all/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] - > ./c c - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [1] ./f.js 20 bytes {2} {11} {12} [built] - [5] ./c.js 72 bytes {7} {12} [built]" + [9] ./g.js 34 bytes {12} [built]" `; exports[`StatsTestCases should print correct stats for chunk-module-id-range 1`] = ` -"Hash: b385901db3d63ff731a3 +"Hash: 8683bda4416097d173ee Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names -main1.js 4.86 KiB 0 [emitted] main1 -main2.js 4.85 KiB 1 [emitted] main2 +main2.js 4.85 KiB 0 [emitted] main2 +main1.js 4.86 KiB 1 [emitted] main1 Entrypoint main1 = main1.js Entrypoint main2 = main2.js -chunk {0} main1.js (main1) 136 bytes [entry] [rendered] +chunk {0} main2.js (main2) 136 bytes [entry] [rendered] + > ./main2 main2 + [0] ./d.js 20 bytes {0} {1} [built] + [1] ./e.js 20 bytes {0} [built] + [2] ./f.js 20 bytes {0} [built] + [3] ./main2.js 56 bytes {0} [built] + [101] ./a.js 20 bytes {0} {1} [built] +chunk {1} main1.js (main1) 136 bytes [entry] [rendered] > ./main1 main1 - [3] ./b.js 20 bytes {0} [built] - [4] ./main1.js 56 bytes {0} [built] - [100] ./d.js 20 bytes {0} {1} [built] + [0] ./d.js 20 bytes {0} {1} [built] + [4] ./c.js 20 bytes {1} [built] + [100] ./main1.js 56 bytes {1} [built] [101] ./a.js 20 bytes {0} {1} [built] - [102] ./c.js 20 bytes {0} [built] -chunk {1} main2.js (main2) 136 bytes [entry] [rendered] - > ./main2 main2 - [0] ./e.js 20 bytes {1} [built] - [1] ./f.js 20 bytes {1} [built] - [2] ./main2.js 56 bytes {1} [built] - [100] ./d.js 20 bytes {0} {1} [built] - [101] ./a.js 20 bytes {0} {1} [built]" + [102] ./b.js 20 bytes {1} [built]" `; exports[`StatsTestCases should print correct stats for chunks 1`] = ` -"Hash: 337155e238d6550ce6f7 +"Hash: bb90fc9e61205a066fee Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names -0.bundle.js 152 bytes 0 [emitted] -1.bundle.js 289 bytes 1 [emitted] - bundle.js 8.29 KiB 2 [emitted] main -3.bundle.js 227 bytes 3 [emitted] + bundle.js 8.28 KiB 0 [emitted] main +1.bundle.js 152 bytes 1 [emitted] +2.bundle.js 289 bytes 2 [emitted] +3.bundle.js 232 bytes 3 [emitted] Entrypoint main = bundle.js -chunk {0} 0.bundle.js 22 bytes <{2}> [rendered] - > ./b [4] ./index.js 2:0-16 - [2] ./b.js 22 bytes {0} [built] - amd require ./b [4] ./index.js 2:0-16 - [4] Xms -> factory:Xms building:Xms = Xms -chunk {1} 1.bundle.js 54 bytes <{2}> >{3}< [rendered] - > ./c [4] ./index.js 3:0-16 - [3] ./c.js 54 bytes {1} [built] - amd require ./c [4] ./index.js 3:0-16 - [4] Xms -> factory:Xms building:Xms = Xms -chunk {2} bundle.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] +chunk {0} bundle.js (main) 73 bytes >{1}< >{2}< [entry] [rendered] > ./index main - [4] ./index.js 51 bytes {2} [built] + [0] ./index.js 51 bytes {0} [built] single entry ./index main factory:Xms building:Xms = Xms - [5] ./a.js 22 bytes {2} [built] - cjs require ./a [4] ./index.js 1:0-14 - [4] Xms -> factory:Xms building:Xms = Xms -chunk {3} 3.bundle.js 44 bytes <{1}> [rendered] + [1] ./a.js 22 bytes {0} [built] + cjs require ./a [0] ./index.js 1:0-14 + [0] Xms -> factory:Xms building:Xms = Xms +chunk {1} 1.bundle.js 22 bytes <{0}> [rendered] + > ./b [0] ./index.js 2:0-16 + [2] ./b.js 22 bytes {1} [built] + amd require ./b [0] ./index.js 2:0-16 + [0] Xms -> factory:Xms building:Xms = Xms +chunk {2} 2.bundle.js 54 bytes <{0}> >{3}< [rendered] + > ./c [0] ./index.js 3:0-16 + [3] ./c.js 54 bytes {2} [built] + amd require ./c [0] ./index.js 3:0-16 + [0] Xms -> factory:Xms building:Xms = Xms +chunk {3} 3.bundle.js 44 bytes <{2}> [rendered] > [3] ./c.js 1:0-52 - [0] ./d.js 22 bytes {3} [built] + [4] ./d.js 22 bytes {3} [built] require.ensure item ./d [3] ./c.js 1:0-52 - [4] Xms -> [3] Xms -> factory:Xms building:Xms = Xms - [1] ./e.js 22 bytes {3} [built] + [0] Xms -> [3] Xms -> factory:Xms building:Xms = Xms + [5] ./e.js 22 bytes {3} [built] require.ensure item ./e [3] ./c.js 1:0-52 - [4] Xms -> [3] Xms -> factory:Xms building:Xms = Xms" + [0] Xms -> [3] Xms -> factory:Xms building:Xms = Xms" `; exports[`StatsTestCases should print correct stats for chunks-development 1`] = ` @@ -534,20 +534,11 @@ exports[`StatsTestCases should print correct stats for chunks-development 1`] = Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names + bundle.js 8.67 KiB main [emitted] main 0.bundle.js 297 bytes 0 [emitted] 1.bundle.js 433 bytes 1 [emitted] - bundle.js 8.67 KiB main [emitted] main 2.bundle.js 588 bytes 2 [emitted] Entrypoint main = bundle.js -chunk {main} bundle.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] - > ./index main - [./a.js] 22 bytes {main} [built] - cjs require ./a [./index.js] 1:0-14 - cjs require ./a [./e.js] 1:0-14 - [./index.js] Xms -> factory:Xms building:Xms = Xms - [./index.js] 51 bytes {main} [built] - single entry ./index main - factory:Xms building:Xms = Xms chunk {0} 0.bundle.js 22 bytes <{main}> [rendered] > ./b [./index.js] ./index.js 2:0-16 [./b.js] 22 bytes {0} [built] @@ -565,19 +556,28 @@ chunk {2} 2.bundle.js 60 bytes <{1}> [rendered] [./index.js] Xms -> [./c.js] Xms -> factory:Xms building:Xms = Xms [./e.js] 38 bytes {2} [built] require.ensure item ./e [./c.js] 1:0-52 - [./index.js] Xms -> [./c.js] Xms -> factory:Xms building:Xms = Xms" + [./index.js] Xms -> [./c.js] Xms -> factory:Xms building:Xms = Xms +chunk {main} bundle.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] + > ./index main + [./a.js] 22 bytes {main} [built] + cjs require ./a [./index.js] 1:0-14 + cjs require ./a [./e.js] 1:0-14 + [./index.js] Xms -> factory:Xms building:Xms = Xms + [./index.js] 51 bytes {main} [built] + single entry ./index main + factory:Xms building:Xms = Xms" `; exports[`StatsTestCases should print correct stats for circular-correctness 1`] = ` "Entrypoint main = bundle.js -chunk {0} 0.bundle.js (a) 49 bytes <{2}> <{3}> >{3}< [rendered] - [1] ./module-a.js 49 bytes {0} [built] -chunk {1} 1.bundle.js (b) 49 bytes <{2}> <{3}> >{3}< [rendered] - [2] ./module-b.js 49 bytes {1} [built] -chunk {2} bundle.js (main) 98 bytes >{0}< >{1}< [entry] [rendered] - [3] ./index.js 98 bytes {2} [built] -chunk {3} 3.bundle.js (c) 98 bytes <{0}> <{1}> >{0}< >{1}< [rendered] - [0] ./module-c.js 98 bytes {3} [built]" +chunk {0} bundle.js (main) 98 bytes >{1}< >{2}< [entry] [rendered] + [0] ./index.js 98 bytes {0} [built] +chunk {1} 1.bundle.js (a) 49 bytes <{0}> <{3}> >{3}< [rendered] + [1] ./module-a.js 49 bytes {1} [built] +chunk {2} 2.bundle.js (b) 49 bytes <{0}> <{3}> >{3}< [rendered] + [2] ./module-b.js 49 bytes {2} [built] +chunk {3} 3.bundle.js (c) 98 bytes <{1}> <{2}> >{1}< >{2}< [rendered] + [3] ./module-c.js 98 bytes {3} [built]" `; exports[`StatsTestCases should print correct stats for color-disabled 1`] = ` @@ -996,56 +996,56 @@ Child [warnings => false]: exports[`StatsTestCases should print correct stats for graph-correctness-entries 1`] = ` "Entrypoint e1 = e1.js Entrypoint e2 = e2.js -chunk {0} a.js (a) 49 bytes <{1}> <{2}> >{4}< [rendered] - [0] ./module-a.js 49 bytes {0} [built] - import() ./module-a [1] ./module-c.js 1:0-47 - import() ./module-a [3] ./e1.js 1:0-47 -chunk {1} c.js (c) 49 bytes <{3}> <{4}> >{0}< [rendered] - [1] ./module-c.js 49 bytes {1} [built] - import() ./module-c [2] ./module-b.js 1:0-47 - import() ./module-c [4] ./e2.js 1:0-47 -chunk {2} e1.js (e1) 49 bytes >{0}< [entry] [rendered] - [3] ./e1.js 49 bytes {2} [built] +chunk {0} e1.js (e1) 49 bytes >{2}< [entry] [rendered] + [0] ./e1.js 49 bytes {0} [built] single entry ./e1 e1 -chunk {3} e2.js (e2) 49 bytes >{1}< [entry] [rendered] - [4] ./e2.js 49 bytes {3} [built] +chunk {1} e2.js (e2) 49 bytes >{3}< [entry] [rendered] + [1] ./e2.js 49 bytes {1} [built] single entry ./e2 e2 -chunk {4} b.js (b) 49 bytes <{0}> >{1}< [rendered] - [2] ./module-b.js 49 bytes {4} [built] - import() ./module-b [0] ./module-a.js 1:0-47" +chunk {2} a.js (a) 49 bytes <{0}> <{3}> >{4}< [rendered] + [2] ./module-a.js 49 bytes {2} [built] + import() ./module-a [0] ./e1.js 1:0-47 + import() ./module-a [3] ./module-c.js 1:0-47 +chunk {3} c.js (c) 49 bytes <{1}> <{4}> >{2}< [rendered] + [3] ./module-c.js 49 bytes {3} [built] + import() ./module-c [1] ./e2.js 1:0-47 + import() ./module-c [4] ./module-b.js 1:0-47 +chunk {4} b.js (b) 49 bytes <{2}> >{3}< [rendered] + [4] ./module-b.js 49 bytes {4} [built] + import() ./module-b [2] ./module-a.js 1:0-47" `; exports[`StatsTestCases should print correct stats for graph-correctness-modules 1`] = ` "Entrypoint e1 = e1.js Entrypoint e2 = e2.js -chunk {0} y.js (y) 0 bytes <{3}> <{4}> [rendered] - [3] ./module-y.js 0 bytes {0} [built] - import() ./module-y [0] ./module-x.js 1:0-47 -chunk {1} a.js (a) 49 bytes <{2}> <{3}> >{5}< [rendered] - [1] ./module-a.js 49 bytes {1} [built] - import() ./module-a [2] ./module-c.js 1:0-47 - import() ./module-a [5] ./e1.js 2:0-47 -chunk {2} c.js (c) 49 bytes <{4}> <{5}> >{1}< [rendered] - [2] ./module-c.js 49 bytes {2} [built] - import() ./module-c [4] ./module-b.js 1:0-47 - import() ./module-c [6] ./e2.js 2:0-47 -chunk {3} e1.js (e1) 119 bytes >{0}< >{1}< [entry] [rendered] - [0] ./module-x.js 49 bytes {3} {4} [built] - import() ./module-x [4] ./module-b.js 2:0-20 - harmony side effect evaluation ./module-x [5] ./e1.js 1:0-20 - harmony side effect evaluation ./module-x [6] ./e2.js 1:0-20 - [5] ./e1.js 70 bytes {3} [built] +chunk {0} e1.js (e1) 119 bytes >{2}< >{3}< [entry] [rendered] + [0] ./module-x.js 49 bytes {0} {1} [built] + harmony side effect evaluation ./module-x [2] ./e1.js 1:0-20 + harmony side effect evaluation ./module-x [3] ./e2.js 1:0-20 + import() ./module-x [6] ./module-b.js 2:0-20 + [2] ./e1.js 70 bytes {0} [built] single entry ./e1 e1 -chunk {4} e2.js (e2) 119 bytes >{0}< >{2}< [entry] [rendered] - [0] ./module-x.js 49 bytes {3} {4} [built] - import() ./module-x [4] ./module-b.js 2:0-20 - harmony side effect evaluation ./module-x [5] ./e1.js 1:0-20 - harmony side effect evaluation ./module-x [6] ./e2.js 1:0-20 - [6] ./e2.js 70 bytes {4} [built] +chunk {1} e2.js (e2) 119 bytes >{3}< >{4}< [entry] [rendered] + [0] ./module-x.js 49 bytes {0} {1} [built] + harmony side effect evaluation ./module-x [2] ./e1.js 1:0-20 + harmony side effect evaluation ./module-x [3] ./e2.js 1:0-20 + import() ./module-x [6] ./module-b.js 2:0-20 + [3] ./e2.js 70 bytes {1} [built] single entry ./e2 e2 -chunk {5} b.js (b) 179 bytes <{1}> >{2}< [rendered] - [4] ./module-b.js 179 bytes {5} [built] - import() ./module-b [1] ./module-a.js 1:0-47" +chunk {2} a.js (a) 49 bytes <{0}> <{4}> >{5}< [rendered] + [4] ./module-a.js 49 bytes {2} [built] + import() ./module-a [2] ./e1.js 2:0-47 + import() ./module-a [5] ./module-c.js 1:0-47 +chunk {3} y.js (y) 0 bytes <{0}> <{1}> [rendered] + [1] ./module-y.js 0 bytes {3} [built] + import() ./module-y [0] ./module-x.js 1:0-47 +chunk {4} c.js (c) 49 bytes <{1}> <{5}> >{2}< [rendered] + [5] ./module-c.js 49 bytes {4} [built] + import() ./module-c [3] ./e2.js 2:0-47 + import() ./module-c [6] ./module-b.js 1:0-47 +chunk {5} b.js (b) 179 bytes <{2}> >{4}< [rendered] + [6] ./module-b.js 179 bytes {5} [built] + import() ./module-b [4] ./module-a.js 1:0-47" `; exports[`StatsTestCases should print correct stats for import-context-filter 1`] = ` @@ -1066,26 +1066,26 @@ Entrypoint entry = entry.js `; exports[`StatsTestCases should print correct stats for import-weak 1`] = ` -"Hash: 5043a861e2975c70a2e7 +"Hash: dbee3e50dffcb0b8c23e Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names - 0.js 149 bytes 0 [emitted] -entry.js 8.53 KiB 1 [emitted] entry +entry.js 8.53 KiB 0 [emitted] entry + 1.js 149 bytes 1 [emitted] Entrypoint entry = entry.js -[0] ./modules/b.js 22 bytes {0} [built] -[1] ./entry.js 120 bytes {1} [built] +[0] ./modules/b.js 22 bytes {1} [built] +[1] ./entry.js 120 bytes {0} [built] [2] ./modules/a.js 37 bytes [built]" `; exports[`StatsTestCases should print correct stats for import-with-invalid-options-comments 1`] = ` "Built at: Thu Jan 01 1970 00:00:00 GMT -[0] ./chunk-a.js 27 bytes {2} [built] -[1] ./chunk-b.js 27 bytes {3} [built] -[2] ./chunk-c.js 27 bytes {4} [built] -[3] ./chunk-d.js 27 bytes {5} [built] -[4] ./chunk.js 401 bytes {0} [built] [3 warnings] -[5] ./index.js 50 bytes {1} [built] +[0] ./index.js 50 bytes {0} [built] +[1] ./chunk.js 401 bytes {1} [built] [3 warnings] +[2] ./chunk-a.js 27 bytes {2} [built] +[3] ./chunk-b.js 27 bytes {3} [built] +[4] ./chunk-c.js 27 bytes {4} [built] +[5] ./chunk-d.js 27 bytes {5} [built] WARNING in ./chunk.js 4:11-77 Compilation error while processing magic comment(-s): /* webpack Prefetch: 0, webpackChunkName: \\"notGoingToCompile-c\\" */: Unexpected identifier @@ -1101,7 +1101,7 @@ Compilation error while processing magic comment(-s): /* webpackPrefetch: true, `; exports[`StatsTestCases should print correct stats for issue-7577 1`] = ` -"Hash: 343642fcbd3799129ba328960aea386766e9b4685f5e642073649561789d +"Hash: 343642fcbd3799129ba328960aea386766e9b4687cb799c3c09b3e52b1ac Child Hash: 343642fcbd3799129ba3 Time: Xms @@ -1125,23 +1125,23 @@ Child [0] ./node_modules/vendor.js 23 bytes {vendors~main} [built] [1] ./b.js 17 bytes {all~main} [built] Child - Hash: 5f5e642073649561789d + Hash: 7cb799c3c09b3e52b1ac Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names - c-0-6bb505f933a38ad423d3.js 150 bytes 0 [emitted] - c-1-e2f2199a8d3d8508c29c.js 459 bytes 1 [emitted] - c-all~main-5bf91ad3502dd7005727.js 299 bytes all~main [emitted] all~main - c-main-b48f733d0f40de7539ce.js 114 bytes main [emitted] main - c-runtime~main-4582dbde6a81040ef3aa.js 8.84 KiB runtime~main [emitted] runtime~main - Entrypoint main = c-runtime~main-4582dbde6a81040ef3aa.js c-all~main-5bf91ad3502dd7005727.js c-main-b48f733d0f40de7539ce.js (prefetch: c-0-6bb505f933a38ad423d3.js c-1-e2f2199a8d3d8508c29c.js) - [0] ./node_modules/vendor.js 23 bytes {0} [built] - [1] ./b.js 17 bytes {1} [built] - [2] ./c.js 61 bytes {all~main} [built]" + c-main-a7197f03f8f2dfea0fa5.js 114 bytes main [emitted] main + c-0-775a18a4f14e4483daf8.js 153 bytes 0 [emitted] + c-1-f0767101f6e51d910fd6.js 450 bytes 1 [emitted] + c-all~main-7b1b86e650f3856c17c9.js 305 bytes all~main [emitted] all~main + c-runtime~main-07e05a23b9679c3f51dd.js 8.84 KiB runtime~main [emitted] runtime~main + Entrypoint main = c-runtime~main-07e05a23b9679c3f51dd.js c-all~main-7b1b86e650f3856c17c9.js c-main-a7197f03f8f2dfea0fa5.js (prefetch: c-0-775a18a4f14e4483daf8.js c-1-f0767101f6e51d910fd6.js) + [0] ./b.js 17 bytes {1} [built] + [1] ./c.js 61 bytes {all~main} [built] + [2] ./node_modules/vendor.js 23 bytes {0} [built]" `; exports[`StatsTestCases should print correct stats for limit-chunk-count-plugin 1`] = ` -"Hash: 3f682d19df3a78cc355bf6b5cf6affcd0a3789f4d4554dbae635e8619c03ae9e4a73fc96c164d6f0 +"Hash: 3f682d19df3a78cc355b358ecf1b8718ebbde62e08074f8efde660b3b349f7c7c171ed4a3a7adb19 Child 1 chunks: Hash: 3f682d19df3a78cc355b Time: Xms @@ -1157,59 +1157,59 @@ Child 1 chunks: [4] ./d.js 22 bytes {0} [built] [5] ./e.js 22 bytes {0} [built] Child 2 chunks: - Hash: f6b5cf6affcd0a3789f4 + Hash: 358ecf1b8718ebbde62e Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names - 0.bundle.js 632 bytes 0 [emitted] + 0.bundle.js 641 bytes 0 [emitted] bundle.js 8.28 KiB 1 [emitted] main Entrypoint main = bundle.js chunk {0} 0.bundle.js 118 bytes <{0}> <{1}> >{0}< [rendered] - [0] ./d.js 22 bytes {0} [built] - [1] ./e.js 22 bytes {0} [built] - [2] ./a.js 22 bytes {0} [built] - [3] ./b.js 22 bytes {0} [built] - [4] ./c.js 30 bytes {0} [built] + [1] ./a.js 22 bytes {0} [built] + [2] ./b.js 22 bytes {0} [built] + [3] ./c.js 30 bytes {0} [built] + [4] ./d.js 22 bytes {0} [built] + [5] ./e.js 22 bytes {0} [built] chunk {1} bundle.js (main) 73 bytes >{0}< [entry] [rendered] - [5] ./index.js 73 bytes {1} [built] + [0] ./index.js 73 bytes {1} [built] Child 3 chunks: - Hash: d4554dbae635e8619c03 + Hash: 08074f8efde660b3b349 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names 0.bundle.js 494 bytes 0 [emitted] - 1.bundle.js 245 bytes 1 [emitted] + 1.bundle.js 232 bytes 1 [emitted] bundle.js 8.28 KiB 2 [emitted] main Entrypoint main = bundle.js chunk {0} 0.bundle.js 74 bytes <{0}> <{2}> >{0}< >{1}< [rendered] - [0] ./d.js 22 bytes {0} [built] - [2] ./a.js 22 bytes {0} [built] - [4] ./c.js 30 bytes {0} [built] + [1] ./a.js 22 bytes {0} [built] + [3] ./c.js 30 bytes {0} [built] + [4] ./d.js 22 bytes {0} [built] chunk {1} 1.bundle.js 44 bytes <{0}> <{2}> [rendered] - [1] ./e.js 22 bytes {1} [built] - [3] ./b.js 22 bytes {1} [built] + [2] ./b.js 22 bytes {1} [built] + [5] ./e.js 22 bytes {1} [built] chunk {2} bundle.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] - [5] ./index.js 73 bytes {2} [built] + [0] ./index.js 73 bytes {2} [built] Child 4 chunks: - Hash: ae9e4a73fc96c164d6f0 + Hash: f7c7c171ed4a3a7adb19 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names - 0.bundle.js 236 bytes 0 [emitted] - 1.bundle.js 245 bytes 1 [emitted] - 2.bundle.js 323 bytes 2 [emitted] - bundle.js 8.28 KiB 3 [emitted] main + 0.bundle.js 254 bytes 0 [emitted] + 1.bundle.js 232 bytes 1 [emitted] + bundle.js 8.28 KiB 2 [emitted] main + 3.bundle.js 323 bytes 3 [emitted] Entrypoint main = bundle.js chunk {0} 0.bundle.js 44 bytes <{2}> <{3}> [rendered] - [0] ./d.js 22 bytes {0} [built] - [2] ./a.js 22 bytes {0} [built] + [1] ./a.js 22 bytes {0} [built] + [4] ./d.js 22 bytes {0} [built] chunk {1} 1.bundle.js 44 bytes <{2}> <{3}> [rendered] - [1] ./e.js 22 bytes {1} [built] - [3] ./b.js 22 bytes {1} [built] - chunk {2} 2.bundle.js 30 bytes <{3}> >{0}< >{1}< [rendered] - [4] ./c.js 30 bytes {2} [built] - chunk {3} bundle.js (main) 73 bytes >{0}< >{1}< >{2}< [entry] [rendered] - [5] ./index.js 73 bytes {3} [built]" + [2] ./b.js 22 bytes {1} [built] + [5] ./e.js 22 bytes {1} [built] + chunk {2} bundle.js (main) 73 bytes >{0}< >{1}< >{3}< [entry] [rendered] + [0] ./index.js 73 bytes {2} [built] + chunk {3} 3.bundle.js 30 bytes <{2}> >{0}< >{1}< [rendered] + [3] ./c.js 30 bytes {3} [built]" `; exports[`StatsTestCases should print correct stats for max-modules 1`] = ` @@ -1268,107 +1268,107 @@ Entrypoint main = main.js `; exports[`StatsTestCases should print correct stats for module-assets 1`] = ` -"Hash: ceae20d6bebac3a4387e +"Hash: bd21dd593eac70b70df9 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Entrypoint main = main.js -chunk {0} 0.js 68 bytes <{1}> [rendered] - [0] ./node_modules/a/1.png 51 bytes {0} [built] [1 asset] - [1] ./node_modules/a/index.js 17 bytes {0} [built] -chunk {1} main.js (main) 12 bytes >{0}< [entry] [rendered] - [2] ./index.js 12 bytes {1} [built] -[0] ./node_modules/a/1.png 51 bytes {0} [built] [1 asset] -[1] ./node_modules/a/index.js 17 bytes {0} [built] -[2] ./index.js 12 bytes {1} [built]" +chunk {0} main.js (main) 12 bytes >{1}< [entry] [rendered] + [0] ./index.js 12 bytes {0} [built] +chunk {1} 1.js 68 bytes <{0}> [rendered] + [1] ./node_modules/a/index.js 17 bytes {1} [built] + [2] ./node_modules/a/1.png 51 bytes {1} [built] [1 asset] +[0] ./index.js 12 bytes {0} [built] +[1] ./node_modules/a/index.js 17 bytes {1} [built] +[2] ./node_modules/a/1.png 51 bytes {1} [built] [1 asset]" `; exports[`StatsTestCases should print correct stats for module-deduplication 1`] = ` "Asset Size Chunks Chunk Names - 0.js 730 bytes 0, 4 [emitted] - 1.js 730 bytes 1, 5 [emitted] - 2.js 730 bytes 2, 3 [emitted] - 3.js 661 bytes 3 [emitted] - 4.js 661 bytes 4 [emitted] - 5.js 661 bytes 5 [emitted] -e1.js 9.42 KiB 6 [emitted] e1 -e2.js 9.44 KiB 7 [emitted] e2 -e3.js 9.46 KiB 8 [emitted] e3 + 0.js 730 bytes 0, 7 [emitted] + 1.js 730 bytes 1, 8 [emitted] + 2.js 730 bytes 2, 6 [emitted] +e1.js 9.42 KiB 3 [emitted] e1 +e2.js 9.44 KiB 4 [emitted] e2 +e3.js 9.46 KiB 5 [emitted] e3 + 6.js 661 bytes 6 [emitted] + 7.js 661 bytes 7 [emitted] + 8.js 661 bytes 8 [emitted] Entrypoint e1 = e1.js Entrypoint e2 = e2.js Entrypoint e3 = e3.js -chunk {0} 0.js 37 bytes <{6}> <{8}> [rendered] - [3] ./f.js 9 bytes {0} {7} [built] - [6] ./async2.js 28 bytes {0} {4} [built] -chunk {1} 1.js 37 bytes <{6}> <{7}> [rendered] - [4] ./h.js 9 bytes {1} {8} [built] - [7] ./async3.js 28 bytes {1} {5} [built] -chunk {2} 2.js 37 bytes <{7}> <{8}> [rendered] - [2] ./d.js 9 bytes {2} {6} [built] - [5] ./async1.js 28 bytes {2} {3} [built] -chunk {3} 3.js 28 bytes <{6}> [rendered] - [5] ./async1.js 28 bytes {2} {3} [built] -chunk {4} 4.js 28 bytes <{7}> [rendered] - [6] ./async2.js 28 bytes {0} {4} [built] -chunk {5} 5.js 28 bytes <{8}> [rendered] - [7] ./async3.js 28 bytes {1} {5} [built] -chunk {6} e1.js (e1) 152 bytes >{0}< >{1}< >{3}< [entry] [rendered] - [0] ./b.js 9 bytes {6} {7} {8} [built] - [1] ./a.js 9 bytes {6} {7} {8} [built] - [2] ./d.js 9 bytes {2} {6} [built] - [8] ./e1.js 116 bytes {6} [built] - [9] ./c.js 9 bytes {6} [built] -chunk {7} e2.js (e2) 152 bytes >{1}< >{2}< >{4}< [entry] [rendered] - [0] ./b.js 9 bytes {6} {7} {8} [built] - [1] ./a.js 9 bytes {6} {7} {8} [built] - [3] ./f.js 9 bytes {0} {7} [built] - [10] ./e2.js 116 bytes {7} [built] - [11] ./e.js 9 bytes {7} [built] -chunk {8} e3.js (e3) 152 bytes >{0}< >{2}< >{5}< [entry] [rendered] - [0] ./b.js 9 bytes {6} {7} {8} [built] - [1] ./a.js 9 bytes {6} {7} {8} [built] - [4] ./h.js 9 bytes {1} {8} [built] - [12] ./e3.js 116 bytes {8} [built] - [13] ./g.js 9 bytes {8} [built]" +chunk {0} 0.js 37 bytes <{3}> <{5}> [rendered] + [3] ./async2.js 28 bytes {0} {7} [built] + [6] ./f.js 9 bytes {0} {4} [built] +chunk {1} 1.js 37 bytes <{3}> <{4}> [rendered] + [4] ./async3.js 28 bytes {1} {8} [built] + [7] ./h.js 9 bytes {1} {5} [built] +chunk {2} 2.js 37 bytes <{4}> <{5}> [rendered] + [2] ./async1.js 28 bytes {2} {6} [built] + [5] ./d.js 9 bytes {2} {3} [built] +chunk {3} e1.js (e1) 152 bytes >{0}< >{1}< >{6}< [entry] [rendered] + [0] ./b.js 9 bytes {3} {4} {5} [built] + [1] ./a.js 9 bytes {3} {4} {5} [built] + [5] ./d.js 9 bytes {2} {3} [built] + [8] ./e1.js 116 bytes {3} [built] + [9] ./c.js 9 bytes {3} [built] +chunk {4} e2.js (e2) 152 bytes >{1}< >{2}< >{7}< [entry] [rendered] + [0] ./b.js 9 bytes {3} {4} {5} [built] + [1] ./a.js 9 bytes {3} {4} {5} [built] + [6] ./f.js 9 bytes {0} {4} [built] + [10] ./e2.js 116 bytes {4} [built] + [11] ./e.js 9 bytes {4} [built] +chunk {5} e3.js (e3) 152 bytes >{0}< >{2}< >{8}< [entry] [rendered] + [0] ./b.js 9 bytes {3} {4} {5} [built] + [1] ./a.js 9 bytes {3} {4} {5} [built] + [7] ./h.js 9 bytes {1} {5} [built] + [12] ./e3.js 116 bytes {5} [built] + [13] ./g.js 9 bytes {5} [built] +chunk {6} 6.js 28 bytes <{3}> [rendered] + [2] ./async1.js 28 bytes {2} {6} [built] +chunk {7} 7.js 28 bytes <{4}> [rendered] + [3] ./async2.js 28 bytes {0} {7} [built] +chunk {8} 8.js 28 bytes <{5}> [rendered] + [4] ./async3.js 28 bytes {1} {8} [built]" `; exports[`StatsTestCases should print correct stats for module-deduplication-named 1`] = ` " Asset Size Chunks Chunk Names -async1.js 818 bytes 0 [emitted] async1 -async2.js 818 bytes 1 [emitted] async2 -async3.js 818 bytes 2 [emitted] async3 - e1.js 9.31 KiB 3 [emitted] e1 - e2.js 9.33 KiB 4 [emitted] e2 - e3.js 9.35 KiB 5 [emitted] e3 + e1.js 9.28 KiB 0 [emitted] e1 + e2.js 9.3 KiB 1 [emitted] e2 + e3.js 9.32 KiB 2 [emitted] e3 +async1.js 820 bytes 3 [emitted] async1 +async2.js 820 bytes 4 [emitted] async2 +async3.js 820 bytes 5 [emitted] async3 Entrypoint e1 = e1.js Entrypoint e2 = e2.js Entrypoint e3 = e3.js -chunk {0} async1.js (async1) 89 bytes <{2}> <{3}> >{1}< [rendered] +chunk {0} e1.js (e1) 144 bytes >{3}< [entry] [rendered] + [0] ./b.js 9 bytes {0} {1} {2} [built] + [1] ./a.js 9 bytes {0} {1} {2} [built] [2] ./d.js 9 bytes {0} {3} [built] - [5] ./async1.js 80 bytes {0} [built] -chunk {1} async2.js (async2) 89 bytes <{0}> <{4}> >{2}< [rendered] + [5] ./e1.js 108 bytes {0} [built] + [6] ./c.js 9 bytes {0} [built] +chunk {1} e2.js (e2) 144 bytes >{4}< [entry] [rendered] + [0] ./b.js 9 bytes {0} {1} {2} [built] + [1] ./a.js 9 bytes {0} {1} {2} [built] [3] ./f.js 9 bytes {1} {4} [built] - [6] ./async2.js 80 bytes {1} [built] -chunk {2} async3.js (async3) 89 bytes <{1}> <{5}> >{0}< [rendered] - [4] ./h.js 9 bytes {2} {5} [built] - [7] ./async3.js 80 bytes {2} [built] -chunk {3} e1.js (e1) 144 bytes >{0}< [entry] [rendered] - [0] ./b.js 9 bytes {3} {4} {5} [built] - [1] ./a.js 9 bytes {3} {4} {5} [built] - [2] ./d.js 9 bytes {0} {3} [built] - [8] ./e1.js 108 bytes {3} [built] - [9] ./c.js 9 bytes {3} [built] -chunk {4} e2.js (e2) 144 bytes >{1}< [entry] [rendered] - [0] ./b.js 9 bytes {3} {4} {5} [built] - [1] ./a.js 9 bytes {3} {4} {5} [built] + [7] ./e2.js 108 bytes {1} [built] + [8] ./e.js 9 bytes {1} [built] +chunk {2} e3.js (e3) 144 bytes >{5}< [entry] [rendered] + [0] ./b.js 9 bytes {0} {1} {2} [built] + [1] ./a.js 9 bytes {0} {1} {2} [built] + [4] ./h.js 9 bytes {2} {5} [built] + [9] ./e3.js 108 bytes {2} [built] + [10] ./g.js 9 bytes {2} [built] +chunk {3} async1.js (async1) 89 bytes <{0}> <{5}> >{4}< [rendered] + [2] ./d.js 9 bytes {0} {3} [built] + [11] ./async1.js 80 bytes {3} [built] +chunk {4} async2.js (async2) 89 bytes <{1}> <{3}> >{5}< [rendered] [3] ./f.js 9 bytes {1} {4} [built] - [10] ./e2.js 108 bytes {4} [built] - [11] ./e.js 9 bytes {4} [built] -chunk {5} e3.js (e3) 144 bytes >{2}< [entry] [rendered] - [0] ./b.js 9 bytes {3} {4} {5} [built] - [1] ./a.js 9 bytes {3} {4} {5} [built] + [12] ./async2.js 80 bytes {4} [built] +chunk {5} async3.js (async3) 89 bytes <{2}> <{4}> >{3}< [rendered] [4] ./h.js 9 bytes {2} {5} [built] - [12] ./e3.js 108 bytes {5} [built] - [13] ./g.js 9 bytes {5} [built]" + [13] ./async3.js 80 bytes {5} [built]" `; exports[`StatsTestCases should print correct stats for module-trace-disabled-in-error 1`] = ` @@ -1402,51 +1402,51 @@ exports[`StatsTestCases should print correct stats for named-chunk-groups 1`] = Chunk Group async-a = async-a~async-b.js async-a.js Chunk Group async-b = async-a~async-b.js async-b.js Chunk Group async-c = vendors.js async-c.js - chunk {0} async-a~async-b.js (async-a~async-b) 133 bytes <{5}> ={1}= ={2}= [rendered] split chunk (cache group: default) (name: async-a~async-b) - > ./a [6] ./index.js 1:0-47 - > ./b [6] ./index.js 2:0-47 - [0] ./shared.js 133 bytes {0} [built] - chunk {1} async-a.js (async-a) 40 bytes <{5}> ={0}= [rendered] - > ./a [6] ./index.js 1:0-47 - [3] ./a.js 40 bytes {1} [built] - chunk {2} async-b.js (async-b) 40 bytes <{5}> ={0}= [rendered] - > ./b [6] ./index.js 2:0-47 - [4] ./b.js 40 bytes {2} [built] - chunk {3} async-c.js (async-c) 45 bytes <{5}> ={4}= [rendered] - > ./c [6] ./index.js 3:0-47 - [5] ./c.js 45 bytes {3} [built] - chunk {4} vendors.js (vendors) 40 bytes <{5}> ={3}= [rendered] split chunk (cache group: vendors) (name: vendors) - > ./c [6] ./index.js 3:0-47 - [1] ./node_modules/x.js 20 bytes {4} [built] - [2] ./node_modules/y.js 20 bytes {4} [built] - chunk {5} main.js (main) 146 bytes >{0}< >{1}< >{2}< >{3}< >{4}< [entry] [rendered] + chunk {0} async-a~async-b.js (async-a~async-b) 133 bytes <{1}> ={2}= ={3}= [rendered] split chunk (cache group: default) (name: async-a~async-b) + > ./a [0] ./index.js 1:0-47 + > ./b [0] ./index.js 2:0-47 + [4] ./shared.js 133 bytes {0} [built] + chunk {1} main.js (main) 146 bytes >{0}< >{2}< >{3}< >{4}< >{5}< [entry] [rendered] > ./ main - [6] ./index.js 146 bytes {5} [built] + [0] ./index.js 146 bytes {1} [built] + chunk {2} async-a.js (async-a) 40 bytes <{1}> ={0}= [rendered] + > ./a [0] ./index.js 1:0-47 + [1] ./a.js 40 bytes {2} [built] + chunk {3} async-b.js (async-b) 40 bytes <{1}> ={0}= [rendered] + > ./b [0] ./index.js 2:0-47 + [2] ./b.js 40 bytes {3} [built] + chunk {4} async-c.js (async-c) 45 bytes <{1}> ={5}= [rendered] + > ./c [0] ./index.js 3:0-47 + [3] ./c.js 45 bytes {4} [built] + chunk {5} vendors.js (vendors) 40 bytes <{1}> ={4}= [rendered] split chunk (cache group: vendors) (name: vendors) + > ./c [0] ./index.js 3:0-47 + [5] ./node_modules/x.js 20 bytes {5} [built] + [6] ./node_modules/y.js 20 bytes {5} [built] Child Entrypoint main = main.js Chunk Group async-a = async-a~async-b.js async-a.js Chunk Group async-b = async-a~async-b.js async-b.js Chunk Group async-c = vendors.js async-c.js - chunk {0} async-a~async-b.js (async-a~async-b) 133 bytes <{5}> ={1}= ={2}= [rendered] split chunk (cache group: default) (name: async-a~async-b) - > ./a [6] ./index.js 1:0-47 - > ./b [6] ./index.js 2:0-47 - [0] ./shared.js 133 bytes {0} [built] - chunk {1} async-a.js (async-a) 40 bytes <{5}> ={0}= [rendered] - > ./a [6] ./index.js 1:0-47 - [3] ./a.js 40 bytes {1} [built] - chunk {2} async-b.js (async-b) 40 bytes <{5}> ={0}= [rendered] - > ./b [6] ./index.js 2:0-47 - [4] ./b.js 40 bytes {2} [built] - chunk {3} async-c.js (async-c) 45 bytes <{5}> ={4}= [rendered] - > ./c [6] ./index.js 3:0-47 - [5] ./c.js 45 bytes {3} [built] - chunk {4} vendors.js (vendors) 40 bytes <{5}> ={3}= [rendered] split chunk (cache group: vendors) (name: vendors) - > ./c [6] ./index.js 3:0-47 - [1] ./node_modules/x.js 20 bytes {4} [built] - [2] ./node_modules/y.js 20 bytes {4} [built] - chunk {5} main.js (main) 146 bytes >{0}< >{1}< >{2}< >{3}< >{4}< [entry] [rendered] + chunk {0} async-a~async-b.js (async-a~async-b) 133 bytes <{1}> ={2}= ={3}= [rendered] split chunk (cache group: default) (name: async-a~async-b) + > ./a [0] ./index.js 1:0-47 + > ./b [0] ./index.js 2:0-47 + [4] ./shared.js 133 bytes {0} [built] + chunk {1} main.js (main) 146 bytes >{0}< >{2}< >{3}< >{4}< >{5}< [entry] [rendered] > ./ main - [6] ./index.js 146 bytes {5} [built]" + [0] ./index.js 146 bytes {1} [built] + chunk {2} async-a.js (async-a) 40 bytes <{1}> ={0}= [rendered] + > ./a [0] ./index.js 1:0-47 + [1] ./a.js 40 bytes {2} [built] + chunk {3} async-b.js (async-b) 40 bytes <{1}> ={0}= [rendered] + > ./b [0] ./index.js 2:0-47 + [2] ./b.js 40 bytes {3} [built] + chunk {4} async-c.js (async-c) 45 bytes <{1}> ={5}= [rendered] + > ./c [0] ./index.js 3:0-47 + [3] ./c.js 45 bytes {4} [built] + chunk {5} vendors.js (vendors) 40 bytes <{1}> ={4}= [rendered] split chunk (cache group: vendors) (name: vendors) + > ./c [0] ./index.js 3:0-47 + [5] ./node_modules/x.js 20 bytes {5} [built] + [6] ./node_modules/y.js 20 bytes {5} [built]" `; exports[`StatsTestCases should print correct stats for named-chunks-plugin 1`] = ` @@ -1464,17 +1464,17 @@ Entrypoint entry = vendor.js entry.js `; exports[`StatsTestCases should print correct stats for named-chunks-plugin-async 1`] = ` -"Hash: 8c348decadc8408ab829 +"Hash: 70179b5d2d5e089a82e9 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names -chunk-containing-__a_js.js 313 bytes chunk-containing-__a_js [emitted] -chunk-containing-__b_js.js 173 bytes chunk-containing-__b_js [emitted] +chunk-containing-__a_js.js 307 bytes chunk-containing-__a_js [emitted] +chunk-containing-__b_js.js 182 bytes chunk-containing-__b_js [emitted] entry.js 8.18 KiB entry [emitted] entry Entrypoint entry = entry.js -[0] ./modules/b.js 22 bytes {chunk-containing-__b_js} [built] -[1] ./modules/a.js 37 bytes {chunk-containing-__a_js} [built] -[2] ./entry.js 47 bytes {entry} [built]" +[0] ./entry.js 47 bytes {entry} [built] +[1] ./modules/b.js 22 bytes {chunk-containing-__b_js} [built] +[2] ./modules/a.js 37 bytes {chunk-containing-__a_js} [built]" `; exports[`StatsTestCases should print correct stats for no-emit-on-errors-plugin-with-child-error 1`] = ` @@ -1500,53 +1500,53 @@ Child child: `; exports[`StatsTestCases should print correct stats for optimize-chunks 1`] = ` -"Hash: 8d1bfb62ba8ed42918d6 +"Hash: 79cd36807b8c3ac6b11e Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names cir1.js 299 bytes 0 [emitted] cir1 - ab.js 183 bytes 1 [emitted] ab - abd.js 268 bytes 2, 1 [emitted] abd - cir2.js 299 bytes 3 [emitted] cir2 - main.js 9.09 KiB 4 [emitted] main + main.js 9.09 KiB 1 [emitted] main + ab.js 183 bytes 2 [emitted] ab + abd.js 250 bytes 3, 2 [emitted] abd + cir2.js 299 bytes 4 [emitted] cir2 ac in ab.js 130 bytes 5 [emitted] ac in ab - chunk.js 190 bytes 6, 5 [emitted] chunk -cir2 from cir1.js 359 bytes 7, 3 [emitted] cir2 from cir1 + chunk.js 212 bytes 6, 5 [emitted] chunk +cir2 from cir1.js 359 bytes 7, 4 [emitted] cir2 from cir1 Entrypoint main = main.js -chunk {0} cir1.js (cir1) 81 bytes <{3}> <{4}> >{7}< [rendered] - > [3] ./circular2.js 1:0-79 - > [3] ./circular2.js 1:0-79 - > [8] ./index.js 13:0-54 - [2] ./circular1.js 81 bytes {0} [built] -chunk {1} ab.js (ab) 0 bytes <{4}> >{5}< [rendered] - > [8] ./index.js 1:0-6:8 - [0] ./modules/a.js 0 bytes {1} {2} [built] - [1] ./modules/b.js 0 bytes {1} {2} [built] -chunk {2} abd.js (abd) 0 bytes <{4}> >{6}< [rendered] - > [8] ./index.js 8:0-11:9 - [0] ./modules/a.js 0 bytes {1} {2} [built] - [1] ./modules/b.js 0 bytes {1} {2} [built] - [5] ./modules/d.js 0 bytes {2} {6} [built] -chunk {3} cir2.js (cir2) 81 bytes <{4}> >{0}< [rendered] - > [8] ./index.js 14:0-54 - [3] ./circular2.js 81 bytes {3} {7} [built] -chunk {4} main.js (main) 523 bytes >{0}< >{1}< >{2}< >{3}< [entry] [rendered] +chunk {0} cir1.js (cir1) 81 bytes <{1}> <{4}> >{7}< [rendered] + > [5] ./index.js 13:0-54 + > [7] ./circular2.js 1:0-79 + > [7] ./circular2.js 1:0-79 + [6] ./circular1.js 81 bytes {0} [built] +chunk {1} main.js (main) 523 bytes >{0}< >{2}< >{3}< >{4}< [entry] [rendered] > ./index main - [4] ./modules/f.js 0 bytes {4} [built] - [8] ./index.js 523 bytes {4} [built] -chunk {5} ac in ab.js (ac in ab) 0 bytes <{1}> >{6}< [rendered] - > [8] ./index.js 2:1-5:15 - [6] ./modules/c.js 0 bytes {5} {6} [built] -chunk {6} chunk.js (chunk) 0 bytes <{2}> <{5}> [rendered] - > [8] ./index.js 3:2-4:13 - > [8] ./index.js 9:1-10:12 - [5] ./modules/d.js 0 bytes {2} {6} [built] - [6] ./modules/c.js 0 bytes {5} {6} [built] + [2] ./modules/f.js 0 bytes {1} [built] + [5] ./index.js 523 bytes {1} [built] +chunk {2} ab.js (ab) 0 bytes <{1}> >{5}< [rendered] + > [5] ./index.js 1:0-6:8 + [0] ./modules/a.js 0 bytes {2} {3} [built] + [1] ./modules/b.js 0 bytes {2} {3} [built] +chunk {3} abd.js (abd) 0 bytes <{1}> >{6}< [rendered] + > [5] ./index.js 8:0-11:9 + [0] ./modules/a.js 0 bytes {2} {3} [built] + [1] ./modules/b.js 0 bytes {2} {3} [built] + [3] ./modules/d.js 0 bytes {3} {6} [built] +chunk {4} cir2.js (cir2) 81 bytes <{1}> >{0}< [rendered] + > [5] ./index.js 14:0-54 + [7] ./circular2.js 81 bytes {4} {7} [built] +chunk {5} ac in ab.js (ac in ab) 0 bytes <{2}> >{6}< [rendered] + > [5] ./index.js 2:1-5:15 + [4] ./modules/c.js 0 bytes {5} {6} [built] +chunk {6} chunk.js (chunk) 0 bytes <{3}> <{5}> [rendered] + > [5] ./index.js 3:2-4:13 + > [5] ./index.js 9:1-10:12 + [3] ./modules/d.js 0 bytes {3} {6} [built] + [4] ./modules/c.js 0 bytes {5} {6} [built] chunk {7} cir2 from cir1.js (cir2 from cir1) 81 bytes <{0}> [rendered] - > [2] ./circular1.js 1:0-79 - > [2] ./circular1.js 1:0-79 - [3] ./circular2.js 81 bytes {3} {7} [built] - [7] ./modules/e.js 0 bytes {7} [built]" + > [6] ./circular1.js 1:0-79 + > [6] ./circular1.js 1:0-79 + [7] ./circular2.js 81 bytes {4} {7} [built] + [8] ./modules/e.js 0 bytes {7} [built]" `; exports[`StatsTestCases should print correct stats for parse-error 1`] = ` @@ -1679,34 +1679,34 @@ exports[`StatsTestCases should print correct stats for performance-disabled 1`] "Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names - 0.js 152 bytes 0 [emitted] - 1.js 289 bytes 1 [emitted] -main.js 301 KiB 2 [emitted] main - 3.js 227 bytes 3 [emitted] +main.js 301 KiB 0 [emitted] main + 1.js 152 bytes 1 [emitted] + 2.js 289 bytes 2 [emitted] + 3.js 232 bytes 3 [emitted] Entrypoint main = main.js -[0] ./d.js 22 bytes {3} [built] -[1] ./e.js 22 bytes {3} [built] -[2] ./b.js 22 bytes {0} [built] -[3] ./c.js 54 bytes {1} [built] -[4] ./index.js 52 bytes {2} [built] -[5] ./a.js 293 KiB {2} [built]" +[0] ./index.js 52 bytes {0} [built] +[1] ./a.js 293 KiB {0} [built] +[2] ./b.js 22 bytes {1} [built] +[3] ./c.js 54 bytes {2} [built] +[4] ./d.js 22 bytes {3} [built] +[5] ./e.js 22 bytes {3} [built]" `; exports[`StatsTestCases should print correct stats for performance-error 1`] = ` "Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names - 0.js 152 bytes 0 [emitted] - 1.js 289 bytes 1 [emitted] -main.js 301 KiB 2 [emitted] [big] main - 3.js 227 bytes 3 [emitted] +main.js 301 KiB 0 [emitted] [big] main + 1.js 152 bytes 1 [emitted] + 2.js 289 bytes 2 [emitted] + 3.js 232 bytes 3 [emitted] Entrypoint main [big] = main.js -[0] ./d.js 22 bytes {3} [built] -[1] ./e.js 22 bytes {3} [built] -[2] ./b.js 22 bytes {0} [built] -[3] ./c.js 54 bytes {1} [built] -[4] ./index.js 52 bytes {2} [built] -[5] ./a.js 293 KiB {2} [built] +[0] ./index.js 52 bytes {0} [built] +[1] ./a.js 293 KiB {0} [built] +[2] ./b.js 22 bytes {1} [built] +[3] ./c.js 54 bytes {2} [built] +[4] ./d.js 22 bytes {3} [built] +[5] ./e.js 22 bytes {3} [built] ERROR in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). This can impact web performance. @@ -1755,17 +1755,17 @@ exports[`StatsTestCases should print correct stats for performance-no-hints 1`] "Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names - 0.js 152 bytes 0 [emitted] - 1.js 289 bytes 1 [emitted] -main.js 301 KiB 2 [emitted] [big] main - 3.js 227 bytes 3 [emitted] +main.js 301 KiB 0 [emitted] [big] main + 1.js 152 bytes 1 [emitted] + 2.js 289 bytes 2 [emitted] + 3.js 232 bytes 3 [emitted] Entrypoint main [big] = main.js -[0] ./d.js 22 bytes {3} [built] -[1] ./e.js 22 bytes {3} [built] -[2] ./b.js 22 bytes {0} [built] -[3] ./c.js 54 bytes {1} [built] -[4] ./index.js 52 bytes {2} [built] -[5] ./a.js 293 KiB {2} [built]" +[0] ./index.js 52 bytes {0} [built] +[1] ./a.js 293 KiB {0} [built] +[2] ./b.js 22 bytes {1} [built] +[3] ./c.js 54 bytes {2} [built] +[4] ./d.js 22 bytes {3} [built] +[5] ./e.js 22 bytes {3} [built]" `; exports[`StatsTestCases should print correct stats for performance-oversize-limit-error 1`] = ` @@ -1801,85 +1801,85 @@ For more info visit https://webpack.js.org/guides/code-splitting/" exports[`StatsTestCases should print correct stats for prefetch 1`] = ` " Asset Size Chunks Chunk Names - prefetched.js 475 bytes 0 [emitted] prefetched - normal.js 130 bytes 1 [emitted] normal -prefetched2.js 127 bytes 2 [emitted] prefetched2 -prefetched3.js 130 bytes 3 [emitted] prefetched3 - main.js 9.66 KiB 4 [emitted] main - inner.js 136 bytes 5 [emitted] inner - inner2.js 201 bytes 6 [emitted] inner2 + main.js 9.66 KiB 0 [emitted] main + prefetched.js 475 bytes 1 [emitted] prefetched + normal.js 130 bytes 2 [emitted] normal +prefetched2.js 127 bytes 3 [emitted] prefetched2 +prefetched3.js 130 bytes 4 [emitted] prefetched3 + inner.js 130 bytes 5 [emitted] inner + inner2.js 188 bytes 6 [emitted] inner2 Entrypoint main = main.js (prefetch: prefetched2.js prefetched.js prefetched3.js) -chunk {0} prefetched.js (prefetched) 228 bytes <{4}> >{5}< >{6}< (prefetch: {6} {5}) [rendered] -chunk {1} normal.js (normal) 0 bytes <{4}> [rendered] -chunk {2} prefetched2.js (prefetched2) 0 bytes <{4}> [rendered] -chunk {3} prefetched3.js (prefetched3) 0 bytes <{4}> [rendered] -chunk {4} main.js (main) 436 bytes >{0}< >{1}< >{2}< >{3}< (prefetch: {2} {0} {3}) [entry] [rendered] -chunk {5} inner.js (inner) 0 bytes <{0}> [rendered] -chunk {6} inner2.js (inner2) 0 bytes <{0}> [rendered]" +chunk {0} main.js (main) 436 bytes >{1}< >{2}< >{3}< >{4}< (prefetch: {3} {1} {4}) [entry] [rendered] +chunk {1} prefetched.js (prefetched) 228 bytes <{0}> >{5}< >{6}< (prefetch: {6} {5}) [rendered] +chunk {2} normal.js (normal) 0 bytes <{0}> [rendered] +chunk {3} prefetched2.js (prefetched2) 0 bytes <{0}> [rendered] +chunk {4} prefetched3.js (prefetched3) 0 bytes <{0}> [rendered] +chunk {5} inner.js (inner) 0 bytes <{1}> [rendered] +chunk {6} inner2.js (inner2) 0 bytes <{1}> [rendered]" `; exports[`StatsTestCases should print correct stats for prefetch-preload-mixed 1`] = ` -"chunk {0} a.js (a) 136 bytes <{3}> >{4}< >{5}< (prefetch: {4} {5}) [rendered] -chunk {1} b.js (b) 203 bytes <{3}> >{6}< >{7}< >{8}< (prefetch: {6} {8}) (preload: {7}) [rendered] -chunk {2} c.js (c) 134 bytes <{3}> >{9}< >{10}< (preload: {9} {10}) [rendered] -chunk {3} main.js (main) 195 bytes >{0}< >{1}< >{2}< (prefetch: {0} {1} {2}) [entry] [rendered] -chunk {4} a1.js (a1) 0 bytes <{0}> [rendered] -chunk {5} a2.js (a2) 0 bytes <{0}> [rendered] -chunk {6} b1.js (b1) 0 bytes <{1}> [rendered] -chunk {7} b2.js (b2) 0 bytes <{1}> [rendered] -chunk {8} b3.js (b3) 0 bytes <{1}> [rendered] -chunk {9} c1.js (c1) 0 bytes <{2}> [rendered] -chunk {10} c2.js (c2) 0 bytes <{2}> [rendered]" +"chunk {0} main.js (main) 195 bytes >{1}< >{2}< >{3}< (prefetch: {1} {2} {3}) [entry] [rendered] +chunk {1} a.js (a) 136 bytes <{0}> >{4}< >{5}< (prefetch: {4} {5}) [rendered] +chunk {2} b.js (b) 203 bytes <{0}> >{6}< >{7}< >{8}< (prefetch: {6} {8}) (preload: {7}) [rendered] +chunk {3} c.js (c) 134 bytes <{0}> >{9}< >{10}< (preload: {9} {10}) [rendered] +chunk {4} a1.js (a1) 0 bytes <{1}> [rendered] +chunk {5} a2.js (a2) 0 bytes <{1}> [rendered] +chunk {6} b1.js (b1) 0 bytes <{2}> [rendered] +chunk {7} b2.js (b2) 0 bytes <{2}> [rendered] +chunk {8} b3.js (b3) 0 bytes <{2}> [rendered] +chunk {9} c1.js (c1) 0 bytes <{3}> [rendered] +chunk {10} c2.js (c2) 0 bytes <{3}> [rendered]" `; exports[`StatsTestCases should print correct stats for preload 1`] = ` " Asset Size Chunks Chunk Names - preloaded.js 467 bytes 0 [emitted] preloaded - normal.js 130 bytes 1 [emitted] normal -preloaded2.js 127 bytes 2 [emitted] preloaded2 -preloaded3.js 130 bytes 3 [emitted] preloaded3 - main.js 9.86 KiB 4 [emitted] main - inner.js 136 bytes 5 [emitted] inner - inner2.js 201 bytes 6 [emitted] inner2 + main.js 9.87 KiB 0 [emitted] main + preloaded.js 467 bytes 1 [emitted] preloaded + normal.js 130 bytes 2 [emitted] normal +preloaded2.js 127 bytes 3 [emitted] preloaded2 +preloaded3.js 130 bytes 4 [emitted] preloaded3 + inner.js 130 bytes 5 [emitted] inner + inner2.js 188 bytes 6 [emitted] inner2 Entrypoint main = main.js (preload: preloaded2.js preloaded.js preloaded3.js) -chunk {0} preloaded.js (preloaded) 226 bytes <{4}> >{5}< >{6}< (preload: {6} {5}) [rendered] -chunk {1} normal.js (normal) 0 bytes <{4}> [rendered] -chunk {2} preloaded2.js (preloaded2) 0 bytes <{4}> [rendered] -chunk {3} preloaded3.js (preloaded3) 0 bytes <{4}> [rendered] -chunk {4} main.js (main) 424 bytes >{0}< >{1}< >{2}< >{3}< (preload: {2} {0} {3}) [entry] [rendered] -chunk {5} inner.js (inner) 0 bytes <{0}> [rendered] -chunk {6} inner2.js (inner2) 0 bytes <{0}> [rendered]" +chunk {0} main.js (main) 424 bytes >{1}< >{2}< >{3}< >{4}< (preload: {3} {1} {4}) [entry] [rendered] +chunk {1} preloaded.js (preloaded) 226 bytes <{0}> >{5}< >{6}< (preload: {6} {5}) [rendered] +chunk {2} normal.js (normal) 0 bytes <{0}> [rendered] +chunk {3} preloaded2.js (preloaded2) 0 bytes <{0}> [rendered] +chunk {4} preloaded3.js (preloaded3) 0 bytes <{0}> [rendered] +chunk {5} inner.js (inner) 0 bytes <{1}> [rendered] +chunk {6} inner2.js (inner2) 0 bytes <{1}> [rendered]" `; exports[`StatsTestCases should print correct stats for preset-detailed 1`] = ` -"Hash: d0fce43b3c0175d4cc8a +"Hash: 437c9384ca68c9e15b6c Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names - 0.js 152 bytes 0 [emitted] - 1.js 289 bytes 1 [emitted] -main.js 8.29 KiB 2 [emitted] main - 3.js 227 bytes 3 [emitted] +main.js 8.29 KiB 0 [emitted] main + 1.js 152 bytes 1 [emitted] + 2.js 289 bytes 2 [emitted] + 3.js 232 bytes 3 [emitted] Entrypoint main = main.js -chunk {0} 0.js 22 bytes <{2}> [rendered] - > ./b [4] ./index.js 2:0-16 -chunk {1} 1.js 54 bytes <{2}> >{3}< [rendered] - > ./c [4] ./index.js 3:0-16 -chunk {2} main.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] +chunk {0} main.js (main) 73 bytes >{1}< >{2}< [entry] [rendered] > ./index main -chunk {3} 3.js 44 bytes <{1}> [rendered] +chunk {1} 1.js 22 bytes <{0}> [rendered] + > ./b [0] ./index.js 2:0-16 +chunk {2} 2.js 54 bytes <{0}> >{3}< [rendered] + > ./c [0] ./index.js 3:0-16 +chunk {3} 3.js 44 bytes <{2}> [rendered] > [3] ./c.js 1:0-52 -[0] ./d.js 22 bytes {3} [depth 2] [built] +[0] ./index.js 51 bytes {0} [depth 0] [built] ModuleConcatenation bailout: Module is not an ECMAScript module -[1] ./e.js 22 bytes {3} [depth 2] [built] +[1] ./a.js 22 bytes {0} [depth 1] [built] ModuleConcatenation bailout: Module is not an ECMAScript module -[2] ./b.js 22 bytes {0} [depth 1] [built] +[2] ./b.js 22 bytes {1} [depth 1] [built] ModuleConcatenation bailout: Module is not an ECMAScript module -[3] ./c.js 54 bytes {1} [depth 1] [built] +[3] ./c.js 54 bytes {2} [depth 1] [built] ModuleConcatenation bailout: Module is not an ECMAScript module -[4] ./index.js 51 bytes {2} [depth 0] [built] +[4] ./d.js 22 bytes {3} [depth 2] [built] ModuleConcatenation bailout: Module is not an ECMAScript module -[5] ./a.js 22 bytes {2} [depth 1] [built] +[5] ./e.js 22 bytes {3} [depth 2] [built] ModuleConcatenation bailout: Module is not an ECMAScript module" `; @@ -1911,38 +1911,38 @@ exports[`StatsTestCases should print correct stats for preset-none-array 1`] = ` exports[`StatsTestCases should print correct stats for preset-none-error 1`] = `""`; exports[`StatsTestCases should print correct stats for preset-normal 1`] = ` -"Hash: d0fce43b3c0175d4cc8a +"Hash: 437c9384ca68c9e15b6c Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names - 0.js 152 bytes 0 [emitted] - 1.js 289 bytes 1 [emitted] -main.js 8.29 KiB 2 [emitted] main - 3.js 227 bytes 3 [emitted] +main.js 8.29 KiB 0 [emitted] main + 1.js 152 bytes 1 [emitted] + 2.js 289 bytes 2 [emitted] + 3.js 232 bytes 3 [emitted] Entrypoint main = main.js -[0] ./d.js 22 bytes {3} [built] -[1] ./e.js 22 bytes {3} [built] -[2] ./b.js 22 bytes {0} [built] -[3] ./c.js 54 bytes {1} [built] -[4] ./index.js 51 bytes {2} [built] -[5] ./a.js 22 bytes {2} [built]" +[0] ./index.js 51 bytes {0} [built] +[1] ./a.js 22 bytes {0} [built] +[2] ./b.js 22 bytes {1} [built] +[3] ./c.js 54 bytes {2} [built] +[4] ./d.js 22 bytes {3} [built] +[5] ./e.js 22 bytes {3} [built]" `; exports[`StatsTestCases should print correct stats for preset-normal-performance 1`] = ` "Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names - 0.js 152 bytes 0 [emitted] - 1.js 289 bytes 1 [emitted] -main.js 301 KiB 2 [emitted] [big] main - 3.js 227 bytes 3 [emitted] +main.js 301 KiB 0 [emitted] [big] main + 1.js 152 bytes 1 [emitted] + 2.js 289 bytes 2 [emitted] + 3.js 232 bytes 3 [emitted] Entrypoint main [big] = main.js -[0] ./d.js 22 bytes {3} [built] -[1] ./e.js 22 bytes {3} [built] -[2] ./b.js 22 bytes {0} [built] -[3] ./c.js 54 bytes {1} [built] -[4] ./index.js 52 bytes {2} [built] -[5] ./a.js 293 KiB {2} [built] +[0] ./index.js 52 bytes {0} [built] +[1] ./a.js 293 KiB {0} [built] +[2] ./b.js 22 bytes {1} [built] +[3] ./c.js 54 bytes {2} [built] +[4] ./d.js 22 bytes {3} [built] +[5] ./e.js 22 bytes {3} [built] WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). This can impact web performance. @@ -1960,21 +1960,21 @@ exports[`StatsTestCases should print correct stats for preset-normal-performance "Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names - 0.js 182 bytes 0 [emitted] - 1.js 319 bytes 1 [emitted] - main.js 301 KiB 2 [emitted] [big] main - 3.js 257 bytes 3 [emitted] - 0.js.map 156 bytes 0 [emitted] - 1.js.map 197 bytes 1 [emitted] -main.js.map 1.72 MiB 2 [emitted] main - 3.js.map 214 bytes 3 [emitted] + main.js 301 KiB 0 [emitted] [big] main + 1.js 182 bytes 1 [emitted] + 2.js 319 bytes 2 [emitted] + 3.js 262 bytes 3 [emitted] +main.js.map 1.72 MiB 0 [emitted] main + 1.js.map 156 bytes 1 [emitted] + 2.js.map 197 bytes 2 [emitted] + 3.js.map 216 bytes 3 [emitted] Entrypoint main [big] = main.js main.js.map -[0] ./d.js 22 bytes {3} [built] -[1] ./e.js 22 bytes {3} [built] -[2] ./b.js 22 bytes {0} [built] -[3] ./c.js 54 bytes {1} [built] -[4] ./index.js 52 bytes {2} [built] -[5] ./a.js 293 KiB {2} [built] +[0] ./index.js 52 bytes {0} [built] +[1] ./a.js 293 KiB {0} [built] +[2] ./b.js 22 bytes {1} [built] +[3] ./c.js 54 bytes {2} [built] +[4] ./d.js 22 bytes {3} [built] +[5] ./e.js 22 bytes {3} [built] WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). This can impact web performance. @@ -1989,47 +1989,47 @@ Entrypoints: `; exports[`StatsTestCases should print correct stats for preset-verbose 1`] = ` -"Hash: d0fce43b3c0175d4cc8a +"Hash: 437c9384ca68c9e15b6c Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names - 0.js 152 bytes 0 [emitted] - 1.js 289 bytes 1 [emitted] -main.js 8.29 KiB 2 [emitted] main - 3.js 227 bytes 3 [emitted] +main.js 8.29 KiB 0 [emitted] main + 1.js 152 bytes 1 [emitted] + 2.js 289 bytes 2 [emitted] + 3.js 232 bytes 3 [emitted] Entrypoint main = main.js -chunk {0} 0.js 22 bytes <{2}> [rendered] - > ./b [4] ./index.js 2:0-16 - [2] ./b.js 22 bytes {0} [depth 1] [built] - ModuleConcatenation bailout: Module is not an ECMAScript module - amd require ./b [4] ./index.js 2:0-16 - [4] Xms -> factory:Xms building:Xms = Xms -chunk {1} 1.js 54 bytes <{2}> >{3}< [rendered] - > ./c [4] ./index.js 3:0-16 - [3] ./c.js 54 bytes {1} [depth 1] [built] - ModuleConcatenation bailout: Module is not an ECMAScript module - amd require ./c [4] ./index.js 3:0-16 - [4] Xms -> factory:Xms building:Xms = Xms -chunk {2} main.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] +chunk {0} main.js (main) 73 bytes >{1}< >{2}< [entry] [rendered] > ./index main - [4] ./index.js 51 bytes {2} [depth 0] [built] + [0] ./index.js 51 bytes {0} [depth 0] [built] ModuleConcatenation bailout: Module is not an ECMAScript module single entry ./index main factory:Xms building:Xms = Xms - [5] ./a.js 22 bytes {2} [depth 1] [built] + [1] ./a.js 22 bytes {0} [depth 1] [built] + ModuleConcatenation bailout: Module is not an ECMAScript module + cjs require ./a [0] ./index.js 1:0-14 + [0] Xms -> factory:Xms building:Xms = Xms +chunk {1} 1.js 22 bytes <{0}> [rendered] + > ./b [0] ./index.js 2:0-16 + [2] ./b.js 22 bytes {1} [depth 1] [built] + ModuleConcatenation bailout: Module is not an ECMAScript module + amd require ./b [0] ./index.js 2:0-16 + [0] Xms -> factory:Xms building:Xms = Xms +chunk {2} 2.js 54 bytes <{0}> >{3}< [rendered] + > ./c [0] ./index.js 3:0-16 + [3] ./c.js 54 bytes {2} [depth 1] [built] ModuleConcatenation bailout: Module is not an ECMAScript module - cjs require ./a [4] ./index.js 1:0-14 - [4] Xms -> factory:Xms building:Xms = Xms -chunk {3} 3.js 44 bytes <{1}> [rendered] + amd require ./c [0] ./index.js 3:0-16 + [0] Xms -> factory:Xms building:Xms = Xms +chunk {3} 3.js 44 bytes <{2}> [rendered] > [3] ./c.js 1:0-52 - [0] ./d.js 22 bytes {3} [depth 2] [built] + [4] ./d.js 22 bytes {3} [depth 2] [built] ModuleConcatenation bailout: Module is not an ECMAScript module require.ensure item ./d [3] ./c.js 1:0-52 - [4] Xms -> [3] Xms -> factory:Xms building:Xms = Xms - [1] ./e.js 22 bytes {3} [depth 2] [built] + [0] Xms -> [3] Xms -> factory:Xms building:Xms = Xms + [5] ./e.js 22 bytes {3} [depth 2] [built] ModuleConcatenation bailout: Module is not an ECMAScript module require.ensure item ./e [3] ./c.js 1:0-52 - [4] Xms -> [3] Xms -> factory:Xms building:Xms = Xms" + [0] Xms -> [3] Xms -> factory:Xms building:Xms = Xms" `; exports[`StatsTestCases should print correct stats for resolve-plugin-context 1`] = ` @@ -2084,26 +2084,26 @@ Entrypoint e2 = runtime~e2.js e2.js" exports[`StatsTestCases should print correct stats for runtime-chunk-integration 1`] = ` "Child base: Asset Size Chunks Chunk Names - 0.js 719 bytes 0 [emitted] - main1.js 542 bytes 1 [emitted] main1 + 0.js 728 bytes 0 [emitted] + main1.js 539 bytes 1 [emitted] main1 runtime.js 8.75 KiB 2 [emitted] runtime Entrypoint main1 = runtime.js main1.js - [0] ./b.js 20 bytes {0} [built] - [1] ./c.js 20 bytes {0} [built] - [2] ./d.js 20 bytes {0} [built] - [3] ./main1.js 66 bytes {1} [built] + [0] ./main1.js 66 bytes {1} [built] + [1] ./b.js 20 bytes {0} [built] + [2] ./c.js 20 bytes {0} [built] + [3] ./d.js 20 bytes {0} [built] Child manifest is named entry: Asset Size Chunks Chunk Names - 0.js 719 bytes 0 [emitted] + 0.js 737 bytes 0 [emitted] manifest.js 9.06 KiB 1 [emitted] manifest - main1.js 542 bytes 2 [emitted] main1 + main1.js 539 bytes 2 [emitted] main1 Entrypoint main1 = manifest.js main1.js Entrypoint manifest = manifest.js - [0] ./b.js 20 bytes {0} [built] - [1] ./c.js 20 bytes {0} [built] - [2] ./d.js 20 bytes {0} [built] - [3] ./main1.js 66 bytes {2} [built] - [4] ./f.js 20 bytes {1} [built]" + [0] ./main1.js 66 bytes {2} [built] + [1] ./f.js 20 bytes {1} [built] + [2] ./b.js 20 bytes {0} [built] + [3] ./c.js 20 bytes {0} [built] + [4] ./d.js 20 bytes {0} [built]" `; exports[`StatsTestCases should print correct stats for runtime-chunk-issue-7382 1`] = ` @@ -2117,131 +2117,131 @@ Entrypoint e2 = runtime.js e2.js" `; exports[`StatsTestCases should print correct stats for scope-hoisting-bailouts 1`] = ` -"Hash: 900e01719757ad40b4ee +"Hash: 38ac43ee32f96265a6e0 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Entrypoint index = index.js Entrypoint entry = entry.js -[0] ./entry.js 32 bytes {1} {2} [built] +[0] ./entry.js 32 bytes {0} {1} [built] ModuleConcatenation bailout: Module is an entry point -[1] ./ref-from-cjs.js 45 bytes {1} [built] +[1] ./ref-from-cjs.js 45 bytes {0} [built] ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./cjs.js (referenced with cjs require) -[2] external \\"external\\" 42 bytes {1} [built] - ModuleConcatenation bailout: Module is not an ECMAScript module -[3] ./concatenated.js + 2 modules 116 bytes {0} [built] - ModuleConcatenation bailout: Cannot concat with external \\"external\\" (<- Module is not an ECMAScript module) - | ./concatenated.js 26 bytes [built] - | ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./index.js (referenced with import()) - | ./concatenated1.js 37 bytes [built] - | ./concatenated2.js 48 bytes [built] -[4] ./index.js 176 bytes {1} [built] +[2] ./index.js 176 bytes {0} [built] ModuleConcatenation bailout: Module is an entry point -[5] ./cjs.js 59 bytes {1} [built] +[3] ./cjs.js 59 bytes {0} [built] ModuleConcatenation bailout: Module is not an ECMAScript module -[6] ./eval.js 35 bytes {1} [built] +[4] ./eval.js 35 bytes {0} [built] ModuleConcatenation bailout: Module uses eval() -[7] ./injected-vars.js 40 bytes {1} [built] +[5] ./injected-vars.js 40 bytes {0} [built] ModuleConcatenation bailout: Module uses injected variables (__dirname, __filename) -[8] ./module-id.js 26 bytes {1} [built] +[6] ./module-id.js 26 bytes {0} [built] ModuleConcatenation bailout: Module uses module.id -[9] ./module-loaded.js 30 bytes {1} [built] - ModuleConcatenation bailout: Module uses module.loaded" +[7] ./module-loaded.js 30 bytes {0} [built] + ModuleConcatenation bailout: Module uses module.loaded +[8] external \\"external\\" 42 bytes {0} [built] + ModuleConcatenation bailout: Module is not an ECMAScript module +[9] ./concatenated.js + 2 modules 116 bytes {2} [built] + ModuleConcatenation bailout: Cannot concat with external \\"external\\" (<- Module is not an ECMAScript module) + | ./concatenated.js 26 bytes [built] + | ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./index.js (referenced with import()) + | ./concatenated1.js 37 bytes [built] + | ./concatenated2.js 48 bytes [built]" `; exports[`StatsTestCases should print correct stats for scope-hoisting-multi 1`] = ` -"Hash: 4fe44d37d6d451751f0a83f3311f89e78104b088 +"Hash: 62dc20c341a326c0983423541003173315bf485b Child - Hash: 4fe44d37d6d451751f0a + Hash: 62dc20c341a326c09834 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Entrypoint first = vendor.js first.js Entrypoint second = vendor.js second.js - [0] ./common_lazy_shared.js 25 bytes {0} {1} {2} [built] - [1] ./common2.js 25 bytes {4} {5} [built] - [2] ./common_lazy.js 25 bytes {1} {2} [built] - [3] ./common.js 37 bytes {4} {5} [built] - [4] ./lazy_shared.js 31 bytes {0} [built] - [5] ./vendor.js 25 bytes {3} [built] - [6] ./lazy_first.js 55 bytes {1} [built] - [7] ./lazy_second.js 55 bytes {2} [built] - [8] ./first.js 207 bytes {4} [built] - [9] ./module_first.js 31 bytes {4} [built] - [10] ./second.js 177 bytes {5} [built] + [0] ./common2.js 25 bytes {1} {2} [built] + [1] ./common.js 37 bytes {1} {2} [built] + [2] ./vendor.js 25 bytes {0} [built] + [3] ./lazy_shared.js 31 bytes {4} [built] + [4] ./first.js 207 bytes {1} [built] + [5] ./module_first.js 31 bytes {1} [built] + [6] ./second.js 177 bytes {2} [built] + [7] ./lazy_first.js 55 bytes {3} [built] + [8] ./lazy_second.js 55 bytes {5} [built] + [9] ./common_lazy_shared.js 25 bytes {3} {4} {5} [built] + [10] ./common_lazy.js 25 bytes {3} {5} [built] Child - Hash: 83f3311f89e78104b088 + Hash: 23541003173315bf485b Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Entrypoint first = vendor.js first.js Entrypoint second = vendor.js second.js - [0] ./common_lazy_shared.js 25 bytes {0} {1} {2} [built] - [1] ./common_lazy.js 25 bytes {1} {2} [built] - [2] ./common.js + 1 modules 62 bytes {4} {5} [built] + [0] ./common.js + 1 modules 62 bytes {1} {2} [built] | ./common.js 37 bytes [built] | ./common2.js 25 bytes [built] - [3] ./vendor.js 25 bytes {3} [built] - [4] ./lazy_shared.js 31 bytes {0} [built] - ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./first.js (referenced with import()), ./second.js (referenced with import()) - [5] ./lazy_second.js 55 bytes {2} [built] - ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./second.js (referenced with import()) - [6] ./second.js 177 bytes {5} [built] + [1] ./vendor.js 25 bytes {0} [built] + [2] ./second.js 177 bytes {2} [built] ModuleConcatenation bailout: Module is an entry point - [7] ./first.js + 1 modules 248 bytes {4} [built] + [3] ./common_lazy_shared.js 25 bytes {3} {4} {5} [built] + [4] ./common_lazy.js 25 bytes {3} {5} [built] + [5] ./lazy_shared.js 31 bytes {4} [built] + ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./first.js (referenced with import()), ./second.js (referenced with import()) + [6] ./first.js + 1 modules 248 bytes {1} [built] ModuleConcatenation bailout: Cannot concat with ./common.js ModuleConcatenation bailout: Cannot concat with ./vendor.js | ./first.js 207 bytes [built] | ModuleConcatenation bailout: Module is an entry point | ./module_first.js 31 bytes [built] - [8] ./lazy_first.js 55 bytes {1} [built] + [7] ./lazy_second.js 55 bytes {5} [built] + ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./second.js (referenced with import()) + [8] ./lazy_first.js 55 bytes {3} [built] ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./first.js (referenced with import())" `; exports[`StatsTestCases should print correct stats for side-effects-issue-7428 1`] = ` -"Hash: a9b58d04269fe092c240 +"Hash: 4981ff1831c58ef47c99 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names - 0.js 481 bytes 0 [emitted] -main.js 9.32 KiB 1 [emitted] main +main.js 9.35 KiB 0 [emitted] main + 1.js 481 bytes 1 [emitted] Entrypoint main = main.js -[0] ./components/src/CompAB/utils.js 97 bytes {1} [built] - harmony side effect evaluation ./utils [1] ./main.js + 1 modules 1:0-30 - harmony import specifier ./utils [1] ./main.js + 1 modules 5:2-5 +[0] ./components/src/CompAB/index.js 87 bytes [built] + [no exports used] + harmony side effect evaluation ./CompAB [3] ./components/src/index.js 1:0-40 + harmony export imported specifier ./CompAB [3] ./components/src/index.js 1:0-40 + harmony export imported specifier ./CompAB [3] ./components/src/index.js 1:0-40 +[1] ./components/src/CompC/CompC.js 33 bytes [built] + [no exports used] + harmony side effect evaluation ./CompC [2] ./components/src/CompC/index.js 1:0-34 + harmony export imported specifier ./CompC [2] ./components/src/CompC/index.js 1:0-34 +[2] ./components/src/CompC/index.js 34 bytes [built] + [no exports used] + harmony side effect evaluation ./CompC [3] ./components/src/index.js 2:0-43 + harmony export imported specifier ./CompC [3] ./components/src/index.js 2:0-43 +[3] ./components/src/index.js 84 bytes [built] + [no exports used] + harmony side effect evaluation ./components [6] ./foo.js 1:0-37 + harmony side effect evaluation ./components [7] ./main.js + 1 modules 1:0-44 +[4] ./components/src/CompAB/CompA.js 89 bytes {0} [built] + [only some exports used: default] + harmony side effect evaluation ./CompA [0] ./components/src/CompAB/index.js 1:0-43 + harmony export imported specifier ./CompA [0] ./components/src/CompAB/index.js 1:0-43 + harmony import specifier ./components ./main.js 3:15-20 (skipped side-effect-free modules) + harmony import specifier ./components [6] ./foo.js 3:20-25 (skipped side-effect-free modules) +[5] ./components/src/CompAB/utils.js 97 bytes {0} [built] harmony side effect evaluation ./utils [4] ./components/src/CompAB/CompA.js 1:0-35 harmony import specifier ./utils [4] ./components/src/CompAB/CompA.js 5:5-12 -[1] ./main.js + 1 modules 231 bytes {1} [built] + harmony side effect evaluation ./utils [7] ./main.js + 1 modules 1:0-30 + harmony import specifier ./utils [7] ./main.js + 1 modules 5:2-5 +[6] ./foo.js 101 bytes {1} [built] + import() ./foo ./main.js 6:0-15 +[7] ./main.js + 1 modules 231 bytes {0} [built] single entry ./main.js main | ./main.js 144 bytes [built] | single entry ./main.js main | ./components/src/CompAB/CompB.js 77 bytes [built] | [only some exports used: default] - | harmony side effect evaluation ./CompB [7] ./components/src/CompAB/index.js 2:0-43 - | harmony export imported specifier ./CompB [7] ./components/src/CompAB/index.js 2:0-43 - | harmony import specifier ./components ./main.js 4:15-20 (skipped side-effect-free modules) -[2] ./components/src/index.js 84 bytes [built] - [no exports used] - harmony side effect evaluation ./components [1] ./main.js + 1 modules 1:0-44 - harmony side effect evaluation ./components [3] ./foo.js 1:0-37 -[3] ./foo.js 101 bytes {0} [built] - import() ./foo ./main.js 6:0-15 -[4] ./components/src/CompAB/CompA.js 89 bytes {1} [built] - [only some exports used: default] - harmony import specifier ./components ./main.js 3:15-20 (skipped side-effect-free modules) - harmony import specifier ./components [3] ./foo.js 3:20-25 (skipped side-effect-free modules) - harmony side effect evaluation ./CompA [7] ./components/src/CompAB/index.js 1:0-43 - harmony export imported specifier ./CompA [7] ./components/src/CompAB/index.js 1:0-43 -[5] ./components/src/CompC/index.js 34 bytes [built] - [no exports used] - harmony side effect evaluation ./CompC [2] ./components/src/index.js 2:0-43 - harmony export imported specifier ./CompC [2] ./components/src/index.js 2:0-43 -[6] ./components/src/CompC/CompC.js 33 bytes [built] - [no exports used] - harmony side effect evaluation ./CompC [5] ./components/src/CompC/index.js 1:0-34 - harmony export imported specifier ./CompC [5] ./components/src/CompC/index.js 1:0-34 -[7] ./components/src/CompAB/index.js 87 bytes [built] - [no exports used] - harmony side effect evaluation ./CompAB [2] ./components/src/index.js 1:0-40 - harmony export imported specifier ./CompAB [2] ./components/src/index.js 1:0-40 - harmony export imported specifier ./CompAB [2] ./components/src/index.js 1:0-40" + | harmony side effect evaluation ./CompB [0] ./components/src/CompAB/index.js 2:0-43 + | harmony export imported specifier ./CompB [0] ./components/src/CompAB/index.js 2:0-43 + | harmony import specifier ./components ./main.js 4:15-20 (skipped side-effect-free modules)" `; exports[`StatsTestCases should print correct stats for side-effects-simple-unused 1`] = ` @@ -2291,75 +2291,75 @@ exports[`StatsTestCases should print correct stats for split-chunks 1`] = ` Entrypoint a = default/a.js Entrypoint b = default/b.js Entrypoint c = default/c.js - chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{9}> ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={8}= >{2}< >{7}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) + chunk {0} default/vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{4}> ={1}= ={2}= ={3}= ={8}= ={9}= ={10}= ={12}= >{2}< >{11}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] - chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={5}= ={6}= ={8}= >{2}< >{7}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + [1] ./node_modules/x.js 20 bytes {0} {5} {6} {7} [built] + chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{4}> ={0}= ={2}= ={3}= ={8}= ={9}= ={10}= ={12}= >{2}< >{11}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{3}> <{4}> <{9}> <{10}> ={0}= ={1}= ={3}= ={5}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + [0] ./d.js 20 bytes {1} {5} {6} {7} [built] + chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{3}> <{4}> <{5}> <{8}> ={0}= ={1}= ={3}= ={9}= ={10}= ={11}= ={12}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - [2] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} default/vendors~async-a~async-b.js (vendors~async-a~async-b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={4}= ={5}= >{2}< >{7}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) + [2] ./f.js 20 bytes {2} {6} {7} [built] + chunk {3} default/vendors~async-a~async-b.js (vendors~async-a~async-b) 20 bytes <{4}> ={0}= ={1}= ={2}= ={8}= ={9}= >{2}< >{11}< [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 - [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] - chunk {4} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{7}< [rendered] + [3] ./node_modules/y.js 20 bytes {3} {5} {6} [built] + chunk {4} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{8}< >{9}< >{10}< >{12}< [entry] [rendered] + > ./ main + [8] ./index.js 147 bytes {4} [built] + chunk {5} default/a.js (a) 216 bytes >{2}< >{11}< [entry] [rendered] + > ./a a + [0] ./d.js 20 bytes {1} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {0} {5} {6} {7} [built] + [3] ./node_modules/y.js 20 bytes {3} {5} {6} [built] + [6] ./a.js + 1 modules 156 bytes {5} {8} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {6} default/b.js (b) 152 bytes [entry] [rendered] + > ./b b + [0] ./d.js 20 bytes {1} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {0} {5} {6} {7} [built] + [2] ./f.js 20 bytes {2} {6} {7} [built] + [3] ./node_modules/y.js 20 bytes {3} {5} {6} [built] + [4] ./b.js 72 bytes {6} {9} [built] + chunk {7} default/c.js (c) 152 bytes [entry] [rendered] + > ./c c + [0] ./d.js 20 bytes {1} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {0} {5} {6} {7} [built] + [2] ./f.js 20 bytes {2} {6} {7} [built] + [5] ./c.js 72 bytes {7} {10} [built] + [7] ./node_modules/z.js 20 bytes {7} {12} [built] + chunk {8} default/async-a.js (async-a) 156 bytes <{4}> ={0}= ={1}= ={3}= >{2}< >{11}< [rendered] > ./a [8] ./index.js 1:0-47 - [7] ./a.js + 1 modules 156 bytes {4} {10} [built] + [6] ./a.js + 1 modules 156 bytes {5} {8} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {5} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] + chunk {9} default/async-b.js (async-b) 72 bytes <{4}> ={0}= ={1}= ={2}= ={3}= [rendered] > ./b [8] ./index.js 2:0-47 - [5] ./b.js 72 bytes {5} {11} [built] - chunk {6} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={8}= [rendered] + [4] ./b.js 72 bytes {6} {9} [built] + chunk {10} default/async-c.js (async-c) 72 bytes <{4}> ={0}= ={1}= ={2}= ={12}= [rendered] > ./c [8] ./index.js 3:0-47 - [6] ./c.js 72 bytes {6} {12} [built] - chunk {7} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{3}> <{4}> <{10}> ={2}= [rendered] + [5] ./c.js 72 bytes {7} {10} [built] + chunk {11} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{3}> <{5}> <{8}> ={2}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 - [9] ./g.js 34 bytes {7} [built] - chunk {8} default/vendors~async-c.js (vendors~async-c) 20 bytes <{9}> ={0}= ={1}= ={2}= ={6}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c) + [9] ./g.js 34 bytes {11} [built] + chunk {12} default/vendors~async-c.js (vendors~async-c) 20 bytes <{4}> ={0}= ={1}= ={2}= ={10}= [rendered] split chunk (cache group: vendors) (name: vendors~async-c) > ./c [8] ./index.js 3:0-47 - [4] ./node_modules/z.js 20 bytes {8} {12} [built] - chunk {9} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{8}< [entry] [rendered] - > ./ main - [8] ./index.js 147 bytes {9} [built] - chunk {10} default/a.js (a) 216 bytes >{2}< >{7}< [entry] [rendered] - > ./a a - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] - [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] - [7] ./a.js + 1 modules 156 bytes {4} {10} [built] - | ./a.js 121 bytes [built] - | ./e.js 20 bytes [built] - chunk {11} default/b.js (b) 152 bytes [entry] [rendered] - > ./b b - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] - [2] ./f.js 20 bytes {2} {11} {12} [built] - [3] ./node_modules/y.js 20 bytes {3} {10} {11} [built] - [5] ./b.js 72 bytes {5} {11} [built] - chunk {12} default/c.js (c) 152 bytes [entry] [rendered] - > ./c c - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [1] ./node_modules/x.js 20 bytes {0} {10} {11} {12} [built] - [2] ./f.js 20 bytes {2} {11} {12} [built] - [4] ./node_modules/z.js 20 bytes {8} {12} [built] - [6] ./c.js 72 bytes {6} {12} [built] + [7] ./node_modules/z.js 20 bytes {7} {12} [built] Child all-chunks: Entrypoint main = default/main.js Entrypoint a = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~a~async-a~async-b~b.js default/a.js Entrypoint b = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~a~async-a~async-b~b.js default/b.js Entrypoint c = default/vendors~a~async-a~async-b~async-c~b~c.js default/vendors~async-c~c.js default/c.js - chunk {0} default/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={10}= ={11}= ={12}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) + chunk {0} default/vendors~a~async-a~async-b~async-c~b~c.js (vendors~a~async-a~async-b~async-c~b~c) 20 bytes <{5}> ={1}= ={2}= ={3}= ={4}= ={6}= ={7}= ={8}= ={9}= ={10}= ={11}= >{3}< >{12}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~async-c~b~c) > ./a a > ./b b > ./c c @@ -2367,444 +2367,444 @@ Child all-chunks: > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 [2] ./node_modules/x.js 20 bytes {0} [built] - chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= >{2}< >{8}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + chunk {1} default/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{5}> ={0}= ={2}= ={3}= ={6}= ={7}= ={9}= ={10}= >{3}< >{12}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) + > ./a a + > ./b b + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + [3] ./node_modules/y.js 20 bytes {1} [built] + chunk {2} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{5}> ={0}= ={1}= ={3}= ={4}= ={9}= ={10}= ={11}= >{3}< >{12}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{3}> <{5}> <{9}> <{10}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + [0] ./d.js 20 bytes {2} {6} {7} {8} [built] + chunk {3} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{2}> <{5}> <{6}> <{9}> ={0}= ={1}= ={2}= ={4}= ={10}= ={11}= ={12}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - [1] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} default/vendors~a~async-a~async-b~b.js (vendors~a~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={5}= ={6}= ={10}= ={11}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~async-a~async-b~b) - > ./a a - > ./b b - > ./a [8] ./index.js 1:0-47 - > ./b [8] ./index.js 2:0-47 - [3] ./node_modules/y.js 20 bytes {3} [built] - chunk {4} default/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={2}= ={7}= ={12}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + [1] ./f.js 20 bytes {3} {7} {8} [built] + chunk {4} default/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{5}> ={0}= ={2}= ={3}= ={8}= ={11}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) > ./c c > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] - chunk {5} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{8}< [rendered] + chunk {5} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{9}< >{10}< >{11}< [entry] [rendered] + > ./ main + [8] ./index.js 147 bytes {5} [built] + chunk {6} default/a.js (a) 176 bytes ={0}= ={1}= >{3}< >{12}< [entry] [rendered] + > ./a a + [0] ./d.js 20 bytes {2} {6} {7} {8} [built] + [6] ./a.js + 1 modules 156 bytes {6} {9} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {7} default/b.js (b) 112 bytes ={0}= ={1}= [entry] [rendered] + > ./b b + [0] ./d.js 20 bytes {2} {6} {7} {8} [built] + [1] ./f.js 20 bytes {3} {7} {8} [built] + [4] ./b.js 72 bytes {7} {10} [built] + chunk {8} default/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] + > ./c c + [0] ./d.js 20 bytes {2} {6} {7} {8} [built] + [1] ./f.js 20 bytes {3} {7} {8} [built] + [5] ./c.js 72 bytes {8} {11} [built] + chunk {9} default/async-a.js (async-a) 156 bytes <{5}> ={0}= ={1}= ={2}= >{3}< >{12}< [rendered] > ./a [8] ./index.js 1:0-47 - [6] ./a.js + 1 modules 156 bytes {5} {10} [built] + [6] ./a.js + 1 modules 156 bytes {6} {9} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {6} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] + chunk {10} default/async-b.js (async-b) 72 bytes <{5}> ={0}= ={1}= ={2}= ={3}= [rendered] > ./b [8] ./index.js 2:0-47 - [4] ./b.js 72 bytes {6} {11} [built] - chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] + [4] ./b.js 72 bytes {7} {10} [built] + chunk {11} default/async-c.js (async-c) 72 bytes <{5}> ={0}= ={2}= ={3}= ={4}= [rendered] > ./c [8] ./index.js 3:0-47 - [5] ./c.js 72 bytes {7} {12} [built] - chunk {8} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{3}> <{5}> <{10}> ={2}= [rendered] + [5] ./c.js 72 bytes {8} {11} [built] + chunk {12} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{2}> <{6}> <{9}> ={3}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 - [9] ./g.js 34 bytes {8} [built] - chunk {9} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< [entry] [rendered] - > ./ main - [8] ./index.js 147 bytes {9} [built] - chunk {10} default/a.js (a) 176 bytes ={0}= ={3}= >{2}< >{8}< [entry] [rendered] - > ./a a - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [6] ./a.js + 1 modules 156 bytes {5} {10} [built] - | ./a.js 121 bytes [built] - | ./e.js 20 bytes [built] - chunk {11} default/b.js (b) 112 bytes ={0}= ={3}= [entry] [rendered] - > ./b b - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [1] ./f.js 20 bytes {2} {11} {12} [built] - [4] ./b.js 72 bytes {6} {11} [built] - chunk {12} default/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] - > ./c c - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [1] ./f.js 20 bytes {2} {11} {12} [built] - [5] ./c.js 72 bytes {7} {12} [built] + [9] ./g.js 34 bytes {12} [built] Child manual: Entrypoint main = default/main.js Entrypoint a = default/vendors.js default/a.js Entrypoint b = default/vendors.js default/b.js Entrypoint c = default/vendors.js default/c.js - chunk {0} default/vendors.js (vendors) 112 bytes <{5}> ={1}= ={2}= ={3}= ={6}= ={7}= ={8}= >{4}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) + chunk {0} default/vendors.js (vendors) 112 bytes <{1}> ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) > ./a a > ./b b > ./c c > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - [2] ./node_modules/x.js 20 bytes {0} [built] + [1] ./node_modules/x.js 20 bytes {0} [built] [3] ./node_modules/y.js 20 bytes {0} [built] [6] ./node_modules/z.js 20 bytes {0} [built] [9] multi x y z 52 bytes {0} [built] - chunk {1} default/async-a.js (async-a) 176 bytes <{5}> ={0}= >{4}< [rendered] + chunk {1} default/main.js (main) 147 bytes >{0}< >{5}< >{6}< >{7}< [entry] [rendered] + > ./ main + [8] ./index.js 147 bytes {1} [built] + chunk {2} default/a.js (a) 176 bytes ={0}= >{8}< [entry] [rendered] + > ./a a + [0] ./d.js 20 bytes {2} {3} {4} {5} {6} {7} [built] + [7] ./a.js + 1 modules 156 bytes {2} {5} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {3} default/b.js (b) 112 bytes ={0}= [entry] [rendered] + > ./b b + [0] ./d.js 20 bytes {2} {3} {4} {5} {6} {7} [built] + [2] ./f.js 20 bytes {3} {4} {6} {7} {8} [built] + [4] ./b.js 72 bytes {3} {6} [built] + chunk {4} default/c.js (c) 112 bytes ={0}= [entry] [rendered] + > ./c c + [0] ./d.js 20 bytes {2} {3} {4} {5} {6} {7} [built] + [2] ./f.js 20 bytes {3} {4} {6} {7} {8} [built] + [5] ./c.js 72 bytes {4} {7} [built] + chunk {5} default/async-a.js (async-a) 176 bytes <{1}> ={0}= >{8}< [rendered] > ./a [8] ./index.js 1:0-47 - [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] - [7] ./a.js + 1 modules 156 bytes {1} {6} [built] + [0] ./d.js 20 bytes {2} {3} {4} {5} {6} {7} [built] + [7] ./a.js + 1 modules 156 bytes {2} {5} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {2} default/async-b.js (async-b) 112 bytes <{5}> ={0}= [rendered] + chunk {6} default/async-b.js (async-b) 112 bytes <{1}> ={0}= [rendered] > ./b [8] ./index.js 2:0-47 - [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] - [1] ./f.js 20 bytes {2} {3} {4} {7} {8} [built] - [4] ./b.js 72 bytes {2} {7} [built] - chunk {3} default/async-c.js (async-c) 112 bytes <{5}> ={0}= [rendered] + [0] ./d.js 20 bytes {2} {3} {4} {5} {6} {7} [built] + [2] ./f.js 20 bytes {3} {4} {6} {7} {8} [built] + [4] ./b.js 72 bytes {3} {6} [built] + chunk {7} default/async-c.js (async-c) 112 bytes <{1}> ={0}= [rendered] > ./c [8] ./index.js 3:0-47 - [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] - [1] ./f.js 20 bytes {2} {3} {4} {7} {8} [built] - [5] ./c.js 72 bytes {3} {8} [built] - chunk {4} default/async-g.js (async-g) 54 bytes <{0}> <{1}> <{6}> [rendered] + [0] ./d.js 20 bytes {2} {3} {4} {5} {6} {7} [built] + [2] ./f.js 20 bytes {3} {4} {6} {7} {8} [built] + [5] ./c.js 72 bytes {4} {7} [built] + chunk {8} default/async-g.js (async-g) 54 bytes <{0}> <{2}> <{5}> [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 - [1] ./f.js 20 bytes {2} {3} {4} {7} {8} [built] - [10] ./g.js 34 bytes {4} [built] - chunk {5} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< [entry] [rendered] - > ./ main - [8] ./index.js 147 bytes {5} [built] - chunk {6} default/a.js (a) 176 bytes ={0}= >{4}< [entry] [rendered] - > ./a a - [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] - [7] ./a.js + 1 modules 156 bytes {1} {6} [built] - | ./a.js 121 bytes [built] - | ./e.js 20 bytes [built] - chunk {7} default/b.js (b) 112 bytes ={0}= [entry] [rendered] - > ./b b - [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] - [1] ./f.js 20 bytes {2} {3} {4} {7} {8} [built] - [4] ./b.js 72 bytes {2} {7} [built] - chunk {8} default/c.js (c) 112 bytes ={0}= [entry] [rendered] - > ./c c - [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] - [1] ./f.js 20 bytes {2} {3} {4} {7} {8} [built] - [5] ./c.js 72 bytes {3} {8} [built] + [2] ./f.js 20 bytes {3} {4} {6} {7} {8} [built] + [10] ./g.js 34 bytes {8} [built] Child name-too-long: Entrypoint main = main.js Entrypoint aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f.js vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793.js async-a.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.js Entrypoint bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f.js vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793.js async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc.js async-b.js bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js Entrypoint cccccccccccccccccccccccccccccc = vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f.js vendors~async-c~cccccccccccccccccccccccccccccc.js aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793.js async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc.js async-c.js cccccccccccccccccccccccccccccc.js - chunk {0} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f) 20 bytes <{9}> ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={10}= ={11}= ={12}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f) + chunk {0} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f) 20 bytes <{8}> ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={9}= ={10}= ={11}= >{2}< >{12}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccc~50ebc41f) > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb > ./c cccccccccccccccccccccccccccccc > ./a [4] ./index.js 1:0-47 > ./b [4] ./index.js 2:0-47 > ./c [4] ./index.js 3:0-47 - [2] ./node_modules/x.js 20 bytes {0} [built] - chunk {1} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={10}= ={11}= ={12}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: default) (name: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793) + [1] ./node_modules/x.js 20 bytes {0} [built] + chunk {1} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793) 20 bytes <{8}> ={0}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={9}= ={10}= ={11}= >{2}< >{12}< [initial] [rendered] split chunk (cache group: default) (name: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~async-c~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccc~18066793) > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb > ./c cccccccccccccccccccccccccccccc > ./a [4] ./index.js 1:0-47 > ./b [4] ./index.js 2:0-47 > ./c [4] ./index.js 3:0-47 - [1] ./d.js 20 bytes {1} [built] - chunk {2} async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc.js (async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) 20 bytes <{0}> <{1}> <{3}> <{4}> <{9}> <{10}> ={0}= ={1}= ={3}= ={5}= ={6}= ={7}= ={8}= ={11}= ={12}= [initial] [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) + [0] ./d.js 20 bytes {1} [built] + chunk {2} async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc.js (async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) 20 bytes <{0}> <{1}> <{3}> <{4}> <{8}> <{9}> ={0}= ={1}= ={3}= ={5}= ={6}= ={7}= ={10}= ={11}= ={12}= [initial] [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb~cccccccccccccccccccccccccccccc) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb > ./c cccccccccccccccccccccccccccccc > ./b [4] ./index.js 2:0-47 > ./c [4] ./index.js 3:0-47 - [0] ./f.js 20 bytes {2} [built] - chunk {3} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) 20 bytes <{9}> ={0}= ={1}= ={2}= ={4}= ={5}= ={10}= ={11}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) + [2] ./f.js 20 bytes {2} [built] + chunk {3} vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js (vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) 20 bytes <{8}> ={0}= ={1}= ={2}= ={4}= ={5}= ={9}= ={10}= >{2}< >{12}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa~async-a~async-b~bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb > ./a [4] ./index.js 1:0-47 > ./b [4] ./index.js 2:0-47 [3] ./node_modules/y.js 20 bytes {3} [built] - chunk {4} async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= ={10}= >{2}< >{8}< [initial] [rendered] reused as split chunk (cache group: default) + chunk {4} async-a.js (async-a) 156 bytes <{8}> ={0}= ={1}= ={3}= ={9}= >{2}< >{12}< [initial] [rendered] reused as split chunk (cache group: default) > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa > ./a [4] ./index.js 1:0-47 [8] ./a.js + 1 modules 156 bytes {4} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {5} async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= ={11}= [initial] [rendered] reused as split chunk (cache group: default) + chunk {5} async-b.js (async-b) 72 bytes <{8}> ={0}= ={1}= ={2}= ={3}= ={10}= [initial] [rendered] reused as split chunk (cache group: default) > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb > ./b [4] ./index.js 2:0-47 [5] ./b.js 72 bytes {5} [built] - chunk {6} async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={7}= ={12}= [initial] [rendered] reused as split chunk (cache group: default) + chunk {6} async-c.js (async-c) 72 bytes <{8}> ={0}= ={1}= ={2}= ={7}= ={11}= [initial] [rendered] reused as split chunk (cache group: default) > ./c cccccccccccccccccccccccccccccc > ./c [4] ./index.js 3:0-47 [6] ./c.js 72 bytes {6} [built] - chunk {7} vendors~async-c~cccccccccccccccccccccccccccccc.js (vendors~async-c~cccccccccccccccccccccccccccccc) 20 bytes <{9}> ={0}= ={1}= ={2}= ={6}= ={12}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~cccccccccccccccccccccccccccccc) + chunk {7} vendors~async-c~cccccccccccccccccccccccccccccc.js (vendors~async-c~cccccccccccccccccccccccccccccc) 20 bytes <{8}> ={0}= ={1}= ={2}= ={6}= ={11}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~cccccccccccccccccccccccccccccc) > ./c cccccccccccccccccccccccccccccc > ./c [4] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {7} [built] - chunk {8} async-g.js (async-g) 34 bytes <{0}> <{1}> <{3}> <{4}> <{10}> ={2}= [rendered] - > ./g [] 6:0-47 - > ./g [] 6:0-47 - [9] ./g.js 34 bytes {8} [built] - chunk {9} main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< [entry] [rendered] + chunk {8} main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< [entry] [rendered] > ./ main - [4] ./index.js 147 bytes {9} [built] - chunk {10} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) 0 bytes ={0}= ={1}= ={3}= ={4}= >{2}< >{8}< [entry] [rendered] + [4] ./index.js 147 bytes {8} [built] + chunk {9} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.js (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) 0 bytes ={0}= ={1}= ={3}= ={4}= >{2}< >{12}< [entry] [rendered] > ./a aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - chunk {11} bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js (bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) 0 bytes ={0}= ={1}= ={2}= ={3}= ={5}= [entry] [rendered] + chunk {10} bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.js (bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb) 0 bytes ={0}= ={1}= ={2}= ={3}= ={5}= [entry] [rendered] > ./b bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb - chunk {12} cccccccccccccccccccccccccccccc.js (cccccccccccccccccccccccccccccc) 0 bytes ={0}= ={1}= ={2}= ={6}= ={7}= [entry] [rendered] + chunk {11} cccccccccccccccccccccccccccccc.js (cccccccccccccccccccccccccccccc) 0 bytes ={0}= ={1}= ={2}= ={6}= ={7}= [entry] [rendered] > ./c cccccccccccccccccccccccccccccc + chunk {12} async-g.js (async-g) 34 bytes <{0}> <{1}> <{3}> <{4}> <{9}> ={2}= [rendered] + > ./g [] 6:0-47 + > ./g [] 6:0-47 + [9] ./g.js 34 bytes {12} [built] Child custom-chunks-filter: Entrypoint main = default/main.js Entrypoint a = default/a.js Entrypoint b = default/vendors~async-a~async-b~async-c~b~c.js default/vendors~async-a~async-b~b.js default/b.js Entrypoint c = default/vendors~async-a~async-b~async-c~b~c.js default/vendors~async-c~c.js default/c.js - chunk {0} default/vendors~async-a~async-b~async-c~b~c.js (vendors~async-a~async-b~async-c~b~c) 20 bytes <{9}> ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= ={11}= ={12}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c~b~c) + chunk {0} default/vendors~async-a~async-b~async-c~b~c.js (vendors~async-a~async-b~async-c~b~c) 20 bytes <{5}> ={1}= ={2}= ={3}= ={4}= ={7}= ={8}= ={9}= ={10}= ={11}= >{3}< >{12}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c~b~c) > ./b b > ./c c > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - [2] ./node_modules/x.js 20 bytes {0} {10} [built] - chunk {1} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{9}> ={0}= ={2}= ={3}= ={4}= ={5}= ={6}= ={7}= >{2}< >{8}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + [1] ./node_modules/x.js 20 bytes {0} {6} [built] + chunk {1} default/vendors~async-a~async-b~b.js (vendors~async-a~async-b~b) 20 bytes <{5}> ={0}= ={2}= ={3}= ={7}= ={9}= ={10}= >{3}< >{12}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~b) + > ./b b + > ./a [8] ./index.js 1:0-47 + > ./b [8] ./index.js 2:0-47 + [3] ./node_modules/y.js 20 bytes {1} {6} [built] + chunk {2} default/async-a~async-b~async-c.js (async-a~async-b~async-c) 20 bytes <{5}> ={0}= ={1}= ={3}= ={4}= ={9}= ={10}= ={11}= >{3}< >{12}< [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - chunk {2} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{3}> <{5}> <{9}> <{10}> ={0}= ={1}= ={3}= ={4}= ={6}= ={7}= ={8}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) + [0] ./d.js 20 bytes {2} {6} {7} {8} [built] + chunk {3} default/async-b~async-c~async-g.js (async-b~async-c~async-g) 20 bytes <{0}> <{1}> <{2}> <{5}> <{6}> <{9}> ={0}= ={1}= ={2}= ={4}= ={10}= ={11}= ={12}= [rendered] split chunk (cache group: default) (name: async-b~async-c~async-g) > ./g [] 6:0-47 > ./g [] 6:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - [1] ./f.js 20 bytes {2} {11} {12} [built] - chunk {3} default/vendors~async-a~async-b~b.js (vendors~async-a~async-b~b) 20 bytes <{9}> ={0}= ={1}= ={2}= ={5}= ={6}= ={11}= >{2}< >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~b) - > ./b b - > ./a [8] ./index.js 1:0-47 - > ./b [8] ./index.js 2:0-47 - [3] ./node_modules/y.js 20 bytes {3} {10} [built] - chunk {4} default/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{9}> ={0}= ={1}= ={2}= ={7}= ={12}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) + [2] ./f.js 20 bytes {3} {7} {8} [built] + chunk {4} default/vendors~async-c~c.js (vendors~async-c~c) 20 bytes <{5}> ={0}= ={2}= ={3}= ={8}= ={11}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~async-c~c) > ./c c > ./c [8] ./index.js 3:0-47 [7] ./node_modules/z.js 20 bytes {4} [built] - chunk {5} default/async-a.js (async-a) 156 bytes <{9}> ={0}= ={1}= ={3}= >{2}< >{8}< [rendered] + chunk {5} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{9}< >{10}< >{11}< [entry] [rendered] + > ./ main + [8] ./index.js 147 bytes {5} [built] + chunk {6} default/a.js (a) 216 bytes >{3}< >{12}< [entry] [rendered] + > ./a a + [0] ./d.js 20 bytes {2} {6} {7} {8} [built] + [1] ./node_modules/x.js 20 bytes {0} {6} [built] + [3] ./node_modules/y.js 20 bytes {1} {6} [built] + [6] ./a.js + 1 modules 156 bytes {6} {9} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {7} default/b.js (b) 112 bytes ={0}= ={1}= [entry] [rendered] + > ./b b + [0] ./d.js 20 bytes {2} {6} {7} {8} [built] + [2] ./f.js 20 bytes {3} {7} {8} [built] + [4] ./b.js 72 bytes {7} {10} [built] + chunk {8} default/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] + > ./c c + [0] ./d.js 20 bytes {2} {6} {7} {8} [built] + [2] ./f.js 20 bytes {3} {7} {8} [built] + [5] ./c.js 72 bytes {8} {11} [built] + chunk {9} default/async-a.js (async-a) 156 bytes <{5}> ={0}= ={1}= ={2}= >{3}< >{12}< [rendered] > ./a [8] ./index.js 1:0-47 - [6] ./a.js + 1 modules 156 bytes {5} {10} [built] + [6] ./a.js + 1 modules 156 bytes {6} {9} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {6} default/async-b.js (async-b) 72 bytes <{9}> ={0}= ={1}= ={2}= ={3}= [rendered] + chunk {10} default/async-b.js (async-b) 72 bytes <{5}> ={0}= ={1}= ={2}= ={3}= [rendered] > ./b [8] ./index.js 2:0-47 - [4] ./b.js 72 bytes {6} {11} [built] - chunk {7} default/async-c.js (async-c) 72 bytes <{9}> ={0}= ={1}= ={2}= ={4}= [rendered] + [4] ./b.js 72 bytes {7} {10} [built] + chunk {11} default/async-c.js (async-c) 72 bytes <{5}> ={0}= ={2}= ={3}= ={4}= [rendered] > ./c [8] ./index.js 3:0-47 - [5] ./c.js 72 bytes {7} {12} [built] - chunk {8} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{3}> <{5}> <{10}> ={2}= [rendered] + [5] ./c.js 72 bytes {8} {11} [built] + chunk {12} default/async-g.js (async-g) 34 bytes <{0}> <{1}> <{2}> <{6}> <{9}> ={3}= [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 - [9] ./g.js 34 bytes {8} [built] - chunk {9} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< [entry] [rendered] - > ./ main - [8] ./index.js 147 bytes {9} [built] - chunk {10} default/a.js (a) 216 bytes >{2}< >{8}< [entry] [rendered] - > ./a a - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [2] ./node_modules/x.js 20 bytes {0} {10} [built] - [3] ./node_modules/y.js 20 bytes {3} {10} [built] - [6] ./a.js + 1 modules 156 bytes {5} {10} [built] - | ./a.js 121 bytes [built] - | ./e.js 20 bytes [built] - chunk {11} default/b.js (b) 112 bytes ={0}= ={3}= [entry] [rendered] - > ./b b - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [1] ./f.js 20 bytes {2} {11} {12} [built] - [4] ./b.js 72 bytes {6} {11} [built] - chunk {12} default/c.js (c) 112 bytes ={0}= ={4}= [entry] [rendered] - > ./c c - [0] ./d.js 20 bytes {1} {10} {11} {12} [built] - [1] ./f.js 20 bytes {2} {11} {12} [built] - [5] ./c.js 72 bytes {7} {12} [built] + [9] ./g.js 34 bytes {12} [built] Child custom-chunks-filter-in-cache-groups: Entrypoint main = default/main.js Entrypoint a = default/a.js Entrypoint b = default/vendors.js default/b.js Entrypoint c = default/vendors.js default/c.js - chunk {0} default/vendors.js (vendors) 112 bytes <{5}> ={1}= ={2}= ={3}= ={7}= ={8}= >{4}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) + chunk {0} default/vendors.js (vendors) 112 bytes <{1}> ={3}= ={4}= ={5}= ={6}= ={7}= >{8}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) > ./b b > ./c c > ./a [8] ./index.js 1:0-47 > ./b [8] ./index.js 2:0-47 > ./c [8] ./index.js 3:0-47 - [2] ./node_modules/x.js 20 bytes {0} {6} [built] - [3] ./node_modules/y.js 20 bytes {0} {6} [built] + [1] ./node_modules/x.js 20 bytes {0} {2} [built] + [2] ./node_modules/y.js 20 bytes {0} {2} [built] [6] ./node_modules/z.js 20 bytes {0} [built] [9] multi x y z 52 bytes {0} [built] - chunk {1} default/async-a.js (async-a) 176 bytes <{5}> ={0}= >{4}< [rendered] + chunk {1} default/main.js (main) 147 bytes >{0}< >{5}< >{6}< >{7}< [entry] [rendered] + > ./ main + [8] ./index.js 147 bytes {1} [built] + chunk {2} default/a.js (a) 216 bytes >{8}< [entry] [rendered] + > ./a a + [0] ./d.js 20 bytes {2} {3} {4} {5} {6} {7} [built] + [1] ./node_modules/x.js 20 bytes {0} {2} [built] + [2] ./node_modules/y.js 20 bytes {0} {2} [built] + [7] ./a.js + 1 modules 156 bytes {2} {5} [built] + | ./a.js 121 bytes [built] + | ./e.js 20 bytes [built] + chunk {3} default/b.js (b) 112 bytes ={0}= [entry] [rendered] + > ./b b + [0] ./d.js 20 bytes {2} {3} {4} {5} {6} {7} [built] + [3] ./f.js 20 bytes {3} {4} {6} {7} {8} [built] + [4] ./b.js 72 bytes {3} {6} [built] + chunk {4} default/c.js (c) 112 bytes ={0}= [entry] [rendered] + > ./c c + [0] ./d.js 20 bytes {2} {3} {4} {5} {6} {7} [built] + [3] ./f.js 20 bytes {3} {4} {6} {7} {8} [built] + [5] ./c.js 72 bytes {4} {7} [built] + chunk {5} default/async-a.js (async-a) 176 bytes <{1}> ={0}= >{8}< [rendered] > ./a [8] ./index.js 1:0-47 - [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] - [7] ./a.js + 1 modules 156 bytes {1} {6} [built] + [0] ./d.js 20 bytes {2} {3} {4} {5} {6} {7} [built] + [7] ./a.js + 1 modules 156 bytes {2} {5} [built] | ./a.js 121 bytes [built] | ./e.js 20 bytes [built] - chunk {2} default/async-b.js (async-b) 112 bytes <{5}> ={0}= [rendered] + chunk {6} default/async-b.js (async-b) 112 bytes <{1}> ={0}= [rendered] > ./b [8] ./index.js 2:0-47 - [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] - [1] ./f.js 20 bytes {2} {3} {4} {7} {8} [built] - [4] ./b.js 72 bytes {2} {7} [built] - chunk {3} default/async-c.js (async-c) 112 bytes <{5}> ={0}= [rendered] + [0] ./d.js 20 bytes {2} {3} {4} {5} {6} {7} [built] + [3] ./f.js 20 bytes {3} {4} {6} {7} {8} [built] + [4] ./b.js 72 bytes {3} {6} [built] + chunk {7} default/async-c.js (async-c) 112 bytes <{1}> ={0}= [rendered] > ./c [8] ./index.js 3:0-47 - [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] - [1] ./f.js 20 bytes {2} {3} {4} {7} {8} [built] - [5] ./c.js 72 bytes {3} {8} [built] - chunk {4} default/async-g.js (async-g) 54 bytes <{0}> <{1}> <{6}> [rendered] + [0] ./d.js 20 bytes {2} {3} {4} {5} {6} {7} [built] + [3] ./f.js 20 bytes {3} {4} {6} {7} {8} [built] + [5] ./c.js 72 bytes {4} {7} [built] + chunk {8} default/async-g.js (async-g) 54 bytes <{0}> <{2}> <{5}> [rendered] > ./g [] 6:0-47 > ./g [] 6:0-47 - [1] ./f.js 20 bytes {2} {3} {4} {7} {8} [built] - [10] ./g.js 34 bytes {4} [built] - chunk {5} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< [entry] [rendered] - > ./ main - [8] ./index.js 147 bytes {5} [built] - chunk {6} default/a.js (a) 216 bytes >{4}< [entry] [rendered] - > ./a a - [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] - [2] ./node_modules/x.js 20 bytes {0} {6} [built] - [3] ./node_modules/y.js 20 bytes {0} {6} [built] - [7] ./a.js + 1 modules 156 bytes {1} {6} [built] - | ./a.js 121 bytes [built] - | ./e.js 20 bytes [built] - chunk {7} default/b.js (b) 112 bytes ={0}= [entry] [rendered] - > ./b b - [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] - [1] ./f.js 20 bytes {2} {3} {4} {7} {8} [built] - [4] ./b.js 72 bytes {2} {7} [built] - chunk {8} default/c.js (c) 112 bytes ={0}= [entry] [rendered] - > ./c c - [0] ./d.js 20 bytes {1} {2} {3} {6} {7} {8} [built] - [1] ./f.js 20 bytes {2} {3} {4} {7} {8} [built] - [5] ./c.js 72 bytes {3} {8} [built]" + [3] ./f.js 20 bytes {3} {4} {6} {7} {8} [built] + [10] ./g.js 34 bytes {8} [built]" `; exports[`StatsTestCases should print correct stats for split-chunks-automatic-name 1`] = ` "Entrypoint main = main.js -chunk {0} common~async-a~async-b~async-c.js (common~async-a~async-b~async-c) 40 bytes <{7}> ={1}= ={2}= ={3}= ={4}= ={5}= ={6}= [rendered] split chunk (cache group: vendors) (name: common~async-a~async-b~async-c) - > ./a [8] ./index.js 1:0-47 - > ./b [8] ./index.js 2:0-47 - > ./c [8] ./index.js 3:0-47 - [0] ./d.js 20 bytes {0} [built] - [1] ./node_modules/x.js 20 bytes {0} [built] -chunk {1} common~async-b~async-c.js (common~async-b~async-c) 20 bytes <{7}> ={0}= ={2}= ={4}= ={5}= ={6}= [rendered] split chunk (cache group: vendors) (name: common~async-b~async-c) - > ./b [8] ./index.js 2:0-47 - > ./c [8] ./index.js 3:0-47 - [3] ./f.js 20 bytes {1} [built] -chunk {2} common~async-a~async-b.js (common~async-a~async-b) 20 bytes <{7}> ={0}= ={1}= ={3}= ={4}= [rendered] split chunk (cache group: vendors) (name: common~async-a~async-b) - > ./a [8] ./index.js 1:0-47 - > ./b [8] ./index.js 2:0-47 - [2] ./node_modules/y.js 20 bytes {2} [built] -chunk {3} async-a.js (async-a) 107 bytes <{7}> ={0}= ={2}= [rendered] - > ./a [8] ./index.js 1:0-47 - [7] ./a.js + 1 modules 107 bytes {3} [built] +chunk {0} common~async-a~async-b~async-c.js (common~async-a~async-b~async-c) 40 bytes <{3}> ={1}= ={2}= ={4}= ={5}= ={6}= ={7}= [rendered] split chunk (cache group: vendors) (name: common~async-a~async-b~async-c) + > ./a [0] ./index.js 1:0-47 + > ./b [0] ./index.js 2:0-47 + > ./c [0] ./index.js 3:0-47 + [4] ./d.js 20 bytes {0} [built] + [5] ./node_modules/x.js 20 bytes {0} [built] +chunk {1} common~async-b~async-c.js (common~async-b~async-c) 20 bytes <{3}> ={0}= ={2}= ={5}= ={6}= ={7}= [rendered] split chunk (cache group: vendors) (name: common~async-b~async-c) + > ./b [0] ./index.js 2:0-47 + > ./c [0] ./index.js 3:0-47 + [7] ./f.js 20 bytes {1} [built] +chunk {2} common~async-a~async-b.js (common~async-a~async-b) 20 bytes <{3}> ={0}= ={1}= ={4}= ={5}= [rendered] split chunk (cache group: vendors) (name: common~async-a~async-b) + > ./a [0] ./index.js 1:0-47 + > ./b [0] ./index.js 2:0-47 + [6] ./node_modules/y.js 20 bytes {2} [built] +chunk {3} main.js (main) 147 bytes >{0}< >{1}< >{2}< >{4}< >{5}< >{6}< >{7}< [entry] [rendered] + > ./ main + [0] ./index.js 147 bytes {3} [built] +chunk {4} async-a.js (async-a) 107 bytes <{3}> ={0}= ={2}= [rendered] + > ./a [0] ./index.js 1:0-47 + [3] ./a.js + 1 modules 107 bytes {4} [built] | ./a.js 72 bytes [built] | ./e.js 20 bytes [built] -chunk {4} async-b.js (async-b) 72 bytes <{7}> ={0}= ={1}= ={2}= [rendered] - > ./b [8] ./index.js 2:0-47 - [5] ./b.js 72 bytes {4} [built] -chunk {5} async-c.js (async-c) 72 bytes <{7}> ={0}= ={1}= ={6}= [rendered] - > ./c [8] ./index.js 3:0-47 - [6] ./c.js 72 bytes {5} [built] -chunk {6} common~async-c.js (common~async-c) 20 bytes <{7}> ={0}= ={1}= ={5}= [rendered] split chunk (cache group: vendors) (name: common~async-c) - > ./c [8] ./index.js 3:0-47 - [4] ./node_modules/z.js 20 bytes {6} [built] -chunk {7} main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< [entry] [rendered] - > ./ main - [8] ./index.js 147 bytes {7} [built]" +chunk {5} async-b.js (async-b) 72 bytes <{3}> ={0}= ={1}= ={2}= [rendered] + > ./b [0] ./index.js 2:0-47 + [1] ./b.js 72 bytes {5} [built] +chunk {6} async-c.js (async-c) 72 bytes <{3}> ={0}= ={1}= ={7}= [rendered] + > ./c [0] ./index.js 3:0-47 + [2] ./c.js 72 bytes {6} [built] +chunk {7} common~async-c.js (common~async-c) 20 bytes <{3}> ={0}= ={1}= ={6}= [rendered] split chunk (cache group: vendors) (name: common~async-c) + > ./c [0] ./index.js 3:0-47 + [8] ./node_modules/z.js 20 bytes {7} [built]" `; exports[`StatsTestCases should print correct stats for split-chunks-combinations 1`] = ` "Entrypoint main = main.js -chunk {0} async-a~async-b.js (async-a~async-b) 134 bytes <{8}> ={1}= ={2}= [rendered] split chunk (cache group: default) (name: async-a~async-b) - > ./a [9] ./index.js 1:0-47 - > ./b [9] ./index.js 2:0-47 - [0] ./x.js 67 bytes {0} {3} {4} {5} {6} {7} [built] - [1] ./y.js 67 bytes {0} [built] -chunk {1} async-a.js (async-a) 48 bytes <{8}> ={0}= [rendered] - > ./a [9] ./index.js 1:0-47 - [2] ./a.js 48 bytes {1} [built] -chunk {2} async-b.js (async-b) 48 bytes <{8}> ={0}= [rendered] - > ./b [9] ./index.js 2:0-47 - [3] ./b.js 48 bytes {2} [built] -chunk {3} async-c.js (async-c) 101 bytes <{8}> [rendered] - > ./c [9] ./index.js 3:0-47 - [0] ./x.js 67 bytes {0} {3} {4} {5} {6} {7} [built] - [4] ./c.js 34 bytes {3} [built] -chunk {4} async-d.js (async-d) 101 bytes <{8}> [rendered] - > ./d [9] ./index.js 4:0-47 - [0] ./x.js 67 bytes {0} {3} {4} {5} {6} {7} [built] - [5] ./d.js 34 bytes {4} [built] -chunk {5} async-e.js (async-e) 101 bytes <{8}> [rendered] - > ./e [9] ./index.js 5:0-47 - [0] ./x.js 67 bytes {0} {3} {4} {5} {6} {7} [built] - [6] ./e.js 34 bytes {5} [built] -chunk {6} async-f.js (async-f) 101 bytes <{8}> [rendered] - > ./f [9] ./index.js 6:0-47 - [0] ./x.js 67 bytes {0} {3} {4} {5} {6} {7} [built] - [7] ./f.js 34 bytes {6} [built] -chunk {7} async-g.js (async-g) 101 bytes <{8}> [rendered] - > ./g [9] ./index.js 7:0-47 - [0] ./x.js 67 bytes {0} {3} {4} {5} {6} {7} [built] - [8] ./g.js 34 bytes {7} [built] -chunk {8} main.js (main) 343 bytes >{0}< >{1}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< [entry] [rendered] +chunk {0} async-a~async-b.js (async-a~async-b) 134 bytes <{1}> ={2}= ={3}= [rendered] split chunk (cache group: default) (name: async-a~async-b) + > ./a [0] ./index.js 1:0-47 + > ./b [0] ./index.js 2:0-47 + [8] ./x.js 67 bytes {0} {4} {5} {6} {7} {8} [built] + [9] ./y.js 67 bytes {0} [built] +chunk {1} main.js (main) 343 bytes >{0}< >{2}< >{3}< >{4}< >{5}< >{6}< >{7}< >{8}< [entry] [rendered] > ./ main - [9] ./index.js 343 bytes {8} [built]" + [0] ./index.js 343 bytes {1} [built] +chunk {2} async-a.js (async-a) 48 bytes <{1}> ={0}= [rendered] + > ./a [0] ./index.js 1:0-47 + [1] ./a.js 48 bytes {2} [built] +chunk {3} async-b.js (async-b) 48 bytes <{1}> ={0}= [rendered] + > ./b [0] ./index.js 2:0-47 + [2] ./b.js 48 bytes {3} [built] +chunk {4} async-c.js (async-c) 101 bytes <{1}> [rendered] + > ./c [0] ./index.js 3:0-47 + [3] ./c.js 34 bytes {4} [built] + [8] ./x.js 67 bytes {0} {4} {5} {6} {7} {8} [built] +chunk {5} async-d.js (async-d) 101 bytes <{1}> [rendered] + > ./d [0] ./index.js 4:0-47 + [4] ./d.js 34 bytes {5} [built] + [8] ./x.js 67 bytes {0} {4} {5} {6} {7} {8} [built] +chunk {6} async-e.js (async-e) 101 bytes <{1}> [rendered] + > ./e [0] ./index.js 5:0-47 + [5] ./e.js 34 bytes {6} [built] + [8] ./x.js 67 bytes {0} {4} {5} {6} {7} {8} [built] +chunk {7} async-f.js (async-f) 101 bytes <{1}> [rendered] + > ./f [0] ./index.js 6:0-47 + [6] ./f.js 34 bytes {7} [built] + [8] ./x.js 67 bytes {0} {4} {5} {6} {7} {8} [built] +chunk {8} async-g.js (async-g) 101 bytes <{1}> [rendered] + > ./g [0] ./index.js 7:0-47 + [7] ./g.js 34 bytes {8} [built] + [8] ./x.js 67 bytes {0} {4} {5} {6} {7} {8} [built]" `; exports[`StatsTestCases should print correct stats for split-chunks-issue-6413 1`] = ` "Entrypoint main = main.js -chunk {0} vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{5}> ={1}= ={2}= ={3}= ={4}= [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) - > ./a [5] ./index.js 1:0-47 - > ./b [5] ./index.js 2:0-47 - > ./c [5] ./index.js 3:0-47 - [1] ./node_modules/x.js 20 bytes {0} [built] -chunk {1} async-a~async-b~async-c.js (async-a~async-b~async-c) 11 bytes <{5}> ={0}= ={2}= ={3}= ={4}= [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) - > ./a [5] ./index.js 1:0-47 - > ./b [5] ./index.js 2:0-47 - > ./c [5] ./index.js 3:0-47 - [0] ./common.js 11 bytes {1} [built] -chunk {2} async-a.js (async-a) 19 bytes <{5}> ={0}= ={1}= [rendered] - > ./a [5] ./index.js 1:0-47 - [2] ./a.js 19 bytes {2} [built] -chunk {3} async-b.js (async-b) 19 bytes <{5}> ={0}= ={1}= [rendered] - > ./b [5] ./index.js 2:0-47 - [3] ./b.js 19 bytes {3} [built] -chunk {4} async-c.js (async-c) 19 bytes <{5}> ={0}= ={1}= [rendered] - > ./c [5] ./index.js 3:0-47 - [4] ./c.js 19 bytes {4} [built] -chunk {5} main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< >{4}< [entry] [rendered] +chunk {0} vendors~async-a~async-b~async-c.js (vendors~async-a~async-b~async-c) 20 bytes <{2}> ={1}= ={3}= ={4}= ={5}= [rendered] split chunk (cache group: vendors) (name: vendors~async-a~async-b~async-c) + > ./a [0] ./index.js 1:0-47 + > ./b [0] ./index.js 2:0-47 + > ./c [0] ./index.js 3:0-47 + [5] ./node_modules/x.js 20 bytes {0} [built] +chunk {1} async-a~async-b~async-c.js (async-a~async-b~async-c) 11 bytes <{2}> ={0}= ={3}= ={4}= ={5}= [rendered] split chunk (cache group: default) (name: async-a~async-b~async-c) + > ./a [0] ./index.js 1:0-47 + > ./b [0] ./index.js 2:0-47 + > ./c [0] ./index.js 3:0-47 + [4] ./common.js 11 bytes {1} [built] +chunk {2} main.js (main) 147 bytes >{0}< >{1}< >{3}< >{4}< >{5}< [entry] [rendered] > ./ main - [5] ./index.js 147 bytes {5} [built]" + [0] ./index.js 147 bytes {2} [built] +chunk {3} async-a.js (async-a) 19 bytes <{2}> ={0}= ={1}= [rendered] + > ./a [0] ./index.js 1:0-47 + [1] ./a.js 19 bytes {3} [built] +chunk {4} async-b.js (async-b) 19 bytes <{2}> ={0}= ={1}= [rendered] + > ./b [0] ./index.js 2:0-47 + [2] ./b.js 19 bytes {4} [built] +chunk {5} async-c.js (async-c) 19 bytes <{2}> ={0}= ={1}= [rendered] + > ./c [0] ./index.js 3:0-47 + [3] ./c.js 19 bytes {5} [built]" `; exports[`StatsTestCases should print correct stats for split-chunks-issue-6696 1`] = ` "Entrypoint main = vendors.js main.js -chunk {0} async-a.js (async-a) 32 bytes <{2}> <{3}> [rendered] - > ./a [3] ./index.js 2:0-47 - [0] ./node_modules/x.js 20 bytes {0} {1} [built] - [1] ./a.js 12 bytes {0} [built] -chunk {1} async-b.js (async-b) 32 bytes <{2}> <{3}> [rendered] - > ./b [3] ./index.js 3:0-47 - [0] ./node_modules/x.js 20 bytes {0} {1} [built] - [2] ./b.js 12 bytes {1} [built] -chunk {2} main.js (main) 110 bytes ={3}= >{0}< >{1}< [entry] [rendered] +chunk {0} main.js (main) 110 bytes ={3}= >{1}< >{2}< [entry] [rendered] > ./ main - [3] ./index.js 110 bytes {2} [built] -chunk {3} vendors.js (vendors) 20 bytes ={2}= >{0}< >{1}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) + [0] ./index.js 110 bytes {0} [built] +chunk {1} async-a.js (async-a) 32 bytes <{0}> <{3}> [rendered] + > ./a [0] ./index.js 2:0-47 + [2] ./a.js 12 bytes {1} [built] + [4] ./node_modules/x.js 20 bytes {1} {2} [built] +chunk {2} async-b.js (async-b) 32 bytes <{0}> <{3}> [rendered] + > ./b [0] ./index.js 3:0-47 + [3] ./b.js 12 bytes {2} [built] + [4] ./node_modules/x.js 20 bytes {1} {2} [built] +chunk {3} vendors.js (vendors) 20 bytes ={0}= >{1}< >{2}< [initial] [rendered] split chunk (cache group: vendors) (name: vendors) > ./ main - [4] ./node_modules/y.js 20 bytes {3} [built]" + [1] ./node_modules/y.js 20 bytes {3} [built]" `; exports[`StatsTestCases should print correct stats for split-chunks-issue-7401 1`] = ` "Entrypoint a = vendors~a~c.js a.js Entrypoint b = b.js Chunk Group c = vendors~a~c.js c.js -chunk {0} vendors~a~c.js (vendors~a~c) 20 bytes <{3}> ={1}= ={2}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~c) +chunk {0} vendors~a~c.js (vendors~a~c) 20 bytes <{2}> ={1}= ={3}= [initial] [rendered] split chunk (cache group: vendors) (name: vendors~a~c) > ./a a - > ./c [3] ./b.js 1:0-41 + > ./c [2] ./b.js 1:0-41 [0] ./node_modules/x.js 20 bytes {0} [built] -chunk {1} c.js (c) 12 bytes <{3}> ={0}= [rendered] - > ./c [3] ./b.js 1:0-41 - [1] ./c.js 12 bytes {1} [built] -chunk {2} a.js (a) 12 bytes ={0}= [entry] [rendered] +chunk {1} a.js (a) 12 bytes ={0}= [entry] [rendered] > ./a a - [2] ./a.js 12 bytes {2} [built] -chunk {3} b.js (b) 43 bytes >{0}< >{1}< [entry] [rendered] + [1] ./a.js 12 bytes {1} [built] +chunk {2} b.js (b) 43 bytes >{0}< >{3}< [entry] [rendered] > ./b b - [3] ./b.js 43 bytes {3} [built]" + [2] ./b.js 43 bytes {2} [built] +chunk {3} c.js (c) 12 bytes <{2}> ={0}= [rendered] + > ./c [2] ./b.js 1:0-41 + [3] ./c.js 12 bytes {3} [built]" `; exports[`StatsTestCases should print correct stats for split-chunks-max-size 1`] = ` @@ -2958,30 +2958,30 @@ Child development: exports[`StatsTestCases should print correct stats for split-chunks-prefer-bigger-splits 1`] = ` "Entrypoint main = default/main.js -chunk {0} default/async-b~async-c.js (async-b~async-c) 110 bytes <{4}> ={2}= ={3}= [rendered] split chunk (cache group: default) (name: async-b~async-c) - > ./b [6] ./index.js 2:0-47 - > ./c [6] ./index.js 3:0-47 - [0] ./d.js 43 bytes {0} {1} [built] - [2] ./f.js 67 bytes {0} [built] -chunk {1} default/async-a.js (async-a) 134 bytes <{4}> [rendered] - > ./a [6] ./index.js 1:0-47 - [0] ./d.js 43 bytes {0} {1} [built] - [1] ./e.js 43 bytes {1} {2} [built] - [3] ./a.js 48 bytes {1} [built] -chunk {2} default/async-b.js (async-b) 105 bytes <{4}> ={0}= [rendered] - > ./b [6] ./index.js 2:0-47 - [1] ./e.js 43 bytes {1} {2} [built] - [4] ./b.js 62 bytes {2} [built] -chunk {3} default/async-c.js (async-c) 48 bytes <{4}> ={0}= [rendered] - > ./c [6] ./index.js 3:0-47 - [5] ./c.js 48 bytes {3} [built] -chunk {4} default/main.js (main) 147 bytes >{0}< >{1}< >{2}< >{3}< [entry] [rendered] +chunk {0} default/async-b~async-c.js (async-b~async-c) 110 bytes <{1}> ={3}= ={4}= [rendered] split chunk (cache group: default) (name: async-b~async-c) + > ./b [0] ./index.js 2:0-47 + > ./c [0] ./index.js 3:0-47 + [4] ./d.js 43 bytes {0} {2} [built] + [6] ./f.js 67 bytes {0} [built] +chunk {1} default/main.js (main) 147 bytes >{0}< >{2}< >{3}< >{4}< [entry] [rendered] > ./ main - [6] ./index.js 147 bytes {4} [built]" + [0] ./index.js 147 bytes {1} [built] +chunk {2} default/async-a.js (async-a) 134 bytes <{1}> [rendered] + > ./a [0] ./index.js 1:0-47 + [1] ./a.js 48 bytes {2} [built] + [4] ./d.js 43 bytes {0} {2} [built] + [5] ./e.js 43 bytes {2} {3} [built] +chunk {3} default/async-b.js (async-b) 105 bytes <{1}> ={0}= [rendered] + > ./b [0] ./index.js 2:0-47 + [2] ./b.js 62 bytes {3} [built] + [5] ./e.js 43 bytes {2} {3} [built] +chunk {4} default/async-c.js (async-c) 48 bytes <{1}> ={0}= [rendered] + > ./c [0] ./index.js 3:0-47 + [3] ./c.js 48 bytes {4} [built]" `; exports[`StatsTestCases should print correct stats for tree-shaking 1`] = ` -"Hash: 7664ceef8f3f695c9688 +"Hash: 676a77cd1dc12f6d6cc8 Time: Xms Built at: Thu Jan 01 1970 00:00:00 GMT Asset Size Chunks Chunk Names @@ -2995,13 +2995,13 @@ Entrypoint main = bundle.js [no exports used] [2] ./unknown.js 0 bytes {0} [built] [only some exports used: c] - [3] ./unknown2.js 0 bytes {0} [built] + [3] ./reexport-unknown.js 83 bytes {0} [built] + [exports: a, b, c, d] + [only some exports used: a, c] + [4] ./reexport-star-unknown.js 68 bytes {0} [built] + [only some exports used: a, c] + [5] ./unknown2.js 0 bytes {0} [built] [only some exports used: y] - [4] ./index.js 315 bytes {0} [built] - [no exports] - [5] ./require.include.js 36 bytes {0} [built] - [exports: a, default] - [no exports used] [6] ./reexport-known.js 49 bytes {0} [built] [exports: a, b] [only some exports used: a] @@ -3010,11 +3010,11 @@ Entrypoint main = bundle.js [only some exports used: a] [8] ./edge.js 45 bytes {0} [built] [only some exports used: y] - [9] ./reexport-unknown.js 83 bytes {0} [built] - [exports: a, b, c, d] - [only some exports used: a, c] -[10] ./reexport-star-unknown.js 68 bytes {0} [built] - [only some exports used: a, c]" + [9] ./index.js 315 bytes {0} [built] + [no exports] +[10] ./require.include.js 36 bytes {0} [built] + [exports: a, default] + [no exports used]" `; exports[`StatsTestCases should print correct stats for warnings-uglifyjs 1`] = ` diff --git a/test/configCases/chunk-index/order-multiple-entries/webpack.config.js b/test/configCases/chunk-index/order-multiple-entries/webpack.config.js index 52dd6319209..29d22978153 100644 --- a/test/configCases/chunk-index/order-multiple-entries/webpack.config.js +++ b/test/configCases/chunk-index/order-multiple-entries/webpack.config.js @@ -66,6 +66,8 @@ module.exports = { asyncIndex2: "0: ./async.js" }); const indicies = compilation.modules + .slice() + .sort((a, b) => a.index - b.index) .map( m => `${m.index}: ${m.readableIdentifier( @@ -74,6 +76,8 @@ module.exports = { ) .join(", "); const indicies2 = compilation.modules + .slice() + .sort((a, b) => a.index2 - b.index2) .map( m => `${m.index2}: ${m.readableIdentifier( @@ -82,10 +86,10 @@ module.exports = { ) .join(", "); expect(indicies).toEqual( - "2: ./shared.js, 4: ./c.js, 3: ./b.js, 1: ./a.js, 6: ./async.js, 5: ./entry2.js, 0: ./entry1.js" + "0: ./entry1.js, 1: ./a.js, 2: ./shared.js, 3: ./b.js, 4: ./c.js, 5: ./entry2.js, 6: ./async.js" ); expect(indicies2).toEqual( - "0: ./shared.js, 3: ./c.js, 2: ./b.js, 1: ./a.js, 6: ./async.js, 5: ./entry2.js, 4: ./entry1.js" + "0: ./shared.js, 1: ./a.js, 2: ./b.js, 3: ./c.js, 4: ./entry1.js, 5: ./entry2.js, 6: ./async.js" ); }); }; diff --git a/test/configCases/code-generation/use-strict/index.js b/test/configCases/code-generation/use-strict/index.js index cf05674bee8..8f132820682 100644 --- a/test/configCases/code-generation/use-strict/index.js +++ b/test/configCases/code-generation/use-strict/index.js @@ -15,12 +15,14 @@ it("should include only one use strict per module", function() { match = regExp.exec(source); } + matches.sort(); + expect(matches).toEqual([ - "__webpack_require__.r(__webpack_exports__);", "/* unused harmony default export */ var _unused_webpack_default_export = (\"a\");", "__webpack_require__.r(__webpack_exports__);", "__webpack_require__.r(__webpack_exports__);", "__webpack_require__.r(__webpack_exports__);", + "__webpack_require__.r(__webpack_exports__);", "it(\"should include only one use strict per module\", function() {", ]); }); diff --git a/test/configCases/hash-length/output-filename/test.config.js b/test/configCases/hash-length/output-filename/test.config.js index c378cab5525..224a52035b7 100644 --- a/test/configCases/hash-length/output-filename/test.config.js +++ b/test/configCases/hash-length/output-filename/test.config.js @@ -18,7 +18,7 @@ module.exports = { var bundleDetects = [ options.amd.expectedChunkFilenameLength && { - regex: new RegExp("^0.bundle" + i, "i"), + regex: new RegExp("^\\d+.bundle" + i, "i"), expectedNameLength: options.amd.expectedChunkFilenameLength }, { diff --git a/test/configCases/plugins/banner-plugin/index.js b/test/configCases/plugins/banner-plugin/index.js index 105a1f91b12..02653b73aeb 100644 --- a/test/configCases/plugins/banner-plugin/index.js +++ b/test/configCases/plugins/banner-plugin/index.js @@ -6,7 +6,7 @@ it("should contain banner in bundle0 chunk", () => { expect(source).toMatch("A test value"); expect(source).toMatch("banner is a string"); expect(source).toMatch("banner is a function"); - expect(source).toMatch("/*!\n * multiline\n * banner\n * 1\n */"); + expect(source).toMatch("/*!\n * multiline\n * banner\n * bundle0\n */"); }); it("should not contain banner in vendors chunk", () => { diff --git a/test/configCases/plugins/banner-plugin/webpack.config.js b/test/configCases/plugins/banner-plugin/webpack.config.js index fcaaee27a46..ed4baebb4d1 100644 --- a/test/configCases/plugins/banner-plugin/webpack.config.js +++ b/test/configCases/plugins/banner-plugin/webpack.config.js @@ -19,7 +19,7 @@ module.exports = { exclude: ["vendors.js"] }), new webpack.BannerPlugin({ - banner: ({ chunk }) => `multiline\nbanner\n${chunk.id}` + banner: ({ chunk }) => `multiline\nbanner\n${chunk.name}` }) ] }; From b2b4be046ee82455f04f3e6afa6e67df0db684cc Mon Sep 17 00:00:00 2001 From: Josh Unger Date: Fri, 13 Jul 2018 08:17:04 -0600 Subject: [PATCH 173/310] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f8dabebe47d..5c009e538c7 100644 --- a/README.md +++ b/README.md @@ -96,9 +96,12 @@ within webpack itself use this plugin interface. This makes webpack very |[compression-webpack-plugin][compression]|![compression-npm]|![compression-size]|Prepares compressed versions of assets to serve them with Content-Encoding| |[i18n-webpack-plugin][i18n]|![i18n-npm]|![i18n-size]|Adds i18n support to your bundles| |[html-webpack-plugin][html-plugin]|![html-plugin-npm]|![html-plugin-size]| Simplifies creation of HTML files (`index.html`) to serve your bundles| - +|[extract-text-webpack-plugin][extract]|![extract-npm]|![extract-size]|Extract text from a bundle, or bundles, into a separate file| [common-npm]: https://img.shields.io/npm/v/webpack.svg +[extract]: https://github.com/webpack/extract-text-webpack-plugin +[extract-npm]: https://img.shields.io/npm/v/extract-text-webpack-plugin.svg +[extract-size]: https://packagephobia.now.sh/badge?p=extract-text-webpack-plugin [mini-css]: https://github.com/webpack-contrib/mini-css-extract-plugin [mini-css-npm]: https://img.shields.io/npm/v/mini-css-extract-plugin.svg [mini-css-size]: https://packagephobia.now.sh/badge?p=mini-css-extract-plugin From 7195bae9b48dd2dbe2fe7000d152bff6a82971c5 Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Sat, 14 Jul 2018 22:52:42 +0200 Subject: [PATCH 174/310] Update ESLint and Prettier --- lib/Compilation.js | 1 + package.json | 8 +- yarn.lock | 430 +++++++++++++++++++-------------------------- 3 files changed, 183 insertions(+), 256 deletions(-) diff --git a/lib/Compilation.js b/lib/Compilation.js index ec97accdd90..89af485d333 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -888,6 +888,7 @@ class Compilation extends Tapable { // leaking the Compilation object. if (err) { + // eslint-disable-next-line no-self-assign err.stack = err.stack; return callback(err); } diff --git a/package.json b/package.json index 2120e5e4ec4..2327cc6144c 100644 --- a/package.json +++ b/package.json @@ -43,11 +43,11 @@ "coveralls": "^2.11.2", "css-loader": "^0.28.3", "es6-promise-polyfill": "^1.1.1", - "eslint": "^4.19.1", + "eslint": "^5.1.0", "eslint-config-prettier": "^2.9.0", "eslint-plugin-jest": "^21.17.0", "eslint-plugin-node": "^6.0.1", - "eslint-plugin-prettier": "^2.6.0", + "eslint-plugin-prettier": "^2.6.2", "express": "~4.13.1", "file-loader": "^1.1.6", "glob": "^7.1.2", @@ -61,9 +61,9 @@ "json-loader": "^0.5.7", "less": "^2.5.1", "less-loader": "^4.0.3", - "lint-staged": "^7.1.0", + "lint-staged": "^7.2.0", "lodash": "^4.17.4", - "prettier": "^1.13.5", + "prettier": "^1.13.7", "pug": "^2.0.3", "pug-loader": "^2.4.0", "raw-loader": "~0.5.0", diff --git a/yarn.lock b/yarn.lock index 40ab5125d53..bdc8665cff9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16,6 +16,12 @@ esutils "^2.0.2" js-tokens "^3.0.0" +"@samverschueren/stream-to-observable@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz#ecdf48d532c58ea477acfcab80348424f8d0662f" + dependencies: + any-observable "^0.3.0" + "@types/babel-types@*", "@types/babel-types@^7.0.0": version "7.0.2" resolved "https://registry.yarnpkg.com/@types/babel-types/-/babel-types-7.0.2.tgz#63dc3e5e7f6367e1819d2bba5213783cd926c5d5" @@ -229,11 +235,11 @@ acorn-globals@^4.1.0: dependencies: acorn "^5.0.0" -acorn-jsx@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" +acorn-jsx@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-4.1.1.tgz#e8e41e48ea2fe0c896740610ab6a4ffd8add225e" dependencies: - acorn "^3.0.4" + acorn "^5.0.3" acorn@^1.0.1: version "1.2.2" @@ -243,7 +249,7 @@ acorn@^2.1.0: version "2.7.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-2.7.0.tgz#ab6e7d9d886aaca8b085bc3312b79a198433f0e7" -acorn@^3.0.4, acorn@^3.1.0: +acorn@^3.1.0: version "3.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" @@ -251,19 +257,15 @@ acorn@^4.0.4, acorn@~4.0.2: version "4.0.13" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" -acorn@^5.0.0, acorn@^5.3.0: +acorn@^5.0.0, acorn@^5.0.3, acorn@^5.3.0, acorn@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" -acorn@^5.5.0, acorn@^5.6.2: +acorn@^5.6.2: version "5.6.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.6.2.tgz#b1da1d7be2ac1b4a327fb9eab851702c5045b4e7" -ajv-keywords@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762" - -ajv-keywords@^3.1.0: +ajv-keywords@^3.0.0, ajv-keywords@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.2.0.tgz#e86b819c602cf8821ad637413698f1dec021847a" @@ -274,7 +276,7 @@ ajv@^4.9.1: co "^4.6.0" json-stable-stringify "^1.0.1" -ajv@^5.0.0, ajv@^5.1.0, ajv@^5.2.3, ajv@^5.3.0: +ajv@^5.0.0, ajv@^5.1.0: version "5.5.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" dependencies: @@ -283,6 +285,15 @@ ajv@^5.0.0, ajv@^5.1.0, ajv@^5.2.3, ajv@^5.3.0: fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" +ajv@^6.0.1, ajv@^6.5.0: + version "6.5.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.2.tgz#678495f9b82f7cca6be248dd92f59bff5e1f4360" + dependencies: + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.1" + ajv@^6.1.0: version "6.5.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.0.tgz#4c8affdf80887d8f132c9c52ab8a2dc4d0b7b24c" @@ -334,9 +345,9 @@ ansi-styles@^3.1.0, ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -any-observable@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.2.0.tgz#c67870058003579009083f54ac0abafb5c33d242" +any-observable@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.3.0.tgz#af933475e5806a67d0d7df090dd5e8bef65d119b" anymatch@^2.0.0: version "2.0.0" @@ -511,7 +522,7 @@ aws4@^1.2.1, aws4@^1.6.0: version "1.7.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289" -babel-code-frame@^6.22.0, babel-code-frame@^6.26.0: +babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" dependencies: @@ -753,7 +764,7 @@ browser-process-hrtime@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz#425d68a58d3447f02a04aa894187fce8af8b7b8e" -browser-resolve@^1.11.2, browser-resolve@^1.11.3: +browser-resolve@^1.11.3: version "1.11.3" resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" dependencies: @@ -1246,7 +1257,7 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@^1.5.0, concat-stream@^1.6.0: +concat-stream@^1.5.0: version "1.6.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" dependencies: @@ -1340,6 +1351,14 @@ cosmiconfig@^4.0.0: parse-json "^4.0.0" require-from-string "^2.0.1" +cosmiconfig@^5.0.2: + version "5.0.5" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.0.5.tgz#a809e3c2306891ce17ab70359dc8bdf661fe2cd0" + dependencies: + is-directory "^0.3.1" + js-yaml "^3.9.0" + parse-json "^4.0.0" + coveralls@^2.11.2: version "2.13.3" resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-2.13.3.tgz#9ad7c2ae527417f361e8b626483f48ee92dd2bc7" @@ -1386,7 +1405,7 @@ create-react-class@^15.6.0: loose-envify "^1.3.1" object-assign "^4.1.1" -cross-spawn@^5.0.1, cross-spawn@^5.1.0: +cross-spawn@^5.0.1: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" dependencies: @@ -1394,6 +1413,16 @@ cross-spawn@^5.0.1, cross-spawn@^5.1.0: shebang-command "^1.2.0" which "^1.2.9" +cross-spawn@^6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + cryptiles@2.x.x: version "2.0.5" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" @@ -1786,7 +1815,7 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.5.1: +es-abstract@^1.10.0, es-abstract@^1.5.1: version "1.12.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" dependencies: @@ -1857,9 +1886,9 @@ eslint-plugin-node@^6.0.1: resolve "^1.3.3" semver "^5.4.1" -eslint-plugin-prettier@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.0.tgz#33e4e228bdb06142d03c560ce04ec23f6c767dd7" +eslint-plugin-prettier@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.6.2.tgz#71998c60aedfa2141f7bfcbf9d1c459bf98b4fad" dependencies: fast-diff "^1.1.1" jest-docblock "^21.0.0" @@ -1871,59 +1900,71 @@ eslint-scope@^3.7.1: esrecurse "^4.1.0" estraverse "^4.1.1" +eslint-scope@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-utils@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.3.1.tgz#9a851ba89ee7c460346f97cf8939c7298827e512" + eslint-visitor-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" -eslint@^4.19.1: - version "4.19.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300" +eslint@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.1.0.tgz#2ed611f1ce163c0fb99e1e0cda5af8f662dff645" dependencies: - ajv "^5.3.0" - babel-code-frame "^6.22.0" + ajv "^6.5.0" + babel-code-frame "^6.26.0" chalk "^2.1.0" - concat-stream "^1.6.0" - cross-spawn "^5.1.0" + cross-spawn "^6.0.5" debug "^3.1.0" doctrine "^2.1.0" - eslint-scope "^3.7.1" + eslint-scope "^4.0.0" + eslint-utils "^1.3.1" eslint-visitor-keys "^1.0.0" - espree "^3.5.4" - esquery "^1.0.0" + espree "^4.0.0" + esquery "^1.0.1" esutils "^2.0.2" file-entry-cache "^2.0.0" functional-red-black-tree "^1.0.1" glob "^7.1.2" - globals "^11.0.1" + globals "^11.7.0" ignore "^3.3.3" imurmurhash "^0.1.4" - inquirer "^3.0.6" - is-resolvable "^1.0.0" - js-yaml "^3.9.1" + inquirer "^5.2.0" + is-resolvable "^1.1.0" + js-yaml "^3.11.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" - lodash "^4.17.4" - minimatch "^3.0.2" + lodash "^4.17.5" + minimatch "^3.0.4" mkdirp "^0.5.1" natural-compare "^1.4.0" optionator "^0.8.2" path-is-inside "^1.0.2" pluralize "^7.0.0" progress "^2.0.0" - regexpp "^1.0.1" + regexpp "^1.1.0" require-uncached "^1.0.3" - semver "^5.3.0" + semver "^5.5.0" + string.prototype.matchall "^2.0.0" strip-ansi "^4.0.0" - strip-json-comments "~2.0.1" - table "4.0.2" - text-table "~0.2.0" + strip-json-comments "^2.0.1" + table "^4.0.3" + text-table "^0.2.0" -espree@^3.5.4: - version "3.5.4" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.4.tgz#b0f447187c8a8bed944b815a660bddf5deb5d1a7" +espree@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-4.0.0.tgz#253998f20a0f82db5d866385799d912a83a36634" dependencies: - acorn "^5.5.0" - acorn-jsx "^3.0.0" + acorn "^5.6.0" + acorn-jsx "^4.1.1" esprima@2.7.x, esprima@^2.6.0, esprima@^2.7.1: version "2.7.3" @@ -1937,7 +1978,7 @@ esprima@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" -esquery@^1.0.0: +esquery@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" dependencies: @@ -2038,17 +2079,6 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" -expect@^22.4.3: - version "22.4.3" - resolved "https://registry.yarnpkg.com/expect/-/expect-22.4.3.tgz#d5a29d0a0e1fb2153557caef2674d4547e914674" - dependencies: - ansi-styles "^3.2.0" - jest-diff "^22.4.3" - jest-get-type "^22.4.3" - jest-matcher-utils "^22.4.3" - jest-message-util "^22.4.3" - jest-regex-util "^22.4.3" - expect@^23.3.0: version "23.3.0" resolved "https://registry.yarnpkg.com/expect/-/expect-23.3.0.tgz#ecb051adcbdc40ac4db576c16067f12fdb13cc61" @@ -2107,7 +2137,7 @@ extend@~3.0.0, extend@~3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" -external-editor@^2.0.4: +external-editor@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" dependencies: @@ -2481,9 +2511,9 @@ glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^11.0.1: - version "11.5.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.5.0.tgz#6bc840de6771173b191f13d3a9c94d441ee92642" +globals@^11.7.0: + version "11.7.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673" globals@^9.18.0: version "9.18.0" @@ -2571,6 +2601,10 @@ has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" +has-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" + has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -2809,21 +2843,20 @@ ini@~1.3.0: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" -inquirer@^3.0.6: - version "3.3.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" +inquirer@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-5.2.0.tgz#db350c2b73daca77ff1243962e9f22f099685726" dependencies: ansi-escapes "^3.0.0" chalk "^2.0.0" cli-cursor "^2.1.0" cli-width "^2.0.0" - external-editor "^2.0.4" + external-editor "^2.1.0" figures "^2.0.0" lodash "^4.3.0" mute-stream "0.0.7" run-async "^2.2.0" - rx-lite "^4.0.8" - rx-lite-aggregates "^4.0.8" + rxjs "^5.5.2" string-width "^2.1.0" strip-ansi "^4.0.0" through "^2.3.6" @@ -3031,11 +3064,11 @@ is-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" -is-observable@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-0.2.0.tgz#b361311d83c6e5d726cabf5e250b0237106f5ae2" +is-observable@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-1.1.0.tgz#b3e986c8f44de950867cab5403f5a3465005975e" dependencies: - symbol-observable "^0.2.2" + symbol-observable "^1.1.0" is-path-cwd@^1.0.0: version "1.0.0" @@ -3093,7 +3126,7 @@ is-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" -is-resolvable@^1.0.0: +is-resolvable@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.1.0.tgz#fb18f87ce1feb925169c9a407c19318a3206ed88" @@ -3309,22 +3342,6 @@ jest-cli@^23.3.0: which "^1.2.12" yargs "^11.0.0" -jest-config@^22.4.3: - version "22.4.3" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-22.4.3.tgz#0e9d57db267839ea31309119b41dc2fa31b76403" - dependencies: - chalk "^2.0.1" - glob "^7.1.1" - jest-environment-jsdom "^22.4.3" - jest-environment-node "^22.4.3" - jest-get-type "^22.4.3" - jest-jasmine2 "^22.4.3" - jest-regex-util "^22.4.3" - jest-resolve "^22.4.3" - jest-util "^22.4.3" - jest-validate "^22.4.3" - pretty-format "^22.4.3" - jest-config@^23.3.0: version "23.3.0" resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.3.0.tgz#bb4d53b70f9500fafddf718d226abb53b13b8323" @@ -3343,15 +3360,6 @@ jest-config@^23.3.0: jest-validate "^23.3.0" pretty-format "^23.2.0" -jest-diff@^22.4.3: - version "22.4.3" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-22.4.3.tgz#e18cc3feff0aeef159d02310f2686d4065378030" - dependencies: - chalk "^2.0.1" - diff "^3.2.0" - jest-get-type "^22.4.3" - pretty-format "^22.4.3" - jest-diff@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.2.0.tgz#9f2cf4b51e12c791550200abc16b47130af1062a" @@ -3378,14 +3386,6 @@ jest-each@^23.2.0: chalk "^2.0.1" pretty-format "^23.2.0" -jest-environment-jsdom@^22.4.3: - version "22.4.3" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-22.4.3.tgz#d67daa4155e33516aecdd35afd82d4abf0fa8a1e" - dependencies: - jest-mock "^22.4.3" - jest-util "^22.4.3" - jsdom "^11.5.1" - jest-environment-jsdom@^23.3.0: version "23.3.0" resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.3.0.tgz#190457f91c9e615454c4186056065db6ed7a4e2a" @@ -3394,13 +3394,6 @@ jest-environment-jsdom@^23.3.0: jest-util "^23.3.0" jsdom "^11.5.1" -jest-environment-node@^22.4.3: - version "22.4.3" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-22.4.3.tgz#54c4eaa374c83dd52a9da8759be14ebe1d0b9129" - dependencies: - jest-mock "^22.4.3" - jest-util "^22.4.3" - jest-environment-node@^23.3.0: version "23.3.0" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.3.0.tgz#1e8df21c847aa5d03b76573f0dc16fcde5034c32" @@ -3408,7 +3401,7 @@ jest-environment-node@^23.3.0: jest-mock "^23.2.0" jest-util "^23.3.0" -jest-get-type@^22.1.0, jest-get-type@^22.4.3: +jest-get-type@^22.1.0: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4" @@ -3424,22 +3417,6 @@ jest-haste-map@^23.2.0: micromatch "^3.1.10" sane "^2.0.0" -jest-jasmine2@^22.4.3: - version "22.4.3" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-22.4.3.tgz#4daf64cd14c793da9db34a7c7b8dcfe52a745965" - dependencies: - chalk "^2.0.1" - co "^4.6.0" - expect "^22.4.3" - graceful-fs "^4.1.11" - is-generator-fn "^1.0.0" - jest-diff "^22.4.3" - jest-matcher-utils "^22.4.3" - jest-message-util "^22.4.3" - jest-snapshot "^22.4.3" - jest-util "^22.4.3" - source-map-support "^0.5.0" - jest-jasmine2@^23.3.0: version "23.3.0" resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.3.0.tgz#a8706baac23c8a130d5aa8ef5464a9d49096d1b5" @@ -3462,14 +3439,6 @@ jest-leak-detector@^23.2.0: dependencies: pretty-format "^23.2.0" -jest-matcher-utils@^22.4.3: - version "22.4.3" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-22.4.3.tgz#4632fe428ebc73ebc194d3c7b65d37b161f710ff" - dependencies: - chalk "^2.0.1" - jest-get-type "^22.4.3" - pretty-format "^22.4.3" - jest-matcher-utils@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.2.0.tgz#4d4981f23213e939e3cedf23dc34c747b5ae1913" @@ -3478,16 +3447,6 @@ jest-matcher-utils@^23.2.0: jest-get-type "^22.1.0" pretty-format "^23.2.0" -jest-message-util@^22.4.3: - version "22.4.3" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-22.4.3.tgz#cf3d38aafe4befddbfc455e57d65d5239e399eb7" - dependencies: - "@babel/code-frame" "^7.0.0-beta.35" - chalk "^2.0.1" - micromatch "^2.3.11" - slash "^1.0.0" - stack-utils "^1.0.1" - jest-message-util@^23.0.0, jest-message-util@^23.3.0: version "23.3.0" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.3.0.tgz#bc07b11cec6971fb5dd9de2dfb60ebc22150c160" @@ -3498,18 +3457,10 @@ jest-message-util@^23.0.0, jest-message-util@^23.3.0: slash "^1.0.0" stack-utils "^1.0.1" -jest-mock@^22.4.3: - version "22.4.3" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-22.4.3.tgz#f63ba2f07a1511772cdc7979733397df770aabc7" - jest-mock@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.2.0.tgz#ad1c60f29e8719d47c26e1138098b6d18b261134" -jest-regex-util@^22.4.3: - version "22.4.3" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-22.4.3.tgz#a826eb191cdf22502198c5401a1fc04de9cef5af" - jest-regex-util@^23.3.0: version "23.3.0" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.3.0.tgz#5f86729547c2785c4002ceaa8f849fe8ca471bc5" @@ -3521,13 +3472,6 @@ jest-resolve-dependencies@^23.3.0: jest-regex-util "^23.3.0" jest-snapshot "^23.3.0" -jest-resolve@^22.4.3: - version "22.4.3" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-22.4.3.tgz#0ce9d438c8438229aa9b916968ec6b05c1abb4ea" - dependencies: - browser-resolve "^1.11.2" - chalk "^2.0.1" - jest-resolve@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.2.0.tgz#a0790ad5a3b99002ab4dbfcbf8d9e2d6a69b3d99" @@ -3591,17 +3535,6 @@ jest-silent-reporter@^0.0.5: chalk "^2.3.1" jest-util "^23.0.0" -jest-snapshot@^22.4.3: - version "22.4.3" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-22.4.3.tgz#b5c9b42846ffb9faccb76b841315ba67887362d2" - dependencies: - chalk "^2.0.1" - jest-diff "^22.4.3" - jest-matcher-utils "^22.4.3" - mkdirp "^0.5.1" - natural-compare "^1.4.0" - pretty-format "^22.4.3" - jest-snapshot@^23.3.0: version "23.3.0" resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.3.0.tgz#fc4e9f81e45432d10507e27f50bce60f44d81424" @@ -3618,18 +3551,6 @@ jest-snapshot@^23.3.0: pretty-format "^23.2.0" semver "^5.5.0" -jest-util@^22.4.3: - version "22.4.3" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-22.4.3.tgz#c70fec8eec487c37b10b0809dc064a7ecf6aafac" - dependencies: - callsites "^2.0.0" - chalk "^2.0.1" - graceful-fs "^4.1.11" - is-ci "^1.0.10" - jest-message-util "^22.4.3" - mkdirp "^0.5.1" - source-map "^0.6.0" - jest-util@^23.0.0: version "23.0.1" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.0.1.tgz#68ea5bd7edb177d3059f9797259f8e0dacce2f99" @@ -3655,15 +3576,14 @@ jest-util@^23.3.0: slash "^1.0.0" source-map "^0.6.0" -jest-validate@^22.4.0, jest-validate@^22.4.3: - version "22.4.3" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-22.4.3.tgz#0780954a5a7daaeec8d3c10834b9280865976b30" +jest-validate@^23.0.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.4.0.tgz#d96eede01ef03ac909c009e9c8e455197d48c201" dependencies: chalk "^2.0.1" - jest-config "^22.4.3" - jest-get-type "^22.4.3" + jest-get-type "^22.1.0" leven "^2.1.0" - pretty-format "^22.4.3" + pretty-format "^23.2.0" jest-validate@^23.3.0: version "23.3.0" @@ -3722,14 +3642,14 @@ js-yaml@3.6.1: argparse "^1.0.7" esprima "^2.6.0" -js-yaml@3.x, js-yaml@^3.9.0, js-yaml@^3.9.1: +js-yaml@3.x, js-yaml@^3.9.0: version "3.11.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef" dependencies: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^3.7.0: +js-yaml@^3.11.0, js-yaml@^3.7.0: version "3.12.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" dependencies: @@ -3798,6 +3718,10 @@ json-schema-traverse@^0.3.0: version "0.3.1" resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" @@ -3925,22 +3849,22 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" -lint-staged@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-7.1.0.tgz#1514a5b71b8d9492ca0c3d2a44769cbcbc8bcc79" +lint-staged@^7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-7.2.0.tgz#bdf4bb7f2f37fe689acfaec9999db288a5b26888" dependencies: app-root-path "^2.0.1" chalk "^2.3.1" commander "^2.14.1" - cosmiconfig "^4.0.0" + cosmiconfig "^5.0.2" debug "^3.1.0" dedent "^0.7.0" execa "^0.9.0" find-parent-dir "^0.3.0" is-glob "^4.0.0" is-windows "^1.0.2" - jest-validate "^22.4.0" - listr "^0.13.0" + jest-validate "^23.0.0" + listr "^0.14.1" lodash "^4.17.5" log-symbols "^2.2.0" micromatch "^3.1.8" @@ -3979,15 +3903,15 @@ listr-verbose-renderer@^0.4.0: date-fns "^1.27.2" figures "^1.7.0" -listr@^0.13.0: - version "0.13.0" - resolved "https://registry.yarnpkg.com/listr/-/listr-0.13.0.tgz#20bb0ba30bae660ee84cc0503df4be3d5623887d" +listr@^0.14.1: + version "0.14.1" + resolved "https://registry.yarnpkg.com/listr/-/listr-0.14.1.tgz#8a7afa4a7135cee4c921d128e0b7dfc6e522d43d" dependencies: - chalk "^1.1.3" + "@samverschueren/stream-to-observable" "^0.3.0" cli-truncate "^0.2.1" figures "^1.7.0" indent-string "^2.1.0" - is-observable "^0.2.0" + is-observable "^1.1.0" is-promise "^2.1.0" is-stream "^1.1.0" listr-silent-renderer "^1.1.1" @@ -3997,8 +3921,7 @@ listr@^0.13.0: log-update "^1.0.2" ora "^0.2.3" p-map "^1.1.1" - rxjs "^5.4.2" - stream-to-observable "^0.2.0" + rxjs "^6.1.0" strip-ansi "^3.0.1" load-json-file@^1.0.0: @@ -4395,6 +4318,10 @@ neo-async@^2.5.0: version "2.5.1" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.1.tgz#acb909e327b1e87ec9ef15f41b8a269512ad41ee" +nice-try@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4" + node-fetch@^1.0.1: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" @@ -4800,7 +4727,7 @@ path-is-inside@^1.0.1, path-is-inside@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" -path-key@^2.0.0: +path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" @@ -5148,16 +5075,9 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -prettier@^1.13.5: - version "1.13.5" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.5.tgz#7ae2076998c8edce79d63834e9b7b09fead6bfd0" - -pretty-format@^22.4.3: - version "22.4.3" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-22.4.3.tgz#f873d780839a9c02e9664c8a082e9ee79eaac16f" - dependencies: - ansi-regex "^3.0.0" - ansi-styles "^3.2.0" +prettier@^1.13.7: + version "1.13.7" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.7.tgz#850f3b8af784a49a6ea2d2eaa7ed1428a34b7281" pretty-format@^23.2.0: version "23.2.0" @@ -5565,7 +5485,13 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexpp@^1.0.1: +regexp.prototype.flags@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz#6b30724e306a27833eeb171b66ac8890ba37e41c" + dependencies: + define-properties "^1.1.2" + +regexpp@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.1.0.tgz#0e3516dd0b7904f413d2d4193dce4618c3a689ab" @@ -5809,21 +5735,17 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -rx-lite-aggregates@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" +rxjs@^5.5.2: + version "5.5.11" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.11.tgz#f733027ca43e3bec6b994473be4ab98ad43ced87" dependencies: - rx-lite "*" - -rx-lite@*, rx-lite@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" + symbol-observable "1.0.1" -rxjs@^5.4.2: - version "5.5.10" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.10.tgz#fde02d7a614f6c8683d0d1957827f492e09db045" +rxjs@^6.1.0: + version "6.2.2" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.2.2.tgz#eb75fa3c186ff5289907d06483a77884586e1cf9" dependencies: - symbol-observable "1.0.1" + tslib "^1.9.0" safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" @@ -6073,7 +5995,7 @@ source-map-support@^0.4.15: dependencies: source-map "^0.5.6" -source-map-support@^0.5.0, source-map-support@^0.5.6: +source-map-support@^0.5.6: version "0.5.6" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13" dependencies: @@ -6218,12 +6140,6 @@ stream-shift@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" -stream-to-observable@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/stream-to-observable/-/stream-to-observable-0.2.0.tgz#59d6ea393d87c2c0ddac10aa0d561bc6ba6f0e10" - dependencies: - any-observable "^0.2.0" - strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" @@ -6254,6 +6170,16 @@ string-width@^1.0.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +string.prototype.matchall@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-2.0.0.tgz#2af8fe3d2d6dc53ca2a59bd376b089c3c152b3c8" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.10.0" + function-bind "^1.1.1" + has-symbols "^1.0.0" + regexp.prototype.flags "^1.2.0" + string_decoder@^1.0.0, string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" @@ -6298,7 +6224,7 @@ strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" -strip-json-comments@~2.0.1: +strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" @@ -6347,20 +6273,20 @@ symbol-observable@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" -symbol-observable@^0.2.2: - version "0.2.4" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-0.2.4.tgz#95a83db26186d6af7e7a18dbd9760a2f86d08f40" +symbol-observable@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" symbol-tree@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" -table@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" +table@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/table/-/table-4.0.3.tgz#00b5e2b602f1794b9acaf9ca908a76386a7813bc" dependencies: - ajv "^5.2.3" - ajv-keywords "^2.1.0" + ajv "^6.0.1" + ajv-keywords "^3.0.0" chalk "^2.1.0" lodash "^4.17.4" slice-ansi "1.0.0" @@ -6392,7 +6318,7 @@ test-exclude@^4.2.1: read-pkg-up "^1.0.1" require-main-filename "^1.0.1" -text-table@~0.2.0: +text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" From 4c19fe19ebcd6acfcbf8934104ac3d849d3b29f4 Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Sat, 14 Jul 2018 22:57:48 +0200 Subject: [PATCH 175/310] Use v4 of eslint-scope --- package.json | 2 +- yarn.lock | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 2120e5e4ec4..580cb6711cd 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "ajv-keywords": "^3.1.0", "chrome-trace-event": "^1.0.0", "enhanced-resolve": "^4.1.0", - "eslint-scope": "^3.7.1", + "eslint-scope": "^4.0.0", "json-parse-better-errors": "^1.0.2", "loader-runner": "^2.3.0", "loader-utils": "^1.1.0", diff --git a/yarn.lock b/yarn.lock index 40ab5125d53..fe3b3b99172 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1871,6 +1871,13 @@ eslint-scope@^3.7.1: esrecurse "^4.1.0" estraverse "^4.1.1" +eslint-scope@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + eslint-visitor-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" From 94b192c96f67346c179327378dc71cde54aac199 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 16 Jul 2018 10:26:56 +0200 Subject: [PATCH 176/310] fix merge issue --- yarn.lock | 7 ------- 1 file changed, 7 deletions(-) diff --git a/yarn.lock b/yarn.lock index bdc8665cff9..853394b5765 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1893,13 +1893,6 @@ eslint-plugin-prettier@^2.6.2: fast-diff "^1.1.1" jest-docblock "^21.0.0" -eslint-scope@^3.7.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - eslint-scope@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" From fa02f3d03344913f0a02d29cb363581bc8535bef Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 16 Jul 2018 10:27:17 +0200 Subject: [PATCH 177/310] 4.16.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8abe20b67dc..dd1fe8b9e7f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.16.0", + "version": "4.16.1", "author": "Tobias Koppers @sokra", "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", From f744c4a37f70d6f473f1ec0dfe49447e21878e6b Mon Sep 17 00:00:00 2001 From: Sven SAULEAU Date: Mon, 16 Jul 2018 13:56:53 +0200 Subject: [PATCH 178/310] chore: bump webassemblyjs 1.6.0 --- package.json | 10 +-- yarn.lock | 236 ++++++++++++++++++++++++--------------------------- 2 files changed, 116 insertions(+), 130 deletions(-) diff --git a/package.json b/package.json index dd1fe8b9e7f..d4e9bd2ec68 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,11 @@ "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.5.13", - "@webassemblyjs/helper-module-context": "1.5.13", - "@webassemblyjs/wasm-edit": "1.5.13", - "@webassemblyjs/wasm-opt": "1.5.13", - "@webassemblyjs/wasm-parser": "1.5.13", + "@webassemblyjs/ast": "1.6.0", + "@webassemblyjs/helper-module-context": "1.6.0", + "@webassemblyjs/wasm-edit": "1.6.0", + "@webassemblyjs/wasm-opt": "1.6.0", + "@webassemblyjs/wasm-parser": "1.6.0", "acorn": "^5.6.2", "acorn-dynamic-import": "^3.0.0", "ajv": "^6.1.0", diff --git a/yarn.lock b/yarn.lock index 853394b5765..fbd4edf328a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -56,140 +56,140 @@ "@types/source-list-map" "*" source-map "^0.6.1" -"@webassemblyjs/ast@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.5.13.tgz#81155a570bd5803a30ec31436bc2c9c0ede38f25" +"@webassemblyjs/ast@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.6.0.tgz#ec9473faf583aa9aeeabddba2512a3b085533381" dependencies: - "@webassemblyjs/helper-module-context" "1.5.13" - "@webassemblyjs/helper-wasm-bytecode" "1.5.13" - "@webassemblyjs/wast-parser" "1.5.13" + "@webassemblyjs/helper-module-context" "1.6.0" + "@webassemblyjs/helper-wasm-bytecode" "1.6.0" + "@webassemblyjs/wast-parser" "1.6.0" debug "^3.1.0" mamacro "^0.0.3" -"@webassemblyjs/floating-point-hex-parser@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.5.13.tgz#29ce0baa97411f70e8cce68ce9c0f9d819a4e298" +"@webassemblyjs/floating-point-hex-parser@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.6.0.tgz#d85a6d41360dfcccb06b67b1167d03ce9384abc2" -"@webassemblyjs/helper-api-error@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.5.13.tgz#e49b051d67ee19a56e29b9aa8bd949b5b4442a59" +"@webassemblyjs/helper-api-error@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.6.0.tgz#39ce66c87d890c63bc9821316b2fcc89179c3dc4" -"@webassemblyjs/helper-buffer@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.5.13.tgz#873bb0a1b46449231137c1262ddfd05695195a1e" +"@webassemblyjs/helper-buffer@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.6.0.tgz#7e60fb25ced9e9be6f6d657d45fcba107475b201" dependencies: debug "^3.1.0" -"@webassemblyjs/helper-code-frame@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.5.13.tgz#1bd2181b6a0be14e004f0fe9f5a660d265362b58" +"@webassemblyjs/helper-code-frame@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.6.0.tgz#9778e45f7fcbdc8840f3f815f99cdd075d91a1ef" dependencies: - "@webassemblyjs/wast-printer" "1.5.13" + "@webassemblyjs/wast-printer" "1.6.0" -"@webassemblyjs/helper-fsm@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.5.13.tgz#cdf3d9d33005d543a5c5e5adaabf679ffa8db924" +"@webassemblyjs/helper-fsm@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.6.0.tgz#1bea1a6a40e44ee4c4ea725e89c42ffe129793fc" -"@webassemblyjs/helper-module-context@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.5.13.tgz#dc29ddfb51ed657655286f94a5d72d8a489147c5" +"@webassemblyjs/helper-module-context@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.6.0.tgz#4a394968f9d1f81f34b16b141928d3e827bd6d2f" dependencies: debug "^3.1.0" mamacro "^0.0.3" -"@webassemblyjs/helper-wasm-bytecode@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.5.13.tgz#03245817f0a762382e61733146f5773def15a747" +"@webassemblyjs/helper-wasm-bytecode@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.6.0.tgz#1b23e2dee620478dd269f254fd981b0371fe612b" -"@webassemblyjs/helper-wasm-section@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.5.13.tgz#efc76f44a10d3073b584b43c38a179df173d5c7d" +"@webassemblyjs/helper-wasm-section@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.6.0.tgz#89ca6abd16b8dc0456063980374798c3b0dea8a8" dependencies: - "@webassemblyjs/ast" "1.5.13" - "@webassemblyjs/helper-buffer" "1.5.13" - "@webassemblyjs/helper-wasm-bytecode" "1.5.13" - "@webassemblyjs/wasm-gen" "1.5.13" + "@webassemblyjs/ast" "1.6.0" + "@webassemblyjs/helper-buffer" "1.6.0" + "@webassemblyjs/helper-wasm-bytecode" "1.6.0" + "@webassemblyjs/wasm-gen" "1.6.0" debug "^3.1.0" -"@webassemblyjs/ieee754@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.5.13.tgz#573e97c8c12e4eebb316ca5fde0203ddd90b0364" +"@webassemblyjs/ieee754@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.6.0.tgz#e0669b6713e1f02529b5211c94ecc3e747408692" dependencies: ieee754 "^1.1.11" -"@webassemblyjs/leb128@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.5.13.tgz#ab52ebab9cec283c1c1897ac1da833a04a3f4cee" +"@webassemblyjs/leb128@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.6.0.tgz#99cb0a827ab7adc482b8381b6ba64440dbe23471" dependencies: long "4.0.0" -"@webassemblyjs/utf8@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.5.13.tgz#6b53d2cd861cf94fa99c1f12779dde692fbc2469" - -"@webassemblyjs/wasm-edit@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.5.13.tgz#c9cef5664c245cf11b3b3a73110c9155831724a8" - dependencies: - "@webassemblyjs/ast" "1.5.13" - "@webassemblyjs/helper-buffer" "1.5.13" - "@webassemblyjs/helper-wasm-bytecode" "1.5.13" - "@webassemblyjs/helper-wasm-section" "1.5.13" - "@webassemblyjs/wasm-gen" "1.5.13" - "@webassemblyjs/wasm-opt" "1.5.13" - "@webassemblyjs/wasm-parser" "1.5.13" - "@webassemblyjs/wast-printer" "1.5.13" +"@webassemblyjs/utf8@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.6.0.tgz#7379d36c0557c22003193d51aa7573f60dc3e1a9" + +"@webassemblyjs/wasm-edit@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.6.0.tgz#35f56abf662b569d98e2549223842409c18efe0e" + dependencies: + "@webassemblyjs/ast" "1.6.0" + "@webassemblyjs/helper-buffer" "1.6.0" + "@webassemblyjs/helper-wasm-bytecode" "1.6.0" + "@webassemblyjs/helper-wasm-section" "1.6.0" + "@webassemblyjs/wasm-gen" "1.6.0" + "@webassemblyjs/wasm-opt" "1.6.0" + "@webassemblyjs/wasm-parser" "1.6.0" + "@webassemblyjs/wast-printer" "1.6.0" debug "^3.1.0" -"@webassemblyjs/wasm-gen@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.5.13.tgz#8e6ea113c4b432fa66540189e79b16d7a140700e" +"@webassemblyjs/wasm-gen@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.6.0.tgz#335bc862a5c3cd5b2a41a410719e172f35b7ed0b" dependencies: - "@webassemblyjs/ast" "1.5.13" - "@webassemblyjs/helper-wasm-bytecode" "1.5.13" - "@webassemblyjs/ieee754" "1.5.13" - "@webassemblyjs/leb128" "1.5.13" - "@webassemblyjs/utf8" "1.5.13" + "@webassemblyjs/ast" "1.6.0" + "@webassemblyjs/helper-wasm-bytecode" "1.6.0" + "@webassemblyjs/ieee754" "1.6.0" + "@webassemblyjs/leb128" "1.6.0" + "@webassemblyjs/utf8" "1.6.0" -"@webassemblyjs/wasm-opt@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.5.13.tgz#147aad7717a7ee4211c36b21a5f4c30dddf33138" +"@webassemblyjs/wasm-opt@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.6.0.tgz#9d5a13c58cfe98086285cfc9d6df89a90e02765b" dependencies: - "@webassemblyjs/ast" "1.5.13" - "@webassemblyjs/helper-buffer" "1.5.13" - "@webassemblyjs/wasm-gen" "1.5.13" - "@webassemblyjs/wasm-parser" "1.5.13" + "@webassemblyjs/ast" "1.6.0" + "@webassemblyjs/helper-buffer" "1.6.0" + "@webassemblyjs/wasm-gen" "1.6.0" + "@webassemblyjs/wasm-parser" "1.6.0" debug "^3.1.0" -"@webassemblyjs/wasm-parser@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.5.13.tgz#6f46516c5bb23904fbdf58009233c2dd8a54c72f" - dependencies: - "@webassemblyjs/ast" "1.5.13" - "@webassemblyjs/helper-api-error" "1.5.13" - "@webassemblyjs/helper-wasm-bytecode" "1.5.13" - "@webassemblyjs/ieee754" "1.5.13" - "@webassemblyjs/leb128" "1.5.13" - "@webassemblyjs/utf8" "1.5.13" - -"@webassemblyjs/wast-parser@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.5.13.tgz#5727a705d397ae6a3ae99d7f5460acf2ec646eea" - dependencies: - "@webassemblyjs/ast" "1.5.13" - "@webassemblyjs/floating-point-hex-parser" "1.5.13" - "@webassemblyjs/helper-api-error" "1.5.13" - "@webassemblyjs/helper-code-frame" "1.5.13" - "@webassemblyjs/helper-fsm" "1.5.13" +"@webassemblyjs/wasm-parser@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.6.0.tgz#1db1d6fb7f1057ab1b9dbebabf34ec33d5dd24c0" + dependencies: + "@webassemblyjs/ast" "1.6.0" + "@webassemblyjs/helper-api-error" "1.6.0" + "@webassemblyjs/helper-wasm-bytecode" "1.6.0" + "@webassemblyjs/ieee754" "1.6.0" + "@webassemblyjs/leb128" "1.6.0" + "@webassemblyjs/utf8" "1.6.0" + +"@webassemblyjs/wast-parser@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.6.0.tgz#ea3a569676e43ac4a0c5e82eb384812be2eb0b1b" + dependencies: + "@webassemblyjs/ast" "1.6.0" + "@webassemblyjs/floating-point-hex-parser" "1.6.0" + "@webassemblyjs/helper-api-error" "1.6.0" + "@webassemblyjs/helper-code-frame" "1.6.0" + "@webassemblyjs/helper-fsm" "1.6.0" long "^3.2.0" mamacro "^0.0.3" -"@webassemblyjs/wast-printer@1.5.13": - version "1.5.13" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.5.13.tgz#bb34d528c14b4f579e7ec11e793ec50ad7cd7c95" +"@webassemblyjs/wast-printer@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.6.0.tgz#a7df8e36b58eb3fea0c9389a71b22fe03977e56e" dependencies: - "@webassemblyjs/ast" "1.5.13" - "@webassemblyjs/wast-parser" "1.5.13" + "@webassemblyjs/ast" "1.6.0" + "@webassemblyjs/wast-parser" "1.6.0" long "^3.2.0" abab@^1.0.4: @@ -339,7 +339,7 @@ ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" -ansi-styles@^3.1.0, ansi-styles@^3.2.0, ansi-styles@^3.2.1: +ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" dependencies: @@ -963,7 +963,7 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.1: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" dependencies: @@ -971,14 +971,6 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" - dependencies: - ansi-styles "^3.1.0" - escape-string-regexp "^1.0.5" - supports-color "^4.0.0" - chalk@^2.3.1: version "2.3.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" @@ -2586,10 +2578,6 @@ has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" -has-flag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -2744,18 +2732,18 @@ iconv-lite@0.4.19: version "0.4.19" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" -iconv-lite@^0.4.17, iconv-lite@~0.4.13: - version "0.4.21" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.21.tgz#c47f8733d02171189ebc4a400f3218d348094798" - dependencies: - safer-buffer "^2.1.0" - -iconv-lite@^0.4.4: +iconv-lite@^0.4.17, iconv-lite@^0.4.4: version "0.4.23" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" dependencies: safer-buffer ">= 2.1.2 < 3" +iconv-lite@~0.4.13: + version "0.4.21" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.21.tgz#c47f8733d02171189ebc4a400f3218d348094798" + dependencies: + safer-buffer "^2.1.0" + icss-replace-symbols@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" @@ -2780,7 +2768,11 @@ ignore-walk@^3.0.1: dependencies: minimatch "^3.0.4" -ignore@^3.3.3, ignore@^3.3.6: +ignore@^3.3.3: + version "3.3.10" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" + +ignore@^3.3.6: version "3.3.8" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.8.tgz#3f8e9c35d38708a3a7e0e9abb6c73e7ee7707b2b" @@ -6238,12 +6230,6 @@ supports-color@^3.1.0, supports-color@^3.1.2, supports-color@^3.2.3: dependencies: has-flag "^1.0.0" -supports-color@^4.0.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" - dependencies: - has-flag "^2.0.0" - supports-color@^5.3.0, supports-color@^5.4.0: version "5.4.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" From b310b9b45c7e8a60c40d13dae967f74e712ec224 Mon Sep 17 00:00:00 2001 From: Sven SAULEAU Date: Mon, 16 Jul 2018 13:57:32 +0200 Subject: [PATCH 179/310] feat: remove LEB128 opt --- lib/wasm/WebAssemblyGenerator.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/lib/wasm/WebAssemblyGenerator.js b/lib/wasm/WebAssemblyGenerator.js index beafd9c465b..9b9eb54071f 100644 --- a/lib/wasm/WebAssemblyGenerator.js +++ b/lib/wasm/WebAssemblyGenerator.js @@ -9,7 +9,6 @@ const Template = require("../Template"); const WebAssemblyUtils = require("./WebAssemblyUtils"); const { RawSource } = require("webpack-sources"); -const { shrinkPaddedLEB128 } = require("@webassemblyjs/wasm-opt"); const { editWithAST, addWithAST } = require("@webassemblyjs/wasm-edit"); const { decode } = require("@webassemblyjs/wasm-parser"); const t = require("@webassemblyjs/ast"); @@ -26,17 +25,6 @@ const WebAssemblyExportImportedDependency = require("../dependencies/WebAssembly * @typedef {(ArrayBuffer) => ArrayBuffer} ArrayBufferTransform */ -/** - * Run some preprocessing on the binary before wasm-edit - * - * @param {ArrayBuffer} ab - original binary - * @returns {ArrayBufferTransform} transform - */ -const preprocess = ab => { - const optBin = shrinkPaddedLEB128(new Uint8Array(ab)); - return optBin.buffer; -}; - /** * @template T * @param {Function[]} fns transforms @@ -368,7 +356,6 @@ class WebAssemblyGenerator extends Generator { generate(module) { let bin = module.originalSource().source(); - bin = preprocess(bin); const initFuncId = t.identifier( Array.isArray(module.usedExports) From bc863596f4bb2a312f4b37132b297927bce8cb34 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 17 Jul 2018 11:47:22 +0200 Subject: [PATCH 180/310] remove unneeded type import --- lib/Chunk.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/Chunk.js b/lib/Chunk.js index 71b758304ae..7bdded08638 100644 --- a/lib/Chunk.js +++ b/lib/Chunk.js @@ -16,7 +16,6 @@ const ERR_CHUNK_INITIAL = /** @typedef {import("./Module")} Module */ /** @typedef {import("./ChunkGroup")} ChunkGroup */ -/** @typedef {import("./Entrypoint")} Entrypoint */ /** @typedef {import("./ModuleReason")} ModuleReason */ /** @typedef {import("webpack-sources").Source} Source */ /** @typedef {import("./util/createHash").Hash} Hash */ From e80d49445c9cc131014c2d42dd032ced9e1d66f8 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 19 Jul 2018 19:44:44 +0200 Subject: [PATCH 181/310] fix sorting of reasons --- lib/Stats.js | 22 +++++++++++++++++-- .../__snapshots__/StatsTestCases.test.js.snap | 2 +- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/lib/Stats.js b/lib/Stats.js index ecb373f00cb..b38210b6068 100644 --- a/lib/Stats.js +++ b/lib/Stats.js @@ -8,6 +8,7 @@ const RequestShortener = require("./RequestShortener"); const SizeFormatHelpers = require("./SizeFormatHelpers"); const formatLocation = require("./formatLocation"); const identifierUtils = require("./util/identifier"); +const compareLocations = require("./compareLocations"); const optionsOrFallback = (...args) => { let optionValues = []; @@ -523,6 +524,24 @@ class Stats { } if (showReasons) { obj.reasons = module.reasons + .sort((a, b) => { + if (a.module && !b.module) return -1; + if (!a.module && b.module) return 1; + if (a.module && b.module) { + //const cmp = a.module.index - b.module.index; + const cmp = compareId(a.module.id, b.module.id); + if (cmp) return cmp; + } + if (a.dependency && !b.dependency) return -1; + if (!a.dependency && b.dependency) return 1; + if (a.dependency && b.dependency) { + const cmp = compareLocations(a.dependency.loc, b.dependency.loc); + if (cmp) return cmp; + if (a.dependency.type < b.dependency.type) return -1; + if (a.dependency.type > b.dependency.type) return 1; + } + return 0; + }) .map(reason => { const obj = { moduleId: reason.module ? reason.module.id : null, @@ -548,8 +567,7 @@ class Stats { } } return obj; - }) - .sort(compareId); + }); } if (showUsedExports) { if (module.used === true) { diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index 5a4e72f6998..4fd3a906ca8 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -560,8 +560,8 @@ chunk {2} 2.bundle.js 60 bytes <{1}> [rendered] chunk {main} bundle.js (main) 73 bytes >{0}< >{1}< [entry] [rendered] > ./index main [./a.js] 22 bytes {main} [built] - cjs require ./a [./index.js] 1:0-14 cjs require ./a [./e.js] 1:0-14 + cjs require ./a [./index.js] 1:0-14 [./index.js] Xms -> factory:Xms building:Xms = Xms [./index.js] 51 bytes {main} [built] single entry ./index main From 80c3e433c4abed5fd6f5286e0077acce25922bc2 Mon Sep 17 00:00:00 2001 From: Abdulrahman Alkhelaifi Date: Thu, 19 Jul 2018 10:55:09 -0700 Subject: [PATCH 182/310] Handle module.require, require.main.require, and module.parent.require - Resolve module.require dependencies - Add require.main.require and module.parent.require as unsupported --- lib/NodeStuffPlugin.js | 18 ++++++++++ .../CommonJsRequireDependencyParserPlugin.js | 6 ++++ test/Errors.test.js | 36 +++++++++++++++++++ test/cases/parsing/issue-7728/a.js | 3 ++ test/cases/parsing/issue-7728/index.js | 4 +++ test/fixtures/errors/module.parent.require.js | 1 + test/fixtures/errors/require.main.require.js | 1 + 7 files changed, 69 insertions(+) create mode 100644 test/cases/parsing/issue-7728/a.js create mode 100644 test/cases/parsing/issue-7728/index.js create mode 100644 test/fixtures/errors/module.parent.require.js create mode 100644 test/fixtures/errors/require.main.require.js diff --git a/lib/NodeStuffPlugin.js b/lib/NodeStuffPlugin.js index 9ee407cd6df..75d2e73b063 100644 --- a/lib/NodeStuffPlugin.js +++ b/lib/NodeStuffPlugin.js @@ -108,6 +108,24 @@ class NodeStuffPlugin { "require.extensions is not supported by webpack. Use a loader instead." ) ); + parser.hooks.expression + .for("require.main.require") + .tap( + "NodeStuffPlugin", + ParserHelpers.expressionIsUnsupported( + parser, + "require.main.require is not supported by webpack." + ) + ); + parser.hooks.expression + .for("module.parent.require") + .tap( + "NodeStuffPlugin", + ParserHelpers.expressionIsUnsupported( + parser, + "module.parent.require is not supported by webpack." + ) + ); parser.hooks.expression .for("module.loaded") .tap("NodeStuffPlugin", expr => { diff --git a/lib/dependencies/CommonJsRequireDependencyParserPlugin.js b/lib/dependencies/CommonJsRequireDependencyParserPlugin.js index 29dc81749b2..875657348a7 100644 --- a/lib/dependencies/CommonJsRequireDependencyParserPlugin.js +++ b/lib/dependencies/CommonJsRequireDependencyParserPlugin.js @@ -125,6 +125,12 @@ class CommonJsRequireDependencyParserPlugin { parser.hooks.new .for("require") .tap("CommonJsRequireDependencyParserPlugin", createHandler(true)); + parser.hooks.call + .for("module.require") + .tap("CommonJsRequireDependencyParserPlugin", createHandler(false)); + parser.hooks.new + .for("module.require") + .tap("CommonJsRequireDependencyParserPlugin", createHandler(true)); } } module.exports = CommonJsRequireDependencyParserPlugin; diff --git a/test/Errors.test.js b/test/Errors.test.js index ab5c5afb332..8d5a8fbd1be 100644 --- a/test/Errors.test.js +++ b/test/Errors.test.js @@ -94,6 +94,42 @@ describe("Errors", () => { } ); }); + it("should report require.main.require as unsupported", done => { + getErrors( + { + mode: "development", + entry: "./require.main.require" + }, + (errors, warnings) => { + expect(errors).toHaveLength(0); + expect(warnings).toHaveLength(1); + const lines = warnings[0].split("\n"); + expect(lines[0]).toMatch(/require.main.require\.js/); + expect(lines[1]).toMatch( + /require.main.require is not supported by webpack/ + ); + done(); + } + ); + }); + it("should report module.parent.require as unsupported", done => { + getErrors( + { + mode: "development", + entry: "./module.parent.require" + }, + (errors, warnings) => { + expect(errors).toHaveLength(0); + expect(warnings).toHaveLength(1); + const lines = warnings[0].split("\n"); + expect(lines[0]).toMatch(/module.parent.require\.js/); + expect(lines[1]).toMatch( + /module.parent.require is not supported by webpack/ + ); + done(); + } + ); + }); it("should warn about case-sensitive module names", done => { getErrors( { diff --git a/test/cases/parsing/issue-7728/a.js b/test/cases/parsing/issue-7728/a.js new file mode 100644 index 00000000000..e6a3f0e24c7 --- /dev/null +++ b/test/cases/parsing/issue-7728/a.js @@ -0,0 +1,3 @@ +export default function test() { + return "OK"; +} diff --git a/test/cases/parsing/issue-7728/index.js b/test/cases/parsing/issue-7728/index.js new file mode 100644 index 00000000000..f685c315367 --- /dev/null +++ b/test/cases/parsing/issue-7728/index.js @@ -0,0 +1,4 @@ +it("should detect module.require dependency", function () { + var test1 = module.require('./a').default; + expect(test1()).toBe("OK"); +}); diff --git a/test/fixtures/errors/module.parent.require.js b/test/fixtures/errors/module.parent.require.js new file mode 100644 index 00000000000..f13326a68e1 --- /dev/null +++ b/test/fixtures/errors/module.parent.require.js @@ -0,0 +1 @@ +module.parent.require('./file'); diff --git a/test/fixtures/errors/require.main.require.js b/test/fixtures/errors/require.main.require.js new file mode 100644 index 00000000000..b29827f3ed4 --- /dev/null +++ b/test/fixtures/errors/require.main.require.js @@ -0,0 +1 @@ +require.main.require('./file'); From dcd644253f077cb5c3c7ba68c0a6141c9ccd99d3 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 20 Jul 2018 09:28:48 +0200 Subject: [PATCH 183/310] remove comment --- lib/Stats.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/Stats.js b/lib/Stats.js index b38210b6068..4594a94615a 100644 --- a/lib/Stats.js +++ b/lib/Stats.js @@ -528,7 +528,6 @@ class Stats { if (a.module && !b.module) return -1; if (!a.module && b.module) return 1; if (a.module && b.module) { - //const cmp = a.module.index - b.module.index; const cmp = compareId(a.module.id, b.module.id); if (cmp) return cmp; } From 0e6d5054aa01cb58d37f15e63c3fe1f7aebf986f Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 20 Jul 2018 18:16:14 +0200 Subject: [PATCH 184/310] add tool to copy method signatures from base classes --- .prettierignore | 1 + package.json | 4 +- tooling/inherit-types.js | 144 ++++++++++++++++++++++++++++++++++ tooling/typescript-program.js | 17 ++++ tsconfig.json | 2 +- 5 files changed, 165 insertions(+), 3 deletions(-) create mode 100644 tooling/inherit-types.js create mode 100644 tooling/typescript-program.js diff --git a/.prettierignore b/.prettierignore index 1f362540511..44cf7b81cdd 100644 --- a/.prettierignore +++ b/.prettierignore @@ -9,6 +9,7 @@ !buildin/*.js !benchmark/**/*.js !test/*.js +!tooling/*.js !test/**/webpack.config.js !examples/**/webpack.config.js !schemas/**/*.js diff --git a/package.json b/package.json index dd1fe8b9e7f..3e82d902025 100644 --- a/package.json +++ b/package.json @@ -128,10 +128,10 @@ "pretest": "yarn lint", "prelint": "yarn setup", "lint": "yarn code-lint && yarn schema-lint && yarn type-lint", - "code-lint": "eslint --cache setup lib bin hot buildin benchmark \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\"", + "code-lint": "eslint --cache setup lib bin hot buildin benchmark tooling \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\"", "type-lint": "tsc --pretty", "fix": "yarn code-lint --fix", - "pretty": "prettier --write \"setup/**/*.js\" \"lib/**/*.js\" \"bin/*.js\" \"hot/*.js\" \"buildin/*.js\" \"benchmark/**/*.js\" \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\" \"declarations.d.ts\" \"tsconfig.json\"", + "pretty": "prettier --write \"setup/**/*.js\" \"lib/**/*.js\" \"bin/*.js\" \"hot/*.js\" \"buildin/*.js\" \"benchmark/**/*.js\" \"tooling/*.js\" \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\" \"declarations.d.ts\" \"tsconfig.json\"", "schema-lint": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"/test/*.lint.js\" --no-verbose", "benchmark": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"/test/*.benchmark.js\" --runInBand", "cover": "yarn cover:init && yarn cover:all && yarn cover:report", diff --git a/tooling/inherit-types.js b/tooling/inherit-types.js new file mode 100644 index 00000000000..79bcdcdd0f7 --- /dev/null +++ b/tooling/inherit-types.js @@ -0,0 +1,144 @@ +const path = require("path"); +const fs = require("fs"); +const ts = require("typescript"); +const program = require("./typescript-program"); + +// When --override is set, base jsdoc will override sub class jsdoc +// Elsewise on a conflict it will create a merge conflict in the file +const override = process.argv.includes("--override"); + +// When --write is set, files will be written in place +// Elsewise it only prints outdated files +const doWrite = process.argv.includes("--write"); + +const typeChecker = program.getTypeChecker(); + +/** + * @param {ts.ClassDeclaration} node the class declaration + * @returns {Set} the base class declarations + */ +const getBaseClasses = node => { + /** @type {Set} */ + const decls = new Set(); + if (node.heritageClauses) { + for (const clause of node.heritageClauses) { + for (const clauseType of clause.types) { + const type = typeChecker.getTypeAtLocation(clauseType); + if (ts.isClassDeclaration(type.symbol.valueDeclaration)) + decls.add(type.symbol.valueDeclaration); + } + } + } + return decls; +}; + +/** + * @param {ts.ClassDeclaration} classNode the class declaration + * @param {string} memberName name of the member + * @returns {ts.MethodDeclaration | null} base class member declaration when found + */ +const findDeclarationInBaseClass = (classNode, memberName) => { + for (const baseClass of getBaseClasses(classNode)) { + for (const node of baseClass.members) { + if (ts.isMethodDeclaration(node)) { + if (node.name.getText() === memberName) { + return node; + } + } + } + const result = findDeclarationInBaseClass(baseClass, memberName); + if (result) return result; + } + return null; +}; + +const libPath = path.resolve(__dirname, "../lib"); + +for (const sourceFile of program.getSourceFiles()) { + let file = sourceFile.fileName; + if ( + file.toLowerCase().startsWith(libPath.replace(/\\/g, "/").toLowerCase()) + ) { + const updates = []; + sourceFile.forEachChild(node => { + if (ts.isClassDeclaration(node)) { + for (const member of node.members) { + if (ts.isMethodDeclaration(member)) { + const baseDecl = findDeclarationInBaseClass( + node, + member.name.getText() + ); + if (baseDecl) { + const memberAsAny = /** @type {any} */ (member); + const baseDeclAsAny = /** @type {any} */ (baseDecl); + const currentJsDoc = memberAsAny.jsDoc && memberAsAny.jsDoc[0]; + const baseJsDoc = baseDeclAsAny.jsDoc && baseDeclAsAny.jsDoc[0]; + const currentJsDocText = currentJsDoc && currentJsDoc.getText(); + let baseJsDocText = baseJsDoc && baseJsDoc.getText(); + if (baseJsDocText) { + baseJsDocText = baseJsDocText.replace( + /\t \* @abstract\r?\n/g, + "" + ); + if (!currentJsDocText) { + // add js doc + updates.push({ + member: member.name.getText(), + start: member.getStart(), + end: member.getStart(), + content: baseJsDocText + "\n\t" + }); + } else if ( + baseJsDocText && + currentJsDocText !== baseJsDocText + ) { + // update js doc + if (override || !doWrite) { + updates.push({ + member: member.name.getText(), + start: currentJsDoc.getStart(), + end: currentJsDoc.getEnd(), + content: baseJsDocText + }); + } else { + updates.push({ + member: member.name.getText(), + start: currentJsDoc.getStart() - 1, + end: currentJsDoc.getEnd(), + content: `<<<<<<< original comment\n\t${currentJsDocText}\n=======\n\t${baseJsDocText}\n>>>>>>> comment from base class` + }); + } + } + } + } + } + } + } + }); + if (updates.length > 0) { + if (doWrite) { + let fileContent = fs.readFileSync(file, "utf-8"); + updates.sort((a, b) => { + return b.start - a.start; + }); + for (const update of updates) { + fileContent = + fileContent.substr(0, update.start) + + update.content + + fileContent.substr(update.end); + } + console.log(`${file} ${updates.length} JSDoc comments added/updated`); + fs.writeFileSync(file, fileContent, "utf-8"); + } else { + console.log(file); + for (const update of updates) { + console.log( + `* ${update.member} should have this JSDoc:\n\t${update.content}` + ); + } + console.log(); + } + process.exitCode = 1; + } + } +} diff --git a/tooling/typescript-program.js b/tooling/typescript-program.js new file mode 100644 index 00000000000..bd9413ab6ae --- /dev/null +++ b/tooling/typescript-program.js @@ -0,0 +1,17 @@ +const path = require("path"); +const fs = require("fs"); +const ts = require("typescript"); + +const rootPath = path.resolve(__dirname, ".."); +const configPath = path.resolve(__dirname, "../tsconfig.json"); +const configContent = fs.readFileSync(configPath, "utf-8"); +const configJsonFile = ts.parseJsonText(configPath, configContent); +const parsedConfig = ts.parseJsonSourceFileConfigFileContent( + configJsonFile, + ts.sys, + rootPath, + { noEmit: true } +); +const { fileNames, options } = parsedConfig; + +module.exports = ts.createProgram(fileNames, options); diff --git a/tsconfig.json b/tsconfig.json index b4a8a3be59c..d265178d6c2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,5 +12,5 @@ "types": ["node"], "esModuleInterop": true }, - "include": ["declarations.d.ts", "bin/*.js", "lib/**/*.js"] + "include": ["declarations.d.ts", "bin/*.js", "lib/**/*.js", "tooling/**/*.js"] } From 8614c75f1152f9a07d74efdc53b1d0e999c70382 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 20 Jul 2018 18:17:51 +0200 Subject: [PATCH 185/310] run inherit types tool on existing code --- lib/DelegatedModule.js | 5 +++++ lib/DependenciesBlock.js | 2 +- lib/DllModule.js | 6 ++++++ lib/ExternalModule.js | 6 ++++++ lib/Generator.js | 14 +++++++++++--- lib/Module.js | 5 +++++ lib/MultiModule.js | 6 ++++++ lib/NormalModule.js | 6 ++++++ lib/RuntimeTemplate.js | 12 ++++++++++++ lib/optimize/ConcatenatedModule.js | 5 +++++ lib/wasm/WebAssemblyGenerator.js | 18 ++++++++++++++++-- lib/wasm/WebAssemblyJavascriptGenerator.js | 18 ++++++++++++++++-- 12 files changed, 95 insertions(+), 8 deletions(-) diff --git a/lib/DelegatedModule.js b/lib/DelegatedModule.js index 09b6c1ebc15..170ceca7a1a 100644 --- a/lib/DelegatedModule.js +++ b/lib/DelegatedModule.js @@ -12,6 +12,7 @@ const DelegatedSourceDependency = require("./dependencies/DelegatedSourceDepende const DelegatedExportsDependency = require("./dependencies/DelegatedExportsDependency"); /** @typedef {import("./dependencies/ModuleDependency")} ModuleDependency */ +/** @typedef {import("./util/createHash").Hash} Hash */ class DelegatedModule extends Module { constructor(sourceRequest, data, type, userRequest, originalRequest) { @@ -99,6 +100,10 @@ class DelegatedModule extends Module { return 42; } + /** + * @param {Hash} hash the hash used to track dependencies + * @returns {void} + */ updateHash(hash) { hash.update(this.type); hash.update(JSON.stringify(this.request)); diff --git a/lib/DependenciesBlock.js b/lib/DependenciesBlock.js index 144884fbbed..142f3eacbaf 100644 --- a/lib/DependenciesBlock.js +++ b/lib/DependenciesBlock.js @@ -73,7 +73,7 @@ class DependenciesBlock { } /** - * @param {Hash} hash the hash used to track dependencies, from "crypto" module + * @param {Hash} hash the hash used to track dependencies * @returns {void} */ updateHash(hash) { diff --git a/lib/DllModule.js b/lib/DllModule.js index c0a45d731ea..0cd9cbcf8ce 100644 --- a/lib/DllModule.js +++ b/lib/DllModule.js @@ -7,6 +7,8 @@ const { RawSource } = require("webpack-sources"); const Module = require("./Module"); +/** @typedef {import("./util/createHash").Hash} Hash */ + class DllModule extends Module { constructor(context, dependencies, name, type) { super("javascript/dynamic", context); @@ -44,6 +46,10 @@ class DllModule extends Module { return 12; } + /** + * @param {Hash} hash the hash used to track dependencies + * @returns {void} + */ updateHash(hash) { hash.update("dll module"); hash.update(this.name || ""); diff --git a/lib/ExternalModule.js b/lib/ExternalModule.js index 98d1560b883..f306710e4fb 100644 --- a/lib/ExternalModule.js +++ b/lib/ExternalModule.js @@ -9,6 +9,8 @@ const Module = require("./Module"); const WebpackMissingModule = require("./dependencies/WebpackMissingModule"); const Template = require("./Template"); +/** @typedef {import("./util/createHash").Hash} Hash */ + class ExternalModule extends Module { constructor(request, type, userRequest) { super("javascript/dynamic", null); @@ -148,6 +150,10 @@ class ExternalModule extends Module { return 42; } + /** + * @param {Hash} hash the hash used to track dependencies + * @returns {void} + */ updateHash(hash) { hash.update(this.externalType); hash.update(JSON.stringify(this.request)); diff --git a/lib/Generator.js b/lib/Generator.js index 5c93506d426..655a9b1da81 100644 --- a/lib/Generator.js +++ b/lib/Generator.js @@ -4,9 +4,10 @@ */ "use strict"; -/** @typedef {import("./Module")} Module */ +/** @typedef {import("./NormalModule")} NormalModule */ /** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */ /** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("./Dependency").DependencyTemplate} DependencyTemplate */ /** * @@ -18,8 +19,8 @@ class Generator { /** * @abstract - * @param {Module} module module for which the code should be generated - * @param {Map} dependencyTemplates mapping from dependencies to templates + * @param {NormalModule} module module for which the code should be generated + * @param {Map} dependencyTemplates mapping from dependencies to templates * @param {RuntimeTemplate} runtimeTemplate the runtime template * @param {string} type which kind of code should be generated * @returns {Source} generated code @@ -35,6 +36,13 @@ class ByTypeGenerator extends Generator { this.map = map; } + /** + * @param {NormalModule} module module for which the code should be generated + * @param {Map} dependencyTemplates mapping from dependencies to templates + * @param {RuntimeTemplate} runtimeTemplate the runtime template + * @param {string} type which kind of code should be generated + * @returns {Source} generated code + */ generate(module, dependencyTemplates, runtimeTemplate, type) { const generator = this.map[type]; if (!generator) { diff --git a/lib/Module.js b/lib/Module.js index 6af4415596d..7685740ab1d 100644 --- a/lib/Module.js +++ b/lib/Module.js @@ -14,6 +14,7 @@ const Template = require("./Template"); /** @typedef {import("./Chunk")} Chunk */ /** @typedef {import("./RequestShortener")} RequestShortener */ /** @typedef {import("./WebpackError")} WebpackError */ +/** @typedef {import("./util/createHash").Hash} Hash */ const EMPTY_RESOLVE_OPTIONS = {}; @@ -298,6 +299,10 @@ class Module extends DependenciesBlock { return true; } + /** + * @param {Hash} hash the hash used to track dependencies + * @returns {void} + */ updateHash(hash) { hash.update(`${this.id}`); hash.update(JSON.stringify(this.usedExports)); diff --git a/lib/MultiModule.js b/lib/MultiModule.js index 6aee82f6694..c8e5d575718 100644 --- a/lib/MultiModule.js +++ b/lib/MultiModule.js @@ -8,6 +8,8 @@ const Module = require("./Module"); const Template = require("./Template"); const { RawSource } = require("webpack-sources"); +/** @typedef {import("./util/createHash").Hash} Hash */ + class MultiModule extends Module { constructor(context, dependencies, name) { super("javascript/dynamic", context); @@ -45,6 +47,10 @@ class MultiModule extends Module { return 16 + this.dependencies.length * 12; } + /** + * @param {Hash} hash the hash used to track dependencies + * @returns {void} + */ updateHash(hash) { hash.update("multi module"); hash.update(this.name || ""); diff --git a/lib/NormalModule.js b/lib/NormalModule.js index 9c5dff5925d..fdabc3000ce 100644 --- a/lib/NormalModule.js +++ b/lib/NormalModule.js @@ -24,6 +24,8 @@ const ModuleWarning = require("./ModuleWarning"); const createHash = require("./util/createHash"); const contextify = require("./util/identifier").contextify; +/** @typedef {import("./util/createHash").Hash} Hash */ + const asString = buf => { if (Buffer.isBuffer(buf)) { return buf.toString("utf-8"); @@ -527,6 +529,10 @@ class NormalModule extends Module { return this._source ? this._source.size() : -1; } + /** + * @param {Hash} hash the hash used to track dependencies + * @returns {void} + */ updateHash(hash) { hash.update(this._buildHash); super.updateHash(hash); diff --git a/lib/RuntimeTemplate.js b/lib/RuntimeTemplate.js index 5f06ed4af8a..613aed1c3ad 100644 --- a/lib/RuntimeTemplate.js +++ b/lib/RuntimeTemplate.js @@ -6,6 +6,8 @@ const Template = require("./Template"); +/** @typedef {import("./Module")} Module */ + module.exports = class RuntimeTemplate { constructor(outputOptions, requestShortener) { this.outputOptions = outputOptions || {}; @@ -188,6 +190,16 @@ module.exports = class RuntimeTemplate { return `${promise || "Promise.resolve()"}.then(${getModuleFunction})`; } + /** + * + * @param {Object} options options object + * @param {boolean=} options.update whether a new variable should be created or the existing one updated + * @param {Module} options.module the module + * @param {string} options.request the request that should be printed as comment + * @param {string} options.importVar name of the import variable + * @param {Module} options.originModule module in which the statement is emitted + * @returns {string} the import statement + */ importStatement({ update, module, request, importVar, originModule }) { if (!module) { return this.missingModuleStatement({ diff --git a/lib/optimize/ConcatenatedModule.js b/lib/optimize/ConcatenatedModule.js index 254ae090f6d..9e8586d2ca9 100644 --- a/lib/optimize/ConcatenatedModule.js +++ b/lib/optimize/ConcatenatedModule.js @@ -21,6 +21,7 @@ const createHash = require("../util/createHash"); /** @typedef {import("../Dependency")} Dependency */ /** @typedef {import("../Compilation")} Compilation */ +/** @typedef {import("../util/createHash").Hash} Hash */ /** * @typedef {Object} ConcatenationEntry @@ -1180,6 +1181,10 @@ class ConcatenatedModule extends Module { return nameWithNumber; } + /** + * @param {Hash} hash the hash used to track dependencies + * @returns {void} + */ updateHash(hash) { for (const info of this._orderedConcatenationList) { switch (info.type) { diff --git a/lib/wasm/WebAssemblyGenerator.js b/lib/wasm/WebAssemblyGenerator.js index beafd9c465b..2a0395227df 100644 --- a/lib/wasm/WebAssemblyGenerator.js +++ b/lib/wasm/WebAssemblyGenerator.js @@ -21,6 +21,10 @@ const WebAssemblyExportImportedDependency = require("../dependencies/WebAssembly /** @typedef {import("../Module")} Module */ /** @typedef {import("./WebAssemblyUtils").UsedWasmDependency} UsedWasmDependency */ +/** @typedef {import("../NormalModule")} NormalModule */ +/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../Dependency").DependencyTemplate} DependencyTemplate */ /** * @typedef {(ArrayBuffer) => ArrayBuffer} ArrayBufferTransform @@ -366,7 +370,14 @@ class WebAssemblyGenerator extends Generator { this.options = options; } - generate(module) { + /** + * @param {NormalModule} module module for which the code should be generated + * @param {Map} dependencyTemplates mapping from dependencies to templates + * @param {RuntimeTemplate} runtimeTemplate the runtime template + * @param {string} type which kind of code should be generated + * @returns {Source} generated code + */ + generate(module, dependencyTemplates, runtimeTemplate, type) { let bin = module.originalSource().source(); bin = preprocess(bin); @@ -398,7 +409,10 @@ class WebAssemblyGenerator extends Generator { const externalExports = new Set( module.dependencies .filter(d => d instanceof WebAssemblyExportImportedDependency) - .map(d => d.exportName) + .map(d => { + const wasmDep = /** @type {WebAssemblyExportImportedDependency} */ (d); + return wasmDep.exportName; + }) ); /** @type {t.Instruction[]} */ diff --git a/lib/wasm/WebAssemblyJavascriptGenerator.js b/lib/wasm/WebAssemblyJavascriptGenerator.js index 994036d3680..b164a029211 100644 --- a/lib/wasm/WebAssemblyJavascriptGenerator.js +++ b/lib/wasm/WebAssemblyJavascriptGenerator.js @@ -10,8 +10,20 @@ const { RawSource } = require("webpack-sources"); const WebAssemblyImportDependency = require("../dependencies/WebAssemblyImportDependency"); const WebAssemblyExportImportedDependency = require("../dependencies/WebAssemblyExportImportedDependency"); +/** @typedef {import("../NormalModule")} NormalModule */ +/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */ +/** @typedef {import("webpack-sources").Source} Source */ +/** @typedef {import("../Dependency").DependencyTemplate} DependencyTemplate */ + class WebAssemblyJavascriptGenerator extends Generator { - generate(module, dependencyTemplates, runtimeTemplate) { + /** + * @param {NormalModule} module module for which the code should be generated + * @param {Map} dependencyTemplates mapping from dependencies to templates + * @param {RuntimeTemplate} runtimeTemplate the runtime template + * @param {string} type which kind of code should be generated + * @returns {Source} generated code + */ + generate(module, dependencyTemplates, runtimeTemplate, type) { const initIdentifer = Array.isArray(module.usedExports) ? Template.numberToIdentifer(module.usedExports.length) : "__webpack_init__"; @@ -21,6 +33,7 @@ class WebAssemblyJavascriptGenerator extends Generator { const initParams = []; let index = 0; for (const dep of module.dependencies) { + const depAsAny = /** @type {any} */ (dep); if (dep.module) { let importData = importedModules.get(dep.module); if (importData === undefined) { @@ -29,7 +42,8 @@ class WebAssemblyJavascriptGenerator extends Generator { (importData = { importVar: `m${index}`, index, - request: dep.userRequest, + request: + "userRequest" in depAsAny ? depAsAny.userRequest : undefined, names: new Set(), reexports: [] }) From 59114c1b2faae7920d40ba360292f2dd848dc995 Mon Sep 17 00:00:00 2001 From: Sven SAULEAU Date: Mon, 23 Jul 2018 09:11:20 +0200 Subject: [PATCH 186/310] chore: bump webassemblyjs --- package.json | 10 +- yarn.lock | 464 ++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 349 insertions(+), 125 deletions(-) diff --git a/package.json b/package.json index d4e9bd2ec68..87581a95b7e 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,11 @@ "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.6.0", - "@webassemblyjs/helper-module-context": "1.6.0", - "@webassemblyjs/wasm-edit": "1.6.0", - "@webassemblyjs/wasm-opt": "1.6.0", - "@webassemblyjs/wasm-parser": "1.6.0", + "@webassemblyjs/ast": "1.7.3", + "@webassemblyjs/helper-module-context": "1.7.3", + "@webassemblyjs/wasm-edit": "1.7.3", + "@webassemblyjs/wasm-opt": "1.7.3", + "@webassemblyjs/wasm-parser": "1.7.3", "acorn": "^5.6.2", "acorn-dynamic-import": "^3.0.0", "ajv": "^6.1.0", diff --git a/yarn.lock b/yarn.lock index fbd4edf328a..91163a1f57e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,12 +2,121 @@ # yarn lockfile v1 +"@babel/cli@^7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.0.0-beta.54.tgz#c3b9766ad3218988f120e4058509adff0b72b183" + dependencies: + commander "^2.8.1" + convert-source-map "^1.1.0" + fs-readdir-recursive "^1.0.0" + glob "^7.0.0" + lodash "^4.17.5" + mkdirp "^0.5.1" + output-file-sync "^2.0.0" + slash "^1.0.0" + source-map "^0.5.0" + optionalDependencies: + chokidar "^2.0.3" + +"@babel/code-frame@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.54.tgz#0024f96fdf7028a21d68e273afd4e953214a1ead" + dependencies: + "@babel/highlight" "7.0.0-beta.54" + "@babel/code-frame@^7.0.0-beta.35": version "7.0.0-beta.52" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.52.tgz#192483bfa0d1e467c101571c21029ccb74af2801" dependencies: "@babel/highlight" "7.0.0-beta.52" +"@babel/core@^7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.0.0-beta.54.tgz#253c54d0095403a5cfa764e7d9b458194692d02b" + dependencies: + "@babel/code-frame" "7.0.0-beta.54" + "@babel/generator" "7.0.0-beta.54" + "@babel/helpers" "7.0.0-beta.54" + "@babel/parser" "7.0.0-beta.54" + "@babel/template" "7.0.0-beta.54" + "@babel/traverse" "7.0.0-beta.54" + "@babel/types" "7.0.0-beta.54" + convert-source-map "^1.1.0" + debug "^3.1.0" + json5 "^0.5.0" + lodash "^4.17.5" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/generator@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-beta.54.tgz#c043c7eebeebfd7e665d95c281a4aafc83d4e1c9" + dependencies: + "@babel/types" "7.0.0-beta.54" + jsesc "^2.5.1" + lodash "^4.17.5" + source-map "^0.5.0" + trim-right "^1.0.1" + +"@babel/helper-function-name@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.54.tgz#307875507a1eda2482a09a9a4df6a25632ffb34b" + dependencies: + "@babel/helper-get-function-arity" "7.0.0-beta.54" + "@babel/template" "7.0.0-beta.54" + "@babel/types" "7.0.0-beta.54" + +"@babel/helper-get-function-arity@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.54.tgz#757bd189b077074a004028cfde5f083c306cc6c4" + dependencies: + "@babel/types" "7.0.0-beta.54" + +"@babel/helper-module-imports@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0-beta.54.tgz#c2d8e14ff034225bf431356db77ef467b8d35aac" + dependencies: + "@babel/types" "7.0.0-beta.54" + lodash "^4.17.5" + +"@babel/helper-module-transforms@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.0.0-beta.54.tgz#8cc57eb0db5f0945d866524d555abd084e30cc35" + dependencies: + "@babel/helper-module-imports" "7.0.0-beta.54" + "@babel/helper-simple-access" "7.0.0-beta.54" + "@babel/helper-split-export-declaration" "7.0.0-beta.54" + "@babel/template" "7.0.0-beta.54" + "@babel/types" "7.0.0-beta.54" + lodash "^4.17.5" + +"@babel/helper-plugin-utils@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-beta.54.tgz#61d2a9a0f9a3e31838a458debb9eebd7bdd249b4" + +"@babel/helper-simple-access@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.0.0-beta.54.tgz#5f760a19589a9b6f07e80a65ef4bcbd4fba8c253" + dependencies: + "@babel/template" "7.0.0-beta.54" + "@babel/types" "7.0.0-beta.54" + lodash "^4.17.5" + +"@babel/helper-split-export-declaration@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.54.tgz#89cd8833c95481a0827ac6a1bfccddb92b75a109" + dependencies: + "@babel/types" "7.0.0-beta.54" + +"@babel/helpers@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.0.0-beta.54.tgz#b86a99a80efd81668caef307610b961197446a74" + dependencies: + "@babel/template" "7.0.0-beta.54" + "@babel/traverse" "7.0.0-beta.54" + "@babel/types" "7.0.0-beta.54" + "@babel/highlight@7.0.0-beta.52": version "7.0.0-beta.52" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.52.tgz#ef24931432f06155e7bc39cdb8a6b37b4a28b3d0" @@ -16,6 +125,57 @@ esutils "^2.0.2" js-tokens "^3.0.0" +"@babel/highlight@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.54.tgz#155d507358329b8e7068970017c3fd74a9b08584" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + +"@babel/parser@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.0.0-beta.54.tgz#c01aa63b57c9c8dce8744796c81d9df121f20db4" + +"@babel/plugin-transform-modules-commonjs@^7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.0.0-beta.54.tgz#07d912a7a24dad2d9bf5d44ce322ddc457a8db37" + dependencies: + "@babel/helper-module-transforms" "7.0.0-beta.54" + "@babel/helper-plugin-utils" "7.0.0-beta.54" + "@babel/helper-simple-access" "7.0.0-beta.54" + +"@babel/template@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.54.tgz#d5b0d2d2d55c0e78b048c61a058f36cfd7d91af3" + dependencies: + "@babel/code-frame" "7.0.0-beta.54" + "@babel/parser" "7.0.0-beta.54" + "@babel/types" "7.0.0-beta.54" + lodash "^4.17.5" + +"@babel/traverse@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.54.tgz#2c17f98dcdbf19aa918fde128f0e1a0bc089e05a" + dependencies: + "@babel/code-frame" "7.0.0-beta.54" + "@babel/generator" "7.0.0-beta.54" + "@babel/helper-function-name" "7.0.0-beta.54" + "@babel/helper-split-export-declaration" "7.0.0-beta.54" + "@babel/parser" "7.0.0-beta.54" + "@babel/types" "7.0.0-beta.54" + debug "^3.1.0" + globals "^11.1.0" + lodash "^4.17.5" + +"@babel/types@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.54.tgz#025ad68492fed542c13f14c579a44c848e531063" + dependencies: + esutils "^2.0.2" + lodash "^4.17.5" + to-fast-properties "^2.0.0" + "@samverschueren/stream-to-observable@^0.3.0": version "0.3.0" resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz#ecdf48d532c58ea477acfcab80348424f8d0662f" @@ -56,141 +216,156 @@ "@types/source-list-map" "*" source-map "^0.6.1" -"@webassemblyjs/ast@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.6.0.tgz#ec9473faf583aa9aeeabddba2512a3b085533381" +"@webassemblyjs/ast@1.7.3": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.7.3.tgz#aecc6f26eabf2e3f2d43544a70ea1631556641cf" dependencies: - "@webassemblyjs/helper-module-context" "1.6.0" - "@webassemblyjs/helper-wasm-bytecode" "1.6.0" - "@webassemblyjs/wast-parser" "1.6.0" - debug "^3.1.0" + "@webassemblyjs/helper-module-context" "1.7.3" + "@webassemblyjs/helper-wasm-bytecode" "1.7.3" + "@webassemblyjs/wast-parser" "1.7.3" mamacro "^0.0.3" -"@webassemblyjs/floating-point-hex-parser@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.6.0.tgz#d85a6d41360dfcccb06b67b1167d03ce9384abc2" +"@webassemblyjs/floating-point-hex-parser@1.7.3": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.7.3.tgz#75da2171e1db1cacecc1b43bc3aca96e5fdd7e08" -"@webassemblyjs/helper-api-error@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.6.0.tgz#39ce66c87d890c63bc9821316b2fcc89179c3dc4" +"@webassemblyjs/helper-api-error@1.7.3": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.7.3.tgz#75a1268afa5e50579de4ee2970b5054b0c0f7fb2" -"@webassemblyjs/helper-buffer@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.6.0.tgz#7e60fb25ced9e9be6f6d657d45fcba107475b201" +"@webassemblyjs/helper-buffer@1.7.3": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.7.3.tgz#37efe2b1a9166614771d1fdfe0615e789d4dc97a" dependencies: - debug "^3.1.0" + "@xtuc/buffer" "^5.2.2" -"@webassemblyjs/helper-code-frame@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.6.0.tgz#9778e45f7fcbdc8840f3f815f99cdd075d91a1ef" +"@webassemblyjs/helper-code-frame@1.7.3": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.7.3.tgz#dca94437553bd2737a88592f20ac09abfa8164a3" dependencies: - "@webassemblyjs/wast-printer" "1.6.0" + "@webassemblyjs/wast-printer" "1.7.3" -"@webassemblyjs/helper-fsm@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.6.0.tgz#1bea1a6a40e44ee4c4ea725e89c42ffe129793fc" +"@webassemblyjs/helper-fsm@1.7.3": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.7.3.tgz#4c758b409185733c6299dc025e244f9033faccc2" -"@webassemblyjs/helper-module-context@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.6.0.tgz#4a394968f9d1f81f34b16b141928d3e827bd6d2f" +"@webassemblyjs/helper-module-context@1.7.3": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.7.3.tgz#d5b287254487ca051191c344ec515a28fa30b281" dependencies: - debug "^3.1.0" mamacro "^0.0.3" -"@webassemblyjs/helper-wasm-bytecode@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.6.0.tgz#1b23e2dee620478dd269f254fd981b0371fe612b" +"@webassemblyjs/helper-wasm-bytecode@1.7.3": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.7.3.tgz#c833b08063b6880a9d5498342aa52b0935b34413" -"@webassemblyjs/helper-wasm-section@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.6.0.tgz#89ca6abd16b8dc0456063980374798c3b0dea8a8" +"@webassemblyjs/helper-wasm-section@1.7.3": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.7.3.tgz#f663c1e2c9143cccef3c01f56bd7310ff2010ea2" dependencies: - "@webassemblyjs/ast" "1.6.0" - "@webassemblyjs/helper-buffer" "1.6.0" - "@webassemblyjs/helper-wasm-bytecode" "1.6.0" - "@webassemblyjs/wasm-gen" "1.6.0" - debug "^3.1.0" + "@webassemblyjs/ast" "1.7.3" + "@webassemblyjs/helper-buffer" "1.7.3" + "@webassemblyjs/helper-wasm-bytecode" "1.7.3" + "@webassemblyjs/wasm-gen" "1.7.3" -"@webassemblyjs/ieee754@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.6.0.tgz#e0669b6713e1f02529b5211c94ecc3e747408692" +"@webassemblyjs/ieee754@1.7.3": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.7.3.tgz#21f00d64e108fac37ff72d40af3d63cde2b23cb2" dependencies: - ieee754 "^1.1.11" + "@xtuc/buffer" "^5.2.2" + "@xtuc/ieee754" "^1.2.0" -"@webassemblyjs/leb128@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.6.0.tgz#99cb0a827ab7adc482b8381b6ba64440dbe23471" +"@webassemblyjs/leb128@1.7.3": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.7.3.tgz#886f1701d3538400466a45ba88fd625b64a0b125" dependencies: - long "4.0.0" + "@xtuc/buffer" "^5.2.2" + "@xtuc/long" "4.2.1" -"@webassemblyjs/utf8@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.6.0.tgz#7379d36c0557c22003193d51aa7573f60dc3e1a9" - -"@webassemblyjs/wasm-edit@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.6.0.tgz#35f56abf662b569d98e2549223842409c18efe0e" - dependencies: - "@webassemblyjs/ast" "1.6.0" - "@webassemblyjs/helper-buffer" "1.6.0" - "@webassemblyjs/helper-wasm-bytecode" "1.6.0" - "@webassemblyjs/helper-wasm-section" "1.6.0" - "@webassemblyjs/wasm-gen" "1.6.0" - "@webassemblyjs/wasm-opt" "1.6.0" - "@webassemblyjs/wasm-parser" "1.6.0" - "@webassemblyjs/wast-printer" "1.6.0" - debug "^3.1.0" +"@webassemblyjs/utf8@1.7.3": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.7.3.tgz#ec748cc4d61bbe4d239b09e08db206fe75339a9d" -"@webassemblyjs/wasm-gen@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.6.0.tgz#335bc862a5c3cd5b2a41a410719e172f35b7ed0b" +"@webassemblyjs/wasm-edit@1.7.3": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.7.3.tgz#c74beead01c2001aff0d4d5204d55c5839a6f432" + dependencies: + "@webassemblyjs/ast" "1.7.3" + "@webassemblyjs/helper-buffer" "1.7.3" + "@webassemblyjs/helper-wasm-bytecode" "1.7.3" + "@webassemblyjs/helper-wasm-section" "1.7.3" + "@webassemblyjs/wasm-gen" "1.7.3" + "@webassemblyjs/wasm-opt" "1.7.3" + "@webassemblyjs/wasm-parser" "1.7.3" + "@webassemblyjs/wast-printer" "1.7.3" + +"@webassemblyjs/wasm-gen@1.7.3": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.7.3.tgz#05c45b6b50495b32fa737db01d28dca1286ac901" dependencies: - "@webassemblyjs/ast" "1.6.0" - "@webassemblyjs/helper-wasm-bytecode" "1.6.0" - "@webassemblyjs/ieee754" "1.6.0" - "@webassemblyjs/leb128" "1.6.0" - "@webassemblyjs/utf8" "1.6.0" + "@webassemblyjs/ast" "1.7.3" + "@webassemblyjs/helper-wasm-bytecode" "1.7.3" + "@webassemblyjs/ieee754" "1.7.3" + "@webassemblyjs/leb128" "1.7.3" + "@webassemblyjs/utf8" "1.7.3" -"@webassemblyjs/wasm-opt@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.6.0.tgz#9d5a13c58cfe98086285cfc9d6df89a90e02765b" +"@webassemblyjs/wasm-opt@1.7.3": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.7.3.tgz#8e1d73511a59d24ce6d9134d9ad53f7e6f4083af" dependencies: - "@webassemblyjs/ast" "1.6.0" - "@webassemblyjs/helper-buffer" "1.6.0" - "@webassemblyjs/wasm-gen" "1.6.0" - "@webassemblyjs/wasm-parser" "1.6.0" - debug "^3.1.0" + "@webassemblyjs/ast" "1.7.3" + "@webassemblyjs/helper-buffer" "1.7.3" + "@webassemblyjs/wasm-gen" "1.7.3" + "@webassemblyjs/wasm-parser" "1.7.3" -"@webassemblyjs/wasm-parser@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.6.0.tgz#1db1d6fb7f1057ab1b9dbebabf34ec33d5dd24c0" +"@webassemblyjs/wasm-parser@1.7.3": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.7.3.tgz#dee9769b25dd1a73fcf2a4e6999af0b209d391f9" dependencies: - "@webassemblyjs/ast" "1.6.0" - "@webassemblyjs/helper-api-error" "1.6.0" - "@webassemblyjs/helper-wasm-bytecode" "1.6.0" - "@webassemblyjs/ieee754" "1.6.0" - "@webassemblyjs/leb128" "1.6.0" - "@webassemblyjs/utf8" "1.6.0" + "@webassemblyjs/ast" "1.7.3" + "@webassemblyjs/helper-api-error" "1.7.3" + "@webassemblyjs/helper-wasm-bytecode" "1.7.3" + "@webassemblyjs/ieee754" "1.7.3" + "@webassemblyjs/leb128" "1.7.3" + "@webassemblyjs/utf8" "1.7.3" + "@xtuc/buffer" "^5.2.2" -"@webassemblyjs/wast-parser@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.6.0.tgz#ea3a569676e43ac4a0c5e82eb384812be2eb0b1b" - dependencies: - "@webassemblyjs/ast" "1.6.0" - "@webassemblyjs/floating-point-hex-parser" "1.6.0" - "@webassemblyjs/helper-api-error" "1.6.0" - "@webassemblyjs/helper-code-frame" "1.6.0" - "@webassemblyjs/helper-fsm" "1.6.0" - long "^3.2.0" +"@webassemblyjs/wast-parser@1.7.3": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.7.3.tgz#2536482b1988016b402702ce87179aedea5e0c65" + dependencies: + "@webassemblyjs/ast" "1.7.3" + "@webassemblyjs/floating-point-hex-parser" "1.7.3" + "@webassemblyjs/helper-api-error" "1.7.3" + "@webassemblyjs/helper-code-frame" "1.7.3" + "@webassemblyjs/helper-fsm" "1.7.3" + "@xtuc/long" "4.2.1" mamacro "^0.0.3" -"@webassemblyjs/wast-printer@1.6.0": - version "1.6.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.6.0.tgz#a7df8e36b58eb3fea0c9389a71b22fe03977e56e" +"@webassemblyjs/wast-printer@1.7.3": + version "1.7.3" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.7.3.tgz#3851aa98cf4d5e51b93cdf014ea494ac0f98c81b" dependencies: - "@webassemblyjs/ast" "1.6.0" - "@webassemblyjs/wast-parser" "1.6.0" - long "^3.2.0" + "@webassemblyjs/ast" "1.7.3" + "@webassemblyjs/wast-parser" "1.7.3" + "@xtuc/long" "4.2.1" + +"@xtuc/buffer@^5.2.2": + version "5.2.2" + resolved "https://registry.yarnpkg.com/@xtuc/buffer/-/buffer-5.2.2.tgz#743b365ddecd81bb0f9d3d375ce6d475c4d1f909" + dependencies: + "@babel/cli" "^7.0.0-beta.54" + "@babel/core" "^7.0.0-beta.54" + "@babel/plugin-transform-modules-commonjs" "^7.0.0-beta.54" + "@xtuc/ieee754" "^1.2.0" + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" + +"@xtuc/long@4.2.1": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.1.tgz#5c85d662f76fa1d34575766c5dcd6615abcd30d8" abab@^1.0.4: version "1.0.4" @@ -1011,6 +1186,25 @@ chokidar@^2.0.2: optionalDependencies: fsevents "^1.1.2" +chokidar@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26" + dependencies: + anymatch "^2.0.0" + async-each "^1.0.0" + braces "^2.3.0" + glob-parent "^3.1.0" + inherits "^2.0.1" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + lodash.debounce "^4.0.8" + normalize-path "^2.1.1" + path-is-absolute "^1.0.0" + readdirp "^2.0.0" + upath "^1.0.5" + optionalDependencies: + fsevents "^1.2.2" + chownr@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" @@ -1225,6 +1419,10 @@ commander@^2.14.1, commander@^2.9.0, commander@^2.x: version "2.15.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" +commander@^2.8.1: + version "2.16.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.16.0.tgz#f16390593996ceb4f3eeb020b31d78528f7f8a50" + commander@~2.13.0: version "2.13.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" @@ -1295,7 +1493,7 @@ content-type@~1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" -convert-source-map@^1.4.0, convert-source-map@^1.5.1: +convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" @@ -2371,6 +2569,10 @@ fs-minipass@^1.2.5: dependencies: minipass "^2.2.1" +fs-readdir-recursive@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" + fs-write-stream-atomic@^1.0.8: version "1.0.10" resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" @@ -2391,7 +2593,7 @@ fsevents@^1.1.2: nan "^2.9.2" node-pre-gyp "^0.9.0" -fsevents@^1.2.3: +fsevents@^1.2.2, fsevents@^1.2.3: version "1.2.4" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" dependencies: @@ -2485,7 +2687,7 @@ glob@^5.0.15: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: @@ -2496,7 +2698,7 @@ glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^11.7.0: +globals@^11.1.0, globals@^11.7.0: version "11.7.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673" @@ -2754,7 +2956,7 @@ icss-utils@^2.1.0: dependencies: postcss "^6.0.1" -ieee754@^1.1.11, ieee754@^1.1.4: +ieee754@^1.1.4: version "1.1.11" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.11.tgz#c16384ffe00f5b7835824e67b6f2bd44a5229455" @@ -3071,7 +3273,7 @@ is-path-inside@^1.0.0: dependencies: path-is-inside "^1.0.1" -is-plain-obj@^1.0.0: +is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" @@ -3687,6 +3889,10 @@ jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" +jsesc@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" + jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" @@ -3960,6 +4166,10 @@ lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" +lodash.debounce@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" + lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" @@ -4003,14 +4213,6 @@ log-update@^1.0.2: ansi-escapes "^1.0.0" cli-cursor "^1.0.2" -long@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" - -long@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" - longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" @@ -4606,6 +4808,14 @@ osenv@^0.1.4: os-homedir "^1.0.0" os-tmpdir "^1.0.0" +output-file-sync@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-2.0.1.tgz#f53118282f5f553c2799541792b723a4c71430c0" + dependencies: + graceful-fs "^4.1.11" + is-plain-obj "^1.1.0" + mkdirp "^0.5.1" + p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -5663,6 +5873,12 @@ resolve@^1.1.6, resolve@^1.1.7, resolve@^1.3.3: dependencies: path-parse "^1.0.5" +resolve@^1.3.2: + version "1.8.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" + dependencies: + path-parse "^1.0.5" + restore-cursor@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" @@ -5997,7 +6213,7 @@ source-map@0.4.x, source-map@^0.4.4: dependencies: amdefine ">=0.0.4" -source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: +source-map@0.5.x, source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" @@ -6344,6 +6560,10 @@ to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + to-object-path@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" @@ -6544,6 +6764,10 @@ upath@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/upath/-/upath-1.0.5.tgz#02cab9ecebe95bbec6d5fc2566325725ab6d1a73" +upath@^1.0.5: + version "1.1.0" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" + uri-js@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.1.tgz#4595a80a51f356164e22970df64c7abd6ade9850" From 20dc30e23361d30bd9e3c5bcb4a4846aa9f66e42 Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Mon, 23 Jul 2018 10:52:14 +0200 Subject: [PATCH 187/310] Update Jest The version 23.4.1 ships a fix for 'micromatch' so 'resolutions' is no longer required. --- package.json | 10 +- yarn.lock | 309 +++++++++++++++++++++++++++------------------------ 2 files changed, 167 insertions(+), 152 deletions(-) diff --git a/package.json b/package.json index 3e82d902025..41961e956a2 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "istanbul": "^0.4.5", "jade": "^1.11.0", "jade-loader": "~0.8.0", - "jest": "^23.3.0", + "jest": "^23.4.1", "jest-silent-reporter": "^0.0.5", "json-loader": "^0.5.7", "less": "^2.5.1", @@ -82,14 +82,6 @@ "worker-loader": "^1.1.1", "xxhashjs": "^0.2.1" }, - "resolutions": { - "**/jest-message-util/micromatch": "^2.3.11", - "**/jest-cli/micromatch": "^2.3.11", - "**/jest-runtime/micromatch": "^2.3.11", - "**/jest-haste-map/micromatch": "^2.3.11", - "**/jest-haste-map/sane/micromatch": "^2.3.11", - "**/jest-config/babel-jest/babel-plugin-istanbul/test-exclude/micromatch": "^2.3.11" - }, "engines": { "node": ">=6.11.5" }, diff --git a/yarn.lock b/yarn.lock index 853394b5765..276583e44d5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3,14 +3,14 @@ "@babel/code-frame@^7.0.0-beta.35": - version "7.0.0-beta.52" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.52.tgz#192483bfa0d1e467c101571c21029ccb74af2801" + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.54.tgz#0024f96fdf7028a21d68e273afd4e953214a1ead" dependencies: - "@babel/highlight" "7.0.0-beta.52" + "@babel/highlight" "7.0.0-beta.54" -"@babel/highlight@7.0.0-beta.52": - version "7.0.0-beta.52" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.52.tgz#ef24931432f06155e7bc39cdb8a6b37b4a28b3d0" +"@babel/highlight@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.54.tgz#155d507358329b8e7068970017c3fd74a9b08584" dependencies: chalk "^2.0.0" esutils "^2.0.2" @@ -574,9 +574,9 @@ babel-helpers@^6.24.1: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-jest@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.2.0.tgz#14a9d6a3f4122dfea6069d37085adf26a53a4dba" +babel-jest@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.4.0.tgz#22c34c392e2176f6a4c367992a7fcff69d2e8557" dependencies: babel-plugin-istanbul "^4.1.6" babel-preset-jest "^23.2.0" @@ -1123,10 +1123,6 @@ clone@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" -clorox@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/clorox/-/clorox-1.0.3.tgz#6fa63653f280c33d69f548fb14d239ddcfa1590d" - co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -1857,8 +1853,8 @@ escodegen@1.8.x: source-map "~0.2.0" escodegen@^1.9.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.10.0.tgz#f647395de22519fbd0d928ffcf1d17e0dec2603e" + version "1.11.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.11.0.tgz#b27a9389481d5bfd5bec76f7bb1eb3f8f4556589" dependencies: esprima "^3.1.3" estraverse "^4.2.0" @@ -1968,8 +1964,8 @@ esprima@^3.1.3: resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" esprima@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" esquery@^1.0.1: version "1.0.1" @@ -2072,15 +2068,15 @@ expand-range@^1.8.1: dependencies: fill-range "^2.1.0" -expect@^23.3.0: - version "23.3.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-23.3.0.tgz#ecb051adcbdc40ac4db576c16067f12fdb13cc61" +expect@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-23.4.0.tgz#6da4ecc99c1471253e7288338983ad1ebadb60c3" dependencies: ansi-styles "^3.2.0" jest-diff "^23.2.0" jest-get-type "^22.1.0" jest-matcher-utils "^23.2.0" - jest-message-util "^23.3.0" + jest-message-util "^23.4.0" jest-regex-util "^23.3.0" express@~4.13.1: @@ -2126,10 +2122,14 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" -extend@~3.0.0, extend@~3.0.1: +extend@~3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" +extend@~3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + external-editor@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5" @@ -2438,8 +2438,8 @@ generate-object-property@^1.1.0: is-property "^1.0.0" get-caller-file@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + version "1.0.3" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" get-own-enumerable-property-symbols@^2.0.1: version "2.0.1" @@ -3288,15 +3288,15 @@ jade@^1.11.0: void-elements "~2.0.1" with "~4.0.0" -jest-changed-files@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.2.0.tgz#a145a6e4b66d0129fc7c99cee134dc937a643d9c" +jest-changed-files@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.4.0.tgz#f1b304f98c235af5d9a31ec524262c5e4de3c6ff" dependencies: throat "^4.0.0" -jest-cli@^23.3.0: - version "23.3.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.3.0.tgz#307e9be7733443b789a8279d694054d051a9e5e2" +jest-cli@^23.4.1: + version "23.4.1" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.4.1.tgz#c1ffd33254caee376990aa2abe2963e0de4ca76b" dependencies: ansi-escapes "^3.0.0" chalk "^2.0.1" @@ -3309,22 +3309,22 @@ jest-cli@^23.3.0: istanbul-lib-coverage "^1.2.0" istanbul-lib-instrument "^1.10.1" istanbul-lib-source-maps "^1.2.4" - jest-changed-files "^23.2.0" - jest-config "^23.3.0" - jest-environment-jsdom "^23.3.0" + jest-changed-files "^23.4.0" + jest-config "^23.4.1" + jest-environment-jsdom "^23.4.0" jest-get-type "^22.1.0" - jest-haste-map "^23.2.0" - jest-message-util "^23.3.0" + jest-haste-map "^23.4.1" + jest-message-util "^23.4.0" jest-regex-util "^23.3.0" - jest-resolve-dependencies "^23.3.0" - jest-runner "^23.3.0" - jest-runtime "^23.3.0" - jest-snapshot "^23.3.0" - jest-util "^23.3.0" - jest-validate "^23.3.0" - jest-watcher "^23.2.0" + jest-resolve-dependencies "^23.4.1" + jest-runner "^23.4.1" + jest-runtime "^23.4.1" + jest-snapshot "^23.4.1" + jest-util "^23.4.0" + jest-validate "^23.4.0" + jest-watcher "^23.4.0" jest-worker "^23.2.0" - micromatch "^3.1.10" + micromatch "^2.3.11" node-notifier "^5.2.1" prompts "^0.1.9" realpath-native "^1.0.0" @@ -3335,22 +3335,22 @@ jest-cli@^23.3.0: which "^1.2.12" yargs "^11.0.0" -jest-config@^23.3.0: - version "23.3.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.3.0.tgz#bb4d53b70f9500fafddf718d226abb53b13b8323" +jest-config@^23.4.1: + version "23.4.1" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.4.1.tgz#3172fa21f0507d7f8a088ed1dbe4157057f201e9" dependencies: babel-core "^6.0.0" - babel-jest "^23.2.0" + babel-jest "^23.4.0" chalk "^2.0.1" glob "^7.1.1" - jest-environment-jsdom "^23.3.0" - jest-environment-node "^23.3.0" + jest-environment-jsdom "^23.4.0" + jest-environment-node "^23.4.0" jest-get-type "^22.1.0" - jest-jasmine2 "^23.3.0" + jest-jasmine2 "^23.4.1" jest-regex-util "^23.3.0" - jest-resolve "^23.2.0" - jest-util "^23.3.0" - jest-validate "^23.3.0" + jest-resolve "^23.4.1" + jest-util "^23.4.0" + jest-validate "^23.4.0" pretty-format "^23.2.0" jest-diff@^23.2.0: @@ -3372,58 +3372,58 @@ jest-docblock@^23.2.0: dependencies: detect-newline "^2.1.0" -jest-each@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.2.0.tgz#a400f81c857083f50c4f53399b109f12023fb19d" +jest-each@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.4.0.tgz#2fa9edd89daa1a4edc9ff9bf6062a36b71345143" dependencies: chalk "^2.0.1" pretty-format "^23.2.0" -jest-environment-jsdom@^23.3.0: - version "23.3.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.3.0.tgz#190457f91c9e615454c4186056065db6ed7a4e2a" +jest-environment-jsdom@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.4.0.tgz#056a7952b3fea513ac62a140a2c368c79d9e6023" dependencies: jest-mock "^23.2.0" - jest-util "^23.3.0" + jest-util "^23.4.0" jsdom "^11.5.1" -jest-environment-node@^23.3.0: - version "23.3.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.3.0.tgz#1e8df21c847aa5d03b76573f0dc16fcde5034c32" +jest-environment-node@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.4.0.tgz#57e80ed0841dea303167cce8cd79521debafde10" dependencies: jest-mock "^23.2.0" - jest-util "^23.3.0" + jest-util "^23.4.0" jest-get-type@^22.1.0: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4" -jest-haste-map@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.2.0.tgz#d10cbac007c695948c8ef1821a2b2ed2d4f2d4d8" +jest-haste-map@^23.4.1: + version "23.4.1" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.4.1.tgz#43a174ba7ac079ae1dd74eaf5a5fe78989474dd2" dependencies: fb-watchman "^2.0.0" graceful-fs "^4.1.11" jest-docblock "^23.2.0" jest-serializer "^23.0.1" jest-worker "^23.2.0" - micromatch "^3.1.10" + micromatch "^2.3.11" sane "^2.0.0" -jest-jasmine2@^23.3.0: - version "23.3.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.3.0.tgz#a8706baac23c8a130d5aa8ef5464a9d49096d1b5" +jest-jasmine2@^23.4.1: + version "23.4.1" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.4.1.tgz#fa192262430d418e827636e4a98423e5e7ff0fce" dependencies: chalk "^2.0.1" co "^4.6.0" - expect "^23.3.0" + expect "^23.4.0" is-generator-fn "^1.0.0" jest-diff "^23.2.0" - jest-each "^23.2.0" + jest-each "^23.4.0" jest-matcher-utils "^23.2.0" - jest-message-util "^23.3.0" - jest-snapshot "^23.3.0" - jest-util "^23.3.0" + jest-message-util "^23.4.0" + jest-snapshot "^23.4.1" + jest-util "^23.4.0" pretty-format "^23.2.0" jest-leak-detector@^23.2.0: @@ -3440,7 +3440,7 @@ jest-matcher-utils@^23.2.0: jest-get-type "^22.1.0" pretty-format "^23.2.0" -jest-message-util@^23.0.0, jest-message-util@^23.3.0: +jest-message-util@^23.0.0: version "23.3.0" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.3.0.tgz#bc07b11cec6971fb5dd9de2dfb60ebc22150c160" dependencies: @@ -3450,6 +3450,16 @@ jest-message-util@^23.0.0, jest-message-util@^23.3.0: slash "^1.0.0" stack-utils "^1.0.1" +jest-message-util@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.4.0.tgz#17610c50942349508d01a3d1e0bda2c079086a9f" + dependencies: + "@babel/code-frame" "^7.0.0-beta.35" + chalk "^2.0.1" + micromatch "^2.3.11" + slash "^1.0.0" + stack-utils "^1.0.1" + jest-mock@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.2.0.tgz#ad1c60f29e8719d47c26e1138098b6d18b261134" @@ -3458,42 +3468,42 @@ jest-regex-util@^23.3.0: version "23.3.0" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.3.0.tgz#5f86729547c2785c4002ceaa8f849fe8ca471bc5" -jest-resolve-dependencies@^23.3.0: - version "23.3.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.3.0.tgz#8444d3b0b1288b80864d8801ff50b44a4d695d1d" +jest-resolve-dependencies@^23.4.1: + version "23.4.1" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.4.1.tgz#a1d85247e2963f8b3859f6b0ec61b741b359378e" dependencies: jest-regex-util "^23.3.0" - jest-snapshot "^23.3.0" + jest-snapshot "^23.4.1" -jest-resolve@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.2.0.tgz#a0790ad5a3b99002ab4dbfcbf8d9e2d6a69b3d99" +jest-resolve@^23.4.1: + version "23.4.1" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.4.1.tgz#7f3c17104732a2c0c940a01256025ed745814982" dependencies: browser-resolve "^1.11.3" chalk "^2.0.1" realpath-native "^1.0.0" -jest-runner@^23.3.0: - version "23.3.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.3.0.tgz#04c7e458a617501a4875db0d7ffbe0e3cbd43bfb" +jest-runner@^23.4.1: + version "23.4.1" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.4.1.tgz#d41fd1459b95d35d6df685f1468c09e617c8c260" dependencies: exit "^0.1.2" graceful-fs "^4.1.11" - jest-config "^23.3.0" + jest-config "^23.4.1" jest-docblock "^23.2.0" - jest-haste-map "^23.2.0" - jest-jasmine2 "^23.3.0" + jest-haste-map "^23.4.1" + jest-jasmine2 "^23.4.1" jest-leak-detector "^23.2.0" - jest-message-util "^23.3.0" - jest-runtime "^23.3.0" - jest-util "^23.3.0" + jest-message-util "^23.4.0" + jest-runtime "^23.4.1" + jest-util "^23.4.0" jest-worker "^23.2.0" source-map-support "^0.5.6" throat "^4.0.0" -jest-runtime@^23.3.0: - version "23.3.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.3.0.tgz#4865aab4ceff82f9cec6335fd7ae1422cc1de7df" +jest-runtime@^23.4.1: + version "23.4.1" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.4.1.tgz#c1822eba5eb19294debe6b25b2760d0a8c532fd1" dependencies: babel-core "^6.0.0" babel-plugin-istanbul "^4.1.6" @@ -3502,15 +3512,15 @@ jest-runtime@^23.3.0: exit "^0.1.2" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.1.11" - jest-config "^23.3.0" - jest-haste-map "^23.2.0" - jest-message-util "^23.3.0" + jest-config "^23.4.1" + jest-haste-map "^23.4.1" + jest-message-util "^23.4.0" jest-regex-util "^23.3.0" - jest-resolve "^23.2.0" - jest-snapshot "^23.3.0" - jest-util "^23.3.0" - jest-validate "^23.3.0" - micromatch "^3.1.10" + jest-resolve "^23.4.1" + jest-snapshot "^23.4.1" + jest-util "^23.4.0" + jest-validate "^23.4.0" + micromatch "^2.3.11" realpath-native "^1.0.0" slash "^1.0.0" strip-bom "3.0.0" @@ -3528,17 +3538,17 @@ jest-silent-reporter@^0.0.5: chalk "^2.3.1" jest-util "^23.0.0" -jest-snapshot@^23.3.0: - version "23.3.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.3.0.tgz#fc4e9f81e45432d10507e27f50bce60f44d81424" +jest-snapshot@^23.4.1: + version "23.4.1" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.4.1.tgz#090de9acae927f6a3af3005bda40d912b83e9c96" dependencies: babel-traverse "^6.0.0" babel-types "^6.0.0" chalk "^2.0.1" jest-diff "^23.2.0" jest-matcher-utils "^23.2.0" - jest-message-util "^23.3.0" - jest-resolve "^23.2.0" + jest-message-util "^23.4.0" + jest-resolve "^23.4.1" mkdirp "^0.5.1" natural-compare "^1.4.0" pretty-format "^23.2.0" @@ -3556,20 +3566,20 @@ jest-util@^23.0.0: mkdirp "^0.5.1" source-map "^0.6.0" -jest-util@^23.3.0: - version "23.3.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.3.0.tgz#79f35bb0c30100ef611d963ee6b88f8ed873a81d" +jest-util@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.4.0.tgz#4d063cb927baf0a23831ff61bec2cbbf49793561" dependencies: callsites "^2.0.0" chalk "^2.0.1" graceful-fs "^4.1.11" is-ci "^1.0.10" - jest-message-util "^23.3.0" + jest-message-util "^23.4.0" mkdirp "^0.5.1" slash "^1.0.0" source-map "^0.6.0" -jest-validate@^23.0.0: +jest-validate@^23.0.0, jest-validate@^23.4.0: version "23.4.0" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.4.0.tgz#d96eede01ef03ac909c009e9c8e455197d48c201" dependencies: @@ -3578,18 +3588,9 @@ jest-validate@^23.0.0: leven "^2.1.0" pretty-format "^23.2.0" -jest-validate@^23.3.0: - version "23.3.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.3.0.tgz#d49bea6aad98c30acd2cbb542434798a0cc13f76" - dependencies: - chalk "^2.0.1" - jest-get-type "^22.1.0" - leven "^2.1.0" - pretty-format "^23.2.0" - -jest-watcher@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-23.2.0.tgz#678e852896e919e9d9a0eb4b8baf1ae279620ea9" +jest-watcher@^23.4.0: + version "23.4.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-23.4.0.tgz#d2e28ce74f8dad6c6afc922b92cabef6ed05c91c" dependencies: ansi-escapes "^3.0.0" chalk "^2.0.1" @@ -3601,12 +3602,12 @@ jest-worker@^23.2.0: dependencies: merge-stream "^1.0.1" -jest@^23.3.0: - version "23.3.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-23.3.0.tgz#1355cd792f38cf20fba4da02dddb7ca14d9484b5" +jest@^23.4.1: + version "23.4.1" + resolved "https://registry.yarnpkg.com/jest/-/jest-23.4.1.tgz#39550c72f3237f63ae1b434d8d122cdf6fa007b6" dependencies: import-local "^1.0.0" - jest-cli "^23.3.0" + jest-cli "^23.4.1" joi@^12.x: version "12.0.0" @@ -3628,6 +3629,10 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" +"js-tokens@^3.0.0 || ^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + js-yaml@3.6.1: version "3.6.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.6.1.tgz#6e5fe67d8b205ce4d22fad05b7781e8dadcc4b30" @@ -3788,6 +3793,10 @@ kind-of@^6.0.0, kind-of@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" +kleur@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-1.0.2.tgz#637f126d3cda40a423b1297da88cf753bd04ebdd" + lazy-cache@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" @@ -4023,7 +4032,13 @@ longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" -loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1: +loose-envify@^1.0.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + dependencies: + js-tokens "^3.0.0 || ^4.0.0" + +loose-envify@^1.1.0, loose-envify@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" dependencies: @@ -4116,7 +4131,7 @@ methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" -micromatch@^2.3.11, micromatch@^3.1.10: +micromatch@^2.3.11: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" dependencies: @@ -4134,7 +4149,7 @@ micromatch@^2.3.11, micromatch@^3.1.10: parse-glob "^3.0.4" regex-cache "^0.4.2" -micromatch@^3.1.4, micromatch@^3.1.8: +micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" dependencies: @@ -4163,7 +4178,17 @@ mime-db@~1.33.0: version "1.33.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" -mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.6, mime-types@~2.1.7: +mime-db@~1.35.0: + version "1.35.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.35.0.tgz#0569d657466491283709663ad379a99b90d9ab47" + +mime-types@^2.1.12, mime-types@~2.1.17: + version "2.1.19" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.19.tgz#71e464537a7ef81c15f2db9d97e913fc0ff606f0" + dependencies: + mime-db "~1.35.0" + +mime-types@~2.1.18, mime-types@~2.1.6, mime-types@~2.1.7: version "2.1.18" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" dependencies: @@ -4483,8 +4508,8 @@ number-is-nan@^1.0.0: resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" nwsapi@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.0.4.tgz#dc79040a5f77b97716dc79565fc7fc3ef7d50570" + version "2.0.7" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.0.7.tgz#6fc54c254621f10cac5225b76e81c74120139b78" oauth-sign@~0.8.1, oauth-sign@~0.8.2: version "0.8.2" @@ -5118,10 +5143,10 @@ promise@~2.0: is-promise "~1" prompts@^0.1.9: - version "0.1.11" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-0.1.11.tgz#fdfac72f61d2887f4eaf2e65e748a9d9ef87206f" + version "0.1.12" + resolved "https://registry.yarnpkg.com/prompts/-/prompts-0.1.12.tgz#39dc42de7d2f0ec3e2af76bf40713fcb8726090d" dependencies: - clorox "^1.0.3" + kleur "^1.0.0" sisteransi "^0.1.1" prop-types@^15.5.10: @@ -6584,10 +6609,8 @@ url@^0.11.0: querystring "0.2.0" use@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.0.tgz#14716bf03fdfefd03040aef58d8b4b85f3a7c544" - dependencies: - kind-of "^6.0.2" + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" util-deprecate@~1.0.1: version "1.0.2" From 0d4c87fcf261de02a6ecfb05faab235c5a2a92dc Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 23 Jul 2018 11:51:11 +0200 Subject: [PATCH 188/310] 4.16.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3e82d902025..f25c0c2a92b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.16.1", + "version": "4.16.2", "author": "Tobias Koppers @sokra", "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", From 8214d562c6d8a0cb1532adef6cb9a004095b98ac Mon Sep 17 00:00:00 2001 From: Sven SAULEAU Date: Tue, 24 Jul 2018 09:09:49 +0200 Subject: [PATCH 189/310] chore: bump webassemblyjs --- package.json | 10 +-- yarn.lock | 200 +++++++++++++++++++++++++-------------------------- 2 files changed, 105 insertions(+), 105 deletions(-) diff --git a/package.json b/package.json index 87581a95b7e..aa1533d1ed0 100644 --- a/package.json +++ b/package.json @@ -5,11 +5,11 @@ "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.7.3", - "@webassemblyjs/helper-module-context": "1.7.3", - "@webassemblyjs/wasm-edit": "1.7.3", - "@webassemblyjs/wasm-opt": "1.7.3", - "@webassemblyjs/wasm-parser": "1.7.3", + "@webassemblyjs/ast": "1.7.4", + "@webassemblyjs/helper-module-context": "1.7.4", + "@webassemblyjs/wasm-edit": "1.7.4", + "@webassemblyjs/wasm-opt": "1.7.4", + "@webassemblyjs/wasm-parser": "1.7.4", "acorn": "^5.6.2", "acorn-dynamic-import": "^3.0.0", "ajv": "^6.1.0", diff --git a/yarn.lock b/yarn.lock index 91163a1f57e..ce9ba633dec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -216,138 +216,138 @@ "@types/source-list-map" "*" source-map "^0.6.1" -"@webassemblyjs/ast@1.7.3": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.7.3.tgz#aecc6f26eabf2e3f2d43544a70ea1631556641cf" +"@webassemblyjs/ast@1.7.4": + version "1.7.4" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.7.4.tgz#ce4cc5bcd7accd73f361cbd5eb1c32618b3b4f85" dependencies: - "@webassemblyjs/helper-module-context" "1.7.3" - "@webassemblyjs/helper-wasm-bytecode" "1.7.3" - "@webassemblyjs/wast-parser" "1.7.3" + "@webassemblyjs/helper-module-context" "1.7.4" + "@webassemblyjs/helper-wasm-bytecode" "1.7.4" + "@webassemblyjs/wast-parser" "1.7.4" mamacro "^0.0.3" -"@webassemblyjs/floating-point-hex-parser@1.7.3": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.7.3.tgz#75da2171e1db1cacecc1b43bc3aca96e5fdd7e08" +"@webassemblyjs/floating-point-hex-parser@1.7.4": + version "1.7.4" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.7.4.tgz#94b858426e1ec362f26d89eb7f060fb576744496" -"@webassemblyjs/helper-api-error@1.7.3": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.7.3.tgz#75a1268afa5e50579de4ee2970b5054b0c0f7fb2" +"@webassemblyjs/helper-api-error@1.7.4": + version "1.7.4" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.7.4.tgz#1e865551aae8167ad5597736f6eadce3bb4fe169" -"@webassemblyjs/helper-buffer@1.7.3": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.7.3.tgz#37efe2b1a9166614771d1fdfe0615e789d4dc97a" +"@webassemblyjs/helper-buffer@1.7.4": + version "1.7.4" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.7.4.tgz#252f204131770e1e2fff71103b8911ec545c0403" dependencies: "@xtuc/buffer" "^5.2.2" -"@webassemblyjs/helper-code-frame@1.7.3": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.7.3.tgz#dca94437553bd2737a88592f20ac09abfa8164a3" +"@webassemblyjs/helper-code-frame@1.7.4": + version "1.7.4" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.7.4.tgz#a0f1ed8e195bff6599b8155beda731767a59e30c" dependencies: - "@webassemblyjs/wast-printer" "1.7.3" + "@webassemblyjs/wast-printer" "1.7.4" -"@webassemblyjs/helper-fsm@1.7.3": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.7.3.tgz#4c758b409185733c6299dc025e244f9033faccc2" +"@webassemblyjs/helper-fsm@1.7.4": + version "1.7.4" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.7.4.tgz#cd6ee366897954f9d5adbc86b0a015fa6731e654" -"@webassemblyjs/helper-module-context@1.7.3": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.7.3.tgz#d5b287254487ca051191c344ec515a28fa30b281" +"@webassemblyjs/helper-module-context@1.7.4": + version "1.7.4" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.7.4.tgz#1def26eaf2a84581b4bff34eb11ae73a2c8196ed" dependencies: mamacro "^0.0.3" -"@webassemblyjs/helper-wasm-bytecode@1.7.3": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.7.3.tgz#c833b08063b6880a9d5498342aa52b0935b34413" +"@webassemblyjs/helper-wasm-bytecode@1.7.4": + version "1.7.4" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.7.4.tgz#74a438e7663331987d88594268bdbbc910f8627c" -"@webassemblyjs/helper-wasm-section@1.7.3": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.7.3.tgz#f663c1e2c9143cccef3c01f56bd7310ff2010ea2" +"@webassemblyjs/helper-wasm-section@1.7.4": + version "1.7.4" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.7.4.tgz#7e7bf997234fe3dcd2a10639ae226376b94aa39a" dependencies: - "@webassemblyjs/ast" "1.7.3" - "@webassemblyjs/helper-buffer" "1.7.3" - "@webassemblyjs/helper-wasm-bytecode" "1.7.3" - "@webassemblyjs/wasm-gen" "1.7.3" + "@webassemblyjs/ast" "1.7.4" + "@webassemblyjs/helper-buffer" "1.7.4" + "@webassemblyjs/helper-wasm-bytecode" "1.7.4" + "@webassemblyjs/wasm-gen" "1.7.4" -"@webassemblyjs/ieee754@1.7.3": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.7.3.tgz#21f00d64e108fac37ff72d40af3d63cde2b23cb2" +"@webassemblyjs/ieee754@1.7.4": + version "1.7.4" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.7.4.tgz#b58c92c364a954a027d7415adc1bf10dd74d7ac5" dependencies: "@xtuc/buffer" "^5.2.2" "@xtuc/ieee754" "^1.2.0" -"@webassemblyjs/leb128@1.7.3": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.7.3.tgz#886f1701d3538400466a45ba88fd625b64a0b125" +"@webassemblyjs/leb128@1.7.4": + version "1.7.4" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.7.4.tgz#15233f256bb8b2bc1e796b0f3ea016db4b14f528" dependencies: "@xtuc/buffer" "^5.2.2" "@xtuc/long" "4.2.1" -"@webassemblyjs/utf8@1.7.3": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.7.3.tgz#ec748cc4d61bbe4d239b09e08db206fe75339a9d" - -"@webassemblyjs/wasm-edit@1.7.3": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.7.3.tgz#c74beead01c2001aff0d4d5204d55c5839a6f432" - dependencies: - "@webassemblyjs/ast" "1.7.3" - "@webassemblyjs/helper-buffer" "1.7.3" - "@webassemblyjs/helper-wasm-bytecode" "1.7.3" - "@webassemblyjs/helper-wasm-section" "1.7.3" - "@webassemblyjs/wasm-gen" "1.7.3" - "@webassemblyjs/wasm-opt" "1.7.3" - "@webassemblyjs/wasm-parser" "1.7.3" - "@webassemblyjs/wast-printer" "1.7.3" - -"@webassemblyjs/wasm-gen@1.7.3": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.7.3.tgz#05c45b6b50495b32fa737db01d28dca1286ac901" - dependencies: - "@webassemblyjs/ast" "1.7.3" - "@webassemblyjs/helper-wasm-bytecode" "1.7.3" - "@webassemblyjs/ieee754" "1.7.3" - "@webassemblyjs/leb128" "1.7.3" - "@webassemblyjs/utf8" "1.7.3" - -"@webassemblyjs/wasm-opt@1.7.3": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.7.3.tgz#8e1d73511a59d24ce6d9134d9ad53f7e6f4083af" - dependencies: - "@webassemblyjs/ast" "1.7.3" - "@webassemblyjs/helper-buffer" "1.7.3" - "@webassemblyjs/wasm-gen" "1.7.3" - "@webassemblyjs/wasm-parser" "1.7.3" - -"@webassemblyjs/wasm-parser@1.7.3": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.7.3.tgz#dee9769b25dd1a73fcf2a4e6999af0b209d391f9" - dependencies: - "@webassemblyjs/ast" "1.7.3" - "@webassemblyjs/helper-api-error" "1.7.3" - "@webassemblyjs/helper-wasm-bytecode" "1.7.3" - "@webassemblyjs/ieee754" "1.7.3" - "@webassemblyjs/leb128" "1.7.3" - "@webassemblyjs/utf8" "1.7.3" +"@webassemblyjs/utf8@1.7.4": + version "1.7.4" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.7.4.tgz#666d62a359770c25647e3ecff0990e5b13fe43ed" + +"@webassemblyjs/wasm-edit@1.7.4": + version "1.7.4" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.7.4.tgz#09a36001dbd5471c1adfb63000f477d05536f1e7" + dependencies: + "@webassemblyjs/ast" "1.7.4" + "@webassemblyjs/helper-buffer" "1.7.4" + "@webassemblyjs/helper-wasm-bytecode" "1.7.4" + "@webassemblyjs/helper-wasm-section" "1.7.4" + "@webassemblyjs/wasm-gen" "1.7.4" + "@webassemblyjs/wasm-opt" "1.7.4" + "@webassemblyjs/wasm-parser" "1.7.4" + "@webassemblyjs/wast-printer" "1.7.4" + +"@webassemblyjs/wasm-gen@1.7.4": + version "1.7.4" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.7.4.tgz#15cddae961bbde68661b740308cd188e2b93318a" + dependencies: + "@webassemblyjs/ast" "1.7.4" + "@webassemblyjs/helper-wasm-bytecode" "1.7.4" + "@webassemblyjs/ieee754" "1.7.4" + "@webassemblyjs/leb128" "1.7.4" + "@webassemblyjs/utf8" "1.7.4" + +"@webassemblyjs/wasm-opt@1.7.4": + version "1.7.4" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.7.4.tgz#c79457aff41b0f6d4db5b015506f7c050e23ab26" + dependencies: + "@webassemblyjs/ast" "1.7.4" + "@webassemblyjs/helper-buffer" "1.7.4" + "@webassemblyjs/wasm-gen" "1.7.4" + "@webassemblyjs/wasm-parser" "1.7.4" + +"@webassemblyjs/wasm-parser@1.7.4": + version "1.7.4" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.7.4.tgz#8a8f8ebd9594a9fbd3d69437bfd1a28d35c10a06" + dependencies: + "@webassemblyjs/ast" "1.7.4" + "@webassemblyjs/helper-api-error" "1.7.4" + "@webassemblyjs/helper-wasm-bytecode" "1.7.4" + "@webassemblyjs/ieee754" "1.7.4" + "@webassemblyjs/leb128" "1.7.4" + "@webassemblyjs/utf8" "1.7.4" "@xtuc/buffer" "^5.2.2" -"@webassemblyjs/wast-parser@1.7.3": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.7.3.tgz#2536482b1988016b402702ce87179aedea5e0c65" +"@webassemblyjs/wast-parser@1.7.4": + version "1.7.4" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.7.4.tgz#4cda746d8e5bc22516f769910bb134d48c9392bc" dependencies: - "@webassemblyjs/ast" "1.7.3" - "@webassemblyjs/floating-point-hex-parser" "1.7.3" - "@webassemblyjs/helper-api-error" "1.7.3" - "@webassemblyjs/helper-code-frame" "1.7.3" - "@webassemblyjs/helper-fsm" "1.7.3" + "@webassemblyjs/ast" "1.7.4" + "@webassemblyjs/floating-point-hex-parser" "1.7.4" + "@webassemblyjs/helper-api-error" "1.7.4" + "@webassemblyjs/helper-code-frame" "1.7.4" + "@webassemblyjs/helper-fsm" "1.7.4" "@xtuc/long" "4.2.1" mamacro "^0.0.3" -"@webassemblyjs/wast-printer@1.7.3": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.7.3.tgz#3851aa98cf4d5e51b93cdf014ea494ac0f98c81b" +"@webassemblyjs/wast-printer@1.7.4": + version "1.7.4" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.7.4.tgz#84e8bdcf21c37b4a8f5476878ade3967d6adac99" dependencies: - "@webassemblyjs/ast" "1.7.3" - "@webassemblyjs/wast-parser" "1.7.3" + "@webassemblyjs/ast" "1.7.4" + "@webassemblyjs/wast-parser" "1.7.4" "@xtuc/long" "4.2.1" "@xtuc/buffer@^5.2.2": From 075208daf0fc3f7fd8eee28a18f2c724fadd7b2f Mon Sep 17 00:00:00 2001 From: Sven SAULEAU Date: Wed, 25 Jul 2018 10:07:21 +0200 Subject: [PATCH 190/310] fix: merging --- yarn.lock | 91 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 82 insertions(+), 9 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8149bb9a74f..e88a30c59dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18,25 +18,98 @@ optionalDependencies: chokidar "^2.0.3" -"@babel/code-frame@7.0.0-beta.54": +"@babel/code-frame@7.0.0-beta.54", "@babel/code-frame@^7.0.0-beta.35": version "7.0.0-beta.54" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.54.tgz#0024f96fdf7028a21d68e273afd4e953214a1ead" dependencies: "@babel/highlight" "7.0.0-beta.54" -"@babel/code-frame@^7.0.0-beta.35": +"@babel/core@^7.0.0-beta.54": version "7.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.54.tgz#0024f96fdf7028a21d68e273afd4e953214a1ead" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.0.0-beta.54.tgz#253c54d0095403a5cfa764e7d9b458194692d02b" dependencies: - "@babel/highlight" "7.0.0-beta.54" + "@babel/code-frame" "7.0.0-beta.54" + "@babel/generator" "7.0.0-beta.54" + "@babel/helpers" "7.0.0-beta.54" + "@babel/parser" "7.0.0-beta.54" + "@babel/template" "7.0.0-beta.54" + "@babel/traverse" "7.0.0-beta.54" + "@babel/types" "7.0.0-beta.54" + convert-source-map "^1.1.0" + debug "^3.1.0" + json5 "^0.5.0" + lodash "^4.17.5" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" -"@babel/highlight@7.0.0-beta.54": +"@babel/generator@7.0.0-beta.54": version "7.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.54.tgz#155d507358329b8e7068970017c3fd74a9b08584" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-beta.54.tgz#c043c7eebeebfd7e665d95c281a4aafc83d4e1c9" dependencies: - chalk "^2.0.0" - esutils "^2.0.2" - js-tokens "^3.0.0" + "@babel/types" "7.0.0-beta.54" + jsesc "^2.5.1" + lodash "^4.17.5" + source-map "^0.5.0" + trim-right "^1.0.1" + +"@babel/helper-function-name@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.54.tgz#307875507a1eda2482a09a9a4df6a25632ffb34b" + dependencies: + "@babel/helper-get-function-arity" "7.0.0-beta.54" + "@babel/template" "7.0.0-beta.54" + "@babel/types" "7.0.0-beta.54" + +"@babel/helper-get-function-arity@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.54.tgz#757bd189b077074a004028cfde5f083c306cc6c4" + dependencies: + "@babel/types" "7.0.0-beta.54" + +"@babel/helper-module-imports@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0-beta.54.tgz#c2d8e14ff034225bf431356db77ef467b8d35aac" + dependencies: + "@babel/types" "7.0.0-beta.54" + lodash "^4.17.5" + +"@babel/helper-module-transforms@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.0.0-beta.54.tgz#8cc57eb0db5f0945d866524d555abd084e30cc35" + dependencies: + "@babel/helper-module-imports" "7.0.0-beta.54" + "@babel/helper-simple-access" "7.0.0-beta.54" + "@babel/helper-split-export-declaration" "7.0.0-beta.54" + "@babel/template" "7.0.0-beta.54" + "@babel/types" "7.0.0-beta.54" + lodash "^4.17.5" + +"@babel/helper-plugin-utils@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-beta.54.tgz#61d2a9a0f9a3e31838a458debb9eebd7bdd249b4" + +"@babel/helper-simple-access@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.0.0-beta.54.tgz#5f760a19589a9b6f07e80a65ef4bcbd4fba8c253" + dependencies: + "@babel/template" "7.0.0-beta.54" + "@babel/types" "7.0.0-beta.54" + lodash "^4.17.5" + +"@babel/helper-split-export-declaration@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.54.tgz#89cd8833c95481a0827ac6a1bfccddb92b75a109" + dependencies: + "@babel/types" "7.0.0-beta.54" + +"@babel/helpers@7.0.0-beta.54": + version "7.0.0-beta.54" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.0.0-beta.54.tgz#b86a99a80efd81668caef307610b961197446a74" + dependencies: + "@babel/template" "7.0.0-beta.54" + "@babel/traverse" "7.0.0-beta.54" + "@babel/types" "7.0.0-beta.54" "@babel/highlight@7.0.0-beta.54": version "7.0.0-beta.54" From c9d6ec1ccbeee0c42b38649a2920f00e2b1148f7 Mon Sep 17 00:00:00 2001 From: Sven SAULEAU Date: Wed, 25 Jul 2018 10:08:33 +0200 Subject: [PATCH 191/310] feat: remove wasm-opt --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index afadc77ebb5..3d72651f504 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,6 @@ "@webassemblyjs/ast": "1.7.4", "@webassemblyjs/helper-module-context": "1.7.4", "@webassemblyjs/wasm-edit": "1.7.4", - "@webassemblyjs/wasm-opt": "1.7.4", "@webassemblyjs/wasm-parser": "1.7.4", "acorn": "^5.6.2", "acorn-dynamic-import": "^3.0.0", From aac43687fd5759026dc5c731867e4df163c79502 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 26 Jul 2018 16:51:02 +0200 Subject: [PATCH 192/310] fix case where empty chunkgroups cause nested chunkgroups to vanish --- lib/Compilation.js | 8 ++++++++ test/cases/chunks/nested-in-empty/a.js | 0 test/cases/chunks/nested-in-empty/b.js | 1 + test/cases/chunks/nested-in-empty/index.js | 13 +++++++++++++ 4 files changed, 22 insertions(+) create mode 100644 test/cases/chunks/nested-in-empty/a.js create mode 100644 test/cases/chunks/nested-in-empty/b.js create mode 100644 test/cases/chunks/nested-in-empty/index.js diff --git a/lib/Compilation.js b/lib/Compilation.js index 4171e60a920..03f62b6e057 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -1572,6 +1572,9 @@ class Compilation extends Tapable { /** @type {Map} */ const blockChunkGroups = new Map(); + /** @type {Set} */ + const blocksWithNestedBlocks = new Set(); + const ADD_AND_ENTER_MODULE = 0; const ENTER_MODULE = 1; const PROCESS_BLOCK = 2; @@ -1731,6 +1734,10 @@ class Compilation extends Tapable { // Traverse all Blocks iterationOfArrayCallback(blockInfo.blocks, iteratorBlock); + + if (blockInfo.blocks.length > 0 && module !== block) { + blocksWithNestedBlocks.add(block); + } break; } case LEAVE_MODULE: { @@ -1792,6 +1799,7 @@ class Compilation extends Tapable { */ const filterFn = dep => { const depChunkGroup = dep.chunkGroup; + if (blocksWithNestedBlocks.has(dep.block)) return true; if (areModulesAvailable(depChunkGroup, newAvailableModules)) return false; // break all modules are already available return true; }; diff --git a/test/cases/chunks/nested-in-empty/a.js b/test/cases/chunks/nested-in-empty/a.js new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/cases/chunks/nested-in-empty/b.js b/test/cases/chunks/nested-in-empty/b.js new file mode 100644 index 00000000000..888cae37af9 --- /dev/null +++ b/test/cases/chunks/nested-in-empty/b.js @@ -0,0 +1 @@ +module.exports = 42; diff --git a/test/cases/chunks/nested-in-empty/index.js b/test/cases/chunks/nested-in-empty/index.js new file mode 100644 index 00000000000..968e02795ca --- /dev/null +++ b/test/cases/chunks/nested-in-empty/index.js @@ -0,0 +1,13 @@ +it("should include a chunk nested in an empty chunk", (done) => { + require.ensure(["./a"], () => { + require.ensure([], () => { + require.ensure(["./a"], () => { + require.ensure([], () => { + const b = require("./b"); + expect(b).toBe(42); + done(); + }); + }); + }); + }); +}); From 482ff200303e84a65bdd5c456ce232309a6ce450 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 27 Jul 2018 12:14:29 +0200 Subject: [PATCH 193/310] 4.16.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 07e693f73e2..6d504ddf6b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.16.2", + "version": "4.16.3", "author": "Tobias Koppers @sokra", "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", From 614f2ad1f589d1b8cf66f38eecfcbd3f1d453840 Mon Sep 17 00:00:00 2001 From: Eugen Cazacu <32613393+oygen87@users.noreply.github.com> Date: Sat, 28 Jul 2018 22:46:31 +0200 Subject: [PATCH 194/310] Update example.js update to newer syntax --- examples/commonjs/example.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/commonjs/example.js b/examples/commonjs/example.js index 5b87a398285..d56b3cb0040 100644 --- a/examples/commonjs/example.js +++ b/examples/commonjs/example.js @@ -1,3 +1,3 @@ -var inc = require('./increment').increment; -var a = 1; -inc(a); // 2 \ No newline at end of file +const inc = require('./increment').increment; +const a = 1; +inc(a); // 2 From 37ae7c30da60c76b89970802e9cec5fc6e38a285 Mon Sep 17 00:00:00 2001 From: Eugen Cazacu <32613393+oygen87@users.noreply.github.com> Date: Sun, 29 Jul 2018 15:10:19 +0200 Subject: [PATCH 195/310] Update increment.js --- examples/commonjs/increment.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/commonjs/increment.js b/examples/commonjs/increment.js index df19980e68a..5b6497cade5 100644 --- a/examples/commonjs/increment.js +++ b/examples/commonjs/increment.js @@ -1,4 +1,4 @@ -var add = require('./math').add; +const add = require('./math').add; exports.increment = function(val) { return add(val, 1); -}; \ No newline at end of file +}; From 6126ec7f2e1d2d754038794c45892a4df8206d3f Mon Sep 17 00:00:00 2001 From: Eugen Cazacu <32613393+oygen87@users.noreply.github.com> Date: Sun, 29 Jul 2018 15:11:11 +0200 Subject: [PATCH 196/310] Update README.md --- examples/commonjs/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/commonjs/README.md b/examples/commonjs/README.md index fb85a0b1c08..86e9be62edc 100644 --- a/examples/commonjs/README.md +++ b/examples/commonjs/README.md @@ -9,15 +9,15 @@ You can also see the info messages webpack prints to console (for both normal an # example.js ``` javascript -var inc = require('./increment').increment; -var a = 1; +const inc = require('./increment').increment; +const a = 1; inc(a); // 2 ``` # increment.js ``` javascript -var add = require('./math').add; +const add = require('./math').add; exports.increment = function(val) { return add(val, 1); }; @@ -27,7 +27,7 @@ exports.increment = function(val) { ``` javascript exports.add = function() { - var sum = 0, i = 0, args = arguments, l = args.length; + let sum = 0, i = 0, args = arguments, l = args.length; while (i < l) { sum += args[i++]; } @@ -197,4 +197,4 @@ chunk {0} output.js (main) 329 bytes [entry] [rendered] cjs require ./increment [2] ./example.js 1:10-32 [2] ./example.js 69 bytes {0} [built] single entry .\example.js main -``` \ No newline at end of file +``` From 3992ba3af6bf7e1fd010b478976d7d2ae96721c1 Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Mon, 30 Jul 2018 19:40:09 +0200 Subject: [PATCH 197/310] Convert Template to ES6 --- lib/Template.js | 87 +++++++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 43 deletions(-) diff --git a/lib/Template.js b/lib/Template.js index 70d65bd1068..572d4b5ed8e 100644 --- a/lib/Template.js +++ b/lib/Template.js @@ -27,7 +27,7 @@ const MATCH_PADDED_HYPHENS_REPLACE_REGEX = /^-|-$/g; /** * @typedef {Object} HasId * @property {number | string} id - * */ + */ /** * @typedef {function(Module, number): boolean} ModuleFilterPredicate @@ -39,8 +39,8 @@ const MATCH_PADDED_HYPHENS_REPLACE_REGEX = /^-|-$/g; * @returns {-1|0|1} the sort value */ const stringifyIdSortPredicate = (a, b) => { - var aId = a.id + ""; - var bId = b.id + ""; + const aId = a.id + ""; + const bId = b.id + ""; if (aId < bId) return -1; if (aId > bId) return 1; return 0; @@ -59,6 +59,7 @@ class Template { .replace(INDENT_MULTILINE_REGEX, "") .replace(LINE_SEPARATOR_REGEX, "\n"); } + /** * @param {string} str the string converted to identifier * @returns {string} created identifier @@ -128,31 +129,28 @@ class Template { /** * - * @param {string | string[]} str string to convert to identity + * @param {string | string[]} s string to convert to identity * @returns {string} converted identity */ - static indent(str) { - if (Array.isArray(str)) { - return str.map(Template.indent).join("\n"); + static indent(s) { + if (Array.isArray(s)) { + return s.map(Template.indent).join("\n"); } else { - str = str.trimRight(); + const str = s.trimRight(); if (!str) return ""; - var ind = str[0] === "\n" ? "" : "\t"; + const ind = str[0] === "\n" ? "" : "\t"; return ind + str.replace(/\n([^\n])/g, "\n\t$1"); } } /** * - * @param {string|string[]} str string to create prefix for + * @param {string|string[]} s string to create prefix for * @param {string} prefix prefix to compose * @returns {string} returns new prefix string */ - static prefix(str, prefix) { - if (Array.isArray(str)) { - str = str.join("\n"); - } - str = str.trim(); + static prefix(s, prefix) { + const str = Template.asString(s).trim(); if (!str) return ""; const ind = str[0] === "\n" ? "" : prefix; return ind + str.replace(/\n([^\n])/g, "\n" + prefix + "$1"); @@ -181,8 +179,8 @@ class Template { * or false if not every module has a number based id */ static getModulesArrayBounds(modules) { - var maxId = -Infinity; - var minId = Infinity; + let maxId = -Infinity; + let minId = Infinity; for (const module of modules) { if (typeof module.id !== "number") return false; if (maxId < module.id) maxId = /** @type {number} */ (module.id); @@ -192,15 +190,11 @@ class Template { // add minId x ',' instead of 'Array(minId).concat(…)' minId = 0; } - var objectOverhead = modules - .map(module => { - var idLength = (module.id + "").length; - return idLength + 2; - }) - .reduce((a, b) => { - return a + b; - }, -1); - var arrayOverhead = minId === 0 ? maxId : 16 + ("" + minId).length + maxId; + const objectOverhead = modules + .map(module => (module.id + "").length + 2) + .reduce((a, b) => a + b, -1); + const arrayOverhead = + minId === 0 ? maxId : 16 + ("" + minId).length + maxId; return arrayOverhead < objectOverhead ? [minId, maxId] : false; } @@ -217,13 +211,13 @@ class Template { filterFn, moduleTemplate, dependencyTemplates, - prefix + prefix = "" ) { - if (!prefix) prefix = ""; - var source = new ConcatSource(); + const source = new ConcatSource(); const modules = chunk.getModules().filter(filterFn); + let removedModules; if (chunk instanceof HotUpdateChunk) { - var removedModules = chunk.removedModules; + removedModules = chunk.removedModules; } if ( modules.length === 0 && @@ -233,7 +227,7 @@ class Template { return source; } /** @type {{id: string|number, source: Source|string}[]} */ - var allModules = modules.map(module => { + const allModules = modules.map(module => { return { id: module.id, source: moduleTemplate.render(module, dependencyTemplates, { @@ -249,38 +243,45 @@ class Template { }); } } - var bounds = Template.getModulesArrayBounds(allModules); - + const bounds = Template.getModulesArrayBounds(allModules); if (bounds) { // Render a spare array - var minId = bounds[0]; - var maxId = bounds[1]; - if (minId !== 0) source.add("Array(" + minId + ").concat("); + const minId = bounds[0]; + const maxId = bounds[1]; + if (minId !== 0) { + source.add(`Array(${minId}).concat(`); + } source.add("[\n"); const modules = new Map(); for (const module of allModules) { modules.set(module.id, module); } - for (var idx = minId; idx <= maxId; idx++) { - var module = modules.get(idx); - if (idx !== minId) source.add(",\n"); - source.add("/* " + idx + " */"); + for (let idx = minId; idx <= maxId; idx++) { + const module = modules.get(idx); + if (idx !== minId) { + source.add(",\n"); + } + source.add(`/* ${idx} */`); if (module) { source.add("\n"); source.add(module.source); } } source.add("\n" + prefix + "]"); - if (minId !== 0) source.add(")"); + if (minId !== 0) { + source.add(")"); + } } else { // Render an object source.add("{\n"); allModules.sort(stringifyIdSortPredicate).forEach((module, idx) => { - if (idx !== 0) source.add(",\n"); + if (idx !== 0) { + source.add(",\n"); + } source.add(`\n/***/ ${JSON.stringify(module.id)}:\n`); source.add(module.source); }); - source.add("\n\n" + prefix + "}"); + source.add(`\n\n${prefix}}`); } return source; } From 5234abe7b687ddaaefb2fc7deee30737ba2695e4 Mon Sep 17 00:00:00 2001 From: flyyang Date: Tue, 31 Jul 2018 14:17:44 +0800 Subject: [PATCH 198/310] Refactor define before use class --- lib/WatchIgnorePlugin.js | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/lib/WatchIgnorePlugin.js b/lib/WatchIgnorePlugin.js index 7a00e998f05..2f81ee8397f 100644 --- a/lib/WatchIgnorePlugin.js +++ b/lib/WatchIgnorePlugin.js @@ -7,24 +7,6 @@ const validateOptions = require("schema-utils"); const schema = require("../schemas/plugins/WatchIgnorePlugin.json"); -class WatchIgnorePlugin { - constructor(paths) { - validateOptions(schema, paths, "Watch Ignore Plugin"); - this.paths = paths; - } - - apply(compiler) { - compiler.hooks.afterEnvironment.tap("WatchIgnorePlugin", () => { - compiler.watchFileSystem = new IgnoringWatchFileSystem( - compiler.watchFileSystem, - this.paths - ); - }); - } -} - -module.exports = WatchIgnorePlugin; - class IgnoringWatchFileSystem { constructor(wfs, paths) { this.wfs = wfs; @@ -98,3 +80,21 @@ class IgnoringWatchFileSystem { }; } } + +class WatchIgnorePlugin { + constructor(paths) { + validateOptions(schema, paths, "Watch Ignore Plugin"); + this.paths = paths; + } + + apply(compiler) { + compiler.hooks.afterEnvironment.tap("WatchIgnorePlugin", () => { + compiler.watchFileSystem = new IgnoringWatchFileSystem( + compiler.watchFileSystem, + this.paths + ); + }); + } +} + +module.exports = WatchIgnorePlugin; From 20406a42957190625224558ea00666e851c496cd Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Tue, 31 Jul 2018 11:43:07 +0200 Subject: [PATCH 199/310] Update ESLint --- hot/log.js | 2 ++ lib/debug/ProfilingPlugin.js | 2 +- lib/node/NodeTargetPlugin.js | 1 + package.json | 6 ++-- yarn.lock | 55 ++++++++++++++++++++++++------------ 5 files changed, 44 insertions(+), 22 deletions(-) diff --git a/hot/log.js b/hot/log.js index d9e09b221de..0d05673f83b 100644 --- a/hot/log.js +++ b/hot/log.js @@ -30,9 +30,11 @@ module.exports = function(level, msg) { } }; +/* eslint-disable node/no-unsupported-features/node-builtins */ var group = console.group || dummy; var groupCollapsed = console.groupCollapsed || dummy; var groupEnd = console.groupEnd || dummy; +/* eslint-enable node/no-unsupported-features/node-builtins */ module.exports.group = logGroup(group); diff --git a/lib/debug/ProfilingPlugin.js b/lib/debug/ProfilingPlugin.js index ea65b35905d..d3e4dc4d614 100644 --- a/lib/debug/ProfilingPlugin.js +++ b/lib/debug/ProfilingPlugin.js @@ -5,7 +5,7 @@ const schema = require("../../schemas/plugins/debug/ProfilingPlugin.json"); let inspector = undefined; try { - // eslint-disable-next-line node/no-missing-require + // eslint-disable-next-line node/no-unsupported-features/node-builtins inspector = require("inspector"); } catch (e) { console.log("Unable to CPU profile in < node 8.0"); diff --git a/lib/node/NodeTargetPlugin.js b/lib/node/NodeTargetPlugin.js index ff9cdc88246..b76b70690e8 100644 --- a/lib/node/NodeTargetPlugin.js +++ b/lib/node/NodeTargetPlugin.js @@ -7,6 +7,7 @@ const ExternalsPlugin = require("../ExternalsPlugin"); const builtins = + // eslint-disable-next-line node/no-unsupported-features/node-builtins require("module").builtinModules || Object.keys(process.binding("natives")); class NodeTargetPlugin { diff --git a/package.json b/package.json index 6d504ddf6b5..076c0cdb170 100644 --- a/package.json +++ b/package.json @@ -43,10 +43,10 @@ "coveralls": "^2.11.2", "css-loader": "^0.28.3", "es6-promise-polyfill": "^1.1.1", - "eslint": "^5.1.0", + "eslint": "^5.2.0", "eslint-config-prettier": "^2.9.0", - "eslint-plugin-jest": "^21.17.0", - "eslint-plugin-node": "^6.0.1", + "eslint-plugin-jest": "^21.18.0", + "eslint-plugin-node": "^7.0.1", "eslint-plugin-prettier": "^2.6.2", "express": "~4.13.1", "file-loader": "^1.1.6", diff --git a/yarn.lock b/yarn.lock index 276583e44d5..86ebc62fd8d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1869,18 +1869,27 @@ eslint-config-prettier@^2.9.0: dependencies: get-stdin "^5.0.1" -eslint-plugin-jest@^21.17.0: - version "21.17.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-21.17.0.tgz#fdb00e2f9ff16987d6ebcf2c75c7add105760bbb" +eslint-plugin-es@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-1.3.1.tgz#5acb2565db4434803d1d46a9b4cbc94b345bd028" + dependencies: + eslint-utils "^1.3.0" + regexpp "^2.0.0" -eslint-plugin-node@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-6.0.1.tgz#bf19642298064379315d7a4b2a75937376fa05e4" +eslint-plugin-jest@^21.18.0: + version "21.18.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-21.18.0.tgz#d7305969a9c1902f895468791d968fcf08b5c0b7" + +eslint-plugin-node@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-node/-/eslint-plugin-node-7.0.1.tgz#a6e054e50199b2edd85518b89b4e7b323c9f36db" dependencies: - ignore "^3.3.6" + eslint-plugin-es "^1.3.1" + eslint-utils "^1.3.1" + ignore "^4.0.2" minimatch "^3.0.4" - resolve "^1.3.3" - semver "^5.4.1" + resolve "^1.8.1" + semver "^5.5.0" eslint-plugin-prettier@^2.6.2: version "2.6.2" @@ -1896,7 +1905,7 @@ eslint-scope@^4.0.0: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-utils@^1.3.1: +eslint-utils@^1.3.0, eslint-utils@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.3.1.tgz#9a851ba89ee7c460346f97cf8939c7298827e512" @@ -1904,9 +1913,9 @@ eslint-visitor-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" -eslint@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.1.0.tgz#2ed611f1ce163c0fb99e1e0cda5af8f662dff645" +eslint@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.2.0.tgz#3901ae249195d473e633c4acbc370068b1c964dc" dependencies: ajv "^6.5.0" babel-code-frame "^6.26.0" @@ -1924,7 +1933,7 @@ eslint@^5.1.0: functional-red-black-tree "^1.0.1" glob "^7.1.2" globals "^11.7.0" - ignore "^3.3.3" + ignore "^4.0.2" imurmurhash "^0.1.4" inquirer "^5.2.0" is-resolvable "^1.1.0" @@ -2780,9 +2789,9 @@ ignore-walk@^3.0.1: dependencies: minimatch "^3.0.4" -ignore@^3.3.3, ignore@^3.3.6: - version "3.3.8" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.8.tgz#3f8e9c35d38708a3a7e0e9abb6c73e7ee7707b2b" +ignore@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.2.tgz#0a8dd228947ec78c2d7f736b1642a9f7317c1905" image-size@~0.5.0: version "0.5.5" @@ -5513,6 +5522,10 @@ regexpp@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.1.0.tgz#0e3516dd0b7904f413d2d4193dce4618c3a689ab" +regexpp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.0.tgz#b2a7534a85ca1b033bcf5ce9ff8e56d4e0755365" + regexpu-core@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" @@ -5690,12 +5703,18 @@ resolve@1.1.7, resolve@1.1.x: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" -resolve@^1.1.6, resolve@^1.1.7, resolve@^1.3.3: +resolve@^1.1.6, resolve@^1.1.7: version "1.7.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3" dependencies: path-parse "^1.0.5" +resolve@^1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" + dependencies: + path-parse "^1.0.5" + restore-cursor@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" From 64e301c33b78b9f3434aae1fed68f9c87d6fb7e7 Mon Sep 17 00:00:00 2001 From: Florent Cailhol Date: Tue, 31 Jul 2018 11:44:32 +0200 Subject: [PATCH 200/310] Update Prettier --- lib/wasm/WebAssemblyGenerator.js | 9 ++++++--- package.json | 2 +- yarn.lock | 6 +++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/wasm/WebAssemblyGenerator.js b/lib/wasm/WebAssemblyGenerator.js index 2a0395227df..1de627866cf 100644 --- a/lib/wasm/WebAssemblyGenerator.js +++ b/lib/wasm/WebAssemblyGenerator.js @@ -47,9 +47,12 @@ const preprocess = ab => { * @returns {Function} composed transform */ const compose = (...fns) => { - return fns.reduce((prevFn, nextFn) => { - return value => nextFn(prevFn(value)); - }, value => value); + return fns.reduce( + (prevFn, nextFn) => { + return value => nextFn(prevFn(value)); + }, + value => value + ); }; // TODO replace with @callback diff --git a/package.json b/package.json index 076c0cdb170..8ec103b625e 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "less-loader": "^4.0.3", "lint-staged": "^7.2.0", "lodash": "^4.17.4", - "prettier": "^1.13.7", + "prettier": "^1.14.0", "pug": "^2.0.3", "pug-loader": "^2.4.0", "raw-loader": "~0.5.0", diff --git a/yarn.lock b/yarn.lock index 86ebc62fd8d..2efeb620daf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5102,9 +5102,9 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -prettier@^1.13.7: - version "1.13.7" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.7.tgz#850f3b8af784a49a6ea2d2eaa7ed1428a34b7281" +prettier@^1.14.0: + version "1.14.0" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.0.tgz#847c235522035fd988100f1f43cf20a7d24f9372" pretty-format@^23.2.0: version "23.2.0" From cdf042c25151151719a93e6b4646a3215b265c08 Mon Sep 17 00:00:00 2001 From: ryota-murakami Date: Wed, 1 Aug 2018 15:47:00 +0900 Subject: [PATCH 201/310] Update Jest homepage URL --- test/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/README.md b/test/README.md index f648f049744..80fdb9cd64d 100644 --- a/test/README.md +++ b/test/README.md @@ -19,10 +19,10 @@ Watch mode: yarn jest --watch ConfigTestCases ``` -See also: [Jest CLI docs](https://facebook.github.io/jest/docs/cli.html) +See also: [Jest CLI docs](https://jestjs.io/docs/cli) ## Test suite overview -We use Jest for our tests. For more information on Jest you can visit their [homepage](https://facebook.github.io/jest/)! +We use Jest for our tests. For more information on Jest you can visit their [homepage](https://jestjs.io/)! ### Class Tests All test files can be found in *.test.js. There are many tests that simply test API's of a specific class/file (such as `Compiler`, `Errors`, Integration, `Parser`, `RuleSet`, Validation). From 7473ed490215d0a18b6062f4ea97f97b71789a4e Mon Sep 17 00:00:00 2001 From: EECOLOR Date: Wed, 1 Aug 2018 10:19:11 +0200 Subject: [PATCH 202/310] Fix chunkAsset hook call The `compilation.hook.chunkAsset` hook expects 2 parameters, not three. --- lib/HotModuleReplacementPlugin.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/HotModuleReplacementPlugin.js b/lib/HotModuleReplacementPlugin.js index a6ca6986e05..7f723d60b7b 100644 --- a/lib/HotModuleReplacementPlugin.js +++ b/lib/HotModuleReplacementPlugin.js @@ -286,7 +286,6 @@ module.exports = class HotModuleReplacementPlugin { hotUpdateMainContent.c[chunkId] = true; currentChunk.files.push(filename); compilation.hooks.chunkAsset.call( - "HotModuleReplacementPlugin", currentChunk, filename ); From 2348c3cdc1cd417c71eb00e00c467b8e40abaea8 Mon Sep 17 00:00:00 2001 From: EECOLOR Date: Wed, 1 Aug 2018 10:44:39 +0200 Subject: [PATCH 203/310] Formatting - move arguments to the same line --- lib/HotModuleReplacementPlugin.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/HotModuleReplacementPlugin.js b/lib/HotModuleReplacementPlugin.js index 7f723d60b7b..365a2443a72 100644 --- a/lib/HotModuleReplacementPlugin.js +++ b/lib/HotModuleReplacementPlugin.js @@ -285,10 +285,7 @@ module.exports = class HotModuleReplacementPlugin { compilation.assets[filename] = source; hotUpdateMainContent.c[chunkId] = true; currentChunk.files.push(filename); - compilation.hooks.chunkAsset.call( - currentChunk, - filename - ); + compilation.hooks.chunkAsset.call(currentChunk, filename); } } else { hotUpdateMainContent.c[chunkId] = false; From c893bbc7356ab88ca59e5b27bae941c576568ec0 Mon Sep 17 00:00:00 2001 From: rzhe97 <41912450+rzhe97@users.noreply.github.com> Date: Wed, 1 Aug 2018 23:53:18 +0800 Subject: [PATCH 204/310] Update CONTRIBUTING.md Typo and grammatical error fixed --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3364e380801..da3b43b7186 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ work is not in vain. ## Issues -Most of the time, if webpack is not working correctly for you it is a simple configuration issue. +Most of the time, if webpack is not working correctly for you, it is a simple configuration issue. If you are still having difficulty after looking over your configuration carefully, please post a question to [StackOverflow with the webpack tag](http://stackoverflow.com/tags/webpack). Questions @@ -35,11 +35,11 @@ If you have created your own loader/plugin please include it on the relevant doc ## Submitting Changes -After getting some feedback, push to your fork and submit a pull request. We +After getting some feedbacks, push to your fork and submit a pull request. We may suggest some changes or improvements or alternatives, but for small changes your pull request should be accepted quickly. -Some things that will increase the chance that your pull request is accepted: +Something that will increase the chance that your pull request is accepted: * [Write tests](./test/README.md) * Follow the existing coding style From 01cfe5b67a3c5df3920d7404d5dbe0a424190792 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 2 Aug 2018 13:05:48 +0200 Subject: [PATCH 205/310] improve way of adding exported tests to test tree --- test/ConfigTestCases.test.js | 51 ++++------------ test/HotTestCases.test.js | 47 +++++--------- test/TestCases.template.js | 31 +++------- .../configCases/web/prefetch-preload/index.js | 6 +- test/helpers/createLazyTestEnv.js | 61 +++++++++++++++++++ 5 files changed, 101 insertions(+), 95 deletions(-) create mode 100644 test/helpers/createLazyTestEnv.js diff --git a/test/ConfigTestCases.test.js b/test/ConfigTestCases.test.js index 7776de34c39..d578be3bdfa 100644 --- a/test/ConfigTestCases.test.js +++ b/test/ConfigTestCases.test.js @@ -7,6 +7,7 @@ const vm = require("vm"); const mkdirp = require("mkdirp"); const rimraf = require("rimraf"); const checkArrayExpectation = require("./checkArrayExpectation"); +const createLazyTestEnv = require("./helpers/createLazyTestEnv"); const FakeDocument = require("./helpers/FakeDocument"); const Stats = require("../lib/Stats"); @@ -51,9 +52,6 @@ describe("ConfigTestCases", () => { category.name, testName ); - const exportedTests = []; - const exportedBeforeEach = []; - const exportedAfterEach = []; it( testName + " should compile", () => @@ -106,6 +104,7 @@ describe("ConfigTestCases", () => { } catch (e) { // ignored } + if (testConfig.timeout) setDefaultTimeout(testConfig.timeout); webpack(options, (err, stats) => { if (err) { @@ -157,22 +156,6 @@ describe("ConfigTestCases", () => { ) return; - function _it(title, fn) { - exportedTests.push({ - title, - fn, - timeout: testConfig.timeout - }); - } - - function _beforeEach(fn) { - return exportedBeforeEach.push(fn); - } - - function _afterEach(fn) { - return exportedAfterEach.push(fn); - } - const globalContext = { console: console, expect: expect, @@ -272,31 +255,21 @@ describe("ConfigTestCases", () => { "Should have found at least one bundle file per webpack config" ) ); - if (exportedTests.length < filesCount) + if (getNumberOfTests() < filesCount) return done(new Error("No tests exported by test case")); if (testConfig.afterExecute) testConfig.afterExecute(); - const asyncSuite = describe(`ConfigTestCases ${ - category.name - } ${testName} exported tests`, () => { - exportedBeforeEach.forEach(beforeEach); - exportedAfterEach.forEach(afterEach); - exportedTests.forEach( - ({ title, fn, timeout }) => - fn - ? fit(title, fn, timeout) - : fit(title, () => {}).pend("Skipped") - ); - }); - // workaround for jest running clearSpies on the wrong suite (invoked by clearResourcesForRunnable) - asyncSuite.disabled = true; - - jasmine - .getEnv() - .execute([asyncSuite.id], asyncSuite) - .then(done, done); + done(); }); }) ); + + const { + it: _it, + beforeEach: _beforeEach, + afterEach: _afterEach, + setDefaultTimeout, + getNumberOfTests + } = createLazyTestEnv(jasmine.getEnv(), 10000); }); }); }); diff --git a/test/HotTestCases.test.js b/test/HotTestCases.test.js index 6c64a6e03a0..32b5057ec7a 100644 --- a/test/HotTestCases.test.js +++ b/test/HotTestCases.test.js @@ -5,6 +5,7 @@ const path = require("path"); const fs = require("fs"); const vm = require("vm"); const checkArrayExpectation = require("./checkArrayExpectation"); +const createLazyTestEnv = require("./helpers/createLazyTestEnv"); const webpack = require("../lib/webpack"); @@ -24,11 +25,10 @@ describe("HotTestCases", () => { categories.forEach(category => { describe(category.name, () => { category.tests.forEach(testName => { - describe( - testName, - () => { - let exportedTests = []; - it(testName + " should compile", done => { + describe(testName, () => { + it( + testName + " should compile", + done => { const testDirectory = path.join( casesPath, category.name, @@ -106,10 +106,6 @@ describe("HotTestCases", () => { return; } - function _it(title, fn) { - exportedTests.push({ title, fn, timeout: 10000 }); - } - function _next(callback) { fakeUpdateLoaderOptions.updateIndex++; compiler.run((err, stats) => { @@ -175,31 +171,20 @@ describe("HotTestCases", () => { } else return require(module); } _require("./bundle.js"); - if (exportedTests.length < 1) + if (getNumberOfTests() < 1) return done(new Error("No tests exported by test case")); - const asyncSuite = describe(`HotTestCases ${ - category.name - } ${testName} exported tests`, () => { - exportedTests.forEach(({ title, fn, timeout }) => { - jest.setTimeout(10000); - return fn - ? fit(title, fn, timeout) - : fit(title, () => {}).pend("Skipped"); - }); - }); - // workaround for jest running clearSpies on the wrong suite (invoked by clearResourcesForRunnable) - asyncSuite.disabled = true; - - jasmine - .getEnv() - .execute([asyncSuite.id], asyncSuite) - .then(done, done); + done(); }); - }); - }, - 10000 - ); + }, + 10000 + ); + + const { it: _it, getNumberOfTests } = createLazyTestEnv( + jasmine.getEnv(), + 10000 + ); + }); }); }); }); diff --git a/test/TestCases.template.js b/test/TestCases.template.js index 39ff2bdf5a9..622b6e2b934 100644 --- a/test/TestCases.template.js +++ b/test/TestCases.template.js @@ -7,6 +7,7 @@ const vm = require("vm"); const mkdirp = require("mkdirp"); const UglifyJsPlugin = require("uglifyjs-webpack-plugin"); const checkArrayExpectation = require("./checkArrayExpectation"); +const createLazyTestEnv = require("./helpers/createLazyTestEnv"); const Stats = require("../lib/Stats"); const webpack = require("../lib/webpack"); @@ -171,7 +172,6 @@ const describeCases = config => { it( testName + " should compile", done => { - const exportedTests = []; webpack(options, (err, stats) => { if (err) done(err); const statOptions = Stats.presetToOptions("verbose"); @@ -206,10 +206,6 @@ const describeCases = config => { ) return; - function _it(title, fn) { - exportedTests.push({ title, fn, timeout: 10000 }); - } - function _require(module) { if (module.substr(0, 2) === "./") { const p = path.join(outputDirectory, module); @@ -239,30 +235,19 @@ const describeCases = config => { } _require.webpackTestSuiteRequire = true; _require("./bundle.js"); - if (exportedTests.length === 0) + if (getNumberOfTests() === 0) return done(new Error("No tests exported by test case")); - const asyncSuite = describe(`${config.name} ${ - category.name - } ${testName} exported tests`, () => { - exportedTests.forEach( - ({ title, fn, timeout }) => - fn - ? fit(title, fn, timeout) - : fit(title, () => {}).pend("Skipped") - ); - }); - // workaround for jest running clearSpies on the wrong suite (invoked by clearResourcesForRunnable) - asyncSuite.disabled = true; - - jasmine - .getEnv() - .execute([asyncSuite.id], asyncSuite) - .then(done, done); + done(); }); }, 60000 ); + + const { it: _it, getNumberOfTests } = createLazyTestEnv( + jasmine.getEnv(), + 10000 + ); }); }); }); diff --git a/test/configCases/web/prefetch-preload/index.js b/test/configCases/web/prefetch-preload/index.js index dec98a7ccf4..dba5b0575ad 100644 --- a/test/configCases/web/prefetch-preload/index.js +++ b/test/configCases/web/prefetch-preload/index.js @@ -2,14 +2,16 @@ let oldNonce; let oldPublicPath; -beforeEach(() => { +beforeEach(done => { oldNonce = __webpack_nonce__; oldPublicPath = __webpack_public_path__; + done(); }); -afterEach(() => { +afterEach(done => { __webpack_nonce__ = oldNonce; __webpack_public_path__ = oldPublicPath; + done(); }); it("should prefetch and preload child chunks on chunk load", () => { diff --git a/test/helpers/createLazyTestEnv.js b/test/helpers/createLazyTestEnv.js new file mode 100644 index 00000000000..ad6134ff709 --- /dev/null +++ b/test/helpers/createLazyTestEnv.js @@ -0,0 +1,61 @@ +module.exports = (env, globalTimeout = 2000) => { + const suite = env.describe("exported tests", () => { + // this must have a child to be handled correctly + env.it("should run the exported tests", () => {}); + }); + let numberOfTests = 0; + const beforeAndAfterFns = () => { + let currentSuite = suite; + let afters = []; + let befores = []; + + while (currentSuite) { + befores = befores.concat(currentSuite.beforeFns); + afters = afters.concat(currentSuite.afterFns); + + currentSuite = currentSuite.parentSuite; + } + + return { + befores: befores.reverse(), + afters: afters + }; + }; + return { + setDefaultTimeout(time) { + globalTimeout = time; + }, + getNumberOfTests() { + return numberOfTests; + }, + it(title, fn, timeout = globalTimeout) { + numberOfTests++; + let spec; + if(fn) { + spec = env.fit(title, fn, timeout); + } else { + spec = env.fit(title, () => {}); + spec.pend("Skipped"); + } + suite.addChild(spec); + spec.disabled = false; + spec.getSpecName = () => { + return `${suite.getFullName()} ${spec.description}`; + }; + spec.beforeAndAfterFns = beforeAndAfterFns; + spec.result.fullName = spec.getFullName(); + }, + beforeEach(fn, timeout = globalTimeout) { + suite.beforeEach({ + fn, + timeout: () => timeout + }); + }, + afterEach(fn, timeout = globalTimeout) { + suite.afterEach({ + fn, + timeout: () => timeout + }); + } + }; +}; From 1e9d98cb4e52a6efc58f516aa7451d1faa6347ba Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 2 Aug 2018 15:46:54 +0200 Subject: [PATCH 206/310] 4.16.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8ec103b625e..e0e3d198bda 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.16.3", + "version": "4.16.4", "author": "Tobias Koppers @sokra", "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", From ea5c68bc3771b53dafc9a3f17d6c6d6771d8c404 Mon Sep 17 00:00:00 2001 From: Steven Date: Thu, 2 Aug 2018 15:44:19 +0100 Subject: [PATCH 207/310] Adds test cases for issue 7778 --- test/cases/parsing/issue-7778/a.js | 3 +++ test/cases/parsing/issue-7778/index.js | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 test/cases/parsing/issue-7778/a.js create mode 100644 test/cases/parsing/issue-7778/index.js diff --git a/test/cases/parsing/issue-7778/a.js b/test/cases/parsing/issue-7778/a.js new file mode 100644 index 00000000000..7afed0bb078 --- /dev/null +++ b/test/cases/parsing/issue-7778/a.js @@ -0,0 +1,3 @@ +export default function a() { + return 'a' +} diff --git a/test/cases/parsing/issue-7778/index.js b/test/cases/parsing/issue-7778/index.js new file mode 100644 index 00000000000..254431abae4 --- /dev/null +++ b/test/cases/parsing/issue-7778/index.js @@ -0,0 +1,13 @@ +it("should detect query strings in dynamic import as a static value 1 ", function() { + import("./a?queryString").then(({ default: a }) => { + expect(a()).toBe("a"); + }); +}); + +it("should detect query strings in dynamic import as a static value 2", function() { + var testFileName = "a"; + + import(`./${testFileName}?queryStringSteven`).then(({ default: a }) => { + expect(a()).toBe("a"); + }); +}); \ No newline at end of file From f5be9a62d42ce53206d9abcfe8d9d37792ee44d2 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 2 Aug 2018 16:58:41 +0200 Subject: [PATCH 208/310] update watch test cases for new jest integration --- test/WatchTestCases.test.js | 65 ++++++++++++++----------------- test/helpers/createLazyTestEnv.js | 13 ++++--- 2 files changed, 38 insertions(+), 40 deletions(-) diff --git a/test/WatchTestCases.test.js b/test/WatchTestCases.test.js index b425f099a8a..95255c29872 100644 --- a/test/WatchTestCases.test.js +++ b/test/WatchTestCases.test.js @@ -7,6 +7,7 @@ const vm = require("vm"); const mkdirp = require("mkdirp"); const rimraf = require("rimraf"); const checkArrayExpectation = require("./checkArrayExpectation"); +const createLazyTestEnv = require("./helpers/createLazyTestEnv"); const { remove } = require("./helpers/remove"); const Stats = require("../lib/Stats"); @@ -140,6 +141,7 @@ describe("WatchTestCases", () => { let triggeringFilename; let lastHash = ""; const currentWatchStepModule = require("./helpers/currentWatchStep"); + let compilationFinished = done; currentWatchStepModule.step = run.name; copyDiff(path.join(testDirectory, run.name), tempDirectory, true); @@ -156,13 +158,15 @@ describe("WatchTestCases", () => { aggregateTimeout: 1000 }, (err, stats) => { - if (err) return done(err); + if (err) return compilationFinished(err); if (!stats) - return done(new Error("No stats reported from Compiler")); + return compilationFinished( + new Error("No stats reported from Compiler") + ); if (stats.hash === lastHash) return; lastHash = stats.hash; if (run.done && lastHash !== stats.hash) { - return done( + return compilationFinished( new Error( "Compilation changed but no change was issued " + lastHash + @@ -178,7 +182,7 @@ describe("WatchTestCases", () => { } if (waitMode) return; run.done = true; - if (err) return done(err); + if (err) return compilationFinished(err); const statOptions = Stats.presetToOptions("verbose"); statOptions.colors = false; mkdirp.sync(outputDirectory); @@ -196,7 +200,7 @@ describe("WatchTestCases", () => { jsonStats, "error", "Error", - done + compilationFinished ) ) return; @@ -206,17 +210,11 @@ describe("WatchTestCases", () => { jsonStats, "warning", "Warning", - done + compilationFinished ) ) return; - const exportedTests = []; - - function _it(title, fn) { - exportedTests.push({ title, fn, timeout: 45000 }); - } - const globalContext = { console: console, expect: expect @@ -271,7 +269,7 @@ describe("WatchTestCases", () => { m.exports, path.dirname(p), p, - _it, + run.it, run.name, jsonStats, state, @@ -298,22 +296,26 @@ describe("WatchTestCases", () => { // empty } - if (testConfig.noTests) return process.nextTick(done); + if (testConfig.noTests) + return process.nextTick(compilationFinished); _require( outputDirectory, testConfig.bundlePath || "./bundle.js" ); - if (exportedTests.length < 1) - return done(new Error("No tests exported by test case")); + if (run.getNumberOfTests() < 1) + return compilationFinished( + new Error("No tests exported by test case") + ); - const continueStep = () => { + run.it("should compile the next step", done => { runIdx++; if (runIdx < runs.length) { run = runs[runIdx]; waitMode = true; setTimeout(() => { waitMode = false; + compilationFinished = done; currentWatchStepModule.step = run.name; copyDiff( path.join(testDirectory, run.name), @@ -326,26 +328,9 @@ describe("WatchTestCases", () => { done(); } - }; - - // Run the tests - const asyncSuite = describe(`WatchTestCases ${ - category.name - } ${testName} step ${run.name}`, () => { - exportedTests.forEach( - ({ title, fn, timeout }) => - fn - ? fit(title, fn, timeout) - : fit(title, () => {}).pend("Skipped") - ); }); - // workaround for jest running clearSpies on the wrong suite (invoked by clearResourcesForRunnable) - asyncSuite.disabled = true; - jasmine - .getEnv() - .execute([asyncSuite.id], asyncSuite) - .then(continueStep, done); + compilationFinished(); } ); }, 300); @@ -353,6 +338,16 @@ describe("WatchTestCases", () => { 45000 ); + for (const run of runs) { + const { it: _it, getNumberOfTests } = createLazyTestEnv( + jasmine.getEnv(), + 10000, + run.name + ); + run.it = _it; + run.getNumberOfTests = getNumberOfTests; + } + afterAll(() => { remove(tempDirectory); }); diff --git a/test/helpers/createLazyTestEnv.js b/test/helpers/createLazyTestEnv.js index ad6134ff709..ad77365ba13 100644 --- a/test/helpers/createLazyTestEnv.js +++ b/test/helpers/createLazyTestEnv.js @@ -1,8 +1,11 @@ -module.exports = (env, globalTimeout = 2000) => { - const suite = env.describe("exported tests", () => { - // this must have a child to be handled correctly - env.it("should run the exported tests", () => {}); - }); +module.exports = (env, globalTimeout = 2000, nameSuffix = "") => { + const suite = env.describe( + nameSuffix ? `exported tests ${nameSuffix}` : "exported tests", + () => { + // this must have a child to be handled correctly + env.it("should run the exported tests", () => {}); + } + ); let numberOfTests = 0; const beforeAndAfterFns = () => { let currentSuite = suite; From 73dff6cbd52a852739a3c936f37fdf77e81704c2 Mon Sep 17 00:00:00 2001 From: skingston91 <6108222+skingston91@users.noreply.github.com> Date: Thu, 2 Aug 2018 16:04:47 +0100 Subject: [PATCH 209/310] Update index.js Remove name from test --- test/cases/parsing/issue-7778/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cases/parsing/issue-7778/index.js b/test/cases/parsing/issue-7778/index.js index 254431abae4..ad18770238c 100644 --- a/test/cases/parsing/issue-7778/index.js +++ b/test/cases/parsing/issue-7778/index.js @@ -7,7 +7,7 @@ it("should detect query strings in dynamic import as a static value 1 ", functio it("should detect query strings in dynamic import as a static value 2", function() { var testFileName = "a"; - import(`./${testFileName}?queryStringSteven`).then(({ default: a }) => { + import(`./${testFileName}?queryString`).then(({ default: a }) => { expect(a()).toBe("a"); }); -}); \ No newline at end of file +}); From 795cc352c518159124645f3b3825ddac0df3fdf0 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 3 Aug 2018 08:10:53 +0200 Subject: [PATCH 210/310] Improve error reporting while recompilation in HotCases --- test/HotTestCases.test.js | 8 ++++---- test/hotCases/update.js | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/test/HotTestCases.test.js b/test/HotTestCases.test.js index 32b5057ec7a..bb9e4d31ac6 100644 --- a/test/HotTestCases.test.js +++ b/test/HotTestCases.test.js @@ -109,7 +109,7 @@ describe("HotTestCases", () => { function _next(callback) { fakeUpdateLoaderOptions.updateIndex++; compiler.run((err, stats) => { - if (err) return done(err); + if (err) return callback(err); const jsonStats = stats.toJson({ errorDetails: true }); @@ -120,7 +120,7 @@ describe("HotTestCases", () => { "error", "errors" + fakeUpdateLoaderOptions.updateIndex, "Error", - done + callback ) ) { return; @@ -132,12 +132,12 @@ describe("HotTestCases", () => { "warning", "warnings" + fakeUpdateLoaderOptions.updateIndex, "Warning", - done + callback ) ) { return; } - if (callback) callback(jsonStats); + callback(null, jsonStats); }); } diff --git a/test/hotCases/update.js b/test/hotCases/update.js index e85933acc2b..d6993d2cc3f 100644 --- a/test/hotCases/update.js +++ b/test/hotCases/update.js @@ -1,7 +1,8 @@ module.exports = function(done, options, callback) { - return function(stats) { + return function(err, stats) { + if (err) return done(err); module.hot.check(options || true).then(() => { - if(callback) + if (callback) callback(stats); }).catch((err) => { done(err); From 61633aa91c61328a31c132d5afdd2acd8219cb5c Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 3 Aug 2018 09:20:23 +0200 Subject: [PATCH 211/310] fix #7778 remove prepend in favor of replaces improve code style in ContextDependencyHelpers --- lib/dependencies/ContextDependencyHelpers.js | 121 +++++++++++------- .../ContextDependencyTemplateAsId.js | 1 + .../ContextDependencyTemplateAsRequireCall.js | 1 + test/cases/parsing/issue-7778/a.js | 2 +- test/cases/parsing/issue-7778/abc.js | 3 + test/cases/parsing/issue-7778/index.js | 60 +++++++-- 6 files changed, 136 insertions(+), 52 deletions(-) create mode 100644 test/cases/parsing/issue-7778/abc.js diff --git a/lib/dependencies/ContextDependencyHelpers.js b/lib/dependencies/ContextDependencyHelpers.js index d4cc72dbbfc..2dabc3345a5 100644 --- a/lib/dependencies/ContextDependencyHelpers.js +++ b/lib/dependencies/ContextDependencyHelpers.js @@ -15,6 +15,32 @@ const quotemeta = str => { return str.replace(/[-[\]\\/{}()*+?.^$|]/g, "\\$&"); }; +const splitContextFromPrefix = prefix => { + const idx = prefix.lastIndexOf("/"); + let context = "."; + if (idx >= 0) { + context = prefix.substr(0, idx); + prefix = `.${prefix.substr(idx)}`; + } + return { + context, + prefix + }; +}; + +const splitQueryFromPostfix = postfix => { + const idx = postfix.indexOf("?"); + let query = ""; + if (idx >= 0) { + query = postfix.substr(idx); + postfix = postfix.substr(0, idx); + } + return { + postfix, + query + }; +}; + ContextDependencyHelpers.create = ( Dep, range, @@ -23,38 +49,30 @@ ContextDependencyHelpers.create = ( options, contextOptions ) => { - let dep; - let prefix; - let postfix; - let prefixRange; - let valueRange; - let idx; - let context; - let regExp; if (param.isTemplateString()) { - prefix = param.quasis[0].string; - postfix = + let prefixRaw = param.quasis[0].string; + let postfixRaw = param.quasis.length > 1 ? param.quasis[param.quasis.length - 1].string : ""; - prefixRange = [param.quasis[0].range[0], param.quasis[0].range[1]]; - valueRange = param.range; - idx = prefix.lastIndexOf("/"); - context = "."; - if (idx >= 0) { - context = prefix.substr(0, idx); - prefix = `.${prefix.substr(idx)}`; - } + const prefixRange = [param.quasis[0].range[0], param.quasis[0].range[1]]; + const postfixRange = + param.quasis.length > 1 + ? param.quasis[param.quasis.length - 1].range + : ""; + const valueRange = param.range; + const { context, prefix } = splitContextFromPrefix(prefixRaw); + const { postfix, query } = splitQueryFromPostfix(postfixRaw); // If there are more than two quasis, maybe the generated RegExp can be more precise? - regExp = new RegExp( + const regExp = new RegExp( `^${quotemeta(prefix)}${options.wrappedContextRegExp.source}${quotemeta( postfix )}$` ); - dep = new Dep( + const dep = new Dep( Object.assign( { - request: context, + request: context + query, recursive: options.wrappedContextRecursive, regExp, mode: "sync" @@ -65,12 +83,20 @@ ContextDependencyHelpers.create = ( valueRange ); dep.loc = expr.loc; - dep.replaces = [ - { + const replaces = []; + if (prefixRange && prefix !== prefixRaw) { + replaces.push({ range: prefixRange, value: prefix - } - ]; + }); + } + if (postfixRange && postfix !== postfixRaw) { + replaces.push({ + range: postfixRange, + value: postfix + }); + } + dep.replaces = replaces; dep.critical = options.wrappedContextCritical && "a part of the request of a dependency is an expression"; @@ -80,30 +106,26 @@ ContextDependencyHelpers.create = ( ((param.prefix && param.prefix.isString()) || (param.postfix && param.postfix.isString())) ) { - prefix = param.prefix && param.prefix.isString() ? param.prefix.string : ""; - postfix = + let prefixRaw = + param.prefix && param.prefix.isString() ? param.prefix.string : ""; + let postfixRaw = param.postfix && param.postfix.isString() ? param.postfix.string : ""; - prefixRange = + const prefixRange = param.prefix && param.prefix.isString() ? param.prefix.range : null; - valueRange = [ - prefixRange ? prefixRange[1] : param.range[0], - param.range[1] - ]; - idx = prefix.lastIndexOf("/"); - context = "."; - if (idx >= 0) { - context = prefix.substr(0, idx); - prefix = `.${prefix.substr(idx)}`; - } - regExp = new RegExp( + const postfixRange = + param.postfix && param.postfix.isString() ? param.postfix.range : null; + const valueRange = param.range; + const { context, prefix } = splitContextFromPrefix(prefixRaw); + const { postfix, query } = splitQueryFromPostfix(postfixRaw); + const regExp = new RegExp( `^${quotemeta(prefix)}${options.wrappedContextRegExp.source}${quotemeta( postfix )}$` ); - dep = new Dep( + const dep = new Dep( Object.assign( { - request: context, + request: context + query, recursive: options.wrappedContextRecursive, regExp, mode: "sync" @@ -114,13 +136,26 @@ ContextDependencyHelpers.create = ( valueRange ); dep.loc = expr.loc; - dep.prepend = param.prefix && param.prefix.isString() ? prefix : null; + const replaces = []; + if (prefixRange && prefix !== prefixRaw) { + replaces.push({ + range: prefixRange, + value: JSON.stringify(prefix) + }); + } + if (postfixRange && postfix !== postfixRaw) { + replaces.push({ + range: postfixRange, + value: JSON.stringify(postfix) + }); + } + dep.replaces = replaces; dep.critical = options.wrappedContextCritical && "a part of the request of a dependency is an expression"; return dep; } else { - dep = new Dep( + const dep = new Dep( Object.assign( { request: options.exprContextRequest, diff --git a/lib/dependencies/ContextDependencyTemplateAsId.js b/lib/dependencies/ContextDependencyTemplateAsId.js index 14f5aa79e9c..1ee83ff9915 100644 --- a/lib/dependencies/ContextDependencyTemplateAsId.js +++ b/lib/dependencies/ContextDependencyTemplateAsId.js @@ -20,6 +20,7 @@ class ContextDependencyTemplateAsId { } } source.replace(dep.valueRange[1], dep.range[1] - 1, ")"); + // TODO webpack 5 remove `prepend` it's no longer used source.replace( dep.range[0], dep.valueRange[0] - 1, diff --git a/lib/dependencies/ContextDependencyTemplateAsRequireCall.js b/lib/dependencies/ContextDependencyTemplateAsRequireCall.js index 5dac6c78297..6d833ac83f6 100644 --- a/lib/dependencies/ContextDependencyTemplateAsRequireCall.js +++ b/lib/dependencies/ContextDependencyTemplateAsRequireCall.js @@ -20,6 +20,7 @@ class ContextDependencyTemplateAsRequireCall { } } source.replace(dep.valueRange[1], dep.range[1] - 1, ")"); + // TODO webpack 5 remove `prepend` it's no longer used source.replace( dep.range[0], dep.valueRange[0] - 1, diff --git a/test/cases/parsing/issue-7778/a.js b/test/cases/parsing/issue-7778/a.js index 7afed0bb078..aa67bc111bf 100644 --- a/test/cases/parsing/issue-7778/a.js +++ b/test/cases/parsing/issue-7778/a.js @@ -1,3 +1,3 @@ export default function a() { - return 'a' + return 'a' + __resourceQuery } diff --git a/test/cases/parsing/issue-7778/abc.js b/test/cases/parsing/issue-7778/abc.js new file mode 100644 index 00000000000..0b6145ef755 --- /dev/null +++ b/test/cases/parsing/issue-7778/abc.js @@ -0,0 +1,3 @@ +export default function abc() { + return 'abc' + __resourceQuery +} diff --git a/test/cases/parsing/issue-7778/index.js b/test/cases/parsing/issue-7778/index.js index ad18770238c..0f8dda218e5 100644 --- a/test/cases/parsing/issue-7778/index.js +++ b/test/cases/parsing/issue-7778/index.js @@ -1,13 +1,57 @@ it("should detect query strings in dynamic import as a static value 1 ", function() { - import("./a?queryString").then(({ default: a }) => { - expect(a()).toBe("a"); - }); + return Promise.all([ + import("./a").then(({ default: a }) => { + expect(a()).toBe("a"); + }), + import("./abc").then(({ default: a }) => { + expect(a()).toBe("abc"); + }), + import("./a?queryString").then(({ default: a }) => { + expect(a()).toBe("a?queryString"); + }), + import("./abc?query?String").then(({ default: a }) => { + expect(a()).toBe("abc?query?String"); + }), + ]); }); it("should detect query strings in dynamic import as a static value 2", function() { - var testFileName = "a"; - - import(`./${testFileName}?queryString`).then(({ default: a }) => { - expect(a()).toBe("a"); - }); + var testFileName = "a"; + + return Promise.all([ + import(`./${testFileName}`).then(({ default: a }) => { + expect(a()).toBe("a"); + }), + import(`./${testFileName}bc`).then(({ default: a }) => { + expect(a()).toBe("abc"); + }), + import(`./${testFileName}?queryString`).then(({ default: a }) => { + expect(a()).toBe("a?queryString"); + }), + import(`./${testFileName}bc?query?String`).then(({ default: a }) => { + expect(a()).toBe("abc?query?String"); + }) + ]); +}); + +it("should detect query strings in dynamic import as a static value 2", function() { + var testFileName = "a"; + + return Promise.all([ + import("./" + testFileName).then(({ default: a }) => { + expect(a()).toBe("a"); + }), + import("./" + testFileName + "").then(({ default: a }) => { + expect(a()).toBe("a"); + }), + import("./" + testFileName + "bc").then(({ default: a }) => { + expect(a()).toBe("abc"); + }), + import("./" + testFileName + "?queryString").then(({ default: a }) => { + expect(a()).toBe("a?queryString"); + }), + import("./" + testFileName + "bc?query?String").then(({ default: a }) => { + expect(a()).toBe("abc?query?String"); + }) + ]); }); From 17ebfb9784d75ce18a0529bf3617b38f19eb02dc Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 3 Aug 2018 11:09:26 +0200 Subject: [PATCH 212/310] fix #7829 webpack-hot-client seem to call `addEntry` multiple which causes two Entrypoints with the same name This lead the bad side effects i. e. optimization.runtimeChunk no longer works correctly Now adding an entry with the same name replaces the existing entry --- lib/Compilation.js | 14 ++++++++++++-- .../entry/override-entry-point/fail.js | 3 +++ .../configCases/entry/override-entry-point/ok.js | 3 +++ .../entry/override-entry-point/test.config.js | 8 ++++++++ .../entry/override-entry-point/webpack.config.js | 16 ++++++++++++++++ 5 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 test/configCases/entry/override-entry-point/fail.js create mode 100644 test/configCases/entry/override-entry-point/ok.js create mode 100644 test/configCases/entry/override-entry-point/test.config.js create mode 100644 test/configCases/entry/override-entry-point/webpack.config.js diff --git a/lib/Compilation.js b/lib/Compilation.js index 03f62b6e057..1d41ff106bf 100644 --- a/lib/Compilation.js +++ b/lib/Compilation.js @@ -1025,6 +1025,7 @@ class Compilation extends Tapable { addEntry(context, entry, name, callback) { const slot = { name: name, + // TODO webpack 5 remove `request` request: null, module: null }; @@ -1033,7 +1034,14 @@ class Compilation extends Tapable { slot.request = entry.request; } - this._preparedEntrypoints.push(slot); + // TODO webpack 5: merge modules instead when multiple entry modules are supported + const idx = this._preparedEntrypoints.findIndex(slot => slot.name === name); + if (idx >= 0) { + // Overwrite existing entrypoint + this._preparedEntrypoints[idx] = slot; + } else { + this._preparedEntrypoints.push(slot); + } this._addModuleChain( context, entry, @@ -1049,7 +1057,9 @@ class Compilation extends Tapable { slot.module = module; } else { const idx = this._preparedEntrypoints.indexOf(slot); - this._preparedEntrypoints.splice(idx, 1); + if (idx >= 0) { + this._preparedEntrypoints.splice(idx, 1); + } } return callback(null, module); } diff --git a/test/configCases/entry/override-entry-point/fail.js b/test/configCases/entry/override-entry-point/fail.js new file mode 100644 index 00000000000..bfab02f2fe4 --- /dev/null +++ b/test/configCases/entry/override-entry-point/fail.js @@ -0,0 +1,3 @@ +it("should load correct entry", function() { + throw new Error("This entrypoint should not be used"); +}); diff --git a/test/configCases/entry/override-entry-point/ok.js b/test/configCases/entry/override-entry-point/ok.js new file mode 100644 index 00000000000..89e1169b2d5 --- /dev/null +++ b/test/configCases/entry/override-entry-point/ok.js @@ -0,0 +1,3 @@ +it("should load correct entry", function() { + // ok +}); diff --git a/test/configCases/entry/override-entry-point/test.config.js b/test/configCases/entry/override-entry-point/test.config.js new file mode 100644 index 00000000000..f7e765f2978 --- /dev/null +++ b/test/configCases/entry/override-entry-point/test.config.js @@ -0,0 +1,8 @@ +module.exports = { + findBundle: function() { + return [ + "./runtime~main.js", + "./main.chunk.js" + ] + } +}; diff --git a/test/configCases/entry/override-entry-point/webpack.config.js b/test/configCases/entry/override-entry-point/webpack.config.js new file mode 100644 index 00000000000..2eb94ff79d8 --- /dev/null +++ b/test/configCases/entry/override-entry-point/webpack.config.js @@ -0,0 +1,16 @@ +const SingleEntryPlugin = require("../../../../lib/SingleEntryPlugin"); +module.exports = { + entry: () => ({}), + optimization: { + runtimeChunk: true + }, + output: { + filename: "[name].js", + chunkFilename: "[name].chunk.js" + }, + target: "web", + plugins: [ + new SingleEntryPlugin(__dirname, "./fail", "main"), + new SingleEntryPlugin(__dirname, "./ok", "main") + ] +}; From 025338cc91a867768325120d325b341bdcdc4321 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 6 Aug 2018 09:12:53 +0200 Subject: [PATCH 213/310] 4.16.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e0e3d198bda..a319676af62 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.16.4", + "version": "4.16.5", "author": "Tobias Koppers @sokra", "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", From 1d95e524b379db5db3b101c355160622b4844f6e Mon Sep 17 00:00:00 2001 From: tsangint Date: Thu, 9 Aug 2018 01:27:40 +0800 Subject: [PATCH 214/310] Update Jest URL --- test/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/README.md b/test/README.md index 80fdb9cd64d..c11ac7e6a64 100644 --- a/test/README.md +++ b/test/README.md @@ -62,7 +62,7 @@ Please follow the approach described bellow: * jest will automatically add the output from your test code to ```StatsTestCases.test.js.snap``` and you can always check your results there * Next time test will run -> runner will compare results against your output written to snapshot previously -You can read more about SnapShot testing [right here](https://facebook.github.io/jest/docs/en/snapshot-testing.html) +You can read more about SnapShot testing [right here](https://jestjs.io/docs/snapshot-testing) ## Questions? Comments? If you are still nervous or don't quite understand, please submit an issue and tag us in it, and provide a relevant PR while working on! From 7dc00dbc0998680472aabb346497d798640895a8 Mon Sep 17 00:00:00 2001 From: Sean Larkin Date: Wed, 8 Aug 2018 11:25:56 -0700 Subject: [PATCH 215/310] chore(types): add jsdoc types for UnsupportedFeatureWarning class --- lib/UnsupportedFeatureWarning.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/UnsupportedFeatureWarning.js b/lib/UnsupportedFeatureWarning.js index 284429ea94d..72eef834e89 100644 --- a/lib/UnsupportedFeatureWarning.js +++ b/lib/UnsupportedFeatureWarning.js @@ -6,7 +6,15 @@ const WebpackError = require("./WebpackError"); +/** @typedef {import("./Module")} Module */ +/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */ + class UnsupportedFeatureWarning extends WebpackError { + /** + * @param {Module} module module relevant to warning + * @param {string} message description of warning + * @param {DependencyLocation} loc location start and end positions of the module + */ constructor(module, message, loc) { super(message); From 1cd8b8ba07ce4b09b70dafc73193125b243d66e2 Mon Sep 17 00:00:00 2001 From: Eugen Cazacu <32613393+oygen87@users.noreply.github.com> Date: Sun, 12 Aug 2018 12:33:43 +0200 Subject: [PATCH 216/310] refactor change var to const for consitency in file --- setup/setup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/setup.js b/setup/setup.js index ad774bc1103..eeb17422c4b 100644 --- a/setup/setup.js +++ b/setup/setup.js @@ -47,7 +47,7 @@ function checkSymlinkExistsAsync() { } function ensureYarnInstalledAsync() { - var semverPattern = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/; + const semverPattern = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/; return execGetOutput("yarn", ["-v"], "Check yarn version") .then(stdout => semverPattern.test(stdout), () => false) .then(hasYarn => hasYarn || installYarnAsync()); From fb9b61b72fbf2bb0de8d6535b2496e5794299a13 Mon Sep 17 00:00:00 2001 From: Mihail Bodrov Date: Mon, 13 Aug 2018 01:08:30 +0300 Subject: [PATCH 217/310] Avoid needless sort in Chunk compare --- lib/Chunk.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Chunk.js b/lib/Chunk.js index 7bdded08638..f0bb2ea725c 100644 --- a/lib/Chunk.js +++ b/lib/Chunk.js @@ -313,17 +313,17 @@ class Chunk { * @returns {-1|0|1} this is a comparitor function like sort and returns -1, 0, or 1 based on sort order */ compareTo(otherChunk) { - this._modules.sort(); - otherChunk._modules.sort(); if (this._modules.size > otherChunk._modules.size) return -1; if (this._modules.size < otherChunk._modules.size) return 1; + this._modules.sort(); + otherChunk._modules.sort(); const a = this._modules[Symbol.iterator](); const b = otherChunk._modules[Symbol.iterator](); // eslint-disable-next-line no-constant-condition while (true) { const aItem = a.next(); - const bItem = b.next(); if (aItem.done) return 0; + const bItem = b.next(); const aModuleIdentifier = aItem.value.identifier(); const bModuleIdentifier = bItem.value.identifier(); if (aModuleIdentifier < bModuleIdentifier) return -1; From a9a4f1c8d7f0aea205fad9ab2707b1c8d0de5fdc Mon Sep 17 00:00:00 2001 From: Sibiraj <20282546+Sibiraj-S@users.noreply.github.com> Date: Mon, 13 Aug 2018 23:04:22 +0530 Subject: [PATCH 218/310] docs: update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 5c009e538c7..962f5c332cf 100644 --- a/README.md +++ b/README.md @@ -58,8 +58,6 @@ yarn add webpack --dev

Introduction

-> This README reflects webpack v2.x and v3.x. The webpack v1.x documentation has been deprecated and deleted. - webpack is a bundler for modules. The main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, or packaging just about any resource or asset. From 1345ab252dfe3dc582b1e9293fca6699c6c7ae27 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 14 Aug 2018 11:25:59 +0200 Subject: [PATCH 219/310] fixes #7887 --- lib/optimize/ConcatenatedModule.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/optimize/ConcatenatedModule.js b/lib/optimize/ConcatenatedModule.js index 9e8586d2ca9..a4e1ae4d8a7 100644 --- a/lib/optimize/ConcatenatedModule.js +++ b/lib/optimize/ConcatenatedModule.js @@ -1432,6 +1432,7 @@ class HarmonyExportImportedSpecifierDependencyConcatenatedTemplate { -1, `/* unused concated harmony import ${dep.name} */\n` ); + return; } let finalName; const strictFlag = dep.originModule.buildMeta.strictHarmonyModule From 6235e99248b3c6ecdad436438c233c5d82145210 Mon Sep 17 00:00:00 2001 From: Kevin Purnelle Date: Thu, 26 Jul 2018 20:08:09 +0200 Subject: [PATCH 220/310] feat(IgnorePlugin): allow user to provide his own check functions The user can provide checkResource and checkContext functions that will be called with current resource or context respectively. These functions should return a boolean to decide whether the module should be ignored or not. Now the constructor can accept a single option object. ``` const resourceRegExp = /a_regex/ const contextRegExp = /another_regex/ // before: new webpack.IgnorePlugin(resourceRegExp, contextRegExp) // alternative: new webpack.ignorePlugin({resourceRegExp, contextRegExp}) ``` Note that from Webpack 5, only passing an object will be allowed, so we could encourage people to migrate already. --- lib/IgnorePlugin.js | 41 ++++++++++++++----- schemas/plugins/IgnorePlugin.json | 31 ++++++++++++++ .../webpack.config.js | 6 ++- .../checkContextFn/folder-a/ignored-module.js | 1 + .../checkContextFn/folder-a/normal-module.js | 1 + .../checkContextFn/folder-b/ignored-module.js | 1 + .../checkContextFn/folder-b/normal-module.js | 1 + .../folder-b/only-context-match-require.js | 1 + .../folder-b/only-context-match.js | 1 + .../configCases/ignore/checkContextFn/test.js | 20 +++++++++ .../ignore/checkContextFn/webpack.config.js | 17 ++++++++ .../ignore/checkResourceFn/ignored-module.js | 1 + .../ignore/checkResourceFn/normal-module.js | 1 + .../ignore/checkResourceFn/test.js | 13 ++++++ .../ignore/checkResourceFn/webpack.config.js | 14 +++++++ .../folder-a/ignored-module.js | 1 + .../folder-a/normal-module.js | 1 + .../folder-b/ignored-module.js | 1 + .../folder-b/normal-module.js | 1 + .../folder-b/only-context-match-require.js | 1 + .../folder-b/only-context-match.js | 1 + .../ignore/compatibilityLayer/test.js | 36 ++++++++++++++++ .../compatibilityLayer/webpack.config.js | 8 ++++ .../only-resource-context/webpack.config.js | 6 ++- .../ignore/only-resource/webpack.config.js | 6 ++- .../webpack.config.js | 7 +++- .../resource-and-context/webpack.config.js | 7 +++- 27 files changed, 210 insertions(+), 16 deletions(-) create mode 100644 schemas/plugins/IgnorePlugin.json create mode 100644 test/configCases/ignore/checkContextFn/folder-a/ignored-module.js create mode 100644 test/configCases/ignore/checkContextFn/folder-a/normal-module.js create mode 100644 test/configCases/ignore/checkContextFn/folder-b/ignored-module.js create mode 100644 test/configCases/ignore/checkContextFn/folder-b/normal-module.js create mode 100644 test/configCases/ignore/checkContextFn/folder-b/only-context-match-require.js create mode 100644 test/configCases/ignore/checkContextFn/folder-b/only-context-match.js create mode 100644 test/configCases/ignore/checkContextFn/test.js create mode 100644 test/configCases/ignore/checkContextFn/webpack.config.js create mode 100644 test/configCases/ignore/checkResourceFn/ignored-module.js create mode 100644 test/configCases/ignore/checkResourceFn/normal-module.js create mode 100644 test/configCases/ignore/checkResourceFn/test.js create mode 100644 test/configCases/ignore/checkResourceFn/webpack.config.js create mode 100644 test/configCases/ignore/compatibilityLayer/folder-a/ignored-module.js create mode 100644 test/configCases/ignore/compatibilityLayer/folder-a/normal-module.js create mode 100644 test/configCases/ignore/compatibilityLayer/folder-b/ignored-module.js create mode 100644 test/configCases/ignore/compatibilityLayer/folder-b/normal-module.js create mode 100644 test/configCases/ignore/compatibilityLayer/folder-b/only-context-match-require.js create mode 100644 test/configCases/ignore/compatibilityLayer/folder-b/only-context-match.js create mode 100644 test/configCases/ignore/compatibilityLayer/test.js create mode 100644 test/configCases/ignore/compatibilityLayer/webpack.config.js diff --git a/lib/IgnorePlugin.js b/lib/IgnorePlugin.js index b2c84b12204..6e803e8ffdd 100644 --- a/lib/IgnorePlugin.js +++ b/lib/IgnorePlugin.js @@ -4,18 +4,30 @@ */ "use strict"; +const validateOptions = require("schema-utils"); +const schema = require("../schemas/plugins/IgnorePlugin.json"); + /** @typedef {import("./Compiler")} Compiler */ class IgnorePlugin { /** - * @param {RegExp} resourceRegExp A RegExp to test the request against - * @param {RegExp=} contextRegExp A RegExp to test the context (directory) against + * @param {object} options IgnorePlugin options + * @param {RegExp} options.resourceRegExp - A RegExp to test the request against + * @param {RegExp} options.contextRegExp - A RegExp to test the context (directory) against + * @param {function(string): boolean=} options.checkResource - A filter function for resource + * @param {function(string): boolean=} options.checkContext - A filter function for context */ - constructor(resourceRegExp, contextRegExp) { - /** @private @type {RegExp} */ - this.resourceRegExp = resourceRegExp; - /** @private @type {RegExp} */ - this.contextRegExp = contextRegExp; + constructor(options) { + // TODO webpack 5 remove this compat-layer + if (arguments.length > 1 || options instanceof RegExp) { + options = { + resourceRegExp: arguments[0], + contextRegExp: arguments[1] + }; + } + + validateOptions(schema, options, "IgnorePlugin"); + this.options = options; /** @private @type {Function} */ this.checkIgnore = this.checkIgnore.bind(this); @@ -27,10 +39,13 @@ class IgnorePlugin { * and the resource given matches the regexp. */ checkResource(resource) { - if (!this.resourceRegExp) { + if (this.options.checkResource) { + return this.options.checkResource(resource); + } + if (!this.options.resourceRegExp) { return false; } - return this.resourceRegExp.test(resource); + return this.options.resourceRegExp.test(resource); } /** @@ -39,10 +54,14 @@ class IgnorePlugin { * or if context matches the given regexp. */ checkContext(context) { - if (!this.contextRegExp) { + if (this.options.checkContext) { + return this.options.checkContext(context); + } + + if (!this.options.contextRegExp) { return true; } - return this.contextRegExp.test(context); + return this.options.contextRegExp.test(context); } /** diff --git a/schemas/plugins/IgnorePlugin.json b/schemas/plugins/IgnorePlugin.json new file mode 100644 index 00000000000..8823634a09f --- /dev/null +++ b/schemas/plugins/IgnorePlugin.json @@ -0,0 +1,31 @@ +{ + "type": "object", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "resourceRegExp": { + "description": "A RegExp to test the request against", + "instanceof": "RegExp" + }, + "contextRegExp": { + "description": "A RegExp to test the context (directory) against", + "instanceof": "RegExp" + } + } + }, + { + "additionalProperties": false, + "properties": { + "checkResource": { + "description": "A filter function for resource", + "instanceof": "Function" + }, + "checkContext": { + "description": "A filter function for context", + "instanceof": "Function" + } + } + } + ] +} diff --git a/test/configCases/errors/multi-entry-missing-module/webpack.config.js b/test/configCases/errors/multi-entry-missing-module/webpack.config.js index 221fe4b45df..fd333896cb0 100644 --- a/test/configCases/errors/multi-entry-missing-module/webpack.config.js +++ b/test/configCases/errors/multi-entry-missing-module/webpack.config.js @@ -7,7 +7,11 @@ module.exports = { output: { filename: "[name].js" }, - plugins: [new IgnorePlugin(new RegExp(/intentionally-missing-module/))], + plugins: [ + new IgnorePlugin({ + resourceRegExp: new RegExp(/intentionally-missing-module/) + }) + ], node: { __dirname: false } diff --git a/test/configCases/ignore/checkContextFn/folder-a/ignored-module.js b/test/configCases/ignore/checkContextFn/folder-a/ignored-module.js new file mode 100644 index 00000000000..4e015a52c59 --- /dev/null +++ b/test/configCases/ignore/checkContextFn/folder-a/ignored-module.js @@ -0,0 +1 @@ +module.exports = "ignored"; diff --git a/test/configCases/ignore/checkContextFn/folder-a/normal-module.js b/test/configCases/ignore/checkContextFn/folder-a/normal-module.js new file mode 100644 index 00000000000..fbd72556b4f --- /dev/null +++ b/test/configCases/ignore/checkContextFn/folder-a/normal-module.js @@ -0,0 +1 @@ +module.exports = require("./normal-module"); diff --git a/test/configCases/ignore/checkContextFn/folder-b/ignored-module.js b/test/configCases/ignore/checkContextFn/folder-b/ignored-module.js new file mode 100644 index 00000000000..4e015a52c59 --- /dev/null +++ b/test/configCases/ignore/checkContextFn/folder-b/ignored-module.js @@ -0,0 +1 @@ +module.exports = "ignored"; diff --git a/test/configCases/ignore/checkContextFn/folder-b/normal-module.js b/test/configCases/ignore/checkContextFn/folder-b/normal-module.js new file mode 100644 index 00000000000..83268eff2a0 --- /dev/null +++ b/test/configCases/ignore/checkContextFn/folder-b/normal-module.js @@ -0,0 +1 @@ +module.exports = require("./ignored-module"); diff --git a/test/configCases/ignore/checkContextFn/folder-b/only-context-match-require.js b/test/configCases/ignore/checkContextFn/folder-b/only-context-match-require.js new file mode 100644 index 00000000000..29d7ef3b3dd --- /dev/null +++ b/test/configCases/ignore/checkContextFn/folder-b/only-context-match-require.js @@ -0,0 +1 @@ +module.exports = "should be fine"; diff --git a/test/configCases/ignore/checkContextFn/folder-b/only-context-match.js b/test/configCases/ignore/checkContextFn/folder-b/only-context-match.js new file mode 100644 index 00000000000..3625236da61 --- /dev/null +++ b/test/configCases/ignore/checkContextFn/folder-b/only-context-match.js @@ -0,0 +1 @@ +module.exports = require("./only-context-match-require"); diff --git a/test/configCases/ignore/checkContextFn/test.js b/test/configCases/ignore/checkContextFn/test.js new file mode 100644 index 00000000000..ae4f1ae2c67 --- /dev/null +++ b/test/configCases/ignore/checkContextFn/test.js @@ -0,0 +1,20 @@ +/* globals it */ +"use strict"; + +it("should ignore resources that match resource regex and context", function() { + expect(function() { + require("./folder-b/normal-module"); + }).toThrowError(); +}); + +it("should not ignore resources that match resource but not context", function() { + expect(function() { + require("./folder-a/normal-module"); + }).not.toThrowError(); +}); + +it("should not ignore resources that do not match resource but do match context", function() { + expect(function() { + require("./folder-b/only-context-match"); + }).not.toThrowError(); +}); diff --git a/test/configCases/ignore/checkContextFn/webpack.config.js b/test/configCases/ignore/checkContextFn/webpack.config.js new file mode 100644 index 00000000000..edc3422df24 --- /dev/null +++ b/test/configCases/ignore/checkContextFn/webpack.config.js @@ -0,0 +1,17 @@ +"use strict"; + +const IgnorePlugin = require("../../../../lib/IgnorePlugin"); + +module.exports = { + entry: "./test.js", + plugins: [ + new IgnorePlugin({ + checkResource: function(resource) { + return /ignored-module/.test(resource); + }, + checkContext: function(context) { + return /folder-b/.test(context); + } + }) + ] +}; diff --git a/test/configCases/ignore/checkResourceFn/ignored-module.js b/test/configCases/ignore/checkResourceFn/ignored-module.js new file mode 100644 index 00000000000..4e015a52c59 --- /dev/null +++ b/test/configCases/ignore/checkResourceFn/ignored-module.js @@ -0,0 +1 @@ +module.exports = "ignored"; diff --git a/test/configCases/ignore/checkResourceFn/normal-module.js b/test/configCases/ignore/checkResourceFn/normal-module.js new file mode 100644 index 00000000000..f5f8a087f72 --- /dev/null +++ b/test/configCases/ignore/checkResourceFn/normal-module.js @@ -0,0 +1 @@ +module.exports = "normal"; diff --git a/test/configCases/ignore/checkResourceFn/test.js b/test/configCases/ignore/checkResourceFn/test.js new file mode 100644 index 00000000000..93ce8146bd8 --- /dev/null +++ b/test/configCases/ignore/checkResourceFn/test.js @@ -0,0 +1,13 @@ +/* globals it */ +"use strict"; + +it("should ignore ignored resources", function() { + expect(function() { + require("./ignored-module"); + }).toThrowError(); +}); +it("should not ignore resources that do not match", function() { + expect(function() { + require("./normal-module"); + }).not.toThrowError(); +}); diff --git a/test/configCases/ignore/checkResourceFn/webpack.config.js b/test/configCases/ignore/checkResourceFn/webpack.config.js new file mode 100644 index 00000000000..9fad700187e --- /dev/null +++ b/test/configCases/ignore/checkResourceFn/webpack.config.js @@ -0,0 +1,14 @@ +"use strict"; + +const IgnorePlugin = require("../../../../lib/IgnorePlugin"); + +module.exports = { + entry: "./test.js", + plugins: [ + new IgnorePlugin({ + checkResource: function(resource) { + return /ignored-module/.test(resource); + } + }) + ] +}; diff --git a/test/configCases/ignore/compatibilityLayer/folder-a/ignored-module.js b/test/configCases/ignore/compatibilityLayer/folder-a/ignored-module.js new file mode 100644 index 00000000000..4e015a52c59 --- /dev/null +++ b/test/configCases/ignore/compatibilityLayer/folder-a/ignored-module.js @@ -0,0 +1 @@ +module.exports = "ignored"; diff --git a/test/configCases/ignore/compatibilityLayer/folder-a/normal-module.js b/test/configCases/ignore/compatibilityLayer/folder-a/normal-module.js new file mode 100644 index 00000000000..fbd72556b4f --- /dev/null +++ b/test/configCases/ignore/compatibilityLayer/folder-a/normal-module.js @@ -0,0 +1 @@ +module.exports = require("./normal-module"); diff --git a/test/configCases/ignore/compatibilityLayer/folder-b/ignored-module.js b/test/configCases/ignore/compatibilityLayer/folder-b/ignored-module.js new file mode 100644 index 00000000000..4e015a52c59 --- /dev/null +++ b/test/configCases/ignore/compatibilityLayer/folder-b/ignored-module.js @@ -0,0 +1 @@ +module.exports = "ignored"; diff --git a/test/configCases/ignore/compatibilityLayer/folder-b/normal-module.js b/test/configCases/ignore/compatibilityLayer/folder-b/normal-module.js new file mode 100644 index 00000000000..83268eff2a0 --- /dev/null +++ b/test/configCases/ignore/compatibilityLayer/folder-b/normal-module.js @@ -0,0 +1 @@ +module.exports = require("./ignored-module"); diff --git a/test/configCases/ignore/compatibilityLayer/folder-b/only-context-match-require.js b/test/configCases/ignore/compatibilityLayer/folder-b/only-context-match-require.js new file mode 100644 index 00000000000..29d7ef3b3dd --- /dev/null +++ b/test/configCases/ignore/compatibilityLayer/folder-b/only-context-match-require.js @@ -0,0 +1 @@ +module.exports = "should be fine"; diff --git a/test/configCases/ignore/compatibilityLayer/folder-b/only-context-match.js b/test/configCases/ignore/compatibilityLayer/folder-b/only-context-match.js new file mode 100644 index 00000000000..3625236da61 --- /dev/null +++ b/test/configCases/ignore/compatibilityLayer/folder-b/only-context-match.js @@ -0,0 +1 @@ +module.exports = require("./only-context-match-require"); diff --git a/test/configCases/ignore/compatibilityLayer/test.js b/test/configCases/ignore/compatibilityLayer/test.js new file mode 100644 index 00000000000..97bfa83d013 --- /dev/null +++ b/test/configCases/ignore/compatibilityLayer/test.js @@ -0,0 +1,36 @@ +/* globals it */ +"use strict"; + +// TODO: remove in webpack 5 +it("should ignore context modules that match resource regex and context (compat-layer)", function() { + const folderBContext = function(mod) { + require("./folder-b/" + mod); + }; + + expect(function() { + folderBContext("normal-module"); + }).toThrowError(); +}); + +it("should not ignore context modules that dont match the resource (compat-layer)", function() { + const folderBContext = function(mod) { + require("./folder-b/" + mod); + }; + + expect(function() { + folderBContext("only-context-match"); + }).not.toThrowError(); +}); + +it("should not ignore context modules that dont match the context (compat-layer)", function() { + const folderBContext = function(mod) { + require("./folder-a/" + mod); + }; + + expect(function() { + folderBContext("normal-module"); + }).not.toThrowError(); + expect(function() { + folderBContext("ignored-module"); + }).not.toThrowError(); +}); diff --git a/test/configCases/ignore/compatibilityLayer/webpack.config.js b/test/configCases/ignore/compatibilityLayer/webpack.config.js new file mode 100644 index 00000000000..7151dfc88a2 --- /dev/null +++ b/test/configCases/ignore/compatibilityLayer/webpack.config.js @@ -0,0 +1,8 @@ +"use strict"; + +const IgnorePlugin = require("../../../../lib/IgnorePlugin"); + +module.exports = { + entry: "./test.js", + plugins: [new IgnorePlugin(/ignored-module/, /folder-b/)] +}; diff --git a/test/configCases/ignore/only-resource-context/webpack.config.js b/test/configCases/ignore/only-resource-context/webpack.config.js index d766ec02490..7f9ba4ea372 100644 --- a/test/configCases/ignore/only-resource-context/webpack.config.js +++ b/test/configCases/ignore/only-resource-context/webpack.config.js @@ -4,5 +4,9 @@ const IgnorePlugin = require("../../../../lib/IgnorePlugin"); module.exports = { entry: "./test.js", - plugins: [new IgnorePlugin(/ignored-module/)] + plugins: [ + new IgnorePlugin({ + resourceRegExp: /ignored-module/ + }) + ] }; diff --git a/test/configCases/ignore/only-resource/webpack.config.js b/test/configCases/ignore/only-resource/webpack.config.js index d766ec02490..7f9ba4ea372 100644 --- a/test/configCases/ignore/only-resource/webpack.config.js +++ b/test/configCases/ignore/only-resource/webpack.config.js @@ -4,5 +4,9 @@ const IgnorePlugin = require("../../../../lib/IgnorePlugin"); module.exports = { entry: "./test.js", - plugins: [new IgnorePlugin(/ignored-module/)] + plugins: [ + new IgnorePlugin({ + resourceRegExp: /ignored-module/ + }) + ] }; diff --git a/test/configCases/ignore/resource-and-context-contextmodule/webpack.config.js b/test/configCases/ignore/resource-and-context-contextmodule/webpack.config.js index 7151dfc88a2..27fe5b63d87 100644 --- a/test/configCases/ignore/resource-and-context-contextmodule/webpack.config.js +++ b/test/configCases/ignore/resource-and-context-contextmodule/webpack.config.js @@ -4,5 +4,10 @@ const IgnorePlugin = require("../../../../lib/IgnorePlugin"); module.exports = { entry: "./test.js", - plugins: [new IgnorePlugin(/ignored-module/, /folder-b/)] + plugins: [ + new IgnorePlugin({ + resourceRegExp: /ignored-module/, + contextRegExp: /folder-b/ + }) + ] }; diff --git a/test/configCases/ignore/resource-and-context/webpack.config.js b/test/configCases/ignore/resource-and-context/webpack.config.js index 7151dfc88a2..27fe5b63d87 100644 --- a/test/configCases/ignore/resource-and-context/webpack.config.js +++ b/test/configCases/ignore/resource-and-context/webpack.config.js @@ -4,5 +4,10 @@ const IgnorePlugin = require("../../../../lib/IgnorePlugin"); module.exports = { entry: "./test.js", - plugins: [new IgnorePlugin(/ignored-module/, /folder-b/)] + plugins: [ + new IgnorePlugin({ + resourceRegExp: /ignored-module/, + contextRegExp: /folder-b/ + }) + ] }; From efa69cd6280deb6d599528c1db1128387430c9e1 Mon Sep 17 00:00:00 2001 From: Mihail Bodrov Date: Fri, 17 Aug 2018 00:49:30 +0300 Subject: [PATCH 221/310] Get rid of typeof for checking undefined --- lib/ContextReplacementPlugin.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ContextReplacementPlugin.js b/lib/ContextReplacementPlugin.js index 39c29de83bf..5523c8ab683 100644 --- a/lib/ContextReplacementPlugin.js +++ b/lib/ContextReplacementPlugin.js @@ -60,13 +60,13 @@ class ContextReplacementPlugin { cmf.hooks.beforeResolve.tap("ContextReplacementPlugin", result => { if (!result) return; if (resourceRegExp.test(result.request)) { - if (typeof newContentResource !== "undefined") { + if (newContentResource !== undefined) { result.request = newContentResource; } - if (typeof newContentRecursive !== "undefined") { + if (newContentRecursive !== undefined) { result.recursive = newContentRecursive; } - if (typeof newContentRegExp !== "undefined") { + if (newContentRegExp !== undefined) { result.regExp = newContentRegExp; } if (typeof newContentCallback === "function") { @@ -82,13 +82,13 @@ class ContextReplacementPlugin { cmf.hooks.afterResolve.tap("ContextReplacementPlugin", result => { if (!result) return; if (resourceRegExp.test(result.resource)) { - if (typeof newContentResource !== "undefined") { + if (newContentResource !== undefined) { result.resource = path.resolve(result.resource, newContentResource); } - if (typeof newContentRecursive !== "undefined") { + if (newContentRecursive !== undefined) { result.recursive = newContentRecursive; } - if (typeof newContentRegExp !== "undefined") { + if (newContentRegExp !== undefined) { result.regExp = newContentRegExp; } if (typeof newContentCreateContextMap === "function") { From c253b4b1306484b1c8e13b2c06f03c1c03eba607 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 20 Aug 2018 09:47:10 +0200 Subject: [PATCH 222/310] chunk ids contribute to contenthash for javascript fixes #7915 --- lib/JavascriptModulesPlugin.js | 2 ++ .../contenthash/include-chunk-id/chunk.js | 1 + .../contenthash/include-chunk-id/index.js | 5 +++ .../include-chunk-id/test.config.js | 32 +++++++++++++++++++ .../include-chunk-id/webpack.config.js | 26 +++++++++++++++ 5 files changed, 66 insertions(+) create mode 100644 test/configCases/contenthash/include-chunk-id/chunk.js create mode 100644 test/configCases/contenthash/include-chunk-id/index.js create mode 100644 test/configCases/contenthash/include-chunk-id/test.config.js create mode 100644 test/configCases/contenthash/include-chunk-id/webpack.config.js diff --git a/lib/JavascriptModulesPlugin.js b/lib/JavascriptModulesPlugin.js index 5e0aaf8c4c7..644f024b42a 100644 --- a/lib/JavascriptModulesPlugin.js +++ b/lib/JavascriptModulesPlugin.js @@ -135,6 +135,8 @@ class JavascriptModulesPlugin { const template = chunk.hasRuntime() ? compilation.mainTemplate : compilation.chunkTemplate; + hash.update(`${chunk.id} `); + hash.update(chunk.ids ? chunk.ids.join(",") : ""); template.updateHashForChunk(hash, chunk); for (const m of chunk.modulesIterable) { if (typeof m.source === "function") { diff --git a/test/configCases/contenthash/include-chunk-id/chunk.js b/test/configCases/contenthash/include-chunk-id/chunk.js new file mode 100644 index 00000000000..5ac3a600d4e --- /dev/null +++ b/test/configCases/contenthash/include-chunk-id/chunk.js @@ -0,0 +1 @@ +module.exports = "chunk"; diff --git a/test/configCases/contenthash/include-chunk-id/index.js b/test/configCases/contenthash/include-chunk-id/index.js new file mode 100644 index 00000000000..5d6e2d0a77d --- /dev/null +++ b/test/configCases/contenthash/include-chunk-id/index.js @@ -0,0 +1,5 @@ +it("should compile and run the test", function () {}); + +if(Math.random() < -1) { + import(/* webpackChunkName: "chunk" */ "./chunk"); +} diff --git a/test/configCases/contenthash/include-chunk-id/test.config.js b/test/configCases/contenthash/include-chunk-id/test.config.js new file mode 100644 index 00000000000..6aa0c3c30ca --- /dev/null +++ b/test/configCases/contenthash/include-chunk-id/test.config.js @@ -0,0 +1,32 @@ +var fs = require("fs"); + +var findFile = function(files, regex) { + return files.find(function(file) { + if (regex.test(file)) { + return true; + } + }); +}; + +const allFilenameHashes = new Set(); +const allChunkHashes = new Set(); + +module.exports = { + findBundle: function(i, options) { + var files = fs.readdirSync(options.output.path); + + const filename = findFile(files, new RegExp(`^bundle${i}`)); + const filenameHash = /\.([a-f0-9]+)\.js$/.exec(filename)[1]; + allFilenameHashes.add(filenameHash); + + const chunk = findFile(files, new RegExp(`^chunk${i}`)); + const chunkHash = /\.([a-f0-9]+)\.js$/.exec(chunk)[1]; + allChunkHashes.add(chunkHash); + + return "./" + filename; + }, + afterExecute: () => { + expect(allFilenameHashes.size).toBe(2); + expect(allChunkHashes.size).toBe(2); + } +}; diff --git a/test/configCases/contenthash/include-chunk-id/webpack.config.js b/test/configCases/contenthash/include-chunk-id/webpack.config.js new file mode 100644 index 00000000000..c5a898a9420 --- /dev/null +++ b/test/configCases/contenthash/include-chunk-id/webpack.config.js @@ -0,0 +1,26 @@ +module.exports = [ + { + mode: "production", + name: "normal-ids", + output: { + filename: "bundle0.[contenthash:6].js", + chunkFilename: "chunk0.[contenthash:6].js" + }, + optimization: { + chunkIds: "size", + moduleIds: "named" + } + }, + { + mode: "production", + name: "normal-ids", + output: { + filename: "bundle1.[contenthash:6].js", + chunkFilename: "chunk1.[contenthash:6].js" + }, + optimization: { + chunkIds: "named", + moduleIds: "named" + } + } +]; From 9315ce29aa41d05252a43036cc9f2ff15cad59ef Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 20 Aug 2018 10:34:58 +0200 Subject: [PATCH 223/310] fix exporting globals in scope-hoisted modules fixes #7905 --- lib/optimize/ConcatenatedModule.js | 17 +++++++++++++++++ .../scope-hoisting/export-global/index.js | 7 +++++++ .../scope-hoisting/export-global/module.js | 2 ++ .../scope-hoisting/export-global/module2.js | 1 + .../export-global/webpack.config.js | 5 +++++ 5 files changed, 32 insertions(+) create mode 100644 test/configCases/scope-hoisting/export-global/index.js create mode 100644 test/configCases/scope-hoisting/export-global/module.js create mode 100644 test/configCases/scope-hoisting/export-global/module2.js create mode 100644 test/configCases/scope-hoisting/export-global/webpack.config.js diff --git a/lib/optimize/ConcatenatedModule.js b/lib/optimize/ConcatenatedModule.js index a4e1ae4d8a7..be8dcc84114 100644 --- a/lib/optimize/ConcatenatedModule.js +++ b/lib/optimize/ConcatenatedModule.js @@ -136,6 +136,9 @@ const getFinalName = ( } else if (!info.module.isUsed(exportName)) { return "/* unused export */ undefined"; } + if (info.globalExports.has(directExport)) { + return directExport; + } const name = info.internalNames.get(directExport); if (!name) { throw new Error( @@ -562,6 +565,7 @@ class ConcatenatedModule extends Module { globalScope: undefined, moduleScope: undefined, internalNames: new Map(), + globalExports: new Set(), exportMap: exportMap, reexportMap: reexportMap, hasNamespaceObject: false, @@ -941,6 +945,19 @@ class ConcatenatedModule extends Module { } } } + + // add exported globals + if (info.type === "concatenated") { + const variables = new Set(); + for (const variable of info.moduleScope.variables) { + variables.add(variable.name); + } + for (const [, variable] of info.exportMap) { + if (!variables.has(variable)) { + info.globalExports.add(variable); + } + } + } } // generate names for symbols diff --git a/test/configCases/scope-hoisting/export-global/index.js b/test/configCases/scope-hoisting/export-global/index.js new file mode 100644 index 00000000000..54650d45fd3 --- /dev/null +++ b/test/configCases/scope-hoisting/export-global/index.js @@ -0,0 +1,7 @@ +import { process as p } from "./module"; +import { process as p2 } from "./module2"; + +it("should export globals correctly", () => { + expect(p).toBe(42); + expect(p2).toBe(process); +}); diff --git a/test/configCases/scope-hoisting/export-global/module.js b/test/configCases/scope-hoisting/export-global/module.js new file mode 100644 index 00000000000..f57b982f308 --- /dev/null +++ b/test/configCases/scope-hoisting/export-global/module.js @@ -0,0 +1,2 @@ +const process = 42; +export { process }; diff --git a/test/configCases/scope-hoisting/export-global/module2.js b/test/configCases/scope-hoisting/export-global/module2.js new file mode 100644 index 00000000000..78c685a2591 --- /dev/null +++ b/test/configCases/scope-hoisting/export-global/module2.js @@ -0,0 +1 @@ +export { process }; diff --git a/test/configCases/scope-hoisting/export-global/webpack.config.js b/test/configCases/scope-hoisting/export-global/webpack.config.js new file mode 100644 index 00000000000..59e948b1212 --- /dev/null +++ b/test/configCases/scope-hoisting/export-global/webpack.config.js @@ -0,0 +1,5 @@ +module.exports = { + optimization: { + concatenateModules: true + } +}; From 1f954b4f1281f2bb97492fcd911d270efb097fd5 Mon Sep 17 00:00:00 2001 From: Mihail Bodrov Date: Tue, 21 Aug 2018 03:26:50 +0300 Subject: [PATCH 224/310] Get rid typeof undef in all lib --- lib/CompatibilityPlugin.js | 2 +- lib/EnvironmentPlugin.js | 2 +- lib/ExternalModuleFactoryPlugin.js | 4 ++-- lib/HotModuleReplacement.runtime.js | 4 ++-- lib/LibraryTemplatePlugin.js | 2 +- lib/MultiStats.js | 4 ++-- lib/OptionsDefaulter.js | 3 +-- lib/RequireJsStuffPlugin.js | 5 +---- lib/Stats.js | 8 ++------ lib/UmdMainTemplatePlugin.js | 4 ++-- lib/dependencies/AMDPlugin.js | 3 +-- lib/dependencies/CommonJsPlugin.js | 5 +---- lib/dependencies/HarmonyModulesPlugin.js | 5 +---- lib/dependencies/ImportParserPlugin.js | 14 +++++++------- lib/dependencies/ImportPlugin.js | 5 +---- lib/dependencies/RequireContextPlugin.js | 2 +- lib/dependencies/RequireEnsurePlugin.js | 2 +- lib/dependencies/RequireIncludePlugin.js | 2 +- lib/dependencies/SystemPlugin.js | 7 ++----- lib/optimize/ConcatenatedModule.js | 6 +++--- lib/util/identifier.js | 4 ++-- lib/wasm/WebAssemblyGenerator.js | 6 +++--- 22 files changed, 39 insertions(+), 60 deletions(-) diff --git a/lib/CompatibilityPlugin.js b/lib/CompatibilityPlugin.js index 7edea8336b8..1544d6c82a4 100644 --- a/lib/CompatibilityPlugin.js +++ b/lib/CompatibilityPlugin.js @@ -30,7 +30,7 @@ class CompatibilityPlugin { .for("javascript/auto") .tap("CompatibilityPlugin", (parser, parserOptions) => { if ( - typeof parserOptions.browserify !== "undefined" && + parserOptions.browserify !== undefined && !parserOptions.browserify ) return; diff --git a/lib/EnvironmentPlugin.js b/lib/EnvironmentPlugin.js index 40353611130..c9fafaa8a7e 100644 --- a/lib/EnvironmentPlugin.js +++ b/lib/EnvironmentPlugin.js @@ -60,7 +60,7 @@ class EnvironmentPlugin { } defs[`process.env.${key}`] = - typeof value === "undefined" ? "undefined" : JSON.stringify(value); + value === undefined ? "undefined" : JSON.stringify(value); return defs; }, {}); diff --git a/lib/ExternalModuleFactoryPlugin.js b/lib/ExternalModuleFactoryPlugin.js index 390e305239e..b75cc7476fa 100644 --- a/lib/ExternalModuleFactoryPlugin.js +++ b/lib/ExternalModuleFactoryPlugin.js @@ -27,7 +27,7 @@ class ExternalModuleFactoryPlugin { } if (value === false) return factory(data, callback); if (value === true) value = dependency.request; - if (typeof type === "undefined" && /^[a-z0-9]+ /.test(value)) { + if (type === undefined && /^[a-z0-9]+ /.test(value)) { const idx = value.indexOf(" "); type = value.substr(0, idx); value = value.substr(idx + 1); @@ -81,7 +81,7 @@ class ExternalModuleFactoryPlugin { dependency.request, (err, value, type) => { if (err) return callback(err); - if (typeof value !== "undefined") { + if (value !== undefined) { handleExternal(value, type, callback); } else { callback(); diff --git a/lib/HotModuleReplacement.runtime.js b/lib/HotModuleReplacement.runtime.js index 917ef45ba4c..5497091c817 100644 --- a/lib/HotModuleReplacement.runtime.js +++ b/lib/HotModuleReplacement.runtime.js @@ -105,7 +105,7 @@ module.exports = function() { // Module API active: true, accept: function(dep, callback) { - if (typeof dep === "undefined") hot._selfAccepted = true; + if (dep === undefined) hot._selfAccepted = true; else if (typeof dep === "function") hot._selfAccepted = dep; else if (typeof dep === "object") for (var i = 0; i < dep.length; i++) @@ -113,7 +113,7 @@ module.exports = function() { else hot._acceptedDependencies[dep] = callback || function() {}; }, decline: function(dep) { - if (typeof dep === "undefined") hot._selfDeclined = true; + if (dep === undefined) hot._selfDeclined = true; else if (typeof dep === "object") for (var i = 0; i < dep.length; i++) hot._declinedDependencies[dep[i]] = true; diff --git a/lib/LibraryTemplatePlugin.js b/lib/LibraryTemplatePlugin.js index 484442efcbc..c871994fa06 100644 --- a/lib/LibraryTemplatePlugin.js +++ b/lib/LibraryTemplatePlugin.js @@ -30,7 +30,7 @@ const accessorAccess = (base, accessor, joinWith = "; ") => { ? base + accessorToObjectAccess(accessors.slice(0, idx + 1)) : accessors[0] + accessorToObjectAccess(accessors.slice(1, idx + 1)); if (idx === accessors.length - 1) return a; - if (idx === 0 && typeof base === "undefined") { + if (idx === 0 && base === undefined) { return `${a} = typeof ${a} === "object" ? ${a} : {}`; } return `${a} = ${a} || {}`; diff --git a/lib/MultiStats.js b/lib/MultiStats.js index 4713524b8db..1a5fcf2b007 100644 --- a/lib/MultiStats.js +++ b/lib/MultiStats.js @@ -40,11 +40,11 @@ class MultiStats { return obj; }); const showVersion = - typeof options.version === "undefined" + options.version === undefined ? jsons.every(j => j.version) : options.version !== false; const showHash = - typeof options.hash === "undefined" + options.hash === undefined ? jsons.every(j => j.hash) : options.hash !== false; if (showVersion) { diff --git a/lib/OptionsDefaulter.js b/lib/OptionsDefaulter.js index c5ff612d8d7..cad07ea06c2 100644 --- a/lib/OptionsDefaulter.js +++ b/lib/OptionsDefaulter.js @@ -16,8 +16,7 @@ const getProperty = (obj, name) => { const setProperty = (obj, name, value) => { name = name.split("."); for (let i = 0; i < name.length - 1; i++) { - if (typeof obj[name[i]] !== "object" && typeof obj[name[i]] !== "undefined") - return; + if (typeof obj[name[i]] !== "object" && obj[name[i]] !== undefined) return; if (Array.isArray(obj[name[i]])) return; if (!obj[name[i]]) obj[name[i]] = {}; obj = obj[name[i]]; diff --git a/lib/RequireJsStuffPlugin.js b/lib/RequireJsStuffPlugin.js index 84793c8a997..632deefc2d6 100644 --- a/lib/RequireJsStuffPlugin.js +++ b/lib/RequireJsStuffPlugin.js @@ -19,10 +19,7 @@ module.exports = class RequireJsStuffPlugin { new ConstDependency.Template() ); const handler = (parser, parserOptions) => { - if ( - typeof parserOptions.requireJs !== "undefined" && - !parserOptions.requireJs - ) + if (parserOptions.requireJs !== undefined && !parserOptions.requireJs) return; parser.hooks.call diff --git a/lib/Stats.js b/lib/Stats.js index 4594a94615a..fd7902bee79 100644 --- a/lib/Stats.js +++ b/lib/Stats.js @@ -13,7 +13,7 @@ const compareLocations = require("./compareLocations"); const optionsOrFallback = (...args) => { let optionValues = []; optionValues.push(...args); - return optionValues.find(optionValue => typeof optionValue !== "undefined"); + return optionValues.find(optionValue => optionValue !== undefined); }; const compareId = (a, b) => { @@ -105,11 +105,7 @@ class Stats { } const optionOrLocalFallback = (v, def) => - typeof v !== "undefined" - ? v - : typeof options.all !== "undefined" - ? options.all - : def; + v !== undefined ? v : options.all !== undefined ? options.all : def; const testAgainstGivenOption = item => { if (typeof item === "string") { diff --git a/lib/UmdMainTemplatePlugin.js b/lib/UmdMainTemplatePlugin.js index bb2e466290c..551ac76f836 100644 --- a/lib/UmdMainTemplatePlugin.js +++ b/lib/UmdMainTemplatePlugin.js @@ -31,7 +31,7 @@ const accessorAccess = (base, accessor, joinWith = ", ") => { ? base + accessorToObjectAccess(accessors.slice(0, idx + 1)) : accessors[0] + accessorToObjectAccess(accessors.slice(1, idx + 1)); if (idx === accessors.length - 1) return a; - if (idx === 0 && typeof base === "undefined") + if (idx === 0 && base === undefined) return `${a} = typeof ${a} === "object" ? ${a} : {}`; return `${a} = ${a} || {}`; }) @@ -147,7 +147,7 @@ class UmdMainTemplatePlugin { if (typeof request === "object") { request = request[type]; } - if (typeof request === "undefined") { + if (request === undefined) { throw new Error( "Missing external configuration for type:" + type ); diff --git a/lib/dependencies/AMDPlugin.js b/lib/dependencies/AMDPlugin.js index 06b8cd73075..d113491c969 100644 --- a/lib/dependencies/AMDPlugin.js +++ b/lib/dependencies/AMDPlugin.js @@ -98,8 +98,7 @@ class AMDPlugin { ); const handler = (parser, parserOptions) => { - if (typeof parserOptions.amd !== "undefined" && !parserOptions.amd) - return; + if (parserOptions.amd !== undefined && !parserOptions.amd) return; const setExpressionToModule = (outerExpr, module) => { parser.hooks.expression.for(outerExpr).tap("AMDPlugin", expr => { diff --git a/lib/dependencies/CommonJsPlugin.js b/lib/dependencies/CommonJsPlugin.js index fc6cae7ec82..6d441a872d9 100644 --- a/lib/dependencies/CommonJsPlugin.js +++ b/lib/dependencies/CommonJsPlugin.js @@ -83,10 +83,7 @@ class CommonJsPlugin { ); const handler = (parser, parserOptions) => { - if ( - typeof parserOptions.commonjs !== "undefined" && - !parserOptions.commonjs - ) + if (parserOptions.commonjs !== undefined && !parserOptions.commonjs) return; const requireExpressions = [ diff --git a/lib/dependencies/HarmonyModulesPlugin.js b/lib/dependencies/HarmonyModulesPlugin.js index 12a50a25aea..43a8d4c0c1d 100644 --- a/lib/dependencies/HarmonyModulesPlugin.js +++ b/lib/dependencies/HarmonyModulesPlugin.js @@ -121,10 +121,7 @@ class HarmonyModulesPlugin { ); const handler = (parser, parserOptions) => { - if ( - typeof parserOptions.harmony !== "undefined" && - !parserOptions.harmony - ) + if (parserOptions.harmony !== undefined && !parserOptions.harmony) return; new HarmonyDetectionParserPlugin().apply(parser); diff --git a/lib/dependencies/ImportParserPlugin.js b/lib/dependencies/ImportParserPlugin.js index 14043851965..86c6b7438e3 100644 --- a/lib/dependencies/ImportParserPlugin.js +++ b/lib/dependencies/ImportParserPlugin.js @@ -54,7 +54,7 @@ class ImportParserPlugin { } if (importOptions) { - if (typeof importOptions.webpackIgnore !== "undefined") { + if (importOptions.webpackIgnore !== undefined) { if (typeof importOptions.webpackIgnore !== "boolean") { parser.state.module.warnings.push( new UnsupportedFeatureWarning( @@ -72,7 +72,7 @@ class ImportParserPlugin { } } } - if (typeof importOptions.webpackChunkName !== "undefined") { + if (importOptions.webpackChunkName !== undefined) { if (typeof importOptions.webpackChunkName !== "string") { parser.state.module.warnings.push( new UnsupportedFeatureWarning( @@ -87,7 +87,7 @@ class ImportParserPlugin { chunkName = importOptions.webpackChunkName; } } - if (typeof importOptions.webpackMode !== "undefined") { + if (importOptions.webpackMode !== undefined) { if (typeof importOptions.webpackMode !== "string") { parser.state.module.warnings.push( new UnsupportedFeatureWarning( @@ -102,7 +102,7 @@ class ImportParserPlugin { mode = importOptions.webpackMode; } } - if (typeof importOptions.webpackPrefetch !== "undefined") { + if (importOptions.webpackPrefetch !== undefined) { if (importOptions.webpackPrefetch === true) { groupOptions.prefetchOrder = 0; } else if (typeof importOptions.webpackPrefetch === "number") { @@ -119,7 +119,7 @@ class ImportParserPlugin { ); } } - if (typeof importOptions.webpackPreload !== "undefined") { + if (importOptions.webpackPreload !== undefined) { if (importOptions.webpackPreload === true) { groupOptions.preloadOrder = 0; } else if (typeof importOptions.webpackPreload === "number") { @@ -136,7 +136,7 @@ class ImportParserPlugin { ); } } - if (typeof importOptions.webpackInclude !== "undefined") { + if (importOptions.webpackInclude !== undefined) { if ( !importOptions.webpackInclude || importOptions.webpackInclude.constructor.name !== "RegExp" @@ -154,7 +154,7 @@ class ImportParserPlugin { include = new RegExp(importOptions.webpackInclude); } } - if (typeof importOptions.webpackExclude !== "undefined") { + if (importOptions.webpackExclude !== undefined) { if ( !importOptions.webpackExclude || importOptions.webpackExclude.constructor.name !== "RegExp" diff --git a/lib/dependencies/ImportPlugin.js b/lib/dependencies/ImportPlugin.js index 8d488e0d904..1647192595b 100644 --- a/lib/dependencies/ImportPlugin.js +++ b/lib/dependencies/ImportPlugin.js @@ -57,10 +57,7 @@ class ImportPlugin { ); const handler = (parser, parserOptions) => { - if ( - typeof parserOptions.import !== "undefined" && - !parserOptions.import - ) + if (parserOptions.import !== undefined && !parserOptions.import) return; new ImportParserPlugin(options).apply(parser); diff --git a/lib/dependencies/RequireContextPlugin.js b/lib/dependencies/RequireContextPlugin.js index 24312449c22..4e44e87117a 100644 --- a/lib/dependencies/RequireContextPlugin.js +++ b/lib/dependencies/RequireContextPlugin.js @@ -42,7 +42,7 @@ class RequireContextPlugin { const handler = (parser, parserOptions) => { if ( - typeof parserOptions.requireContext !== "undefined" && + parserOptions.requireContext !== undefined && !parserOptions.requireContext ) return; diff --git a/lib/dependencies/RequireEnsurePlugin.js b/lib/dependencies/RequireEnsurePlugin.js index e508ec4fcdd..c818e91bc1d 100644 --- a/lib/dependencies/RequireEnsurePlugin.js +++ b/lib/dependencies/RequireEnsurePlugin.js @@ -38,7 +38,7 @@ class RequireEnsurePlugin { const handler = (parser, parserOptions) => { if ( - typeof parserOptions.requireEnsure !== "undefined" && + parserOptions.requireEnsure !== undefined && !parserOptions.requireEnsure ) return; diff --git a/lib/dependencies/RequireIncludePlugin.js b/lib/dependencies/RequireIncludePlugin.js index e5811a07e70..e7d535bc3a0 100644 --- a/lib/dependencies/RequireIncludePlugin.js +++ b/lib/dependencies/RequireIncludePlugin.js @@ -25,7 +25,7 @@ class RequireIncludePlugin { const handler = (parser, parserOptions) => { if ( - typeof parserOptions.requireInclude !== "undefined" && + parserOptions.requireInclude !== undefined && !parserOptions.requireInclude ) return; diff --git a/lib/dependencies/SystemPlugin.js b/lib/dependencies/SystemPlugin.js index c85778861b8..0e3419b5748 100644 --- a/lib/dependencies/SystemPlugin.js +++ b/lib/dependencies/SystemPlugin.js @@ -17,13 +17,10 @@ class SystemPlugin { "SystemPlugin", (compilation, { normalModuleFactory }) => { const handler = (parser, parserOptions) => { - if ( - typeof parserOptions.system !== "undefined" && - !parserOptions.system - ) + if (parserOptions.system !== undefined && !parserOptions.system) return; - const shouldWarn = typeof parserOptions.system === "undefined"; + const shouldWarn = parserOptions.system === undefined; const setNotSupported = name => { parser.hooks.evaluateTypeof diff --git a/lib/optimize/ConcatenatedModule.js b/lib/optimize/ConcatenatedModule.js index a4e1ae4d8a7..5ec522fee8a 100644 --- a/lib/optimize/ConcatenatedModule.js +++ b/lib/optimize/ConcatenatedModule.js @@ -267,7 +267,7 @@ const getPathInAst = (ast, node) => { if (Array.isArray(ast)) { for (i = 0; i < ast.length; i++) { const enterResult = enterNode(ast[i]); - if (typeof enterResult !== "undefined") return enterResult; + if (enterResult !== undefined) return enterResult; } } else if (ast && typeof ast === "object") { const keys = Object.keys(ast); @@ -275,10 +275,10 @@ const getPathInAst = (ast, node) => { const value = ast[keys[i]]; if (Array.isArray(value)) { const pathResult = getPathInAst(value, node); - if (typeof pathResult !== "undefined") return pathResult; + if (pathResult !== undefined) return pathResult; } else if (value && typeof value === "object") { const enterResult = enterNode(value); - if (typeof enterResult !== "undefined") return enterResult; + if (enterResult !== undefined) return enterResult; } } } diff --git a/lib/util/identifier.js b/lib/util/identifier.js index ade63590821..186bc064e53 100644 --- a/lib/util/identifier.js +++ b/lib/util/identifier.js @@ -60,13 +60,13 @@ exports.makePathsRelative = (context, identifier, cache) => { let cachedResult; let contextCache = relativePaths.get(context); - if (typeof contextCache === "undefined") { + if (contextCache === undefined) { relativePaths.set(context, (contextCache = new Map())); } else { cachedResult = contextCache.get(identifier); } - if (typeof cachedResult !== "undefined") { + if (cachedResult !== undefined) { return cachedResult; } else { const relativePath = _makePathsRelative(context, identifier); diff --git a/lib/wasm/WebAssemblyGenerator.js b/lib/wasm/WebAssemblyGenerator.js index 1de627866cf..ca664da92d9 100644 --- a/lib/wasm/WebAssemblyGenerator.js +++ b/lib/wasm/WebAssemblyGenerator.js @@ -114,7 +114,7 @@ const getCountImportedFunc = ast => { const getNextTypeIndex = ast => { const typeSectionMetadata = t.getSectionMetadata(ast, "type"); - if (typeof typeSectionMetadata === "undefined") { + if (typeSectionMetadata === undefined) { return t.indexLiteral(0); } @@ -135,7 +135,7 @@ const getNextTypeIndex = ast => { const getNextFuncIndex = (ast, countImportedFunc) => { const funcSectionMetadata = t.getSectionMetadata(ast, "func"); - if (typeof funcSectionMetadata === "undefined") { + if (funcSectionMetadata === undefined) { return t.indexLiteral(0 + countImportedFunc); } @@ -271,7 +271,7 @@ const rewriteImports = ({ ast, usedDependencyMap }) => bin => { path.node.module + ":" + path.node.name ); - if (typeof result !== "undefined") { + if (result !== undefined) { path.node.module = result.module; path.node.name = result.name; } From 6f1f18f84dee330ec582d4e9c075c47c9a732102 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Tue, 21 Aug 2018 10:41:50 +0200 Subject: [PATCH 225/310] 4.17.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a319676af62..f095f2d1126 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.16.5", + "version": "4.17.0", "author": "Tobias Koppers @sokra", "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", From a92c23ef76514ab2e33669317b88899ff8673e4d Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 22 Aug 2018 11:11:37 +0200 Subject: [PATCH 226/310] fixes #7930 --- lib/optimize/ConcatenatedModule.js | 12 +++++++----- test/cases/scope-hoisting/issue-7930/export.js | 5 +++++ test/cases/scope-hoisting/issue-7930/index.js | 10 ++++++++++ test/cases/scope-hoisting/issue-7930/module.js | 1 + 4 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 test/cases/scope-hoisting/issue-7930/export.js create mode 100644 test/cases/scope-hoisting/issue-7930/index.js create mode 100644 test/cases/scope-hoisting/issue-7930/module.js diff --git a/lib/optimize/ConcatenatedModule.js b/lib/optimize/ConcatenatedModule.js index 2458c848486..52d33e6f35b 100644 --- a/lib/optimize/ConcatenatedModule.js +++ b/lib/optimize/ConcatenatedModule.js @@ -1447,9 +1447,9 @@ class HarmonyExportImportedSpecifierDependencyConcatenatedTemplate { if (!used) { source.insert( -1, - `/* unused concated harmony import ${dep.name} */\n` + `/* unused concated harmony import ${def.name} */\n` ); - return; + continue; } let finalName; const strictFlag = dep.originModule.buildMeta.strictHarmonyModule @@ -1466,9 +1466,11 @@ class HarmonyExportImportedSpecifierDependencyConcatenatedTemplate { }_${exportData}${strictFlag}__`; } const exportsName = this.rootModule.exportsArgument; - const content = `/* concated harmony reexport */__webpack_require__.d(${exportsName}, ${JSON.stringify( - used - )}, function() { return ${finalName}; });\n`; + const content = + `/* concated harmony reexport ${def.name} */` + + `__webpack_require__.d(${exportsName}, ` + + `${JSON.stringify(used)}, ` + + `function() { return ${finalName}; });\n`; source.insert(-1, content); } } else { diff --git a/test/cases/scope-hoisting/issue-7930/export.js b/test/cases/scope-hoisting/issue-7930/export.js new file mode 100644 index 00000000000..02fdba6f51e --- /dev/null +++ b/test/cases/scope-hoisting/issue-7930/export.js @@ -0,0 +1,5 @@ +export var a = 1; + +var value = 42; + +export { value }; diff --git a/test/cases/scope-hoisting/issue-7930/index.js b/test/cases/scope-hoisting/issue-7930/index.js new file mode 100644 index 00000000000..fae3343e4d2 --- /dev/null +++ b/test/cases/scope-hoisting/issue-7930/index.js @@ -0,0 +1,10 @@ +import { value } from "./module"; + +it("should export the correct value", () => { + expect(value).toBe(42); +}); + +// prevent scope hoisting +if(Math.random() < -1) { + console.log(module.id); +} diff --git a/test/cases/scope-hoisting/issue-7930/module.js b/test/cases/scope-hoisting/issue-7930/module.js new file mode 100644 index 00000000000..ffea9c3cfea --- /dev/null +++ b/test/cases/scope-hoisting/issue-7930/module.js @@ -0,0 +1 @@ +export * from "./export"; From ff3ef5eb284ddcd3da8c3f5bef6318e873779ffe Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 22 Aug 2018 11:50:11 +0200 Subject: [PATCH 227/310] 4.17.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f095f2d1126..d0276aa367a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.17.0", + "version": "4.17.1", "author": "Tobias Koppers @sokra", "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", From 2740d4a9afd03a9125da71da7589e71610549c28 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 23 Aug 2018 16:00:17 +0200 Subject: [PATCH 228/310] improve jest startup performance lint-staged all files --- .prettierignore | 3 +-- package.json | 42 ++++++++++++++++++++++-------------------- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/.prettierignore b/.prettierignore index 44cf7b81cdd..cb7d2b338a5 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,6 +2,7 @@ **/*.* # Enable prettier for the following paths. +!*.{ts,js,json} !setup/**/*.js !lib/**/*.js !bin/*.js @@ -13,5 +14,3 @@ !test/**/webpack.config.js !examples/**/webpack.config.js !schemas/**/*.js -!declarations.d.ts -!tsconfig.json diff --git a/package.json b/package.json index d0276aa367a..05b595329de 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "code-lint": "eslint --cache setup lib bin hot buildin benchmark tooling \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\"", "type-lint": "tsc --pretty", "fix": "yarn code-lint --fix", - "pretty": "prettier --write \"setup/**/*.js\" \"lib/**/*.js\" \"bin/*.js\" \"hot/*.js\" \"buildin/*.js\" \"benchmark/**/*.js\" \"tooling/*.js\" \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\" \"declarations.d.ts\" \"tsconfig.json\"", + "pretty": "prettier --write \"*.{ts,js,json}\" \"setup/**/*.js\" \"lib/**/*.js\" \"bin/*.js\" \"hot/*.js\" \"buildin/*.js\" \"benchmark/**/*.js\" \"tooling/*.js\" \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\"", "schema-lint": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"/test/*.lint.js\" --no-verbose", "benchmark": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"/test/*.benchmark.js\" --runInBand", "cover": "yarn cover:init && yarn cover:all && yarn cover:report", @@ -139,7 +139,7 @@ } }, "lint-staged": { - "lib/**/*.js": [ + "*.js|{lib,setup,bin,hot,buildin,tooling,schemas}/**/*.js|test/*.js|{test,examples}/**/webpack.config.js}": [ "eslint --cache" ] }, @@ -151,36 +151,38 @@ "/test/*.unittest.js" ], "watchPathIgnorePatterns": [ - "/node_modules/webpack/node_modules/", - "/test/js/", - "/test/browsertest/js/", - "/test/fixtures/temp-cache-fixture/", + "/.git", + "/node_modules", + "/test/js", + "/test/browsertest/js", + "/test/fixtures/temp-cache-fixture", "/test/fixtures/temp-", - "/benchmark/", + "/benchmark", "/examples/*/dist", - "/coverage/", - "/.eslintcache/" + "/coverage", + "/.eslintcache" ], "modulePathIgnorePatterns": [ - "/node_modules/webpack/node_modules/", - "/test/js/", - "/test/browsertest/js/", - "/test/fixtures/temp-cache-fixture/", + "/.git", + "/node_modules/webpack/node_modules", + "/test/js", + "/test/browsertest/js", + "/test/fixtures/temp-cache-fixture", "/test/fixtures/temp-", - "/benchmark/", + "/benchmark", "/examples/*/dist", - "/coverage/", - "/.eslintcache/" + "/coverage", + "/.eslintcache" ], "transformIgnorePatterns": [ - "/" + "" ], "coverageDirectory": "/coverage", "coveragePathIgnorePatterns": [ "\\.runtime\\.js$", - "/test/", - "/schemas/", - "/node_modules/" + "/test", + "/schemas", + "/node_modules" ], "testEnvironment": "node", "coverageReporters": [ From 12762ff37fe882f11f6fa962a9e18632bcd482e6 Mon Sep 17 00:00:00 2001 From: Philip Walton Date: Thu, 23 Aug 2018 11:10:46 -0700 Subject: [PATCH 229/310] Add sourcemap support for .mjs output files --- lib/SourceMapDevToolPlugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/SourceMapDevToolPlugin.js b/lib/SourceMapDevToolPlugin.js index 111d7a877ff..315a9c22c42 100644 --- a/lib/SourceMapDevToolPlugin.js +++ b/lib/SourceMapDevToolPlugin.js @@ -84,7 +84,7 @@ class SourceMapDevToolPlugin { const fallbackModuleFilenameTemplate = this.fallbackModuleFilenameTemplate; const requestShortener = compiler.requestShortener; const options = this.options; - options.test = options.test || /\.(js|css)($|\?)/i; + options.test = options.test || /\.(m?js|css)($|\?)/i; const matchObject = ModuleFilenameHelpers.matchObject.bind( undefined, From 1b886ee3424e7761745d608324a301dc2998b928 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Fri, 24 Aug 2018 16:57:16 +0200 Subject: [PATCH 230/310] improve prettier and lint config and performance --- .editorconfig | 4 - .eslintrc.js | 45 +++--- .prettierignore | 18 +-- .prettierrc.js | 10 +- package.json | 4 +- schemas/WebpackOptions.json | 132 ++++-------------- schemas/plugins/BannerPlugin.json | 4 +- schemas/plugins/DllPlugin.json | 4 +- schemas/plugins/DllReferencePlugin.json | 13 +- schemas/plugins/HashedModuleIdsPlugin.json | 6 +- schemas/plugins/SourceMapDevToolPlugin.json | 10 +- .../plugins/optimize/MinChunkSizePlugin.json | 4 +- test/Schemas.lint.js | 6 - tsconfig.json | 28 ++-- 14 files changed, 89 insertions(+), 199 deletions(-) diff --git a/.editorconfig b/.editorconfig index 45137161298..2bd8cf9e86d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,10 +8,6 @@ trim_trailing_whitespace = true insert_final_newline = true max_line_length = 80 -[.prettierrc] -indent_style = space -indent_size = 2 - [*.{yml,yaml,json}] indent_style = space indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js index e4a7a3e861a..37b4be6f4a4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,7 +1,11 @@ module.exports = { root: true, plugins: ["prettier", "node", "jest"], - extends: ["eslint:recommended", "plugin:node/recommended", "plugin:prettier/recommended"], + extends: [ + "eslint:recommended", + "plugin:node/recommended", + "plugin:prettier/recommended" + ], env: { node: true, es6: true @@ -16,8 +20,8 @@ module.exports = { "no-template-curly-in-string": "error", "no-caller": "error", "no-control-regex": "off", - "yoda": "error", - "eqeqeq": "error", + yoda: "error", + eqeqeq: "error", "global-require": "off", "brace-style": "error", "eol-last": "error", @@ -27,23 +31,26 @@ module.exports = { "no-unused-vars": ["error", { args: "none" }], "no-unsafe-negation": "error", "no-loop-func": "warn", - "indent": "off", + indent: "off", "no-console": "off", - "valid-jsdoc": ["error", { - "prefer": { - "return": "returns", - "prop": "property", - "memberof": "DONTUSE", - "class": "DONTUSE", - "inheritdoc": "DONTUSE", - "description": "DONTUSE", - "readonly": "DONTUSE" - }, - "preferType": { - "*": "any" - }, - "requireReturnType": true - }], + "valid-jsdoc": [ + "error", + { + prefer: { + return: "returns", + prop: "property", + memberof: "DONTUSE", + class: "DONTUSE", + inheritdoc: "DONTUSE", + description: "DONTUSE", + readonly: "DONTUSE" + }, + preferType: { + "*": "any" + }, + requireReturnType: true + } + ], "node/no-unsupported-features": "error", "node/no-deprecated-api": "error", "node/no-missing-import": "error", diff --git a/.prettierignore b/.prettierignore index cb7d2b338a5..bdf38e4bc19 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,16 +1,8 @@ -# Ignore all paths. -**/*.* - -# Enable prettier for the following paths. -!*.{ts,js,json} -!setup/**/*.js -!lib/**/*.js -!bin/*.js -!hot/*.js -!buildin/*.js -!benchmark/**/*.js +# Ignore test fixtures +test !test/*.js -!tooling/*.js !test/**/webpack.config.js + +# Ignore example fixtures +examples !examples/**/webpack.config.js -!schemas/**/*.js diff --git a/.prettierrc.js b/.prettierrc.js index 03b9da1bac3..cc7e3b51355 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,5 +1,13 @@ module.exports = { printWidth: 80, useTabs: true, - tabWidth: 2 + tabWidth: 2, + overrides: [ + { + files: "*.json", + options: { + useTabs: false + } + } + ] }; diff --git a/package.json b/package.json index 05b595329de..3b46b09a294 100644 --- a/package.json +++ b/package.json @@ -120,10 +120,10 @@ "pretest": "yarn lint", "prelint": "yarn setup", "lint": "yarn code-lint && yarn schema-lint && yarn type-lint", - "code-lint": "eslint --cache setup lib bin hot buildin benchmark tooling \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\"", + "code-lint": "eslint --cache \"{setup,lib,bin,hot,buildin,benchmark,tooling,schemas}/**/*.js\" \"test/*.js\" \"test/{configCases,watchCases,statsCases,hotCases}/**/webpack.config.js\" \"examples/**/webpack.config.js\"", "type-lint": "tsc --pretty", "fix": "yarn code-lint --fix", - "pretty": "prettier --write \"*.{ts,js,json}\" \"setup/**/*.js\" \"lib/**/*.js\" \"bin/*.js\" \"hot/*.js\" \"buildin/*.js\" \"benchmark/**/*.js\" \"tooling/*.js\" \"test/*.js\" \"test/**/webpack.config.js\" \"examples/**/webpack.config.js\" \"schemas/**/*.js\"", + "pretty": "prettier --loglevel warn --write \"*.{ts,js,json}\" \"{setup,lib,bin,hot,buildin,benchmark,tooling,schemas}/**/*.{js,json}\" \"test/*.js\" \"test/{configCases,watchCases,statsCases,hotCases}/**/webpack.config.js\" \"examples/**/webpack.config.js\"", "schema-lint": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"/test/*.lint.js\" --no-verbose", "benchmark": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"/test/*.benchmark.js\" --runInBand", "cover": "yarn cover:init && yarn cover:all && yarn cover:report", diff --git a/schemas/WebpackOptions.json b/schemas/WebpackOptions.json index bc2c3ff5879..01513196134 100644 --- a/schemas/WebpackOptions.json +++ b/schemas/WebpackOptions.json @@ -11,9 +11,7 @@ } }, "additionalProperties": true, - "required": [ - "apply" - ] + "required": ["apply"] }, "common.pluginObject": { "description": "Plugin instance", @@ -25,9 +23,7 @@ } }, "additionalProperties": true, - "required": [ - "apply" - ] + "required": ["apply"] }, "common.arrayOfStringOrStringArrayValues": { "items": { @@ -339,19 +335,11 @@ }, "crossOriginLoading": { "description": "This option enables cross-origin loading of chunks.", - "enum": [ - false, - "anonymous", - "use-credentials" - ] + "enum": [false, "anonymous", "use-credentials"] }, "jsonpScriptType": { "description": "This option enables loading async chunks via a custom script type, such as script type=\"module\"", - "enum": [ - false, - "text/javascript", - "module" - ] + "enum": [false, "text/javascript", "module"] }, "chunkLoadTimeout": { "description": "Number of milliseconds before chunk request expires", @@ -837,10 +825,7 @@ "properties": { "enforce": { "description": "Enforce this rule as pre or post step", - "enum": [ - "pre", - "post" - ] + "enum": ["pre", "post"] }, "exclude": { "description": "Shortcut for resource.exclude", @@ -1114,11 +1099,7 @@ "properties": { "mode": { "description": "Enable production optimizations or development hints.", - "enum": [ - "development", - "production", - "none" - ] + "enum": ["development", "production", "none"] }, "amd": { "description": "Set the value of `require.amd` and `define.amd`." @@ -1164,9 +1145,7 @@ "type": "string" }, { - "enum": [ - false - ] + "enum": [false] } ] }, @@ -1206,52 +1185,29 @@ "description": "Include polyfills or mocks for various node stuff.", "anyOf": [ { - "enum": [ - false - ] + "enum": [false] }, { "additionalProperties": { "description": "Include a polyfill for the node.js module", - "enum": [ - false, - true, - "mock", - "empty" - ] + "enum": [false, true, "mock", "empty"] }, "properties": { "Buffer": { "description": "Include a polyfill for the 'Buffer' variable", - "enum": [ - false, - true, - "mock" - ] + "enum": [false, true, "mock"] }, "__dirname": { "description": "Include a polyfill for the '__dirname' variable", - "enum": [ - false, - true, - "mock" - ] + "enum": [false, true, "mock"] }, "__filename": { "description": "Include a polyfill for the '__filename' variable", - "enum": [ - false, - true, - "mock" - ] + "enum": [false, true, "mock"] }, "console": { "description": "Include a polyfill for the 'console' variable", - "enum": [ - false, - true, - "mock" - ] + "enum": [false, true, "mock"] }, "global": { "description": "Include a polyfill for the 'global' variable", @@ -1259,11 +1215,7 @@ }, "process": { "description": "Include a polyfill for the 'process' variable", - "enum": [ - false, - true, - "mock" - ] + "enum": [false, true, "mock"] } }, "type": "object" @@ -1323,9 +1275,7 @@ "description": "Optimize duplication and caching by splitting chunks by shared modules and cache group", "oneOf": [ { - "enum": [ - false - ] + "enum": [false] }, { "type": "object", @@ -1335,11 +1285,7 @@ "description": "Select chunks for determining shared modules (defaults to \"async\", \"initial\" and \"all\" requires adding these chunks to the HTML)", "oneOf": [ { - "enum": [ - "initial", - "async", - "all" - ] + "enum": ["initial", "async", "all"] }, { "instanceof": "Function" @@ -1428,9 +1374,7 @@ "description": "Configuration for a cache group", "anyOf": [ { - "enum": [ - false - ] + "enum": [false] }, { "instanceof": "Function" @@ -1463,11 +1407,7 @@ "description": "Select chunks for determining cache group content (defaults to \"initial\", \"initial\" and \"all\" requires adding these chunks to the HTML)", "oneOf": [ { - "enum": [ - "initial", - "async", - "all" - ] + "enum": ["initial", "async", "all"] }, { "instanceof": "Function" @@ -1555,10 +1495,7 @@ "type": "boolean" }, { - "enum": [ - "single", - "multiple" - ] + "enum": ["single", "multiple"] }, { "type": "object", @@ -1593,24 +1530,11 @@ }, "moduleIds": { "description": "Define the algorithm to choose module ids (natural: numeric ids in order of usage, named: readable ids for better debugging, hashed: short hashes as ids for better long term caching, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin)", - "enum": [ - "natural", - "named", - "hashed", - "size", - "total-size", - false - ] + "enum": ["natural", "named", "hashed", "size", "total-size", false] }, "chunkIds": { "description": "Define the algorithm to choose chunk ids (named: readable ids for better debugging, size: numeric ids focused on minimal initial download size, total-size: numeric ids focused on minimal total download size, false: no algorithm used, as custom one can be provided via plugin)", - "enum": [ - "natural", - "named", - "size", - "total-size", - false - ] + "enum": ["natural", "named", "size", "total-size", false] }, "namedModules": { "description": "Use readable module identifiers for better debugging (deprecated, used moduleIds: named instead)", @@ -1651,9 +1575,7 @@ "description": "Set process.env.NODE_ENV to a specific value", "anyOf": [ { - "enum": [ - false - ] + "enum": [false] }, { "type": "string" @@ -1671,9 +1593,7 @@ "description": "Configuration for web performance recommendations.", "anyOf": [ { - "enum": [ - false - ] + "enum": [false] }, { "additionalProperties": false, @@ -1684,11 +1604,7 @@ }, "hints": { "description": "Sets the format of the hints: warnings, errors or nothing at all", - "enum": [ - false, - "warning", - "error" - ] + "enum": [false, "warning", "error"] }, "maxEntrypointSize": { "description": "Total size of an entry point (in bytes)", diff --git a/schemas/plugins/BannerPlugin.json b/schemas/plugins/BannerPlugin.json index 87e47903611..6ebebcc5fec 100644 --- a/schemas/plugins/BannerPlugin.json +++ b/schemas/plugins/BannerPlugin.json @@ -34,9 +34,7 @@ { "type": "object", "additionalProperties": false, - "required": [ - "banner" - ], + "required": ["banner"], "properties": { "banner": { "description": "Specifies the banner", diff --git a/schemas/plugins/DllPlugin.json b/schemas/plugins/DllPlugin.json index 940da62f155..c8ea5402f31 100644 --- a/schemas/plugins/DllPlugin.json +++ b/schemas/plugins/DllPlugin.json @@ -1,8 +1,6 @@ { "additionalProperties": false, - "required": [ - "path" - ], + "required": ["path"], "properties": { "context": { "description": "Context of requests in the manifest file (defaults to the webpack context)", diff --git a/schemas/plugins/DllReferencePlugin.json b/schemas/plugins/DllReferencePlugin.json index 75fcff565db..cd0c9ba8671 100644 --- a/schemas/plugins/DllReferencePlugin.json +++ b/schemas/plugins/DllReferencePlugin.json @@ -2,14 +2,10 @@ "additionalProperties": false, "anyOf": [ { - "required": [ - "manifest" - ] + "required": ["manifest"] }, { - "required": [ - "content" - ] + "required": ["content"] } ], "properties": { @@ -60,10 +56,7 @@ }, "type": { "description": "The way how the export of the dll bundle is used", - "enum": [ - "require", - "object" - ] + "enum": ["require", "object"] }, "scope": { "description": "Prefix which is used for accessing the content of the dll", diff --git a/schemas/plugins/HashedModuleIdsPlugin.json b/schemas/plugins/HashedModuleIdsPlugin.json index 66ed722f6ad..30c6c71cc5a 100644 --- a/schemas/plugins/HashedModuleIdsPlugin.json +++ b/schemas/plugins/HashedModuleIdsPlugin.json @@ -9,11 +9,7 @@ }, "hashDigest": { "description": "The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.", - "enum": [ - "hex", - "latin1", - "base64" - ] + "enum": ["hex", "latin1", "base64"] }, "hashDigestLength": { "description": "The prefix length of the hash digest to use, defaults to 4.", diff --git a/schemas/plugins/SourceMapDevToolPlugin.json b/schemas/plugins/SourceMapDevToolPlugin.json index b0d11ae2ae1..e0f7d9b210b 100644 --- a/schemas/plugins/SourceMapDevToolPlugin.json +++ b/schemas/plugins/SourceMapDevToolPlugin.json @@ -62,10 +62,7 @@ "oneOf": [ { "description": "Disable separate SourceMap file and inline SourceMap as DataUrl", - "enum": [ - false, - null - ] + "enum": [false, null] }, { "type": "string", @@ -79,10 +76,7 @@ "oneOf": [ { "description": "Append no SourceMap comment to the bundle, but still generate SourceMaps", - "enum": [ - false, - null - ] + "enum": [false, null] }, { "minLength": 1, diff --git a/schemas/plugins/optimize/MinChunkSizePlugin.json b/schemas/plugins/optimize/MinChunkSizePlugin.json index 2cb57a0b02a..26b78da993f 100644 --- a/schemas/plugins/optimize/MinChunkSizePlugin.json +++ b/schemas/plugins/optimize/MinChunkSizePlugin.json @@ -1,9 +1,7 @@ { "additionalProperties": false, "type": "object", - "required": [ - "minChunkSize" - ], + "required": ["minChunkSize"], "properties": { "minChunkSize": { "description": "Minimum number of characters", diff --git a/test/Schemas.lint.js b/test/Schemas.lint.js index 50fff3badb6..075c39bfa12 100644 --- a/test/Schemas.lint.js +++ b/test/Schemas.lint.js @@ -28,12 +28,6 @@ describe("Schemas", () => { }); if (content) { - it("should be formated correctly", () => { - expect(fileContent.replace(/\r\n?/g, "\n")).toBe( - JSON.stringify(content, 0, 2) + "\n" - ); - }); - const arrayProperties = ["oneOf", "anyOf", "allOf"]; const allowedProperties = [ "definitions", diff --git a/tsconfig.json b/tsconfig.json index d265178d6c2..e94475dc70d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,16 +1,16 @@ { - "compilerOptions": { - "target": "ES2017", - "module": "commonjs", - "lib": ["es2017", "dom"], - "allowJs": true, - "checkJs": true, - "noEmit": true, - "strict": false, - "noImplicitThis": true, - "alwaysStrict": true, - "types": ["node"], - "esModuleInterop": true - }, - "include": ["declarations.d.ts", "bin/*.js", "lib/**/*.js", "tooling/**/*.js"] + "compilerOptions": { + "target": "ES2017", + "module": "commonjs", + "lib": ["es2017", "dom"], + "allowJs": true, + "checkJs": true, + "noEmit": true, + "strict": false, + "noImplicitThis": true, + "alwaysStrict": true, + "types": ["node"], + "esModuleInterop": true + }, + "include": ["declarations.d.ts", "bin/*.js", "lib/**/*.js", "tooling/**/*.js"] } From 7996883cabc2c639dcdf90bf5c3403b5e2ab7eb1 Mon Sep 17 00:00:00 2001 From: aimergenge Date: Tue, 28 Aug 2018 16:09:21 +0800 Subject: [PATCH 231/310] solving outputing unnecessary spaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `…` is causing terminals like git bash on windows to output unnecessary spaces --- lib/ProgressPlugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ProgressPlugin.js b/lib/ProgressPlugin.js index 32cd6d2cb20..a8612932de1 100644 --- a/lib/ProgressPlugin.js +++ b/lib/ProgressPlugin.js @@ -24,7 +24,7 @@ const createDefaultHandler = profile => { for (let detail of details) { if (!detail) continue; if (detail.length > 40) { - detail = `…${detail.substr(detail.length - 39)}`; + detail = `...${detail.substr(detail.length - 39)}`; } msg += ` ${detail}`; } From cd9525ad4c6cea0a1e4f8011023098a591f9e0bc Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 29 Aug 2018 20:05:50 +0200 Subject: [PATCH 232/310] Upgrade some dependencies --- package.json | 2 +- .../__snapshots__/StatsTestCases.test.js.snap | 2 +- yarn.lock | 170 +++++++----------- 3 files changed, 70 insertions(+), 104 deletions(-) diff --git a/package.json b/package.json index 3b46b09a294..84b4fa42011 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "tapable": "^1.0.0", "uglifyjs-webpack-plugin": "^1.2.4", "watchpack": "^1.5.0", - "webpack-sources": "^1.0.1" + "webpack-sources": "^1.2.0" }, "devDependencies": { "@types/node": "^9.6.4", diff --git a/test/__snapshots__/StatsTestCases.test.js.snap b/test/__snapshots__/StatsTestCases.test.js.snap index d2c710ee4df..80982d7c90d 100644 --- a/test/__snapshots__/StatsTestCases.test.js.snap +++ b/test/__snapshots__/StatsTestCases.test.js.snap @@ -1989,7 +1989,7 @@ Built at: Thu Jan 01 1970 00:00:00 GMT 3.js 262 bytes 3 [emitted] main.js.map 1.72 MiB 0 [emitted] main 1.js.map 156 bytes 1 [emitted] - 2.js.map 197 bytes 2 [emitted] + 2.js.map 210 bytes 2 [emitted] 3.js.map 216 bytes 3 [emitted] Entrypoint main [big] = main.js main.js.map [0] ./index.js 52 bytes {0} [built] diff --git a/yarn.lock b/yarn.lock index 2efeb620daf..57aeb3694cd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -37,16 +37,16 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.5.1.tgz#d578446f4abff5c0b49ade9b4e5274f6badaadfc" "@types/node@^9.6.4": - version "9.6.15" - resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.15.tgz#8a5a313ea0a43a95277235841be5d3f5fb3dfeda" + version "9.6.30" + resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.30.tgz#1ecf83eaf7ac2d0dada7a9d61a1e4e7a6183ac06" "@types/source-list-map@*": version "0.1.2" resolved "https://registry.yarnpkg.com/@types/source-list-map/-/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9" "@types/tapable@^1.0.1": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.2.tgz#e13182e1b69871a422d7863e11a4a6f5b814a4bd" + version "1.0.4" + resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.4.tgz#b4ffc7dc97b498c969b360a41eee247f82616370" "@types/webpack-sources@^0.1.4": version "0.1.5" @@ -257,13 +257,13 @@ acorn@^4.0.4, acorn@~4.0.2: version "4.0.13" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787" -acorn@^5.0.0, acorn@^5.0.3, acorn@^5.3.0, acorn@^5.6.0: +acorn@^5.0.0, acorn@^5.3.0: version "5.7.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" -acorn@^5.6.2: - version "5.6.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.6.2.tgz#b1da1d7be2ac1b4a327fb9eab851702c5045b4e7" +acorn@^5.0.3, acorn@^5.6.0, acorn@^5.6.2: + version "5.7.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.2.tgz#91fa871883485d06708800318404e72bfb26dcc5" ajv-keywords@^3.0.0, ajv-keywords@^3.1.0: version "3.2.0" @@ -285,23 +285,14 @@ ajv@^5.0.0, ajv@^5.1.0: fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" -ajv@^6.0.1, ajv@^6.5.0: - version "6.5.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.2.tgz#678495f9b82f7cca6be248dd92f59bff5e1f4360" +ajv@^6.0.1, ajv@^6.1.0, ajv@^6.5.0: + version "6.5.3" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.3.tgz#71a569d189ecf4f4f321224fecb166f071dd90f9" dependencies: fast-deep-equal "^2.0.1" fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.4.1" - uri-js "^4.2.1" - -ajv@^6.1.0: - version "6.5.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.0.tgz#4c8affdf80887d8f132c9c52ab8a2dc4d0b7b24c" - dependencies: - fast-deep-equal "^2.0.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.3.0" - uri-js "^4.2.1" + uri-js "^4.2.2" align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" @@ -339,7 +330,7 @@ ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" -ansi-styles@^3.1.0, ansi-styles@^3.2.0, ansi-styles@^3.2.1: +ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" dependencies: @@ -963,7 +954,7 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.1: +chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" dependencies: @@ -971,14 +962,6 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba" - dependencies: - ansi-styles "^3.1.0" - escape-string-regexp "^1.0.5" - supports-color "^4.0.0" - chalk@^2.3.1: version "2.3.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" @@ -1174,16 +1157,12 @@ color-convert@^1.3.0: color-name "^1.1.1" color-convert@^1.9.0: - version "1.9.2" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.2.tgz#49881b8fba67df12a96bdf3f56c0aab9e7913147" + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" dependencies: - color-name "1.1.1" - -color-name@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689" + color-name "1.1.3" -color-name@^1.0.0, color-name@^1.1.1: +color-name@1.1.3, color-name@^1.0.0, color-name@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" @@ -1620,11 +1599,10 @@ default-require-extensions@^2.0.0: strip-bom "^3.0.0" define-properties@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" dependencies: - foreach "^2.0.5" - object-keys "^1.0.8" + object-keys "^1.0.12" define-property@^0.2.5: version "0.2.5" @@ -1811,7 +1789,7 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.10.0, es-abstract@^1.5.1: +es-abstract@^1.5.1: version "1.12.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" dependencies: @@ -1914,8 +1892,8 @@ eslint-visitor-keys@^1.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" eslint@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.2.0.tgz#3901ae249195d473e633c4acbc370068b1c964dc" + version "5.4.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.4.0.tgz#d068ec03006bb9e06b429dc85f7e46c1b69fac62" dependencies: ajv "^6.5.0" babel-code-frame "^6.26.0" @@ -1948,10 +1926,9 @@ eslint@^5.2.0: path-is-inside "^1.0.2" pluralize "^7.0.0" progress "^2.0.0" - regexpp "^1.1.0" + regexpp "^2.0.0" require-uncached "^1.0.3" semver "^5.5.0" - string.prototype.matchall "^2.0.0" strip-ansi "^4.0.0" strip-json-comments "^2.0.1" table "^4.0.3" @@ -2337,10 +2314,6 @@ for-own@^0.1.4: dependencies: for-in "^1.0.1" -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" @@ -2502,7 +2475,18 @@ glob@^5.0.15: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: +glob@^7.0.3, glob@^7.0.5: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.1.1, glob@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: @@ -2595,18 +2579,10 @@ has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" -has-flag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" -has-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" - has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -2753,11 +2729,11 @@ iconv-lite@0.4.19: version "0.4.19" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" -iconv-lite@^0.4.17, iconv-lite@~0.4.13: - version "0.4.21" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.21.tgz#c47f8733d02171189ebc4a400f3218d348094798" +iconv-lite@^0.4.17: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" dependencies: - safer-buffer "^2.1.0" + safer-buffer ">= 2.1.2 < 3" iconv-lite@^0.4.4: version "0.4.23" @@ -2765,6 +2741,12 @@ iconv-lite@^0.4.4: dependencies: safer-buffer ">= 2.1.2 < 3" +iconv-lite@~0.4.13: + version "0.4.21" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.21.tgz#c47f8733d02171189ebc4a400f3218d348094798" + dependencies: + safer-buffer "^2.1.0" + icss-replace-symbols@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" @@ -2790,8 +2772,8 @@ ignore-walk@^3.0.1: minimatch "^3.0.4" ignore@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.2.tgz#0a8dd228947ec78c2d7f736b1642a9f7317c1905" + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" image-size@~0.5.0: version "0.5.5" @@ -4346,8 +4328,8 @@ neo-async@^2.5.0: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.1.tgz#acb909e327b1e87ec9ef15f41b8a269512ad41ee" nice-try@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4" + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" node-fetch@^1.0.1: version "1.7.3" @@ -4536,7 +4518,7 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-keys@^1.0.8: +object-keys@^1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" @@ -5512,16 +5494,6 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" -regexp.prototype.flags@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz#6b30724e306a27833eeb171b66ac8890ba37e41c" - dependencies: - define-properties "^1.1.2" - -regexpp@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-1.1.0.tgz#0e3516dd0b7904f413d2d4193dce4618c3a689ab" - regexpp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.0.tgz#b2a7534a85ca1b033bcf5ce9ff8e56d4e0755365" @@ -5840,10 +5812,14 @@ semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5.0: +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" +semver@^5.5.0: + version "5.5.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" + send@0.13.1: version "0.13.1" resolved "https://registry.yarnpkg.com/send/-/send-0.13.1.tgz#a30d5f4c82c8a9bae9ad00a1d9b1bdbe6f199ed7" @@ -6207,16 +6183,6 @@ string-width@^1.0.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string.prototype.matchall@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-2.0.0.tgz#2af8fe3d2d6dc53ca2a59bd376b089c3c152b3c8" - dependencies: - define-properties "^1.1.2" - es-abstract "^1.10.0" - function-bind "^1.1.1" - has-symbols "^1.0.0" - regexp.prototype.flags "^1.2.0" - string_decoder@^1.0.0, string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" @@ -6282,13 +6248,13 @@ supports-color@^3.1.0, supports-color@^3.1.2, supports-color@^3.2.3: dependencies: has-flag "^1.0.0" -supports-color@^4.0.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.5.0.tgz#be7a0de484dec5c5cddf8b3d59125044912f635b" +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" dependencies: - has-flag "^2.0.0" + has-flag "^3.0.0" -supports-color@^5.3.0, supports-color@^5.4.0: +supports-color@^5.4.0: version "5.4.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" dependencies: @@ -6602,9 +6568,9 @@ upath@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/upath/-/upath-1.0.5.tgz#02cab9ecebe95bbec6d5fc2566325725ab6d1a73" -uri-js@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.1.tgz#4595a80a51f356164e22970df64c7abd6ade9850" +uri-js@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" dependencies: punycode "^2.1.0" @@ -6750,9 +6716,9 @@ webpack-dev-middleware@^1.9.0: range-parser "^1.0.3" time-stamp "^2.0.0" -webpack-sources@^1.0.1, webpack-sources@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.1.0.tgz#a101ebae59d6507354d71d8013950a3a8b7a5a54" +webpack-sources@^1.1.0, webpack-sources@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.2.0.tgz#18181e0d013fce096faf6f8e6d41eeffffdceac2" dependencies: source-list-map "^2.0.0" source-map "~0.6.1" From dfe6379052598a00f13bfa4f34ac73856ddf3dd0 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 3 Sep 2018 19:25:27 +0200 Subject: [PATCH 233/310] 4.17.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 84b4fa42011..d60366f929c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.17.1", + "version": "4.17.2", "author": "Tobias Koppers @sokra", "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", From 898462db462b501f6779c4de014b6b7890daaf80 Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Wed, 29 Aug 2018 17:37:41 +0300 Subject: [PATCH 234/310] refactor: remove `webpack-command` from CLIs --- bin/webpack.js | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/bin/webpack.js b/bin/webpack.js index 977fe5c93ea..f0573a68983 100755 --- a/bin/webpack.js +++ b/bin/webpack.js @@ -103,9 +103,7 @@ if (installedClis.length === 0) { )}".` ); - let question = `Which one do you like to install (${CLIs.map( - item => item.name - ).join("/")}):\n`; + let question = `Do you want to install 'webpack-cli' (yes/no): `; const questionInterface = readLine.createInterface({ input: process.stdin, @@ -114,35 +112,22 @@ if (installedClis.length === 0) { questionInterface.question(question, answer => { questionInterface.close(); - const normalizedAnswer = answer.toLowerCase(); - const selectedPackage = CLIs.find(item => { - return item.name === normalizedAnswer || item.alias === normalizedAnswer; - }); + const normalizedAnswer = answer.toLowerCase().startsWith("y"); if (!normalizedAnswer) { console.error( - "One CLI needs to be installed alongside webpack to use the CLI." - ); - process.exitCode = 1; - - return; - } else if (!selectedPackage) { - console.error( - "No matching choice.\n" + - "One CLI needs to be installed alongside webpack to use the CLI.\n" + - "Try to installing your CLI of choice manually." + "You need to install 'webpack-cli' for using webpack via CLI.\n" + + "Also you can installing CLI manually." ); process.exitCode = 1; return; } - const packageName = selectedPackage.package; + const packageName = "webpack-cli"; console.log( - `Installing '${ - selectedPackage.name - }' (running '${packageManager} ${installOptions.join( + `Installing '${packageName}' (running '${packageManager} ${installOptions.join( " " )} ${packageName}')...` ); From 691cc94e0f4851ef9f9d3156d45f023f2dfe3217 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 5 Sep 2018 14:01:44 +0200 Subject: [PATCH 235/310] Spelling --- bin/webpack.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/webpack.js b/bin/webpack.js index f0573a68983..0bf012cbe34 100755 --- a/bin/webpack.js +++ b/bin/webpack.js @@ -116,8 +116,8 @@ if (installedClis.length === 0) { if (!normalizedAnswer) { console.error( - "You need to install 'webpack-cli' for using webpack via CLI.\n" + - "Also you can installing CLI manually." + "You need to install 'webpack-cli' to use webpack via CLI.\n" + + "You can also install the CLI manually." ); process.exitCode = 1; From a2cc0313abfb6f960a1a955e08b1777d50037b4b Mon Sep 17 00:00:00 2001 From: Philip Walton Date: Wed, 5 Sep 2018 18:41:39 -0700 Subject: [PATCH 236/310] Add tests for default source map extensions --- test/ConfigTestCases.test.js | 5 +++-- .../default-filename-extensions-css/index.js | 6 ++++++ .../default-filename-extensions-css/test.js | 3 +++ .../webpack.config.js | 12 ++++++++++++ .../default-filename-extensions-js/index.js | 6 ++++++ .../default-filename-extensions-js/test.js | 3 +++ .../default-filename-extensions-js/webpack.config.js | 12 ++++++++++++ .../default-filename-extensions-mjs/index.js | 6 ++++++ .../default-filename-extensions-mjs/test.js | 3 +++ .../webpack.config.js | 12 ++++++++++++ 10 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 test/configCases/source-map/default-filename-extensions-css/index.js create mode 100644 test/configCases/source-map/default-filename-extensions-css/test.js create mode 100644 test/configCases/source-map/default-filename-extensions-css/webpack.config.js create mode 100644 test/configCases/source-map/default-filename-extensions-js/index.js create mode 100644 test/configCases/source-map/default-filename-extensions-js/test.js create mode 100644 test/configCases/source-map/default-filename-extensions-js/webpack.config.js create mode 100644 test/configCases/source-map/default-filename-extensions-mjs/index.js create mode 100644 test/configCases/source-map/default-filename-extensions-mjs/test.js create mode 100644 test/configCases/source-map/default-filename-extensions-mjs/webpack.config.js diff --git a/test/ConfigTestCases.test.js b/test/ConfigTestCases.test.js index d578be3bdfa..48a76f894d4 100644 --- a/test/ConfigTestCases.test.js +++ b/test/ConfigTestCases.test.js @@ -85,12 +85,13 @@ describe("ConfigTestCases", () => { }); let testConfig = { findBundle: function(i, options) { + const ext = path.extname(options.output.filename); if ( fs.existsSync( - path.join(options.output.path, "bundle" + i + ".js") + path.join(options.output.path, "bundle" + i + ext) ) ) { - return "./bundle" + i + ".js"; + return "./bundle" + i + ext; } }, timeout: 30000 diff --git a/test/configCases/source-map/default-filename-extensions-css/index.js b/test/configCases/source-map/default-filename-extensions-css/index.js new file mode 100644 index 00000000000..55d51278fd2 --- /dev/null +++ b/test/configCases/source-map/default-filename-extensions-css/index.js @@ -0,0 +1,6 @@ +it("creates source maps for .css output files by default", function() { + var fs = require("fs"); + var source = fs.readFileSync(__filename, "utf-8"); + var match = /sourceMappingURL\s*=\s*(.*)\*\//.exec(source); + expect(match[1]).toBe("bundle0.css.map"); +}); \ No newline at end of file diff --git a/test/configCases/source-map/default-filename-extensions-css/test.js b/test/configCases/source-map/default-filename-extensions-css/test.js new file mode 100644 index 00000000000..d336df4c821 --- /dev/null +++ b/test/configCases/source-map/default-filename-extensions-css/test.js @@ -0,0 +1,3 @@ +var foo = {}; + +module.exports = foo; \ No newline at end of file diff --git a/test/configCases/source-map/default-filename-extensions-css/webpack.config.js b/test/configCases/source-map/default-filename-extensions-css/webpack.config.js new file mode 100644 index 00000000000..e5d995a6455 --- /dev/null +++ b/test/configCases/source-map/default-filename-extensions-css/webpack.config.js @@ -0,0 +1,12 @@ +module.exports = { + mode: "development", + output: { + filename: "bundle0.css" + }, + node: { + __dirname: false, + __filename: false + }, + devtool: "source-map" +}; + diff --git a/test/configCases/source-map/default-filename-extensions-js/index.js b/test/configCases/source-map/default-filename-extensions-js/index.js new file mode 100644 index 00000000000..dd399bd0fbc --- /dev/null +++ b/test/configCases/source-map/default-filename-extensions-js/index.js @@ -0,0 +1,6 @@ +it("creates source maps for .js output files by default", function() { + var fs = require("fs"); + var source = fs.readFileSync(__filename, "utf-8"); + var match = /sourceMappingURL\s*=\s*(.*)/.exec(source); + expect(match[1]).toBe("bundle0.js.map"); +}); \ No newline at end of file diff --git a/test/configCases/source-map/default-filename-extensions-js/test.js b/test/configCases/source-map/default-filename-extensions-js/test.js new file mode 100644 index 00000000000..d336df4c821 --- /dev/null +++ b/test/configCases/source-map/default-filename-extensions-js/test.js @@ -0,0 +1,3 @@ +var foo = {}; + +module.exports = foo; \ No newline at end of file diff --git a/test/configCases/source-map/default-filename-extensions-js/webpack.config.js b/test/configCases/source-map/default-filename-extensions-js/webpack.config.js new file mode 100644 index 00000000000..ed47dd831e6 --- /dev/null +++ b/test/configCases/source-map/default-filename-extensions-js/webpack.config.js @@ -0,0 +1,12 @@ +module.exports = { + mode: "development", + output: { + filename: "bundle0.js" + }, + node: { + __dirname: false, + __filename: false + }, + devtool: "source-map" +}; + diff --git a/test/configCases/source-map/default-filename-extensions-mjs/index.js b/test/configCases/source-map/default-filename-extensions-mjs/index.js new file mode 100644 index 00000000000..b7d62986081 --- /dev/null +++ b/test/configCases/source-map/default-filename-extensions-mjs/index.js @@ -0,0 +1,6 @@ +it("creates source maps for .mjs output files by default", function() { + var fs = require("fs"); + var source = fs.readFileSync(__filename, "utf-8"); + var match = /sourceMappingURL\s*=\s*(.*)/.exec(source); + expect(match[1]).toBe("bundle0.mjs.map"); +}); diff --git a/test/configCases/source-map/default-filename-extensions-mjs/test.js b/test/configCases/source-map/default-filename-extensions-mjs/test.js new file mode 100644 index 00000000000..d336df4c821 --- /dev/null +++ b/test/configCases/source-map/default-filename-extensions-mjs/test.js @@ -0,0 +1,3 @@ +var foo = {}; + +module.exports = foo; \ No newline at end of file diff --git a/test/configCases/source-map/default-filename-extensions-mjs/webpack.config.js b/test/configCases/source-map/default-filename-extensions-mjs/webpack.config.js new file mode 100644 index 00000000000..24317b32cb0 --- /dev/null +++ b/test/configCases/source-map/default-filename-extensions-mjs/webpack.config.js @@ -0,0 +1,12 @@ +module.exports = { + mode: "development", + output: { + filename: "bundle0.mjs" + }, + node: { + __dirname: false, + __filename: false + }, + devtool: "source-map" +}; + From 17fafd34321ea60025ab06cf647d4f5fb6842e15 Mon Sep 17 00:00:00 2001 From: Philip Walton Date: Wed, 5 Sep 2018 20:00:48 -0700 Subject: [PATCH 237/310] Fix lint errors --- .../source-map/default-filename-extensions-css/webpack.config.js | 1 - .../source-map/default-filename-extensions-js/webpack.config.js | 1 - .../source-map/default-filename-extensions-mjs/webpack.config.js | 1 - 3 files changed, 3 deletions(-) diff --git a/test/configCases/source-map/default-filename-extensions-css/webpack.config.js b/test/configCases/source-map/default-filename-extensions-css/webpack.config.js index e5d995a6455..1b969d38d1f 100644 --- a/test/configCases/source-map/default-filename-extensions-css/webpack.config.js +++ b/test/configCases/source-map/default-filename-extensions-css/webpack.config.js @@ -9,4 +9,3 @@ module.exports = { }, devtool: "source-map" }; - diff --git a/test/configCases/source-map/default-filename-extensions-js/webpack.config.js b/test/configCases/source-map/default-filename-extensions-js/webpack.config.js index ed47dd831e6..597a81501f0 100644 --- a/test/configCases/source-map/default-filename-extensions-js/webpack.config.js +++ b/test/configCases/source-map/default-filename-extensions-js/webpack.config.js @@ -9,4 +9,3 @@ module.exports = { }, devtool: "source-map" }; - diff --git a/test/configCases/source-map/default-filename-extensions-mjs/webpack.config.js b/test/configCases/source-map/default-filename-extensions-mjs/webpack.config.js index 24317b32cb0..9f5b271c0bd 100644 --- a/test/configCases/source-map/default-filename-extensions-mjs/webpack.config.js +++ b/test/configCases/source-map/default-filename-extensions-mjs/webpack.config.js @@ -9,4 +9,3 @@ module.exports = { }, devtool: "source-map" }; - From 943aa6b455a742395231216e7e54f449c7072dab Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 6 Sep 2018 13:33:12 +0200 Subject: [PATCH 238/310] Fix exit code when multiple CLIs are installed fixes #7998 --- bin/webpack.js | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/webpack.js b/bin/webpack.js index 977fe5c93ea..66250395742 100755 --- a/bin/webpack.js +++ b/bin/webpack.js @@ -174,4 +174,5 @@ if (installedClis.length === 0) { " and " )} together. To work with the "webpack" command you need only one CLI package, please remove one of them or use them directly via their binary.` ); + process.exitCode = 1; } From b717aadf491a784ae1c72d797a626a6778bd8b53 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 10 Sep 2018 14:53:54 +0200 Subject: [PATCH 239/310] Show only webpack-cli in the list --- bin/webpack.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/webpack.js b/bin/webpack.js index 0bf012cbe34..3fb260c01e0 100755 --- a/bin/webpack.js +++ b/bin/webpack.js @@ -50,6 +50,7 @@ const isInstalled = packageName => { * @property {string} binName name of the executable file * @property {string} alias shortcut for choice * @property {boolean} installed currently installed? + * @property {boolean} recommended is recommended * @property {string} url homepage * @property {string} description description */ @@ -62,6 +63,7 @@ const CLIs = [ binName: "webpack-cli", alias: "cli", installed: isInstalled("webpack-cli"), + recommended: true, url: "https://github.com/webpack/webpack-cli", description: "The original webpack full-featured CLI." }, @@ -71,6 +73,7 @@ const CLIs = [ binName: "webpack-command", alias: "command", installed: isInstalled("webpack-command"), + recommended: false, url: "https://github.com/webpack-contrib/webpack-command", description: "A lightweight, opinionated webpack CLI." } @@ -87,7 +90,9 @@ if (installedClis.length === 0) { "One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:"; for (const item of CLIs) { - notify += `\n - ${item.name} (${item.url})\n ${item.description}`; + if (item.recommended) { + notify += `\n - ${item.name} (${item.url})\n ${item.description}`; + } } console.error(notify); From 52e163000bcea4cd8129cf604f68982bbdfb42ad Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 10 Sep 2018 15:21:03 +0200 Subject: [PATCH 240/310] bump webassemblyjs --- package.json | 8 +- yarn.lock | 441 ++++++++++++++------------------------------------- 2 files changed, 119 insertions(+), 330 deletions(-) diff --git a/package.json b/package.json index 896c9e9a732..b10731da412 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,10 @@ "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.7.4", - "@webassemblyjs/helper-module-context": "1.7.4", - "@webassemblyjs/wasm-edit": "1.7.4", - "@webassemblyjs/wasm-parser": "1.7.4", + "@webassemblyjs/ast": "1.7.5", + "@webassemblyjs/helper-module-context": "1.7.5", + "@webassemblyjs/wasm-edit": "1.7.5", + "@webassemblyjs/wasm-parser": "1.7.5", "acorn": "^5.6.2", "acorn-dynamic-import": "^3.0.0", "ajv": "^6.1.0", diff --git a/yarn.lock b/yarn.lock index f3b1064ea2a..eba0acfa3e6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,115 +2,12 @@ # yarn lockfile v1 -"@babel/cli@^7.0.0-beta.54": - version "7.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@babel/cli/-/cli-7.0.0-beta.54.tgz#c3b9766ad3218988f120e4058509adff0b72b183" - dependencies: - commander "^2.8.1" - convert-source-map "^1.1.0" - fs-readdir-recursive "^1.0.0" - glob "^7.0.0" - lodash "^4.17.5" - mkdirp "^0.5.1" - output-file-sync "^2.0.0" - slash "^1.0.0" - source-map "^0.5.0" - optionalDependencies: - chokidar "^2.0.3" - -"@babel/code-frame@7.0.0-beta.54", "@babel/code-frame@^7.0.0-beta.35": +"@babel/code-frame@^7.0.0-beta.35": version "7.0.0-beta.54" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.54.tgz#0024f96fdf7028a21d68e273afd4e953214a1ead" dependencies: "@babel/highlight" "7.0.0-beta.54" -"@babel/core@^7.0.0-beta.54": - version "7.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.0.0-beta.54.tgz#253c54d0095403a5cfa764e7d9b458194692d02b" - dependencies: - "@babel/code-frame" "7.0.0-beta.54" - "@babel/generator" "7.0.0-beta.54" - "@babel/helpers" "7.0.0-beta.54" - "@babel/parser" "7.0.0-beta.54" - "@babel/template" "7.0.0-beta.54" - "@babel/traverse" "7.0.0-beta.54" - "@babel/types" "7.0.0-beta.54" - convert-source-map "^1.1.0" - debug "^3.1.0" - json5 "^0.5.0" - lodash "^4.17.5" - resolve "^1.3.2" - semver "^5.4.1" - source-map "^0.5.0" - -"@babel/generator@7.0.0-beta.54": - version "7.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0-beta.54.tgz#c043c7eebeebfd7e665d95c281a4aafc83d4e1c9" - dependencies: - "@babel/types" "7.0.0-beta.54" - jsesc "^2.5.1" - lodash "^4.17.5" - source-map "^0.5.0" - trim-right "^1.0.1" - -"@babel/helper-function-name@7.0.0-beta.54": - version "7.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.54.tgz#307875507a1eda2482a09a9a4df6a25632ffb34b" - dependencies: - "@babel/helper-get-function-arity" "7.0.0-beta.54" - "@babel/template" "7.0.0-beta.54" - "@babel/types" "7.0.0-beta.54" - -"@babel/helper-get-function-arity@7.0.0-beta.54": - version "7.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.54.tgz#757bd189b077074a004028cfde5f083c306cc6c4" - dependencies: - "@babel/types" "7.0.0-beta.54" - -"@babel/helper-module-imports@7.0.0-beta.54": - version "7.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0-beta.54.tgz#c2d8e14ff034225bf431356db77ef467b8d35aac" - dependencies: - "@babel/types" "7.0.0-beta.54" - lodash "^4.17.5" - -"@babel/helper-module-transforms@7.0.0-beta.54": - version "7.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.0.0-beta.54.tgz#8cc57eb0db5f0945d866524d555abd084e30cc35" - dependencies: - "@babel/helper-module-imports" "7.0.0-beta.54" - "@babel/helper-simple-access" "7.0.0-beta.54" - "@babel/helper-split-export-declaration" "7.0.0-beta.54" - "@babel/template" "7.0.0-beta.54" - "@babel/types" "7.0.0-beta.54" - lodash "^4.17.5" - -"@babel/helper-plugin-utils@7.0.0-beta.54": - version "7.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0-beta.54.tgz#61d2a9a0f9a3e31838a458debb9eebd7bdd249b4" - -"@babel/helper-simple-access@7.0.0-beta.54": - version "7.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.0.0-beta.54.tgz#5f760a19589a9b6f07e80a65ef4bcbd4fba8c253" - dependencies: - "@babel/template" "7.0.0-beta.54" - "@babel/types" "7.0.0-beta.54" - lodash "^4.17.5" - -"@babel/helper-split-export-declaration@7.0.0-beta.54": - version "7.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.54.tgz#89cd8833c95481a0827ac6a1bfccddb92b75a109" - dependencies: - "@babel/types" "7.0.0-beta.54" - -"@babel/helpers@7.0.0-beta.54": - version "7.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.0.0-beta.54.tgz#b86a99a80efd81668caef307610b961197446a74" - dependencies: - "@babel/template" "7.0.0-beta.54" - "@babel/traverse" "7.0.0-beta.54" - "@babel/types" "7.0.0-beta.54" - "@babel/highlight@7.0.0-beta.54": version "7.0.0-beta.54" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.54.tgz#155d507358329b8e7068970017c3fd74a9b08584" @@ -119,49 +16,6 @@ esutils "^2.0.2" js-tokens "^3.0.0" -"@babel/parser@7.0.0-beta.54": - version "7.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.0.0-beta.54.tgz#c01aa63b57c9c8dce8744796c81d9df121f20db4" - -"@babel/plugin-transform-modules-commonjs@^7.0.0-beta.54": - version "7.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.0.0-beta.54.tgz#07d912a7a24dad2d9bf5d44ce322ddc457a8db37" - dependencies: - "@babel/helper-module-transforms" "7.0.0-beta.54" - "@babel/helper-plugin-utils" "7.0.0-beta.54" - "@babel/helper-simple-access" "7.0.0-beta.54" - -"@babel/template@7.0.0-beta.54": - version "7.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.54.tgz#d5b0d2d2d55c0e78b048c61a058f36cfd7d91af3" - dependencies: - "@babel/code-frame" "7.0.0-beta.54" - "@babel/parser" "7.0.0-beta.54" - "@babel/types" "7.0.0-beta.54" - lodash "^4.17.5" - -"@babel/traverse@7.0.0-beta.54": - version "7.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.54.tgz#2c17f98dcdbf19aa918fde128f0e1a0bc089e05a" - dependencies: - "@babel/code-frame" "7.0.0-beta.54" - "@babel/generator" "7.0.0-beta.54" - "@babel/helper-function-name" "7.0.0-beta.54" - "@babel/helper-split-export-declaration" "7.0.0-beta.54" - "@babel/parser" "7.0.0-beta.54" - "@babel/types" "7.0.0-beta.54" - debug "^3.1.0" - globals "^11.1.0" - lodash "^4.17.5" - -"@babel/types@7.0.0-beta.54": - version "7.0.0-beta.54" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.54.tgz#025ad68492fed542c13f14c579a44c848e531063" - dependencies: - esutils "^2.0.2" - lodash "^4.17.5" - to-fast-properties "^2.0.0" - "@samverschueren/stream-to-observable@^0.3.0": version "0.3.0" resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz#ecdf48d532c58ea477acfcab80348424f8d0662f" @@ -202,149 +56,135 @@ "@types/source-list-map" "*" source-map "^0.6.1" -"@webassemblyjs/ast@1.7.4": - version "1.7.4" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.7.4.tgz#ce4cc5bcd7accd73f361cbd5eb1c32618b3b4f85" +"@webassemblyjs/ast@1.7.5": + version "1.7.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.7.5.tgz#c703ae02a230ee1e47fae883949b1252bef331bb" dependencies: - "@webassemblyjs/helper-module-context" "1.7.4" - "@webassemblyjs/helper-wasm-bytecode" "1.7.4" - "@webassemblyjs/wast-parser" "1.7.4" + "@webassemblyjs/helper-module-context" "1.7.5" + "@webassemblyjs/helper-wasm-bytecode" "1.7.5" + "@webassemblyjs/wast-parser" "1.7.5" mamacro "^0.0.3" -"@webassemblyjs/floating-point-hex-parser@1.7.4": - version "1.7.4" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.7.4.tgz#94b858426e1ec362f26d89eb7f060fb576744496" +"@webassemblyjs/floating-point-hex-parser@1.7.5": + version "1.7.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.7.5.tgz#9908b85262e189ec6347512e80ee6c881ba9128c" -"@webassemblyjs/helper-api-error@1.7.4": - version "1.7.4" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.7.4.tgz#1e865551aae8167ad5597736f6eadce3bb4fe169" +"@webassemblyjs/helper-api-error@1.7.5": + version "1.7.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.7.5.tgz#6e01bccf462ebf9b96a3def27263666831d4e461" -"@webassemblyjs/helper-buffer@1.7.4": - version "1.7.4" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.7.4.tgz#252f204131770e1e2fff71103b8911ec545c0403" - dependencies: - "@xtuc/buffer" "^5.2.2" +"@webassemblyjs/helper-buffer@1.7.5": + version "1.7.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.7.5.tgz#262a4e750b032cd593e3f6c1a2cd486d675057c1" -"@webassemblyjs/helper-code-frame@1.7.4": - version "1.7.4" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.7.4.tgz#a0f1ed8e195bff6599b8155beda731767a59e30c" +"@webassemblyjs/helper-code-frame@1.7.5": + version "1.7.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.7.5.tgz#7c03bd204065d995675ad50427b9968db01459d4" dependencies: - "@webassemblyjs/wast-printer" "1.7.4" + "@webassemblyjs/wast-printer" "1.7.5" -"@webassemblyjs/helper-fsm@1.7.4": - version "1.7.4" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.7.4.tgz#cd6ee366897954f9d5adbc86b0a015fa6731e654" +"@webassemblyjs/helper-fsm@1.7.5": + version "1.7.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.7.5.tgz#1544319fb6121c850bcd612af0593bc12f028dd8" -"@webassemblyjs/helper-module-context@1.7.4": - version "1.7.4" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.7.4.tgz#1def26eaf2a84581b4bff34eb11ae73a2c8196ed" +"@webassemblyjs/helper-module-context@1.7.5": + version "1.7.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.7.5.tgz#3bfa23f9d11dc2440105b6150280d772fb109ae8" dependencies: mamacro "^0.0.3" -"@webassemblyjs/helper-wasm-bytecode@1.7.4": - version "1.7.4" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.7.4.tgz#74a438e7663331987d88594268bdbbc910f8627c" +"@webassemblyjs/helper-wasm-bytecode@1.7.5": + version "1.7.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.7.5.tgz#1267e640e2d66c6ff543b010c3b019f8a0401b3a" -"@webassemblyjs/helper-wasm-section@1.7.4": - version "1.7.4" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.7.4.tgz#7e7bf997234fe3dcd2a10639ae226376b94aa39a" +"@webassemblyjs/helper-wasm-section@1.7.5": + version "1.7.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.7.5.tgz#de198dadad44c58d8bdc22439915f0e1e302bf1e" dependencies: - "@webassemblyjs/ast" "1.7.4" - "@webassemblyjs/helper-buffer" "1.7.4" - "@webassemblyjs/helper-wasm-bytecode" "1.7.4" - "@webassemblyjs/wasm-gen" "1.7.4" + "@webassemblyjs/ast" "1.7.5" + "@webassemblyjs/helper-buffer" "1.7.5" + "@webassemblyjs/helper-wasm-bytecode" "1.7.5" + "@webassemblyjs/wasm-gen" "1.7.5" -"@webassemblyjs/ieee754@1.7.4": - version "1.7.4" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.7.4.tgz#b58c92c364a954a027d7415adc1bf10dd74d7ac5" +"@webassemblyjs/ieee754@1.7.5": + version "1.7.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.7.5.tgz#a4f5bb301422500e4cc8109c47e62214ab78356c" dependencies: - "@xtuc/buffer" "^5.2.2" "@xtuc/ieee754" "^1.2.0" -"@webassemblyjs/leb128@1.7.4": - version "1.7.4" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.7.4.tgz#15233f256bb8b2bc1e796b0f3ea016db4b14f528" +"@webassemblyjs/leb128@1.7.5": + version "1.7.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.7.5.tgz#5576f288299ecfde320dafd732e9b05338bf3103" dependencies: - "@xtuc/buffer" "^5.2.2" "@xtuc/long" "4.2.1" -"@webassemblyjs/utf8@1.7.4": - version "1.7.4" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.7.4.tgz#666d62a359770c25647e3ecff0990e5b13fe43ed" - -"@webassemblyjs/wasm-edit@1.7.4": - version "1.7.4" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.7.4.tgz#09a36001dbd5471c1adfb63000f477d05536f1e7" - dependencies: - "@webassemblyjs/ast" "1.7.4" - "@webassemblyjs/helper-buffer" "1.7.4" - "@webassemblyjs/helper-wasm-bytecode" "1.7.4" - "@webassemblyjs/helper-wasm-section" "1.7.4" - "@webassemblyjs/wasm-gen" "1.7.4" - "@webassemblyjs/wasm-opt" "1.7.4" - "@webassemblyjs/wasm-parser" "1.7.4" - "@webassemblyjs/wast-printer" "1.7.4" - -"@webassemblyjs/wasm-gen@1.7.4": - version "1.7.4" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.7.4.tgz#15cddae961bbde68661b740308cd188e2b93318a" - dependencies: - "@webassemblyjs/ast" "1.7.4" - "@webassemblyjs/helper-wasm-bytecode" "1.7.4" - "@webassemblyjs/ieee754" "1.7.4" - "@webassemblyjs/leb128" "1.7.4" - "@webassemblyjs/utf8" "1.7.4" - -"@webassemblyjs/wasm-opt@1.7.4": - version "1.7.4" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.7.4.tgz#c79457aff41b0f6d4db5b015506f7c050e23ab26" - dependencies: - "@webassemblyjs/ast" "1.7.4" - "@webassemblyjs/helper-buffer" "1.7.4" - "@webassemblyjs/wasm-gen" "1.7.4" - "@webassemblyjs/wasm-parser" "1.7.4" - -"@webassemblyjs/wasm-parser@1.7.4": - version "1.7.4" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.7.4.tgz#8a8f8ebd9594a9fbd3d69437bfd1a28d35c10a06" - dependencies: - "@webassemblyjs/ast" "1.7.4" - "@webassemblyjs/helper-api-error" "1.7.4" - "@webassemblyjs/helper-wasm-bytecode" "1.7.4" - "@webassemblyjs/ieee754" "1.7.4" - "@webassemblyjs/leb128" "1.7.4" - "@webassemblyjs/utf8" "1.7.4" - "@xtuc/buffer" "^5.2.2" - -"@webassemblyjs/wast-parser@1.7.4": - version "1.7.4" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.7.4.tgz#4cda746d8e5bc22516f769910bb134d48c9392bc" - dependencies: - "@webassemblyjs/ast" "1.7.4" - "@webassemblyjs/floating-point-hex-parser" "1.7.4" - "@webassemblyjs/helper-api-error" "1.7.4" - "@webassemblyjs/helper-code-frame" "1.7.4" - "@webassemblyjs/helper-fsm" "1.7.4" +"@webassemblyjs/utf8@1.7.5": + version "1.7.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.7.5.tgz#c9d90e6d6b345ac928a86dd2976ea2f3a0d133e1" + +"@webassemblyjs/wasm-edit@1.7.5": + version "1.7.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.7.5.tgz#b2e7d47d13966d0bf3f93a568b47cdab0aa20b02" + dependencies: + "@webassemblyjs/ast" "1.7.5" + "@webassemblyjs/helper-buffer" "1.7.5" + "@webassemblyjs/helper-wasm-bytecode" "1.7.5" + "@webassemblyjs/helper-wasm-section" "1.7.5" + "@webassemblyjs/wasm-gen" "1.7.5" + "@webassemblyjs/wasm-opt" "1.7.5" + "@webassemblyjs/wasm-parser" "1.7.5" + "@webassemblyjs/wast-printer" "1.7.5" + +"@webassemblyjs/wasm-gen@1.7.5": + version "1.7.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.7.5.tgz#de4c8772346851dd43654e5a5447a61fd63044cb" + dependencies: + "@webassemblyjs/ast" "1.7.5" + "@webassemblyjs/helper-wasm-bytecode" "1.7.5" + "@webassemblyjs/ieee754" "1.7.5" + "@webassemblyjs/leb128" "1.7.5" + "@webassemblyjs/utf8" "1.7.5" + +"@webassemblyjs/wasm-opt@1.7.5": + version "1.7.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.7.5.tgz#b4365c04945a0032cb4a0d8d1e42ca1b5c94232f" + dependencies: + "@webassemblyjs/ast" "1.7.5" + "@webassemblyjs/helper-buffer" "1.7.5" + "@webassemblyjs/wasm-gen" "1.7.5" + "@webassemblyjs/wasm-parser" "1.7.5" + +"@webassemblyjs/wasm-parser@1.7.5": + version "1.7.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.7.5.tgz#b3fa79b66c8d92e0f56f46587261c9f399878e4c" + dependencies: + "@webassemblyjs/ast" "1.7.5" + "@webassemblyjs/helper-api-error" "1.7.5" + "@webassemblyjs/helper-wasm-bytecode" "1.7.5" + "@webassemblyjs/ieee754" "1.7.5" + "@webassemblyjs/leb128" "1.7.5" + "@webassemblyjs/utf8" "1.7.5" + +"@webassemblyjs/wast-parser@1.7.5": + version "1.7.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.7.5.tgz#62b1b98686dd697d7656c8877f65626e6b40143c" + dependencies: + "@webassemblyjs/ast" "1.7.5" + "@webassemblyjs/floating-point-hex-parser" "1.7.5" + "@webassemblyjs/helper-api-error" "1.7.5" + "@webassemblyjs/helper-code-frame" "1.7.5" + "@webassemblyjs/helper-fsm" "1.7.5" "@xtuc/long" "4.2.1" mamacro "^0.0.3" -"@webassemblyjs/wast-printer@1.7.4": - version "1.7.4" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.7.4.tgz#84e8bdcf21c37b4a8f5476878ade3967d6adac99" +"@webassemblyjs/wast-printer@1.7.5": + version "1.7.5" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.7.5.tgz#3946b531ac98475b7f5efc6564941ad8cf562d72" dependencies: - "@webassemblyjs/ast" "1.7.4" - "@webassemblyjs/wast-parser" "1.7.4" + "@webassemblyjs/ast" "1.7.5" + "@webassemblyjs/wast-parser" "1.7.5" "@xtuc/long" "4.2.1" -"@xtuc/buffer@^5.2.2": - version "5.2.2" - resolved "https://registry.yarnpkg.com/@xtuc/buffer/-/buffer-5.2.2.tgz#743b365ddecd81bb0f9d3d375ce6d475c4d1f909" - dependencies: - "@babel/cli" "^7.0.0-beta.54" - "@babel/core" "^7.0.0-beta.54" - "@babel/plugin-transform-modules-commonjs" "^7.0.0-beta.54" - "@xtuc/ieee754" "^1.2.0" - "@xtuc/ieee754@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" @@ -1163,25 +1003,6 @@ chokidar@^2.0.2: optionalDependencies: fsevents "^1.1.2" -chokidar@^2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26" - dependencies: - anymatch "^2.0.0" - async-each "^1.0.0" - braces "^2.3.0" - glob-parent "^3.1.0" - inherits "^2.0.1" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - lodash.debounce "^4.0.8" - normalize-path "^2.1.1" - path-is-absolute "^1.0.0" - readdirp "^2.0.0" - upath "^1.0.5" - optionalDependencies: - fsevents "^1.2.2" - chownr@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" @@ -1388,10 +1209,6 @@ commander@^2.14.1, commander@^2.9.0, commander@^2.x: version "2.15.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" -commander@^2.8.1: - version "2.16.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.16.0.tgz#f16390593996ceb4f3eeb020b31d78528f7f8a50" - commander@~2.13.0: version "2.13.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" @@ -1462,7 +1279,7 @@ content-type@~1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" -convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.5.1: +convert-source-map@^1.4.0, convert-source-map@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" @@ -2545,10 +2362,6 @@ fs-minipass@^1.2.5: dependencies: minipass "^2.2.1" -fs-readdir-recursive@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" - fs-write-stream-atomic@^1.0.8: version "1.0.10" resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" @@ -2569,7 +2382,7 @@ fsevents@^1.1.2: nan "^2.9.2" node-pre-gyp "^0.9.0" -fsevents@^1.2.2, fsevents@^1.2.3: +fsevents@^1.2.3: version "1.2.4" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" dependencies: @@ -2663,9 +2476,9 @@ glob@^5.0.15: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.1.1, glob@^7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" +glob@^7.0.3, glob@^7.0.5: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -2674,9 +2487,9 @@ glob@^7.0.0, glob@^7.1.1, glob@^7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.3, glob@^7.0.5: - version "7.1.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" +glob@^7.1.1, glob@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -2685,7 +2498,7 @@ glob@^7.0.3, glob@^7.0.5: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^11.1.0, globals@^11.7.0: +globals@^11.7.0: version "11.7.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673" @@ -3258,7 +3071,7 @@ is-path-inside@^1.0.0: dependencies: path-is-inside "^1.0.1" -is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: +is-plain-obj@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" @@ -3879,10 +3692,6 @@ jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" -jsesc@^2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" - jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" @@ -4160,10 +3969,6 @@ lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" -lodash.debounce@^4.0.8: - version "4.0.8" - resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" - lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" @@ -4818,14 +4623,6 @@ osenv@^0.1.4: os-homedir "^1.0.0" os-tmpdir "^1.0.0" -output-file-sync@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/output-file-sync/-/output-file-sync-2.0.1.tgz#f53118282f5f553c2799541792b723a4c71430c0" - dependencies: - graceful-fs "^4.1.11" - is-plain-obj "^1.1.0" - mkdirp "^0.5.1" - p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -5877,7 +5674,7 @@ resolve@^1.1.6, resolve@^1.1.7: dependencies: path-parse "^1.0.5" -resolve@^1.3.2, resolve@^1.8.1: +resolve@^1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" dependencies: @@ -6221,7 +6018,7 @@ source-map@0.4.x, source-map@^0.4.4: dependencies: amdefine ">=0.0.4" -source-map@0.5.x, source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: +source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" @@ -6564,10 +6361,6 @@ to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - to-object-path@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" @@ -6768,10 +6561,6 @@ upath@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/upath/-/upath-1.0.5.tgz#02cab9ecebe95bbec6d5fc2566325725ab6d1a73" -upath@^1.0.5: - version "1.1.0" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" - uri-js@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" From 4e02cac2798b17d0b6e4b7cf1c1e285d2a6269f9 Mon Sep 17 00:00:00 2001 From: Sven SAULEAU Date: Mon, 10 Sep 2018 16:22:23 +0200 Subject: [PATCH 241/310] chore: bump webassemblyjs --- package.json | 8 +- yarn.lock | 204 +++++++++++++++++++++++++-------------------------- 2 files changed, 106 insertions(+), 106 deletions(-) diff --git a/package.json b/package.json index b10731da412..62c419e42be 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,10 @@ "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.7.5", - "@webassemblyjs/helper-module-context": "1.7.5", - "@webassemblyjs/wasm-edit": "1.7.5", - "@webassemblyjs/wasm-parser": "1.7.5", + "@webassemblyjs/ast": "1.7.6", + "@webassemblyjs/helper-module-context": "1.7.6", + "@webassemblyjs/wasm-edit": "1.7.6", + "@webassemblyjs/wasm-parser": "1.7.6", "acorn": "^5.6.2", "acorn-dynamic-import": "^3.0.0", "ajv": "^6.1.0", diff --git a/yarn.lock b/yarn.lock index eba0acfa3e6..07442bcf8bc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -56,133 +56,133 @@ "@types/source-list-map" "*" source-map "^0.6.1" -"@webassemblyjs/ast@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.7.5.tgz#c703ae02a230ee1e47fae883949b1252bef331bb" +"@webassemblyjs/ast@1.7.6": + version "1.7.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.7.6.tgz#3ef8c45b3e5e943a153a05281317474fef63e21e" dependencies: - "@webassemblyjs/helper-module-context" "1.7.5" - "@webassemblyjs/helper-wasm-bytecode" "1.7.5" - "@webassemblyjs/wast-parser" "1.7.5" + "@webassemblyjs/helper-module-context" "1.7.6" + "@webassemblyjs/helper-wasm-bytecode" "1.7.6" + "@webassemblyjs/wast-parser" "1.7.6" mamacro "^0.0.3" -"@webassemblyjs/floating-point-hex-parser@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.7.5.tgz#9908b85262e189ec6347512e80ee6c881ba9128c" +"@webassemblyjs/floating-point-hex-parser@1.7.6": + version "1.7.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.7.6.tgz#7cb37d51a05c3fe09b464ae7e711d1ab3837801f" -"@webassemblyjs/helper-api-error@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.7.5.tgz#6e01bccf462ebf9b96a3def27263666831d4e461" +"@webassemblyjs/helper-api-error@1.7.6": + version "1.7.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.7.6.tgz#99b7e30e66f550a2638299a109dda84a622070ef" -"@webassemblyjs/helper-buffer@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.7.5.tgz#262a4e750b032cd593e3f6c1a2cd486d675057c1" +"@webassemblyjs/helper-buffer@1.7.6": + version "1.7.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.7.6.tgz#ba0648be12bbe560c25c997e175c2018df39ca3e" -"@webassemblyjs/helper-code-frame@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.7.5.tgz#7c03bd204065d995675ad50427b9968db01459d4" +"@webassemblyjs/helper-code-frame@1.7.6": + version "1.7.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.7.6.tgz#5a94d21b0057b69a7403fca0c253c3aaca95b1a5" dependencies: - "@webassemblyjs/wast-printer" "1.7.5" + "@webassemblyjs/wast-printer" "1.7.6" -"@webassemblyjs/helper-fsm@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.7.5.tgz#1544319fb6121c850bcd612af0593bc12f028dd8" +"@webassemblyjs/helper-fsm@1.7.6": + version "1.7.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.7.6.tgz#ae1741c6f6121213c7a0b587fb964fac492d3e49" -"@webassemblyjs/helper-module-context@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.7.5.tgz#3bfa23f9d11dc2440105b6150280d772fb109ae8" +"@webassemblyjs/helper-module-context@1.7.6": + version "1.7.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.7.6.tgz#116d19a51a6cebc8900ad53ca34ff8269c668c23" dependencies: mamacro "^0.0.3" -"@webassemblyjs/helper-wasm-bytecode@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.7.5.tgz#1267e640e2d66c6ff543b010c3b019f8a0401b3a" +"@webassemblyjs/helper-wasm-bytecode@1.7.6": + version "1.7.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.7.6.tgz#98e515eaee611aa6834eb5f6a7f8f5b29fefb6f1" -"@webassemblyjs/helper-wasm-section@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.7.5.tgz#de198dadad44c58d8bdc22439915f0e1e302bf1e" +"@webassemblyjs/helper-wasm-section@1.7.6": + version "1.7.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.7.6.tgz#783835867bdd686df7a95377ab64f51a275e8333" dependencies: - "@webassemblyjs/ast" "1.7.5" - "@webassemblyjs/helper-buffer" "1.7.5" - "@webassemblyjs/helper-wasm-bytecode" "1.7.5" - "@webassemblyjs/wasm-gen" "1.7.5" + "@webassemblyjs/ast" "1.7.6" + "@webassemblyjs/helper-buffer" "1.7.6" + "@webassemblyjs/helper-wasm-bytecode" "1.7.6" + "@webassemblyjs/wasm-gen" "1.7.6" -"@webassemblyjs/ieee754@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.7.5.tgz#a4f5bb301422500e4cc8109c47e62214ab78356c" +"@webassemblyjs/ieee754@1.7.6": + version "1.7.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.7.6.tgz#c34fc058f2f831fae0632a8bb9803cf2d3462eb1" dependencies: "@xtuc/ieee754" "^1.2.0" -"@webassemblyjs/leb128@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.7.5.tgz#5576f288299ecfde320dafd732e9b05338bf3103" +"@webassemblyjs/leb128@1.7.6": + version "1.7.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.7.6.tgz#197f75376a29f6ed6ace15898a310d871d92f03b" dependencies: "@xtuc/long" "4.2.1" -"@webassemblyjs/utf8@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.7.5.tgz#c9d90e6d6b345ac928a86dd2976ea2f3a0d133e1" - -"@webassemblyjs/wasm-edit@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.7.5.tgz#b2e7d47d13966d0bf3f93a568b47cdab0aa20b02" - dependencies: - "@webassemblyjs/ast" "1.7.5" - "@webassemblyjs/helper-buffer" "1.7.5" - "@webassemblyjs/helper-wasm-bytecode" "1.7.5" - "@webassemblyjs/helper-wasm-section" "1.7.5" - "@webassemblyjs/wasm-gen" "1.7.5" - "@webassemblyjs/wasm-opt" "1.7.5" - "@webassemblyjs/wasm-parser" "1.7.5" - "@webassemblyjs/wast-printer" "1.7.5" - -"@webassemblyjs/wasm-gen@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.7.5.tgz#de4c8772346851dd43654e5a5447a61fd63044cb" - dependencies: - "@webassemblyjs/ast" "1.7.5" - "@webassemblyjs/helper-wasm-bytecode" "1.7.5" - "@webassemblyjs/ieee754" "1.7.5" - "@webassemblyjs/leb128" "1.7.5" - "@webassemblyjs/utf8" "1.7.5" - -"@webassemblyjs/wasm-opt@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.7.5.tgz#b4365c04945a0032cb4a0d8d1e42ca1b5c94232f" - dependencies: - "@webassemblyjs/ast" "1.7.5" - "@webassemblyjs/helper-buffer" "1.7.5" - "@webassemblyjs/wasm-gen" "1.7.5" - "@webassemblyjs/wasm-parser" "1.7.5" - -"@webassemblyjs/wasm-parser@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.7.5.tgz#b3fa79b66c8d92e0f56f46587261c9f399878e4c" - dependencies: - "@webassemblyjs/ast" "1.7.5" - "@webassemblyjs/helper-api-error" "1.7.5" - "@webassemblyjs/helper-wasm-bytecode" "1.7.5" - "@webassemblyjs/ieee754" "1.7.5" - "@webassemblyjs/leb128" "1.7.5" - "@webassemblyjs/utf8" "1.7.5" - -"@webassemblyjs/wast-parser@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.7.5.tgz#62b1b98686dd697d7656c8877f65626e6b40143c" - dependencies: - "@webassemblyjs/ast" "1.7.5" - "@webassemblyjs/floating-point-hex-parser" "1.7.5" - "@webassemblyjs/helper-api-error" "1.7.5" - "@webassemblyjs/helper-code-frame" "1.7.5" - "@webassemblyjs/helper-fsm" "1.7.5" +"@webassemblyjs/utf8@1.7.6": + version "1.7.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.7.6.tgz#eb62c66f906af2be70de0302e29055d25188797d" + +"@webassemblyjs/wasm-edit@1.7.6": + version "1.7.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.7.6.tgz#fa41929160cd7d676d4c28ecef420eed5b3733c5" + dependencies: + "@webassemblyjs/ast" "1.7.6" + "@webassemblyjs/helper-buffer" "1.7.6" + "@webassemblyjs/helper-wasm-bytecode" "1.7.6" + "@webassemblyjs/helper-wasm-section" "1.7.6" + "@webassemblyjs/wasm-gen" "1.7.6" + "@webassemblyjs/wasm-opt" "1.7.6" + "@webassemblyjs/wasm-parser" "1.7.6" + "@webassemblyjs/wast-printer" "1.7.6" + +"@webassemblyjs/wasm-gen@1.7.6": + version "1.7.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.7.6.tgz#695ac38861ab3d72bf763c8c75e5f087ffabc322" + dependencies: + "@webassemblyjs/ast" "1.7.6" + "@webassemblyjs/helper-wasm-bytecode" "1.7.6" + "@webassemblyjs/ieee754" "1.7.6" + "@webassemblyjs/leb128" "1.7.6" + "@webassemblyjs/utf8" "1.7.6" + +"@webassemblyjs/wasm-opt@1.7.6": + version "1.7.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.7.6.tgz#fbafa78e27e1a75ab759a4b658ff3d50b4636c21" + dependencies: + "@webassemblyjs/ast" "1.7.6" + "@webassemblyjs/helper-buffer" "1.7.6" + "@webassemblyjs/wasm-gen" "1.7.6" + "@webassemblyjs/wasm-parser" "1.7.6" + +"@webassemblyjs/wasm-parser@1.7.6": + version "1.7.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.7.6.tgz#84eafeeff405ad6f4c4b5777d6a28ae54eed51fe" + dependencies: + "@webassemblyjs/ast" "1.7.6" + "@webassemblyjs/helper-api-error" "1.7.6" + "@webassemblyjs/helper-wasm-bytecode" "1.7.6" + "@webassemblyjs/ieee754" "1.7.6" + "@webassemblyjs/leb128" "1.7.6" + "@webassemblyjs/utf8" "1.7.6" + +"@webassemblyjs/wast-parser@1.7.6": + version "1.7.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.7.6.tgz#ca4d20b1516e017c91981773bd7e819d6bd9c6a7" + dependencies: + "@webassemblyjs/ast" "1.7.6" + "@webassemblyjs/floating-point-hex-parser" "1.7.6" + "@webassemblyjs/helper-api-error" "1.7.6" + "@webassemblyjs/helper-code-frame" "1.7.6" + "@webassemblyjs/helper-fsm" "1.7.6" "@xtuc/long" "4.2.1" mamacro "^0.0.3" -"@webassemblyjs/wast-printer@1.7.5": - version "1.7.5" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.7.5.tgz#3946b531ac98475b7f5efc6564941ad8cf562d72" +"@webassemblyjs/wast-printer@1.7.6": + version "1.7.6" + resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.7.6.tgz#a6002c526ac5fa230fe2c6d2f1bdbf4aead43a5e" dependencies: - "@webassemblyjs/ast" "1.7.5" - "@webassemblyjs/wast-parser" "1.7.5" + "@webassemblyjs/ast" "1.7.6" + "@webassemblyjs/wast-parser" "1.7.6" "@xtuc/long" "4.2.1" "@xtuc/ieee754@^1.2.0": From ee27d36e7cb0bed3ca32911165bbf01fef993e48 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 10 Sep 2018 16:25:25 +0200 Subject: [PATCH 242/310] 4.17.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d60366f929c..57f8d4488e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.17.2", + "version": "4.17.3", "author": "Tobias Koppers @sokra", "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", From ee7d9485fa30d1d3d5adbfdfb52c8f57ae8b439e Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Mon, 10 Sep 2018 17:33:54 +0200 Subject: [PATCH 243/310] 4.18.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 537e174a7cd..2ff8cef8046 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.17.3", + "version": "4.18.0", "author": "Tobias Koppers @sokra", "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", From 35015dd71203caec7def26d210dabc6b27a4508a Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 12 Sep 2018 13:07:13 +0200 Subject: [PATCH 244/310] Upgrade tapable version --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 2ff8cef8046..6c734b3b4d2 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "neo-async": "^2.5.0", "node-libs-browser": "^2.0.0", "schema-utils": "^0.4.4", - "tapable": "^1.0.0", + "tapable": "^1.1.0", "uglifyjs-webpack-plugin": "^1.2.4", "watchpack": "^1.5.0", "webpack-sources": "^1.2.0" diff --git a/yarn.lock b/yarn.lock index 07442bcf8bc..dceefda10a2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6288,9 +6288,9 @@ table@^4.0.3: slice-ansi "1.0.0" string-width "^2.1.1" -tapable@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.0.0.tgz#cbb639d9002eed9c6b5975eb20598d7936f1f9f2" +tapable@^1.0.0, tapable@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.0.tgz#0d076a172e3d9ba088fd2272b2668fb8d194b78c" tar@^4: version "4.4.4" From 474a9ac1420853324a2a60d181f9b5dbab06b3dc Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 12 Sep 2018 14:11:07 +0200 Subject: [PATCH 245/310] Add simple azure pipeline --- azure-pipelines.yml | 142 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000000..dea3cf59f17 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,142 @@ +jobs: + - job: basic + pool: + vmImage: ubuntu-16.04 + steps: + - task: NodeTool@0 + displayName: "Install Node.js" + inputs: + versionSpec: "^10.10.0" + - script: | + curl -o- -L https://yarnpkg.com/install.sh | bash + displayName: "Install Yarn" + - script: | + export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" + node -v + yarn -v + displayName: "Print versions" + - script: | + export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" + yarn --frozen-lockfile + yarn link --frozen-lockfile || true + yarn link webpack --frozen-lockfile + displayName: "Install dependencies" + - script: | + export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" + yarn test:basic --ci + yarn test:unit --ci + displayName: "Run basic tests" + - job: lint + pool: + vmImage: ubuntu-16.04 + steps: + - task: NodeTool@0 + displayName: "Install Node.js" + inputs: + versionSpec: "^10.10.0" + - script: | + curl -o- -L https://yarnpkg.com/install.sh | bash + displayName: "Install Yarn" + - script: | + export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" + node -v + yarn -v + displayName: "Print versions" + - script: | + export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" + yarn --frozen-lockfile + yarn link --frozen-lockfile || true + yarn link webpack --frozen-lockfile + displayName: "Install dependencies" + - script: | + export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" + yarn lint + displayName: "Run linting" + - job: linux + dependsOn: + - basic + - lint + pool: + vmImage: ubuntu-16.04 + strategy: + maxParallel: 3 + matrix: + node-10: + node_version: ^10.10.0 + node-8: + node_version: ^8.12.0 + node-6: + node_version: ^6.14.4 + steps: + - task: NodeTool@0 + displayName: "Install Node.js" + inputs: + versionSpec: $(node_version) + - script: | + curl -o- -L https://yarnpkg.com/install.sh | bash + displayName: "Install Yarn" + - script: | + export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" + node -v + yarn -v + displayName: "Print versions" + - script: | + export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" + yarn --frozen-lockfile + yarn link --frozen-lockfile || true + yarn link webpack --frozen-lockfile + displayName: "Install dependencies" + - script: | + export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" + yarn cover:init + yarn cover:integration "test/(?!TestCases)" --ci --maxWorkers=2 + mv coverage/coverage-final.json coverage/coverage-final-1.json + yarn cover:integration "test/TestCasesD" --ci --maxWorkers=2 + mv coverage/coverage-final.json coverage/coverage-final-2.json + yarn cover:integration "test/TestCases(?!D)" --ci --maxWorkers=2 + mv coverage/coverage-final.json coverage/coverage-final-3.json + displayName: "Run tests with coverage" + - job: macos + dependsOn: + - basic + - lint + pool: + vmImage: "macOS 10.13" + strategy: + maxParallel: 3 + matrix: + node-10: + node_version: ^10.10.0 + node-8: + node_version: ^8.12.0 + node-6: + node_version: ^6.14.4 + steps: + - task: NodeTool@0 + displayName: "Install Node.js" + inputs: + versionSpec: $(node_version) + - script: | + curl -o- -L https://yarnpkg.com/install.sh | bash + displayName: "Install Yarn" + - script: | + export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" + node -v + yarn -v + displayName: "Print versions" + - script: | + export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" + yarn --frozen-lockfile + yarn link --frozen-lockfile || true + yarn link webpack --frozen-lockfile + displayName: "Install dependencies" + - script: | + export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" + yarn cover:init + yarn cover:integration "test/(?!TestCases)" --ci + mv coverage/coverage-final.json coverage/coverage-final-1.json + yarn cover:integration "test/TestCasesD" --ci + mv coverage/coverage-final.json coverage/coverage-final-2.json + yarn cover:integration "test/TestCases(?!D)" --ci + mv coverage/coverage-final.json coverage/coverage-final-3.json + displayName: "Run tests with coverage" From 37046a7315ab0b77329ef311919d52db02654e78 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 12 Sep 2018 14:11:59 +0200 Subject: [PATCH 246/310] Add windows to azure --- azure-pipelines.yml | 35 +++++++++++++++++++ .../define-plugin/webpack.config.js | 4 ++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index dea3cf59f17..e14b1282538 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -140,3 +140,38 @@ jobs: yarn cover:integration "test/TestCases(?!D)" --ci mv coverage/coverage-final.json coverage/coverage-final-3.json displayName: "Run tests with coverage" + - job: windows + dependsOn: + - basic + - lint + pool: + vmImage: vs2017-win2016 + strategy: + maxParallel: 3 + matrix: + node-10: + node_version: ^10.10.0 + node-8: + node_version: ^8.12.0 + node-6: + node_version: ^6.14.4 + steps: + - task: NodeTool@0 + displayName: "Install Node.js" + inputs: + versionSpec: $(node_version) + - script: | + npm install --global yarn + displayName: "Install Yarn" + - script: | + node -v + yarn -v + displayName: "Print versions" + - script: | + yarn --frozen-lockfile + yarn link --frozen-lockfile || true + yarn link webpack --frozen-lockfile + displayName: "Install dependencies" + - script: + yarn cover:init && yarn cover:integration "test/(?!TestCases)" --ci --maxWorkers=2 && move coverage\\coverage-final.json coverage\\coverage-final-1.json && yarn cover:integration "test/TestCasesD" --ci --maxWorkers=2 && move coverage\\coverage-final.json coverage\\coverage-final-2.json && yarn cover:integration "test/TestCases(?!D)" --ci --maxWorkers=2 && move coverage\\coverage-final.json coverage\\coverage-final-3.json + displayName: "Run tests with coverage" diff --git a/test/statsCases/define-plugin/webpack.config.js b/test/statsCases/define-plugin/webpack.config.js index 32d87e4f89a..e5b72f1d595 100644 --- a/test/statsCases/define-plugin/webpack.config.js +++ b/test/statsCases/define-plugin/webpack.config.js @@ -3,7 +3,9 @@ var fs = require("fs"); var join = require("path").join; function read(path) { - return JSON.stringify(fs.readFileSync(join(__dirname, path), "utf8")); + return JSON.stringify( + fs.readFileSync(join(__dirname, path), "utf8").replace(/\r\n/g, "\n") + ); } module.exports = [ From c51a1bab94e4ff8ffca443e4fcb038bc4911e65e Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 13 Sep 2018 12:22:30 +0200 Subject: [PATCH 247/310] 4.18.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6c734b3b4d2..0c1afcad7ec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack", - "version": "4.18.0", + "version": "4.18.1", "author": "Tobias Koppers @sokra", "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.", "license": "MIT", From 96ffd27246b745efa7f14a0987d42093b202583d Mon Sep 17 00:00:00 2001 From: Antoine Leblanc Date: Thu, 13 Sep 2018 13:10:07 +0200 Subject: [PATCH 248/310] docs(readme.styling): write correctly sass ref: http://sassnotsass.com/ --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 962f5c332cf..8ee53950183 100644 --- a/README.md +++ b/README.md @@ -221,7 +221,7 @@ or are automatically applied via regex from your webpack configuration. |
`