Skip to content

Commit bbdc681

Browse files
committed
Update snapshots
1 parent 5ea5ef7 commit bbdc681

File tree

3 files changed

+38
-21
lines changed

3 files changed

+38
-21
lines changed

test/Defaults.unittest.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ describe("Defaults", () => {
351351
"wasmLoading": "fetch",
352352
"webassemblyModuleFilename": "[hash].module.wasm",
353353
"workerChunkLoading": "import-scripts",
354+
"workerCrossOriginLoading": false,
354355
"workerWasmLoading": "fetch",
355356
},
356357
"parallelism": 100,
@@ -1084,8 +1085,9 @@ describe("Defaults", () => {
10841085
+ "wasmLoading": "async-node",
10851086
@@ ... @@
10861087
- "workerChunkLoading": "import-scripts",
1087-
- "workerWasmLoading": "fetch",
10881088
+ "workerChunkLoading": "require",
1089+
@@ ... @@
1090+
- "workerWasmLoading": "fetch",
10891091
+ "workerWasmLoading": "async-node",
10901092
@@ ... @@
10911093
- "aliasFields": Array [
@@ -1225,8 +1227,9 @@ describe("Defaults", () => {
12251227
+ "wasmLoading": "async-node",
12261228
@@ ... @@
12271229
- "workerChunkLoading": "import-scripts",
1228-
- "workerWasmLoading": "fetch",
12291230
+ "workerChunkLoading": "require",
1231+
@@ ... @@
1232+
- "workerWasmLoading": "fetch",
12301233
+ "workerWasmLoading": "async-node",
12311234
@@ ... @@
12321235
- "aliasFields": Array [
@@ -1348,8 +1351,9 @@ describe("Defaults", () => {
13481351
+ "wasmLoading": "async-node",
13491352
@@ ... @@
13501353
- "workerChunkLoading": "import-scripts",
1351-
- "workerWasmLoading": "fetch",
13521354
+ "workerChunkLoading": "require",
1355+
@@ ... @@
1356+
- "workerWasmLoading": "fetch",
13531357
+ "workerWasmLoading": "async-node",
13541358
@@ ... @@
13551359
- "aliasFields": Array [

test/Validation.test.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -453,18 +453,18 @@ describe("Validation", () => {
453453
},
454454
msg =>
455455
expect(msg).toMatchInlineSnapshot(`
456-
"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
457-
- configuration.optimization.splitChunks.cacheGroups should not be object { test, … }.
458-
-> Using the cacheGroup shorthand syntax with a cache group named 'test' is a potential config error
459-
Did you intent to define a cache group with a test instead?
460-
cacheGroups: {
461-
<name>: {
462-
test: ...
463-
}
464-
}.
465-
object { <key>: false | RegExp | string | function | object { automaticNameDelimiter?, chunks?, enforce?, enforceSizeThreshold?, filename?, idHint?, layer?, maxAsyncRequests?, maxAsyncSize?, maxInitialRequests?, maxInitialSize?, maxSize?, minChunks?, minRemainingSize?, minSize?, minSizeReduction?, name?, priority?, reuseExistingChunk?, test?, type?, usedExports? } }
466-
-> Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks, default categories: 'default', 'defaultVendors')."
467-
`)
456+
"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
457+
- configuration.optimization.splitChunks.cacheGroups should not be object { test, … }.
458+
-> Using the cacheGroup shorthand syntax with a cache group named 'test' is a potential config error
459+
Did you intent to define a cache group with a test instead?
460+
cacheGroups: {
461+
<name>: {
462+
test: ...
463+
}
464+
}.
465+
object { <key>: false | RegExp | string | function | object { automaticNameDelimiter?, chunks?, enforce?, enforceSizeThreshold?, filename?, idHint?, layer?, maxAsyncRequests?, maxAsyncSize?, maxInitialRequests?, maxInitialSize?, maxSize?, minChunks?, minRemainingSize?, minSize?, minSizeReduction?, name?, priority?, reuseExistingChunk?, test?, type?, usedExports? } }
466+
-> Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks, default categories: 'default', 'defaultVendors')."
467+
`)
468468
);
469469

470470
createTestCase(
@@ -497,7 +497,7 @@ describe("Validation", () => {
497497
expect(msg).toMatchInlineSnapshot(`
498498
"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
499499
- configuration.output has an unknown property 'ecmaVersion'. These properties are valid:
500-
object { assetModuleFilename?, auxiliaryComment?, charset?, chunkFilename?, chunkFormat?, chunkLoadTimeout?, chunkLoading?, chunkLoadingGlobal?, clean?, compareBeforeEmit?, crossOriginLoading?, devtoolFallbackModuleFilenameTemplate?, devtoolModuleFilenameTemplate?, devtoolNamespace?, enabledChunkLoadingTypes?, enabledLibraryTypes?, enabledWasmLoadingTypes?, environment?, filename?, globalObject?, hashDigest?, hashDigestLength?, hashFunction?, hashSalt?, hotUpdateChunkFilename?, hotUpdateGlobal?, hotUpdateMainFilename?, iife?, importFunctionName?, importMetaName?, library?, libraryExport?, libraryTarget?, module?, path?, pathinfo?, publicPath?, scriptType?, sourceMapFilename?, sourcePrefix?, strictModuleErrorHandling?, strictModuleExceptionHandling?, trustedTypes?, umdNamedDefine?, uniqueName?, wasmLoading?, webassemblyModuleFilename?, workerChunkLoading?, workerWasmLoading? }
500+
object { assetModuleFilename?, auxiliaryComment?, charset?, chunkFilename?, chunkFormat?, chunkLoadTimeout?, chunkLoading?, chunkLoadingGlobal?, clean?, compareBeforeEmit?, crossOriginLoading?, devtoolFallbackModuleFilenameTemplate?, devtoolModuleFilenameTemplate?, devtoolNamespace?, enabledChunkLoadingTypes?, enabledLibraryTypes?, enabledWasmLoadingTypes?, environment?, filename?, globalObject?, hashDigest?, hashDigestLength?, hashFunction?, hashSalt?, hotUpdateChunkFilename?, hotUpdateGlobal?, hotUpdateMainFilename?, iife?, importFunctionName?, importMetaName?, library?, libraryExport?, libraryTarget?, module?, path?, pathinfo?, publicPath?, scriptType?, sourceMapFilename?, sourcePrefix?, strictModuleErrorHandling?, strictModuleExceptionHandling?, trustedTypes?, umdNamedDefine?, uniqueName?, wasmLoading?, webassemblyModuleFilename?, workerChunkLoading?, workerCrossOriginLoading?, workerWasmLoading? }
501501
-> Options affecting the output of the compilation. \`output\` options tell webpack how to write the compiled files to disk.
502502
Did you mean output.environment (output.ecmaVersion was a temporary configuration option during webpack 5 beta)?"
503503
`)
@@ -661,11 +661,11 @@ describe("Validation", () => {
661661
},
662662
msg =>
663663
expect(msg).toMatchInlineSnapshot(`
664-
"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
665-
- configuration.optimization.splitChunks has an unknown property 'automaticNamePrefix'. These properties are valid:
666-
object { automaticNameDelimiter?, cacheGroups?, chunks?, defaultSizeTypes?, enforceSizeThreshold?, fallbackCacheGroup?, filename?, hidePathInfo?, maxAsyncRequests?, maxAsyncSize?, maxInitialRequests?, maxInitialSize?, maxSize?, minChunks?, minRemainingSize?, minSize?, minSizeReduction?, name?, usedExports? }
667-
-> Options object for splitting chunks into smaller chunks."
668-
`)
664+
"Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema.
665+
- configuration.optimization.splitChunks has an unknown property 'automaticNamePrefix'. These properties are valid:
666+
object { automaticNameDelimiter?, cacheGroups?, chunks?, defaultSizeTypes?, enforceSizeThreshold?, fallbackCacheGroup?, filename?, hidePathInfo?, maxAsyncRequests?, maxAsyncSize?, maxInitialRequests?, maxInitialSize?, maxSize?, minChunks?, minRemainingSize?, minSize?, minSizeReduction?, name?, usedExports? }
667+
-> Options object for splitting chunks into smaller chunks."
668+
`)
669669
);
670670
});
671671
});

test/__snapshots__/Cli.basictest.js.snap

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6142,6 +6142,19 @@ Object {
61426142
"multiple": false,
61436143
"simpleType": "string",
61446144
},
6145+
"output-worker-cross-origin-loading": Object {
6146+
"configs": Array [
6147+
Object {
6148+
"description": "This option enables cross-origin loading of workers.",
6149+
"multiple": false,
6150+
"path": "output.workerCrossOriginLoading",
6151+
"type": "boolean",
6152+
},
6153+
],
6154+
"description": "This option enables cross-origin loading of workers.",
6155+
"multiple": false,
6156+
"simpleType": "boolean",
6157+
},
61456158
"output-worker-wasm-loading": Object {
61466159
"configs": Array [
61476160
Object {

0 commit comments

Comments
 (0)