From 2733724c5d781fce0ac56c8971d1b3aae764e406 Mon Sep 17 00:00:00 2001 From: Nitin Kumar Date: Sat, 11 Jun 2022 19:13:44 +0530 Subject: [PATCH] refactor!: remove `migrate` command (#3291) BREAKING CHANGE: the `migrate` command was removed without replacement, please use migration guide --- OPTIONS.md | 1 - README.md | 1 - packages/webpack-cli/README.md | 1 - packages/webpack-cli/package.json | 3 - packages/webpack-cli/src/webpack-cli.ts | 5 - .../help.test.js.snap.devServer3.webpack4 | 129 ------------------ .../help.test.js.snap.devServer3.webpack5 | 129 ------------------ .../help.test.js.snap.devServer4.webpack4 | 129 ------------------ .../help.test.js.snap.devServer4.webpack5 | 129 ------------------ test/help/help.test.js | 4 - .../version.test.js.snap.webpack4 | 9 -- .../version.test.js.snap.webpack5 | 9 -- test/version/version.test.js | 8 -- 13 files changed, 557 deletions(-) diff --git a/OPTIONS.md b/OPTIONS.md index e3b000020b4..2175e8b30a0 100644 --- a/OPTIONS.md +++ b/OPTIONS.md @@ -1005,7 +1005,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. diff --git a/README.md b/README.md index 151a6ac6f0d..865f26e30d6 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,6 @@ Thus, webpack CLI provides different commands for many common tasks. - [`help|h [command] [option]`](https://webpack.js.org/api/cli/#help) - Display help for commands and options. - [`init|create|new|c|n [generation-path] [options]`](https://webpack.js.org/api/cli/#init) - Create a new webpack project. - [`info|i [options]`](https://webpack.js.org/api/cli/#info) - Returns information related to the local environment. -- [`migrate|m [new-config-path]`](https://www.npmjs.com/package/@webpack-cli/migrate) - Migrate project from one version to another. - [`plugin|p [output-path] [options]`](https://webpack.js.org/api/cli/#plugin) - Initiate new plugin project. - [`loader|l [output-path] [options]`](https://webpack.js.org/api/cli/#loader) - Initiate new loader project. - [`serve|server|s [entries...] [options]`](https://webpack.js.org/api/cli/#serve) - Use webpack with a development server that provides live reloading. diff --git a/packages/webpack-cli/README.md b/packages/webpack-cli/README.md index 063b299d5cc..a50d0844752 100644 --- a/packages/webpack-cli/README.md +++ b/packages/webpack-cli/README.md @@ -69,7 +69,6 @@ npx webpack-cli --help verbose info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. diff --git a/packages/webpack-cli/package.json b/packages/webpack-cli/package.json index f4c2b73d87b..968267df06d 100644 --- a/packages/webpack-cli/package.json +++ b/packages/webpack-cli/package.json @@ -54,9 +54,6 @@ "@webpack-cli/generators": { "optional": true }, - "@webpack-cli/migrate": { - "optional": true - }, "webpack-bundle-analyzer": { "optional": true }, diff --git a/packages/webpack-cli/src/webpack-cli.ts b/packages/webpack-cli/src/webpack-cli.ts index e1a78afc1b6..ff9ec837996 100644 --- a/packages/webpack-cli/src/webpack-cli.ts +++ b/packages/webpack-cli/src/webpack-cli.ts @@ -1086,11 +1086,6 @@ class WebpackCLI implements IWebpackCLI { alias: "p", pkg: "@webpack-cli/generators", }, - { - name: "migrate", - alias: "m", - pkg: "@webpack-cli/migrate", - }, { name: "configtest [config-path]", alias: "t", diff --git a/test/help/__snapshots__/help.test.js.snap.devServer3.webpack4 b/test/help/__snapshots__/help.test.js.snap.devServer3.webpack4 index 96826ccbe33..e0f25790a14 100644 --- a/test/help/__snapshots__/help.test.js.snap.devServer3.webpack4 +++ b/test/help/__snapshots__/help.test.js.snap.devServer3.webpack4 @@ -128,7 +128,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -184,7 +183,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -240,7 +238,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. 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/. Made with ♥ by the webpack team." `; -exports[`help should show help information for 'm' command using command syntax: stderr 1`] = `""`; - -exports[`help should show help information for 'm' command using command syntax: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'm' command using the "--help" option: stderr 1`] = `""`; - -exports[`help should show help information for 'm' command using the "--help" option: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; - -exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; - -exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'migrate' command using command syntax: stderr 1`] = `""`; - -exports[`help should show help information for 'migrate' command using command syntax: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'migrate' command using the "--help" option: stderr 1`] = `""`; - -exports[`help should show help information for 'migrate' command using the "--help" option: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - exports[`help should show help information for 'n' command using command syntax: stderr 1`] = `""`; exports[`help should show help information for 'n' command using command syntax: stdout 1`] = ` @@ -2454,7 +2329,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -2510,7 +2384,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -2738,7 +2611,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -2792,7 +2664,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. diff --git a/test/help/__snapshots__/help.test.js.snap.devServer3.webpack5 b/test/help/__snapshots__/help.test.js.snap.devServer3.webpack5 index 0150b149c02..98fe231863c 100644 --- a/test/help/__snapshots__/help.test.js.snap.devServer3.webpack5 +++ b/test/help/__snapshots__/help.test.js.snap.devServer3.webpack5 @@ -129,7 +129,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -186,7 +185,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -243,7 +241,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. 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/. Made with ♥ by the webpack team." `; -exports[`help should show help information for 'm' command using command syntax: stderr 1`] = `""`; - -exports[`help should show help information for 'm' command using command syntax: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'm' command using the "--help" option: stderr 1`] = `""`; - -exports[`help should show help information for 'm' command using the "--help" option: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; - -exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; - -exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'migrate' command using command syntax: stderr 1`] = `""`; - -exports[`help should show help information for 'migrate' command using command syntax: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'migrate' command using the "--help" option: stderr 1`] = `""`; - -exports[`help should show help information for 'migrate' command using the "--help" option: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - exports[`help should show help information for 'n' command using command syntax: stderr 1`] = `""`; exports[`help should show help information for 'n' command using command syntax: stdout 1`] = ` @@ -2478,7 +2353,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -2535,7 +2409,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -2782,7 +2655,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -2837,7 +2709,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. diff --git a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack4 b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack4 index caaf817e555..80a1cbe8e8f 100644 --- a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack4 +++ b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack4 @@ -128,7 +128,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -184,7 +183,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -240,7 +238,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. 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/. Made with ♥ by the webpack team." `; -exports[`help should show help information for 'm' command using command syntax: stderr 1`] = `""`; - -exports[`help should show help information for 'm' command using command syntax: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'm' command using the "--help" option: stderr 1`] = `""`; - -exports[`help should show help information for 'm' command using the "--help" option: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; - -exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; - -exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'migrate' command using command syntax: stderr 1`] = `""`; - -exports[`help should show help information for 'migrate' command using command syntax: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'migrate' command using the "--help" option: stderr 1`] = `""`; - -exports[`help should show help information for 'migrate' command using the "--help" option: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - exports[`help should show help information for 'n' command using command syntax: stderr 1`] = `""`; exports[`help should show help information for 'n' command using command syntax: stdout 1`] = ` @@ -1880,7 +1755,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -1936,7 +1810,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -2164,7 +2037,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -2218,7 +2090,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. diff --git a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 index fc7db6426b4..4bcba0c85b4 100644 --- a/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 +++ b/test/help/__snapshots__/help.test.js.snap.devServer4.webpack5 @@ -129,7 +129,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -186,7 +185,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -243,7 +241,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. 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/. Made with ♥ by the webpack team." `; -exports[`help should show help information for 'm' command using command syntax: stderr 1`] = `""`; - -exports[`help should show help information for 'm' command using command syntax: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'm' command using the "--help" option: stderr 1`] = `""`; - -exports[`help should show help information for 'm' command using the "--help" option: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stderr 1`] = `""`; - -exports[`help should show help information for 'migrate' and respect the "--color" flag using the "--help" option: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stderr 1`] = `""`; - -exports[`help should show help information for 'migrate' and respect the "--no-color" flag using the "--help" option: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' - and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'migrate' command using command syntax: stderr 1`] = `""`; - -exports[`help should show help information for 'migrate' command using command syntax: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - -exports[`help should show help information for 'migrate' command using the "--help" option: stderr 1`] = `""`; - -exports[`help should show help information for 'migrate' command using the "--help" option: stdout 1`] = ` -"Usage: webpack migrate|m [new-config-path] - -Migrate a configuration to a new version. - -Global options: - --color Enable colors on console. - --no-color Disable colors on console. - -v, --version Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. - -h, --help [verbose] Display help for commands and options. - -To see list of all supported commands and options run 'webpack --help=verbose'. - -Webpack documentation: https://webpack.js.org/. -CLI documentation: https://webpack.js.org/api/cli/. -Made with ♥ by the webpack team." -`; - exports[`help should show help information for 'n' command using command syntax: stderr 1`] = `""`; exports[`help should show help information for 'n' command using command syntax: stdout 1`] = ` @@ -1896,7 +1771,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -1953,7 +1827,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -2200,7 +2073,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. @@ -2255,7 +2127,6 @@ Commands: info|i [options] Outputs information about your system. init|create|new|c|n [generation-path] [options] Initialize a new webpack project. loader|l [output-path] [options] Scaffold a loader. - migrate|m [new-config-path] Migrate a configuration to a new version. plugin|p [output-path] [options] Scaffold a plugin. serve|server|s [entries...] [options] Run the webpack dev server. version|v [commands...] Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands. diff --git a/test/help/help.test.js b/test/help/help.test.js index 45ec6dc8ca3..8f7318e3e9d 100644 --- a/test/help/help.test.js +++ b/test/help/help.test.js @@ -96,10 +96,6 @@ describe("help", () => { name: "loader", alias: "l", }, - { - name: "migrate", - alias: "m", - }, { name: "plugin", alias: "p", diff --git a/test/version/__snapshots__/version.test.js.snap.webpack4 b/test/version/__snapshots__/version.test.js.snap.webpack4 index 7ee6aa6b9f8..0a4ec7c79bd 100644 --- a/test/version/__snapshots__/version.test.js.snap.webpack4 +++ b/test/version/__snapshots__/version.test.js.snap.webpack4 @@ -78,15 +78,6 @@ webpack-cli: x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with migrate: stderr 1`] = `""`; - -exports[`single version flag outputs version with migrate: stdout 1`] = ` -"@webpack-cli/migrate x.x.x -webpack: x.x.x -webpack-cli: x.x.x -webpack-dev-server x.x.x" -`; - exports[`single version flag outputs version with plugin: stderr 1`] = `""`; exports[`single version flag outputs version with plugin: stdout 1`] = ` diff --git a/test/version/__snapshots__/version.test.js.snap.webpack5 b/test/version/__snapshots__/version.test.js.snap.webpack5 index 7ee6aa6b9f8..0a4ec7c79bd 100644 --- a/test/version/__snapshots__/version.test.js.snap.webpack5 +++ b/test/version/__snapshots__/version.test.js.snap.webpack5 @@ -78,15 +78,6 @@ webpack-cli: x.x.x webpack-dev-server x.x.x" `; -exports[`single version flag outputs version with migrate: stderr 1`] = `""`; - -exports[`single version flag outputs version with migrate: stdout 1`] = ` -"@webpack-cli/migrate x.x.x -webpack: x.x.x -webpack-cli: x.x.x -webpack-dev-server x.x.x" -`; - exports[`single version flag outputs version with plugin: stderr 1`] = `""`; exports[`single version flag outputs version with plugin: stdout 1`] = ` diff --git a/test/version/version.test.js b/test/version/version.test.js index 3b49b05e459..604636ccc59 100644 --- a/test/version/version.test.js +++ b/test/version/version.test.js @@ -131,14 +131,6 @@ describe("single version flag", () => { expect(normalizeStdout(stdout)).toMatchSnapshot("stdout"); }); - it("outputs version with migrate", async () => { - const { exitCode, stderr, stdout } = await run(__dirname, ["migrate", "--version"]); - - expect(exitCode).toBe(0); - expect(normalizeStderr(stderr)).toMatchSnapshot("stderr"); - expect(normalizeStdout(stdout)).toMatchSnapshot("stdout"); - }); - it("outputs version with the alias c for init", async () => { const { exitCode, stderr, stdout } = await run(__dirname, ["c", "--version"]);