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

versionity

v0.4.0

Published

CLI application which wraps the semver specification to control the version of an npm package.

Downloads

10

Readme

Introduction

versionity is a CLI application that allows the version of any node.js package to be updated using the semver specification. It's essentially a wrapper on top of the semver package, but it will also apply the version change to the package.json directly, as-well as publish the newly version module if specified.

The utility is best suited when hooked into a CI process, such that package versions are incremented correctly.

Installation

$ npm install versionify -g

Usage

Options:

  -h, --help                     output usage information
  -V, --version                  output the version number
  -i. --identifier [identifier]  A custom identifier that can be specified for pre-type version updates.
  -p, --publish                  Automatically publishes the application after performing the version update
  -d, --directory                Change the directory where the package.json is located.
  -vo, --versionOnly             This will only output the updated version number to stdout. All other logging is disabled.

The CLI supports any of the semver release type commands for incrementing the version number, this includes:

  • major
  • premajor
  • minor
  • preminor
  • patch
  • prepatch
  • prerelease

The application must run at the root of a node.js application directory. And there must be a valid package.json with a version key present in that directory.

Please find some examples below.

The below examples are based on an initial package version of: 0.1.0:

{
  "name": "header-router",
  "version": "0.1.0",
  ...
}

The following command will update the package.json version to 1.0.0 as it's a major version change.

versionity major
Successfully updated package: header-router version from: v0.1.0 to v1.0.0

The following will update the version to the next patch version:

versionity patch
Successfully updated package: header-router version from: v1.0.0 to v1.0.1

The following will perform a prerelease version update:

versionity prerelease
Successfully updated package: header-router version from: v1.0.1 to v1.0.2-0

When specify any pre-* release semver update, you can use the --identifier, or -i option to specify a custom identifier. Example:

versionity preminor --identifier SNAPSHOT
Successfully updated package: header-router version from: v1.0.2-0 to v1.1.0-SNAPSHOT.0

In additon, you can also request versionity to publish the module to a pre-configured npm registry by adding the --publish options. Examples below performs a major version update and publishes the new versioned package:

Successfully updated package: header-router version from: v1.1.0-SNAPSHOT.0 to v2.0.0
Publishing package...
Successfully published module. + [email protected]