Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Reddit
Share On Stumbleupon
Contact us
Hide Buttons

Understanding semver versioning for your nodejs packages

Semver is the stan­dard way of updat­ing the ver­sions of your pack­age in nodejs. After read­ing through the orig­i­nal arti­cle, I decided to put together a quick visual sum­mary of it. Since its just a sum­mary, it won’t cover all of the top­ics, but its enough help you quickly wrap your head around it.

The dia­gram below shows the dif­fer­ent parts of a semver ver­sion number.

parts of semver

When cre­at­ing a package

PATCH Ver­sion Number

  • Starts from 1
  • Incre­ments by 1 when you fix bugs but dont intro­duce new features.

MINOR Ver­sion Number

  • Starts from 0.
  • Indi­cates a back­ward com­pat­i­ble new feature.
  • An incre­ment resets the patch num­ber to 0 on each increment.

MAJOR Ver­sion Number

  • Starts from 0
  • Incre­mented only when a back­wards incom­pat­i­ble fea­ture is introduced.
  • An incre­ments resets both — Minor and Patch ver­sion num­bers to 0.

When con­sum­ing a package

The dia­gram below shows the three most impor­tant ways in which you con­sume a pack­age that is ver­sioned using semver.

parts of semver

Ryan Sukale

Ryan is just a regular guy next door trying to manage his life and finances.