yarn upgrade will respect your version constraints - as opposed to yarn upgrade --latest, which will most likely break everything.
syncyarnlock will transfer the installed version numbers from yarn.lock to package.json, plain and simple - the --save option makes it write the changes back to package.json, so you can git diff and review the results, while --keepPrefix will preserve the ^ or ~ operators in your existing package.json version constraints.
yarn install finally will update your yarn.lock using the updated version constraints - it won't install anything new at this point, but this step is required, or yarn will complain later that your yarn.lock is outdated with the new version constraints in your updated package.json.
Okay, so I finally found the answer I was looking for:
yarn upgrade
will respect your version constraints - as opposed toyarn upgrade --latest
, which will most likely break everything.syncyarnlock will transfer the installed version numbers from
yarn.lock
topackage.json
, plain and simple - the--save
option makes it write the changes back topackage.json
, so you cangit diff
and review the results, while--keepPrefix
will preserve the^
or~
operators in your existingpackage.json
version constraints.yarn install
finally will update youryarn.lock
using the updated version constraints - it won't install anything new at this point, but this step is required, or yarn will complain later that youryarn.lock
is outdated with the new version constraints in your updatedpackage.json
.That was fantastic, thanks!!