Rory's Blog
Home
Blog
Projects
Facebook
Google+
Github
RSS

NPM Version Standard

04/13/15

So, making a node executable with npm made me realize that I do not know what the numbers mean for versions on npm packages.

As it turns out, it follows the semver standard (I'm guessing it's a standard, still new to this). Semver stands for "Semantic Versioning". Maybe it stands for "Semantic Versioning 2.0.0"? That's what the site says at the top of the page, anyways.

From that site:

Given a version number MAJOR.MINOR.PATCH, increment the:

  1. MAJOR version when you make incompatible API changes,
  2. MINOR version when you add functionality in a backwards-compatible manner, and
  3. PATCH version when you make backwards-compatible bug fixes.

Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

I see. I think this is the same versioning scheme that python uses? Let me check. No, I don't think it's the same, actually. PEP-0440 looks considerably different.

Anyways, this seems familiar, I've encountered it before. I believe I understand the basic concept. Code relies on code, and code evolves. So, updating along these three increments makes sense, such that other code depending on it can know whether or not there will be compatibility issues and such.

What's a good version to start on? 0.1.0? Ah, that's the first question of the FAQ, and 0.1.0 is right.

I guess it might be a good habit to think of version numbers for the stuff I make. I mean, someone might find it useful, and knowledge of this stuff may somehow help when I get around to working on contributing to some open-source projects (would like to do that before the end of April).

Maybe soon my site stuff I'm making will get a proper release version.