Yarn Version |verified| 🆒 ✨

Use yarn version for simple, automated version bumping in CI or release scripts. For complex monorepos or modern Yarn (v2+), prefer the workflow. Always push tags manually after verifying the release. Report generated based on Yarn Classic (v1.x) behavior.

# Starting version: 1.0.0 yarn version --patch package.json version becomes 1.0.1 Git tag: v1.0.1 Bump minor version yarn version --minor package.json version becomes 1.1.0 Bump major version yarn version --major package.json version becomes 2.0.0 Set explicit version yarn version --new-version 3.0.0-beta.1 yarn version

1. Overview

| Error | Likely Cause | Solution | | :--- | :--- | :--- | | Working tree has uncommitted changes | Git repository has modified files. | Commit or stash changes before running. | | Not a git repository | Project not initialized with Git. | Run git init . Use --no-git-tag-version to skip. | | Invalid version | --new-version value is not semantic. | Use valid semver (e.g., 1.2.3 , 2.0.0-beta.1 ). | Use yarn version for simple, automated version bumping

| Feature | yarn version | npm version | | :--- | :--- | :--- | | Git tag format | v1.0.0 (fixed) | v1.0.0 (default, configurable) | | Pre-commit hook | None (requires clean git state) | Supports preversion , version , postversion scripts | | Custom commit message | --message flag | --message flag | Report generated based on Yarn Classic (v1

The yarn version command is a built-in Yarn (Classic) CLI command used to manage a project's version number. It automates the process of updating the version field in the package.json file, creating a corresponding Git tag, and optionally committing the change.