Usage: upgrade [options] [package-name]
upgrade vue cli service / plugins
-t, --to <version> upgrade to a version that is not latest
-r, --registry <url> Use specified npm registry when installing dependencies
The old command is only an adapter for npm install and only takes care of core plugins.
After this change, third-party plugins can also benefit from this command.
In the future, we may also extend this utility for core package migrations (if possible) (e.g. vue upgrade vuex --to 4.0.0)
The new MigratorAPI:
Basically the same as GeneratorAPI, except for one more method: fromVersion and it's triggered on plugin upgrade only.
Migrator implementation should be located under ./migrator directory.
The idea is to provide a minimal API interface for migration utilities and to be fully programmable/customizable.
Later I'd also like to add a few handy helper methods to both GeneratorAPI and MigratorAPI, such as api.move and api.remove.
TODOs in this PR:
clean the code (there're all kinds of TODOs and FIXMEs in it and many functionalities are broken)
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.