verinc
v1.0.2
Published
CLI tool to increment the patch version in package.json
Readme
pvi
A simple CLI tool that increments the version in package.json.
Installation
npm install -g pviOr use directly with npx:
npx pviUsage
In any directory with a package.json file, run:
pvi [release-type]Where [release-type] is optional and can be one of:
major- Increment the major version (1.0.0 → 2.0.0)minor- Increment the minor version (1.0.0 → 1.1.0)patch- Increment the patch version (1.0.0 → 1.0.1) [default]premajor- Increment to a pre-release major version (1.0.0 → 2.0.0-0)preminor- Increment to a pre-release minor version (1.0.0 → 1.1.0-0)prepatch- Increment to a pre-release patch version (1.0.0 → 1.0.1-0)prerelease- Increment the pre-release version (1.0.0-0 → 1.0.0-1)
Examples:
pvi # 1.0.0 → 1.0.1
pvi minor # 1.0.0 → 1.1.0
pvi major # 1.0.0 → 2.0.0
pvi prerelease # 1.0.0 → 1.0.1-0Features
- Uses semver for reliable version parsing and increments
- Preserves the original indentation and formatting of your package.json file
- Simple, focused tool with a single purpose
- Works with npx without installation
License
ISC
