webpack 5.39.0 → 5.41.1

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.

Potentially problematic release.


This version of webpack might be problematic. Click here for more details.

Files changed (51) hide show
  1. package/README.md +13 -13
  2. package/bin/webpack.js +0 -0
  3. package/lib/Compilation.js +43 -28
  4. package/lib/ConditionalInitFragment.js +15 -12
  5. package/lib/DependencyTemplate.js +3 -2
  6. package/lib/ExternalModule.js +210 -35
  7. package/lib/ExternalModuleFactoryPlugin.js +2 -1
  8. package/lib/InitFragment.js +10 -7
  9. package/lib/MainTemplate.js +1 -1
  10. package/lib/ModuleTemplate.js +0 -9
  11. package/lib/RuntimeTemplate.js +8 -0
  12. package/lib/Template.js +3 -2
  13. package/lib/TemplatedPathPlugin.js +24 -26
  14. package/lib/Watching.js +2 -1
  15. package/lib/WebpackOptionsApply.js +10 -7
  16. package/lib/async-modules/AwaitDependenciesInitFragment.js +4 -1
  17. package/lib/cache/IdleFileCachePlugin.js +60 -13
  18. package/lib/cache/PackFileCacheStrategy.js +4 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/config/defaults.js +53 -12
  21. package/lib/config/normalization.js +1 -0
  22. package/lib/dependencies/HarmonyExportInitFragment.js +4 -1
  23. package/lib/dependencies/WorkerPlugin.js +25 -10
  24. package/lib/electron/ElectronTargetPlugin.js +3 -3
  25. package/lib/esm/ModuleChunkFormatPlugin.js +97 -0
  26. package/lib/esm/ModuleChunkLoadingPlugin.js +63 -0
  27. package/lib/esm/ModuleChunkLoadingRuntimeModule.js +208 -0
  28. package/lib/hmr/lazyCompilationBackend.js +17 -1
  29. package/lib/javascript/EnableChunkLoadingPlugin.js +5 -3
  30. package/lib/javascript/JavascriptModulesPlugin.js +80 -17
  31. package/lib/javascript/JavascriptParser.js +12 -4
  32. package/lib/node/NodeTargetPlugin.js +2 -1
  33. package/lib/node/ReadFileCompileAsyncWasmPlugin.js +44 -22
  34. package/lib/optimize/InnerGraphPlugin.js +33 -2
  35. package/lib/optimize/ModuleConcatenationPlugin.js +1 -1
  36. package/lib/runtime/AsyncModuleRuntimeModule.js +8 -4
  37. package/lib/serialization/BinaryMiddleware.js +24 -14
  38. package/lib/serialization/FileMiddleware.js +30 -6
  39. package/lib/serialization/PlainObjectSerializer.js +17 -8
  40. package/lib/serialization/Serializer.js +2 -2
  41. package/lib/serialization/SerializerMiddleware.js +26 -4
  42. package/lib/util/ArrayQueue.js +8 -0
  43. package/lib/util/AsyncQueue.js +9 -0
  44. package/lib/util/LazySet.js +26 -17
  45. package/lib/wasm/EnableWasmLoadingPlugin.js +10 -1
  46. package/lib/wasm-sync/WasmChunkLoadingRuntimeModule.js +2 -2
  47. package/lib/wasm-sync/WebAssemblyModulesPlugin.js +1 -1
  48. package/package.json +17 -17
  49. package/schemas/WebpackOptions.check.js +1 -1
  50. package/schemas/WebpackOptions.json +16 -7
  51. package/types.d.ts +107 -158
@@ -165,12 +165,23 @@ class BinaryMiddleware extends SerializerMiddleware {
165
165
  };
166
166
  const flush = () => {
167
167
  if (currentBuffer !== null) {
168
- buffers.push(currentBuffer.slice(0, currentPosition));
168
+ buffers.push(
169
+ Buffer.from(
170
+ currentBuffer.buffer,
171
+ currentBuffer.byteOffset,
172
+ currentPosition
173
+ )
174
+ );
169
175
  if (
170
176
  !leftOverBuffer ||
171
177
  leftOverBuffer.length < currentBuffer.length - currentPosition
172
- )
173
- leftOverBuffer = currentBuffer.slice(currentPosition);
178
+ ) {
179
+ leftOverBuffer = Buffer.from(
180
+ currentBuffer.buffer,
181
+ currentBuffer.byteOffset + currentPosition,
182
+ currentBuffer.byteLength - currentPosition
183
+ );
184
+ }
174
185
  currentBuffer = null;
175
186
  buffersTotalLength += currentPosition;
176
187
  currentPosition = 0;
@@ -554,10 +565,8 @@ class BinaryMiddleware extends SerializerMiddleware {
554
565
  if (rem < n) {
555
566
  return Buffer.concat([read(rem), read(n - rem)]);
556
567
  }
557
- const res = /** @type {Buffer} */ (currentBuffer).slice(
558
- currentPosition,
559
- currentPosition + n
560
- );
568
+ const b = /** @type {Buffer} */ (currentBuffer);
569
+ const res = Buffer.from(b.buffer, b.byteOffset + currentPosition, n);
561
570
  currentPosition += n;
562
571
  checkOverflow();
563
572
  return res;
@@ -579,10 +588,8 @@ class BinaryMiddleware extends SerializerMiddleware {
579
588
  if (rem < n) {
580
589
  n = rem;
581
590
  }
582
- const res = /** @type {Buffer} */ (currentBuffer).slice(
583
- currentPosition,
584
- currentPosition + n
585
- );
591
+ const b = /** @type {Buffer} */ (currentBuffer);
592
+ const res = Buffer.from(b.buffer, b.byteOffset + currentPosition, n);
586
593
  currentPosition += n;
587
594
  checkOverflow();
588
595
  return res;
@@ -735,7 +742,7 @@ class BinaryMiddleware extends SerializerMiddleware {
735
742
  case STRING_HEADER:
736
743
  return () => {
737
744
  const len = readU32();
738
- if (isInCurrentBuffer(len)) {
745
+ if (isInCurrentBuffer(len) && currentPosition + len < 0x7fffffff) {
739
746
  result.push(
740
747
  currentBuffer.toString(
741
748
  undefined,
@@ -753,7 +760,7 @@ class BinaryMiddleware extends SerializerMiddleware {
753
760
  return () => result.push("");
754
761
  case SHORT_STRING_HEADER | 1:
755
762
  return () => {
756
- if (currentIsBuffer) {
763
+ if (currentIsBuffer && currentPosition < 0x7ffffffe) {
757
764
  result.push(
758
765
  currentBuffer.toString(
759
766
  "latin1",
@@ -785,7 +792,10 @@ class BinaryMiddleware extends SerializerMiddleware {
785
792
  } else if ((header & SHORT_STRING_HEADER) === SHORT_STRING_HEADER) {
786
793
  const len = header & SHORT_STRING_LENGTH_MASK;
787
794
  return () => {
788
- if (isInCurrentBuffer(len)) {
795
+ if (
796
+ isInCurrentBuffer(len) &&
797
+ currentPosition + len < 0x7fffffff
798
+ ) {
789
799
  result.push(
790
800
  currentBuffer.toString(
791
801
  "latin1",
@@ -280,8 +280,16 @@ const deserialize = async (middleware, name, readFile) => {
280
280
  }
281
281
  const sectionCount = readUInt32LE();
282
282
  const lengths = [];
283
+ let lastLengthPositive = false;
283
284
  for (let i = 0; i < sectionCount; i++) {
284
- lengths.push(readInt32LE());
285
+ const value = readInt32LE();
286
+ const valuePositive = value >= 0;
287
+ if (lastLengthPositive && valuePositive) {
288
+ lengths[lengths.length - 1] += value;
289
+ } else {
290
+ lengths.push(value);
291
+ lastLengthPositive = valuePositive;
292
+ }
285
293
  }
286
294
  const result = [];
287
295
  for (let length of lengths) {
@@ -307,13 +315,24 @@ const deserialize = async (middleware, name, readFile) => {
307
315
  } else if (contentPosition !== 0) {
308
316
  if (length <= contentItemLength - contentPosition) {
309
317
  result.push(
310
- contentItem.slice(contentPosition, contentPosition + length)
318
+ Buffer.from(
319
+ contentItem.buffer,
320
+ contentItem.byteOffset + contentPosition,
321
+ length
322
+ )
311
323
  );
312
324
  contentPosition += length;
313
325
  length = 0;
314
326
  } else {
315
- result.push(contentItem.slice(contentPosition));
316
- length -= contentItemLength - contentPosition;
327
+ const l = contentItemLength - contentPosition;
328
+ result.push(
329
+ Buffer.from(
330
+ contentItem.buffer,
331
+ contentItem.byteOffset + contentPosition,
332
+ l
333
+ )
334
+ );
335
+ length -= l;
317
336
  contentPosition = contentItemLength;
318
337
  }
319
338
  } else {
@@ -322,7 +341,9 @@ const deserialize = async (middleware, name, readFile) => {
322
341
  length -= contentItemLength;
323
342
  contentPosition = contentItemLength;
324
343
  } else {
325
- result.push(contentItem.slice(0, length));
344
+ result.push(
345
+ Buffer.from(contentItem.buffer, contentItem.byteOffset, length)
346
+ );
326
347
  contentPosition += length;
327
348
  length = 0;
328
349
  }
@@ -334,7 +355,9 @@ const deserialize = async (middleware, name, readFile) => {
334
355
  length -= contentItemLength;
335
356
  contentPosition = contentItemLength;
336
357
  } else {
337
- result.push(contentItem.slice(0, length));
358
+ result.push(
359
+ Buffer.from(contentItem.buffer, contentItem.byteOffset, length)
360
+ );
338
361
  contentPosition += length;
339
362
  length = 0;
340
363
  }
@@ -462,6 +485,7 @@ class FileMiddleware extends SerializerMiddleware {
462
485
  let readBuffer = currentBuffer;
463
486
  let readOffset = currentBufferUsed;
464
487
  let readLength = currentBuffer.length - currentBufferUsed;
488
+ // values passed to fs.read must be valid int32 values
465
489
  if (readOffset > 0x7fffffff) {
466
490
  readBuffer = currentBuffer.slice(readOffset);
467
491
  readOffset = 0;
@@ -7,19 +7,21 @@
7
7
  const cache = new WeakMap();
8
8
 
9
9
  class ObjectStructure {
10
- constructor(keys) {
11
- this.keys = keys;
12
- this.children = new Map();
10
+ constructor() {
11
+ this.keys = undefined;
12
+ this.children = undefined;
13
13
  }
14
14
 
15
- getKeys() {
15
+ getKeys(keys) {
16
+ if (this.keys === undefined) this.keys = keys;
16
17
  return this.keys;
17
18
  }
18
19
 
19
20
  key(key) {
21
+ if (this.children === undefined) this.children = new Map();
20
22
  const child = this.children.get(key);
21
23
  if (child !== undefined) return child;
22
- const newChild = new ObjectStructure(this.keys.concat(key));
24
+ const newChild = new ObjectStructure();
23
25
  this.children.set(key, newChild);
24
26
  return newChild;
25
27
  }
@@ -28,20 +30,27 @@ class ObjectStructure {
28
30
  const getCachedKeys = (keys, cacheAssoc) => {
29
31
  let root = cache.get(cacheAssoc);
30
32
  if (root === undefined) {
31
- root = new ObjectStructure([]);
33
+ root = new ObjectStructure();
32
34
  cache.set(cacheAssoc, root);
33
35
  }
34
36
  let current = root;
35
37
  for (const key of keys) {
36
38
  current = current.key(key);
37
39
  }
38
- return current.getKeys();
40
+ return current.getKeys(keys);
39
41
  };
40
42
 
41
43
  class PlainObjectSerializer {
42
44
  serialize(obj, { write }) {
43
45
  const keys = Object.keys(obj);
44
- if (keys.length > 1) {
46
+ if (keys.length > 128) {
47
+ // Objects with so many keys are unlikely to share structure
48
+ // with other objects
49
+ write(keys);
50
+ for (const key of keys) {
51
+ write(obj[key]);
52
+ }
53
+ } else if (keys.length > 1) {
45
54
  write(getCachedKeys(keys, write));
46
55
  for (const key of keys) {
47
56
  write(obj[key]);
@@ -15,7 +15,7 @@ class Serializer {
15
15
  const ctx = { ...context, ...this.context };
16
16
  let current = obj;
17
17
  for (const middleware of this.serializeMiddlewares) {
18
- if (current instanceof Promise) {
18
+ if (current && typeof current.then === "function") {
19
19
  current = current.then(
20
20
  data => data && middleware.serialize(data, context)
21
21
  );
@@ -35,7 +35,7 @@ class Serializer {
35
35
  /** @type {any} */
36
36
  let current = value;
37
37
  for (const middleware of this.deserializeMiddlewares) {
38
- if (current instanceof Promise) {
38
+ if (current && typeof current.then === "function") {
39
39
  current = current.then(data => middleware.deserialize(data, context));
40
40
  } else {
41
41
  current = middleware.deserialize(current, ctx);
@@ -100,9 +100,10 @@ class SerializerMiddleware {
100
100
  static serializeLazy(lazy, serialize) {
101
101
  const fn = memoize(() => {
102
102
  const r = lazy();
103
- if (r instanceof Promise) return r.then(data => data && serialize(data));
104
- if (r) return serialize(r);
105
- return null;
103
+ if (r && typeof r.then === "function") {
104
+ return r.then(data => data && serialize(data));
105
+ }
106
+ return serialize(r);
106
107
  });
107
108
  fn[LAZY_TARGET] = lazy[LAZY_TARGET];
108
109
  /** @type {any} */ (fn).options = /** @type {any} */ (lazy).options;
@@ -118,7 +119,9 @@ class SerializerMiddleware {
118
119
  static deserializeLazy(lazy, deserialize) {
119
120
  const fn = memoize(() => {
120
121
  const r = lazy();
121
- if (r instanceof Promise) return r.then(data => deserialize(data));
122
+ if (r && typeof r.then === "function") {
123
+ return r.then(data => deserialize(data));
124
+ }
122
125
  return deserialize(r);
123
126
  });
124
127
  fn[LAZY_TARGET] = lazy[LAZY_TARGET];
@@ -126,6 +129,25 @@ class SerializerMiddleware {
126
129
  fn[LAZY_SERIALIZED_VALUE] = lazy;
127
130
  return fn;
128
131
  }
132
+
133
+ /**
134
+ * @param {function(): Promise<any> | any} lazy lazy function
135
+ * @returns {function(): Promise<any> | any} new lazy
136
+ */
137
+ static unMemoizeLazy(lazy) {
138
+ if (!SerializerMiddleware.isLazy(lazy)) return lazy;
139
+ const fn = () => {
140
+ throw new Error(
141
+ "A lazy value that has been unmemorized can't be called again"
142
+ );
143
+ };
144
+ fn[LAZY_SERIALIZED_VALUE] = SerializerMiddleware.unMemoizeLazy(
145
+ lazy[LAZY_SERIALIZED_VALUE]
146
+ );
147
+ fn[LAZY_TARGET] = lazy[LAZY_TARGET];
148
+ fn.options = /** @type {any} */ (lazy).options;
149
+ return fn;
150
+ }
129
151
  }
130
152
 
131
153
  module.exports = SerializerMiddleware;
@@ -27,6 +27,14 @@ class ArrayQueue {
27
27
  return this._list.length + this._listReversed.length;
28
28
  }
29
29
 
30
+ /**
31
+ * Empties the queue.
32
+ */
33
+ clear() {
34
+ this._list.length = 0;
35
+ this._listReversed.length = 0;
36
+ }
37
+
30
38
  /**
31
39
  * Appends the specified element to this queue.
32
40
  * @param {T} item The element to add.
@@ -359,6 +359,15 @@ class AsyncQueue {
359
359
  inHandleResult--;
360
360
  });
361
361
  }
362
+
363
+ clear() {
364
+ this._entries.clear();
365
+ this._queued.clear();
366
+ this._activeTasks = 0;
367
+ this._willEnsureProcessing = false;
368
+ this._needProcessing = false;
369
+ this._stopped = false;
370
+ }
362
371
  }
363
372
 
364
373
  module.exports = AsyncQueue;
@@ -24,21 +24,17 @@ const merge = (targetSet, toMerge) => {
24
24
  /**
25
25
  * @template T
26
26
  * @param {Set<Iterable<T>>} targetSet set where iterables should be added
27
- * @param {Array<Iterable<T> | LazySet<T>>} toDeepMerge iterables or lazy set to be flattened
27
+ * @param {Array<LazySet<T>>} toDeepMerge lazy sets to be flattened
28
28
  * @returns {void}
29
29
  */
30
30
  const flatten = (targetSet, toDeepMerge) => {
31
31
  for (const set of toDeepMerge) {
32
- if (set instanceof LazySet) {
33
- if (set._set.size > 0) targetSet.add(set._set);
34
- if (set._needMerge) {
35
- for (const mergedSet of set._toMerge) {
36
- targetSet.add(mergedSet);
37
- }
38
- flatten(targetSet, set._toDeepMerge);
32
+ if (set._set.size > 0) targetSet.add(set._set);
33
+ if (set._needMerge) {
34
+ for (const mergedSet of set._toMerge) {
35
+ targetSet.add(mergedSet);
39
36
  }
40
- } else {
41
- targetSet.add(set);
37
+ flatten(targetSet, set._toDeepMerge);
42
38
  }
43
39
  }
44
40
  };
@@ -58,7 +54,7 @@ class LazySet {
58
54
  this._set = new Set(iterable);
59
55
  /** @type {Set<Iterable<T>>} */
60
56
  this._toMerge = new Set();
61
- /** @type {Array<Iterable<T> | LazySet<T>>} */
57
+ /** @type {Array<LazySet<T>>} */
62
58
  this._toDeepMerge = [];
63
59
  this._needMerge = false;
64
60
  this._deopt = false;
@@ -76,6 +72,14 @@ class LazySet {
76
72
  this._needMerge = false;
77
73
  }
78
74
 
75
+ _isEmpty() {
76
+ return (
77
+ this._set.size === 0 &&
78
+ this._toMerge.size === 0 &&
79
+ this._toDeepMerge.length === 0
80
+ );
81
+ }
82
+
79
83
  get size() {
80
84
  if (this._needMerge) this._merge();
81
85
  return this._set.size;
@@ -101,13 +105,18 @@ class LazySet {
101
105
  _set.add(item);
102
106
  }
103
107
  } else {
104
- this._toDeepMerge.push(iterable);
105
- this._needMerge = true;
106
- // Avoid being too memory hungry
107
- if (this._toDeepMerge.length > 100000) {
108
- this._flatten();
109
- if (this._toMerge.size > 100000) this._merge();
108
+ if (iterable instanceof LazySet) {
109
+ if (iterable._isEmpty()) return this;
110
+ this._toDeepMerge.push(iterable);
111
+ this._needMerge = true;
112
+ if (this._toDeepMerge.length > 100000) {
113
+ this._flatten();
114
+ }
115
+ } else {
116
+ this._toMerge.add(iterable);
117
+ this._needMerge = true;
110
118
  }
119
+ if (this._toMerge.size > 100000) this._merge();
111
120
  }
112
121
  return this;
113
122
  }
@@ -84,11 +84,20 @@ class EnableWasmLoadingPlugin {
84
84
  case "async-node": {
85
85
  // TODO webpack 6 remove ReadFileCompileWasmPlugin
86
86
  const ReadFileCompileWasmPlugin = require("../node/ReadFileCompileWasmPlugin");
87
+ // @ts-expect-error typescript bug for duplicate require
87
88
  const ReadFileCompileAsyncWasmPlugin = require("../node/ReadFileCompileAsyncWasmPlugin");
88
89
  new ReadFileCompileWasmPlugin({
89
90
  mangleImports: compiler.options.optimization.mangleWasmImports
90
91
  }).apply(compiler);
91
- new ReadFileCompileAsyncWasmPlugin().apply(compiler);
92
+ new ReadFileCompileAsyncWasmPlugin({ type }).apply(compiler);
93
+ break;
94
+ }
95
+ case "async-node-module": {
96
+ // @ts-expect-error typescript bug for duplicate require
97
+ const ReadFileCompileAsyncWasmPlugin = require("../node/ReadFileCompileAsyncWasmPlugin");
98
+ new ReadFileCompileAsyncWasmPlugin({ type, import: true }).apply(
99
+ compiler
100
+ );
92
101
  break;
93
102
  }
94
103
  case "universal":
@@ -291,7 +291,7 @@ class WasmChunkLoadingRuntimeModule extends RuntimeModule {
291
291
  "var promise;",
292
292
  this.supportsStreaming
293
293
  ? Template.asString([
294
- "if(importObject instanceof Promise && typeof WebAssembly.compileStreaming === 'function') {",
294
+ "if(importObject && typeof importObject.then === 'function' && typeof WebAssembly.compileStreaming === 'function') {",
295
295
  Template.indent([
296
296
  "promise = Promise.all([WebAssembly.compileStreaming(req), importObject]).then(function(items) {",
297
297
  Template.indent([
@@ -309,7 +309,7 @@ class WasmChunkLoadingRuntimeModule extends RuntimeModule {
309
309
  ])
310
310
  ])
311
311
  : Template.asString([
312
- "if(importObject instanceof Promise) {",
312
+ "if(importObject && typeof importObject.then === 'function') {",
313
313
  Template.indent([
314
314
  "var bytesPromise = req.then(function(x) { return x.arrayBuffer(); });",
315
315
  "promise = Promise.all([",
@@ -16,7 +16,7 @@ const WebAssemblyInInitialChunkError = require("./WebAssemblyInInitialChunkError
16
16
  /** @typedef {import("../Compiler")} Compiler */
17
17
  /** @typedef {import("../Module")} Module */
18
18
  /** @typedef {import("../ModuleTemplate")} ModuleTemplate */
19
- /** @typedef {import("../ModuleTemplate").RenderContext} RenderContext */
19
+ /** @typedef {import("../javascript/JavascriptModulesPlugin").RenderContext} RenderContext */
20
20
 
21
21
  const getWebAssemblyGenerator = memoize(() =>
22
22
  require("./WebAssemblyGenerator")
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "webpack",
3
- "version": "5.39.0",
3
+ "version": "5.41.1",
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",
7
7
  "dependencies": {
8
8
  "@types/eslint-scope": "^3.7.0",
9
- "@types/estree": "^0.0.47",
9
+ "@types/estree": "^0.0.48",
10
10
  "@webassemblyjs/ast": "1.11.0",
11
11
  "@webassemblyjs/wasm-edit": "1.11.0",
12
12
  "@webassemblyjs/wasm-parser": "1.11.0",
@@ -14,7 +14,7 @@
14
14
  "browserslist": "^4.14.5",
15
15
  "chrome-trace-event": "^1.0.2",
16
16
  "enhanced-resolve": "^5.8.0",
17
- "es-module-lexer": "^0.4.0",
17
+ "es-module-lexer": "^0.6.0",
18
18
  "eslint-scope": "5.1.1",
19
19
  "events": "^3.2.0",
20
20
  "glob-to-regexp": "^0.4.1",
@@ -25,7 +25,7 @@
25
25
  "neo-async": "^2.6.2",
26
26
  "schema-utils": "^3.0.0",
27
27
  "tapable": "^2.1.1",
28
- "terser-webpack-plugin": "^5.1.1",
28
+ "terser-webpack-plugin": "^5.1.3",
29
29
  "watchpack": "^2.2.0",
30
30
  "webpack-sources": "^2.3.0"
31
31
  },
@@ -37,7 +37,7 @@
37
37
  "devDependencies": {
38
38
  "@babel/core": "^7.11.1",
39
39
  "@babel/preset-react": "^7.10.4",
40
- "@types/es-module-lexer": "^0.3.0",
40
+ "@types/es-module-lexer": "^0.4.1",
41
41
  "@types/jest": "^26.0.15",
42
42
  "@types/node": "^15.0.1",
43
43
  "babel-loader": "^8.1.0",
@@ -64,7 +64,7 @@
64
64
  "is-ci": "^3.0.0",
65
65
  "istanbul": "^0.4.5",
66
66
  "jest": "^26.6.3",
67
- "jest-diff": "^26.6.2",
67
+ "jest-diff": "^27.0.2",
68
68
  "jest-junit": "^12.0.0",
69
69
  "json-loader": "^0.5.7",
70
70
  "json5": "^2.1.3",
@@ -80,7 +80,7 @@
80
80
  "nyc": "^15.1.0",
81
81
  "open-cli": "^6.0.1",
82
82
  "prettier": "^2.2.0",
83
- "pretty-format": "^26.3.0",
83
+ "pretty-format": "^27.0.2",
84
84
  "pug": "^3.0.0",
85
85
  "pug-loader": "^2.4.0",
86
86
  "raw-loader": "^4.0.1",
@@ -91,7 +91,7 @@
91
91
  "simple-git": "^2.17.0",
92
92
  "strip-ansi": "^6.0.0",
93
93
  "style-loader": "^2.0.0",
94
- "terser": "^5.5.0",
94
+ "terser": "^5.7.0",
95
95
  "toml": "^3.0.0",
96
96
  "tooling": "webpack/tooling#v1.19.0",
97
97
  "ts-loader": "^8.0.2",
@@ -131,11 +131,11 @@
131
131
  ],
132
132
  "scripts": {
133
133
  "setup": "node ./setup/setup.js",
134
- "test": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest",
134
+ "test": "node --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest",
135
135
  "test:update-snapshots": "yarn jest -u",
136
- "test:integration": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.test.js\"",
137
- "test:basic": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/te{st/TestCasesNormal,st/StatsTestCases,st/ConfigTestCases}.test.js\"",
138
- "test:unit": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.unittest.js\"",
136
+ "test:integration": "node --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.test.js\"",
137
+ "test:basic": "node --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/te{st/TestCasesNormal,st/StatsTestCases,st/ConfigTestCases}.test.js\"",
138
+ "test:unit": "node --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.unittest.js\"",
139
139
  "travis:integration": "yarn cover:integration --ci $JEST",
140
140
  "travis:basic": "yarn cover:basic --ci $JEST",
141
141
  "travis:lintunit": "yarn lint && yarn cover:unit --ci $JEST",
@@ -162,13 +162,13 @@
162
162
  "pretty-lint": "yarn pretty-lint-base --check",
163
163
  "yarn-lint": "yarn-deduplicate --fail --list -s highest yarn.lock",
164
164
  "yarn-lint-fix": "yarn-deduplicate -s highest yarn.lock",
165
- "benchmark": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.benchmark.js\" --runInBand",
165
+ "benchmark": "node --max-old-space-size=4096 --experimental-vm-modules --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.benchmark.js\" --runInBand",
166
166
  "cover": "yarn cover:all && yarn cover:report",
167
167
  "cover:clean": "rimraf .nyc_output coverage",
168
- "cover:all": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --coverage",
169
- "cover:basic": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/te{st/TestCasesNormal,st/StatsTestCases,st/ConfigTestCases}.test.js\" --coverage",
170
- "cover:integration": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.test.js\" --coverage",
171
- "cover:unit": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.unittest.js\" --coverage",
168
+ "cover:all": "node --max-old-space-size=4096 --experimental-vm-modules node_modules/jest-cli/bin/jest --coverage",
169
+ "cover:basic": "node --max-old-space-size=4096 --experimental-vm-modules node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/te{st/TestCasesNormal,st/StatsTestCases,st/ConfigTestCases}.test.js\" --coverage",
170
+ "cover:integration": "node --max-old-space-size=4096 --experimental-vm-modules node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.test.js\" --coverage",
171
+ "cover:unit": "node --max-old-space-size=4096 --experimental-vm-modules node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.unittest.js\" --coverage",
172
172
  "cover:types": "node node_modules/tooling/type-coverage",
173
173
  "cover:merge": "nyc merge .nyc_output coverage/coverage-nyc.json && rimraf .nyc_output",
174
174
  "cover:report": "nyc report -t coverage"