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

node-version-up

v1.1.0

Published

Increase version number in your react or node app in your package.json with one command

Downloads

465

Readme

Install

npm install node-version-up

Node/React version upper

Increase major, minor or patch part of the version in your app in package.json with one command.

With this script you can:

  • Increase major, minor or patch part in the version.
  • Make a git commit with version changes.
  • Make a git tag with new version.

Usage

1. Make sure you have defined the version and script

{
  "name": "your-project-name",
  "version": "1.0.0",
  "scripts": {
    "version-up": "node ./node_modules/node-version-up/index.js"
  }
}

2. Run version up.

> npm run version-up --{major | minor | patch}

Example

> npm run version-up patch

I'm going to increase the version in:
  - package.json (/Users/joshconlin/development/node-version-up/package.json);

The version will be changed:
  - from: 1.0.0
  - to:   1.0.1

You are currently on branch master. 

Do you want to use this branch? [y/n]
y

Use "1.0.1" as the next version? [y/n] y

Updating versions
  Updating version in package.json...
    Version in package.json changed.

I'm ready to cooperate with git!
  I want to make a commit with message:
    "Release 1.0.1: increase version."
  
Do you want me to do this? [y/n] y
  
Committed!

  I want to push this commit. Is this okay? [y/n]
y

Commit Pushed!

  I want to add a tag:

  "v1.0.1"

Do you allow me to do this? [y/n]
y

Branch Tagged!


Do you want me to push this tag? [y/n]
y

Tag pushed!

You're all done!

Options

You can pass option name and value with following syntax (remember to put -- before options):

npm run version-up --flag value

| Option | Type | Default value | Description | |------------|----------|-------------------|-----------------| | --major or --mj | flag | | Increase major version:0.0.0 -> 1.0.0 | | --minor or --mn** | flag| | Increaseminor version:<br/>0.**0**.0 -> 0.**1**.0 | | **--patch or --p | flag | | Increase patch version:0.0.0 -> 0.0.1 | | --message or --m | string | "release ${version}: increase versions and build numbers" | Custom commit message. | | --tag or --t | string | v{major}.{minor}.{patch} | Custom git tag | | --pathToPackage './path' | string | ./package.json | Path to package.json file in your project. |