webpack 4.39.1 → 4.39.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -14,6 +14,7 @@
14
14
  [![builds2][builds2]][builds2-url]
15
15
  [![coverage][cover]][cover-url]
16
16
  [![licenses][licenses]][licenses-url]
17
+ [![PR's welcome][prs]][prs-url]
17
18
 
18
19
  <br>
19
20
  <a href="https://dependabot.com/compatibility-score.html?dependency-name=webpack&package-manager=npm_and_yarn&new-version=latest">
@@ -767,6 +768,9 @@ src="https://static.monei.net/monei-logo.svg" height="30" alt="MONEI"></a>
767
768
  [tests]: https://img.shields.io/travis/webpack/webpack/master.svg
768
769
  [tests-url]: https://travis-ci.org/webpack/webpack
769
770
 
771
+ [prs]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg
772
+ [prs-url]: https://webpack.js.org/contribute/
773
+
770
774
  [builds-url]: https://ci.appveyor.com/project/sokra/webpack/branch/master
771
775
  [builds]: https://ci.appveyor.com/api/projects/status/github/webpack/webpack?svg=true
772
776
 
@@ -81,7 +81,6 @@ class BannerPlugin {
81
81
  continue;
82
82
  }
83
83
 
84
- let basename;
85
84
  let query = "";
86
85
  let filename = file;
87
86
  const hash = compilation.hash;
@@ -94,11 +93,10 @@ class BannerPlugin {
94
93
 
95
94
  const lastSlashIndex = filename.lastIndexOf("/");
96
95
 
97
- if (lastSlashIndex === -1) {
98
- basename = filename;
99
- } else {
100
- basename = filename.substr(lastSlashIndex + 1);
101
- }
96
+ const basename =
97
+ lastSlashIndex === -1
98
+ ? filename
99
+ : filename.substr(lastSlashIndex + 1);
102
100
 
103
101
  const data = {
104
102
  hash,
package/lib/ChunkGroup.js CHANGED
@@ -70,12 +70,12 @@ class ChunkGroup {
70
70
  this.chunks = [];
71
71
  /** @type {OriginRecord[]} */
72
72
  this.origins = [];
73
- /** Indicies in top-down order */
73
+ /** Indices in top-down order */
74
74
  /** @private @type {Map<Module, number>} */
75
- this._moduleIndicies = new Map();
76
- /** Indicies in bottom-up order */
75
+ this._moduleIndices = new Map();
76
+ /** Indices in bottom-up order */
77
77
  /** @private @type {Map<Module, number>} */
78
- this._moduleIndicies2 = new Map();
78
+ this._moduleIndices2 = new Map();
79
79
  }
80
80
 
81
81
  /**
@@ -174,7 +174,7 @@ class ChunkGroup {
174
174
  /**
175
175
  * add a chunk into ChunkGroup. Is pushed on or prepended
176
176
  * @param {Chunk} chunk chunk being pushed into ChunkGroupS
177
- * @returns {boolean} returns true if chunk addition was ssuccesful.
177
+ * @returns {boolean} returns true if chunk addition was successful.
178
178
  */
179
179
  pushChunk(chunk) {
180
180
  const oldIdx = this.chunks.indexOf(chunk);
@@ -187,8 +187,8 @@ class ChunkGroup {
187
187
 
188
188
  /**
189
189
  * @param {Chunk} oldChunk chunk to be replaced
190
- * @param {Chunk} newChunk New chunkt that will be replaced
191
- * @returns {boolean} rerturns true for
190
+ * @param {Chunk} newChunk New chunk that will be replaced with
191
+ * @returns {boolean} returns true if the replacement was successful
192
192
  */
193
193
  replaceChunk(oldChunk, newChunk) {
194
194
  const oldIdx = this.chunks.indexOf(oldChunk);
@@ -369,7 +369,7 @@ class ChunkGroup {
369
369
 
370
370
  /**
371
371
  * we need to iterate again over the children
372
- * to remove this from the childs parents.
372
+ * to remove this from the child's parents.
373
373
  * This can not be done in the above loop
374
374
  * as it is not guaranteed that `this._parents` contains anything.
375
375
  */
@@ -460,7 +460,7 @@ class ChunkGroup {
460
460
  * @returns {void}
461
461
  */
462
462
  setModuleIndex(module, index) {
463
- this._moduleIndicies.set(module, index);
463
+ this._moduleIndices.set(module, index);
464
464
  }
465
465
 
466
466
  /**
@@ -469,7 +469,7 @@ class ChunkGroup {
469
469
  * @returns {number} index
470
470
  */
471
471
  getModuleIndex(module) {
472
- return this._moduleIndicies.get(module);
472
+ return this._moduleIndices.get(module);
473
473
  }
474
474
 
475
475
  /**
@@ -479,7 +479,7 @@ class ChunkGroup {
479
479
  * @returns {void}
480
480
  */
481
481
  setModuleIndex2(module, index) {
482
- this._moduleIndicies2.set(module, index);
482
+ this._moduleIndices2.set(module, index);
483
483
  }
484
484
 
485
485
  /**
@@ -488,7 +488,7 @@ class ChunkGroup {
488
488
  * @returns {number} index
489
489
  */
490
490
  getModuleIndex2(module) {
491
- return this._moduleIndicies2.get(module);
491
+ return this._moduleIndices2.get(module);
492
492
  }
493
493
 
494
494
  checkConstraints() {
package/lib/Entrypoint.js CHANGED
@@ -52,8 +52,8 @@ class Entrypoint extends ChunkGroup {
52
52
 
53
53
  /**
54
54
  * @param {Chunk} oldChunk chunk to be replaced
55
- * @param {Chunk} newChunk New chunkt that will be replaced
56
- * @returns {boolean} rerturns true for
55
+ * @param {Chunk} newChunk New chunk that will be replaced with
56
+ * @returns {boolean} returns true if the replacement was successful
57
57
  */
58
58
  replaceChunk(oldChunk, newChunk) {
59
59
  if (this.runtimeChunk === oldChunk) this.runtimeChunk = newChunk;
@@ -391,8 +391,8 @@ const makeNewProfiledTapFn = (hookName, tracer, { name, type, fn }) => {
391
391
  id,
392
392
  cat: defaultCategory
393
393
  });
394
+ const callback = args.pop();
394
395
  fn(...args, (...r) => {
395
- const callback = args.pop();
396
396
  tracer.trace.end({
397
397
  name,
398
398
  id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpack",
3
- "version": "4.39.1",
3
+ "version": "4.39.2",
4
4
  "author": "Tobias Koppers @sokra",
5
5
  "description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",
6
6
  "license": "MIT",