Publish npm package and automated bump version in the package.json based on Standard Version.
4 Steps will be performed in 1 Command!
- Update Peer Dependencies versions
- Tagging Version and Generate Auto Changelog
- Publish to npm registry
- Push all release change to target branch
$ yarn global add version-pong
$ yarn add -D version-pong
In package.json
{
"scripts": {
"release": "version-pong"
},
"version-pong": {
"method": "yarn build && yarn publish"
}
}
- method - The method that perform for publishing library
If your package need to define peerDependencies
, add target peer dependency package name
to watchDependencies
add library name
to watchDependencies
.
example
In package.json
{
"devDependencies": {
"jest": "^26.0.1",
},
"watchDependencies": ["jest"]
}
Once version-pong is run with published command, it automatically generates peerDependencies
.
example
In package.json
{
"devDependencies": {
"jest": "^26.0.1",
},
"watchDependencies": ["jest"],
"peerDependencies": {
"jest": ">=26.0.1",
}
}
- watchDependencies - List of
devDependencies
to be convert topeerDependencies
. - peerDependencies - Auto Generated Dependencies in
>=xx.xx.xx
version format with watchDependencies by version-pong.
$ version-pong <tag>
example
$ version-pong minor
$ version-pong <tag> -t <tagPrefix>
example
$ version-pong minor -t eslint
- Major - Breaking Change Release
- Minor - Non-Breaking Change Release
- Patch - Bug fix Release
- Beta - Development Release
- -t , --tagPrefix : git tag prefix
- ex. [email protected] (tagPrefix is eslint)