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?

3,669 thoughts on “Why you should version your Node dependencies using tilde

  1. Pa senare tid har jag blivit intresserad av hur casinospel fungerar bakom kulisserna och jag tankte diskutera mina upptackter med andra gamers. Nar jag testar olika casinoplattformar tanker jag pa vad som paverkar ett intressant casinospel. Ett exempel som fick min uppmarksamhet ar Vegazone och det vackte min nyfikenhet kring hur digitala spel utvecklas. En stor del av communityn fokuserar mycket pa spelutbud men enligt min mening att tekniken bakom tjansterna ocksa ar viktig att forsta. Om man analyserar mer ser man att flera komponenter paverkar helheten for att skapa ett battre anvandarflode. Efter att ha utforskat omradet insag jag att https://tinkerersfablab.tech/ kan vara intressant nya perspektiv pa onlinecasino. En sak jag markte ar att smarta funktioner har stor betydelse for hur manniskor anvander en tjanst. Till exempel kan enkla menyer gora skillnad. Min uppfattning ar att nya digitala tjanster kommer att utvecklas kring anvandarupplevelse. Dagens gamers soker enklare losningar. Det handlar inte bara om grafiken utan ocksa om hur allt fungerar tillsammans. Nagot annat intressant ar att anvandarnas asikter paverkar framtida forandringar. Nar spelare diskuterar sina erfarenheter kan foretag lara sig mer vilka funktioner som fungerar. Jag undrar hur andra spelare ser pa utvecklingen inom spelplattformar. Lagger ni marke till tekniska detaljer nar ni anvander en tjanst? Vad anser ni ar viktigast for en modern spelplattform? Handlar det om tekniken? Det vore intressant att lasa era erfarenheter sarskilt fran svenska gamers som anvander olika onlineplattformar. Att diskutera ideer kan gora communityn battre och skapa forstaelse for framtidens casinospel.

  2. Recently I started looking into the entertainment part of online casinos and I decided to talk about how online gamers communicate about games. During my time in different gaming forums I realized that different players often discuss not only gameplay. Topics such as personal experiences may allow other gamers understand gaming services. One name that I came across was Skycrown casino because it reminded me about how important shared knowledge can be. In my opinion an enjoyable platform is not only about available titles but also about how users communicate. After exploring different discussions I started to see that https://leeper.run/ can be useful when looking at player experiences. A lot of gamers exchange ideas about overall experience and these conversations often give a better understanding before trying new platforms. For me this community approach makes online entertainment more interesting. Rather than using a platform without feedback users can learn from others. Like long-time gamers often explain what they like about different games. That helps new members feel more confident when trying digital services. One more detail is that player groups can develop unique environments where users talk about experiences. Of course everyone has a different style so one opinion cannot represent everyone. Because of this I find it interesting to compare different opinions. I want to hear from experienced players how they evaluate online casinos. Would you prefer to look for feedback before starting a game? Would you say shared experiences can influence your choices? I’d like to hear your experiences about casino communities especially from people from the local gaming community. Sharing experiences can help players learn and improve the overall experience.

  3. Hey are using WordPress for your site platform? I’m new to
    the blog world but I’m trying to get started and set
    up my own. Do you need any coding knowledge to make
    your own blog? Any help would be greatly appreciated!

    Here is my homepage – free blackjack machine (Karolyn)

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>