Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command: vue upgrade #1507

Closed
yyx990803 opened this issue Jun 7, 2018 · 7 comments · Fixed by #2428
Closed

Command: vue upgrade #1507

yyx990803 opened this issue Jun 7, 2018 · 7 comments · Fixed by #2428
Assignees
Labels
contribution welcome intend to implement The team has the intention to implement this feature at some point. Contribution is also welcome. scope: cli
Milestone

Comments

@yyx990803
Copy link
Member

yyx990803 commented Jun 7, 2018

Command that should be run inside an existing project with @vue/cli-service present.

  • Resolve the version to upgrade to.
    • vue upgrade [patch|minor|major]: defaults to minor
  • If already latest, print message and exit
  • Otherwise, confirm via prompt
  • Find @vue/cli-service plus all packages in package.json that starts with @vue/cli-plugin-, and bump them to the target upgrade version
  • Run installDeps - infer package manager from lockfile, if no lockfile, infer from .vuerc, otherwise infer using hasYarn()
  • Print changelog of upgraded versions
@yyx990803 yyx990803 added contribution welcome intend to implement The team has the intention to implement this feature at some point. Contribution is also welcome. scope: cli labels Jun 7, 2018
@Akryum
Copy link
Member

Akryum commented Jun 7, 2018

What about upgrade hooks similar to the Generator API?

@TheMushrr00m
Copy link

Hey there!
Is anyone working on this? I want to try to contribute with this project.

@LinusBorg
Copy link
Member

@TheMushrr00m Nobody is working on it, feel free to go ahead! Thanks!

@pburdette
Copy link
Contributor

Hey @TheMushrr00m are you planning on tackling this? If so awesome 👍

If not I'll hop on it !

@pksunkara
Copy link
Contributor

pksunkara commented Jul 25, 2018

@beardedpayton Can help you if you need any. But we definitely need to think about how other plugins like to handle upgrading. What happens when a plugin which has been added want to change something in the project when it's upgraded? Does it need to reply on vue invoke vue-cli-plugin-x? Or can we add a command vue upgrade vue-cli-plugin-x?

@mario-d-s
Copy link

It would definitely be awesome if plugins can handle upgrade scenarios, I hope that is kept in mind!

So far with each RC of Vue CLI I've vue invoke'd each plugin to see what it does differently and manually merge in the changes (e.g. vue-cli-plugin-unit-jest fixed the test match regex between rc.3 and rc.5).

Imagine if your Vue apps can ride along framework upgrades as smoothly as being generated...

@NiloCK
Copy link

NiloCK commented Aug 1, 2018

What is the current workflow for upgrading one's vue-cli packages? Is it safe to do a plain yarn upgrade vue-cli-service --latest? I'm currently sitting at 3.0.0-beta.1. What I'm most interested in is getting vue-cli-plugin-babel up to speed so that I can hopefully resolve these sorts of debug / source map issues.

Should I do an upgrade only on vue-cli-plugin-babel?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome intend to implement The team has the intention to implement this feature at some point. Contribution is also welcome. scope: cli
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants