Skip to content

using UI to update plugins does not make changes to package.json, only to yarn.lock #2684

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

Closed
vesper8 opened this issue Oct 5, 2018 · 2 comments

Comments

@vesper8
Copy link

vesper8 commented Oct 5, 2018

Version

3.0.4

Reproduction link

yarnpkg/yarn#2042

Node and OS info

v10.11.0, 6.4.1, 1.10.1, OSX Mojave

Steps to reproduce

start UI by using vue ui
notice plugin dependencies are not up to date (example 3.0.3, latest is 3.0.4)
select 'update all plugins' from ... menu
update occurs and UI reflects new version
grep yarn.lock or yarn list | grep shows new version
but package.json is not touched at all, still showing old versions 3.0.0-rc.3

What is expected?

package.json should also be updated and reflect same versions as yarn lock file

What is actually happening?

package.json is not being updated at all


if you execute from command line:
yarn upgrade @vue/[email protected]

then it DOES update package.json as well as yarn.lock

so it is possible to update both files. I think this is much better to have these files in sync as package.json provides an easy way to see which versions are installed and is much more readable then the lock files

@Akryum
Copy link
Member

Akryum commented Oct 5, 2018

Well that's not a bug, it's standard yarn behavior. Your command upgrades to a specific version, so yarn has to update package.json to change the version range because 3.0.4 is not the same as ^3.0.0 for example.
When you upgrade normally, for example from 3.0.3 to 3.0.4 with a version range of ^3.0.0 in package.json, yarn doesn't need to update package.json because 3.0.4 is a valid version for the ^3.0.0 version range.

@Akryum Akryum closed this as completed Oct 5, 2018
@vesper8
Copy link
Author

vesper8 commented Oct 5, 2018

I see, well right now all my core deps are showing "^3.0.0-rc.3"

It would be nice if there was some way, some option, to have those updated to "^3.0.4" through the UI

Or even have it update to "3.0.4" in case I don't want automatic upgrades in the future

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants