This is my pkg.json ,as u can see the version of vue-router is ^2.3.1
when i run yarn upgrade-interactive
,it says :
but the latest version of vue-router is 2.5.3
then i run yarn upgrade vue-router
I hope any one could help me find how the two commands have different results.
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.
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. Sinceupgrade-interactive
command checks theversion
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 onlatest
tag and would update the required version inpackage.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.