Semantic Versioning

Idea is not new, similar approach can be found in many places but now it has nice name.

Lately I read Node Web Development and Node.js modules in npm used this approach to make npm so awesome.

Read more at website: http://semver.org/

In a brief:

  1. There is API, it can be code or whatever but this is treated like API.
  2. Use 3 numbers: 1.2.3 - <major>.<minor>.<patch>
  3. Patch - bugifex - API comatible
  4. Minor - new or compatible API changes
  5. Major - any incompatible API changes
How this can help?
By using "strict" convention this can be used by tools (like npm) to make it easier to You to update dependencies. If You use library in version 1.2.0, then You can update easily it up to 2.0.0! Of course it is better co confirm it by developer that this really works, but if library developer uses semver like You, it should!

There are many other rules, if You can't use it, at leas show it to You's co-workers, it would be great to really standardize this, at low level. 

But I am curious, if I have common module that gets data from DB, and displays it on page... What changes are compatible? If only users use this html code, all changes are compatible, or incompatible...
Maybe semver is just for libraries, not front-end staff like html?
For xml/json it is easier, there is only data. 
Html has also id's and classes, there is CSS and JavaScript that are tight coupled. 


Comments

Popular posts from this blog

How to simulate slow connection (developer proxy in Node.js)

How to use NPM packages from private repositories on bitbucket