yarn up — Yarn CLI reference
Update dependencies to the latest versions
yarn up
Update dependencies to the latest versions
This command upgrades packages matching the specified descriptors across the whole project. It updates dependencies and devDependencies; peerDependencies are left unchanged.
If -R,--recursive is set, Yarn refreshes all lockfile resolutions matching the selected packages without editing manifests. Depending on the goal, you may want to run both yarn up and yarn up -R.
If -i,--interactive is set, or if the preferInteractive setting is enabled, the command offers various choices depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.
The -C,--caret, -E,--exact, and -T,--tilde options have the same meaning as in yarn add: they choose the range modifier used when the requested descriptor has no explicit range or uses a tag.
If the --mode=<mode> option is set, Yarn will change which artifacts are generated. The modes currently supported are:
-
skip-buildwill not run the build scripts at all. Note that this is different from settingenableScriptsto false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step but not the scripts themselves, which just won’t run. -
update-lockfilewill skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.
You can think of yarn up as the Yarn 6 counterpart to yarn upgrade --latest in Yarn 1: it ignores the ranges previously listed in your manifests. Unlike yarn upgrade, which only upgraded dependencies in the current workspace, yarn up upgrades all workspaces at the same time.
This command accepts glob patterns as arguments (if valid Descriptors and supported by micromatch). Make sure to escape the patterns, to prevent your own shell from trying to expand them.
Note: The ranges have to be static, only the package scopes and names can contain glob patterns.
Store dependency tags as-is instead of resolving them to versions
Use an exact semver range for resolved versions
Use the ~ semver modifier on the resolved range
Use the ^ semver modifier on the resolved range
Refresh matching lockfile resolutions without editing manifests
Disable the minimum release age check for this command
Select which install artifacts Yarn should generate