Skip to content

Commit 56b43e4

Browse files
snitin315alexander-akait
authored andcommittedNov 15, 2022
refactor!: remove migrate command (#3291)
BREAKING CHANGE: the `migrate` command was removed without replacement, please use migration guide
1 parent be10e97 commit 56b43e4

13 files changed

+0
-557
lines changed
 

‎OPTIONS.md

-1
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,6 @@ Commands:
10051005
info|i [options] Outputs information about your system.
10061006
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
10071007
loader|l [output-path] [options] Scaffold a loader.
1008-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
10091008
plugin|p [output-path] [options] Scaffold a plugin.
10101009
serve|server|s [entries...] [options] Run the webpack dev server.
10111010
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.

‎README.md

-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ Thus, webpack CLI provides different commands for many common tasks.
6060
- [`help|h [command] [option]`](https://webpack.js.org/api/cli/#help) - Display help for commands and options.
6161
- [`init|create|new|c|n [generation-path] [options]`](https://webpack.js.org/api/cli/#init) - Create a new webpack project.
6262
- [`info|i [options]`](https://webpack.js.org/api/cli/#info) - Returns information related to the local environment.
63-
- [`migrate|m <config-path> [new-config-path]`](https://www.npmjs.com/package/@webpack-cli/migrate) - Migrate project from one version to another.
6463
- [`plugin|p [output-path] [options]`](https://webpack.js.org/api/cli/#plugin) - Initiate new plugin project.
6564
- [`loader|l [output-path] [options]`](https://webpack.js.org/api/cli/#loader) - Initiate new loader project.
6665
- [`serve|server|s [entries...] [options]`](https://webpack.js.org/api/cli/#serve) - Use webpack with a development server that provides live reloading.

‎packages/webpack-cli/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ npx webpack-cli --help verbose
6969
info|i [options] Outputs information about your system.
7070
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
7171
loader|l [output-path] [options] Scaffold a loader.
72-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
7372
plugin|p [output-path] [options] Scaffold a plugin.
7473
serve|server|s [entries...] [options] Run the webpack dev server.
7574
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.

‎packages/webpack-cli/package.json

-3
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@
5454
"@webpack-cli/generators": {
5555
"optional": true
5656
},
57-
"@webpack-cli/migrate": {
58-
"optional": true
59-
},
6057
"webpack-bundle-analyzer": {
6158
"optional": true
6259
},

‎packages/webpack-cli/src/webpack-cli.ts

-5
Original file line numberDiff line numberDiff line change
@@ -1086,11 +1086,6 @@ class WebpackCLI implements IWebpackCLI {
10861086
alias: "p",
10871087
pkg: "@webpack-cli/generators",
10881088
},
1089-
{
1090-
name: "migrate",
1091-
alias: "m",
1092-
pkg: "@webpack-cli/migrate",
1093-
},
10941089
{
10951090
name: "configtest [config-path]",
10961091
alias: "t",

‎test/help/__snapshots__/help.test.js.snap.devServer3.webpack4

-129
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ Commands:
128128
info|i [options] Outputs information about your system.
129129
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
130130
loader|l [output-path] [options] Scaffold a loader.
131-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
132131
plugin|p [output-path] [options] Scaffold a plugin.
133132
serve|server|s [entries...] [options] Run the webpack dev server.
134133
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -184,7 +183,6 @@ Commands:
184183
info|i [options] Outputs information about your system.
185184
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
186185
loader|l [output-path] [options] Scaffold a loader.
187-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
188186
plugin|p [output-path] [options] Scaffold a plugin.
189187
serve|server|s [entries...] [options] Run the webpack dev server.
190188
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -240,7 +238,6 @@ Commands:
240238
info|i [options] Outputs information about your system.
241239
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
242240
loader|l [output-path] [options] Scaffold a loader.
243-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
244241
plugin|p [output-path] [options] Scaffold a plugin.
245242
serve|server|s [entries...] [options] Run the webpack dev server.
246243
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -1135,128 +1132,6 @@ CLI documentation: https://webpack.js.org/api/cli/.
11351132
Made with ♥ by the webpack team."
11361133
`;
11371134

1138-
exports[`help should show help information for 'm' command using command syntax: stderr 1`] = `""`;
1139-
1140-
exports[`help should show help information for 'm' command using command syntax: stdout 1`] = `
1141-
"Usage: webpack migrate|m <config-path> [new-config-path]
1142-
1143-
Migrate a configuration to a new version.
1144-
1145-
Global options:
1146-
--color Enable colors on console.
1147-
--no-color Disable colors on console.
1148-
-v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
1149-
-h, --help [verbose] Display help for commands and options.
1150-
1151-
To see list of all supported commands and options run 'webpack --help=verbose'.
1152-
1153-
Webpack documentation: https://webpack.js.org/.
1154-
CLI documentation: https://webpack.js.org/api/cli/.
1155-
Made with ♥ by the webpack team."
1156-
`;
1157-
1158-
exports[`help should show help information for 'm' command using the "--help" option: stderr 1`] = `""`;
1159-
1160-
exports[`help should show help information for 'm' command using the "--help" option: stdout 1`] = `
1161-
"Usage: webpack migrate|m <config-path> [new-config-path]
1162-
1163-
Migrate a configuration to a new version.
1164-
1165-
Global options:
1166-
--color Enable colors on console.
1167-
--no-color Disable colors on console.
1168-
-v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
1169-
-h, --help [verbose] Display help for commands and options.
1170-
1171-
To see list of all supported commands and options run 'webpack --help=verbose'.
1172-
1173-
Webpack documentation: https://webpack.js.org/.
1174-
CLI documentation: https://webpack.js.org/api/cli/.
1175-
Made with ♥ by the webpack team."
1176-
`;
1177-
1178-
exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`;
1179-
1180-
exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stdout 1`] = `
1181-
"Usage: webpack migrate|m <config-path> [new-config-path]
1182-
1183-
Migrate a configuration to a new version.
1184-
1185-
Global options:
1186-
--color Enable colors on console.
1187-
--no-color Disable colors on console.
1188-
-v, --version Output the version number of 'webpack', 'webpack-cli'
1189-
and 'webpack-dev-server' and commands.
1190-
-h, --help [verbose] Display help for commands and options.
1191-
1192-
To see list of all supported commands and options run 'webpack --help=verbose'.
1193-
1194-
Webpack documentation: https://webpack.js.org/.
1195-
CLI documentation: https://webpack.js.org/api/cli/.
1196-
Made with ♥ by the webpack team."
1197-
`;
1198-
1199-
exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`;
1200-
1201-
exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stdout 1`] = `
1202-
"Usage: webpack migrate|m <config-path> [new-config-path]
1203-
1204-
Migrate a configuration to a new version.
1205-
1206-
Global options:
1207-
--color Enable colors on console.
1208-
--no-color Disable colors on console.
1209-
-v, --version Output the version number of 'webpack', 'webpack-cli'
1210-
and 'webpack-dev-server' and commands.
1211-
-h, --help [verbose] Display help for commands and options.
1212-
1213-
To see list of all supported commands and options run 'webpack --help=verbose'.
1214-
1215-
Webpack documentation: https://webpack.js.org/.
1216-
CLI documentation: https://webpack.js.org/api/cli/.
1217-
Made with ♥ by the webpack team."
1218-
`;
1219-
1220-
exports[`help should show help information for 'migrate' command using command syntax: stderr 1`] = `""`;
1221-
1222-
exports[`help should show help information for 'migrate' command using command syntax: stdout 1`] = `
1223-
"Usage: webpack migrate|m <config-path> [new-config-path]
1224-
1225-
Migrate a configuration to a new version.
1226-
1227-
Global options:
1228-
--color Enable colors on console.
1229-
--no-color Disable colors on console.
1230-
-v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
1231-
-h, --help [verbose] Display help for commands and options.
1232-
1233-
To see list of all supported commands and options run 'webpack --help=verbose'.
1234-
1235-
Webpack documentation: https://webpack.js.org/.
1236-
CLI documentation: https://webpack.js.org/api/cli/.
1237-
Made with ♥ by the webpack team."
1238-
`;
1239-
1240-
exports[`help should show help information for 'migrate' command using the "--help" option: stderr 1`] = `""`;
1241-
1242-
exports[`help should show help information for 'migrate' command using the "--help" option: stdout 1`] = `
1243-
"Usage: webpack migrate|m <config-path> [new-config-path]
1244-
1245-
Migrate a configuration to a new version.
1246-
1247-
Global options:
1248-
--color Enable colors on console.
1249-
--no-color Disable colors on console.
1250-
-v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
1251-
-h, --help [verbose] Display help for commands and options.
1252-
1253-
To see list of all supported commands and options run 'webpack --help=verbose'.
1254-
1255-
Webpack documentation: https://webpack.js.org/.
1256-
CLI documentation: https://webpack.js.org/api/cli/.
1257-
Made with ♥ by the webpack team."
1258-
`;
1259-
12601135
exports[`help should show help information for 'n' command using command syntax: stderr 1`] = `""`;
12611136

12621137
exports[`help should show help information for 'n' command using command syntax: stdout 1`] = `
@@ -2454,7 +2329,6 @@ Commands:
24542329
info|i [options] Outputs information about your system.
24552330
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
24562331
loader|l [output-path] [options] Scaffold a loader.
2457-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
24582332
plugin|p [output-path] [options] Scaffold a plugin.
24592333
serve|server|s [entries...] [options] Run the webpack dev server.
24602334
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -2510,7 +2384,6 @@ Commands:
25102384
info|i [options] Outputs information about your system.
25112385
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
25122386
loader|l [output-path] [options] Scaffold a loader.
2513-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
25142387
plugin|p [output-path] [options] Scaffold a plugin.
25152388
serve|server|s [entries...] [options] Run the webpack dev server.
25162389
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -2738,7 +2611,6 @@ Commands:
27382611
info|i [options] Outputs information about your system.
27392612
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
27402613
loader|l [output-path] [options] Scaffold a loader.
2741-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
27422614
plugin|p [output-path] [options] Scaffold a plugin.
27432615
serve|server|s [entries...] [options] Run the webpack dev server.
27442616
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -2792,7 +2664,6 @@ Commands:
27922664
info|i [options] Outputs information about your system.
27932665
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
27942666
loader|l [output-path] [options] Scaffold a loader.
2795-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
27962667
plugin|p [output-path] [options] Scaffold a plugin.
27972668
serve|server|s [entries...] [options] Run the webpack dev server.
27982669
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.

‎test/help/__snapshots__/help.test.js.snap.devServer3.webpack5

-129
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ Commands:
129129
info|i [options] Outputs information about your system.
130130
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
131131
loader|l [output-path] [options] Scaffold a loader.
132-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
133132
plugin|p [output-path] [options] Scaffold a plugin.
134133
serve|server|s [entries...] [options] Run the webpack dev server.
135134
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -186,7 +185,6 @@ Commands:
186185
info|i [options] Outputs information about your system.
187186
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
188187
loader|l [output-path] [options] Scaffold a loader.
189-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
190188
plugin|p [output-path] [options] Scaffold a plugin.
191189
serve|server|s [entries...] [options] Run the webpack dev server.
192190
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -243,7 +241,6 @@ Commands:
243241
info|i [options] Outputs information about your system.
244242
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
245243
loader|l [output-path] [options] Scaffold a loader.
246-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
247244
plugin|p [output-path] [options] Scaffold a plugin.
248245
serve|server|s [entries...] [options] Run the webpack dev server.
249246
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -1144,128 +1141,6 @@ CLI documentation: https://webpack.js.org/api/cli/.
11441141
Made with ♥ by the webpack team."
11451142
`;
11461143

1147-
exports[`help should show help information for 'm' command using command syntax: stderr 1`] = `""`;
1148-
1149-
exports[`help should show help information for 'm' command using command syntax: stdout 1`] = `
1150-
"Usage: webpack migrate|m <config-path> [new-config-path]
1151-
1152-
Migrate a configuration to a new version.
1153-
1154-
Global options:
1155-
--color Enable colors on console.
1156-
--no-color Disable colors on console.
1157-
-v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
1158-
-h, --help [verbose] Display help for commands and options.
1159-
1160-
To see list of all supported commands and options run 'webpack --help=verbose'.
1161-
1162-
Webpack documentation: https://webpack.js.org/.
1163-
CLI documentation: https://webpack.js.org/api/cli/.
1164-
Made with ♥ by the webpack team."
1165-
`;
1166-
1167-
exports[`help should show help information for 'm' command using the "--help" option: stderr 1`] = `""`;
1168-
1169-
exports[`help should show help information for 'm' command using the "--help" option: stdout 1`] = `
1170-
"Usage: webpack migrate|m <config-path> [new-config-path]
1171-
1172-
Migrate a configuration to a new version.
1173-
1174-
Global options:
1175-
--color Enable colors on console.
1176-
--no-color Disable colors on console.
1177-
-v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
1178-
-h, --help [verbose] Display help for commands and options.
1179-
1180-
To see list of all supported commands and options run 'webpack --help=verbose'.
1181-
1182-
Webpack documentation: https://webpack.js.org/.
1183-
CLI documentation: https://webpack.js.org/api/cli/.
1184-
Made with ♥ by the webpack team."
1185-
`;
1186-
1187-
exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`;
1188-
1189-
exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stdout 1`] = `
1190-
"Usage: webpack migrate|m <config-path> [new-config-path]
1191-
1192-
Migrate a configuration to a new version.
1193-
1194-
Global options:
1195-
--color Enable colors on console.
1196-
--no-color Disable colors on console.
1197-
-v, --version Output the version number of 'webpack', 'webpack-cli'
1198-
and 'webpack-dev-server' and commands.
1199-
-h, --help [verbose] Display help for commands and options.
1200-
1201-
To see list of all supported commands and options run 'webpack --help=verbose'.
1202-
1203-
Webpack documentation: https://webpack.js.org/.
1204-
CLI documentation: https://webpack.js.org/api/cli/.
1205-
Made with ♥ by the webpack team."
1206-
`;
1207-
1208-
exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`;
1209-
1210-
exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stdout 1`] = `
1211-
"Usage: webpack migrate|m <config-path> [new-config-path]
1212-
1213-
Migrate a configuration to a new version.
1214-
1215-
Global options:
1216-
--color Enable colors on console.
1217-
--no-color Disable colors on console.
1218-
-v, --version Output the version number of 'webpack', 'webpack-cli'
1219-
and 'webpack-dev-server' and commands.
1220-
-h, --help [verbose] Display help for commands and options.
1221-
1222-
To see list of all supported commands and options run 'webpack --help=verbose'.
1223-
1224-
Webpack documentation: https://webpack.js.org/.
1225-
CLI documentation: https://webpack.js.org/api/cli/.
1226-
Made with ♥ by the webpack team."
1227-
`;
1228-
1229-
exports[`help should show help information for 'migrate' command using command syntax: stderr 1`] = `""`;
1230-
1231-
exports[`help should show help information for 'migrate' command using command syntax: stdout 1`] = `
1232-
"Usage: webpack migrate|m <config-path> [new-config-path]
1233-
1234-
Migrate a configuration to a new version.
1235-
1236-
Global options:
1237-
--color Enable colors on console.
1238-
--no-color Disable colors on console.
1239-
-v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
1240-
-h, --help [verbose] Display help for commands and options.
1241-
1242-
To see list of all supported commands and options run 'webpack --help=verbose'.
1243-
1244-
Webpack documentation: https://webpack.js.org/.
1245-
CLI documentation: https://webpack.js.org/api/cli/.
1246-
Made with ♥ by the webpack team."
1247-
`;
1248-
1249-
exports[`help should show help information for 'migrate' command using the "--help" option: stderr 1`] = `""`;
1250-
1251-
exports[`help should show help information for 'migrate' command using the "--help" option: stdout 1`] = `
1252-
"Usage: webpack migrate|m <config-path> [new-config-path]
1253-
1254-
Migrate a configuration to a new version.
1255-
1256-
Global options:
1257-
--color Enable colors on console.
1258-
--no-color Disable colors on console.
1259-
-v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
1260-
-h, --help [verbose] Display help for commands and options.
1261-
1262-
To see list of all supported commands and options run 'webpack --help=verbose'.
1263-
1264-
Webpack documentation: https://webpack.js.org/.
1265-
CLI documentation: https://webpack.js.org/api/cli/.
1266-
Made with ♥ by the webpack team."
1267-
`;
1268-
12691144
exports[`help should show help information for 'n' command using command syntax: stderr 1`] = `""`;
12701145

12711146
exports[`help should show help information for 'n' command using command syntax: stdout 1`] = `
@@ -2478,7 +2353,6 @@ Commands:
24782353
info|i [options] Outputs information about your system.
24792354
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
24802355
loader|l [output-path] [options] Scaffold a loader.
2481-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
24822356
plugin|p [output-path] [options] Scaffold a plugin.
24832357
serve|server|s [entries...] [options] Run the webpack dev server.
24842358
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -2535,7 +2409,6 @@ Commands:
25352409
info|i [options] Outputs information about your system.
25362410
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
25372411
loader|l [output-path] [options] Scaffold a loader.
2538-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
25392412
plugin|p [output-path] [options] Scaffold a plugin.
25402413
serve|server|s [entries...] [options] Run the webpack dev server.
25412414
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -2782,7 +2655,6 @@ Commands:
27822655
info|i [options] Outputs information about your system.
27832656
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
27842657
loader|l [output-path] [options] Scaffold a loader.
2785-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
27862658
plugin|p [output-path] [options] Scaffold a plugin.
27872659
serve|server|s [entries...] [options] Run the webpack dev server.
27882660
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -2837,7 +2709,6 @@ Commands:
28372709
info|i [options] Outputs information about your system.
28382710
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
28392711
loader|l [output-path] [options] Scaffold a loader.
2840-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
28412712
plugin|p [output-path] [options] Scaffold a plugin.
28422713
serve|server|s [entries...] [options] Run the webpack dev server.
28432714
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.

‎test/help/__snapshots__/help.test.js.snap.devServer4.webpack4

-129
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ Commands:
128128
info|i [options] Outputs information about your system.
129129
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
130130
loader|l [output-path] [options] Scaffold a loader.
131-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
132131
plugin|p [output-path] [options] Scaffold a plugin.
133132
serve|server|s [entries...] [options] Run the webpack dev server.
134133
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -184,7 +183,6 @@ Commands:
184183
info|i [options] Outputs information about your system.
185184
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
186185
loader|l [output-path] [options] Scaffold a loader.
187-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
188186
plugin|p [output-path] [options] Scaffold a plugin.
189187
serve|server|s [entries...] [options] Run the webpack dev server.
190188
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -240,7 +238,6 @@ Commands:
240238
info|i [options] Outputs information about your system.
241239
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
242240
loader|l [output-path] [options] Scaffold a loader.
243-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
244241
plugin|p [output-path] [options] Scaffold a plugin.
245242
serve|server|s [entries...] [options] Run the webpack dev server.
246243
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -1135,128 +1132,6 @@ CLI documentation: https://webpack.js.org/api/cli/.
11351132
Made with ♥ by the webpack team."
11361133
`;
11371134

1138-
exports[`help should show help information for 'm' command using command syntax: stderr 1`] = `""`;
1139-
1140-
exports[`help should show help information for 'm' command using command syntax: stdout 1`] = `
1141-
"Usage: webpack migrate|m <config-path> [new-config-path]
1142-
1143-
Migrate a configuration to a new version.
1144-
1145-
Global options:
1146-
--color Enable colors on console.
1147-
--no-color Disable colors on console.
1148-
-v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
1149-
-h, --help [verbose] Display help for commands and options.
1150-
1151-
To see list of all supported commands and options run 'webpack --help=verbose'.
1152-
1153-
Webpack documentation: https://webpack.js.org/.
1154-
CLI documentation: https://webpack.js.org/api/cli/.
1155-
Made with ♥ by the webpack team."
1156-
`;
1157-
1158-
exports[`help should show help information for 'm' command using the "--help" option: stderr 1`] = `""`;
1159-
1160-
exports[`help should show help information for 'm' command using the "--help" option: stdout 1`] = `
1161-
"Usage: webpack migrate|m <config-path> [new-config-path]
1162-
1163-
Migrate a configuration to a new version.
1164-
1165-
Global options:
1166-
--color Enable colors on console.
1167-
--no-color Disable colors on console.
1168-
-v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
1169-
-h, --help [verbose] Display help for commands and options.
1170-
1171-
To see list of all supported commands and options run 'webpack --help=verbose'.
1172-
1173-
Webpack documentation: https://webpack.js.org/.
1174-
CLI documentation: https://webpack.js.org/api/cli/.
1175-
Made with ♥ by the webpack team."
1176-
`;
1177-
1178-
exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`;
1179-
1180-
exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stdout 1`] = `
1181-
"Usage: webpack migrate|m <config-path> [new-config-path]
1182-
1183-
Migrate a configuration to a new version.
1184-
1185-
Global options:
1186-
--color Enable colors on console.
1187-
--no-color Disable colors on console.
1188-
-v, --version Output the version number of 'webpack', 'webpack-cli'
1189-
and 'webpack-dev-server' and commands.
1190-
-h, --help [verbose] Display help for commands and options.
1191-
1192-
To see list of all supported commands and options run 'webpack --help=verbose'.
1193-
1194-
Webpack documentation: https://webpack.js.org/.
1195-
CLI documentation: https://webpack.js.org/api/cli/.
1196-
Made with ♥ by the webpack team."
1197-
`;
1198-
1199-
exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`;
1200-
1201-
exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stdout 1`] = `
1202-
"Usage: webpack migrate|m <config-path> [new-config-path]
1203-
1204-
Migrate a configuration to a new version.
1205-
1206-
Global options:
1207-
--color Enable colors on console.
1208-
--no-color Disable colors on console.
1209-
-v, --version Output the version number of 'webpack', 'webpack-cli'
1210-
and 'webpack-dev-server' and commands.
1211-
-h, --help [verbose] Display help for commands and options.
1212-
1213-
To see list of all supported commands and options run 'webpack --help=verbose'.
1214-
1215-
Webpack documentation: https://webpack.js.org/.
1216-
CLI documentation: https://webpack.js.org/api/cli/.
1217-
Made with ♥ by the webpack team."
1218-
`;
1219-
1220-
exports[`help should show help information for 'migrate' command using command syntax: stderr 1`] = `""`;
1221-
1222-
exports[`help should show help information for 'migrate' command using command syntax: stdout 1`] = `
1223-
"Usage: webpack migrate|m <config-path> [new-config-path]
1224-
1225-
Migrate a configuration to a new version.
1226-
1227-
Global options:
1228-
--color Enable colors on console.
1229-
--no-color Disable colors on console.
1230-
-v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
1231-
-h, --help [verbose] Display help for commands and options.
1232-
1233-
To see list of all supported commands and options run 'webpack --help=verbose'.
1234-
1235-
Webpack documentation: https://webpack.js.org/.
1236-
CLI documentation: https://webpack.js.org/api/cli/.
1237-
Made with ♥ by the webpack team."
1238-
`;
1239-
1240-
exports[`help should show help information for 'migrate' command using the "--help" option: stderr 1`] = `""`;
1241-
1242-
exports[`help should show help information for 'migrate' command using the "--help" option: stdout 1`] = `
1243-
"Usage: webpack migrate|m <config-path> [new-config-path]
1244-
1245-
Migrate a configuration to a new version.
1246-
1247-
Global options:
1248-
--color Enable colors on console.
1249-
--no-color Disable colors on console.
1250-
-v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
1251-
-h, --help [verbose] Display help for commands and options.
1252-
1253-
To see list of all supported commands and options run 'webpack --help=verbose'.
1254-
1255-
Webpack documentation: https://webpack.js.org/.
1256-
CLI documentation: https://webpack.js.org/api/cli/.
1257-
Made with ♥ by the webpack team."
1258-
`;
1259-
12601135
exports[`help should show help information for 'n' command using command syntax: stderr 1`] = `""`;
12611136

12621137
exports[`help should show help information for 'n' command using command syntax: stdout 1`] = `
@@ -1880,7 +1755,6 @@ Commands:
18801755
info|i [options] Outputs information about your system.
18811756
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
18821757
loader|l [output-path] [options] Scaffold a loader.
1883-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
18841758
plugin|p [output-path] [options] Scaffold a plugin.
18851759
serve|server|s [entries...] [options] Run the webpack dev server.
18861760
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -1936,7 +1810,6 @@ Commands:
19361810
info|i [options] Outputs information about your system.
19371811
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
19381812
loader|l [output-path] [options] Scaffold a loader.
1939-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
19401813
plugin|p [output-path] [options] Scaffold a plugin.
19411814
serve|server|s [entries...] [options] Run the webpack dev server.
19421815
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -2164,7 +2037,6 @@ Commands:
21642037
info|i [options] Outputs information about your system.
21652038
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
21662039
loader|l [output-path] [options] Scaffold a loader.
2167-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
21682040
plugin|p [output-path] [options] Scaffold a plugin.
21692041
serve|server|s [entries...] [options] Run the webpack dev server.
21702042
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -2218,7 +2090,6 @@ Commands:
22182090
info|i [options] Outputs information about your system.
22192091
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
22202092
loader|l [output-path] [options] Scaffold a loader.
2221-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
22222093
plugin|p [output-path] [options] Scaffold a plugin.
22232094
serve|server|s [entries...] [options] Run the webpack dev server.
22242095
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.

‎test/help/__snapshots__/help.test.js.snap.devServer4.webpack5

-129
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ Commands:
129129
info|i [options] Outputs information about your system.
130130
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
131131
loader|l [output-path] [options] Scaffold a loader.
132-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
133132
plugin|p [output-path] [options] Scaffold a plugin.
134133
serve|server|s [entries...] [options] Run the webpack dev server.
135134
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -186,7 +185,6 @@ Commands:
186185
info|i [options] Outputs information about your system.
187186
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
188187
loader|l [output-path] [options] Scaffold a loader.
189-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
190188
plugin|p [output-path] [options] Scaffold a plugin.
191189
serve|server|s [entries...] [options] Run the webpack dev server.
192190
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -243,7 +241,6 @@ Commands:
243241
info|i [options] Outputs information about your system.
244242
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
245243
loader|l [output-path] [options] Scaffold a loader.
246-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
247244
plugin|p [output-path] [options] Scaffold a plugin.
248245
serve|server|s [entries...] [options] Run the webpack dev server.
249246
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -1144,128 +1141,6 @@ CLI documentation: https://webpack.js.org/api/cli/.
11441141
Made with ♥ by the webpack team."
11451142
`;
11461143

1147-
exports[`help should show help information for 'm' command using command syntax: stderr 1`] = `""`;
1148-
1149-
exports[`help should show help information for 'm' command using command syntax: stdout 1`] = `
1150-
"Usage: webpack migrate|m <config-path> [new-config-path]
1151-
1152-
Migrate a configuration to a new version.
1153-
1154-
Global options:
1155-
--color Enable colors on console.
1156-
--no-color Disable colors on console.
1157-
-v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
1158-
-h, --help [verbose] Display help for commands and options.
1159-
1160-
To see list of all supported commands and options run 'webpack --help=verbose'.
1161-
1162-
Webpack documentation: https://webpack.js.org/.
1163-
CLI documentation: https://webpack.js.org/api/cli/.
1164-
Made with ♥ by the webpack team."
1165-
`;
1166-
1167-
exports[`help should show help information for 'm' command using the "--help" option: stderr 1`] = `""`;
1168-
1169-
exports[`help should show help information for 'm' command using the "--help" option: stdout 1`] = `
1170-
"Usage: webpack migrate|m <config-path> [new-config-path]
1171-
1172-
Migrate a configuration to a new version.
1173-
1174-
Global options:
1175-
--color Enable colors on console.
1176-
--no-color Disable colors on console.
1177-
-v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
1178-
-h, --help [verbose] Display help for commands and options.
1179-
1180-
To see list of all supported commands and options run 'webpack --help=verbose'.
1181-
1182-
Webpack documentation: https://webpack.js.org/.
1183-
CLI documentation: https://webpack.js.org/api/cli/.
1184-
Made with ♥ by the webpack team."
1185-
`;
1186-
1187-
exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`;
1188-
1189-
exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stdout 1`] = `
1190-
"Usage: webpack migrate|m <config-path> [new-config-path]
1191-
1192-
Migrate a configuration to a new version.
1193-
1194-
Global options:
1195-
--color Enable colors on console.
1196-
--no-color Disable colors on console.
1197-
-v, --version Output the version number of 'webpack', 'webpack-cli'
1198-
and 'webpack-dev-server' and commands.
1199-
-h, --help [verbose] Display help for commands and options.
1200-
1201-
To see list of all supported commands and options run 'webpack --help=verbose'.
1202-
1203-
Webpack documentation: https://webpack.js.org/.
1204-
CLI documentation: https://webpack.js.org/api/cli/.
1205-
Made with ♥ by the webpack team."
1206-
`;
1207-
1208-
exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`;
1209-
1210-
exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stdout 1`] = `
1211-
"Usage: webpack migrate|m <config-path> [new-config-path]
1212-
1213-
Migrate a configuration to a new version.
1214-
1215-
Global options:
1216-
--color Enable colors on console.
1217-
--no-color Disable colors on console.
1218-
-v, --version Output the version number of 'webpack', 'webpack-cli'
1219-
and 'webpack-dev-server' and commands.
1220-
-h, --help [verbose] Display help for commands and options.
1221-
1222-
To see list of all supported commands and options run 'webpack --help=verbose'.
1223-
1224-
Webpack documentation: https://webpack.js.org/.
1225-
CLI documentation: https://webpack.js.org/api/cli/.
1226-
Made with ♥ by the webpack team."
1227-
`;
1228-
1229-
exports[`help should show help information for 'migrate' command using command syntax: stderr 1`] = `""`;
1230-
1231-
exports[`help should show help information for 'migrate' command using command syntax: stdout 1`] = `
1232-
"Usage: webpack migrate|m <config-path> [new-config-path]
1233-
1234-
Migrate a configuration to a new version.
1235-
1236-
Global options:
1237-
--color Enable colors on console.
1238-
--no-color Disable colors on console.
1239-
-v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
1240-
-h, --help [verbose] Display help for commands and options.
1241-
1242-
To see list of all supported commands and options run 'webpack --help=verbose'.
1243-
1244-
Webpack documentation: https://webpack.js.org/.
1245-
CLI documentation: https://webpack.js.org/api/cli/.
1246-
Made with ♥ by the webpack team."
1247-
`;
1248-
1249-
exports[`help should show help information for 'migrate' command using the "--help" option: stderr 1`] = `""`;
1250-
1251-
exports[`help should show help information for 'migrate' command using the "--help" option: stdout 1`] = `
1252-
"Usage: webpack migrate|m <config-path> [new-config-path]
1253-
1254-
Migrate a configuration to a new version.
1255-
1256-
Global options:
1257-
--color Enable colors on console.
1258-
--no-color Disable colors on console.
1259-
-v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
1260-
-h, --help [verbose] Display help for commands and options.
1261-
1262-
To see list of all supported commands and options run 'webpack --help=verbose'.
1263-
1264-
Webpack documentation: https://webpack.js.org/.
1265-
CLI documentation: https://webpack.js.org/api/cli/.
1266-
Made with ♥ by the webpack team."
1267-
`;
1268-
12691144
exports[`help should show help information for 'n' command using command syntax: stderr 1`] = `""`;
12701145

12711146
exports[`help should show help information for 'n' command using command syntax: stdout 1`] = `
@@ -1896,7 +1771,6 @@ Commands:
18961771
info|i [options] Outputs information about your system.
18971772
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
18981773
loader|l [output-path] [options] Scaffold a loader.
1899-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
19001774
plugin|p [output-path] [options] Scaffold a plugin.
19011775
serve|server|s [entries...] [options] Run the webpack dev server.
19021776
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -1953,7 +1827,6 @@ Commands:
19531827
info|i [options] Outputs information about your system.
19541828
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
19551829
loader|l [output-path] [options] Scaffold a loader.
1956-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
19571830
plugin|p [output-path] [options] Scaffold a plugin.
19581831
serve|server|s [entries...] [options] Run the webpack dev server.
19591832
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -2200,7 +2073,6 @@ Commands:
22002073
info|i [options] Outputs information about your system.
22012074
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
22022075
loader|l [output-path] [options] Scaffold a loader.
2203-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
22042076
plugin|p [output-path] [options] Scaffold a plugin.
22052077
serve|server|s [entries...] [options] Run the webpack dev server.
22062078
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
@@ -2255,7 +2127,6 @@ Commands:
22552127
info|i [options] Outputs information about your system.
22562128
init|create|new|c|n [generation-path] [options] Initialize a new webpack project.
22572129
loader|l [output-path] [options] Scaffold a loader.
2258-
migrate|m <config-path> [new-config-path] Migrate a configuration to a new version.
22592130
plugin|p [output-path] [options] Scaffold a plugin.
22602131
serve|server|s [entries...] [options] Run the webpack dev server.
22612132
version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.

‎test/help/help.test.js

-4
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,6 @@ describe("help", () => {
9696
name: "loader",
9797
alias: "l",
9898
},
99-
{
100-
name: "migrate",
101-
alias: "m",
102-
},
10399
{
104100
name: "plugin",
105101
alias: "p",

‎test/version/__snapshots__/version.test.js.snap.webpack4

-9
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,6 @@ webpack-cli: x.x.x
7878
webpack-dev-server x.x.x"
7979
`;
8080

81-
exports[`single version flag outputs version with migrate: stderr 1`] = `""`;
82-
83-
exports[`single version flag outputs version with migrate: stdout 1`] = `
84-
"@webpack-cli/migrate x.x.x
85-
webpack: x.x.x
86-
webpack-cli: x.x.x
87-
webpack-dev-server x.x.x"
88-
`;
89-
9081
exports[`single version flag outputs version with plugin: stderr 1`] = `""`;
9182

9283
exports[`single version flag outputs version with plugin: stdout 1`] = `

‎test/version/__snapshots__/version.test.js.snap.webpack5

-9
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,6 @@ webpack-cli: x.x.x
7878
webpack-dev-server x.x.x"
7979
`;
8080

81-
exports[`single version flag outputs version with migrate: stderr 1`] = `""`;
82-
83-
exports[`single version flag outputs version with migrate: stdout 1`] = `
84-
"@webpack-cli/migrate x.x.x
85-
webpack: x.x.x
86-
webpack-cli: x.x.x
87-
webpack-dev-server x.x.x"
88-
`;
89-
9081
exports[`single version flag outputs version with plugin: stderr 1`] = `""`;
9182

9283
exports[`single version flag outputs version with plugin: stdout 1`] = `

‎test/version/version.test.js

-8
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,6 @@ describe("single version flag", () => {
131131
expect(normalizeStdout(stdout)).toMatchSnapshot("stdout");
132132
});
133133

134-
it("outputs version with migrate", async () => {
135-
const { exitCode, stderr, stdout } = await run(__dirname, ["migrate", "--version"]);
136-
137-
expect(exitCode).toBe(0);
138-
expect(normalizeStderr(stderr)).toMatchSnapshot("stderr");
139-
expect(normalizeStdout(stdout)).toMatchSnapshot("stdout");
140-
});
141-
142134
it("outputs version with the alias c for init", async () => {
143135
const { exitCode, stderr, stdout } = await run(__dirname, ["c", "--version"]);
144136

0 commit comments

Comments
 (0)
Please sign in to comment.