From 271b77d45f9c9d107f82b79df25a4fb673ddc411 Mon Sep 17 00:00:00 2001 From: ferhat elmas Date: Mon, 9 Jul 2018 22:48:12 +0200 Subject: [PATCH] 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 ebd501013..ce57ab775 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 00d976fbc..84ef71ada 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 7bbc7b0dd..b4633cf6d 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 f47598f63..b5ce749f6 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 7d9ad3a05..e7b27f527 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 19e8f3c67..d2b49501d 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 c1be909f1..8c2d43437 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 441f22872..5c93506d4 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 54081e544..5525c2c8a 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 ff7b4426a..124f647a3 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 75827b0c1..7c47b823d 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];