2.3.2 • Published 7 months ago

fist-bump v2.3.2

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

fist-bump 👊

Bump the version of your package.json based on your commit messages

features

  • Bump the version of your package.json based on your commit messages
  • Automatically ammend version update to the last commit
  • Integrate with git hooks (coming soon)

installation

Recommended to install as a dev dependency

npm install --save-dev fist-bump

usage

# current version: 1.0.0

# prefixing a commit message with the supported keywords
git commit -m 'feature: added new feature'

# run fist bump to update the version of your package.json
npx fistbump

# the new version => 1.1.0
# the updated commit message => '[1.1.0] feature: added new feature'

good to know: fist-bump will skip any commits that have 'skip' and 'wip' or an existing version tag in the commit message.

configuration

To customize this fist-bump, all you have to do is add a fistbump property to your package.json file.

{
 "fistbump": {
  "patch": [ "fix", "patch" ], // `1.0.0` -> `1.0.1`
  "minor": [ "feature", "config", "minor" ], // `1.0.0` -> `1.1.0`
  "major": [ "breaking", "release", "major" ], // `1.0.0` -> `2.0.0`
  "position": "start" // `(v1.1.0) feature: added new feature`
 }
}

Note: the example above shows the configuration values

versioning keywords

The patch, minor, major properties represent the type of version bump that will be applied to your package.json (see semantic versioning for more details):

typedefault keywordsversion bumpdescription
patchfix, patch1.0.0 -> 1.0.1bug fix, backwards compatible
minorfeature, config, minor1.0.0 -> 1.1.0new feature, backwards compatible
majorbreaking, release, major1.0.0 -> 2.0.0breaking change, not backwards compatible

The keywords are case sensitive and will be matched against the following pattern in your commit message: <keyword>: or [<keyword>]. For example, the following commit messages will be matched against the patch keyword:

  • fix: fixed a bug => the keyword is fix which belongs to the patch version type
  • feature|major: a whole new way to do stuff => the keyword is feature which belongs to the minor version type even though it also matches the major keyword

Note: adding custom keywords to will completely override their default keywords, respectively. in other words, if you add a custom patch keyword, the default fix and patch keywords will no longer be supported.

configuring the tag position - position

The position property determins where the version tag will be placed in the commit message.

positionexample commit message
start(v1.1.0) feature: added new feature
endfeature: added new feature (v1.1.0)

contributing

Want to contribute?

  1. read the contributing doc
  2. open an issue or submit a pull request with your changes

changelog

To see what has changed between versions, check out the changelog.

security

If you discover a security vulnerability, feel free to open an issue at github.com/this-oliver/fist-bump/issues. All security vulnerabilities will be promptly addressed.

2.3.2

7 months ago

2.0.0

8 months ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago