Replies: 1 comment 1 reply
-
TL;DR: The answer is: Thank you for asking this question! ❤️ I struggled with the exact same question for the last almost 2 years of using Yarn 2+ and never found a solution. I find the documentation to be severely lacking on this topic. Your question above triggered me into finding the answer. What you basically want is the Yarn 2+ equivalent of what Your solution of doing From reading the documentation I always believed that |
Beta Was this translation helpful? Give feedback.
-
Is there a way to update packages only to the semver ranges as specified in package.json?
Running
yarn up '**'
seems to override all the versions in the package.json with the--latest
one. The closes equivalent I've found so fa is keeping the caret version such as^4.0.0
in package.json, removing the yarn.lock file and rerunningyarn install
. This recreates the lockfile with the latest semver compatible with^4.0.0
, e.g.,4.3.1
.Example:
will have the following in the lockfile:
Running
yarn up
does nothing. Runningyarn up -C history
upgrades the package to version^5.3.0
in both package.json and yarn.lock. However, deleting the lockfile and runningyarn
will give me this in the lockfile:Beta Was this translation helpful? Give feedback.
All reactions