Npmjs Versioning Covenant

I would like to share some technical information about versioning covenants. For the instance, I will share my knowledge about npmjs versioning. Npm is package manager for NodeJS (a very extended javascript library).

For plugins modules or any javascript project, sometimes is better to use a number reference to documentate code changes. This numerical reference is the project version.

For npmjs covenant versions should have the following structure: X.Y.Z (1.3.4) where whe can make distinction between 3 numbers:
  • The last number is the bugfix/updates version: It should be increased when:
    • Sources doesn't have any new feature (project stills working as before, same functions/calls/behavior).
    • A bug is fixed (some functionallity wasn't working as expected so it was corrected without external changes).
    • Bugfix/updates should never break external behavior (plugins/codes that use this plugin should no have problems updating).
    • Code Refactor: Rewriting code to reduce the ammount of lines keeping external functinality without any difference.
  • The midle number (known as minor version) is the Feature version:
    • With minor versions project stills working without breaking any old mechanic, it is safe to update.
    • For minor versions, new features have been added, new functionalities that can (optionally) be used after updating.
  • The first number is the major version:
    • Major version will be used when breaking changes are performed. Breaking changes are changes that takes effect on external libraries:
      • Removing commands/methods/functionalities that were available in the last version.
      • Changing external command/methods arguments or event their internal functionality modifying what is performed.
Each one of the 3 numbers can be increased until infinite: (1.24543.43, 1323.434.1, ...) (It is not a decimal number system).

Of course, this is not the unique version notation. There are more versioning standars. I expect that information to be useful to somebody, a good versioning system helps to work in bigger teams with git repositories.

Original thread: https://forums.rpgmakerweb.com/threads/npmjs-versioning-covenant.123385/