Skip to content

Commit c64bd94

Browse files
authored
fix: update negated descriptions for more options (#4287)
* fix: update negated descriptions for `client.overlay` options * docs: udpate * fix: add more negative decriptions
1 parent fcf8e8e commit c64bd94

File tree

7 files changed

+364
-266
lines changed

7 files changed

+364
-266
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ Options:
105105
--no-client Disables client script.
106106
--client-logging <value> Allows to set log level in the browser.
107107
--client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings.
108-
--no-client-overlay Disables a full-screen overlay in the browser when there are compiler errors or warnings.
108+
--no-client-overlay Disables the full-screen overlay in the browser when there are compiler errors or warnings.
109109
--client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors.
110-
--no-client-overlay-errors Negative 'client-overlay-errors' option.
110+
--no-client-overlay-errors Disables the full-screen overlay in the browser when there are compiler errors.
111111
--client-overlay-warnings Enables a full-screen overlay in the browser when there are compiler warnings.
112-
--no-client-overlay-warnings Negative 'client-overlay-warnings' option.
112+
--no-client-overlay-warnings Disables the full-screen overlay in the browser when there are compiler warnings.
113113
--client-progress Prints compilation progress in percentage in the browser.
114114
--no-client-progress Does not print compilation progress in percentage in the browser.
115115
--client-reconnect [value] Tells dev-server the number of times it should try to reconnect the client.

bin/cli-flags.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ module.exports = {
9595
description:
9696
"Enables a full-screen overlay in the browser when there are compiler errors or warnings.",
9797
negatedDescription:
98-
"Disables a full-screen overlay in the browser when there are compiler errors or warnings.",
98+
"Disables the full-screen overlay in the browser when there are compiler errors or warnings.",
9999
path: "client.overlay",
100100
},
101101
],
@@ -111,6 +111,8 @@ module.exports = {
111111
multiple: false,
112112
description:
113113
"Enables a full-screen overlay in the browser when there are compiler errors.",
114+
negatedDescription:
115+
"Disables the full-screen overlay in the browser when there are compiler errors.",
114116
path: "client.overlay.errors",
115117
},
116118
],
@@ -126,6 +128,8 @@ module.exports = {
126128
multiple: false,
127129
description:
128130
"Enables a full-screen overlay in the browser when there are compiler warnings.",
131+
negatedDescription:
132+
"Disables the full-screen overlay in the browser when there are compiler warnings.",
129133
path: "client.overlay.warnings",
130134
},
131135
],
@@ -1026,6 +1030,7 @@ module.exports = {
10261030
configs: [
10271031
{
10281032
description: "Request for an SSL certificate.",
1033+
negatedDescription: "Does not request for an SSL certificate.",
10291034
multiple: false,
10301035
path: "server.options.requestCert",
10311036
type: "boolean",
@@ -1063,6 +1068,8 @@ module.exports = {
10631068
multiple: false,
10641069
description:
10651070
"Allows to configure options for serving static files from directory (by default 'public' directory).",
1071+
negatedDescription:
1072+
"Disallows to configure options for serving static files from directory.",
10661073
path: "static",
10671074
},
10681075
],
@@ -1202,6 +1209,7 @@ module.exports = {
12021209
{
12031210
description:
12041211
"Deprecated: please use '--web-socket-server-type' option.",
1212+
negatedDescription: "Disallows to set web socket server and options.",
12051213
multiple: false,
12061214
path: "webSocketServer",
12071215
type: "enum",

lib/options.json

+21-6
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"link": "https://webpack.js.org/configuration/dev-server/#overlay",
9191
"type": "boolean",
9292
"cli": {
93-
"negatedDescription": "Disables a full-screen overlay in the browser when there are compiler errors or warnings."
93+
"negatedDescription": "Disables the full-screen overlay in the browser when there are compiler errors or warnings."
9494
}
9595
},
9696
{
@@ -99,11 +99,17 @@
9999
"properties": {
100100
"errors": {
101101
"description": "Enables a full-screen overlay in the browser when there are compiler errors.",
102-
"type": "boolean"
102+
"type": "boolean",
103+
"cli": {
104+
"negatedDescription": "Disables the full-screen overlay in the browser when there are compiler errors."
105+
}
103106
},
104107
"warnings": {
105108
"description": "Enables a full-screen overlay in the browser when there are compiler warnings.",
106-
"type": "boolean"
109+
"type": "boolean",
110+
"cli": {
111+
"negatedDescription": "Disables the full-screen overlay in the browser when there are compiler warnings."
112+
}
107113
}
108114
}
109115
}
@@ -737,7 +743,10 @@
737743
},
738744
"requestCert": {
739745
"type": "boolean",
740-
"description": "Request for an SSL certificate."
746+
"description": "Request for an SSL certificate.",
747+
"cli": {
748+
"negatedDescription": "Does not request for an SSL certificate."
749+
}
741750
},
742751
"ca": {
743752
"anyOf": [
@@ -922,7 +931,10 @@
922931
}
923932
},
924933
{
925-
"type": "boolean"
934+
"type": "boolean",
935+
"cli": {
936+
"negatedDescription": "Disallows to configure options for serving static files from directory."
937+
}
926938
},
927939
{
928940
"$ref": "#/definitions/StaticString"
@@ -1088,7 +1100,10 @@
10881100
"WebSocketServerEnum": {
10891101
"anyOf": [
10901102
{
1091-
"enum": [false]
1103+
"enum": [false],
1104+
"cli": {
1105+
"negatedDescription": "Disallows to set web socket server and options."
1106+
}
10921107
},
10931108
{
10941109
"$ref": "#/definitions/WebSocketServerType"

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ Options:
6161
--no-client Disables client script.
6262
--client-logging <value> Allows to set log level in the browser.
6363
--client-overlay Enables a full-screen overlay in the browser when there are compiler errors or warnings.
64-
--no-client-overlay Disables a full-screen overlay in the browser when there are compiler errors or warnings.
64+
--no-client-overlay Disables the full-screen overlay in the browser when there are compiler errors or warnings.
6565
--client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors.
66-
--no-client-overlay-errors Negative 'client-overlay-errors' option.
66+
--no-client-overlay-errors Disables the full-screen overlay in the browser when there are compiler errors.
6767
--client-overlay-warnings Enables a full-screen overlay in the browser when there are compiler warnings.
68-
--no-client-overlay-warnings Negative 'client-overlay-warnings' option.
68+
--no-client-overlay-warnings Disables the full-screen overlay in the browser when there are compiler warnings.
6969
--client-progress Prints compilation progress in percentage in the browser.
7070
--no-client-progress Does not print compilation progress in percentage in the browser.
7171
--client-reconnect [value] Tells dev-server the number of times it should try to reconnect the client.
@@ -132,10 +132,10 @@ Options:
132132
--server-options-pfx <value...> Path to an SSL pfx file or content of an SSL pfx file.
133133
--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.
134134
--server-options-request-cert Request for an SSL certificate.
135-
--no-server-options-request-cert Negative 'server-options-request-cert' option.
135+
--no-server-options-request-cert Does not request for an SSL certificate.
136136
--server-type <value> Allows to set server and options (by default 'http').
137137
--static [value...] Allows to configure options for serving static files from directory (by default 'public' directory).
138-
--no-static Negative 'static' option.
138+
--no-static Disallows to configure options for serving static files from directory.
139139
--static-directory <value...> Directory for static contents.
140140
--static-public-path <value...> The static files will be available in the browser under this public path.
141141
--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.
@@ -147,7 +147,7 @@ Options:
147147
--watch-files <value...> Allows to configure list of globs/directories/files to watch for file changes.
148148
--watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes.
149149
--web-socket-server <value> Deprecated: please use '--web-socket-server-type' option. Allows to set web socket server and options (by default 'ws').
150-
--no-web-socket-server Negative 'web-socket-server' option.
150+
--no-web-socket-server Disallows to set web socket server and options.
151151
--web-socket-server-type <value> Allows to set web socket server and options (by default 'ws').
152152

153153
Global options:

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

+6-6
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ Options:
6262
--no-client Disables client script.
6363
--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.
65-
--no-client-overlay Disables a full-screen overlay in the browser when there are compiler errors or warnings.
65+
--no-client-overlay Disables the full-screen overlay in the browser when there are compiler errors or warnings.
6666
--client-overlay-errors Enables a full-screen overlay in the browser when there are compiler errors.
67-
--no-client-overlay-errors Negative 'client-overlay-errors' option.
67+
--no-client-overlay-errors Disables the full-screen overlay in the browser when there are compiler errors.
6868
--client-overlay-warnings Enables a full-screen overlay in the browser when there are compiler warnings.
69-
--no-client-overlay-warnings Negative 'client-overlay-warnings' option.
69+
--no-client-overlay-warnings Disables the full-screen overlay in the browser when there are compiler warnings.
7070
--client-progress Prints compilation progress in percentage in the browser.
7171
--no-client-progress Does not print compilation progress in percentage in the browser.
7272
--client-reconnect [value] Tells dev-server the number of times it should try to reconnect the client.
@@ -122,7 +122,7 @@ Options:
122122
--server-type <value> Allows to set server and options (by default 'http').
123123
--server-options-passphrase <value> Passphrase for a pfx file.
124124
--server-options-request-cert Request for an SSL certificate.
125-
--no-server-options-request-cert Negative 'server-options-request-cert' option.
125+
--no-server-options-request-cert Does not request for an SSL certificate.
126126
--server-options-ca <value...> Path to an SSL CA certificate or content of an SSL CA certificate.
127127
--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.
128128
--server-options-cacert <value...> Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the \`server.options.ca\` option.
@@ -136,7 +136,7 @@ Options:
136136
--server-options-pfx <value...> Path to an SSL pfx file or content of an SSL pfx file.
137137
--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.
138138
--static [value...] Allows to configure options for serving static files from directory (by default 'public' directory).
139-
--no-static Negative 'static' option.
139+
--no-static Disallows to configure options for serving static files from directory.
140140
--static-directory <value...> Directory for static contents.
141141
--static-public-path <value...> The static files will be available in the browser under this public path.
142142
--static-serve-index Tells dev server to use serveIndex middleware when enabled.
@@ -148,7 +148,7 @@ Options:
148148
--watch-files <value...> Allows to configure list of globs/directories/files to watch for file changes.
149149
--watch-files-reset Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes.
150150
--web-socket-server <value> Deprecated: please use '--web-socket-server-type' option. Allows to set web socket server and options (by default 'ws').
151-
--no-web-socket-server Negative 'web-socket-server' option.
151+
--no-web-socket-server Disallows to set web socket server and options.
152152
--web-socket-server-type <value> Allows to set web socket server and options (by default 'ws').
153153

154154
Global options:

types/bin/cli-flags.d.ts

+19-6
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ declare const _exports: {
8484
type: string;
8585
multiple: boolean;
8686
description: string;
87+
negatedDescription: string;
8788
path: string;
8889
}[];
8990
description: string;
@@ -95,6 +96,7 @@ declare const _exports: {
9596
type: string;
9697
multiple: boolean;
9798
description: string;
99+
negatedDescription: string;
98100
path: string;
99101
}[];
100102
description: string;
@@ -779,6 +781,7 @@ declare const _exports: {
779781
"server-options-request-cert": {
780782
configs: {
781783
description: string;
784+
negatedDescription: string;
782785
multiple: boolean;
783786
path: string;
784787
type: string;
@@ -800,12 +803,21 @@ declare const _exports: {
800803
simpleType: string;
801804
};
802805
static: {
803-
configs: {
804-
type: string;
805-
multiple: boolean;
806-
description: string;
807-
path: string;
808-
}[];
806+
configs: (
807+
| {
808+
type: string;
809+
multiple: boolean;
810+
description: string;
811+
path: string;
812+
}
813+
| {
814+
type: string;
815+
multiple: boolean;
816+
description: string;
817+
negatedDescription: string;
818+
path: string;
819+
}
820+
)[];
809821
description: string;
810822
simpleType: string;
811823
multiple: boolean;
@@ -904,6 +916,7 @@ declare const _exports: {
904916
configs: (
905917
| {
906918
description: string;
919+
negatedDescription: string;
907920
multiple: boolean;
908921
path: string;
909922
type: string;

0 commit comments

Comments
 (0)