Skip to content

Commit 19c77a0

Browse files
authored
fix: update descriptions of http2 and https option (#4009)
1 parent 17c390a commit 19c77a0

File tree

7 files changed

+27
-24
lines changed

7 files changed

+27
-24
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,10 @@ Options:
119119
--host <value> Allows to specify a hostname to use.
120120
--hot [value] Enables Hot Module Replacement.
121121
--no-hot Disables Hot Module Replacement.
122-
--http2 Allows to serve over HTTP/2 using SPDY.
122+
--http2 Allows to serve over HTTP/2 using SPDY. Deprecated, it will be removed in favor of the `server` option.
123123
--no-http2 Does not serve over HTTP/2 using SPDY.
124-
--https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
124+
--https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, it will be removed in favor
125+
of the `server` option.
125126
--no-https Disallows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
126127
--https-passphrase <value> Passphrase for a pfx file. Deprecated, it will be removed in favor of the `server.options.passphrase` option.
127128
--https-request-cert Request for an SSL certificate. Deprecated, it will be removed in favor of the `server.options.requestCert`

bin/cli-flags.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,11 +448,13 @@ module.exports = {
448448
{
449449
type: "boolean",
450450
multiple: false,
451-
description: "Allows to serve over HTTP/2 using SPDY.",
451+
description:
452+
"Allows to serve over HTTP/2 using SPDY. Deprecated, it will be removed in favor of the `server` option.",
452453
path: "http2",
453454
},
454455
],
455-
description: "Allows to serve over HTTP/2 using SPDY.",
456+
description:
457+
"Allows to serve over HTTP/2 using SPDY. Deprecated, it will be removed in favor of the `server` option.",
456458
negatedDescription: "Does not serve over HTTP/2 using SPDY.",
457459
simpleType: "boolean",
458460
multiple: false,
@@ -463,12 +465,12 @@ module.exports = {
463465
type: "boolean",
464466
multiple: false,
465467
description:
466-
"Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).",
468+
"Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, it will be removed in favor of the `server` option.",
467469
path: "https",
468470
},
469471
],
470472
description:
471-
"Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).",
473+
"Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, it will be removed in favor of the `server` option.",
472474
negatedDescription:
473475
"Disallows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).",
474476
simpleType: "boolean",

lib/options.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
},
208208
"HTTP2": {
209209
"type": "boolean",
210-
"description": "Allows to serve over HTTP/2 using SPDY.",
210+
"description": "Allows to serve over HTTP/2 using SPDY. Deprecated, it will be removed in favor of the `server` option.",
211211
"link": "https://webpack.js.org/configuration/dev-server/#devserverhttp2"
212212
},
213213
"HTTPS": {
@@ -382,7 +382,7 @@
382382
}
383383
}
384384
],
385-
"description": "Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).",
385+
"description": "Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, it will be removed in favor of the `server` option.",
386386
"link": "https://webpack.js.org/configuration/dev-server/#devserverhttps"
387387
},
388388
"HeaderObject": {

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,15 +346,15 @@ exports[`options validate should throw an error on the "hot" option with 'foo' v
346346
exports[`options validate should throw an error on the "http2" option with '' value 1`] = `
347347
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
348348
- options.http2 should be a boolean.
349-
-> Allows to serve over HTTP/2 using SPDY.
349+
-> Allows to serve over HTTP/2 using SPDY. Deprecated, it will be removed in favor of the \`server\` option.
350350
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttp2"
351351
`;
352352

353353
exports[`options validate should throw an error on the "https" option with '' value 1`] = `
354354
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
355355
- options.https should be one of these:
356356
boolean | object { passphrase?, requestCert?, ca?, cacert?, cert?, crl?, key?, pfx?, … }
357-
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
357+
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, it will be removed in favor of the \`server\` option.
358358
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps
359359
Details:
360360
* options.https should be a boolean.
@@ -366,7 +366,7 @@ exports[`options validate should throw an error on the "https" option with '{"ca
366366
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
367367
- options.https should be one of these:
368368
boolean | object { passphrase?, requestCert?, ca?, cacert?, cert?, crl?, key?, pfx?, … }
369-
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
369+
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, it will be removed in favor of the \`server\` option.
370370
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps
371371
Details:
372372
* options.https.cacert should be one of these:
@@ -383,7 +383,7 @@ exports[`options validate should throw an error on the "https" option with '{"ce
383383
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
384384
- options.https should be one of these:
385385
boolean | object { passphrase?, requestCert?, ca?, cacert?, cert?, crl?, key?, pfx?, … }
386-
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
386+
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, it will be removed in favor of the \`server\` option.
387387
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps
388388
Details:
389389
* options.https.cert should be one of these:
@@ -400,7 +400,7 @@ exports[`options validate should throw an error on the "https" option with '{"ke
400400
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
401401
- options.https should be one of these:
402402
boolean | object { passphrase?, requestCert?, ca?, cacert?, cert?, crl?, key?, pfx?, … }
403-
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
403+
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, it will be removed in favor of the \`server\` option.
404404
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps
405405
Details:
406406
* options.https.key should be one of these:
@@ -423,7 +423,7 @@ exports[`options validate should throw an error on the "https" option with '{"pf
423423
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
424424
- options.https should be one of these:
425425
boolean | object { passphrase?, requestCert?, ca?, cacert?, cert?, crl?, key?, pfx?, … }
426-
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
426+
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, it will be removed in favor of the \`server\` option.
427427
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps
428428
Details:
429429
* options.https.pfx should be one of these:

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -346,15 +346,15 @@ exports[`options validate should throw an error on the "hot" option with 'foo' v
346346
exports[`options validate should throw an error on the "http2" option with '' value 1`] = `
347347
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
348348
- options.http2 should be a boolean.
349-
-> Allows to serve over HTTP/2 using SPDY.
349+
-> Allows to serve over HTTP/2 using SPDY. Deprecated, it will be removed in favor of the \`server\` option.
350350
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttp2"
351351
`;
352352

353353
exports[`options validate should throw an error on the "https" option with '' value 1`] = `
354354
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
355355
- options.https should be one of these:
356356
boolean | object { passphrase?, requestCert?, ca?, cacert?, cert?, crl?, key?, pfx?, … }
357-
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
357+
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, it will be removed in favor of the \`server\` option.
358358
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps
359359
Details:
360360
* options.https should be a boolean.
@@ -366,7 +366,7 @@ exports[`options validate should throw an error on the "https" option with '{"ca
366366
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
367367
- options.https should be one of these:
368368
boolean | object { passphrase?, requestCert?, ca?, cacert?, cert?, crl?, key?, pfx?, … }
369-
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
369+
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, it will be removed in favor of the \`server\` option.
370370
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps
371371
Details:
372372
* options.https.cacert should be one of these:
@@ -383,7 +383,7 @@ exports[`options validate should throw an error on the "https" option with '{"ce
383383
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
384384
- options.https should be one of these:
385385
boolean | object { passphrase?, requestCert?, ca?, cacert?, cert?, crl?, key?, pfx?, … }
386-
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
386+
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, it will be removed in favor of the \`server\` option.
387387
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps
388388
Details:
389389
* options.https.cert should be one of these:
@@ -400,7 +400,7 @@ exports[`options validate should throw an error on the "https" option with '{"ke
400400
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
401401
- options.https should be one of these:
402402
boolean | object { passphrase?, requestCert?, ca?, cacert?, cert?, crl?, key?, pfx?, … }
403-
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
403+
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, it will be removed in favor of the \`server\` option.
404404
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps
405405
Details:
406406
* options.https.key should be one of these:
@@ -423,7 +423,7 @@ exports[`options validate should throw an error on the "https" option with '{"pf
423423
"ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
424424
- options.https should be one of these:
425425
boolean | object { passphrase?, requestCert?, ca?, cacert?, cert?, crl?, key?, pfx?, … }
426-
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
426+
-> Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, it will be removed in favor of the \`server\` option.
427427
-> Read more at https://webpack.js.org/configuration/dev-server/#devserverhttps
428428
Details:
429429
* options.https.pfx should be one of these:

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ Options:
8888
--host <value> Allows to specify a hostname to use.
8989
--hot [value] Enables Hot Module Replacement.
9090
--no-hot Disables Hot Module Replacement.
91-
--http2 Allows to serve over HTTP/2 using SPDY.
91+
--http2 Allows to serve over HTTP/2 using SPDY. Deprecated, it will be removed in favor of the \`server\` option.
9292
--no-http2 Does not serve over HTTP/2 using SPDY.
93-
--https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
93+
--https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, it will be removed in favor of the \`server\` option.
9494
--no-https Disallows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
9595
--https-passphrase <value> Passphrase for a pfx file. Deprecated, it will be removed in favor of the \`server.options.passphrase\` option.
9696
--https-request-cert Request for an SSL certificate. Deprecated, it will be removed in favor of the \`server.options.requestCert\` option.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ Options:
8686
--host <value> Allows to specify a hostname to use.
8787
--hot [value] Enables Hot Module Replacement.
8888
--no-hot Negative 'hot' option.
89-
--http2 Allows to serve over HTTP/2 using SPDY.
89+
--http2 Allows to serve over HTTP/2 using SPDY. Deprecated, it will be removed in favor of the \`server\` option.
9090
--no-http2 Negative 'http2' option.
91-
--https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).
91+
--https Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, it will be removed in favor of the \`server\` option.
9292
--no-https Negative 'https' option.
9393
--https-passphrase <value> Passphrase for a pfx file. Deprecated, it will be removed in favor of the \`server.options.passphrase\` option.
9494
--https-request-cert Request for an SSL certificate. Deprecated, it will be removed in favor of the \`server.options.requestCert\` option.

0 commit comments

Comments
 (0)