@magic/bumper
bump package version,git tag, commit and push,npm test, update, and publish,all in one cli script.
install
npm i -g @magic/bumper
usage
be in a node repository (package.json exists)
show changes
for safety, magic-bumper only outputs the changes that would be done
magic-bumper
--serious
to actually make magic-bumper do something, use the --serious flag
magic-bumper --serious
- git diff, stop if there are uncomitted changes
- if --update: update npm dependencies
- npm run tests, stop if tests fail
- bump the version number with the lowest priority (patch or alpha)
- if --serious: write changes to package.json and package-lock.json
- if --serious: git commit -m "bump version to 1.2.3"
- if --serious: git tag -a v1.2.3 -m "v1.2.3"
- if --serious: git push --tags
- if --serious: npm publish
no priority
bumps
0.0.1 to 0.0.2
and
0.0.1-alpha.0 to 0.0.1-alpha.1
magic-bumper
bump the version specified.
magic-bumper --(major|minor|patch)
bump major
bumps 0.x.x to 1.0.0
magic-bumper --major
bump minor
bumps 0.1.x to 0.2.0
magic-bumper --minor
bump patch
bumps 0.0.1-alpha.0 to 0.0.2
magic-bumper --patch
bump alpha
bumps 0.1.1 to 0.0.1-alpha.0
and
0.1.1-alpha.0 to 0.1.1-alpha.1
magic-bumper --alpha
bump beta
bumps 0.1.1 to 0.0.1-beta.0
0.1.1-alpha.0 to 0.1.1-beta.0
0.1.1-beta.0 to 0.1.1-beta.1
magic-bumper --beta
update dependencies
delete package-lock.json and node_modules, then npm install to get the newest dependencies.
it's slow, but faster then the alternatives that make sure all deps (including git repos) get updated.
magic-bumper --update
source
the source for this page is in the example directory and gets built and published to github using @magic/core