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:

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 - ..
  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.

Share on Hacker News
Share on LinkedIn

← Home

Want to learn more?

Sign up to get a digest of my articles and interesting links via email every month.

* indicates required

Please select all the ways you would like to hear from Krzysztof Kula:

You can unsubscribe at any time by clicking the link in the footer of my emails.

I use Mailchimp as a marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.