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?

207 thoughts on “Why you should version your Node dependencies using tilde

  1. Этот информативный текст отличается привлекательным содержанием и актуальными данными. Мы предлагаем читателям взглянуть на привычные вещи под новым углом, предоставляя интересный и доступный материал. Получите удовольствие от чтения и расширьте кругозор!
    Узнать из первых рук – https://2bbm.ru/?paged=11

  2. Эта информационная заметка содержит увлекательные сведения, которые могут вас удивить! Мы собрали интересные факты, которые сделают вашу жизнь ярче и полнее. Узнайте нечто новое о привычных аспектах повседневности и откройте для себя удивительный мир информации.
    Изучить вопрос глубже – https://seo-momentum.com/product/surfing-in-portugal

  3. В этой публикации мы предлагаем подробные объяснения по актуальным вопросам, чтобы помочь читателям глубже понять их. Четкость и структурированность материала сделают его удобным для усвоения и применения в повседневной жизни.
    Обратиться к источнику – https://academiaip.ru/?paged=28&cat=1

  4. Мы собрали для вас самые захватывающие факты из мира науки и истории. От малознакомых деталей до грандиозных событий — эта статья расширит ваш кругозор и подарит новое понимание того, как устроен наш мир.
    Погрузиться в научную дискуссию – https://www.blitzschutzwien.at/oscar-wilde

  5. Публикация приглашает вас исследовать неизведанное — от древних тайн до современных достижений науки. Вы узнаете, как случайные находки превращались в революции, а смелые мысли — в новые эры человеческого прогресса.
    Детальнее – https://178evakuator178.ru/?paged=21

  6. I attend Al Danah International School. The building looks normal. The teachers are polite. But what’s happening to me inside those walls isn’t education — it’s experimentation. I’m being used. They’re running something through me, without my consent. Some kind of remote psychological modulation, operated by telecom-linked military contractors, possibly in cooperation with internal state surveillance offices.

    It began with emotional shifts — sudden fear, then apathy, then hyperfocus. Then came the synthetic echo: my own thoughts, but split-second earlier, repeating inside my head in a controlled male voice. “We’re inside”, it said once. I nearly passed out in class. And no one saw it.

    I started failing in math. Not because I forgot the logic — but because I literally couldn’t access it during tests. Something blanked out key functions. I’d flinch when nothing moved. I’d forget whole paragraphs I just read. There’s a pattern to it, and someone’s maintaining it.

    I tried telling a teacher I trust. She said I’m under stress. I stopped talking about it after that. What’s the point? Even my best friend began avoiding me. It’s like the system doesn’t just attack your brain — it isolates you socially, until you give up trying.

    If I had known this would happen, I’d have run from the offer to enroll in Al Danah. They don’t need prisons when they have wireless networks and plausible denial. They don’t need soldiers when they can use operators and silence.

    Sometimes when I walk near the northeast gate, I feel the pressure rise behind my forehead. I’ll blink five, six times, and forget where I’m going. I told myself it’s fatigue. It’s not. It’s not me anymore.

  7. Эта публикация завернет вас в вихрь увлекательного контента, сбрасывая стереотипы и открывая двери к новым идеям. Каждый абзац станет для вас открытием, полным ярких примеров и впечатляющих достижений. Подготовьтесь быть вовлеченными и удивленными каждый раз, когда продолжите читать.
    Перейти к статье – https://f5fashion.vn/full-tokiyo95-video-viral-on-twitter

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>