Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
321 changes: 0 additions & 321 deletions bin/cli-flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,250 +425,6 @@ module.exports = {
simpleType: "string",
multiple: false,
},
http2: {
configs: [
{
type: "boolean",
multiple: false,
description:
"Allows to serve over HTTP/2 using SPDY. Deprecated, use the `server` option.",
negatedDescription: "Does not serve over HTTP/2 using SPDY.",
path: "http2",
},
],
description:
"Allows to serve over HTTP/2 using SPDY. Deprecated, use the `server` option.",
simpleType: "boolean",
multiple: false,
},
https: {
configs: [
{
type: "boolean",
multiple: false,
description:
"Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, use the `server` option.",
negatedDescription:
"Disallows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).",
path: "https",
},
],
description:
"Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, use the `server` option.",
simpleType: "boolean",
multiple: false,
},
"https-ca": {
configs: [
{
type: "string",
multiple: true,
description:
"Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
path: "https.ca[]",
},
],
description:
"Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
simpleType: "string",
multiple: true,
},
"https-ca-reset": {
configs: [
{
description:
"Clear all items provided in 'https.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
multiple: false,
path: "https.ca",
type: "reset",
},
],
description:
"Clear all items provided in 'https.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
multiple: false,
simpleType: "boolean",
},
"https-cacert": {
configs: [
{
type: "string",
multiple: true,
description:
"Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
path: "https.cacert[]",
},
],
description:
"Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
simpleType: "string",
multiple: true,
},
"https-cacert-reset": {
configs: [
{
description:
"Clear all items provided in 'https.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
multiple: false,
path: "https.cacert",
type: "reset",
},
],
description:
"Clear all items provided in 'https.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
multiple: false,
simpleType: "boolean",
},
"https-cert": {
configs: [
{
type: "string",
multiple: true,
description:
"Path to an SSL certificate or content of an SSL certificate. Deprecated, use the `server.options.cert` option.",
path: "https.cert[]",
},
],
description:
"Path to an SSL certificate or content of an SSL certificate. Deprecated, use the `server.options.cert` option.",
simpleType: "string",
multiple: true,
},
"https-cert-reset": {
configs: [
{
description:
"Clear all items provided in 'https.cert' configuration. Path to an SSL certificate or content of an SSL certificate. Deprecated, use the `server.options.cert` option.",
multiple: false,
path: "https.cert",
type: "reset",
},
],
description:
"Clear all items provided in 'https.cert' configuration. Path to an SSL certificate or content of an SSL certificate. Deprecated, use the `server.options.cert` option.",
multiple: false,
simpleType: "boolean",
},
"https-crl": {
configs: [
{
description:
"Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). Deprecated, use the `server.options.crl` option.",
multiple: true,
path: "https.crl[]",
type: "string",
},
],
description:
"Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). Deprecated, use the `server.options.crl` option.",
multiple: true,
simpleType: "string",
},
"https-crl-reset": {
configs: [
{
description:
"Clear all items provided in 'https.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). Deprecated, use the `server.options.crl` option.",
multiple: false,
path: "https.crl",
type: "reset",
},
],
description:
"Clear all items provided in 'https.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). Deprecated, use the `server.options.crl` option.",
multiple: false,
simpleType: "boolean",
},
"https-key": {
configs: [
{
type: "string",
multiple: true,
description:
"Path to an SSL key or content of an SSL key. Deprecated, use the `server.options.key` option.",
path: "https.key[]",
},
],
description:
"Path to an SSL key or content of an SSL key. Deprecated, use the `server.options.key` option.",
simpleType: "string",
multiple: true,
},
"https-key-reset": {
configs: [
{
description:
"Clear all items provided in 'https.key' configuration. Path to an SSL key or content of an SSL key. Deprecated, use the `server.options.key` option.",
multiple: false,
path: "https.key",
type: "reset",
},
],
description:
"Clear all items provided in 'https.key' configuration. Path to an SSL key or content of an SSL key. Deprecated, use the `server.options.key` option.",
multiple: false,
simpleType: "boolean",
},
"https-passphrase": {
configs: [
{
type: "string",
multiple: false,
description:
"Passphrase for a pfx file. Deprecated, use the `server.options.passphrase` option.",
path: "https.passphrase",
},
],
description:
"Passphrase for a pfx file. Deprecated, use the `server.options.passphrase` option.",
simpleType: "string",
multiple: false,
},
"https-pfx": {
configs: [
{
type: "string",
multiple: true,
description:
"Path to an SSL pfx file or content of an SSL pfx file. Deprecated, use the `server.options.pfx` option.",
path: "https.pfx[]",
},
],
description:
"Path to an SSL pfx file or content of an SSL pfx file. Deprecated, use the `server.options.pfx` option.",
simpleType: "string",
multiple: true,
},
"https-pfx-reset": {
configs: [
{
description:
"Clear all items provided in 'https.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file. Deprecated, use the `server.options.pfx` option.",
multiple: false,
path: "https.pfx",
type: "reset",
},
],
description:
"Clear all items provided in 'https.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file. Deprecated, use the `server.options.pfx` option.",
multiple: false,
simpleType: "boolean",
},
"https-request-cert": {
configs: [
{
type: "boolean",
multiple: false,
description:
"Request for an SSL certificate. Deprecated, use the `server.options.requestCert` option.",
negatedDescription: "Does not request for an SSL certificate.",
path: "https.requestCert",
},
],
description:
"Request for an SSL certificate. Deprecated, use the `server.options.requestCert` option.",
simpleType: "boolean",
multiple: false,
},
ipc: {
configs: [
{
Expand Down Expand Up @@ -746,21 +502,6 @@ module.exports = {
simpleType: "string",
multiple: true,
},
"open-app": {
configs: [
{
type: "string",
multiple: true,
description:
"Open specified browser. Deprecated: please use '--open-app-name'.",
path: "open[].app",
},
],
description:
"Open specified browser. Deprecated: please use '--open-app-name'.",
simpleType: "string",
multiple: true,
},
"open-app-name": {
configs: [
{
Expand Down Expand Up @@ -900,36 +641,6 @@ module.exports = {
multiple: false,
simpleType: "boolean",
},
"server-options-cacert": {
configs: [
{
description:
"Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
multiple: true,
path: "server.options.cacert[]",
type: "string",
},
],
description:
"Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
multiple: true,
simpleType: "string",
},
"server-options-cacert-reset": {
configs: [
{
description:
"Clear all items provided in 'server.options.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
multiple: false,
path: "server.options.cacert",
type: "reset",
},
],
description:
"Clear all items provided in 'server.options.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
multiple: false,
simpleType: "boolean",
},
"server-options-cert": {
configs: [
{
Expand Down Expand Up @@ -1236,38 +947,6 @@ module.exports = {
simpleType: "boolean",
multiple: false,
},
"web-socket-server": {
configs: [
{
description:
"Deprecated: please use '--web-socket-server-type' option.",
negatedDescription: "Disallows to set web socket server and options.",
multiple: false,
path: "webSocketServer",
type: "enum",
values: [false],
},
{
description:
"Deprecated: please use '--web-socket-server-type' option.",
multiple: false,
path: "webSocketServer",
type: "enum",
values: ["ws"],
},
{
description:
"Allows to set web socket server and options (by default 'ws').",
multiple: false,
path: "webSocketServer",
type: "string",
},
],
description:
"Deprecated: please use '--web-socket-server-type' option. Allows to set web socket server and options (by default 'ws').",
simpleType: "string",
multiple: false,
},
"web-socket-server-type": {
configs: [
{
Expand Down
21 changes: 21 additions & 0 deletions migration-v6.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,24 @@ This document serves as a migration guide for `webpack-dev-server@6.0.0`.
```js
const ip = Server.findIp("v4", true);
```

- The following CLI options were deprecated and have now been removed. Please use the recommended alternatives:
- http2 -> server
- https -> server
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will just server work? Maybe server-type? Just to ensure we don't make a typo here 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, do you provide here not CLI options, let's write CLI options here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just write webpack help serve --verbose and you will see all CLI options

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I was looking for a way to reproduce and see them

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexander-akait I’m not fully understanding this. At what point is the cli-flags.js file executed within webpack-cli?

I’m asking because many of these options were removed in webpack-dev-server v5 — for example in this commit: 1e86e37
And this is the commit that updated the README accordingly 5c4006a
So it feels like those options no longer exist starting from webpack-dev-server v5, and this file was simply never updated — or maybe I’m missing something?
In any case, even when running from main, those options still don’t show up in the CLI. From what I understand, the file that actually defines the CLI options is options.json, which would make cli-flags.js unnecessary.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not fully understanding this. At what point is the cli-flags.js file executed within webpack-cli?

Yes, webpack-cli reads this file and getting all CLI flag from this file. Looks like we forgot to remove them. To avoid such things let's add a test case in CLI with --help and --verbose so we will have all CLI arguments in our tests

- https-ca -> server.options.ca
- https-ca-reset -> server.options.ca
- https-cacert -> server.options.ca
- https-cert -> server.options.cert
- https-cert-reset -> server.options.cert
- https-crl -> server.options.crl
- https-crl-reset -> server.options.crl
- https-key -> server.options.key
- https-key-reset -> server.options.key
- https-passphrase -> server.options.passphrase
- https-pfx -> server.options.pfx
- https-pfx-reset -> server.options.pfx
- https-request-cert -> server.options.requestCert
- open-app -> --open-app-name
- server-options-cacert -> server.options.ca
- server-options-cacert-reset -> server.options.ca
- web-socket-server -> web-socket-server-type
Loading