Skip to content

Commit d63a0a2

Browse files
authored
fix: update description for --no-history-api-fallback (#4277)
* fix: update description for `--no-history-api-fallback` * test: update snapshots
1 parent 984c5b6 commit d63a0a2

File tree

6 files changed

+26
-16
lines changed

6 files changed

+26
-16
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Options:
126126
--no-compress Disables gzip compression for everything served.
127127
--history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5
128128
History API.
129-
--no-history-api-fallback Negative 'history-api-fallback' option.
129+
--no-history-api-fallback Disallows to proxy requests through a specified index page.
130130
--host <value> Allows to specify a hostname to use.
131131
--hot [value] Enables Hot Module Replacement.
132132
--no-hot Disables Hot Module Replacement.

Diff for: bin/cli-flags.js

+2
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@ module.exports = {
340340
multiple: false,
341341
description:
342342
"Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API.",
343+
negatedDescription:
344+
"Disallows to proxy requests through a specified index page.",
343345
path: "historyApiFallback",
344346
},
345347
],

Diff for: lib/options.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,10 @@
451451
"HistoryApiFallback": {
452452
"anyOf": [
453453
{
454-
"type": "boolean"
454+
"type": "boolean",
455+
"cli": {
456+
"negatedDescription": "Disallows to proxy requests through a specified index page."
457+
}
455458
},
456459
{
457460
"type": "object",

Diff for: test/cli/__snapshots__/basic.test.js.snap.webpack4

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Options:
8181
--compress Enables gzip compression for everything served.
8282
--no-compress Disables gzip compression for everything served.
8383
--history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API.
84-
--no-history-api-fallback Negative 'history-api-fallback' option.
84+
--no-history-api-fallback Disallows to proxy requests through a specified index page.
8585
--host <value> Allows to specify a hostname to use.
8686
--hot [value] Enables Hot Module Replacement.
8787
--no-hot Disables Hot Module Replacement.

Diff for: test/cli/__snapshots__/basic.test.js.snap.webpack5

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Options:
8282
--compress Enables gzip compression for everything served.
8383
--no-compress Disables gzip compression for everything served.
8484
--history-api-fallback Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API.
85-
--no-history-api-fallback Negative 'history-api-fallback' option.
85+
--no-history-api-fallback Disallows to proxy requests through a specified index page.
8686
--host <value> Allows to specify a hostname to use.
8787
--hot [value] Enables Hot Module Replacement.
8888
--no-hot Disables Hot Module Replacement.

Diff for: types/lib/Server.d.ts

+17-12
Original file line numberDiff line numberDiff line change
@@ -2149,17 +2149,21 @@ declare class Server {
21492149
anyOf: (
21502150
| {
21512151
type: string;
2152+
cli: {
2153+
negatedDescription: string;
2154+
};
21522155
description?: undefined;
21532156
link?: undefined;
21542157
}
21552158
| {
21562159
type: string;
21572160
description: string;
21582161
link: string;
2162+
cli?: undefined;
21592163
}
21602164
)[];
21612165
description: string;
2162-
link: string /** @type {WebSocketURL} */;
2166+
link: string;
21632167
};
21642168
Host: {
21652169
description: string;
@@ -2181,7 +2185,7 @@ declare class Server {
21812185
anyOf: (
21822186
| {
21832187
type: string;
2184-
/** @type {string} */ enum?: undefined;
2188+
enum?: undefined;
21852189
}
21862190
| {
21872191
enum: string[];
@@ -2264,7 +2268,7 @@ declare class Server {
22642268
OpenBoolean: {
22652269
type: string;
22662270
cli: {
2267-
negatedDescription: string;
2271+
negatedDescription: string /** @type {ClientConfiguration} */;
22682272
};
22692273
};
22702274
OpenObject: {
@@ -2376,22 +2380,21 @@ declare class Server {
23762380
}
23772381
| {
23782382
type: string;
2383+
/** @type {any} */
23792384
items: {
23802385
anyOf: (
23812386
| {
23822387
type: string;
23832388
instanceof?: undefined;
23842389
}
23852390
| {
2386-
/** @type {any} */
23872391
instanceof: string;
23882392
type?: undefined;
23892393
}
23902394
)[];
23912395
};
23922396
}
23932397
)[];
2394-
/** @type {any} */
23952398
description: string;
23962399
link: string;
23972400
};
@@ -2405,6 +2408,7 @@ declare class Server {
24052408
ServerType: {
24062409
enum: string[];
24072410
};
2411+
/** @type {MultiCompiler} */
24082412
ServerEnum: {
24092413
enum: string[];
24102414
cli: {
@@ -2428,9 +2432,9 @@ declare class Server {
24282432
};
24292433
options: {
24302434
$ref: string;
2431-
} /** @type {MultiCompiler} */;
2435+
};
24322436
};
2433-
/** @type {MultiCompiler} */ additionalProperties: boolean;
2437+
additionalProperties: boolean;
24342438
};
24352439
ServerOptions: {
24362440
type: string;
@@ -2837,17 +2841,17 @@ declare class Server {
28372841
enum?: undefined;
28382842
}
28392843
)[];
2840-
/** @type {ServerOptions} */
28412844
cli: {
28422845
description: string;
2843-
};
2846+
} /** @type {ServerOptions} */;
28442847
};
2848+
/** @type {ServerOptions} */
28452849
WebSocketServerFunction: {
28462850
instanceof: string;
28472851
};
28482852
WebSocketServerObject: {
2849-
type: string;
28502853
/** @type {ServerOptions} */
2854+
type: string;
28512855
properties: {
28522856
type: {
28532857
anyOf: {
@@ -2878,8 +2882,9 @@ declare class Server {
28782882
$ref: string;
28792883
};
28802884
client: {
2881-
$ref: string;
2885+
$ref: string /** @type {ServerOptions} */;
28822886
};
2887+
/** @type {ServerOptions} */
28832888
compress: {
28842889
$ref: string;
28852890
};
@@ -2917,7 +2922,7 @@ declare class Server {
29172922
$ref: string;
29182923
};
29192924
onBeforeSetupMiddleware: {
2920-
$ref: string /** @type {any} */;
2925+
$ref: string;
29212926
};
29222927
onListening: {
29232928
$ref: string;

0 commit comments

Comments
 (0)