Yarn Version -

While you can edit the JSON file directly, bypassing yarn version means you lose the automatic Git tags. Tags are the source of truth for releases. If your package.json says 1.2.0 but your git tag says v1.3.0 , you have created confusion that will haunt your CI/CD pipeline.

One of the most powerful, yet overlooked, features of yarn version is the ability to hook into the lifecycle of the versioning process. yarn version

yarn version --minor # Moves 1.0.1 -> 1.1.0 While you can edit the JSON file directly,

"scripts": "preversion": "npm test", "postversion": "git push && git push --tags" 1.1.0 "scripts": "preversion": "npm test"

info Current version: 1.0.0 info New version: 1.0.1 Done in 0.12s.

You can explicitly set a version:

yarn version