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

watch-version

v1.2.0

Published

An update package version fire with git tag command

Downloads

14

Readme

watch-version

What is it for?

This module can automatically update the version of your node app ( or API) when enter a new tag on github by console

Install

  sudo npm install -g watch-version

Use

1.- Standing in the path thats contains the .git folder and your package.json file and change its permissions:

  sudo chmod 777 package.json

You must realize this operation every time that you do a pull, because GITHUB only support 2 filemodes 644 and 755... it's a shame.

2.- Run whatch-version:

  watch-version

3.- In another tab add a github tag conventionally, as explained in github documentation (https://git-scm.com/book/en/v2/Git-Basics-Tagging#Annotated-Tags):

  git tag -a v2.0.0 -m "new release"

4.- See your package.json and check your version :smile_cat:

Now just rocks!

Good practices: versioning

I decided to include a short text about the versioning.

First of all , I must say that there are several classifications of versioning.

The nomenclature used in NPM versioning is called semantic versioning, the following image shows what they work:

alt tag

As you can see, the last digit increases when you make backwards-compatible bug fixes, the middle digit increase when you add functionality in a backwards-compatible manner and the first digit increase when you make incompatible API changes.

criteria

This is fine, but how to define a criteria when one of the digits must increase. In other words, when I release a new version?

The answer that we define with my team is as follows:

When we develop news improves we work in a separate branch of production (for example:testing), in this branch we do a lots of commits. And only when we merge this with the master branch and upload to production we make a versioning that involve one of the 2 first version digit.

Then when bugs appear in production, we fixit in another branch and when we merge with master and up to production again there we do a version update to the last digit, so we prevent an excessive increase of numbers ( like 2.89.104 ).

This is our criteria to generate more controlled release with a more interesting documentation (change log).

Of course it is not a rule for all, but it is important to consider a methodology of work with respect to the objectives of the company and versioning system