feat: vue upgrade
monorepo support, --from
option, and a new vue migrate --from
command
#5091
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.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains several features, but they are all to solve the
vue upgrade
usability problem in complex environments, so I put them into a single PR.getInstalledVersion
function to use theloadModule
utility, this is to support monorepo.vue upgrade --from
option can be used as an escape hatch if the user forgets or doesn't want to runnpm install
before upgrading, or if evenloadModule
failed to locate the installed plugin.vue migrate --from
is for those who previously failed to runvue upgrade
and then upgraded the plugin version anyway, they might still want to benefit from the automated migration script. Or, because we previously used^
version range in the templates, users may have installed the latest plugin unintentionally; in this case, if they want to automatically migrate to the latest template setup, they can use this command.resolveFrom
option is now respected in all these commands.TODO: these changes haven't been thoroughly tested yet.
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
Other information: