yarn upgrade-interactive doesn't seem to find out all the latest version of pkg.json

Created on 20 May 2017  ·  3Comments  ·  Source: yarnpkg/yarn

This is my pkg.json ,as u can see the version of vue-router is ^2.3.1

image

when i run yarn upgrade-interactive ,it says :

image

but the latest version of vue-router is 2.5.3

image

then i run yarn upgrade vue-router

image

I hope any one could help me find how the two commands have different results.

needs-confirmation needs-discussion triaged

Most helpful comment

I think this is happening because on the latest install, your vue-router package was already updated to 2.5.3 and modified yarn.lock's version. Since upgrade-interactive command checks the version field in the existing lockfile (version is 2.5.3, and satisfies ^2.3.1) , it technically is up-to-date. On the other hand, upgrade [package] command does a fresh install based on latest tag and would update the required version in package.json from ^2.3.1 to ^2.5.3. I guess upgrade-interactive should also update the requirements in package.json if the range is lower than the installed version, but I'd like to hear from others what the best approach would be.

All 3 comments

I think this is happening because on the latest install, your vue-router package was already updated to 2.5.3 and modified yarn.lock's version. Since upgrade-interactive command checks the version field in the existing lockfile (version is 2.5.3, and satisfies ^2.3.1) , it technically is up-to-date. On the other hand, upgrade [package] command does a fresh install based on latest tag and would update the required version in package.json from ^2.3.1 to ^2.5.3. I guess upgrade-interactive should also update the requirements in package.json if the range is lower than the installed version, but I'd like to hear from others what the best approach would be.

Closing due to lack of activity and responses.

I think that upgrade-interactive should update package.json accordingly, as @kaylieEB suggested.

Was this page helpful?
0 / 5 - 0 ratings