npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

incv

v2.1.1

Published

Simple version bumping tool for Node.js, with customizable tags.

Downloads

27

Readme

Contributors Forks Stargazers Issues MIT License LinkedIn

About The Project

incv usage

Sometimes you need to bump the version in your package.json file automatically. For example, you might:

  • Have a CI/CD pipeline, and want to automatically bump the patch version of your library on merge to your develop branch
  • Have a workflow (e.g. on Bitbucket Pipelines, GitHub actions etc.) that allows developers to automatically perform version bumps by including tags in their commit message (e.g. [major], [minor])
  • Just want to reduce the chances of human error when bumping version numbers manually

incv is a command-line utility for doing all of the above.

This is a rough port of my version bumper library for Python, dodgem. That name was taken on the npm package registry aready so I went with incv for increment version. My imagination was apparently off its game when I created this repo.

Built With

This project uses:

  • meow for its CLI
  • chalk for colorized CLI output

Getting Started

Getting started is straightforward.

Prerequisites

You'll need Node.js 14 or newer with npm to install incv.

Installation

Install incv using npm and you're done.

npm install incv --save-dev

Test your installation with:

incv --help

You should see help documentation printed.

Usage

You can use incv --help for detailed information on using the utility:

  Simple version bumping tool for Node.js, with customizable tags.

  Usage
    $ incv [options]

  Options
    --commit-message, -c  The commit message to use to bump the version (default: '')
    --major-tag           The major version bump tag to search for in commit messages (default: '[major]')
    --minor-tag           The minor version bump tag to search for in commit messages (default: '[minor]')
    --patch-tag           The patch version bump tag to search for in commit messages (default: '[patch]')
    --prerelease-tag      The prerelease version bump tag to search for in commit messages (default: '[prerelease]')
    --build-tag           The build version bump tag to search for in commit messages (default: '[build]')
    --prerelease-token    The prerelease token to prepend to the prerelease version (default: 'prerelease')
    --build-token         The build token to prepend to the build version (default: '')
    --major               Specifies that a major version bump should be performed (default: false)
    --minor               Specifies that a minor version bump should be performed (default: false)
    --patch               Specifies that a patch version bump should be performed (default: true)
    --prerelease          Specifies that a prerelease version bump should be performed (default: false)
    --build               Specifies that a build version bump should be performed (default: false)
    --dry                 Specifies that the bumped version should not be written to disk (default: false)
    --quiet               Suppresses informational output (default: false)
  Boolean options can be inverted by prefixing '--no-' (e.g. '--no-patch').

  Examples
    $ incv --major # Major version bump.
    $ incv --commit-message='[major] First major release!' # Major version bump via commit message.

Example: Bump Minor Version

Bump the minor version of your project like this:

incv --minor

If you don't want to commit the change to disk, use --dry like so:

incv --minor --dry

If the informational output given by the CLI is getting in the way of downstream processing, use --quiet:

incv --minor --quiet

Example: From Commit Message

Dodgem can bump your project version based on a commit message. By default.

  • If the message contains [major] then a major version bump will be performed
  • If the message contains [minor] then a minor version bump will be performed
  • Otherwise, a patch version bump will be performed

For example, to use your last git commit message to bump your projects version.

incv --commit-message="$(git log -1)"

Example: Custom Tags

If the default [major] and [minor] tags don't suit you, and you'd perfer (major), (minor) and an explicit (patch) tag:

incv --commit-message="$(git log -1)" --major-tag='(major)' --minor-tag='(minor)' --patch-tag='(patch)' --no-auto-patch

Roadmap

See the open issues for a full list of proposed features (and known issues).

Contributing

Any contributions are very welcome. Please fork the project and open a PR, or open an issue if you've found a bug and/or would like to suggest a feature.

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Saul Johnson - @lambdacasserole - [email protected]

Project Link: https://github.com/lambdacasserole/incv

Acknowledgments

The following resources are awesome: