Skip to content

Commit

Permalink
fix: generation of negative flags (#2555)
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Mar 26, 2021
1 parent 3d1e485 commit f26ebc1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 52 deletions.
12 changes: 8 additions & 4 deletions packages/webpack-cli/lib/webpack-cli.js
Expand Up @@ -363,7 +363,8 @@ class WebpackCLI {
alias: 'm',
configs: [
{
type: 'boolean',
type: 'enum',
values: [true],
},
],
description: "Merge two or more configurations using 'webpack-merge'.",
Expand Down Expand Up @@ -430,7 +431,8 @@ class WebpackCLI {
name: 'analyze',
configs: [
{
type: 'boolean',
type: 'enum',
values: [true],
},
],
multiple: false,
Expand All @@ -443,7 +445,8 @@ class WebpackCLI {
type: 'string',
},
{
type: 'boolean',
type: 'enum',
values: [true],
},
],
description: 'Print compilation progress during build.',
Expand All @@ -466,7 +469,8 @@ class WebpackCLI {
type: 'string',
},
{
type: 'boolean',
type: 'enum',
values: [true],
},
],
alias: 'j',
Expand Down
24 changes: 0 additions & 24 deletions test/help/__snapshots__/help.test.js.snap.webpack4
Expand Up @@ -69,13 +69,10 @@ Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
-o, --output-path <value> Output location of the file generated by webpack e.g. ./dist/.
-t, --target <value> Sets the build target e.g. node.
Expand Down Expand Up @@ -125,13 +122,10 @@ Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
-o, --output-path <value> Output location of the file generated by webpack e.g. ./dist/.
-t, --target <value> Sets the build target e.g. node.
Expand Down Expand Up @@ -181,13 +175,10 @@ Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
-o, --output-path <value> Output location of the file generated by webpack e.g. ./dist/.
-t, --target <value> Sets the build target e.g. node.
Expand Down Expand Up @@ -238,14 +229,11 @@ Options:
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using
'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is
a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
--entry <value...> The entry point(s) of your application e.g.
./src/main.js.
-o, --output-path <value> Output location of the file generated by webpack
Expand Down Expand Up @@ -413,14 +401,11 @@ Options:
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using
'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it
is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
--entry <value...> The entry point(s) of your application e.g.
./src/main.js.
-o, --output-path <value> Output location of the file generated by webpack
Expand Down Expand Up @@ -498,14 +483,11 @@ Options:
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using
'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is
a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
--entry <value...> The entry point(s) of your application e.g.
./src/main.js.
-o, --output-path <value> Output location of the file generated by webpack
Expand Down Expand Up @@ -546,13 +528,10 @@ Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
-o, --output-path <value> Output location of the file generated by webpack e.g. ./dist/.
-t, --target <value> Sets the build target e.g. node.
Expand Down Expand Up @@ -602,13 +581,10 @@ Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
-o, --output-path <value> Output location of the file generated by webpack e.g. ./dist/.
-t, --target <value> Sets the build target e.g. node.
Expand Down
24 changes: 0 additions & 24 deletions test/help/__snapshots__/help.test.js.snap.webpack5
Expand Up @@ -69,13 +69,10 @@ Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
-d, --devtool <value> Determine source maps to use.
--no-devtool Do not generate source maps.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
Expand Down Expand Up @@ -127,13 +124,10 @@ Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
-d, --devtool <value> Determine source maps to use.
--no-devtool Do not generate source maps.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
Expand Down Expand Up @@ -185,13 +179,10 @@ Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
-d, --devtool <value> Determine source maps to use.
--no-devtool Do not generate source maps.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
Expand Down Expand Up @@ -244,14 +235,11 @@ Options:
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using
'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is
a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
-d, --devtool <value> Determine source maps to use.
--no-devtool Do not generate source maps.
--entry <value...> The entry point(s) of your application e.g.
Expand Down Expand Up @@ -421,14 +409,11 @@ Options:
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using
'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it
is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
-d, --devtool <value> Determine source maps to use.
--no-devtool Do not generate source maps.
--entry <value...> The entry point(s) of your application e.g.
Expand Down Expand Up @@ -508,14 +493,11 @@ Options:
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using
'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is
a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
-d, --devtool <value> Determine source maps to use.
--no-devtool Do not generate source maps.
--entry <value...> The entry point(s) of your application e.g.
Expand Down Expand Up @@ -558,13 +540,10 @@ Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
-d, --devtool <value> Determine source maps to use.
--no-devtool Do not generate source maps.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
Expand Down Expand Up @@ -616,13 +595,10 @@ Options:
-c, --config <value...> Provide path to a webpack configuration file e.g. ./webpack.config.js.
--config-name <value...> Name of the configuration to use.
-m, --merge Merge two or more configurations using 'webpack-merge'.
--no-merge Negative 'merge' option.
--env <value...> Environment passed to the configuration when it is a function.
--node-env <value> Sets process.env.NODE_ENV to the specified value.
--progress [value] Print compilation progress during build.
--no-progress Negative 'progress' option.
-j, --json [value] Prints result as JSON or store it in a file.
--no-json Negative 'json' option.
-d, --devtool <value> Determine source maps to use.
--no-devtool Do not generate source maps.
--entry <value...> The entry point(s) of your application e.g. ./src/main.js.
Expand Down

0 comments on commit f26ebc1

Please sign in to comment.