https://github.com/ivangabriele/wersion
Makes bumping your monorepos workspaces version a breeze 🌬️.
https://github.com/ivangabriele/wersion
bump lerna monorepo monorepos monorepository pnpm version versioning workspace workspaces yarn
Last synced: about 1 year ago
JSON representation
Makes bumping your monorepos workspaces version a breeze 🌬️.
- Host: GitHub
- URL: https://github.com/ivangabriele/wersion
- Owner: ivangabriele
- License: mit
- Created: 2023-07-03T15:11:07.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-30T07:46:56.000Z (about 2 years ago)
- Last Synced: 2024-05-01T14:06:57.902Z (about 2 years ago)
- Topics: bump, lerna, monorepo, monorepos, monorepository, pnpm, version, versioning, workspace, workspaces, yarn
- Language: JavaScript
- Homepage:
- Size: 2.71 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Wersion
[](https://github.com/ivangabriele/wersion/blob/main/LICENSE)
[](https://www.npmjs.com/package/wersion)
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).
---
- [Features](#features)
- [Roadmap](#roadmap)
- [Installation](#installation)
- [Prerequisites](#prerequisites)
- [First Setup](#first-setup)
- [Usage](#usage)
- [Pre \& Post Scripts](#pre--post-scripts)
---
## Features
- [x] `prewersion` & `postwersion` scripts
- [x] `npm`, `pnpm`, `Yarn Classic (v1)` & `Yarn Berry (v2, v3)` package managers
- [x] `--dry-run` CLI option
## Roadmap
- [ ] `allowedBranches` configuration key
- [ ] Specified version support (i.e. `wersion 1.2.3`)
## Installation
### Prerequisites
- npm, pnpm or Yarn v1/v3
- Setting the `workspaces` field in your `package.json` file (i.e. `"workspaces": ["packages/*"]``)
### First Setup
First, install Wersion:
```sh
yarn add -DE wersion
# or
pnpm i -DE wersion
# or
npm i -DE wersion
# or
npm i -g wersion # to install it globally
```
## Usage
Simply run:
```sh
yarn wersion
# or
pnpm wersion
# or
npx wersion
# or
wersion # if installed globally
```
`` 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.
### Pre & Post Scripts
In your `package.json`:
```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}.\""
}
}
```