Be the first user to complete this post

  • 0
Add to List

Understanding semver versioning for your nodejs packages

Semver is the standard way of updating the versions of your package in nodejs. After reading through the original article, I decided to put together a quick visual summary of it. Since its just a summary, it won't cover all of the topics, but its enough help you quickly wrap your head around it. The diagram below shows the different parts of a semver version number. parts of semver

When creating a package

PATCH Version Number
  • Starts from 1
  • Increments by 1 when you fix bugs but dont introduce new features.
MINOR Version Number
  • Starts from 0.
  • Indicates a backward compatible new feature.
  • An increment resets the patch number to 0 on each increment.
MAJOR Version Number
  • Starts from 0
  • Incremented only when a backwards incompatible feature is introduced.
  • An increments resets both - Minor and Patch version numbers to 0.

When consuming a package

The diagram below shows the three most important ways in which you consume a package that is versioned using semver. parts of semver

Also Read:

  1. Resolved - sudo npm command not found
  2. Send email using nodejs and express in 5 simple steps
  3. Unit test your Nodejs RESTful API using mocha
  4. Configuring jshint as a pre-commit hook for your nodejs applications
  5. How to publish a package on npm
  6. Testing promise sequence using mocha, chai, chai-as-promised, sinon
  7. Setup passportjs for local authentication and authorization using expressjs
  8. Configure The 'script' tag In package.json To Run Multiple Commands