Hello,
The goal of this request is to be able to update a plugin when it's already installed within a project.
Thanks a lot!
If I have installed Apollo client with vue add apollo, I would like to do vue update apollo if a new version is out few days after.
What, in your vision, would this command do better/more than simply writing:
npm i -D vue-cli-plugin-apollo
?
Obviously I could use npm/yarn but IMHO if you provide the add command to the CLI for installing plugin then you should think to provide also update and remove :wink: Else it's like providing 50% of the "plugin management" feature.
Or simply remove the add command and all the references in the documentation :smile:
vue add also invokes the plugin, so does more that yarn add or npm i.
Wouldn鈥檛 it be awesome as a plug-in developer to hook on the update command ? To fix a mistake in the template, show release notes, add a new file ?
Sounds fine in theory, and may be a candidate for a future minor release, but I think this should be postponed until 3.0.0 has reached its real release.
I could imagine a thousand things going wrong if somone runs such an update on an existing project, maybe one that has been extesively modified since the plugin was first invoked.
Chances are that the files you intend to update are no longer there, or have been extensively modified by the developer. Adding a new file might overwrite an existing one that the developer added.
I realize that all of these problems exist to a smaller degree when initially invoking a plugin, and they are manageable with some level of care by the plugin author.
But I think we should wait with such a feature until 3.0.0 has matured a bit, we see the patterns that emerge from new plugins, have a guideline for plugin authors in place that recommends best practices and so on.
I don't think we'll do this for the reason @LinusBorg has outlined above. Updating should be done via standard package manager workflows.
Most helpful comment
vue addalso invokes the plugin, so does more thatyarn addornpm i.