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,693 thoughts on “Why you should version your Node dependencies using tilde

  1. The History shaping Online Pokies has been one of the most remarkable developments in the iGaming industry. From the earliest one-armed bandits to the modern digital games we know now slots have gone through a dramatic shift. If you happen to be interested in this journey and at the same time keen to see how far things have come firsthand Vegazone Casino is well worth checking out. For those wanting a deeper dive into current pokies more details are available over at https://3dwave.tech/ which is a spot where players can check out how modern the current lineup really is. The very first slot machines made their debut in the late 1800s. Those first inventions consisted of straightforward lever-operated machines featuring simple fruit and bell symbols paired with a manual arm to set the reels spinning – and this is precisely why they became known as one-armed bandits among players. Throughout the decades as electronics became more common pokies took on new forms. Those decades saw the arrival of electromechanical machines which allowed for additional features compared to the earlier fully manual machines. The biggest shift arrived alongside the move into the digital era in the decades that followed. Instead of manual moving parts these new machines used computer-generated graphics to recreate the spinning reel experience paving the way for bonus rounds that older mechanical slots never had. The turn of the millennium delivered yet another major shift with the birth of online casinos. At last players were able to play casino-style gaming from their own computer this change significantly broadened the audience for slot games. Mobile technology then took things a step further. Gamblers found they could play a full range of slot titles wherever they happened to be no matter the time or place. Nowadays modern releases come packed with stunning graphics along with complex bonus mechanics such as expanding wilds. Developers keep innovating blending elements of video games and blockbuster films to create something truly original for players. When it comes to whats next the development of pokies is set to continue. Fresh developments like AI-driven personalisation has the potential to open up entirely new possibilities for the world of online pokies. In the end the history behind these games highlights how far gaming as a whole has come. No matter your experience level now is a fantastic time to dive into everything modern slots have to offer.

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>