Skip to content

Commit

Permalink
fix: update negated descriptions for more options (#4287)
Browse files Browse the repository at this point in the history
* fix: update negated descriptions for `client.overlay` options

* docs: udpate

* fix: add more negative decriptions
  • Loading branch information
snitin315 committed Feb 17, 2022
1 parent fcf8e8e commit c64bd94
Show file tree
Hide file tree
Showing 7 changed files with 364 additions and 266 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -105,11 +105,11 @@ Options:
--no-client Disables client script.
--client-logging <value> Allows to set log level in the browser.
--client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings.
--no-client-overlay Disables a full-screen overlay in the browser when there are compiler errors or warnings.
--no-client-overlay Disables the full-screen overlay in the browser when there are compiler errors or warnings.
--client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors.
--no-client-overlay-errors Negative 'client-overlay-errors' option.
--no-client-overlay-errors Disables the full-screen overlay in the browser when there are compiler errors.
--client-overlay-warnings Enables a full-screen overlay in the browser when there are compiler warnings.
--no-client-overlay-warnings Negative 'client-overlay-warnings' option.
--no-client-overlay-warnings Disables the full-screen overlay in the browser when there are compiler warnings.
--client-progress Prints compilation progress in percentage in the browser.
--no-client-progress Does not print compilation progress in percentage in the browser.
--client-reconnect [value] Tells dev-server the number of times it should try to reconnect the client.
Expand Down
10 changes: 9 additions & 1 deletion bin/cli-flags.js
Expand Up @@ -95,7 +95,7 @@ module.exports = {
description:
"Enables a full-screen overlay in the browser when there are compiler errors or warnings.",
negatedDescription:
"Disables a full-screen overlay in the browser when there are compiler errors or warnings.",
"Disables the full-screen overlay in the browser when there are compiler errors or warnings.",
path: "client.overlay",
},
],
Expand All @@ -111,6 +111,8 @@ module.exports = {
multiple: false,
description:
"Enables a full-screen overlay in the browser when there are compiler errors.",
negatedDescription:
"Disables the full-screen overlay in the browser when there are compiler errors.",
path: "client.overlay.errors",
},
],
Expand All @@ -126,6 +128,8 @@ module.exports = {
multiple: false,
description:
"Enables a full-screen overlay in the browser when there are compiler warnings.",
negatedDescription:
"Disables the full-screen overlay in the browser when there are compiler warnings.",
path: "client.overlay.warnings",
},
],
Expand Down Expand Up @@ -1026,6 +1030,7 @@ module.exports = {
configs: [
{
description: "Request for an SSL certificate.",
negatedDescription: "Does not request for an SSL certificate.",
multiple: false,
path: "server.options.requestCert",
type: "boolean",
Expand Down Expand Up @@ -1063,6 +1068,8 @@ module.exports = {
multiple: false,
description:
"Allows to configure options for serving static files from directory (by default 'public' directory).",
negatedDescription:
"Disallows to configure options for serving static files from directory.",
path: "static",
},
],
Expand Down Expand Up @@ -1202,6 +1209,7 @@ module.exports = {
{
description:
"Deprecated: please use '--web-socket-server-type' option.",
negatedDescription: "Disallows to set web socket server and options.",
multiple: false,
path: "webSocketServer",
type: "enum",
Expand Down
27 changes: 21 additions & 6 deletions lib/options.json
Expand Up @@ -90,7 +90,7 @@
"link": "https://webpack.js.org/configuration/dev-server/#overlay",
"type": "boolean",
"cli": {
"negatedDescription": "Disables a full-screen overlay in the browser when there are compiler errors or warnings."
"negatedDescription": "Disables the full-screen overlay in the browser when there are compiler errors or warnings."
}
},
{
Expand All @@ -99,11 +99,17 @@
"properties": {
"errors": {
"description": "Enables a full-screen overlay in the browser when there are compiler errors.",
"type": "boolean"
"type": "boolean",
"cli": {
"negatedDescription": "Disables the full-screen overlay in the browser when there are compiler errors."
}
},
"warnings": {
"description": "Enables a full-screen overlay in the browser when there are compiler warnings.",
"type": "boolean"
"type": "boolean",
"cli": {
"negatedDescription": "Disables the full-screen overlay in the browser when there are compiler warnings."
}
}
}
}
Expand Down Expand Up @@ -737,7 +743,10 @@
},
"requestCert": {
"type": "boolean",
"description": "Request for an SSL certificate."
"description": "Request for an SSL certificate.",
"cli": {
"negatedDescription": "Does not request for an SSL certificate."
}
},
"ca": {
"anyOf": [
Expand Down Expand Up @@ -922,7 +931,10 @@
}
},
{
"type": "boolean"
"type": "boolean",
"cli": {
"negatedDescription": "Disallows to configure options for serving static files from directory."
}
},
{
"$ref": "#/definitions/StaticString"
Expand Down Expand Up @@ -1088,7 +1100,10 @@
"WebSocketServerEnum": {
"anyOf": [
{
"enum": [false]
"enum": [false],
"cli": {
"negatedDescription": "Disallows to set web socket server and options."
}
},
{
"$ref": "#/definitions/WebSocketServerType"
Expand Down
12 changes: 6 additions & 6 deletions test/cli/__snapshots__/basic.test.js.snap.webpack4
Expand Up @@ -61,11 +61,11 @@ Options:
--no-client Disables client script.
--client-logging <value> Allows to set log level in the browser.
--client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings.
--no-client-overlay Disables a full-screen overlay in the browser when there are compiler errors or warnings.
--no-client-overlay Disables the full-screen overlay in the browser when there are compiler errors or warnings.
--client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors.
--no-client-overlay-errors Negative 'client-overlay-errors' option.
--no-client-overlay-errors Disables the full-screen overlay in the browser when there are compiler errors.
--client-overlay-warnings Enables a full-screen overlay in the browser when there are compiler warnings.
--no-client-overlay-warnings Negative 'client-overlay-warnings' option.
--no-client-overlay-warnings Disables the full-screen overlay in the browser when there are compiler warnings.
--client-progress Prints compilation progress in percentage in the browser.
--no-client-progress Does not print compilation progress in percentage in the browser.
--client-reconnect [value] Tells dev-server the number of times it should try to reconnect the client.
Expand Down Expand Up @@ -132,10 +132,10 @@ Options:
--server-options-pfx <value...> Path to an SSL pfx file or content of an SSL pfx file.
--server-options-pfx-reset Clear all items provided in 'server.options.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file.
--server-options-request-cert Request for an SSL certificate.
--no-server-options-request-cert Negative 'server-options-request-cert' option.
--no-server-options-request-cert Does not request for an SSL certificate.
--server-type <value> Allows to set server and options (by default 'http').
--static [value...] Allows to configure options for serving static files from directory (by default 'public' directory).
--no-static Negative 'static' option.
--no-static Disallows to configure options for serving static files from directory.
--static-directory <value...> Directory for static contents.
--static-public-path <value...> The static files will be available in the browser under this public path.
--static-public-path-reset Clear all items provided in 'static.publicPath' configuration. The static files will be available in the browser under this public path.
Expand All @@ -147,7 +147,7 @@ Options:
--watch-files <value...> Allows to configure list of globs/directories/files to watch for file changes.
--watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes.
--web-socket-server <value> Deprecated: please use '--web-socket-server-type' option. Allows to set web socket server and options (by default 'ws').
--no-web-socket-server Negative 'web-socket-server' option.
--no-web-socket-server Disallows to set web socket server and options.
--web-socket-server-type <value> Allows to set web socket server and options (by default 'ws').

Global options:
Expand Down
12 changes: 6 additions & 6 deletions test/cli/__snapshots__/basic.test.js.snap.webpack5
Expand Up @@ -62,11 +62,11 @@ Options:
--no-client Disables client script.
--client-logging <value> Allows to set log level in the browser.
--client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings.
--no-client-overlay Disables a full-screen overlay in the browser when there are compiler errors or warnings.
--no-client-overlay Disables the full-screen overlay in the browser when there are compiler errors or warnings.
--client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors.
--no-client-overlay-errors Negative 'client-overlay-errors' option.
--no-client-overlay-errors Disables the full-screen overlay in the browser when there are compiler errors.
--client-overlay-warnings Enables a full-screen overlay in the browser when there are compiler warnings.
--no-client-overlay-warnings Negative 'client-overlay-warnings' option.
--no-client-overlay-warnings Disables the full-screen overlay in the browser when there are compiler warnings.
--client-progress Prints compilation progress in percentage in the browser.
--no-client-progress Does not print compilation progress in percentage in the browser.
--client-reconnect [value] Tells dev-server the number of times it should try to reconnect the client.
Expand Down Expand Up @@ -122,7 +122,7 @@ Options:
--server-type <value> Allows to set server and options (by default 'http').
--server-options-passphrase <value> Passphrase for a pfx file.
--server-options-request-cert Request for an SSL certificate.
--no-server-options-request-cert Negative 'server-options-request-cert' option.
--no-server-options-request-cert Does not request for an SSL certificate.
--server-options-ca <value...> Path to an SSL CA certificate or content of an SSL CA certificate.
--server-options-ca-reset Clear all items provided in 'server.options.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.
--server-options-cacert <value...> Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the \`server.options.ca\` option.
Expand All @@ -136,7 +136,7 @@ Options:
--server-options-pfx <value...> Path to an SSL pfx file or content of an SSL pfx file.
--server-options-pfx-reset Clear all items provided in 'server.options.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file.
--static [value...] Allows to configure options for serving static files from directory (by default 'public' directory).
--no-static Negative 'static' option.
--no-static Disallows to configure options for serving static files from directory.
--static-directory <value...> Directory for static contents.
--static-public-path <value...> The static files will be available in the browser under this public path.
--static-serve-index Tells dev server to use serveIndex middleware when enabled.
Expand All @@ -148,7 +148,7 @@ Options:
--watch-files <value...> Allows to configure list of globs/directories/files to watch for file changes.
--watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes.
--web-socket-server <value> Deprecated: please use '--web-socket-server-type' option. Allows to set web socket server and options (by default 'ws').
--no-web-socket-server Negative 'web-socket-server' option.
--no-web-socket-server Disallows to set web socket server and options.
--web-socket-server-type <value> Allows to set web socket server and options (by default 'ws').

Global options:
Expand Down
25 changes: 19 additions & 6 deletions types/bin/cli-flags.d.ts
Expand Up @@ -84,6 +84,7 @@ declare const _exports: {
type: string;
multiple: boolean;
description: string;
negatedDescription: string;
path: string;
}[];
description: string;
Expand All @@ -95,6 +96,7 @@ declare const _exports: {
type: string;
multiple: boolean;
description: string;
negatedDescription: string;
path: string;
}[];
description: string;
Expand Down Expand Up @@ -779,6 +781,7 @@ declare const _exports: {
"server-options-request-cert": {
configs: {
description: string;
negatedDescription: string;
multiple: boolean;
path: string;
type: string;
Expand All @@ -800,12 +803,21 @@ declare const _exports: {
simpleType: string;
};
static: {
configs: {
type: string;
multiple: boolean;
description: string;
path: string;
}[];
configs: (
| {
type: string;
multiple: boolean;
description: string;
path: string;
}
| {
type: string;
multiple: boolean;
description: string;
negatedDescription: string;
path: string;
}
)[];
description: string;
simpleType: string;
multiple: boolean;
Expand Down Expand Up @@ -904,6 +916,7 @@ declare const _exports: {
configs: (
| {
description: string;
negatedDescription: string;
multiple: boolean;
path: string;
type: string;
Expand Down

0 comments on commit c64bd94

Please sign in to comment.