From 76d5cd579cd5e27d1dd411592cb079da22c55754 Mon Sep 17 00:00:00 2001 From: Joel Denning Date: Sun, 12 May 2019 14:29:50 -0600 Subject: [PATCH 001/130] Exposing System.register _context variable to bundled code. Making __system_context__ available to code splits. Fixing git problem Making PR compatible with webpack 5 Undoing prettier changes to open-bot Adding test Triggering build Triggering build Reimplementing with new file Exposing System.register _context variable to bundled code. Making __system_context__ available to code splits. Making PR compatible with webpack 5 Undoing prettier changes to open-bot Adding test Triggering build Triggering build Self review Self review Fixing license Removing deleted file Fix --- lib/APIPlugin.js | 6 +++++ lib/RuntimeGlobals.js | 5 ++++ lib/RuntimePlugin.js | 12 +++++++++ lib/library/SystemLibraryPlugin.js | 2 +- lib/runtime/SystemContextRuntimeModule.js | 25 +++++++++++++++++++ .../target/system-context/index.js | 8 ++++++ .../target/system-context/test.config.js | 13 ++++++++++ .../target/system-context/webpack.config.js | 9 +++++++ test/helpers/fakeSystem.js | 10 +++++++- 9 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 lib/runtime/SystemContextRuntimeModule.js create mode 100644 test/configCases/target/system-context/index.js create mode 100644 test/configCases/target/system-context/test.config.js create mode 100644 test/configCases/target/system-context/webpack.config.js diff --git a/lib/APIPlugin.js b/lib/APIPlugin.js index 893fee20a..38dd56b88 100644 --- a/lib/APIPlugin.js +++ b/lib/APIPlugin.js @@ -78,6 +78,12 @@ const REPLACEMENTS = { req: [RuntimeGlobals.uncaughtErrorHandler], type: undefined, // type is not known, could be function or undefined assign: true // is never a pattern + }, + __system_context__: { + expr: RuntimeGlobals.systemContext, + req: [RuntimeGlobals.systemContext], + type: "object", + assign: false } }; /* eslint-enable camelcase */ diff --git a/lib/RuntimeGlobals.js b/lib/RuntimeGlobals.js index 7a773840e..5da429169 100644 --- a/lib/RuntimeGlobals.js +++ b/lib/RuntimeGlobals.js @@ -235,3 +235,8 @@ exports.system = "__webpack_require__.System"; * using of it decreases the compiled bundle size */ exports.hasOwnProperty = "__webpack_require__.o"; + +/** + * the System.register context object + */ +exports.systemContext = "__webpack_require__.y"; diff --git a/lib/RuntimePlugin.js b/lib/RuntimePlugin.js index 5417b3a2b..f9687819a 100644 --- a/lib/RuntimePlugin.js +++ b/lib/RuntimePlugin.js @@ -19,6 +19,7 @@ const GlobalRuntimeModule = require("./runtime/GlobalRuntimeModule"); const HasOwnPropertyRuntimeModule = require("./runtime/HasOwnPropertyRuntimeModule"); const MakeNamespaceObjectRuntimeModule = require("./runtime/MakeNamespaceObjectRuntimeModule"); const PublicPathRuntimeModule = require("./runtime/PublicPathRuntimeModule"); +const SystemContextRuntimeModule = require("./runtime/SystemContextRuntimeModule"); /** @typedef {import("./Chunk")} Chunk */ /** @typedef {import("./Compiler")} Compiler */ @@ -158,6 +159,17 @@ class RuntimePlugin { compilation.addRuntimeModule(chunk, new GlobalRuntimeModule()); return true; }); + compilation.hooks.runtimeRequirementInTree + .for(RuntimeGlobals.systemContext) + .tap("RuntimePlugin", chunk => { + if (compilation.outputOptions.library.type === "system") { + compilation.addRuntimeModule( + chunk, + new SystemContextRuntimeModule() + ); + } + return true; + }); compilation.hooks.runtimeRequirementInTree .for(RuntimeGlobals.getChunkScriptFilename) .tap("RuntimePlugin", (chunk, set) => { diff --git a/lib/library/SystemLibraryPlugin.js b/lib/library/SystemLibraryPlugin.js index a1e4fd063..351ec8c62 100644 --- a/lib/library/SystemLibraryPlugin.js +++ b/lib/library/SystemLibraryPlugin.js @@ -126,7 +126,7 @@ class SystemLibraryPlugin extends AbstractLibraryPlugin { return new ConcatSource( Template.asString([ - `System.register(${name}${systemDependencies}, function(${dynamicExport}) {`, + `System.register(${name}${systemDependencies}, function(${dynamicExport}, __system_context__) {`, Template.indent([ externalVarDeclarations, "return {", diff --git a/lib/runtime/SystemContextRuntimeModule.js b/lib/runtime/SystemContextRuntimeModule.js new file mode 100644 index 000000000..141832990 --- /dev/null +++ b/lib/runtime/SystemContextRuntimeModule.js @@ -0,0 +1,25 @@ +/* + MIT License http://www.opensource.org/licenses/mit-license.php +*/ + +"use strict"; + +const RuntimeGlobals = require("../RuntimeGlobals"); +const RuntimeModule = require("../RuntimeModule"); + +/** @typedef {import("../Compilation")} Compilation */ + +class SystemContextRuntimeModule extends RuntimeModule { + constructor() { + super("__system_context__"); + } + + /** + * @returns {string} runtime code + */ + generate() { + return `${RuntimeGlobals.systemContext} = __system_context__;`; + } +} + +module.exports = SystemContextRuntimeModule; diff --git a/test/configCases/target/system-context/index.js b/test/configCases/target/system-context/index.js new file mode 100644 index 000000000..d4f382d7e --- /dev/null +++ b/test/configCases/target/system-context/index.js @@ -0,0 +1,8 @@ +// This test verifies that the System.register context is made available to webpack bundles + +it("should be able to use the System.register context", function() { + expect(__system_context__).toBeTruthy(); + expect(__system_context__.meta).toBeTruthy(); + expect(typeof __system_context__.import).toBe("function"); + expect(typeof __system_context__.meta.url).toBe("string"); +}); diff --git a/test/configCases/target/system-context/test.config.js b/test/configCases/target/system-context/test.config.js new file mode 100644 index 000000000..97ebf538d --- /dev/null +++ b/test/configCases/target/system-context/test.config.js @@ -0,0 +1,13 @@ +const System = require("../../../helpers/fakeSystem"); + +module.exports = { + beforeExecute: () => { + System.init(); + }, + moduleScope(scope) { + scope.System = System; + }, + afterExecute: () => { + System.execute("(anonym)"); + } +}; diff --git a/test/configCases/target/system-context/webpack.config.js b/test/configCases/target/system-context/webpack.config.js new file mode 100644 index 000000000..063b49207 --- /dev/null +++ b/test/configCases/target/system-context/webpack.config.js @@ -0,0 +1,9 @@ +module.exports = { + output: { + libraryTarget: "system" + }, + node: { + __dirname: false, + __filename: false + } +}; diff --git a/test/helpers/fakeSystem.js b/test/helpers/fakeSystem.js index 2b83c4b93..e069039b1 100644 --- a/test/helpers/fakeSystem.js +++ b/test/helpers/fakeSystem.js @@ -18,10 +18,18 @@ const System = { } entry.exports = result; }; + const systemContext = { + meta: { + url: `/${name}.js` + }, + import() { + return Promise.resolve(); + } + }; if (name in System.registry) { throw new Error(`Module ${name} is already registered`); } - const mod = fn(dynamicExport); + const mod = fn(dynamicExport, systemContext); if (deps.length > 0) { if (!Array.isArray(mod.setters)) { throw new Error( From 4627fe28869bcd2cfdd09226738ce6526d224fb8 Mon Sep 17 00:00:00 2001 From: Joel Denning Date: Sat, 29 Feb 2020 16:01:39 -0700 Subject: [PATCH 002/130] Triggering build --- test/helpers/fakeSystem.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/helpers/fakeSystem.js b/test/helpers/fakeSystem.js index e069039b1..9f174252b 100644 --- a/test/helpers/fakeSystem.js +++ b/test/helpers/fakeSystem.js @@ -26,6 +26,7 @@ const System = { return Promise.resolve(); } }; + if (name in System.registry) { throw new Error(`Module ${name} is already registered`); } From 0f488f14ca4f00dd12007b2beb7f88935fb9625c Mon Sep 17 00:00:00 2001 From: Joel Denning Date: Sat, 29 Feb 2020 17:12:21 -0700 Subject: [PATCH 003/130] Triggering build --- test/helpers/fakeSystem.js | 1 - 1 file changed, 1 deletion(-) diff --git a/test/helpers/fakeSystem.js b/test/helpers/fakeSystem.js index 9f174252b..e069039b1 100644 --- a/test/helpers/fakeSystem.js +++ b/test/helpers/fakeSystem.js @@ -26,7 +26,6 @@ const System = { return Promise.resolve(); } }; - if (name in System.registry) { throw new Error(`Module ${name} is already registered`); } From 8e81d8870cc619ce55c46ca887372d98175d1b3b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 11 Mar 2020 12:55:57 +0000 Subject: [PATCH 004/130] chore(deps): bump schema-utils from 2.6.4 to 2.6.5 Bumps [schema-utils](https://github.com/webpack/schema-utils) from 2.6.4 to 2.6.5. - [Release notes](https://github.com/webpack/schema-utils/releases) - [Changelog](https://github.com/webpack/schema-utils/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack/schema-utils/compare/v2.6.4...v2.6.5) Signed-off-by: dependabot-preview[bot] --- yarn.lock | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/yarn.lock b/yarn.lock index 2c806812d..73f7138d7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -739,12 +739,12 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== -ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: - version "6.10.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" - integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.0, ajv@^6.5.5: + version "6.12.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" + integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw== dependencies: - fast-deep-equal "^2.0.1" + fast-deep-equal "^3.1.1" fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.4.1" uri-js "^4.2.2" @@ -2256,10 +2256,10 @@ extsprintf@^1.2.0: resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -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" - integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= +fast-deep-equal@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4" + integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA== fast-diff@^1.1.2: version "1.2.0" @@ -5585,11 +5585,11 @@ schema-utils@^1.0.0: ajv-keywords "^3.1.0" schema-utils@^2.0.1, schema-utils@^2.5.0, schema-utils@^2.6.0, schema-utils@^2.6.4: - version "2.6.4" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.4.tgz#a27efbf6e4e78689d91872ee3ccfa57d7bdd0f53" - integrity sha512-VNjcaUxVnEeun6B2fiiUDjXXBtD4ZSH7pdbfIu1pOFwgptDPLMo/z9jr4sUfsjFVPqDCEin/F7IYlq7/E6yDbQ== + version "2.6.5" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.5.tgz#c758f0a7e624263073d396e29cd40aa101152d8a" + integrity sha512-5KXuwKziQrTVHh8j/Uxz+QUbxkaLW9X/86NBlx/gnKgtsZA2GIVMUn17qWhRFwF8jdYb3Dig5hRO/W5mZqy6SQ== dependencies: - ajv "^6.10.2" + ajv "^6.12.0" ajv-keywords "^3.4.1" script-loader@~0.7.0: From 1444bce9c94c2180e0435a5c21bfde5191051f43 Mon Sep 17 00:00:00 2001 From: "e.baranov" Date: Wed, 18 Mar 2020 10:54:43 +0300 Subject: [PATCH 005/130] refactor: rename chunkDependencies to chunkGroupDependencies --- lib/buildChunkGraph.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/buildChunkGraph.js b/lib/buildChunkGraph.js index f6a568813..d01920ddc 100644 --- a/lib/buildChunkGraph.js +++ b/lib/buildChunkGraph.js @@ -136,7 +136,7 @@ const extractBlockModulesMap = compilation => { * @param {Compilation} compilation the compilation * @param {Entrypoint[]} inputEntrypoints input groups * @param {Map} chunkGroupInfoMap mapping from chunk group to available modules - * @param {Map} chunkDependencies dependencies for chunk groups + * @param {Map} chunkGroupDependencies dependencies for chunk groups * @param {Set} blocksWithNestedBlocks flag for blocks that have nested blocks * @param {Set} allCreatedChunkGroups filled with all chunk groups that are created here */ @@ -145,7 +145,7 @@ const visitModules = ( compilation, inputEntrypoints, chunkGroupInfoMap, - chunkDependencies, + chunkGroupDependencies, blocksWithNestedBlocks, allCreatedChunkGroups ) => { @@ -277,7 +277,7 @@ const visitModules = ( * @returns {void} */ const iteratorBlock = b => { - // 1. We create a chunk for this Block + // 1. We create a chunk group for this Block // but only once (blockChunkGroups map) let cgi = blockChunkGroups.get(b); /** @type {ChunkGroup} */ @@ -328,8 +328,8 @@ const visitModules = ( } // 2. We store the Block+Chunk mapping as dependency for the chunk - let deps = chunkDependencies.get(chunkGroup); - if (!deps) chunkDependencies.set(chunkGroup, (deps = [])); + let deps = chunkGroupDependencies.get(chunkGroup); + if (!deps) chunkGroupDependencies.set(chunkGroup, (deps = [])); deps.push({ block: b, chunkGroup: c @@ -788,13 +788,13 @@ const visitModules = ( * * @param {Compilation} compilation the compilation * @param {Set} blocksWithNestedBlocks flag for blocks that have nested blocks - * @param {Map} chunkDependencies dependencies for chunk groups + * @param {Map} chunkGroupDependencies dependencies for chunk groups * @param {Map} chunkGroupInfoMap mapping from chunk group to available modules */ const connectChunkGroups = ( compilation, blocksWithNestedBlocks, - chunkDependencies, + chunkGroupDependencies, chunkGroupInfoMap ) => { const { chunkGraph } = compilation; @@ -836,7 +836,7 @@ const connectChunkGroups = ( }; // For all deps, check if chunk groups need to be connected - for (const [chunkGroup, deps] of chunkDependencies) { + for (const [chunkGroup, deps] of chunkGroupDependencies) { if (deps.length === 0) continue; // 1. Get info from chunk group info map @@ -896,7 +896,7 @@ const buildChunkGraph = (compilation, inputEntrypoints) => { // SHARED STATE /** @type {Map} */ - const chunkDependencies = new Map(); + const chunkGroupDependencies = new Map(); /** @type {Set} */ const allCreatedChunkGroups = new Set(); @@ -915,7 +915,7 @@ const buildChunkGraph = (compilation, inputEntrypoints) => { compilation, inputEntrypoints, chunkGroupInfoMap, - chunkDependencies, + chunkGroupDependencies, blocksWithNestedBlocks, allCreatedChunkGroups ); @@ -927,7 +927,7 @@ const buildChunkGraph = (compilation, inputEntrypoints) => { connectChunkGroups( compilation, blocksWithNestedBlocks, - chunkDependencies, + chunkGroupDependencies, chunkGroupInfoMap ); logger.timeEnd("connectChunkGroups"); From 846730c658d360574a4c8c508e7a1c2a682e18ae Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2020 12:06:46 +0000 Subject: [PATCH 006/130] chore(deps-dev): bump eslint-plugin-jsdoc from 22.0.1 to 22.1.0 Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 22.0.1 to 22.1.0. - [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases) - [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v22.0.1...v22.1.0) Signed-off-by: dependabot-preview[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4e4b5ebf2..005c37689 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2274,9 +2274,9 @@ eslint-plugin-jest@^23.8.1: "@typescript-eslint/experimental-utils" "^2.5.0" eslint-plugin-jsdoc@^22.0.0: - version "22.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-22.0.1.tgz#1f36c41a8818c968e46def7423e0b627841d72b9" - integrity sha512-lqQgGtd+roOhd5lSdIK4P3mlDmTVmVdcehj/r8nY25CGB2yi4Tk6JVwETCPBGnRKd40JkllkchyZmt0tFN+5pw== + version "22.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-22.1.0.tgz#dadfa62653fc0d87f900d810307f5ed07ef6ecd5" + integrity sha512-54NdbICM7KrxsGUqQsev9aIMqPXyvyBx2218Qcm0TQ16P9CtBI+YY4hayJR6adrxlq4Ej0JLpgfUXWaQVFqmQg== dependencies: comment-parser "^0.7.2" debug "^4.1.1" From 20d6bc73c4dd779333e7a69e56a0adb1a4a680b8 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Wed, 18 Mar 2020 19:57:32 +0530 Subject: [PATCH 007/130] docs: enhance CONTRIBUTING.md --- CONTRIBUTING.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a5a3f5d7a..d55d588fa 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,6 +44,9 @@ Something that will increase the chance that your pull request is accepted: * [Write tests](./test/README.md) * Follow the existing coding style * Write a [good commit message](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) +* For a major fix/feature make sure your PR has an issue and if it doesn't, please create one. This would help discussion with the community, and polishing ideas in case of a new feature. +* Make sure your PR's description contains GitHub's special keyword references that automatically close the related issue when the PR is merged. ([More info](https://github.com/blog/1506-closing-issues-via-pull-requests)) +* When you have lot of commits in your PR, it's good practice to squash all your commits in one single commit. ([Learn how to squash here](https://davidwalsh.name/squash-commits-git)) ## Documentation @@ -55,3 +58,11 @@ or [check out the issues on the documentation website's repository](https://gith ## Discussions Gitter is only for small questions. To discuss a subject in detail, please send a link to your forum or blog in the Gitter chat. + +## Join the development + +- Before you join development, please [set up the project](./_SETUP.md) on your local machine, run it and go through the application completely. Use any command you can find and see what it does. Explore. + + > Don't worry ... Nothing will happen to the project or to you due to the exploring. Only thing that will happen is, you'll be more familiar with what is where and might even get some cool ideas on how to improve various aspects of the project. + +- If you would like to work on an issue, drop in a comment at the issue. If it is already assigned to someone, but there is no sign of any work being done, please feel free to drop in a comment so that the issue can be assigned to you if the previous assignee has dropped it entirely. From fcf880f7c935c6d04412d7f1f977c6f300ba3faf Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2020 17:46:34 +0000 Subject: [PATCH 008/130] chore(deps-dev): bump coveralls from 3.0.9 to 3.0.11 Bumps [coveralls](https://github.com/nickmerwin/node-coveralls) from 3.0.9 to 3.0.11. - [Release notes](https://github.com/nickmerwin/node-coveralls/releases) - [Commits](https://github.com/nickmerwin/node-coveralls/compare/3.0.9...3.0.11) Signed-off-by: dependabot-preview[bot] --- yarn.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4e4b5ebf2..bcb98c85d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1591,14 +1591,14 @@ cosmiconfig@^6.0.0: yaml "^1.7.2" coveralls@^3.0.2: - version "3.0.9" - resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.9.tgz#8cfc5a5525f84884e2948a0bf0f1c0e90aac0420" - integrity sha512-nNBg3B1+4iDox5A5zqHKzUTiwl2ey4k2o0NEcVZYvl+GOSJdKBj4AJGKLv6h3SvWch7tABHePAQOSZWM9E2hMg== + version "3.0.11" + resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.0.11.tgz#e141da0922b632fcc66620f334460c3f0026a4ce" + integrity sha512-LZPWPR2NyGKyaABnc49dR0fpeP6UqhvGq4B5nUrTQ1UBy55z96+ga7r+/ChMdMJUwBgyJDXBi88UBgz2rs9IiQ== dependencies: js-yaml "^3.13.1" lcov-parse "^1.0.0" log-driver "^1.2.7" - minimist "^1.2.0" + minimist "^1.2.5" request "^2.88.0" cross-spawn@^6.0.0, cross-spawn@^6.0.5: From 5eb4768e1b301d7fa30ea4e546c85d1b67054232 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2020 20:35:17 +0000 Subject: [PATCH 009/130] chore(deps-dev): bump react-dom from 16.13.0 to 16.13.1 Bumps [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) from 16.13.0 to 16.13.1. - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/v16.13.1/packages/react-dom) Signed-off-by: dependabot-preview[bot] --- yarn.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4e4b5ebf2..c73392734 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5558,14 +5558,14 @@ rc@^1.2.7: strip-json-comments "~2.0.1" react-dom@^16.8.0: - version "16.13.0" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.13.0.tgz#cdde54b48eb9e8a0ca1b3dc9943d9bb409b81866" - integrity sha512-y09d2c4cG220DzdlFkPTnVvGTszVvNpC73v+AaLGLHbkpy3SSgvYq8x0rNwPJ/Rk/CicTNgk0hbHNw1gMEZAXg== + version "16.13.1" + resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.13.1.tgz#c1bd37331a0486c078ee54c4740720993b2e0e7f" + integrity sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" prop-types "^15.6.2" - scheduler "^0.19.0" + scheduler "^0.19.1" react-is@^16.12.0: version "16.13.0" @@ -5898,10 +5898,10 @@ saxes@^3.1.9: dependencies: xmlchars "^2.1.1" -scheduler@^0.19.0: - version "0.19.0" - resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.0.tgz#a715d56302de403df742f4a9be11975b32f5698d" - integrity sha512-xowbVaTPe9r7y7RUejcK73/j8tt2jfiyTednOvHbA8JoClvMYCp+r8QegLwK/n8zWQAtZb1fFnER4XLBZXrCxA== +scheduler@^0.19.1: + version "0.19.1" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196" + integrity sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" From 1613b2a392a01d4f3cc4ed42c6c05b599b83b6fd Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2020 16:34:52 +0000 Subject: [PATCH 010/130] chore(deps-dev): bump @babel/core from 7.8.7 to 7.9.0 Bumps [@babel/core](https://github.com/babel/babel) from 7.8.7 to 7.9.0. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](https://github.com/babel/babel/compare/v7.8.7...v7.9.0) Signed-off-by: dependabot-preview[bot] --- yarn.lock | 132 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 95 insertions(+), 37 deletions(-) diff --git a/yarn.lock b/yarn.lock index b8614c737..1a00a4701 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,32 +10,33 @@ "@babel/highlight" "^7.8.3" "@babel/core@^7.1.0", "@babel/core@^7.7.2", "@babel/core@^7.7.5": - version "7.8.7" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.8.7.tgz#b69017d221ccdeb203145ae9da269d72cf102f3b" - integrity sha512-rBlqF3Yko9cynC5CCFy6+K/w2N+Sq/ff2BPy+Krp7rHlABIr5epbA7OxVeKoMHB39LZOp1UY5SuLjy6uWi35yA== + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.0.tgz#ac977b538b77e132ff706f3b8a4dbad09c03c56e" + integrity sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.8.7" - "@babel/helpers" "^7.8.4" - "@babel/parser" "^7.8.7" + "@babel/generator" "^7.9.0" + "@babel/helper-module-transforms" "^7.9.0" + "@babel/helpers" "^7.9.0" + "@babel/parser" "^7.9.0" "@babel/template" "^7.8.6" - "@babel/traverse" "^7.8.6" - "@babel/types" "^7.8.7" + "@babel/traverse" "^7.9.0" + "@babel/types" "^7.9.0" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.1" - json5 "^2.1.0" + json5 "^2.1.2" lodash "^4.17.13" resolve "^1.3.2" semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.8.6", "@babel/generator@^7.8.7": - version "7.8.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.8.7.tgz#870b3cf7984f5297998152af625c4f3e341400f7" - integrity sha512-DQwjiKJqH4C3qGiyQCAExJHoZssn49JTMJgZ8SANGgVFdkupcUhLOdkAeoC6kmHZCPfoDG5M0b6cFlSN5wW7Ew== +"@babel/generator@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.0.tgz#0f67adea4ec39dad6e63345f70eec33014d78c89" + integrity sha512-onl4Oy46oGCzymOXtKMQpI7VXtCbTSHK1kqBydZ6AmzuNcacEVqGk9tZtAS+48IA9IstZcDCgIg8hQKnb7suRw== dependencies: - "@babel/types" "^7.8.7" + "@babel/types" "^7.9.0" jsesc "^2.5.1" lodash "^4.17.13" source-map "^0.5.0" @@ -56,6 +57,40 @@ dependencies: "@babel/types" "^7.8.3" +"@babel/helper-member-expression-to-functions@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz#659b710498ea6c1d9907e0c73f206eee7dadc24c" + integrity sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA== + dependencies: + "@babel/types" "^7.8.3" + +"@babel/helper-module-imports@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz#7fe39589b39c016331b6b8c3f441e8f0b1419498" + integrity sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg== + dependencies: + "@babel/types" "^7.8.3" + +"@babel/helper-module-transforms@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz#43b34dfe15961918707d247327431388e9fe96e5" + integrity sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA== + dependencies: + "@babel/helper-module-imports" "^7.8.3" + "@babel/helper-replace-supers" "^7.8.6" + "@babel/helper-simple-access" "^7.8.3" + "@babel/helper-split-export-declaration" "^7.8.3" + "@babel/template" "^7.8.6" + "@babel/types" "^7.9.0" + lodash "^4.17.13" + +"@babel/helper-optimise-call-expression@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz#7ed071813d09c75298ef4f208956006b6111ecb9" + integrity sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ== + dependencies: + "@babel/types" "^7.8.3" + "@babel/helper-plugin-utils@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" @@ -66,6 +101,24 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670" integrity sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ== +"@babel/helper-replace-supers@^7.8.6": + version "7.8.6" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz#5ada744fd5ad73203bf1d67459a27dcba67effc8" + integrity sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.8.3" + "@babel/helper-optimise-call-expression" "^7.8.3" + "@babel/traverse" "^7.8.6" + "@babel/types" "^7.8.6" + +"@babel/helper-simple-access@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz#7f8109928b4dab4654076986af575231deb639ae" + integrity sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw== + dependencies: + "@babel/template" "^7.8.3" + "@babel/types" "^7.8.3" + "@babel/helper-split-export-declaration@^7.8.3": version "7.8.3" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9" @@ -73,14 +126,19 @@ dependencies: "@babel/types" "^7.8.3" -"@babel/helpers@^7.8.4": - version "7.8.4" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.8.4.tgz#754eb3ee727c165e0a240d6c207de7c455f36f73" - integrity sha512-VPbe7wcQ4chu4TDQjimHv/5tj73qz88o12EPkO2ValS2QiQS/1F2SsjyIGNnAD0vF/nZS6Cf9i+vW6HIlnaR8w== +"@babel/helper-validator-identifier@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz#ad53562a7fc29b3b9a91bbf7d10397fd146346ed" + integrity sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw== + +"@babel/helpers@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.9.0.tgz#ab2c1bc4821af766cab51d4868a5038874ea5a12" + integrity sha512-/9GvfYTCG1NWCNwDj9e+XlnSCmWW/r9T794Xi58vPF9WCcnZCAZ0kWLSn54oqP40SUvh1T2G6VwKmFO5AOlW3A== dependencies: "@babel/template" "^7.8.3" - "@babel/traverse" "^7.8.4" - "@babel/types" "^7.8.3" + "@babel/traverse" "^7.9.0" + "@babel/types" "^7.9.0" "@babel/highlight@^7.8.3": version "7.8.3" @@ -91,10 +149,10 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.7.5", "@babel/parser@^7.8.6", "@babel/parser@^7.8.7": - version "7.8.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.8.7.tgz#7b8facf95d25fef9534aad51c4ffecde1a61e26a" - integrity sha512-9JWls8WilDXFGxs0phaXAZgpxTZhSk/yOYH2hTHC0X1yC7Z78IJfvR1vJ+rmJKq3I35td2XzXzN6ZLYlna+r/A== +"@babel/parser@^7.1.0", "@babel/parser@^7.7.5", "@babel/parser@^7.8.6", "@babel/parser@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.9.0.tgz#f821b32313f07ee570976d3f6238e8d2d66e0a8e" + integrity sha512-Iwyp00CZsypoNJcpXCbq3G4tcDgphtlMwMVrMhhZ//XBkqjXF7LW6V511yk0+pBX3ZwwGnPea+pTKNJiqA7pUg== "@babel/plugin-syntax-bigint@^7.0.0": version "7.8.3" @@ -126,27 +184,27 @@ "@babel/parser" "^7.8.6" "@babel/types" "^7.8.6" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.4", "@babel/traverse@^7.8.6": - version "7.8.6" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.8.6.tgz#acfe0c64e1cd991b3e32eae813a6eb564954b5ff" - integrity sha512-2B8l0db/DPi8iinITKuo7cbPznLCEk0kCxDoB9/N6gGNg/gxOXiR/IcymAFPiBwk5w6TtQ27w4wpElgp9btR9A== +"@babel/traverse@^7.1.0", "@babel/traverse@^7.7.4", "@babel/traverse@^7.8.6", "@babel/traverse@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.0.tgz#d3882c2830e513f4fe4cec9fe76ea1cc78747892" + integrity sha512-jAZQj0+kn4WTHO5dUZkZKhbFrqZE7K5LAQ5JysMnmvGij+wOdr+8lWqPeW0BcF4wFwrEXXtdGO7wcV6YPJcf3w== dependencies: "@babel/code-frame" "^7.8.3" - "@babel/generator" "^7.8.6" + "@babel/generator" "^7.9.0" "@babel/helper-function-name" "^7.8.3" "@babel/helper-split-export-declaration" "^7.8.3" - "@babel/parser" "^7.8.6" - "@babel/types" "^7.8.6" + "@babel/parser" "^7.9.0" + "@babel/types" "^7.9.0" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.8.7": - version "7.8.7" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.7.tgz#1fc9729e1acbb2337d5b6977a63979b4819f5d1d" - integrity sha512-k2TreEHxFA4CjGkL+GYjRyx35W0Mr7DP5+9q6WMkyKXB+904bYmG40syjMFV0oLlhhFCwWl0vA0DyzTDkwAiJw== +"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0": + version "7.9.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.9.0.tgz#00b064c3df83ad32b2dbf5ff07312b15c7f1efb5" + integrity sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng== dependencies: - esutils "^2.0.2" + "@babel/helper-validator-identifier" "^7.9.0" lodash "^4.17.13" to-fast-properties "^2.0.0" @@ -4076,7 +4134,7 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" -json5@^2.1.0, json5@^2.1.1: +json5@^2.1.1, json5@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.2.tgz#43ef1f0af9835dd624751a6b7fa48874fb2d608e" integrity sha512-MoUOQ4WdiN3yxhm7NEVJSJrieAo5hNSLQ5sj05OTRHPL9HOBy8u4Bu88jsC1jvqAdN+E1bJmsUcZH+1HQxliqQ== From 1ad67011db30aaed5f26d519eb1599394ba1c69d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 21 Mar 2020 13:04:11 +0000 Subject: [PATCH 011/130] chore(deps-dev): bump @types/node from 12.12.29 to 12.12.30 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 12.12.29 to 12.12.30. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Signed-off-by: dependabot-preview[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index ba34c4b6d..e217e1b45 100644 --- a/yarn.lock +++ b/yarn.lock @@ -458,9 +458,9 @@ integrity sha512-E6M6N0blf/jiZx8Q3nb0vNaswQeEyn0XlupO+xN6DtJ6r6IT4nXrTry7zhIfYvFCl3/8Cu6WIysmUBKiqV0bqQ== "@types/node@^12.6.9": - version "12.12.29" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.29.tgz#46275f028b4e463b9ac5fefc1d08bc66cc193f25" - integrity sha512-yo8Qz0ygADGFptISDj3pOC9wXfln/5pQaN/ysDIzOaAWXt73cNHmtEC8zSO2Y+kse/txmwIAJzkYZ5fooaS5DQ== + version "12.12.30" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.30.tgz#3501e6f09b954de9c404671cefdbcc5d9d7c45f6" + integrity sha512-sz9MF/zk6qVr3pAnM0BSQvYIBK44tS75QC5N+VbWSE4DjCV/pJ+UzCW/F+vVnl7TkOPcuwQureKNtSSwjBTaMg== "@types/parse-json@^4.0.0": version "4.0.0" From be1cac804fd6eb3a71bd5adc3d9727c53317921c Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 21 Mar 2020 14:04:20 +0100 Subject: [PATCH 012/130] update snapshots --- test/Validation.test.js | 116 ++++++++++++++++++++-------------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/test/Validation.test.js b/test/Validation.test.js index d86cb75b1..484ab7ec3 100644 --- a/test/Validation.test.js +++ b/test/Validation.test.js @@ -77,8 +77,8 @@ describe("Validation", () => { msg => expect(msg).toMatchInlineSnapshot(` "Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. - - configuration.module.wrappedContextRegExp should be an instance of RegExp - -> Set the inner regular expression for partial dynamic dependencies.." + - configuration.module.wrappedContextRegExp should be an instance of RegExp. + -> Set the inner regular expression for partial dynamic dependencies." `) ); @@ -312,17 +312,17 @@ describe("Validation", () => { }, msg => expect(msg).toMatchInlineSnapshot(` - "Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. - - configuration.plugins[0] should be one of these: - object { apply, … } | function - -> Plugin of type object or instanceof Function. - Details: - * configuration.plugins[0] should be an object: - object { apply, … } - -> Plugin instance. - * configuration.plugins[0] should be an instance of function - -> Function acting as plugin.." - `) +"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. + - configuration.plugins[0] should be one of these: + object { apply, … } | function + -> Plugin of type object or instanceof Function. + Details: + * configuration.plugins[0] should be an object: + object { apply, … } + -> Plugin instance. + * configuration.plugins[0] should be an instance of function. + -> Function acting as plugin." +`) ); createTestCase( @@ -333,17 +333,17 @@ describe("Validation", () => { }, msg => expect(msg).toMatchInlineSnapshot(` - "Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. - - configuration.plugins[0] should be one of these: - object { apply, … } | function - -> Plugin of type object or instanceof Function. - Details: - * configuration.plugins[0] should be an object: - object { apply, … } - -> Plugin instance. - * configuration.plugins[0] should be an instance of function - -> Function acting as plugin.." - `) +"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. + - configuration.plugins[0] should be one of these: + object { apply, … } | function + -> Plugin of type object or instanceof Function. + Details: + * configuration.plugins[0] should be an object: + object { apply, … } + -> Plugin instance. + * configuration.plugins[0] should be an instance of function. + -> Function acting as plugin." +`) ); createTestCase( @@ -354,17 +354,17 @@ describe("Validation", () => { }, msg => expect(msg).toMatchInlineSnapshot(` - "Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. - - configuration.plugins[0] should be one of these: - object { apply, … } | function - -> Plugin of type object or instanceof Function. - Details: - * configuration.plugins[0] should be an object: - object { apply, … } - -> Plugin instance. - * configuration.plugins[0] should be an instance of function - -> Function acting as plugin.." - `) +"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. + - configuration.plugins[0] should be one of these: + object { apply, … } | function + -> Plugin of type object or instanceof Function. + Details: + * configuration.plugins[0] should be an object: + object { apply, … } + -> Plugin instance. + * configuration.plugins[0] should be an instance of function. + -> Function acting as plugin." +`) ); createTestCase( @@ -375,17 +375,17 @@ describe("Validation", () => { }, msg => expect(msg).toMatchInlineSnapshot(` - "Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. - - configuration.plugins[0] should be one of these: - object { apply, … } | function - -> Plugin of type object or instanceof Function. - Details: - * configuration.plugins[0] should be an object: - object { apply, … } - -> Plugin instance. - * configuration.plugins[0] should be an instance of function - -> Function acting as plugin.." - `) +"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. + - configuration.plugins[0] should be one of these: + object { apply, … } | function + -> Plugin of type object or instanceof Function. + Details: + * configuration.plugins[0] should be an object: + object { apply, … } + -> Plugin instance. + * configuration.plugins[0] should be an instance of function. + -> Function acting as plugin." +`) ); createTestCase( @@ -452,18 +452,18 @@ describe("Validation", () => { }, msg => expect(msg).toMatchInlineSnapshot(` - "Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. - - configuration.optimization.splitChunks.cacheGroups should not be object { test, … } - -> Using the cacheGroup shorthand syntax with a cache group named 'test' is a potential config error - Did you intent to define a cache group with a test instead? - cacheGroups: { - : { - test: ... - } - }. - object { : false | function | string | RegExp | object { automaticNameDelimiter?, chunks?, enforce?, filename?, idHint?, maxAsyncRequests?, maxAsyncSize?, maxInitialRequests?, maxInitialSize?, maxSize?, minChunks?, minRemainingSize?, minSize?, name?, priority?, reuseExistingChunk?, test?, type? } } - -> Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks, default categories: 'default', 'defaultVendors')." - `) +"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. + - configuration.optimization.splitChunks.cacheGroups should not be object { test, … }. + -> Using the cacheGroup shorthand syntax with a cache group named 'test' is a potential config error + Did you intent to define a cache group with a test instead? + cacheGroups: { + : { + test: ... + } + }. + object { : false | function | string | RegExp | object { automaticNameDelimiter?, chunks?, enforce?, filename?, idHint?, maxAsyncRequests?, maxAsyncSize?, maxInitialRequests?, maxInitialSize?, maxSize?, minChunks?, minRemainingSize?, minSize?, name?, priority?, reuseExistingChunk?, test?, type? } } + -> Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks, default categories: 'default', 'defaultVendors')." +`) ); createTestCase( From 47cb8e1a28578f12e78be9e31f4e4251a0dae85a Mon Sep 17 00:00:00 2001 From: "e.baranov" Date: Wed, 18 Mar 2020 12:13:30 +0300 Subject: [PATCH 013/130] refactor: clarify comments --- lib/buildChunkGraph.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/buildChunkGraph.js b/lib/buildChunkGraph.js index d01920ddc..510e6a2f7 100644 --- a/lib/buildChunkGraph.js +++ b/lib/buildChunkGraph.js @@ -277,7 +277,7 @@ const visitModules = ( * @returns {void} */ const iteratorBlock = b => { - // 1. We create a chunk group for this Block + // 1. We create a chunk group with single chunk in it for this Block // but only once (blockChunkGroups map) let cgi = blockChunkGroups.get(b); /** @type {ChunkGroup} */ @@ -327,7 +327,8 @@ const visitModules = ( c = cgi.chunkGroup; } - // 2. We store the Block+Chunk mapping as dependency for the chunk + // 2. We store the Block + Chunk Group mapping as dependency + // for the chunk group which is set in processQueue let deps = chunkGroupDependencies.get(chunkGroup); if (!deps) chunkGroupDependencies.set(chunkGroup, (deps = [])); deps.push({ @@ -335,7 +336,7 @@ const visitModules = ( chunkGroup: c }); - // 3. We create/update the chunk group info + // 3. We enqueue the chunk group info creation/updating let connectList = queueConnect.get(chunkGroupInfo); if (connectList === undefined) { connectList = new Set(); From 3471ebc6d8aaff00e89c671fe44578e2c2dc913d Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Sun, 22 Mar 2020 07:51:56 +0530 Subject: [PATCH 014/130] docs(harmony-interop): improve example.js --- examples/harmony-interop/example.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/harmony-interop/example.js b/examples/harmony-interop/example.js index 9061a3f17..5a470e0f5 100644 --- a/examples/harmony-interop/example.js +++ b/examples/harmony-interop/example.js @@ -1,6 +1,6 @@ // harmony module -// import from CommonJs module +// import from CommonJS module import fs from "./fs"; import { readFile } from "./fs"; import * as fs2 from "./fs"; From c5eff857cb126de5765350323ca75e5d287dfb7d Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Sun, 22 Mar 2020 08:17:15 +0530 Subject: [PATCH 015/130] docs(extra-async-chunk): improve README.md --- examples/extra-async-chunk/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/extra-async-chunk/README.md b/examples/extra-async-chunk/README.md index 2dddd72f6..94b62d51a 100644 --- a/examples/extra-async-chunk/README.md +++ b/examples/extra-async-chunk/README.md @@ -1,4 +1,4 @@ -This example shows automatically created async commons chunks. +This example shows the automatically created async commons chunks. The example entry references two chunks: @@ -16,7 +16,7 @@ The example entry references two chunks: These chunks share modules `a` and `b`. The optimization extract these into chunk Z: -Note: Actually the optimization compare size of chunk Z to some minimum value, but this is disabled from this example. In practice there is no configuration needed for this. +Note: The optimization compares the size of chunk Z to some minimum value, but this is disabled from this example. In practice, there is no configuration needed for this. - entry chunk - async require -> chunk X & Z From 7d1025b2d93b9179e14dfd669c1a95269cc5c726 Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Sun, 22 Mar 2020 08:21:12 +0530 Subject: [PATCH 016/130] docs(extra-async-chunk): improve template.md --- examples/extra-async-chunk/template.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/extra-async-chunk/template.md b/examples/extra-async-chunk/template.md index 224d0e404..797ab5cad 100644 --- a/examples/extra-async-chunk/template.md +++ b/examples/extra-async-chunk/template.md @@ -1,4 +1,4 @@ -This example shows automatically created async commons chunks. +This example shows the automatically created async commons chunks. The example entry references two chunks: @@ -16,7 +16,7 @@ The example entry references two chunks: These chunks share modules `a` and `b`. The optimization extract these into chunk Z: -Note: Actually the optimization compare size of chunk Z to some minimum value, but this is disabled from this example. In practice there is no configuration needed for this. +Note: The optimization compares the size of chunk Z to some minimum value, but this is disabled from this example. In practice, there is no configuration needed for this. - entry chunk - async require -> chunk X & Z From 11f24f1affc2206eab65e9b95ea4cae193794c2d Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Sun, 22 Mar 2020 08:29:18 +0530 Subject: [PATCH 017/130] docs(harmony-unused): improve README.md --- examples/harmony-unused/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/harmony-unused/README.md b/examples/harmony-unused/README.md index c234e290e..3755b0558 100644 --- a/examples/harmony-unused/README.md +++ b/examples/harmony-unused/README.md @@ -1,10 +1,10 @@ -This example demonstrates how webpack tracks the using of ES6 imports and exports. Only used exports are emitted to the resulting bundle. The minimizing step then removes the declarations because they are unused. +This example demonstrates how webpack tracks the usage of ES6 imports and exports. Only used exports are emitted to the resulting bundle. The minimizing step then removes the declarations because they are unused. Excluding unused exports from bundles is known as "[tree-shaking](http://www.2ality.com/2015/12/webpack-tree-shaking.html)". In this example, only `add` and `multiply` in `./math.js` are used by the app. `list` is unused and is not included in the minimized bundle (Look for `Array.from` in the minimized bundle). -In addition to that, `library.js` simulates an entry point to a big library. `library.js` re-exports multiple identifiers from submodules. Often big parts of that is unused, like `abc.js`. Note how the usage information flows from `example.js` through `library.js` into `abc.js` and all declarations in `abc.js` are not included in the minimized bundle (Look for `console.log("a")` in the minimized bundle). +In addition to that, `library.js` simulates an entry point to a big library. `library.js` re-exports multiple identifiers from submodules. Often big parts of that are unused, like `abc.js`. Note how the usage information flows from `example.js` through `library.js` into `abc.js` and all declarations in `abc.js` are not included in the minimized bundle (Look for `console.log("a")` in the minimized bundle). # example.js From 412a5738af1afab71b73e2a53d39ee6686398fa9 Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Sun, 22 Mar 2020 08:32:01 +0530 Subject: [PATCH 018/130] docs(harmony-unused): improve template.md --- examples/harmony-unused/template.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/harmony-unused/template.md b/examples/harmony-unused/template.md index b473bfc5c..556f82610 100644 --- a/examples/harmony-unused/template.md +++ b/examples/harmony-unused/template.md @@ -1,10 +1,10 @@ -This example demonstrates how webpack tracks the using of ES6 imports and exports. Only used exports are emitted to the resulting bundle. The minimizing step then removes the declarations because they are unused. +This example demonstrates how webpack tracks the usage of ES6 imports and exports. Only used exports are emitted to the resulting bundle. The minimizing step then removes the declarations because they are unused. Excluding unused exports from bundles is known as "[tree-shaking](http://www.2ality.com/2015/12/webpack-tree-shaking.html)". In this example, only `add` and `multiply` in `./math.js` are used by the app. `list` is unused and is not included in the minimized bundle (Look for `Array.from` in the minimized bundle). -In addition to that, `library.js` simulates an entry point to a big library. `library.js` re-exports multiple identifiers from submodules. Often big parts of that is unused, like `abc.js`. Note how the usage information flows from `example.js` through `library.js` into `abc.js` and all declarations in `abc.js` are not included in the minimized bundle (Look for `console.log("a")` in the minimized bundle). +In addition to that, `library.js` simulates an entry point to a big library. `library.js` re-exports multiple identifiers from submodules. Often big parts of that are unused, like `abc.js`. Note how the usage information flows from `example.js` through `library.js` into `abc.js` and all declarations in `abc.js` are not included in the minimized bundle (Look for `console.log("a")` in the minimized bundle). # example.js From a3648715403a692dcd81856385f2fe7299f2d362 Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Sun, 22 Mar 2020 11:54:09 +0530 Subject: [PATCH 019/130] docs(http2-aggressive-splitting): improve README.md --- examples/http2-aggressive-splitting/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/http2-aggressive-splitting/README.md b/examples/http2-aggressive-splitting/README.md index a779cd0ea..fd7a3cd49 100644 --- a/examples/http2-aggressive-splitting/README.md +++ b/examples/http2-aggressive-splitting/README.md @@ -1,12 +1,12 @@ -This example demonstrates the AggressiveSplittingPlugin for splitting the bundle into multiple smaller chunks to improve caching. This works best with a HTTP2 web server, otherwise there is an overhead for the increased number of requests. +This example demonstrates the AggressiveSplittingPlugin for splitting the bundle into multiple smaller chunks to improve caching. This works best with an HTTP2 web server, otherwise, there is an overhead for the increased number of requests. -AggressiveSplittingPlugin splits every chunk until it reaches the specified `maxSize`. In this example it tries to create chunks with <50kB raw code, which typically minimizes to ~10kB. It groups modules together by folder structure, because modules in the same folder are likely to have similar repetitive text, making them gzip efficiently together. They are also likely to change together. +AggressiveSplittingPlugin splits every chunk until it reaches the specified `maxSize`. In this example, it tries to create chunks with <50kB raw code, which typically minimizes to ~10kB. It groups modules by folder structure because modules in the same folder are likely to have similar repetitive text, making them gzip efficiently together. They are also likely to change together. AggressiveSplittingPlugin records its splitting in the webpack records. When it is next run, it tries to use the last recorded splitting. Since changes to application code between one run and the next are usually in only a few modules (or just one), re-using the old splittings (and chunks, which are probably still in the client's cache), is highly advantageous. -Only chunks which are bigger than the specified `minSize` are stored into the records. This ensures that these chunks fill up as your application grows, instead of creating many records of small chunks for every change. +Only chunks that are bigger than the specified `minSize` are stored into the records. This ensures that these chunks fill up as your application grows, instead of creating many records of small chunks for every change. -If a module changes, its chunks are declared to be invalid, and are put back into the module pool. New chunks are created from all modules in the pool. +If a module changes, its chunks are declared to be invalid and are put back into the module pool. New chunks are created from all modules in the pool. There is a tradeoff here: @@ -14,7 +14,7 @@ The caching improves with smaller `maxSize`, as chunks change less often and can The compression improves with bigger `maxSize`, as gzip works better for bigger files. It's more likely to find duplicate strings, etc. -The backward compatibility (non HTTP2 client) improves with bigger `maxSize`, as the number of requests decreases. +The backward compatibility (non-HTTP2 client) improves with bigger `maxSize`, as the number of requests decreases. ```js var path = require("path"); From b172054f9bb43b02ac34e99d3b8f500f3884cd68 Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Sun, 22 Mar 2020 12:00:28 +0530 Subject: [PATCH 020/130] docs(http2-aggressive-splitting): improve template.md --- examples/http2-aggressive-splitting/template.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/http2-aggressive-splitting/template.md b/examples/http2-aggressive-splitting/template.md index d0029b92c..bca2fc0dd 100644 --- a/examples/http2-aggressive-splitting/template.md +++ b/examples/http2-aggressive-splitting/template.md @@ -1,12 +1,12 @@ -This example demonstrates the AggressiveSplittingPlugin for splitting the bundle into multiple smaller chunks to improve caching. This works best with a HTTP2 web server, otherwise there is an overhead for the increased number of requests. +This example demonstrates the AggressiveSplittingPlugin for splitting the bundle into multiple smaller chunks to improve caching. This works best with an HTTP2 web server, otherwise, there is an overhead for the increased number of requests. -AggressiveSplittingPlugin splits every chunk until it reaches the specified `maxSize`. In this example it tries to create chunks with <50kB raw code, which typically minimizes to ~10kB. It groups modules together by folder structure, because modules in the same folder are likely to have similar repetitive text, making them gzip efficiently together. They are also likely to change together. +AggressiveSplittingPlugin splits every chunk until it reaches the specified `maxSize`. In this example, it tries to create chunks with <50kB raw code, which typically minimizes to ~10kB. It groups modules by folder structure, because modules in the same folder are likely to have similar repetitive text, making them gzip efficiently together. They are also likely to change together. AggressiveSplittingPlugin records its splitting in the webpack records. When it is next run, it tries to use the last recorded splitting. Since changes to application code between one run and the next are usually in only a few modules (or just one), re-using the old splittings (and chunks, which are probably still in the client's cache), is highly advantageous. -Only chunks which are bigger than the specified `minSize` are stored into the records. This ensures that these chunks fill up as your application grows, instead of creating many records of small chunks for every change. +Only chunks that are bigger than the specified `minSize` are stored into the records. This ensures that these chunks fill up as your application grows, instead of creating many records of small chunks for every change. -If a module changes, its chunks are declared to be invalid, and are put back into the module pool. New chunks are created from all modules in the pool. +If a module changes, its chunks are declared to be invalid and are put back into the module pool. New chunks are created from all modules in the pool. There is a tradeoff here: @@ -14,7 +14,7 @@ The caching improves with smaller `maxSize`, as chunks change less often and can The compression improves with bigger `maxSize`, as gzip works better for bigger files. It's more likely to find duplicate strings, etc. -The backward compatibility (non HTTP2 client) improves with bigger `maxSize`, as the number of requests decreases. +The backward compatibility (non-HTTP2 client) improves with bigger `maxSize`, as the number of requests decreases. ```js _{{webpack.config.js}}_ From 67e0727e8bbd9657e227e2f412a213b3f158f2cf Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 22 Mar 2020 10:27:26 +0000 Subject: [PATCH 021/130] chore(deps-dev): bump eslint-config-prettier from 6.10.0 to 6.10.1 Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.10.0 to 6.10.1. - [Release notes](https://github.com/prettier/eslint-config-prettier/releases) - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.10.0...v6.10.1) Signed-off-by: dependabot-preview[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index ba34c4b6d..8a488f12b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2252,9 +2252,9 @@ escodegen@^1.11.1: source-map "~0.6.1" eslint-config-prettier@^6.0.0: - version "6.10.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.10.0.tgz#7b15e303bf9c956875c948f6b21500e48ded6a7f" - integrity sha512-AtndijGte1rPILInUdHjvKEGbIV06NuvPrqlIEaEaWtbtvJh464mDeyGMdZEQMsGvC0ZVkiex1fSNcC4HAbRGg== + version "6.10.1" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz#129ef9ec575d5ddc0e269667bf09defcd898642a" + integrity sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ== dependencies: get-stdin "^6.0.0" From 9dcd13e0537f91dc5b86f1325a614de08b343990 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 22 Mar 2020 12:19:13 +0000 Subject: [PATCH 022/130] chore(deps-dev): bump babel-loader from 8.0.6 to 8.1.0 Bumps [babel-loader](https://github.com/babel/babel-loader) from 8.0.6 to 8.1.0. - [Release notes](https://github.com/babel/babel-loader/releases) - [Changelog](https://github.com/babel/babel-loader/blob/master/CHANGELOG.md) - [Commits](https://github.com/babel/babel-loader/compare/v8.0.6...v8.1.0) Signed-off-by: dependabot-preview[bot] --- yarn.lock | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/yarn.lock b/yarn.lock index 7f3f76cba..59c975ecd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -993,14 +993,15 @@ babel-jest@^25.1.0: slash "^3.0.0" babel-loader@^8.0.6: - version "8.0.6" - resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.0.6.tgz#e33bdb6f362b03f4bb141a0c21ab87c501b70dfb" - integrity sha512-4BmWKtBOBm13uoUwd08UwjZlaw3O9GWf456R9j+5YykFZ6LUIjIKLc0zEZf+hauxPOJs96C8k6FvYD09vWzhYw== + version "8.1.0" + resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.1.0.tgz#c611d5112bd5209abe8b9fa84c3e4da25275f1c3" + integrity sha512-7q7nC1tYOrqvUrN3LQK4GwSk/TQorZSOlO9C+RZDZpODgyN4ZlCqE5q9cDsyWOliN+aU9B4JX01xK9eJXowJLw== dependencies: - find-cache-dir "^2.0.0" - loader-utils "^1.0.2" - mkdirp "^0.5.1" + find-cache-dir "^2.1.0" + loader-utils "^1.4.0" + mkdirp "^0.5.3" pify "^4.0.1" + schema-utils "^2.6.5" babel-plugin-istanbul@^6.0.0: version "6.0.0" @@ -2644,7 +2645,7 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -find-cache-dir@^2.0.0: +find-cache-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== @@ -4269,7 +4270,7 @@ loader-runner@^3.1.0: resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-3.1.0.tgz#e9440e5875f2ad2f968489cd2c7b59a4f2847fcb" integrity sha512-wE/bOCdTKMR2rm7Xxh+eirDOmN7Vx7hntWgiTayuFPtF8MgsFDo49SP8kkYz8IVlEBTOtR7P+XI7bE1xjo/IkA== -loader-utils@^1.0.0, loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3: +loader-utils@^1.0.0, loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3, loader-utils@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== @@ -4584,11 +4585,6 @@ minimist-options@^3.0.1: arrify "^1.0.1" is-plain-obj "^1.1.0" -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" @@ -4650,12 +4646,12 @@ 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.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= +mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.3.tgz#5a514b7179259287952881e94410ec5465659f8c" + integrity sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg== dependencies: - minimist "0.0.8" + minimist "^1.2.5" move-concurrently@^1.0.1: version "1.0.1" @@ -5923,7 +5919,7 @@ schema-utils@^1.0.0: ajv-errors "^1.0.0" ajv-keywords "^3.1.0" -schema-utils@^2.0.1, schema-utils@^2.5.0, schema-utils@^2.6.0, schema-utils@^2.6.4: +schema-utils@^2.0.1, schema-utils@^2.5.0, schema-utils@^2.6.0, schema-utils@^2.6.4, schema-utils@^2.6.5: version "2.6.5" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.5.tgz#c758f0a7e624263073d396e29cd40aa101152d8a" integrity sha512-5KXuwKziQrTVHh8j/Uxz+QUbxkaLW9X/86NBlx/gnKgtsZA2GIVMUn17qWhRFwF8jdYb3Dig5hRO/W5mZqy6SQ== From 82dfdb8b22efed0554bcc9904309844e048e5a9d Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 22 Mar 2020 16:22:58 +0000 Subject: [PATCH 023/130] chore(deps-dev): bump ts-loader from 6.2.1 to 6.2.2 Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 6.2.1 to 6.2.2. - [Release notes](https://github.com/TypeStrong/ts-loader/releases) - [Changelog](https://github.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/ts-loader/compare/v6.2.1...v6.2.2) Signed-off-by: dependabot-preview[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 3878936c6..07f2c4605 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6723,9 +6723,9 @@ trim-newlines@^2.0.0: integrity sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA= ts-loader@^6.0.4: - version "6.2.1" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-6.2.1.tgz#67939d5772e8a8c6bdaf6277ca023a4812da02ef" - integrity sha512-Dd9FekWuABGgjE1g0TlQJ+4dFUfYGbYcs52/HQObE0ZmUNjQlmLAS7xXsSzy23AMaMwipsx5sNHvoEpT2CZq1g== + version "6.2.2" + resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-6.2.2.tgz#dffa3879b01a1a1e0a4b85e2b8421dc0dfff1c58" + integrity sha512-HDo5kXZCBml3EUPcc7RlZOV/JGlLHwppTLEHb3SHnr5V7NXD4klMEkrhJe5wgRbaWsSXi+Y1SIBN/K9B6zWGWQ== dependencies: chalk "^2.3.0" enhanced-resolve "^4.0.0" From 6fa5a8ef9c0687a71489ebe10284ca0beb8e152a Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Mon, 23 Mar 2020 08:07:13 +0530 Subject: [PATCH 024/130] chore: remove space Co-Authored-By: Yuta Hiroto --- examples/extra-async-chunk/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/extra-async-chunk/README.md b/examples/extra-async-chunk/README.md index 94b62d51a..f806ea210 100644 --- a/examples/extra-async-chunk/README.md +++ b/examples/extra-async-chunk/README.md @@ -16,7 +16,7 @@ The example entry references two chunks: These chunks share modules `a` and `b`. The optimization extract these into chunk Z: -Note: The optimization compares the size of chunk Z to some minimum value, but this is disabled from this example. In practice, there is no configuration needed for this. +Note: The optimization compares the size of chunk Z to some minimum value, but this is disabled from this example. In practice, there is no configuration needed for this. - entry chunk - async require -> chunk X & Z From 6c2552c915f87084068dce5b84ea94dafbfe7f6a Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Mon, 23 Mar 2020 08:15:56 +0530 Subject: [PATCH 025/130] docs(many-pages): grammatical fixes in README.md --- examples/many-pages/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/many-pages/README.md b/examples/many-pages/README.md index 061ec3b3e..67900ffaa 100644 --- a/examples/many-pages/README.md +++ b/examples/many-pages/README.md @@ -2,12 +2,12 @@ This example illustrates webpack's algorithm for automatic deduplication using `optimization.splitChunks`. -This example application contains 7 pages, each importing 1-3 modules from the `node_modules` folder (vendor libs) and 0-3 modules from the `stuff` folder (application modules). In reality an application is probably more complex, but the same mechanisms apply. +This example application contains 7 pages, each importing 1-3 modules from the `node_modules` folder (vendor libs) and 0-3 modules from the `stuff` folder (application modules). In reality, an application is probably more complex, but the same mechanisms apply. The following configuration is used: - `optimization.splitChunks.chunks: "all"` - This opt-in into automatic splitting of initial chunks which is off by default -- `optimization.splitChunks.maxInitial/AsyncRequests: 20` - This opt-in into a HTTP2 optimized splitting mode by increasing the allowed amount of requests. Browser only supports 6 requests in parallel for HTTP1.1. +- `optimization.splitChunks.maxInitial/AsyncRequests: 20` - This opt-in into an HTTP2 optimized splitting mode by increasing the allowed amount of requests. The browser only supports 6 requests in parallel for HTTP1.1. # Interpreting the result @@ -16,11 +16,11 @@ The following configuration is used: - `vendors~pageA.js` vendors only used by a single page but larger than the threshold in size - `pageA~pageD~pageF.js` application modules shared by these pages and larger than the threshold in size -The threshold is here 40 bytes, but by default (in a real application) 30kb. +Here, the threshold is 40 bytes but by default (in a real application) 30kb. Some modules are intentionally duplicated, i. e. `./stuff/s4.js` is shared by `pageA` and `pageC`, but it's the only shared module so no separate output file is created because it would be smaller than the threshold. A separate request (which comes with an overhead and worsen gzipping) is not worth the extra bytes. -Note: decreasing `maxInitial/AsyncRequest` will increase duplication further to reduce the number of requests. Duplication doesn't affect initial page load, it only affects download size of navigations to other pages of the application. +Note: decreasing `maxInitial/AsyncRequest` will increase duplication further to reduce the number of requests. Duplication doesn't affect the initial page load, it only affects download size of navigations to other pages of the application. ## webpack.config.js From 7e86cc96a14c57d1d81adc8545297c25dea821bf Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Mon, 23 Mar 2020 08:28:42 +0530 Subject: [PATCH 026/130] docs(many-pages): grammatical fixes in template.md --- examples/many-pages/template.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/many-pages/template.md b/examples/many-pages/template.md index 75d82d7cc..fa3c49319 100644 --- a/examples/many-pages/template.md +++ b/examples/many-pages/template.md @@ -2,12 +2,12 @@ This example illustrates webpack's algorithm for automatic deduplication using `optimization.splitChunks`. -This example application contains 7 pages, each importing 1-3 modules from the `node_modules` folder (vendor libs) and 0-3 modules from the `stuff` folder (application modules). In reality an application is probably more complex, but the same mechanisms apply. +This example application contains 7 pages, each importing 1-3 modules from the `node_modules` folder (vendor libs) and 0-3 modules from the `stuff` folder (application modules). In reality, an application is probably more complex, but the same mechanisms apply. The following configuration is used: - `optimization.splitChunks.chunks: "all"` - This opt-in into automatic splitting of initial chunks which is off by default -- `optimization.splitChunks.maxInitial/AsyncRequests: 20` - This opt-in into a HTTP2 optimized splitting mode by increasing the allowed amount of requests. Browser only supports 6 requests in parallel for HTTP1.1. +- `optimization.splitChunks.maxInitial/AsyncRequests: 20` - This opt-in into an HTTP2 optimized splitting mode by increasing the allowed amount of requests. The browser only supports 6 requests in parallel for HTTP1.1. # Interpreting the result @@ -16,11 +16,11 @@ The following configuration is used: - `vendors~pageA.js` vendors only used by a single page but larger than the threshold in size - `pageA~pageD~pageF.js` application modules shared by these pages and larger than the threshold in size -The threshold is here 40 bytes, but by default (in a real application) 30kb. +Here, the threshold is 40 bytes but by default (in a real application) 30kb. Some modules are intentionally duplicated, i. e. `./stuff/s4.js` is shared by `pageA` and `pageC`, but it's the only shared module so no separate output file is created because it would be smaller than the threshold. A separate request (which comes with an overhead and worsen gzipping) is not worth the extra bytes. -Note: decreasing `maxInitial/AsyncRequest` will increase duplication further to reduce the number of requests. Duplication doesn't affect initial page load, it only affects download size of navigations to other pages of the application. +Note: decreasing `maxInitial/AsyncRequest` will increase duplication further to reduce the number of requests. Duplication doesn't affect the initial page load, it only affects download size of navigations to other pages of the application. ## webpack.config.js From e8f9941bfd8e906c46044622dfe4bfbbb4fe85aa Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Mon, 23 Mar 2020 08:33:03 +0530 Subject: [PATCH 027/130] docs(mixed): improve README.md --- examples/mixed/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/mixed/README.md b/examples/mixed/README.md index 283445651..4e6cd3571 100644 --- a/examples/mixed/README.md +++ b/examples/mixed/README.md @@ -1,11 +1,11 @@ -This example shows how you can mix different module styles in webpack. Here CommonJs, AMD and Harmony Modules (ES6 Modules) are used. In addition to that there are different types of dynamic requires (`"../require.context/templates/"+amd1+".js"` and `Math.random() < 0.5 ? "./commonjs" : "./amd"`). +This example shows how you can mix different module styles in webpack. Here CommonJS, AMD and Harmony Modules (ES6 Modules) are used. In addition to that there are different types of dynamic requires (`"../require.context/templates/"+amd1+".js"` and `Math.random() < 0.5 ? "./commonjs" : "./amd"`). You see that everything is working nicely together. # example.js ```javascript -// CommonJs-style requires +// CommonJS-style requires var commonjs1 = require("./commonjs"); var amd1 = require("./amd"); var harmony1 = require("./harmony"); @@ -41,7 +41,7 @@ define( # commonjs.js ```javascript -// CommonJs Module Format +// CommonJS Module Format module.exports = 123; // but you can use amd style requires @@ -68,7 +68,7 @@ require( /*! runtime requirements: module, __webpack_require__, __webpack_require__.oe, __webpack_require__.* */ /***/ ((module, __unused_webpack_exports, __webpack_require__) => { -// CommonJs Module Format +// CommonJS Module Format module.exports = 123; // but you can use amd style requires From cd18c1c668d9f48e8975d14fa75a7e16b3589958 Mon Sep 17 00:00:00 2001 From: Albus Dumbledore Date: Mon, 23 Mar 2020 08:35:41 +0530 Subject: [PATCH 028/130] docs(mixed): improve template.md --- examples/mixed/template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/mixed/template.md b/examples/mixed/template.md index 83956754d..a1dd79d72 100644 --- a/examples/mixed/template.md +++ b/examples/mixed/template.md @@ -1,4 +1,4 @@ -This example shows how you can mix different module styles in webpack. Here CommonJs, AMD and Harmony Modules (ES6 Modules) are used. In addition to that there are different types of dynamic requires (`"../require.context/templates/"+amd1+".js"` and `Math.random() < 0.5 ? "./commonjs" : "./amd"`). +This example shows how you can mix different module styles in webpack. Here CommonJS, AMD and Harmony Modules (ES6 Modules) are used. In addition to that there are different types of dynamic requires (`"../require.context/templates/"+amd1+".js"` and `Math.random() < 0.5 ? "./commonjs" : "./amd"`). You see that everything is working nicely together. From 1495861a3df9fd1853e2069aec012a80b85d0b9c Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Mon, 23 Mar 2020 13:38:39 +0530 Subject: [PATCH 029/130] docs(readme): add link to CONTRIBUTING.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3359bf7a0..7f2c9c669 100644 --- a/README.md +++ b/README.md @@ -334,6 +334,8 @@ Contributions go far beyond pull requests and commits. Although we love giving y * [Blogging, speaking about, or creating tutorials](https://github.com/webpack-contrib/awesome-webpack) about one of webpack's many features. * Helping others in our webpack [gitter channel](https://gitter.im/webpack/webpack). +To get started have a look at our [documentation on contributing](https://github.com/webpack/webpack/blob/master/CONTRIBUTING.md). + If you are worried or don't know where to start, you can **always** reach out to [Sean Larkin (@TheLarkInn) on Twitter](https://twitter.com/thelarkinn) or simply submit an issue and a maintainer can help give you guidance! We have also started a series on our [Medium Publication](https://medium.com/webpack) called [The Contributor's Guide to webpack](https://medium.com/webpack/contributors-guide/home). We welcome you to read it and post any questions or responses if you still need help. From 267be4439202ca2dac313e352698b4dadd158970 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Mon, 23 Mar 2020 12:59:53 +0530 Subject: [PATCH 030/130] chore: extend prettier configuration for markdown --- CONTRIBUTING.md | 20 +++--- README.md | 179 ++++++++++++++++++++++-------------------------- _SETUP.md | 8 +-- open-bot.yaml | 18 ++--- package.json | 4 ++ 5 files changed, 108 insertions(+), 121 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d55d588fa..b6695e871 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ that include your webpack.config.js, relevant files, and the full error message **If you have discovered a bug or have a feature suggestion, please [create an issue on GitHub](https://github.com/webpack/webpack/issues/new).** -Do you want to fix an issue? Look at the issues with a tag of [X5: work required (PR / Help Wanted)](https://github.com/webpack/webpack/labels/X5%3A%20work%20required%20%28PR%20%2F%20Help%20Wanted%29). Each issue should be tagged with a difficulty tag - +Do you want to fix an issue? Look at the issues with a tag of [X5: work required (PR / Help Wanted)](https://github.com/webpack/webpack/labels/X5%3A%20work%20required%20%28PR%20%2F%20Help%20Wanted%29). Each issue should be tagged with a difficulty tag - - D0: My First Commit (Contribution Difficulty) - D1: Easy (Contribution Difficulty) @@ -41,12 +41,12 @@ your pull request should be accepted quickly. Something that will increase the chance that your pull request is accepted: -* [Write tests](./test/README.md) -* Follow the existing coding style -* Write a [good commit message](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) -* For a major fix/feature make sure your PR has an issue and if it doesn't, please create one. This would help discussion with the community, and polishing ideas in case of a new feature. -* Make sure your PR's description contains GitHub's special keyword references that automatically close the related issue when the PR is merged. ([More info](https://github.com/blog/1506-closing-issues-via-pull-requests)) -* When you have lot of commits in your PR, it's good practice to squash all your commits in one single commit. ([Learn how to squash here](https://davidwalsh.name/squash-commits-git)) +- [Write tests](./test/README.md) +- Follow the existing coding style +- Write a [good commit message](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) +- For a major fix/feature make sure your PR has an issue and if it doesn't, please create one. This would help discussion with the community, and polishing ideas in case of a new feature. +- Make sure your PR's description contains GitHub's special keyword references that automatically close the related issue when the PR is merged. ([More info](https://github.com/blog/1506-closing-issues-via-pull-requests)) +- When you have lot of commits in your PR, it's good practice to squash all your commits in one single commit. ([Learn how to squash here](https://davidwalsh.name/squash-commits-git)) ## Documentation @@ -61,8 +61,8 @@ Gitter is only for small questions. To discuss a subject in detail, please send ## Join the development -- Before you join development, please [set up the project](./_SETUP.md) on your local machine, run it and go through the application completely. Use any command you can find and see what it does. Explore. +- Before you join development, please [set up the project](./_SETUP.md) on your local machine, run it and go through the application completely. Use any command you can find and see what it does. Explore. - > Don't worry ... Nothing will happen to the project or to you due to the exploring. Only thing that will happen is, you'll be more familiar with what is where and might even get some cool ideas on how to improve various aspects of the project. + > Don't worry ... Nothing will happen to the project or to you due to the exploring. Only thing that will happen is, you'll be more familiar with what is where and might even get some cool ideas on how to improve various aspects of the project. -- If you would like to work on an issue, drop in a comment at the issue. If it is already assigned to someone, but there is no sign of any work being done, please feel free to drop in a comment so that the issue can be assigned to you if the previous assignee has dropped it entirely. +- If you would like to work on an issue, drop in a comment at the issue. If it is already assigned to someone, but there is no sign of any work being done, please feel free to drop in a comment so that the issue can be assigned to you if the previous assignee has dropped it entirely. diff --git a/README.md b/README.md index 3359bf7a0..f37dedd2b 100644 --- a/README.md +++ b/README.md @@ -83,11 +83,11 @@ or packaging just about any resource or asset. **TL;DR** -* Bundles [ES Modules](https://www.2ality.com/2014/09/es6-modules-final.html), [CommonJS](http://wiki.commonjs.org/), and [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) modules (even combined). -* Can create a single bundle or multiple chunks that are asynchronously loaded at runtime (to reduce initial loading time). -* Dependencies are resolved during compilation, reducing the runtime size. -* Loaders can preprocess files while compiling, e.g. TypeScript to JavaScript, Handlebars strings to compiled functions, images to Base64, etc. -* Highly modular plugin system to do whatever else your application requires. +- Bundles [ES Modules](https://www.2ality.com/2014/09/es6-modules-final.html), [CommonJS](http://wiki.commonjs.org/), and [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) modules (even combined). +- Can create a single bundle or multiple chunks that are asynchronously loaded at runtime (to reduce initial loading time). +- Dependencies are resolved during compilation, reducing the runtime size. +- Loaders can preprocess files while compiling, e.g. TypeScript to JavaScript, Handlebars strings to compiled functions, images to Base64, etc. +- Highly modular plugin system to do whatever else your application requires. ### Get Started @@ -107,13 +107,13 @@ interface](https://webpack.js.org/plugins/). Most of the features within webpack itself use this plugin interface. This makes webpack very **flexible**. -|Name|Status|Install Size|Description| -|:--:|:----:|:----------:|:----------| -|[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| -|[extract-text-webpack-plugin][extract]|![extract-npm]|![extract-size]|Extract text from a bundle, or bundles, into a separate file| +| Name | Status | Install Size | Description | +| :---------------------------------------: | :----------------: | :-----------------: | :-------------------------------------------------------------------------------------- | +| [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 | +| [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-contrib/extract-text-webpack-plugin @@ -146,13 +146,12 @@ or are automatically applied via regex from your webpack configuration. #### Files -|Name|Status|Install Size|Description| -|:--:|:----:|:----------:|:----------| -|[raw-loader][raw]|![raw-npm]|![raw-size]|Loads raw content of a file (utf-8)| -|[val-loader][val]|![val-npm]|![val-size]|Executes code as module and considers exports as JS code| -|[url-loader][url]|![url-npm]|![url-size]|Works like the file loader, but can return a Data Url if the file is smaller than a limit| -|[file-loader][file]|![file-npm]|![file-size]|Emits the file into the output folder and returns the (relative) url| - +| Name | Status | Install Size | Description | +| :-----------------: | :---------: | :----------: | :---------------------------------------------------------------------------------------- | +| [raw-loader][raw] | ![raw-npm] | ![raw-size] | Loads raw content of a file (utf-8) | +| [val-loader][val] | ![val-npm] | ![val-size] | Executes code as module and considers exports as JS code | +| [url-loader][url] | ![url-npm] | ![url-size] | Works like the file loader, but can return a Data Url if the file is smaller than a limit | +| [file-loader][file] | ![file-npm] | ![file-size] | Emits the file into the output folder and returns the (relative) url | [raw]: https://github.com/webpack-contrib/raw-loader [raw-npm]: https://img.shields.io/npm/v/raw-loader.svg @@ -169,12 +168,11 @@ or are automatically applied via regex from your webpack configuration. #### JSON -|Name|Status|Install Size|Description| -|:--:|:----:|:----------:|:----------| -||![json-npm]|![json-size]|Loads a JSON file (included by default)| -||![json5-npm]|![json5-size]|Loads and transpiles a JSON 5 file| -||![cson-npm]|![cson-size]|Loads and transpiles a CSON file| - +| Name | Status | Install Size | Description | +| :----------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------: | :-----------: | :-------------------------------------- | +| | ![json-npm] | ![json-size] | Loads a JSON file (included by default) | +| | ![json5-npm] | ![json5-size] | Loads and transpiles a JSON 5 file | +| | ![cson-npm] | ![cson-size] | Loads and transpiles a CSON file | [json-npm]: https://img.shields.io/npm/v/json-loader.svg [json-size]: https://packagephobia.now.sh/badge?p=json-loader @@ -185,15 +183,14 @@ or are automatically applied via regex from your webpack configuration. #### Transpiling -|Name|Status|Install Size|Description| -|:--:|:----:|:----------:|:----------| -|`