@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/bumperusage
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-bumperbump the version specified.
magic-bumper --(major|minor|patch)bump major
bumps 0.x.x to 1.0.0
magic-bumper --majorbump minor
bumps 0.1.x to 0.2.0
magic-bumper --minorbump patch
bumps 0.0.1-alpha.0 to 0.0.2
magic-bumper --patchbump 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 --alphabump 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 --betaupdate 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 --updatesource
the source for this page is in the example directory and gets built and published to github using @magic/core