A short explanation of semantic versioning

August 10, 2020

Semantic versioning is a way for library authors to communicate to consumers that you’ve released a new version and information about the kind of version you’ve published. I’ve written about this in more depth before, but here’s the gist:

  • If you start at version 1.0.0 and you just published a small change like a bugfix or edited the docs, you want to bump the third number and end up with 1.0.1. That’s referred to as a PATCH.
  • If you start at version 1.0.0 and you added a feature that doesn’t break the ability of existing library consumers to interact with the library, that’s a MINOR change. You’ll bump the second number, and end up with 1.1.0.
  • If you start at version 1.0.0 and change your library’s API so that your consumers need to rewrite their code to continue using your library, that’s a MAJOR change. You’ll need to bump the first number, and you’ll end up with 2.0.0.

When you’re installing open-source packages, check the version number. The authors of the component library are trying to communicate details about the package’s stability to you.

Hungry for more?

Let's talk coding.

I send articles about working as a software engineer, tips and tricks about React and building component libraries, and the occasional personal post. You can unsubscribe at any time.

All content © Mae Capozzi