Why you should version your Node dependencies using tilde

I’m going to assume you’re already familiar with SemVer and the NPM tilde extension. If not, get your eye holes around those links, particularly the second one.

Ever since I’ve been working on David I’ve seen a lot of version numbers for node projects. I’ve also authored a few npm packages and node projects myself. I find it hard understand why you wouldn’t use tilde to specify the versions of your dependencies. For example:

~1.0.2

This is shorthand for >= 1.0.2 < 1.1.0. It is saying: If the major or minor version increases then I need to retest my code to check it works on the new version, so don’t depend on that. Although, if there are bug fixes, I want them, and whilst I understand that a bugfix release could break my software, it isn’t meant to, so I’m willing to take the gamble.

The idea is that you’re allowing your dependencies to “self update” within a range that is safe to do so. This is really powerful and you should be using it.

I’ve seen a lot of absolute versions for dependencies, which is fine (you know who you are, you have your reasons), but I also see a lot of reckless version ranges: “>= 0.3.14″, “*”, “latest” which are just mad. How can you possibly know your code will still work as your dependencies transition between major and minor version numbers?

2,176 thoughts on “Why you should version your Node dependencies using tilde

  1. Fresh off un marathon insane en mode multiplier crash. Real talk ça fait une sensation unique quand tu as le timing la seconde parfaite retirer au top. Pour cette grind jai découvert Alexander et jai kiffé grave. Jai alimenté mon compte avec PayPal et jai remarqué quils acceptent aussi Skrill — hyper simple. Regarder le multi grimper te tient en haleine. La clé cest de rester ice cold et surtout prendre tes profits. Contrairement à Spaceman JetX le crash offre un vrai sentiment de maîtrise. Cest une super plateforme si tu es en France. Atmosphère de qualité. Vous serez pas déçus sur https://coedit.re/ et vous verrez par vous-même à quel point cest bon

  2. Jai testГ© Cresus Casino pendant plusieurs sessions et je trouve que le service est de bonne qualitГ©. Linterface est claire et fluide le site est bien optimisГ© sur tГ©lГ©phone. Niveau paiements les dГ©pГґts sont instantanГ©s avec Visa Mastercard PayPal Apple Pay et plusieurs autres mГ©thodes. La version du crash est correcte et fluide et une expГ©rience de jeu stable. Le support est rГ©actif et dans lensemble cest une plateforme fiable. Si vous ГЄtes en France et cherchez du confort Г§a fait une bonne option sur https://garageautomobile.re/

  3. united kingdom gambling online, casino free online video games (Antje) online pokies no downloads usa and free spins no deposit uk low wagering, or is online gambling
    in canada legal

  4. Quad biking in Dubai is definitely something every adventure traveler should try. It is exciting, scenic, and different from normal tourist activities. I think it would be a great highlight of any Dubai trip.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>