Skip to content

Commit 9b7ae7b

Browse files
authored
fix: correct schema for ClientLogging (#4084)
* fix: correct schema for `ClientLogging` * fix: ci
1 parent 79a169b commit 9b7ae7b

6 files changed

+9
-7
lines changed

bin/cli-flags.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,11 @@ module.exports = {
101101
type: "enum",
102102
values: ["none", "error", "warn", "info", "log", "verbose"],
103103
multiple: false,
104-
description:
105-
"Allows to specify options for client script in the browser or disable client script.",
104+
description: "Allows to set log level in the browser.",
106105
path: "client.logging",
107106
},
108107
],
109-
description:
110-
"Allows to specify options for client script in the browser or disable client script.",
108+
description: "Allows to set log level in the browser.",
111109
simpleType: "string",
112110
multiple: false,
113111
},

lib/options.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
},
7575
"ClientLogging": {
7676
"enum": ["none", "error", "warn", "info", "log", "verbose"],
77-
"decription": "Allows to set log level in the browser.",
77+
"description": "Allows to set log level in the browser.",
7878
"link": "https://webpack.js.org/configuration/dev-server/#logging"
7979
},
8080
"ClientOverlay": {

test/__snapshots__/validate-options.test.js.snap.webpack4

+2
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,15 @@ exports[`options validate should throw an error on the "client" option with '{"l
7070
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
7171
- options.client.logging should be one of these:
7272
\\"none\\" | \\"error\\" | \\"warn\\" | \\"info\\" | \\"log\\" | \\"verbose\\"
73+
-> Allows to set log level in the browser.
7374
-> Read more at https://webpack.js.org/configuration/dev-server/#logging"
7475
`;
7576

7677
exports[`options validate should throw an error on the "client" option with '{"logging":"whoops!"}' value 1`] = `
7778
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
7879
- options.client.logging should be one of these:
7980
\\"none\\" | \\"error\\" | \\"warn\\" | \\"info\\" | \\"log\\" | \\"verbose\\"
81+
-> Allows to set log level in the browser.
8082
-> Read more at https://webpack.js.org/configuration/dev-server/#logging"
8183
`;
8284

test/__snapshots__/validate-options.test.js.snap.webpack5

+2
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,15 @@ exports[`options validate should throw an error on the "client" option with '{"l
7070
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
7171
- options.client.logging should be one of these:
7272
\\"none\\" | \\"error\\" | \\"warn\\" | \\"info\\" | \\"log\\" | \\"verbose\\"
73+
-> Allows to set log level in the browser.
7374
-> Read more at https://webpack.js.org/configuration/dev-server/#logging"
7475
`;
7576

7677
exports[`options validate should throw an error on the "client" option with '{"logging":"whoops!"}' value 1`] = `
7778
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
7879
- options.client.logging should be one of these:
7980
\\"none\\" | \\"error\\" | \\"warn\\" | \\"info\\" | \\"log\\" | \\"verbose\\"
81+
-> Allows to set log level in the browser.
8082
-> Read more at https://webpack.js.org/configuration/dev-server/#logging"
8183
`;
8284

test/cli/__snapshots__/basic.test.js.snap.webpack4

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Options:
6060
--no-bonjour Disallows to broadcasts dev server via ZeroConf networking on start.
6161
--client-web-socket-transport <value> Allows to set custom web socket transport to communicate with dev server.
6262
--no-client Negative 'client' option.
63-
--client-logging <value> Allows to specify options for client script in the browser or disable client script.
63+
--client-logging <value> Allows to set log level in the browser.
6464
--client-progress Prints compilation progress in percentage in the browser.
6565
--no-client-progress Does not print compilation progress in percentage in the browser.
6666
--client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings.

test/cli/__snapshots__/basic.test.js.snap.webpack5

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Options:
6060
--bonjour Allows to broadcasts dev server via ZeroConf networking on start.
6161
--no-bonjour Negative 'bonjour' option.
6262
--no-client Negative 'client' option.
63-
--client-logging <value> Allows to specify options for client script in the browser or disable client script.
63+
--client-logging <value> Allows to set log level in the browser.
6464
--client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings.
6565
--no-client-overlay Negative 'client-overlay' option.
6666
--client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors.

0 commit comments

Comments
 (0)