A simple command-line utility that updates the version in your project's package.json file
These instructions will get you a copy of update-v
on your local machine.
update-v
is available via npm
npm i -g update-v
- node-fs-extra - Reading/writing JSON files
- command-line-args - Processing command-line flags
We use SemVer for versioning.
If you would like to contribute to this project, first of all, thank you.
- Martin Cox - Initial work
This project is licensed under the MIT License - see the LICENSE file for details
This is how you can use update-v
.
Just run update [-m|-f|-p]
.
Example
$ cd my/awesome/module
$ update-v -p
Updates the package.json
file -> version by 0.0.1
.
Below is update-v
's API reference.
Increment the first version digit (breaking change)
- Type:
Boolean
Example
$ update-v -m
// Change package.json file from this:
{
"version": "1.0.0"
}
// Into this:
{
"version": "2.0.0"
}
Increment the second version digit (additional feature)
- Type:
Boolean
Example
$ update-v -f
// Change package.json file from this:
{
"version": "1.0.0"
}
// Into this:
{
"version": "1.1.0"
}
Increment the third version digit (patched issue)
- Type:
Boolean
Example
$ update-v -p
// Change package.json file from this:
{
"version": "1.0.0"
}
// Into this:
{
"version": "1.0.1"
}