yarn version apply — Yarn CLI reference

Apply deferred records to workspaces

Docs/Reference/CLI/version/apply

yarn version apply

Apply deferred records to workspaces

yarn version apply

This command will apply the deferred version changes to workspaces. The applied records are removed from the project, unless --prerelease is set, in which case they are kept so that a later stable apply can still consume them.

It is equivalent to running yarn version decline --immediate: by default only the current workspace will be bumped, --all applies the deferred records of all the workspaces in the project, and attempting to apply a record that would lower the version of a workspace will throw an error unless --force is set. For more information on the options, see the yarn version command.

This command only updates the versions of the bumped workspaces; it doesn’t update the ranges that other workspaces use to depend on them. Use the workspace:^ / workspace:~ ranges if you need them to follow the version bumps.

#--allboolean

Apply the deferred records of all workspaces

#--recursive, -Rboolean

Not supported yet; consider using --all instead

#--prereleasestring

Specify a prerelease pattern to use when computing the new versions

#--dry-runboolean

Print the new versions without actually bumping them

#--forceboolean

Bypass the check for bumping to a lower version than the current one

#--jsonboolean

Format the output as an NDJSON stream

Examples#

Apply the deferred version change to the current workspace

yarn version apply

Apply the deferred version changes to all the workspaces of the project

yarn version apply --all