yarn install --latest all packages? (I don't care about breaking changes)

Viewed 1369

How do you force yarn to ignore your package.json version ranges/carets and install the very latest stable version of all packages?

I can do yarn add packagename@latest one by one for all of them, but I'd love to do it in one shot, regardless of whether there are breaking changes.

2 Answers

No matter what I tried, I couldn't get yarn to upgrade all the packages to the latest major versions.

install or upgrade with --force --latest didn't work.

This did:

yarn upgrade-interactive --latest

Then press a to select all and enter to upgrade to the latest.

https://classic.yarnpkg.com/en/docs/cli/upgrade-interactive/

You can do it using yarn upgrade.

Below will help you update to latest for all packages and update yarn.lock:

yarn upgrade --force --latest

If you don't want to update the lock file, you can do the following instead:

yarn upgrade --force --latest --no-lockfile
Related