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

@bzelip/bump

v1.0.2

Published

Automate the version bumping and git committing for new releases of node.js projects

Downloads

4

Readme

Bump 🍑

GitHub package.json version

Automate new releases for node.js projects on the command line.

A new release is defined as:

  1. An incremental increase to the version property in the package.json and package-lock.json files.
  2. A commit of the two json files with a descriptive message about the reason for the version bump.
  3. The optional creation of a tag with a descriptive message.

Install

npm install --global @bzelip/bump

This will install bump globally so that it can be run from the command line.

Use

There are two main commands:

  1. bump <strategy> <message>
  2. bump undo

bump

Bump your version based on a strategy, and include a description of the reason for the bump in the generated commit message.

bump <strategy> <message>
  • major

  • minor

  • patch

Example

Input
# current version 0.4.0

bump minor "create custom slider"
Output
🍑: Successfully minor bumped version to 0.5.0 with the commit message:

"package*: v0.5.0 Bump minor for create custom slider 🎉"

Note bump does not push, it only commits locally.

undo

Undo a bump.

bump undo

This command is an alias for running:

git reset HEAD~

git checkout -- package*

Note Be sure to only use bump undo immediately after bump <strategy> <message> to have the desired action.

Assumptions

  • your project is git tracked
  • you are following Semantic Versioning
  • your current working directory includes both package.json and package-lock.json files

TODO

  • [ ] add the create tag with message option
  • [ ] add tests

My release protocol

My current release protocol includes:

  • git
  • a Semantic Versioning approach
  • a changelog.md
  • once a feature branch's work is finalized and documented in changelog.md:
    1. open package.json, bump the version accordingly
    2. open package-lock.json, bump the version accordingly
    3. commit with message of the form package*: v${version} ${strategy} bump for ${message} 🎉
    4. TODO: create new tag with command of the form: tag v${version} -m ${message}
    5. push to remote, and start the PR process (do this manually after bump.js)
    6. push new tag to remote (do this manually after bump.js)

References

  1. How do I prompt users for input from a command-line script?
  2. Execute a command line binary with Node.js
  3. node.child_process.exec code examples
  4. How to append to New Line in Node.js
  5. node.os.EOL
  6. package.json
  7. publishing scoped public packages
  8. How to use yargs
  9. My accepted answer to a yargs question on !SO