Skip to content

Commit fcf8e8e

Browse files
authored
fix: update schema to have negatedDescription only for type boolean (#4280)
1 parent 007104e commit fcf8e8e

File tree

4 files changed

+253
-232
lines changed

4 files changed

+253
-232
lines changed

bin/cli-flags.js

-3
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,6 @@ module.exports = {
166166
multiple: false,
167167
description:
168168
"Tells dev-server the number of times it should try to reconnect the client.",
169-
negatedDescription:
170-
"Tells dev-server to not to try to reconnect the client.",
171169
path: "client.reconnect",
172170
},
173171
],
@@ -384,7 +382,6 @@ module.exports = {
384382
values: ["only"],
385383
multiple: false,
386384
description: "Enables Hot Module Replacement.",
387-
negatedDescription: "Disables Hot Module Replacement.",
388385
path: "hot",
389386
},
390387
],

lib/options.json

+23-23
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@
2828
"Bonjour": {
2929
"anyOf": [
3030
{
31-
"type": "boolean"
31+
"type": "boolean",
32+
"cli": {
33+
"negatedDescription": "Disallows to broadcasts dev server via ZeroConf networking on start."
34+
}
3235
},
3336
{
3437
"type": "object",
@@ -37,10 +40,7 @@
3740
}
3841
],
3942
"description": "Allows to broadcasts dev server via ZeroConf networking on start.",
40-
"link": " https://webpack.js.org/configuration/dev-server/#devserverbonjour",
41-
"cli": {
42-
"negatedDescription": "Disallows to broadcasts dev server via ZeroConf networking on start."
43-
}
43+
"link": " https://webpack.js.org/configuration/dev-server/#devserverbonjour"
4444
},
4545
"Client": {
4646
"description": "Allows to specify options for client script in the browser or disable client script.",
@@ -122,16 +122,16 @@
122122
"link": "https://webpack.js.org/configuration/dev-server/#reconnect",
123123
"anyOf": [
124124
{
125-
"type": "boolean"
125+
"type": "boolean",
126+
"cli": {
127+
"negatedDescription": "Tells dev-server to not to try to reconnect the client."
128+
}
126129
},
127130
{
128131
"type": "number",
129132
"minimum": 0
130133
}
131-
],
132-
"cli": {
133-
"negatedDescription": "Tells dev-server to not to try to reconnect the client."
134-
}
134+
]
135135
},
136136
"ClientWebSocketTransport": {
137137
"anyOf": [
@@ -481,17 +481,17 @@
481481
"Hot": {
482482
"anyOf": [
483483
{
484-
"type": "boolean"
484+
"type": "boolean",
485+
"cli": {
486+
"negatedDescription": "Disables Hot Module Replacement."
487+
}
485488
},
486489
{
487490
"enum": ["only"]
488491
}
489492
],
490493
"description": "Enables Hot Module Replacement.",
491-
"link": "https://webpack.js.org/configuration/dev-server/#devserverhot",
492-
"cli": {
493-
"negatedDescription": "Disables Hot Module Replacement."
494-
}
494+
"link": "https://webpack.js.org/configuration/dev-server/#devserverhot"
495495
},
496496
"IPC": {
497497
"anyOf": [
@@ -968,23 +968,26 @@
968968
"serveIndex": {
969969
"anyOf": [
970970
{
971-
"type": "boolean"
971+
"type": "boolean",
972+
"cli": {
973+
"negatedDescription": "Does not tell dev server to use serveIndex middleware."
974+
}
972975
},
973976
{
974977
"type": "object",
975978
"additionalProperties": true
976979
}
977980
],
978981
"description": "Tells dev server to use serveIndex middleware when enabled.",
979-
"cli": {
980-
"negatedDescription": "Does not tell dev server to use serveIndex middleware."
981-
},
982982
"link": "https://webpack.js.org/configuration/dev-server/#serveindex"
983983
},
984984
"watch": {
985985
"anyOf": [
986986
{
987-
"type": "boolean"
987+
"type": "boolean",
988+
"cli": {
989+
"negatedDescription": "Does not watch for files in static content directory."
990+
}
988991
},
989992
{
990993
"type": "object",
@@ -993,9 +996,6 @@
993996
}
994997
],
995998
"description": "Watches for files in static content directory.",
996-
"cli": {
997-
"negatedDescription": "Does not watch for files in static content directory."
998-
},
999999
"link": "https://webpack.js.org/configuration/dev-server/#watch"
10001000
}
10011001
}

types/bin/cli-flags.d.ts

+15-8
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,21 @@ declare const _exports: {
114114
multiple: boolean;
115115
};
116116
"client-reconnect": {
117-
configs: {
118-
type: string;
119-
multiple: boolean;
120-
description: string;
121-
negatedDescription: string;
122-
path: string;
123-
}[];
117+
configs: (
118+
| {
119+
type: string;
120+
multiple: boolean;
121+
description: string;
122+
negatedDescription: string;
123+
path: string;
124+
}
125+
| {
126+
type: string;
127+
multiple: boolean;
128+
description: string;
129+
path: string;
130+
}
131+
)[];
124132
description: string;
125133
simpleType: string;
126134
multiple: boolean;
@@ -289,7 +297,6 @@ declare const _exports: {
289297
values: string[];
290298
multiple: boolean;
291299
description: string;
292-
negatedDescription: string;
293300
path: string;
294301
}
295302
)[];

0 commit comments

Comments
 (0)