https://github.com/playmean/semverity
Easy way to bump version \w conventional commits
https://github.com/playmean/semverity
conventional-commits semantic-version version-bump zero-config
Last synced: 5 months ago
JSON representation
Easy way to bump version \w conventional commits
- Host: GitHub
- URL: https://github.com/playmean/semverity
- Owner: playmean
- License: mit
- Created: 2022-04-01T22:12:05.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-06-20T11:02:55.000Z (12 months ago)
- Last Synced: 2025-08-09T15:46:38.619Z (10 months ago)
- Topics: conventional-commits, semantic-version, version-bump, zero-config
- Language: TypeScript
- Homepage:
- Size: 275 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# semverity
[](https://www.npmjs.com/package/semverity)
zero-config tool for semantic version bump from git conventional commits history
# Installation
Install globally:
```sh
npm i -g semverity
```
Or run with [npx](https://docs.npmjs.com/cli/v8/commands/npx):
```sh
npx semverity
```
# Usage
Bump version from git [conventional commits](https://www.conventionalcommits.org) history:
```sh
semverity bump [semver]
```
Pass **semver** positional argument if you want to offset version.
Bump and patch files with new version:
```sh
semverity patch [semver]
```
# Examples
Your package have version is `0.0.1` and commit `feat: some feature` with sha `1234abcd`:
```sh
semverity patch
cat package.json # and package-lock.json pathed by default
{
...
"version": "0.1.0+sha.1234abcd",
...
}
```
You can specify custom list of files (and dot-notated comma-separated object paths to be patched after **:** symbol):
```sh
semverity patch --files package.json package-lock.json:version,packages..version info.json:meta.version copyright.txt
```
It will also replace all previous `*0.0.1*` strings into `0.1.0+sha.1234abcd` in copyright.txt because it's not json-parseable.
You can also pass `meta.json:` with empty path to `.replaceAll()` with new version.
To automatically commit patched files with `bump: 0.1.0+sha.1234abcd` use:
```sh
semverity patch --commit bump
```