Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use CLI specific description for --open-app-name and --web-socket-server #4215

Merged
merged 1 commit into from Jan 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions lib/options.json
Expand Up @@ -581,7 +581,10 @@
{
"type": "string",
"minLength": 1,
"description": "Open specified browser. Deprecated: please use '--open-app-name'."
"description": "Open specified browser.",
"cli": {
"description": "Open specified browser. Deprecated: please use '--open-app-name'."
}
}
],
"description": "Open specified browser."
Expand Down Expand Up @@ -1043,7 +1046,9 @@
"$ref": "#/definitions/WebSocketServerType"
}
],
"description": "Deprecated: please use '--web-socket-server-type' option."
"cli": {
"description": "Deprecated: please use '--web-socket-server-type' option."
}
},
"WebSocketServerFunction": {
"instanceof": "Function"
Expand Down
30 changes: 15 additions & 15 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -113,7 +113,7 @@
"tcp-port-used": "^1.0.2",
"typescript": "^4.2.4",
"url-loader": "^4.1.1",
"webpack": "^5.64.0",
"webpack": "^5.67.0",
"webpack-cli": "^4.7.2",
"webpack-merge": "^5.8.0"
},
Expand Down
4 changes: 1 addition & 3 deletions test/__snapshots__/validate-options.test.js.snap.webpack4
Expand Up @@ -521,7 +521,7 @@ exports[`options validate should throw an error on the "open" option with '{"app
* options.open.app should be an object:
object { name?, arguments? }
* options.open.app should be a non-empty string.
-> Open specified browser. Deprecated: please use '--open-app-name'."
-> Open specified browser."
`;

exports[`options validate should throw an error on the "open" option with '{"foo":"bar"}' value 1`] = `
Expand Down Expand Up @@ -929,7 +929,6 @@ exports[`options validate should throw an error on the "webSocketServer" option
Details:
* options.webSocketServer should be one of these:
false | \\"sockjs\\" | \\"ws\\"
-> Deprecated: please use '--web-socket-server-type' option.
Details:
* options.webSocketServer should be false.
* options.webSocketServer should be one of these:
Expand All @@ -949,7 +948,6 @@ exports[`options validate should throw an error on the "webSocketServer" option
Details:
* options.webSocketServer should be one of these:
false | \\"sockjs\\" | \\"ws\\"
-> Deprecated: please use '--web-socket-server-type' option.
Details:
* options.webSocketServer should be false.
* options.webSocketServer should be one of these:
Expand Down
4 changes: 1 addition & 3 deletions test/__snapshots__/validate-options.test.js.snap.webpack5
Expand Up @@ -521,7 +521,7 @@ exports[`options validate should throw an error on the "open" option with '{"app
* options.open.app should be an object:
object { name?, arguments? }
* options.open.app should be a non-empty string.
-> Open specified browser. Deprecated: please use '--open-app-name'."
-> Open specified browser."
`;

exports[`options validate should throw an error on the "open" option with '{"foo":"bar"}' value 1`] = `
Expand Down Expand Up @@ -929,7 +929,6 @@ exports[`options validate should throw an error on the "webSocketServer" option
Details:
* options.webSocketServer should be one of these:
false | \\"sockjs\\" | \\"ws\\"
-> Deprecated: please use '--web-socket-server-type' option.
Details:
* options.webSocketServer should be false.
* options.webSocketServer should be one of these:
Expand All @@ -949,7 +948,6 @@ exports[`options validate should throw an error on the "webSocketServer" option
Details:
* options.webSocketServer should be one of these:
false | \\"sockjs\\" | \\"ws\\"
-> Deprecated: please use '--web-socket-server-type' option.
snitin315 marked this conversation as resolved.
Show resolved Hide resolved
Details:
* options.webSocketServer should be false.
* options.webSocketServer should be one of these:
Expand Down
48 changes: 27 additions & 21 deletions types/lib/Server.d.ts
Expand Up @@ -978,6 +978,9 @@ declare class Server {
description: string;
multiple: boolean;
path: string;
/**
* @type {string | undefined}
*/
type: string;
}[];
description: string;
Expand Down Expand Up @@ -1011,7 +1014,7 @@ declare class Server {
type: string;
multiple: boolean;
description: string;
path: string;
path: string /** @type {ClientConfiguration} */;
}[];
description: string;
simpleType: string;
Expand All @@ -1032,7 +1035,7 @@ declare class Server {
configs: {
description: string;
multiple: boolean;
/** @type {string} */ path: string;
path: string;
type: string;
}[];
description: string;
Expand All @@ -1053,7 +1056,7 @@ declare class Server {
"https-key": {
configs: {
type: string;
multiple: boolean;
/** @type {number | string} */ multiple: boolean;
description: string;
path: string;
}[];
Expand Down Expand Up @@ -1142,8 +1145,9 @@ declare class Server {
type: string;
multiple: boolean;
description: string;
path: string /** @type {Object<string,string>} */;
path: string;
}[];
/** @type {Object<string,string>} */
description: string;
negatedDescription: string;
simpleType: string;
Expand All @@ -1152,24 +1156,19 @@ declare class Server {
"magic-html": {
configs: {
type: string;
/** @type {any} */
multiple: boolean;
description: string;
path: string;
}[];
description: string;
negatedDescription: string;
simpleType: string;
/** @type {string} */ multiple: boolean;
multiple: boolean /** @type {string} */;
};
open: {
configs: {
type: string;
multiple: boolean;
/**
* @private
* @returns {Compiler["options"]}
*/
description: string;
path: string;
}[];
Expand Down Expand Up @@ -1197,7 +1196,7 @@ declare class Server {
path: string;
}[];
description: string;
/** @type {Compiler} */ simpleType: string;
simpleType: string;
multiple: boolean;
};
"open-app-name-reset": {
Expand Down Expand Up @@ -1412,7 +1411,7 @@ declare class Server {
configs: {
description: string;
multiple: boolean;
path: string;
/** @type {ServerConfiguration} */ path: string;
type: string;
}[];
description: string;
Expand Down Expand Up @@ -2681,7 +2680,6 @@ declare class Server {
OpenBoolean: {
type: string;
};
/** @type {number | string} */
OpenObject: {
type: string;
additionalProperties: boolean;
Expand Down Expand Up @@ -2726,7 +2724,6 @@ declare class Server {
}
)[];
};
/** @type {string} */
arguments: {
items: {
type: string;
Expand All @@ -2736,11 +2733,15 @@ declare class Server {
};
minLength?: undefined;
description?: undefined;
cli?: undefined;
}
| {
type: string;
minLength: number;
description: string;
cli: {
description: string;
};
additionalProperties?: undefined;
properties?: undefined;
}
Expand Down Expand Up @@ -2846,9 +2847,11 @@ declare class Server {
type: string;
additionalProperties: boolean;
properties: {
/** @type {any} */
passphrase: {
type: string;
description: string;
/** @type {any} */
description: string /** @type {any} */;
};
requestCert: {
type: string;
Expand All @@ -2870,7 +2873,7 @@ declare class Server {
}
)[];
};
instanceof?: undefined;
/** @type {string} */ instanceof?: undefined;
}
| {
type: string;
Expand Down Expand Up @@ -2901,7 +2904,7 @@ declare class Server {
}
)[];
};
instanceof?: undefined;
/** @type {MultiCompiler} */ instanceof?: undefined;
}
| {
type: string;
Expand All @@ -2919,7 +2922,6 @@ declare class Server {
cert: {
anyOf: (
| {
/** @type {MultiCompiler} */
type: string;
items: {
anyOf: (
Expand Down Expand Up @@ -3242,7 +3244,9 @@ declare class Server {
enum?: undefined;
}
)[];
description: string;
cli: {
description: string;
};
};
WebSocketServerFunction: {
instanceof: string;
Expand Down Expand Up @@ -3321,14 +3325,16 @@ declare class Server {
$ref: string;
};
onListening: {
$ref: string;
$ref: string /** @type {ServerOptions} */;
};
/** @type {ServerOptions} */
open: {
$ref: string;
};
port: {
$ref: string;
$ref: string /** @type {ServerOptions} */;
};
/** @type {ServerOptions} */
proxy: {
$ref: string;
};
Expand Down