Makes bumping your monorepos workspaces version a breeze 🌬️.
MIT License
Makes bumping your monorepos workspaces version a breeze 🌬️.
It's mostly useful for those using Yarn Berry (v2/v3), but you can use it with npm, pnpm and Yarn Classic (v1).
prewersion
& postwersion
scriptsnpm
, pnpm
, Yarn Classic (v1)
& Yarn Berry (v2, v3)
package managers--dry-run
CLI optionallowedBranches
configuration keywersion 1.2.3
)workspaces
field in your package.json
file (i.e. `"workspaces": ["packages/*"]``)First, install Wersion:
yarn add -DE wersion
# or
pnpm i -DE wersion
# or
npm i -DE wersion
# or
npm i -g wersion # to install it globally
Simply run:
yarn wersion <release>
# or
pnpm wersion <release>
# or
npx wersion <release>
# or
wersion <release> # if installed globally
<release>
can be one of: "patch", "minor", "major", "prepatch", "preminor", "premajor" or "prewersion".
You can run it with --dry-run
or -d
to see what would happen without actually bumping your packages versions.
In your package.json
:
{
"scripts": {
"prewersion": "echo \"The version will be bumped from v${PREVIOUS_VERSION} to v${NEXT_VERSION}.\"",
"postwersion": "echo \"The version has been bumped from v${PREVIOUS_VERSION} to v${NEXT_VERSION}.\""
}
}