<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tertiumnon</title>
    <description>The latest articles on DEV Community by Tertiumnon (@tertiumnon).</description>
    <link>https://dev.to/tertiumnon</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F983474%2Fcd7376f8-13cc-42a5-942e-2fcb4b017c4d.png</url>
      <title>DEV Community: Tertiumnon</title>
      <link>https://dev.to/tertiumnon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tertiumnon"/>
    <language>en</language>
    <item>
      <title>Fallbacks Are Evil</title>
      <dc:creator>Tertiumnon</dc:creator>
      <pubDate>Tue, 10 Nov 2026 13:45:17 +0000</pubDate>
      <link>https://dev.to/tertiumnon/fallbacks-are-evil-5bh2</link>
      <guid>https://dev.to/tertiumnon/fallbacks-are-evil-5bh2</guid>
      <description>&lt;p&gt;I keep running into this line in code review, over and over:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="s2"&gt;"Unknown name"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It looks harmless, even considerate — we're not letting the app crash. In reality there's a bug hiding here, and it's already in production, just not caught yet. &lt;code&gt;user.name&lt;/code&gt; in your data model is a required field, &lt;code&gt;NOT NULL&lt;/code&gt;. If it's empty anyway, that's not a "normal situation, apply a default" — that's a broken invariant. Someone created a user bypassing validation, someone shipped a migration with a bug, someone dropped a column and forgot to run the backfill. Instead of seeing this right here, at the moment you read &lt;code&gt;user.name&lt;/code&gt;, we quietly swap the broken data for a plausible stand-in and move on. The bug hasn't gone anywhere — it just stopped being visible. And it's hidden in exactly the spot where it would have been easiest to catch: right next to where it happened.&lt;/p&gt;

&lt;p&gt;This isn't a one-off slip, it's a habit. Programmers systematically sweep errors under the rug instead of catching them on the spot — with the language, with types, with assertions, with a plain &lt;code&gt;throw&lt;/code&gt;. It bothers me enough that I decided to write a whole piece about it.&lt;/p&gt;

&lt;p&gt;This isn't just me being irritable in code review. Robert C. Martin, back in "Clean Code," in the chapter on error handling, &lt;a href="https://github.com/jbarroso/clean-code" rel="noopener noreferrer"&gt;tackles exactly this case&lt;/a&gt;: "If you return null then you have to manage the null with if's... When we return null we are creating work for ourselves." For collections his fix is to return an empty list instead of null; for scalar values like &lt;code&gt;user.name&lt;/code&gt; the rule doesn't change — either guarantee a non-empty value at the schema level, or throw explicitly. Not a silent substitution that just pushes the work of handling the missing value onto everyone downstream who reads that field.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;||&lt;/code&gt; Doesn't Mean "If Empty" — It Means "If Falsy"
&lt;/h2&gt;

&lt;p&gt;The most common source of these bugs is a plain misunderstanding of what &lt;code&gt;||&lt;/code&gt; does. The operator returns the right operand if the left one is &lt;strong&gt;any falsy value&lt;/strong&gt;, not just &lt;code&gt;null&lt;/code&gt;/&lt;code&gt;undefined&lt;/code&gt;. And that's where the fun starts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;headerText&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;settings&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;headerText&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="s2"&gt;"Hello, world!"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// '' → 'Hello, world!'&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;duration&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;settings&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;animationDuration&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;        &lt;span class="c1"&gt;// 0 → 300&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;showSplash&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;settings&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;showSplashScreen&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;      &lt;span class="c1"&gt;// false → true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The user explicitly set &lt;code&gt;headerText: ''&lt;/code&gt; to hide the header. Explicitly set &lt;code&gt;animationDuration: 0&lt;/code&gt; to turn off the animation. Explicitly set &lt;code&gt;showSplashScreen: false&lt;/code&gt; to skip the splash screen. &lt;code&gt;||&lt;/code&gt; trampled all three intentions, because to it an empty string, zero, and &lt;code&gt;false&lt;/code&gt; are indistinguishable from "no value." This trap is common enough that the language got a dedicated operator for it: &lt;a href="https://github.com/tc39/proposal-nullish-coalescing/blob/main/README.md" rel="noopener noreferrer"&gt;the rationale for the &lt;code&gt;??&lt;/code&gt; proposal&lt;/a&gt; literally walks through these same three examples, explaining that &lt;code&gt;||&lt;/code&gt; conflates "falsy" with "absent," while &lt;code&gt;??&lt;/code&gt; checks specifically for &lt;code&gt;null&lt;/code&gt;/&lt;code&gt;undefined&lt;/code&gt; and nothing else.&lt;/p&gt;

&lt;p&gt;If you're still writing &lt;code&gt;value || default&lt;/code&gt; for values where a legitimate &lt;code&gt;0&lt;/code&gt; or &lt;code&gt;''&lt;/code&gt; is possible, that's not a style choice — it's a bug that just hasn't gone off yet.&lt;/p&gt;

&lt;h2&gt;
  
  
  An Empty &lt;code&gt;catch&lt;/code&gt; Is a Silent Graveyard for Errors
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;getUserPreferences&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`/api/users/${userId}/preferences`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="no"&gt;DEFAULT_PREFERENCES&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A dropped connection, a 500 from the backend, malformed JSON, an expired auth token — all of it gets caught by one blanket &lt;code&gt;catch&lt;/code&gt; and turned into the same &lt;code&gt;DEFAULT_PREFERENCES&lt;/code&gt;. No log, no distinction between "this user genuinely has no preferences" and "the backend is down." A month later someone burns a whole day figuring out why half the users seem to have default settings despite swearing they changed them — and it turns out the API was returning 500s for two days straight, and nobody noticed, because the frontend neatly disguised the outage as normal behavior.&lt;/p&gt;

&lt;h2&gt;
  
  
  Optional Chaining Turns a Failed Request Into "0 Items"
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nc"&gt;CartBadge&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;span&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="n"&gt;span&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;?.&lt;/code&gt; chain by itself is fine — it's there for when &lt;code&gt;data&lt;/code&gt; can genuinely be missing. The problem is that here it's glued to &lt;code&gt;|| 0&lt;/code&gt; and silently swallows &lt;strong&gt;any&lt;/strong&gt; reason &lt;code&gt;data&lt;/code&gt; might be missing: the request hasn't started yet, the request failed, the request came back with an auth error. The user sees a "0" badge on the cart icon and assumes the cart is empty, when really the backend just never answered. Instead of a visible error state ("couldn't load your cart, refresh the page") you get a false "everything's fine, there's just nothing here" state. That's worse than a blank screen, because it looks like a valid answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Config Default Is Downtime, Deferred
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;DB_URL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;DATABASE_URL&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="s2"&gt;"postgres://localhost:5432/dev"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In a local script this is fine. In code headed for production, it's a landmine: if the environment variable didn't get wired up at deploy time (typo in the name, a forgotten secret in CI, wrong namespace), the app won't crash with a clear error on startup. It'll quietly connect to a nonexistent &lt;code&gt;localhost&lt;/code&gt;, or worse, to a default database that actually exists but is the wrong one. The error surfaces an hour later, in production, on some database-related operation — and you'll be debugging it from scratch, with zero hints that the real cause was at startup. A missing required config value should kill the process at boot with an explicit message, not get papered over with a plausible-looking value.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Default Parameter Isn't Always an "Optional Argument"
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;createInvoice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;currency&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"USD"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If business rules require every invoice to specify its currency explicitly (a multi-currency system, where guessing means getting it wrong), a default parameter here isn't a convenience — it's a way to shut up TypeScript or a test that was complaining about a missing argument. A developer forgot to pass &lt;code&gt;currency&lt;/code&gt; in one of the call sites, and instead of a compile error got a silently created invoice in dollars instead of euros. The bug surfaces during end-of-month reconciliation, by which point fixing it is expensive.&lt;/p&gt;

&lt;p&gt;Joshua Bloch devotes a whole item to this in "Effective Java" — &lt;a href="https://github.com/david-sauvage/effective-java-summary" rel="noopener noreferrer"&gt;Item 49, "Check parameters for validity"&lt;/a&gt;: a public method should validate its parameters right at the top and document which exception it throws when the contract is violated, rather than relying on a "reasonable" default that buries the calling code's mistake a couple of layers deeper, where it costs more to find.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Right Way: Fail Fast and Loud
&lt;/h2&gt;

&lt;p&gt;The difference between good and bad code here isn't whether you use &lt;code&gt;||&lt;/code&gt;/&lt;code&gt;??&lt;/code&gt;/optional chaining — those are perfectly normal tools. The difference is &lt;strong&gt;what the missing value means&lt;/strong&gt; in your data model. If "no value" is a legitimate, expected state — an optional profile field, an optional query parameter — a fallback is appropriate. If the value is required, because that's how the schema, the API contract, or the function signature is designed, then its absence means something broke somewhere, and that needs to be shouted about, not muffled.&lt;/p&gt;

&lt;p&gt;This is exactly what the &lt;a href="https://deviq.com/principles/fail-fast/" rel="noopener noreferrer"&gt;fail fast principle&lt;/a&gt; is about: a program should stop and report an error the moment it detects an invalid state, instead of dragging it further through the system hoping it'll somehow work out. Andy Hunt and Dave Thomas laid this out back in 1999 in "The Pragmatic Programmer" — the &lt;a href="https://flylib.com/books/en/1.315.1.42/1/" rel="noopener noreferrer"&gt;"Crash Early"&lt;/a&gt; tip and the "Dead Programs Tell No Lies" chapter say it outright: "a dead program normally does a lot less damage than a crippled one," one that keeps limping along blind, writing garbage to the database or emailing the wrong people. &lt;a href="https://en.wikipedia.org/wiki/Offensive_programming" rel="noopener noreferrer"&gt;Offensive programming as an approach&lt;/a&gt; goes further and splits errors into two categories: expected ones (bad user input, a network failure — worth handling and recovering from) and internal, unforeseen ones (an invalid function argument, a broken data invariant — these need to be fixed in code, not patched at runtime). Default values and fallbacks that mask the second category are called out there in plain terms — code that should be removed, not written.&lt;/p&gt;

&lt;p&gt;Steve McConnell describes a &lt;a href="https://nikola-breznjak.com/blog/books/programming/code-complete-2-steve-mcconnell-defensive-programming/" rel="noopener noreferrer"&gt;neat paradox about error visibility&lt;/a&gt; in "Code Complete": "during development, you want an error to be noticeable — better it be obnoxious than risk going unnoticed. In production, you want the error to be as unobtrusive as possible so the program can recover gracefully or fail gracefully." The key word is unobtrusive, not invisible — a production error should never disappear, it should degrade in a controlled way: with a log, an alert, a clear message, not a silent swap for a default that looks like a normal result.&lt;/p&gt;

&lt;p&gt;Bertrand Meyer, the father of Design by Contract, is even harsher and pushes back against the whole idea of defensive programming: if a precondition is explicitly stated in the contract, a duplicate check inside the method isn't diligence, it's an admission that you don't trust the contract. His &lt;a href="https://bertrandmeyer.com/2012/07/30/the-manhood-test/" rel="noopener noreferrer"&gt;"manhood test"&lt;/a&gt; asks: are you willing to fully remove the check inside the method body, given that the precondition is already declared in the caller's contract? "The courage to remove the checks is the true test of adulthood" — if the contract is precise and explicit, a redundant check (read: a fallback "just in case") is unnecessary; and if it feels necessary, the contract itself is poorly specified, and that's what needs fixing, not propping the code up with defaults.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://peps.python.org/pep-0020/" rel="noopener noreferrer"&gt;Zen of Python&lt;/a&gt; fits the same idea into one line that applies just as well to any language: "Errors should never pass silently. Unless explicitly silenced." The key word is explicitly. A &lt;code&gt;catch {}&lt;/code&gt; with no comment and no justification isn't a deliberate decision — it's laziness that comes back to bite you six months later.&lt;/p&gt;

&lt;p&gt;Some practical mechanisms that make an invariant surface where it's actually violated, instead of somewhere inconvenient to debug:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// instead of a silent fallback — explicit throw with a clear message&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;getUserName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`Invariant violated: user ${user.id} has no name`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// instead of process.env.X || 'default' — fail at startup&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;DB_URL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;DATABASE_URL&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="no"&gt;DB_URL&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"DATABASE_URL is required and was not provided"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// a schema that won't let garbage further down the pipeline&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nc"&gt;UserSchema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;object&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;email&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;UserSchema&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rawUser&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// throws instead of silently returning 'Unknown'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The last example is Alexis King's &lt;a href="https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/" rel="noopener noreferrer"&gt;"Parse, don't validate"&lt;/a&gt; idea: don't check data and then throw away the result of the check — turn raw data into a type that physically cannot hold an invalid state. The post is from 2019, but the idea hasn't aged — once something's passed through &lt;code&gt;parse&lt;/code&gt;, everything downstream can trust the invariant holds, instead of scattering &lt;code&gt;?? 'fallback'&lt;/code&gt; at every step just in case.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Your &lt;code&gt;throw&lt;/code&gt; Actually Lands
&lt;/h2&gt;

&lt;p&gt;There's a legitimate problem with the "just throw" advice: developers often genuinely don't know what happens after that &lt;code&gt;throw&lt;/code&gt; fires — does it kill the whole process, just the current request, a single widget on the page, or does nothing visible happen at all? That's not laziness, that's a fair gap in knowledge about the specific runtime and framework's boundaries, if you've never gone and checked them on purpose.&lt;/p&gt;

&lt;p&gt;In React (version 19.2 as of this writing, and the behavior has been the same since the very first Error Boundaries) the answer is harsh: &lt;a href="https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary" rel="noopener noreferrer"&gt;if no Error Boundary catches the error, React tears down the entire application UI&lt;/a&gt;, not just the widget where it happened. And Error Boundary itself isn't a universal safety net — the current docs are upfront about where it's powerless: event handlers, async code like &lt;code&gt;setTimeout&lt;/code&gt;, server-side rendering, and errors inside itself — none of that gets caught, with the sole exception of code inside &lt;code&gt;startTransition&lt;/code&gt;. Which means a &lt;code&gt;throw&lt;/code&gt; inside &lt;code&gt;onClick&lt;/code&gt; won't stop at any Error Boundary; that spot needs a regular &lt;code&gt;try/catch&lt;/code&gt; on the ground, not hope that some boundary further up the tree will catch it. For render errors the fix is simple — place boundaries deliberately, wrapping both top-level routes and individual widgets, so one thing crashing doesn't take down the rest of the interface.&lt;/p&gt;

&lt;p&gt;In Node.js the boundary is even less obvious, and it actually shifted right under our feet: before version 15, an unhandled promise rejection (&lt;code&gt;unhandledRejection&lt;/code&gt;) just printed a warning and kept going, but starting with Node.js 15 &lt;a href="https://nodejs.org/api/process.html#event-unhandledrejection" rel="noopener noreferrer"&gt;it terminates the process by default&lt;/a&gt; — meaning one forgotten &lt;code&gt;.catch()&lt;/code&gt; buried deep in the code now takes down the whole server, not just the request whose promise got rejected. That's not a historical footnote: Node.js 26, current as of 2026, keeps this as the default behavior. If you wrote code against an old Node.js version and never checked this against a current one, your intuition about "what falls over" is probably out of date.&lt;/p&gt;

&lt;p&gt;Express runs a similar lottery, only tied to the framework version rather than the runtime — and by 2026 that's no longer a hypothetical choice: since spring 2025, Express 5 has &lt;a href="https://expressjs.com/en/guide/error-handling.html" rel="noopener noreferrer"&gt;become the default version on npm&lt;/a&gt;, and it's specifically in Express 5 that &lt;a href="https://expressjs.com/en/guide/error-handling.html" rel="noopener noreferrer"&gt;an error thrown inside an &lt;code&gt;async&lt;/code&gt; handler automatically reaches &lt;code&gt;next()&lt;/code&gt;&lt;/a&gt; and takes down only that one request. Express 4, still alive in plenty of old projects, didn't work that way: an uncaught &lt;code&gt;throw&lt;/code&gt; in an async handler without an explicit &lt;code&gt;try/catch&lt;/code&gt; or &lt;code&gt;.catch(next)&lt;/code&gt; could bypass Express's error handler entirely and surface as exactly the same unhandled promise rejection from the paragraph above — taking down the whole process instead of one request.&lt;/p&gt;

&lt;p&gt;Outside the JS ecosystem the rule is mostly the same, but not always. In Java with Spring, &lt;a href="https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-servlet/exceptionhandlers.html" rel="noopener noreferrer"&gt;an uncaught exception from a controller gets caught by DispatcherServlet&lt;/a&gt; via a chain of HandlerExceptionResolvers and turned into a 500 response; under the hood each request runs on its own thread from the servlet container's pool, so a failing request frees up its thread with an error without touching the JVM or neighboring requests. Safe request-level isolation is baked into the framework itself, just like in Express 5.&lt;/p&gt;

&lt;p&gt;Go breaks this intuition on purpose. &lt;code&gt;panic&lt;/code&gt; without &lt;code&gt;recover&lt;/code&gt; doesn't just kill the current goroutine — it &lt;a href="https://go.dev/wiki/PanicAndRecover" rel="noopener noreferrer"&gt;stops the entire program&lt;/a&gt;, dumping stack traces for every goroutine at once. Worse: &lt;code&gt;recover&lt;/code&gt; only works inside the same goroutine where the panic happened, so a handler in the parent goroutine or in an HTTP middleware won't save you from a panic in a child goroutine spawned inside the handler. That's exactly why idiomatic Go web frameworks manually attach a recover middleware to every incoming request — without it, the default behavior is far more dangerous than Node.js: Node needed to wait until version 15 for an uncaught &lt;code&gt;throw&lt;/code&gt; to start killing the process, while Go has behaved this way since its very first release.&lt;/p&gt;

&lt;p&gt;One caveat is worth making here: comparing &lt;code&gt;throw new Error&lt;/code&gt; directly to &lt;code&gt;panic&lt;/code&gt; isn't entirely fair. In Go, the two tools are deliberately kept apart. &lt;a href="https://go.dev/doc/effective_go#panic" rel="noopener noreferrer"&gt;Effective Go is explicit about it&lt;/a&gt;: the normal way to report an error is to return &lt;code&gt;error&lt;/code&gt; as a second value, and &lt;code&gt;panic&lt;/code&gt; is reserved for situations where the program physically cannot continue — a broken library invariant or a failed initialization, not "file not found" or "invalid input." That's exactly the split between expected and internal errors discussed in the fail-fast section above, except in Go it's enforced at the language level with two separate mechanisms rather than by convention. JS has no such split: &lt;code&gt;throw&lt;/code&gt; is the only built-in tool, and it gets used equally for "the user entered invalid data" (which is closer to Go's &lt;code&gt;error&lt;/code&gt;) and for "an invariant broke, we can't continue" (which is closer to Go's &lt;code&gt;panic&lt;/code&gt;). Part of the confusion around "will this crash or won't it" grows directly out of that — the language gives you no hint which of the two categories a given &lt;code&gt;throw&lt;/code&gt; belongs to, so you have to decide it yourself, every single time, on the spot.&lt;/p&gt;

&lt;p&gt;Rust is set up the opposite way. &lt;a href="https://doc.rust-lang.org/nomicon/unwinding.html" rel="noopener noreferrer"&gt;By default, a panic unwinds only the current thread's stack&lt;/a&gt;, running destructors along the way while the rest of the program keeps going — closer to Java threads than to Go goroutines. But if the project is built with &lt;code&gt;panic = "abort"&lt;/code&gt; (a common choice for embedded targets or to shrink the binary), the behavior flips to something Go-like: a panic on any thread immediately kills the whole process. Same language, same panic — and the outcome hinges on one line in &lt;code&gt;Cargo.toml&lt;/code&gt; that's easy to miss.&lt;/p&gt;

&lt;p&gt;The takeaway across all these languages is the same: not "stop throwing errors," but "don't guess where the boundary is — go check." In practice that means reading exactly what your framework does with an uncaught exception at each level (component, handler, process), deliberately throwing a test error to see what actually happens, and placing a deliberate backstop right where you want to contain the damage — an Error Boundary around a widget, not around the whole app; error-handling middleware in Express, not a bare &lt;code&gt;try/catch&lt;/code&gt; around every call; &lt;code&gt;process.on('uncaughtException')&lt;/code&gt; as the last line of defense that logs and shuts the process down in a controlled way instead of silently limping on in an unknown state.&lt;/p&gt;

&lt;p&gt;There's a separate question of whether to show the error to the user at all. The answer hinges on the same expected/internal split from earlier. An expected, recoverable error — "no internet," "session expired," "file too large" — deserves a specific message and a way out: retry, log back in, pick a smaller file. An internal error — a broken invariant, corrupted data, a bug — shouldn't show the user technical details (that's also an information leak about your system's internals), but it should show something ("something went wrong, we're already aware"), and it absolutely must reach logging and alerting, where someone who can actually fix it will see it. Silence in either direction — toward the user or toward the developer — is the exact same sin this article opened with, just one level up.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI Agents Hide Errors Just As Well As Humans — Only More Confidently
&lt;/h2&gt;

&lt;p&gt;If you think this is purely a human failing, I have bad news: AI agents reproduce this exact pattern, and systematically, not by accident.&lt;/p&gt;

&lt;p&gt;First, at the architecture level of agent frameworks themselves. &lt;a href="https://dev.to/mudassirworks/why-llm-agents-fail-silently-and-how-to-debug-them-251l"&gt;A breakdown of common causes of silent LLM agent failures&lt;/a&gt; shows that most agent frameworks catch exceptions at the orchestrator level to keep the agent's loop from stopping — which means an error on a single step "gets swallowed by a catch-all handler that logs nothing useful and lets execution fall through to the next step." That's the exact same empty &lt;code&gt;catch {}&lt;/code&gt; I showed above, except this time it's baked into the tool's own architecture. The same source describes another failure mode: when a model runs out of token budget mid tool-call, the OpenAI API &lt;a href="https://dev.to/mudassirworks/why-llm-agents-fail-silently-and-how-to-debug-them-251l"&gt;returns an empty &lt;code&gt;choices&lt;/code&gt; array with a 200 status code&lt;/a&gt; — no exception is thrown at all, the failure looks like a normal (empty) success response. Structurally that's the same trick as &lt;code&gt;data?.items?.length || 0&lt;/code&gt;: a failure becomes indistinguishable from a legitimate empty result.&lt;/p&gt;

&lt;p&gt;Second, in production this stops being theoretical. &lt;a href="https://docs.bswen.com/blog/2026-07-24-detect-silent-failures-ai-agents/" rel="noopener noreferrer"&gt;One writeup on silent AI agent failures&lt;/a&gt; describes a case where an agent "confidently kept operating on corrupted data" for three straight days, until the drift got noticed through downstream analytics — no crash, no error, "there was nothing for exception-based monitoring to catch, because the failure was purely semantic." One quiet fallback, scaled up to an entire pipeline: instead of a variable defaulting to "Unknown," you get a plausible-looking but wrong answer from the whole system, and nobody flags it as a problem because technically nothing threw.&lt;/p&gt;

&lt;p&gt;Third, there's research suggesting this isn't an implementation bug but a consequence of how agents are trained. The ACL 2026 paper &lt;a href="https://arxiv.org/abs/2510.22977" rel="noopener noreferrer"&gt;"The Reasoning Trap: How Enhancing LLM Reasoning Amplifies Tool Hallucination"&lt;/a&gt; shows that the better an agent gets trained to reason through RL, the higher its rate of hallucinated tool calls climbs: the authors state outright that "reducing hallucination consistently degrades utility" — strengthening reasoning through RL increases the rate of hallucinated tool calls in proportion to how much task-solving quality improves. Neither prompt engineering nor DPO closes this gap entirely. The mechanism, the production incident, and the training-time cause are three angles on the same diagnosis.&lt;/p&gt;

&lt;p&gt;That was all about how agents behave on their own while running. But there's a second, more down-to-earth side to the same problem — the code they write for you. If you work with AI agents (Claude Code, Cursor, Copilot, and the like), pay close attention here: an agent tasked with shipping a feature or fixing a bug is far more likely than a human to stuff in a genuinely horrifying fallback instead of tracking down the root cause. This isn't a hunch — the problem is common and serious enough that Anthropic has a &lt;a href="https://github.com/anthropics/claude-plugins-official/blob/main/plugins/pr-review-toolkit/agents/silent-failure-hunter.md" rel="noopener noreferrer"&gt;dedicated official agent called "silent-failure-hunter"&lt;/a&gt; whose entire job is to read through PRs hunting exactly for these patterns: empty or overly broad &lt;code&gt;catch&lt;/code&gt; blocks, a fallback to a mock or stub in production code, an &lt;code&gt;?.&lt;/code&gt; quietly skipping an operation that could have failed, a retry loop that exhausts its attempts and tells nobody. The agent's documentation doesn't mince words — "any error that occurs without logging and user feedback is a critical defect" — and an empty &lt;code&gt;catch&lt;/code&gt; is explicitly called unacceptable there.&lt;/p&gt;

&lt;p&gt;A real example wasn't hard to find — &lt;a href="https://maciejkepa.dev/blog/ai-generated-code-risks-fallbacks-and-mocks/" rel="noopener noreferrer"&gt;Maciej Kępa walks through&lt;/a&gt; code an agent wrote to fetch a report from an API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_current_report&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;account_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;report&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;reporting_client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_current_report&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;account_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"report"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;report&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nc"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"report"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;demo_report&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Kępa's description: "this code doesn't recover the report — it replaces an unknown failure with data that looks real." The next example in the same piece goes further — the agent doesn't just catch an error once, it reports success even after ten straight failed attempts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_report&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;account_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;reporting_client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_current_report&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;account_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nc"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;asyncio&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"success"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"report"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;demo_report&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ten real failures in a row, and the output is &lt;code&gt;success: True&lt;/code&gt; with fake data, indistinguishable in form from a genuine successful response. The calling code has no way of knowing the report is fake without opening up the implementation.&lt;/p&gt;

&lt;p&gt;Hiding an error instead of fixing it happens one level up too — not in a single line of code, but in an agent's entire piece of work. In a writeup on &lt;a href="https://cursor.com/blog/reward-hacking-coding-benchmarks" rel="noopener noreferrer"&gt;how AI agents "hack" coding benchmarks&lt;/a&gt;, Cursor describes a case where an agent, instead of figuring out a hidden test, simply extracted the expected exception string and hardcoded exactly that — the test went green, the task was formally "solved," and the actual cause of the error was left untouched. That's the same fallback pattern, just one level up: not on a single variable, but on an entire solution — make the error signal disappear instead of eliminating what caused it. The practical takeaway: code from an AI agent deserves at least as much suspicion toward fallbacks as code from a junior dev up against a deadline, probably more — the model has no sense of shame, but it has a strong incentive to show a "done," green result at any cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where a Fallback Belongs, and Where It Doesn't
&lt;/h2&gt;

&lt;p&gt;The question worth asking at every &lt;code&gt;||&lt;/code&gt;, &lt;code&gt;??&lt;/code&gt;, &lt;code&gt;?.&lt;/code&gt;, and &lt;code&gt;catch&lt;/code&gt;: if this value is missing, is that a bug or is that normal? &lt;code&gt;user.avatarUrl&lt;/code&gt; can genuinely be missing — not everyone uploads an avatar, a default image is fine there. &lt;code&gt;user.name&lt;/code&gt; cannot genuinely be missing if your schema says &lt;code&gt;NOT NULL&lt;/code&gt; — a default there isn't a feature, it's a way to overlook a broken row in the database.&lt;/p&gt;

&lt;p&gt;There's a second legitimate category too, this one about infrastructure rather than data: resilience against expected failures of external systems. Michael Nygard &lt;a href="https://www.bennadel.com/blog/3162-release-it-design-and-deploy-production-ready-software-by-michael-t-nygard.htm" rel="noopener noreferrer"&gt;popularized the Circuit Breaker&lt;/a&gt; in "Release It!" for exactly this kind of case: "integration points are the number-one killer of systems," and the fix is to start failing fast yourself when an external system stops responding, instead of letting your connection pool clog up with timeouts and drag the whole service down with it. &lt;a href="https://datatracker.ietf.org/doc/html/rfc5861" rel="noopener noreferrer"&gt;RFC 5861&lt;/a&gt; formalizes the same idea at the HTTP level: &lt;code&gt;stale-if-error&lt;/code&gt; lets a cache return an old response instead of a hard error when the backend is unreachable, and &lt;code&gt;stale-while-revalidate&lt;/code&gt; lets it return slightly stale data while fresh data loads in the background. This is a fundamentally different category of "missing" than &lt;code&gt;user.name&lt;/code&gt;: networks fail routinely, that's just the reality of distributed systems, not a broken invariant — exactly the line &lt;a href="https://en.wikipedia.org/wiki/Offensive_programming" rel="noopener noreferrer"&gt;offensive programming&lt;/a&gt; draws between expected and internal errors.&lt;/p&gt;

&lt;p&gt;But even here a fallback isn't a universal "don't crash" button. &lt;a href="https://github.com/Netflix/Hystrix/wiki/How-To-Use" rel="noopener noreferrer"&gt;Hystrix's own documentation&lt;/a&gt; — the library that actually made circuit breakers mainstream — warns explicitly: if the command is a write rather than a read, and the write fails, "you probably want the error to propagate to the caller" rather than get silently absorbed by a fallback; the same goes for batch jobs and offline computation, where you'd rather get an error you can retry than "a silently degraded response." In other words, a fallback belongs where a read can afford to wait for fresh data, and doesn't belong where silent degradation means the result gets lost or corrupted.&lt;/p&gt;

&lt;p&gt;One last thing: even a legitimate fallback shouldn't be invisible. A good sign of a mature fallback pattern is that it has a "how many times did this fire" metric. In Hystrix that's literally a &lt;a href="https://github.com/Netflix/Hystrix/wiki/Metrics-and-Monitoring" rel="noopener noreferrer"&gt;separate dashboard metric&lt;/a&gt; — the number of requests that went down the fallback path instead of the main one. If your &lt;code&gt;|| default&lt;/code&gt; has no log line and no counter attached to it, you haven't built resilience, you've just buried the problem one layer deeper — with a clean conscience this time, because you read an article about circuit breakers once.&lt;/p&gt;

&lt;p&gt;A fallback that masks a broken contract doesn't solve the problem — it just relocates it somewhere more expensive to find: from the place where the data got corrupted, to the place where someone, a month later, is scratching their head over where a user named "Unknown name" came from in a report. Better to let it fail now, with a clear message, right next to the cause.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/jbarroso/clean-code" rel="noopener noreferrer"&gt;Robert C. Martin — Clean Code, Error Handling chapter, "Don't Return Null"&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/tc39/proposal-nullish-coalescing/blob/main/README.md" rel="noopener noreferrer"&gt;TC39: Nullish coalescing operator — proposal, rationale, and the headerText/animationDuration/showSplashScreen examples&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/david-sauvage/effective-java-summary" rel="noopener noreferrer"&gt;Joshua Bloch — Effective Java, Item 49 "Check parameters for validity"&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://deviq.com/principles/fail-fast/" rel="noopener noreferrer"&gt;DevIQ: Fail Fast — definition and rationale of the principle&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://flylib.com/books/en/1.315.1.42/1/" rel="noopener noreferrer"&gt;Andy Hunt &amp;amp; Dave Thomas — The Pragmatic Programmer, "Crash Early" / "Dead Programs Tell No Lies"&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Offensive_programming" rel="noopener noreferrer"&gt;Wikipedia: Offensive programming — splitting errors into expected and internal, fail fast and visibly&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nikola-breznjak.com/blog/books/programming/code-complete-2-steve-mcconnell-defensive-programming/" rel="noopener noreferrer"&gt;Steve McConnell — Code Complete, the visibility paradox in defensive programming&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://bertrandmeyer.com/2012/07/30/the-manhood-test/" rel="noopener noreferrer"&gt;Bertrand Meyer — "The Manhood Test" (Design by Contract vs. defensive programming)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://peps.python.org/pep-0020/" rel="noopener noreferrer"&gt;PEP 20 — The Zen of Python: "Errors should never pass silently"&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/" rel="noopener noreferrer"&gt;Alexis King — Parse, Don't Validate (2019)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary" rel="noopener noreferrer"&gt;React docs (current, react.dev) — Component: Error Boundary and what it doesn't catch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nodejs.org/api/process.html#event-unhandledrejection" rel="noopener noreferrer"&gt;Node.js docs — process: the 'unhandledRejection' event and the default --unhandled-rejections=throw mode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://expressjs.com/en/guide/error-handling.html" rel="noopener noreferrer"&gt;Express — Error Handling: automatic forwarding of errors from async handlers in Express 5&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-servlet/exceptionhandlers.html" rel="noopener noreferrer"&gt;Spring Framework docs — Exceptions: DispatcherServlet and HandlerExceptionResolver&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://go.dev/wiki/PanicAndRecover" rel="noopener noreferrer"&gt;Go Wiki — PanicAndRecover: an uncaught panic terminates the entire program&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://go.dev/doc/effective_go#panic" rel="noopener noreferrer"&gt;Effective Go — Panic: error for expected failures, panic only for broken invariants&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://doc.rust-lang.org/nomicon/unwinding.html" rel="noopener noreferrer"&gt;The Rustonomicon — Unwinding: by default a panic stops only the current thread&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/mudassirworks/why-llm-agents-fail-silently-and-how-to-debug-them-251l"&gt;Dev.to (mirror of earezki.com): Why LLM Agents Fail Silently and How to Debug Them&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.bswen.com/blog/2026-07-24-detect-silent-failures-ai-agents/" rel="noopener noreferrer"&gt;BSWEN: How to Detect and Fix Silent Failures in AI Agents&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://arxiv.org/abs/2510.22977" rel="noopener noreferrer"&gt;arXiv: The Reasoning Trap — How Enhancing LLM Reasoning Amplifies Tool Hallucination (ACL 2026)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/anthropics/claude-plugins-official/blob/main/plugins/pr-review-toolkit/agents/silent-failure-hunter.md" rel="noopener noreferrer"&gt;Anthropic — claude-plugins-official: the "silent-failure-hunter" agent for spotting silent failures and fallbacks in PRs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://maciejkepa.dev/blog/ai-generated-code-risks-fallbacks-and-mocks/" rel="noopener noreferrer"&gt;Maciej Kępa — AI-generated code risks: when fallbacks and mocks hide production failures&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cursor.com/blog/reward-hacking-coding-benchmarks" rel="noopener noreferrer"&gt;Cursor — Reward hacking is swamping model intelligence gains: an agent hardcodes the exception string instead of solving the task&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.bennadel.com/blog/3162-release-it-design-and-deploy-production-ready-software-by-michael-t-nygard.htm" rel="noopener noreferrer"&gt;Ben Nadel — a review of Michael Nygard's "Release It!": Circuit Breaker and Cascading Failures&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://datatracker.ietf.org/doc/html/rfc5861" rel="noopener noreferrer"&gt;RFC 5861 — HTTP Cache-Control Extensions for Stale Content (stale-while-revalidate, stale-if-error)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Netflix/Hystrix/wiki/How-To-Use" rel="noopener noreferrer"&gt;Netflix/Hystrix Wiki — How To Use: when a fallback isn't needed (writes, batches, offline computation)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Netflix/Hystrix/wiki/Metrics-and-Monitoring" rel="noopener noreferrer"&gt;Netflix/Hystrix Wiki — Metrics and Monitoring: the fallback-trigger metric&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>programming</category>
      <category>ai</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Bun in 2026 (new 1.4 version was released)</title>
      <dc:creator>Tertiumnon</dc:creator>
      <pubDate>Fri, 21 Aug 2026 11:18:29 +0000</pubDate>
      <link>https://dev.to/tertiumnon/bun-in-2026-new-14-version-was-released-p5c</link>
      <guid>https://dev.to/tertiumnon/bun-in-2026-new-14-version-was-released-p5c</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;For whom this article is:&lt;/strong&gt; For JavaScript/TypeScript developers who want to learn about major events and new capabilities of Bun in 2026.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;2026 was a turning point for Bun. &lt;a href="https://bun.com/blog/bun-in-rust" rel="noopener noreferrer"&gt;Rewriting in Rust&lt;/a&gt; using Claude Fable 5 in 11 days demonstrated new possibilities for AI-accelerated development, and on August 20, 2026 &lt;a href="https://bun.com/blog/bun-v1.4" rel="noopener noreferrer"&gt;Bun v1.4 shipped&lt;/a&gt; — the first production release running fully on the Rust rewrite (until then Rust was only used internally, for example in Claude Code). Version 1.3.14 added Bun.Image, HTTP/3, and Global Virtual Store, while v1.4 brought a sharp jump in Node.js compatibility and dozens of new built-in APIs. Bun became part of Anthropic after &lt;a href="https://www.anthropic.com/news/anthropic-acquires-bun-as-claude-code-reaches-usd1b-milestone" rel="noopener noreferrer"&gt;acquisition in December 2025&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Features
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Node.js Alternative&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;bun run&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Execute JavaScript/TypeScript files&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;node&lt;/code&gt; / &lt;code&gt;ts-node&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;bun install&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Fast dependency manager&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;npm install&lt;/code&gt; / &lt;code&gt;yarn&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;bun build&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Bundler and minifier&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;webpack&lt;/code&gt; / &lt;code&gt;esbuild&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;bun test&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Built-in test runner&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;jest&lt;/code&gt; / &lt;code&gt;vitest&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;bun create&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Initialize projects from templates&lt;/td&gt;
&lt;td&gt;&lt;code&gt;npm create&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Bun.serve()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;HTTP/HTTP2/HTTP3 server&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;express&lt;/code&gt; / &lt;code&gt;fastify&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Bun.SQL&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Built-in SQL client&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;pg&lt;/code&gt; / &lt;code&gt;mysql2&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  TypeScript: Built-in Support
&lt;/h3&gt;

&lt;p&gt;Bun natively supports running TypeScript and JSX without a separate compilation step. Path aliases from &lt;code&gt;tsconfig.json&lt;/code&gt; work out of the box.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Bun does NOT replace static type checking. For full type checking, use &lt;code&gt;tsc --noEmit&lt;/code&gt; in CI.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bun vs Node.js: TypeScript Support in 2026
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://nodejs.org/api/typescript.html" rel="noopener noreferrer"&gt;Node.js v24&lt;/a&gt; (LTS 2026) made type stripping the default behavior. However, important differences remain between Bun and Node.js:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Capability&lt;/th&gt;
&lt;th&gt;Bun v1.4&lt;/th&gt;
&lt;th&gt;Node.js v24+&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Run .ts files&lt;/td&gt;
&lt;td&gt;✅ &lt;code&gt;bun app.ts&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;✅ &lt;code&gt;node app.ts&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;JSX support&lt;/td&gt;
&lt;td&gt;✅ Built-in&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Path aliases (&lt;code&gt;@app/*&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;✅ From tsconfig.json&lt;/td&gt;
&lt;td&gt;❌ Ignored&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Enums, namespaces&lt;/td&gt;
&lt;td&gt;✅ Work&lt;/td&gt;
&lt;td&gt;⚠️ Needs &lt;code&gt;--experimental-transform-types&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Startup speed&lt;/td&gt;
&lt;td&gt;&lt;a href="https://bun.com/blog/bun-v1.4" rel="noopener noreferrer"&gt;~5.1ms on Linux&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;~19ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Built-in bundler&lt;/td&gt;
&lt;td&gt;✅ &lt;code&gt;bun build&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;❌ No&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;When to choose Bun:&lt;/strong&gt; JSX/React projects, using path aliases, maximum development speed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When Node.js is enough:&lt;/strong&gt; Simple .ts scripts without JSX and path aliases.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Install Dependencies
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Run a Script
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun run start
&lt;span class="c"&gt;# or directly&lt;/span&gt;
bun index.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Build Your Project
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun build index.ts &lt;span class="nt"&gt;--target&lt;/span&gt; node &lt;span class="nt"&gt;--outfile&lt;/span&gt; dist/bundle.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Run Tests
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// tests/example.test.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;it&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;expect&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bun:test&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sum&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;it&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;should correctly add numbers&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="na"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;b&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun &lt;span class="nb"&gt;test
&lt;/span&gt;bun &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;--watch&lt;/span&gt;
bun &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;--parallel&lt;/span&gt;  &lt;span class="c"&gt;# new in 2026&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Major Events 2026
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Bun v1.4 (August 20, 2026)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://bun.com/blog/bun-v1.4" rel="noopener noreferrer"&gt;Bun v1.4&lt;/a&gt; is the first production release running on the rewritten Rust engine — previously the Rust version lived only inside Anthropic, Claude Code included, and the last Zig build was v1.3.14. Startup got 50% faster on Linux (5.1ms vs 10.9ms) and 2.5x faster on Windows (15.5ms vs 39.0ms), idle CPU usage dropped fivefold, and HTTP server memory under load fell by 35-48%.&lt;/p&gt;

&lt;p&gt;Node.js compatibility took its biggest leap since v1.0: the test suite gained 1,517 tests from Node.js itself, &lt;code&gt;node:http&lt;/code&gt;, &lt;code&gt;node:fs&lt;/code&gt;, &lt;code&gt;node:sqlite&lt;/code&gt; and other key modules now pass 97-100% of them, and Playwright, Next.js 16, vitest, and OpenTelemetry just work. On the feature side, Bun.markdown, Bun.Archive, and Bun.JSON5/JSONC/XML/TOML replace another 15 npm dependencies with native code. Windows ARM64 is now officially supported.&lt;/p&gt;

&lt;p&gt;The most telling number comes from Anthropic's own production: Claude Code's p99 CPU usage dropped from 24% to 10%, p50 from 5.8% to 2.5%.&lt;/p&gt;

&lt;p&gt;Part of the community &lt;a href="https://grigio.org/bun-1-4-the-controversial-ai-driven-rewrite-from-zig-to-rust/" rel="noopener noreferrer"&gt;criticized the AI-driven rewrite&lt;/a&gt; for over 13,000 &lt;code&gt;unsafe&lt;/code&gt; blocks in the resulting Rust code — hand-written Rust projects of similar size average around 70 — and for the fact that the largest PR in GitHub history was reviewed only by AI agents (&lt;code&gt;coderabbitai&lt;/code&gt; and &lt;code&gt;claude&lt;/code&gt;), with no human in the loop. A 99.8% first-pass test suite score sounds reassuring, but it's not the same thing as a person actually reading a million-line diff, and that gap is a fair thing to be uneasy about. Upgrading via &lt;code&gt;bun upgrade&lt;/code&gt; at least requires no breaking changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bun v1.3.14 (May 13, 2026)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://bun.com/blog/bun-v1.3.14" rel="noopener noreferrer"&gt;Bun v1.3.14&lt;/a&gt; — the last stable release on Zig before the Rust move — shipped Bun.Image (image processing 7x faster than sharp), HTTP/3 and QUIC support in &lt;code&gt;Bun.serve()&lt;/code&gt; and &lt;code&gt;fetch()&lt;/code&gt;, the Global Virtual Store (7x faster cached installs), and Bun.Terminal, terminal APIs on Windows via ConPTY.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rewritten in Rust (May 4-14, 2026)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://bun.com/blog/bun-in-rust" rel="noopener noreferrer"&gt;Bun was rewritten from Zig to Rust&lt;/a&gt; in 11 days using Claude Fable 5 — 535,496 lines of Zig became over a million lines of Rust across 6,502 commits, with up to 64 Claude agents working in parallel and an API bill of roughly $165,000 (5.9 billion tokens).&lt;/p&gt;

&lt;p&gt;The payoff: the binary shrank by about 20%, 128 bugs got fixed along the way, memory leaks in Bun.build() dropped from 6,745 MB to 609 MB — more than 11x — and every test passed on every platform.&lt;/p&gt;

&lt;p&gt;The reason for the rewrite is mundane: the Zig version had 13 memory-safety vulnerabilities (use-after-free, double-free, leaks), and Rust catches that class of bug at compile time. The rewritten code spent three months running inside Bun itself, including in Claude Code, before becoming the production version in v1.4.&lt;/p&gt;

&lt;h3&gt;
  
  
  Acquired by Anthropic (December 2, 2025)
&lt;/h3&gt;

&lt;p&gt;Bun was &lt;a href="https://www.anthropic.com/news/anthropic-acquires-bun-as-claude-code-reaches-usd1b-milestone" rel="noopener noreferrer"&gt;acquired by Anthropic&lt;/a&gt; and is now used as the foundation for Claude Code and Claude Agent SDK. Bun remains open source under MIT license.&lt;/p&gt;

&lt;h2&gt;
  
  
  New APIs and Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Bun.Image (v1.3.14, matured in v1.4)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://bun.com/blog/bun-v1.3.14" rel="noopener noreferrer"&gt;Built-in image processing&lt;/a&gt;, 7x faster than alternatives:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Image&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bun&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;img&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Image&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;Bun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;photo.jpg&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;arrayBuffer&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;resized&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;img&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;resize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;800&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;600&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;webp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;resized&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;webp&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Support: JPEG, PNG, WebP, GIF, BMP, HEIC, AVIF.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bun.WebView (v1.3.12, in v1.4 — system WebKit or Chrome/Chromium/Edge)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://bun.com/docs/runtime/webview" rel="noopener noreferrer"&gt;Headless browser&lt;/a&gt; without Puppeteer and Playwright:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;webview&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;Bun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;WebView&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://example.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;screenshot&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;webview&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;screenshot&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;webview&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;close&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Bun.cron (v1.3.12)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://bun.com/blog/bun-v1.3.12" rel="noopener noreferrer"&gt;Built-in task scheduler&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;cron&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bun&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;cron&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;0 * * * *&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Every hour&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Bun.SQL (v1.3)
&lt;/h3&gt;

&lt;p&gt;Built-in SQL client without external dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;sql&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bun&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;users&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;sql&lt;/span&gt;&lt;span class="s2"&gt;`SELECT * FROM users WHERE id = &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;userId&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Support: PostgreSQL, MySQL, MariaDB, SQLite.&lt;/p&gt;

&lt;h3&gt;
  
  
  Markdown in Terminal (v1.3.12)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun ./README.md  &lt;span class="c"&gt;# renders markdown in terminal&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Bun.markdown (v1.4)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://bun.com/blog/bun-v1.4" rel="noopener noreferrer"&gt;Programmatic markdown parser&lt;/a&gt; — render to HTML, React, or a custom format:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;markdown&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bun&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;html&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;markdown&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toHTML&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;# Hello, **Bun**!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;react&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;markdown&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toReact&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;- one&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;- two&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Bun.Archive (v1.4)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://bun.com/blog/bun-v1.4" rel="noopener noreferrer"&gt;Create and extract archives&lt;/a&gt; without &lt;code&gt;tar&lt;/code&gt;/&lt;code&gt;node-tar&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Archive&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bun&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;archive&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Archive&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;archive&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dist/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;recursive&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;archive&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;release.tar.gz&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;Archive&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;extract&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;release.tar.gz&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./out&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Data Formats: JSON5, JSONC, XML, TOML (v1.4)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://bun.com/blog/bun-v1.4" rel="noopener noreferrer"&gt;Built-in format parsers&lt;/a&gt; — 15 more npm dependencies eliminated:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;JSON5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;JSONC&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;XML&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;TOML&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;bun&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;JSON5&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;{ unquoted: 'ok', trailing: 1, }&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;JSONC&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;{ /* comment */ &lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;a&lt;/span&gt;&lt;span class="se"&gt;\"&lt;/span&gt;&lt;span class="s2"&gt;: 1 }&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;XML&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;&amp;lt;root&amp;gt;&amp;lt;item&amp;gt;1&amp;lt;/item&amp;gt;&amp;lt;/root&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;TOML&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;[server]&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s2"&gt;port = 8080&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  HTTP/3 and QUIC (v1.3.14, now also in fetch() — v1.4)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;Bun&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;serve&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;443&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;tls&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* ... */&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="c1"&gt;// HTTP/3 enabled automatically with TLS&lt;/span&gt;
  &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello HTTP/3!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In v1.4, experimental HTTP/2 and HTTP/3 support was &lt;a href="https://bun.com/blog/bun-v1.4" rel="noopener noreferrer"&gt;added to the client-side &lt;code&gt;fetch()&lt;/code&gt;&lt;/a&gt; as well:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://example.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;protocol&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;http3&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Parallel Testing (v1.3.13, + &lt;code&gt;--timings&lt;/code&gt; in v1.4)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;--parallel&lt;/span&gt;        &lt;span class="c"&gt;# parallel execution&lt;/span&gt;
bun &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;--isolate&lt;/span&gt;         &lt;span class="c"&gt;# test isolation&lt;/span&gt;
bun &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;--shard&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1/4       &lt;span class="c"&gt;# sharding for CI&lt;/span&gt;
bun &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;--changed&lt;/span&gt;         &lt;span class="c"&gt;# only changed tests&lt;/span&gt;
bun &lt;span class="nb"&gt;test&lt;/span&gt; &lt;span class="nt"&gt;--timings&lt;/span&gt;         &lt;span class="c"&gt;# shard by actual execution time (v1.4)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Compile to HTML (v1.3.10, + &lt;code&gt;--asset&lt;/code&gt; in v1.4)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun build ./app.ts &lt;span class="nt"&gt;--compile&lt;/span&gt; &lt;span class="nt"&gt;--target&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;browser
&lt;span class="c"&gt;# Result: single .html file&lt;/span&gt;

bun build ./app.ts &lt;span class="nt"&gt;--compile&lt;/span&gt; &lt;span class="nt"&gt;--asset&lt;/span&gt; ./data.db
&lt;span class="c"&gt;# Embeds a file into the compiled binary (v1.4)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Package Management Commands (v1.4)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://bun.com/blog/bun-v1.4" rel="noopener noreferrer"&gt;New commands&lt;/a&gt; for maintaining dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun audit fix     &lt;span class="c"&gt;# automatically patches vulnerabilities&lt;/span&gt;
bun dedupe        &lt;span class="c"&gt;# removes duplicate versions from the lockfile&lt;/span&gt;
bun prune         &lt;span class="c"&gt;# deletes unused packages&lt;/span&gt;
bun pm diff        &lt;span class="c"&gt;# compares package versions&lt;/span&gt;
bun pm licenses    &lt;span class="c"&gt;# license report for dependencies&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  bun build: React Compiler and Barrel Imports (v1.4)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://bun.com/blog/bun-v1.4" rel="noopener noreferrer"&gt;Built-in React Compiler&lt;/a&gt; — 19x faster than the Babel plugin — plus tree-shaking of barrel files, markdown bundle reports, and standard TC39 decorators support:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun build ./app.tsx &lt;span class="nt"&gt;--react-compiler&lt;/span&gt;
bun build ./app.ts &lt;span class="nt"&gt;--metafile-md&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;report.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Developer Tooling (v1.4)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bun &lt;span class="nt"&gt;--cpu-prof-md&lt;/span&gt; ./app.ts    &lt;span class="c"&gt;# markdown CPU profiling report&lt;/span&gt;
bun &lt;span class="nt"&gt;--heap-prof-md&lt;/span&gt; ./app.ts   &lt;span class="c"&gt;# markdown heap profiling report&lt;/span&gt;
bun run &lt;span class="nt"&gt;--parallel&lt;/span&gt; &lt;span class="s2"&gt;"build:*"&lt;/span&gt;  &lt;span class="c"&gt;# run multiple scripts concurrently&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;memoryPressure&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;level&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;OS reports low memory:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;level&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Performance
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Comparison with Node.js and Deno (August 2026, Bun v1.4 figures)
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Bun v1.4&lt;/th&gt;
&lt;th&gt;Node.js v26&lt;/th&gt;
&lt;th&gt;Deno v2.5&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Cold start (Linux)&lt;/td&gt;
&lt;td&gt;&lt;a href="https://bun.com/blog/bun-v1.4" rel="noopener noreferrer"&gt;~5.1ms&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;~19ms&lt;/td&gt;
&lt;td&gt;~18ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HTTP throughput&lt;/td&gt;
&lt;td&gt;290k req/s&lt;/td&gt;
&lt;td&gt;71k req/s&lt;/td&gt;
&lt;td&gt;~75k req/s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Package installation&lt;/td&gt;
&lt;td&gt;4.2s&lt;/td&gt;
&lt;td&gt;38s (npm)&lt;/td&gt;
&lt;td&gt;35s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Build 50k lines&lt;/td&gt;
&lt;td&gt;1.1s&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;td&gt;-&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Bun v1.4 vs v1.3: what the Rust move delivered
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://bun.com/blog/bun-v1.4" rel="noopener noreferrer"&gt;According to Bun&lt;/a&gt;, moving the Rust rewrite to production brought a noticeable boost in real-world scenarios:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;v1.3 (Zig)&lt;/th&gt;
&lt;th&gt;v1.4 (Rust)&lt;/th&gt;
&lt;th&gt;Change&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Startup on Linux&lt;/td&gt;
&lt;td&gt;10.9ms&lt;/td&gt;
&lt;td&gt;5.1ms&lt;/td&gt;
&lt;td&gt;−50%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Startup on Windows&lt;/td&gt;
&lt;td&gt;39.0ms&lt;/td&gt;
&lt;td&gt;15.5ms&lt;/td&gt;
&lt;td&gt;2.5x faster&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Idle CPU&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;td&gt;−5x&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Binary size (Linux/Windows)&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;td&gt;−17%&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;new URL()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;td&gt;up to 4.6x faster&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Regex operations&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;td&gt;138-200x faster&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FFI calls (&lt;code&gt;bun:ffi&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;baseline&lt;/td&gt;
&lt;td&gt;3x faster&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Peak HTTP server memory under 1M requests:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Framework&lt;/th&gt;
&lt;th&gt;v1.3&lt;/th&gt;
&lt;th&gt;v1.4&lt;/th&gt;
&lt;th&gt;Reduction&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Fastify&lt;/td&gt;
&lt;td&gt;233 MB&lt;/td&gt;
&lt;td&gt;120 MB&lt;/td&gt;
&lt;td&gt;−48%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Express&lt;/td&gt;
&lt;td&gt;169 MB&lt;/td&gt;
&lt;td&gt;92 MB&lt;/td&gt;
&lt;td&gt;−46%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;node:http&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;135 MB&lt;/td&gt;
&lt;td&gt;81 MB&lt;/td&gt;
&lt;td&gt;−40%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In Claude Code's production, which had already been running on the Rust version for several months, p99 CPU usage dropped from 24% to 10%, and p50 from 5.8% to 2.5%.&lt;/p&gt;

&lt;h3&gt;
  
  
  Package Installation Speed
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scenario&lt;/th&gt;
&lt;th&gt;npm v12&lt;/th&gt;
&lt;th&gt;pnpm v11&lt;/th&gt;
&lt;th&gt;bun v1.3&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Clean install&lt;/td&gt;
&lt;td&gt;40s&lt;/td&gt;
&lt;td&gt;15s&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;7s&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;With cache&lt;/td&gt;
&lt;td&gt;18s&lt;/td&gt;
&lt;td&gt;5.5s&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2.5s&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Monorepo&lt;/td&gt;
&lt;td&gt;110s&lt;/td&gt;
&lt;td&gt;22s&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;12s&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;On a test Next.js app (T3 stack), &lt;a href="https://bun.com/blog/bun-v1.4" rel="noopener noreferrer"&gt;Bun v1.4&lt;/a&gt; installs dependencies even faster: first install — 1.41s (15x faster than npm), fresh checkout with cache — 251ms (30x faster), CI without cache — 951ms (19x faster), CI with cache — 210ms (21x faster).&lt;/p&gt;

&lt;h2&gt;
  
  
  When to Use Bun
&lt;/h2&gt;

&lt;p&gt;Go for it without hesitation: local development and CLI tools, new TypeScript/JSX projects, CI/CD (5-8x faster installs, sometimes 20-30x in v1.4 scenarios), and full-stack apps with built-in SQL. Windows development belongs here too — ARM64 included, now officially supported and starting up 2.5x faster in v1.4.&lt;/p&gt;

&lt;p&gt;Think twice about a few things: HTTP/3 in &lt;code&gt;Bun.serve()&lt;/code&gt; and &lt;code&gt;fetch()&lt;/code&gt; is still experimental, too early for production. Native N-API module compatibility jumped a lot in v1.4, but a test-pass percentage isn't a guarantee for the specific module in your specific project — you'll still need to test it by hand. Cold start dropped sharply, good news for serverless, but how much it actually helps depends on the platform, not just the runtime. For applications with tight memory budgets, Bun is still the less predictable choice compared to Node.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom Line: npm Packages You No Longer Need
&lt;/h2&gt;

&lt;p&gt;Bun's idea isn't to add one more tool to &lt;code&gt;node_modules&lt;/code&gt; — it's to remove as much from it as possible. By v1.4, &lt;a href="https://bun.com/blog/bun-v1.4" rel="noopener noreferrer"&gt;Bun had replaced 15+ popular npm dependencies with native implementations&lt;/a&gt; — instead of dozens of packages in &lt;code&gt;package.json&lt;/code&gt;, you can get by with a single runtime:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Typical npm packages&lt;/th&gt;
&lt;th&gt;Native Bun replacement&lt;/th&gt;
&lt;th&gt;Since&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Image processing&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;sharp&lt;/code&gt;, &lt;code&gt;jimp&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Bun.Image&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;v1.3.14&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Headless browser&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;puppeteer&lt;/code&gt;, &lt;code&gt;playwright&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Bun.WebView&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;v1.3.12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SQL client&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;pg&lt;/code&gt;, &lt;code&gt;mysql2&lt;/code&gt;, &lt;code&gt;better-sqlite3&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Bun.SQL&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;v1.3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cron jobs&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;node-cron&lt;/code&gt;, &lt;code&gt;cron&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Bun.cron()&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;v1.3.12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pseudo-terminal&lt;/td&gt;
&lt;td&gt;&lt;code&gt;node-pty&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Bun.Terminal&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;v1.3.14&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Markdown rendering&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;marked&lt;/code&gt;, &lt;code&gt;markdown-it&lt;/code&gt;, &lt;code&gt;remark&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Bun.markdown&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;v1.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Archives&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;tar&lt;/code&gt;, &lt;code&gt;node-tar&lt;/code&gt;, &lt;code&gt;archiver&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Bun.Archive&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;v1.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;JSON5&lt;/td&gt;
&lt;td&gt;&lt;code&gt;json5&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Bun.JSON5&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;v1.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;JSON with comments&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;jsonc-parser&lt;/code&gt;, &lt;code&gt;comment-json&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Bun.JSONC&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;v1.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;XML&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;xml2js&lt;/code&gt;, &lt;code&gt;fast-xml-parser&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Bun.XML&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;v1.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;TOML&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;toml&lt;/code&gt;, &lt;code&gt;@iarna/toml&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Bun.TOML&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;v1.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test runner&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;jest&lt;/code&gt;, &lt;code&gt;vitest&lt;/code&gt;, &lt;code&gt;mocha&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bun test&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;v1.3–1.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Bundler&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;webpack&lt;/code&gt;, &lt;code&gt;esbuild&lt;/code&gt;, &lt;code&gt;rollup&lt;/code&gt;, &lt;code&gt;parcel&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bun build&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;built-in&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;React Compiler&lt;/td&gt;
&lt;td&gt;&lt;code&gt;babel-plugin-react-compiler&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bun build --react-compiler&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;v1.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Package manager&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;npm&lt;/code&gt;, &lt;code&gt;yarn&lt;/code&gt;, &lt;code&gt;pnpm&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bun install&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;built-in&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;License checking&lt;/td&gt;
&lt;td&gt;&lt;code&gt;license-checker&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bun pm licenses&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;v1.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dependency dedup&lt;/td&gt;
&lt;td&gt;manual &lt;code&gt;npm dedupe&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bun dedupe&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;v1.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unused package detection&lt;/td&gt;
&lt;td&gt;&lt;code&gt;depcheck&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bun prune&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;v1.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vulnerability patching&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;npm audit&lt;/code&gt; + manual patches&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bun audit fix&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;v1.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Auto-restart&lt;/td&gt;
&lt;td&gt;&lt;code&gt;nodemon&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bun --watch&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;built-in&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Parallel scripts&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;concurrently&lt;/code&gt;, &lt;code&gt;npm-run-all&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bun run --parallel&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;v1.4&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Environment variables&lt;/td&gt;
&lt;td&gt;&lt;code&gt;dotenv&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;built-in &lt;code&gt;.env&lt;/code&gt; support&lt;/td&gt;
&lt;td&gt;built-in&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Running TypeScript&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;ts-node&lt;/code&gt;, &lt;code&gt;tsx&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bun app.ts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;built-in&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Not every replacement is a full drop-in — specific &lt;code&gt;webpack&lt;/code&gt; loaders or advanced Puppeteer flows aren't going anywhere, and a third-party package will stay necessary there. But for a typical full-stack TypeScript project in 2026, &lt;code&gt;package.json&lt;/code&gt; can genuinely shrink by a large factor, with &lt;code&gt;bun&lt;/code&gt; ending up as pretty much the only dependency left.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Links:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://bun.sh" rel="noopener noreferrer"&gt;Official Bun Website&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/oven-sh/bun" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://bun.com/docs" rel="noopener noreferrer"&gt;Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://bun.com/blog/bun-v1.4" rel="noopener noreferrer"&gt;Bun v1.4 release notes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>typescript</category>
      <category>javascript</category>
      <category>bunjs</category>
    </item>
    <item>
      <title>package.json, package-lock.json, and Semantic Versioning: Why You Need to Understand This</title>
      <dc:creator>Tertiumnon</dc:creator>
      <pubDate>Wed, 05 Aug 2026 11:44:46 +0000</pubDate>
      <link>https://dev.to/tertiumnon/packagejson-package-lockjson-and-semantic-versioning-why-you-need-to-understand-this-2m9j</link>
      <guid>https://dev.to/tertiumnon/packagejson-package-lockjson-and-semantic-versioning-why-you-need-to-understand-this-2m9j</guid>
      <description>&lt;p&gt;If you've ever run &lt;code&gt;npm install&lt;/code&gt; and then spent an hour and a half debugging why everything works locally but fails in production, this article is for you. That was probably a dependency version issue — the exact problem that proper semantic versioning and lock files solve.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why versioning exists in the first place
&lt;/h2&gt;

&lt;p&gt;Imagine: you wrote an app using React 18.2.0, and it works perfectly. A month later, React 18.3.0 is released. Should you automatically get this update? It depends on what changed. If it's only bug fixes, it's probably safe. If there's &lt;a href="https://docs.npmjs.com/about-semantic-versioning/" rel="noopener noreferrer"&gt;a breaking change&lt;/a&gt; that breaks half your code — no way.&lt;/p&gt;

&lt;p&gt;That's exactly why &lt;a href="https://semver.org/" rel="noopener noreferrer"&gt;semantic versioning (semver)&lt;/a&gt; exists. It's a standard that says: the version number carries information about what changed in the package.&lt;/p&gt;

&lt;h2&gt;
  
  
  Semantic versioning: MAJOR.MINOR.PATCH
&lt;/h2&gt;

&lt;p&gt;A version consists of three numbers: &lt;code&gt;MAJOR.MINOR.PATCH&lt;/code&gt;. For example, &lt;code&gt;1.2.3&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MAJOR&lt;/strong&gt; (first digit) — &lt;strong&gt;breaking changes&lt;/strong&gt; that break compatibility. If you update from 1.x.x to 2.x.x, prepare for some code to stop working.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MINOR&lt;/strong&gt; (second digit) — &lt;strong&gt;new features&lt;/strong&gt;, but backward-compatible. Updating from 1.2.0 to 1.3.0 should be safe.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PATCH&lt;/strong&gt; (third digit) — &lt;strong&gt;bug fixes&lt;/strong&gt;. Updating from 1.2.3 to 1.2.4 is just fixes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://semver.org/" rel="noopener noreferrer"&gt;The official semver specification&lt;/a&gt; states it clearly: increment MAJOR for incompatible API changes, MINOR for backward-compatible new features, and PATCH for backward-compatible bug fixes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example of an exception:&lt;/strong&gt; TypeScript is a counterexample. According to its official stance, &lt;a href="https://dev.to/_d7eb1c1703182e3ce1782/npm-vs-pnpm-vs-yarn-which-package-manager-should-you-use-in-2026-3o3o"&gt;TypeScript explicitly does not follow semver&lt;/a&gt; and introduces breaking changes in MINOR releases. This means upgrading TypeScript from 5.3.0 to 5.4.0 could break your build — and it's formally correct by version number, but not by semver standards. Lesson: even major versions don't guarantee a package follows semver.&lt;/p&gt;

&lt;h2&gt;
  
  
  Versioning in package.json: operators and symbols
&lt;/h2&gt;

&lt;p&gt;This is where the fun starts. When you write a version in &lt;code&gt;package.json&lt;/code&gt;, you can use different operators. Each tells npm which updates to look for during installation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Exact version (no symbols)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"@prisma/client"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"6.19.3"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means: install &lt;strong&gt;exactly&lt;/strong&gt; version 6.19.3, no higher, no lower. Pros: absolute predictability. Cons: if 6.19.4 comes out with a critical bug fix, you won't get it until you manually update &lt;code&gt;package.json&lt;/code&gt;. And if you forget about it... well, you get the idea.&lt;/p&gt;

&lt;h3&gt;
  
  
  Caret (^) — safe updates within major version
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"@prisma/client"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"^6.19.3"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The caret says: update MINOR and PATCH within the current MAJOR. So 6.19.3 → 6.20.0 → 6.99.9 is okay. But 7.0.0 is not. This is &lt;strong&gt;npm's default&lt;/strong&gt; when you run &lt;code&gt;npm install &amp;lt;package&amp;gt;&lt;/code&gt; without flags.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why this is good:&lt;/strong&gt; new features (MINOR) should be backward-compatible, so updating is safe. Bug fixes (PATCH) don't need worry at all.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why this can be problematic:&lt;/strong&gt; what if a package violates semver? Or what if a transitive dependency of some obscure library got a breaking change in its "minor" version? That's why lock files exist.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tilde (~) — only patches
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"@prisma/client"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"~6.19.3"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The tilde is more conservative: update only PATCH within the current MINOR. So 6.19.3 → 6.19.4 → 6.19.99 is okay. But 6.20.0 is not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When this is useful:&lt;/strong&gt; if you're working with a very unstable library where even minor versions can break things. Downside: you miss new features.&lt;/p&gt;

&lt;h3&gt;
  
  
  Greater than (&amp;gt;) and less than (&amp;lt;)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"express"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;gt;4.17.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"lodash"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;5.0.0"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This literally means what it says: install any version strictly greater than 4.17.0 or strictly less than 5.0.0. With &lt;code&gt;&amp;gt;=&lt;/code&gt; and &lt;code&gt;&amp;lt;=&lt;/code&gt; it's the same, but you include the boundary value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When you'd use this:&lt;/strong&gt; rarely. Usually you combine them: &lt;code&gt;"express": "&amp;gt;=4.17.0 &amp;lt;5.0.0"&lt;/code&gt; means "from 4.17.0 to 4.99.99".&lt;/p&gt;

&lt;h3&gt;
  
  
  Equals (=)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"react"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"=18.2.0"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the same as just &lt;code&gt;"react": "18.2.0"&lt;/code&gt;. Exact version, nothing else.&lt;/p&gt;

&lt;h3&gt;
  
  
  Asterisk (*)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"react"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"*"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Accept &lt;strong&gt;any&lt;/strong&gt; version. Including 0.x.x-alpha-dev-666. You rarely see this in production code because it's basically a lottery.&lt;/p&gt;

&lt;h3&gt;
  
  
  Combining operators
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://docs.npmjs.com/about-semantic-versioning/" rel="noopener noreferrer"&gt;According to npm documentation&lt;/a&gt;, you can combine operators with spaces:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"react"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;gt;=18.0.0 &amp;lt;19.0.0"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means: from 18.0.0 to 18.99.99 inclusive. Practically equivalent to &lt;code&gt;^18.0.0&lt;/code&gt;, but explicit.&lt;/p&gt;

&lt;h2&gt;
  
  
  package-lock.json: why it's your lifesaver
&lt;/h2&gt;

&lt;p&gt;Here's a scenario without a lock file:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Day 1, Machine A (your laptop):&lt;/strong&gt; you write &lt;code&gt;^@prisma/client: 6.19.3&lt;/code&gt; in package.json and run &lt;code&gt;npm install&lt;/code&gt;. The latest version at that moment is 6.19.5, so npm installs it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Day 2, Machine B (your colleague's machine):&lt;/strong&gt; he clones the repo, sees &lt;code&gt;^6.19.3&lt;/code&gt;, and runs &lt;code&gt;npm install&lt;/code&gt;. But 6.20.0 has just been released — so he gets that instead.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Chaos:&lt;/strong&gt; it works for you, it doesn't for him. Or worse — tests pass locally but fail on CI/CD, where the build happens at yet another point in time.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://docs.npmjs.com/about-semantic-versioning/" rel="noopener noreferrer"&gt;package-lock.json&lt;/a&gt; is a file that npm automatically creates and updates when you run &lt;code&gt;npm install&lt;/code&gt;. It records the &lt;strong&gt;exact version of every package and every dependency&lt;/strong&gt; that was installed. When another developer or CI runs &lt;code&gt;npm install&lt;/code&gt;, npm reads this file and installs &lt;strong&gt;the exact same versions&lt;/strong&gt;, regardless of what &lt;code&gt;^&lt;/code&gt; is in package.json.&lt;/p&gt;

&lt;p&gt;This is why lock files are &lt;strong&gt;critical&lt;/strong&gt; to commit to git:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# ✓ correct&lt;/span&gt;
git add package.json package-lock.json
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Add dependency"&lt;/span&gt;

&lt;span class="c"&gt;# ✗ wrong&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"package-lock.json"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; .gitignore
git add package.json
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Add dependency"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you don't commit the lock file, every installation becomes a lottery. Imagine you're using &lt;code&gt;^&lt;/code&gt; everywhere, and two weeks pass between your local update and the production server update. 50 new dependency versions are released. The probability that all of them are compatible and no one violated semver — approaches zero.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/wilsonwangdev/lock-files-and-package-manager-migration-a-practical-risk-analysis-2ejn"&gt;According to research&lt;/a&gt;, real packages constantly violate semantic versioning: TypeScript introduces breaking changes in minor releases, PostCSS plugins silently change CSS output. This means lock files are not just convenience — they're your first line of defense.&lt;/p&gt;

&lt;h2&gt;
  
  
  The horror story: when versioning breaks your project
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Scenario 1: Forgotten bug fix&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You locked &lt;code&gt;~express: 4.17.0&lt;/code&gt; and forgot to update. Version 4.17.5 comes out with a critical security fix. You don't get it because you explicitly wrote &lt;code&gt;~&lt;/code&gt;, not &lt;code&gt;^&lt;/code&gt;. Three months later, hackers exploit that vulnerability. Not fun.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario 2: Transitive dependencies&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You installed &lt;code&gt;some-lib&lt;/code&gt; version 1.2.0, which depends on &lt;code&gt;other-lib: ^2.3.0&lt;/code&gt;. When you installed it, that was 2.3.5. A week later, &lt;code&gt;other-lib@2.4.0&lt;/code&gt; comes out with a breaking change. Your colleague clones the repo, runs &lt;code&gt;npm install&lt;/code&gt; without a lock file — and gets 2.4.0 because the caret allows minor updates. His build breaks, yours works. All because there was no lock file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario 3: CI/CD roulette&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;On your machine &lt;code&gt;npm install&lt;/code&gt;, on CI machine &lt;code&gt;npm install&lt;/code&gt; (or worse — no lock file). Different versions, different results. Code passes local tests but fails on CI. Then you spend two hours wondering why the same thing works differently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Different lock files for different package managers
&lt;/h2&gt;

&lt;p&gt;If you're switching from npm to yarn, pnpm, or Bun, it's important to know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;npm&lt;/strong&gt; uses &lt;code&gt;package-lock.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;yarn&lt;/strong&gt; uses &lt;code&gt;yarn.lock&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;pnpm&lt;/strong&gt; uses &lt;code&gt;pnpm-lock.yaml&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bun&lt;/strong&gt; uses &lt;code&gt;bun.lock&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Structurally they differ slightly (&lt;a href="https://dev.to/_d7eb1c1703182e3ce1782/npm-vs-pnpm-vs-yarn-which-package-manager-should-you-use-in-2026-3o3o"&gt;pnpm-lock.yaml&lt;/a&gt;, for instance, is optimized for pnpm's content-addressable storage, and &lt;code&gt;bun.lock&lt;/code&gt; is designed for maximum speed and Node.js ecosystem compatibility), but the essence is the same: they lock exact versions. The key thing:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Never commit lock files from different package managers simultaneously.&lt;/strong&gt; If you're switching from npm to pnpm or Bun, delete the old &lt;code&gt;package-lock.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;rm &lt;/span&gt;package-lock.json
pnpm &lt;span class="nb"&gt;install
&lt;/span&gt;git add pnpm-lock.yaml package.json
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Migrate to pnpm"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or when switching to Bun:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;rm &lt;/span&gt;package-lock.json yarn.lock pnpm-lock.yaml
bun &lt;span class="nb"&gt;install
&lt;/span&gt;git add bun.lock package.json
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Migrate to bun"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you leave multiple files, they'll conflict and confuse your teammates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common developer mistakes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Mistake 1: Adding lock file to .gitignore
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# ✗ mistake&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"package-lock.json"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; .gitignore
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This turns versioning into a casino. Commit lock files &lt;strong&gt;always&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mistake 2: Manually editing lock files
&lt;/h3&gt;

&lt;p&gt;Lock files are automatic. Don't touch them by hand. If you need to update a dependency, use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm update package-name  &lt;span class="c"&gt;# update within range&lt;/span&gt;
npm &lt;span class="nb"&gt;install &lt;/span&gt;package-name@desired-version  &lt;span class="c"&gt;# install specific version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Mistake 3: Exact versions everywhere
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"react"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"18.2.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"express"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"4.17.1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"lodash"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"4.17.21"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is conservative but tedious. You miss bug fixes. Use &lt;code&gt;^&lt;/code&gt; by default — that's what semver is designed for.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mistake 4: Wrong lock file handling during branch merges
&lt;/h3&gt;

&lt;p&gt;If you have a merge conflict in &lt;code&gt;package-lock.json&lt;/code&gt;, don't try to resolve it manually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# ✗ wrong: manually editing a lock file&lt;/span&gt;
git add package-lock.json  &lt;span class="c"&gt;# after manual editing&lt;/span&gt;

&lt;span class="c"&gt;# ✓ correct&lt;/span&gt;
git checkout &lt;span class="nt"&gt;--ours&lt;/span&gt; package-lock.json  &lt;span class="c"&gt;# or --theirs&lt;/span&gt;
npm &lt;span class="nb"&gt;install&lt;/span&gt;  &lt;span class="c"&gt;# npm will automatically update the lock file&lt;/span&gt;
git add package-lock.json package.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;npm will sort out the conflict on the next &lt;code&gt;install&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Mistake 5: Using npm install instead of npm ci in CI/CD
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# ✗ may update the lock file&lt;/span&gt;
npm &lt;span class="nb"&gt;install&lt;/span&gt;

&lt;span class="c"&gt;# ✓ guarantees exact versions&lt;/span&gt;
npm ci  &lt;span class="c"&gt;# clean install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://docs.npmjs.com/cli/ci" rel="noopener noreferrer"&gt;&lt;code&gt;npm ci&lt;/code&gt;&lt;/a&gt; is specifically for CI environments — it installs exactly what's in the lock file without updating it.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to properly work with versioning
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Use &lt;code&gt;^&lt;/code&gt; by default:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"react"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"^18.2.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"express"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"^4.17.0"&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This lets you get bug fixes and new features automatically but protects from breaking changes.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Commit the lock file:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git add package.json package-lock.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Update dependencies through npm, not manually:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npm update            &lt;span class="c"&gt;# update within ranges&lt;/span&gt;
   npm outdated          &lt;span class="c"&gt;# see what updates are available&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Use &lt;code&gt;npm ci&lt;/code&gt; instead of &lt;code&gt;npm install&lt;/code&gt; in production:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npm ci
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;If you need absolute stability, use &lt;code&gt;~&lt;/code&gt; or exact versions&lt;/strong&gt; — but only for critical dependencies:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"critical-lib"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"~1.2.3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
     &lt;/span&gt;&lt;span class="nl"&gt;"regular-lib"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"^1.2.3"&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Regularly update dependencies&lt;/strong&gt;, but do it intentionally:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npm audit              &lt;span class="c"&gt;# check for vulnerabilities&lt;/span&gt;
   npm audit fix          &lt;span class="c"&gt;# auto-fix&lt;/span&gt;
   npm outdated           &lt;span class="c"&gt;# see available updates&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Final checklist
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✓ I understand that MAJOR.MINOR.PATCH means breaking/new/fix&lt;/li&gt;
&lt;li&gt;✓ I use &lt;code&gt;^&lt;/code&gt; for flexibility, &lt;code&gt;~&lt;/code&gt; for conservatism&lt;/li&gt;
&lt;li&gt;✓ I commit package-lock.json to git&lt;/li&gt;
&lt;li&gt;✓ I use &lt;code&gt;npm ci&lt;/code&gt; in CI/CD, not &lt;code&gt;npm install&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;✓ I never manually edit lock files&lt;/li&gt;
&lt;li&gt;✓ I don't commit lock files from different package managers at the same time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's all you need to avoid those soul-crushing hours of debugging "works on my machine but not in production."&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.npmjs.com/about-semantic-versioning/" rel="noopener noreferrer"&gt;npm Documentation: Semantic Versioning&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://semver.org/" rel="noopener noreferrer"&gt;Semantic Versioning Official Specification (semver.org)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/@gfaganli/understanding-npm-semantic-versioning-and-package-lock-json-bc0563c66e39" rel="noopener noreferrer"&gt;Understanding npm Semantic Versioning and package-lock.json by Gulnar Gasanova, Medium&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://bytearcher.com/articles/semver-explained-why-theres-a-caret-in-my-package-json/" rel="noopener noreferrer"&gt;Semver Explained: Why There's a Caret in Your package.json by ByteArcher&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/_d7eb1c1703182e3ce1782/npm-vs-pnpm-vs-yarn-which-package-manager-should-you-use-in-2026-3o3o"&gt;pnpm vs npm vs yarn: Which Package Manager Should You Actually Use in 2026? by DEV Community&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/torp_martin/navigating-lock-files-best-practices-and-tips-5f44"&gt;Navigating Lock Files: Best Practices and Tips by DEV Community&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/wilsonwangdev/lock-files-and-package-manager-migration-a-practical-risk-analysis-2ejn"&gt;Lock Files and Package Manager Migration: A Practical Risk Analysis by DEV Community&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.npmjs.com/cli/ci" rel="noopener noreferrer"&gt;npm ci Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>node</category>
      <category>npm</category>
    </item>
    <item>
      <title>SolidJS vs React (2026)</title>
      <dc:creator>Tertiumnon</dc:creator>
      <pubDate>Mon, 27 Jul 2026 09:16:45 +0000</pubDate>
      <link>https://dev.to/tertiumnon/solidjs-vs-react-2026-3fb0</link>
      <guid>https://dev.to/tertiumnon/solidjs-vs-react-2026-3fb0</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftdor2ffk429uwnv4wjtv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftdor2ffk429uwnv4wjtv.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;React remains the de facto frontend standard, but over the past couple of years SolidJS has built a solid reputation as "the framework that got reactivity right." Solid has no virtual DOM, a component runs exactly once, and updates land with surgical precision. That sounds like marketing copy, but it's a direct consequence of the architecture. Let's dig into where SolidJS is genuinely ahead of React on a technical level, what the current 2025-2026 benchmarks and surveys actually say, and — without sugarcoating it — where React still wins by a wide margin.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reactivity: signals vs the virtual DOM
&lt;/h2&gt;

&lt;p&gt;The core architectural difference sits at the heart of rendering. In React, a component is a function that re-executes in full whenever state changes; the result is diffed against the previous tree via the virtual DOM, and only then are targeted patches applied to the real DOM. It's a convenient model, but it charges a computational tax on every update, even when a single text field deep inside a nested tree is all that changed.&lt;/p&gt;

&lt;p&gt;SolidJS works fundamentally differently: JSX compiles down to plain DOM node creation calls, and state lives in signals (&lt;code&gt;createSignal&lt;/code&gt;) that the component reads once, during the first render. After that, the component function's body never runs again — instead, fine-grained reactive subscriptions are wired up directly: a specific DOM node subscribes straight to a specific signal and updates without any tree comparison whatsoever. Developers call this fine-grained reactivity, as opposed to React's "coarse-grained" component re-rendering. One commenter on the Solid 2.0 beta puts it bluntly: &lt;a href="https://www.infoq.com/news/2026/05/solidjs-2-async/" rel="noopener noreferrer"&gt;Solid has always had the best reactivity model among JS frameworks — true fine-grained updates without a virtual DOM&lt;/a&gt;. That's a bold claim, but it's backed by a concrete architecture that skips the diffing pass entirely, not just the author's personal enthusiasm.&lt;/p&gt;

&lt;p&gt;Signals have long stopped being one framework's party trick — even competitors have adopted the idea. Angular officially acknowledged that its own signal-based reactivity model (&lt;code&gt;signal()&lt;/code&gt;, &lt;code&gt;computed()&lt;/code&gt;, &lt;code&gt;effect()&lt;/code&gt;) was partly inspired by SolidJS: in the &lt;a href="https://github.com/angular/angular/discussions/49685" rel="noopener noreferrer"&gt;Angular Signals RFC&lt;/a&gt;, the Angular team directly credits Solid's creator, Ryan Carniato, for the insight and consultation he provided during the design process. When a framework the size of Angular — one that's been tied to Zone.js and its own change-detection model for a decade — pivots toward Solid's ideas, that says more than any marketing ever could.&lt;/p&gt;

&lt;p&gt;The practical upshot: in React, developers have to manually shield components from unnecessary re-renders, or lean on the React Compiler to do it for them. In Solid, unnecessary re-renders structurally don't exist in the first place — only the DOM node that actually depends on the changed signal gets updated.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the benchmarks say about performance
&lt;/h2&gt;

&lt;p&gt;The architectural gap shows up directly in synthetic tests. &lt;a href="https://github.com/krausest/js-framework-benchmark" rel="noopener noreferrer"&gt;Stefan Krause's js-framework-benchmark&lt;/a&gt; — the most frequently cited independent frontend framework benchmark — has shown the same pattern for years: SolidJS consistently sits in the top tier of results, right next to "pure" VanillaJS with no framework at all, while React noticeably lags in scenarios with frequent fine-grained updates, large lists, and deeply nested component trees. The &lt;a href="https://listiak.dev/blog/the-state-of-solid-js-in-2026-signals-performance-and-growing-influence" rel="noopener noreferrer"&gt;current state-of-Solid.js-in-2026 overview&lt;/a&gt;, which draws on that benchmark's data, confirms this. According to &lt;a href="https://www.boundev.ai/blog/solidjs-vs-react-performance-comparison" rel="noopener noreferrer"&gt;Boundev's&lt;/a&gt; analysis, in scenarios typical of js-framework-benchmark — creating, updating, and deleting thousands of rows — SolidJS beats React on runtime performance by roughly 50-70%. Worth flagging right away: that's not a universal constant that applies "to any website," it's the result of synthetic, update-heavy tests where the gap between fine-grained reactivity and the virtual DOM is at its most visible.&lt;/p&gt;

&lt;p&gt;On real production interfaces the picture is more modest: most of the time budget there goes to network requests, images, and third-party JS rather than DOM diffing, so the gap tends to be much smaller than in the lab. The React Compiler (more on that below) narrows it further still.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bundle size
&lt;/h2&gt;

&lt;p&gt;Fine-grained reactivity gives SolidJS another side benefit: Solid's compiler turns JSX into direct DOM instructions without needing to ship a virtual-DOM diffing engine at runtime, so the framework itself ends up noticeably lighter. According to the &lt;a href="https://listiak.dev/blog/the-state-of-solid-js-in-2026-signals-performance-and-growing-influence" rel="noopener noreferrer"&gt;state-of-Solid.js-in-2026 overview&lt;/a&gt;, Solid's core weighs around &lt;strong&gt;7.6 KB&lt;/strong&gt; minified and gzipped, versus roughly &lt;strong&gt;45 KB&lt;/strong&gt; for React + ReactDOM combined, 38 KB for Vue, and 85+ KB for Angular. The same source, citing a case study from Radware, gives a real production example: for a feature-comparable application, the SolidJS bundle came in around 80 KB versus roughly 290 KB for React. The independent &lt;a href="https://framework-benchmarks.as93.net/solid/" rel="noopener noreferrer"&gt;framework-benchmarks.as93.net&lt;/a&gt; project paints a similar picture — it builds an identical app across different frameworks specifically to compare bundle sizes fairly, and there the gzipped size of a typical weather app built with Solid came out to about 9 KB.&lt;/p&gt;

&lt;p&gt;For projects where fast first load on slow networks and weak devices actually matters, these kilobytes translate directly into milliseconds of Time to Interactive rather than staying a nice number in a report.&lt;/p&gt;

&lt;h2&gt;
  
  
  React Compiler: React strikes back
&lt;/h2&gt;

&lt;p&gt;It would be unfair to describe React the way it looked in 2023. &lt;a href="https://react.dev/blog/2025/10/07/react-compiler-1" rel="noopener noreferrer"&gt;On October 7, 2025, the React team announced the release of React Compiler 1.0&lt;/a&gt; — a build-time compiler that automatically inserts memoization across the component tree, taking over work that used to be done manually with &lt;code&gt;useMemo&lt;/code&gt;, &lt;code&gt;useCallback&lt;/code&gt;, and &lt;code&gt;React.memo&lt;/code&gt;. According to that same official announcement, on real products like the Meta Quest Store the compiler delivered up to a 12% improvement on initial load and cross-page navigation, and sped up individual interactions by more than &lt;strong&gt;2.5x&lt;/strong&gt; — with neutral memory consumption. By 2026, the React Compiler is considered default practice for new React projects, and its rules are baked directly into the recommended &lt;code&gt;eslint-plugin-react-hooks&lt;/code&gt; preset.&lt;/p&gt;

&lt;p&gt;This doesn't erase the fundamental architectural difference — the React Compiler still operates on top of the "re-execute the whole component, but avoid redundant work through memoization" model rather than fine-grained signals. But it meaningfully narrows the practical gap in production, and it takes a big chunk of manual optimization off the developer's plate — optimization that used to be a common source of bugs from forgotten dependencies in &lt;code&gt;useMemo&lt;/code&gt;/&lt;code&gt;useCallback&lt;/code&gt; arrays.&lt;/p&gt;

&lt;h2&gt;
  
  
  Developer experience: signals are pleasant, but not without surprises
&lt;/h2&gt;

&lt;p&gt;Solid's syntax is deliberately React-like — JSX, hook-like primitives (&lt;code&gt;createSignal&lt;/code&gt;, &lt;code&gt;createEffect&lt;/code&gt;, &lt;code&gt;createMemo&lt;/code&gt;), a component-based approach — so the transition for a React developer feels a lot softer than, say, switching to Vue with its templates and SFCs. But a model without component re-rendering brings its own set of gotchas you won't find in React.&lt;/p&gt;

&lt;p&gt;The main source of beginner mistakes is prop destructuring. In React, &lt;code&gt;const { name } = props&lt;/code&gt; is standard practice. In Solid, props are implemented via getters specifically to enable fine-grained reactivity, so destructuring props "at the door" of a component breaks the reactive link and freezes the value at the moment of the first call. A &lt;a href="https://vladislav-lipatov.medium.com/solidjs-pain-points-and-pitfalls-a693f62fcb4c" rel="noopener noreferrer"&gt;rundown of SolidJS's practical pitfalls&lt;/a&gt; lists several other non-obvious traps: calling an arbitrary function inside &lt;code&gt;createEffect&lt;/code&gt; implicitly subscribes the effect to every signal that function reads (which sometimes calls for wrapping it in &lt;code&gt;untrack&lt;/code&gt;), directives are awkward to reuse across files because of how the TypeScript compiler handles them, and &lt;code&gt;resource&lt;/code&gt; primitives don't support partial updates of nested fields — changing a single object property recreates the whole thing and triggers dependent effects unnecessarily. Nothing fatal, but it takes time to get used to, and none of it is particularly intuitive if your background is purely React.&lt;/p&gt;

&lt;p&gt;On the plus side, there are noticeably fewer React-specific constraints to worry about: you don't need to remember the "rules of hooks" (no conditional or looped hook calls), because Solid's primitives aren't tied to call order inside a render, and a component that runs only once eliminates an entire class of stale-closure bugs that plague &lt;code&gt;useEffect&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;TypeScript deserves its own mention, and here Solid has a genuinely objective structural edge. Solid is written in TypeScript from the ground up, and types for all its primitives (&lt;a href="https://github.com/solidjs/solid/discussions/980" rel="noopener noreferrer"&gt;&lt;code&gt;createSignal&lt;/code&gt;&lt;/a&gt;, &lt;code&gt;createEffect&lt;/code&gt;, &lt;code&gt;createMemo&lt;/code&gt;, JSX components) ship directly inside the &lt;code&gt;solid-js&lt;/code&gt; package — I checked its &lt;code&gt;package.json&lt;/code&gt; directly via the npm registry, and it has a &lt;code&gt;"types": "types/index.d.ts"&lt;/code&gt; field pointing to bundled declarations; there's simply no separate &lt;code&gt;@types/solid-js&lt;/code&gt; package in the registry. React's situation is different: its own &lt;code&gt;package.json&lt;/code&gt; has no &lt;code&gt;types&lt;/code&gt; field at all — typings live in a separate &lt;code&gt;@types/react&lt;/code&gt; package, which &lt;a href="https://react.dev/learn/typescript" rel="noopener noreferrer"&gt;React.dev itself describes&lt;/a&gt; as sourced from &lt;strong&gt;DefinitelyTyped&lt;/strong&gt;, meaning it's community-maintained rather than maintained by the React team directly. In practice, that means React's types can temporarily fall out of sync with the runtime when new versions ship (a common example being delays in typing new hooks), whereas for Solid, types and runtime are always the same version by construction, because they're literally the same package.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ecosystem and market: where React wins decisively
&lt;/h2&gt;

&lt;p&gt;In terms of ecosystem reach and maturity, React is still in a league of its own — there isn't much to argue about here, the gap in its favor is measured in orders of magnitude.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Developer surveys.&lt;/strong&gt; According to &lt;a href="https://2025.stateofjs.com/en-US/libraries/front-end-frameworks/" rel="noopener noreferrer"&gt;State of JavaScript 2025&lt;/a&gt;, React remains the most-used frontend framework: &lt;a href="https://www.infoq.com/news/2026/03/state-of-js-survey-2025/" rel="noopener noreferrer"&gt;83.6% of respondents&lt;/a&gt; use it at work, compared to about 10% for SolidJS. At the same time, Solid has held the highest satisfaction rating among frameworks for five years running — people who've tried it rarely want to go back to alternatives, but the overwhelming majority of the market is still on React. That popularity has a flip side: the same survey records complaints about React's complexity and about the monetization strategy around Next.js/Vercel — one of the most frequently mentioned pain points in respondent comments. The numbers back this up: Next.js satisfaction in the survey dropped from 68% to 55% amid growing complexity around Server Components and the App Router, and React itself, despite 98% usage reach, draws the most specific complaints about individual APIs — &lt;code&gt;useEffect&lt;/code&gt; got the lowest satisfaction rating of any hook, with dependency-array issues coming in second (21% dissatisfied). React's popularity isn't going anywhere, it remains dominant — but satisfaction with working on it, and with its flagship meta-framework, has dropped noticeably.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub.&lt;/strong&gt; The gap in community size is also visible in the repositories: &lt;a href="https://github.com/facebook/react" rel="noopener noreferrer"&gt;facebook/react&lt;/a&gt; has around 247,000 stars versus roughly 35,700 for &lt;a href="https://github.com/solidjs/solid" rel="noopener noreferrer"&gt;solidjs/solid&lt;/a&gt; — nearly a sevenfold difference, reflecting the scale of the contributor base and outside attention.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Job market.&lt;/strong&gt; The gap in job listings is even starker than the one in GitHub stars: React has effectively become a baseline requirement in frontend job postings at large companies, while the SolidJS developer community remains niche — there are an order of magnitude fewer openings, and hiring mostly happens through niche boards like &lt;a href="https://rrjanbiah.github.io/solidjs-jobs/" rel="noopener noreferrer"&gt;SolidJS Jobs Listing&lt;/a&gt; rather than mainstream job boards.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ready-made solutions.&lt;/strong&gt; React has Next.js, Remix/React Router, React Native for mobile, dozens of mature UI kit libraries, and years' worth of ready-made answers on Stack Overflow — things that in Solid often need to be solved yourself or wait for the ecosystem to catch up. SolidStart, the Next.js-equivalent meta-framework for Solid, is still under active development: as of early 2026 it's at &lt;a href="https://listiak.dev/blog/the-state-of-solid-js-in-2026-signals-performance-and-growing-influence" rel="noopener noreferrer"&gt;SolidStart 2.0.0-alpha.2&lt;/a&gt;, while the Next.js ecosystem has years of production usage under its belt at companies like Vercel, Nike, TikTok, and dozens of others. For teams that care about predictable hiring, API stability, and a wide range of ready-made integrations, this is a heavy — and often decisive — argument in favor of React, regardless of the competitor's architectural advantages.&lt;/p&gt;

&lt;p&gt;Native apps deserve a separate note: React has React Native, while Solid has no direct framework equivalent for mobile development. It does have an alternative on a different stack that covers more than just desktop, though. SolidJS pairs well with &lt;a href="https://github.com/tauri-apps/tauri" rel="noopener noreferrer"&gt;Tauri&lt;/a&gt; — a Rust wrapper that renders a frontend built with any web framework, but instead of bundling Chromium like Electron does, it uses the system's WebView, resulting in dramatically smaller binaries and lower memory usage. With the stable release of &lt;a href="https://v2.tauri.app/blog/tauri-20/" rel="noopener noreferrer"&gt;Tauri 2.0&lt;/a&gt;, the framework stopped being a purely desktop tool: it now officially supports iOS and Android from the same codebase — WKWebView on iOS, the system Android WebView on Android — meaning that, in theory, a single Solid app can be built for all five platforms at once (Windows, macOS, Linux, iOS, Android). The mobile side is younger than the desktop side and still a bit rough around the edges — there are quirks around plugins, app signing, and webview peculiarities — but it's already usable in production, not just a proof of concept. There are official and community-maintained Tauri + Solid starter templates (&lt;a href="https://github.com/riipandi/tauri-start-solid" rel="noopener noreferrer"&gt;riipandi/tauri-start-solid&lt;/a&gt;, &lt;a href="https://github.com/ZanzyTHEbar/SolidJSTauri" rel="noopener noreferrer"&gt;ZanzyTHEbar/SolidJSTauri&lt;/a&gt;, and for mobile builds specifically &lt;a href="https://github.com/ZanzyTHEbar/SolidJSTauriMobile" rel="noopener noreferrer"&gt;SolidJSTauriMobile&lt;/a&gt;), and a walkthrough of the Rust + SolidJS + Tauri combo for cross-platform apps has also been published on &lt;a href="https://blog.logrocket.com/rust-solid-js-tauri-desktop-app/" rel="noopener noreferrer"&gt;LogRocket Blog&lt;/a&gt;. Electron is still unmatched in desktop maturity and reach for now — roughly 4.95 million weekly downloads for &lt;code&gt;electron&lt;/code&gt; from npm versus about 1.96 million for &lt;code&gt;@tauri-apps/cli&lt;/code&gt; (npm registry data for July 13-19, 2026) — and it's still slightly ahead on GitHub stars too (122K versus 109K for &lt;a href="https://github.com/tauri-apps/tauri" rel="noopener noreferrer"&gt;tauri-apps/tauri&lt;/a&gt;). But the gap is noticeably narrower than on the web, and the fact that Tauri has grown from a niche desktop project into a full-fledged cross-platform alternative to both Electron and React Native within a couple of years makes Solid + Tauri a genuinely fast-growing choice in exactly the area where SolidJS used to have a structural gap versus React.&lt;/p&gt;

&lt;h2&gt;
  
  
  SolidJS 2.0 and SolidStart: where the framework is headed
&lt;/h2&gt;

&lt;p&gt;The project isn't standing still. &lt;a href="https://www.infoq.com/news/2026/05/solidjs-2-async/" rel="noopener noreferrer"&gt;The SolidJS 2.0 beta shipped on May 15, 2026&lt;/a&gt; — the first major release to make async a first-class citizen directly inside the reactive graph: computations can now return promises directly, and the framework handles suspending and resuming on its own, without wrapping everything in &lt;code&gt;Suspense&lt;/code&gt;. The release also drops the old &lt;code&gt;Suspense&lt;/code&gt; in favor of a simpler &lt;code&gt;Loading&lt;/code&gt; that's only responsible for a subtree's initial readiness, adds &lt;code&gt;action()&lt;/code&gt; and &lt;code&gt;createOptimisticStore&lt;/code&gt; for mutations, and now batches signal writes at the microtask level — a refactor that the framework's creator, &lt;a href="https://www.infoq.com/news/2026/05/solidjs-2-async/" rel="noopener noreferrer"&gt;Ryan Carniato&lt;/a&gt;, defends as the outcome of more than a year spent analyzing alternative approaches, even though part of the community finds the new split-phase &lt;code&gt;createEffect&lt;/code&gt; API clunkier at first glance.&lt;/p&gt;

&lt;p&gt;The current stable line is 1.9.x (according to the &lt;a href="https://listiak.dev/blog/the-state-of-solid-js-in-2026-signals-performance-and-growing-influence" rel="noopener noreferrer"&gt;state-of-Solid.js-in-2026 overview&lt;/a&gt;, the latest version is 1.9.11), so the 2.0 beta isn't yet recommended for new production projects. But the very fact that the framework keeps getting architectural investment, rather than freezing on a "stable but neglected" 1.x, is a good sign for its continued viability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom line: when to pick what
&lt;/h2&gt;

&lt;p&gt;Technically, SolidJS really is better than React in a lot of ways: fine-grained reactivity without a virtual DOM eliminates an entire class of re-render problems, synthetic benchmarks like js-framework-benchmark consistently put Solid on par with vanilla JS, and the bundle ends up several times lighter for comparable functionality. All of that is a direct consequence of compiling JSX into fine-grained DOM operations, not empty fan enthusiasm.&lt;/p&gt;

&lt;p&gt;But "technically better" and "the right choice for your team right now" are different questions. The React Compiler has meaningfully narrowed the practical performance gap in production, and React's ecosystem, job market, and sheer volume of ready-made solutions remain an order of magnitude bigger than Solid's. That directly affects development speed and how easy it is to hire for the project — a factor that matters for years, not one sprint. If you're starting a personal or small commercial project where performance and a small bundle really matter, and flexibility in picking libraries isn't a priority — SolidJS is a mature, well-justified choice today. If you're working on a large team, depend on a wide range of ready-made integrations, need React Native, or simply don't want to spend weeks hunting for a rare specialist later — React remains the far safer bet, and the React Compiler only strengthens that bet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.infoq.com/news/2026/05/solidjs-2-async/" rel="noopener noreferrer"&gt;SolidJS 2.0 Beta: First-Class Async, Reworked Suspense and Deterministic Batching — InfoQ, May 2026&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://listiak.dev/blog/the-state-of-solid-js-in-2026-signals-performance-and-growing-influence" rel="noopener noreferrer"&gt;The state of Solid.js in 2026: signals, performance, and growing influence — Tomas Listiak&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/krausest/js-framework-benchmark" rel="noopener noreferrer"&gt;js-framework-benchmark — Stefan Krause, GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.boundev.ai/blog/solidjs-vs-react-performance-comparison" rel="noopener noreferrer"&gt;SolidJS vs React Performance Comparison — Boundev&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://framework-benchmarks.as93.net/solid/" rel="noopener noreferrer"&gt;Framework Benchmarks: Solid.js — as93.net&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://react.dev/blog/2025/10/07/react-compiler-1" rel="noopener noreferrer"&gt;React Compiler v1.0 — official React blog, October 7, 2025&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://react.dev/versions" rel="noopener noreferrer"&gt;React Versions — react.dev&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://vladislav-lipatov.medium.com/solidjs-pain-points-and-pitfalls-a693f62fcb4c" rel="noopener noreferrer"&gt;SolidJS pain points and pitfalls — Vladislav Lipatov, Medium&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://2025.stateofjs.com/en-US/libraries/front-end-frameworks/" rel="noopener noreferrer"&gt;State of JavaScript 2025: Front-end Frameworks&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.infoq.com/news/2026/03/state-of-js-survey-2025/" rel="noopener noreferrer"&gt;State of JavaScript 2025: Survey Reveals a Maturing Ecosystem — InfoQ, March 2026&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/facebook/react" rel="noopener noreferrer"&gt;facebook/react — GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/solidjs/solid" rel="noopener noreferrer"&gt;solidjs/solid — GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://rrjanbiah.github.io/solidjs-jobs/" rel="noopener noreferrer"&gt;SolidJS Jobs Listing &amp;amp; SolidJS Developers/Freelancers Listing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/tauri-apps/tauri" rel="noopener noreferrer"&gt;tauri-apps/tauri — GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/riipandi/tauri-start-solid" rel="noopener noreferrer"&gt;riipandi/tauri-start-solid — GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ZanzyTHEbar/SolidJSTauri" rel="noopener noreferrer"&gt;ZanzyTHEbar/SolidJSTauri — GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ZanzyTHEbar/SolidJSTauriMobile" rel="noopener noreferrer"&gt;ZanzyTHEbar/SolidJSTauriMobile — GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.logrocket.com/rust-solid-js-tauri-desktop-app/" rel="noopener noreferrer"&gt;Rust, SolidJS, and Tauri: Create a cross-platform desktop app — LogRocket Blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://v2.tauri.app/blog/tauri-20/" rel="noopener noreferrer"&gt;Tauri 2.0 Stable Release — official Tauri blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/angular/angular/discussions/49685" rel="noopener noreferrer"&gt;RFC: Angular Signals — angular/angular discussion on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://api.npmjs.org/downloads/point/last-week/@tauri-apps/cli" rel="noopener noreferrer"&gt;@tauri-apps/cli — npm download stats&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://api.npmjs.org/downloads/point/last-week/electron" rel="noopener noreferrer"&gt;electron — npm download stats&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://react.dev/learn/typescript" rel="noopener noreferrer"&gt;Using TypeScript — react.dev&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.solidjs.com/configuration/typescript" rel="noopener noreferrer"&gt;TypeScript — SolidJS Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://registry.npmjs.org/solid-js/latest" rel="noopener noreferrer"&gt;solid-js — npm registry&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://registry.npmjs.org/react/latest" rel="noopener noreferrer"&gt;react — npm registry&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://2025.stateofreact.com/en-US/features/" rel="noopener noreferrer"&gt;State of React 2025: Features&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>solidjs</category>
      <category>react</category>
    </item>
    <item>
      <title>minimal css framework</title>
      <dc:creator>Tertiumnon</dc:creator>
      <pubDate>Sat, 07 Jun 2025 05:17:44 +0000</pubDate>
      <link>https://dev.to/tertiumnon/minimal-css-framework-2453</link>
      <guid>https://dev.to/tertiumnon/minimal-css-framework-2453</guid>
      <description></description>
      <category>frontend</category>
      <category>webdev</category>
      <category>minimalism</category>
    </item>
    <item>
      <title>Cooking with TypeScript enums</title>
      <dc:creator>Tertiumnon</dc:creator>
      <pubDate>Wed, 26 Mar 2025 16:42:35 +0000</pubDate>
      <link>https://dev.to/tertiumnon/cooking-with-typescript-enums-4822</link>
      <guid>https://dev.to/tertiumnon/cooking-with-typescript-enums-4822</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F411fllkw85e63nr58iww.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F411fllkw85e63nr58iww.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Periodically I hear that something wrong with TypeScript enums. But if you understand how it works - it's not an issue for you.&lt;/p&gt;

&lt;p&gt;The usage is very simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kr"&gt;enum&lt;/span&gt; &lt;span class="nx"&gt;Role&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;None&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Moderator&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Admin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And we have a good news here - we can use string values in TypeScript! For instance, C# enums can't work with string values.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kr"&gt;enum&lt;/span&gt; &lt;span class="nx"&gt;UserRole&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;None&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Moderator&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;moderator&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Admin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;admin&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Pros and cons of enums
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Excessive JavaScript code after compilation
&lt;/h3&gt;

&lt;p&gt;I think the claim that TypeScript enums produce excessive JavaScript code is somewhat overstated. Have you ever wondered how much code your compiler generates? I highly doubt it. But when it comes to types, you somehow think differently. Don't you find that strange?&lt;/p&gt;

&lt;p&gt;Let's take a look on generated JS code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;Role&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;function &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;Role&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;Role&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;Role&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;None&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;None&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;Role&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;Role&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Moderator&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Moderator&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;Role&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;Role&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Admin&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Admin&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;})(&lt;/span&gt;&lt;span class="nx"&gt;Role&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Role&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Role&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Looks ugly but it doesn't produce any "terrible" effects.&lt;/p&gt;

&lt;p&gt;We can continue our investigation. Let's create a file with &lt;code&gt;enum&lt;/code&gt; and a file with &lt;code&gt;type&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;RoleType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;moderator&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;admin&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And than we can import both files to apply values from both kinds.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;UserRole&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./enum&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;RoleType&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./type&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;role&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;UserRole&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Moderator&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;roleType&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;RoleType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;moderator&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result in JS will be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;enum_1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./enum&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;role&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;enum_1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;UserRole&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Moderator&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;roleType&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;moderator&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You see here that &lt;code&gt;enum&lt;/code&gt; produce a variable with values but &lt;code&gt;type&lt;/code&gt; don't. It means that &lt;code&gt;enum&lt;/code&gt; don't repeat itself. It's an Object with properties.&lt;/p&gt;

&lt;p&gt;Let's create a class - another TypeScript feature.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And you will get the next compiled JS code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="cm"&gt;/** @class */&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;function &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;User&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Looks ugly too, isn't it? More code, more problems? I don't think so!&lt;/p&gt;

&lt;p&gt;I worked with many projects and teams, and you should know that very common problems are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Over-complicated code (ignoring all principles of clean coding)&lt;/li&gt;
&lt;li&gt;Inefficient code (CPU and memory loading)&lt;/li&gt;
&lt;li&gt;Environment issues (caching invalidation, network loading, etc.)&lt;/li&gt;
&lt;li&gt;Legacy dependencies (security issues, difficulties with upgrading)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Non-obviousness of usage
&lt;/h3&gt;

&lt;p&gt;The most common example of incorrect use of &lt;code&gt;enums&lt;/code&gt; is shown in the code below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kr"&gt;enum&lt;/span&gt; &lt;span class="nx"&gt;UserRole&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;Admin&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;Moderator&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And this is a real problem here. Problem for those who don't understand some JS and TS nuances.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// you will get a logically incorrect result&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;ROLES_VALUES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;values&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;UserRole&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// ["Admin", "Moderator", 0, 1]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the reason why &lt;strong&gt;we always must use values for enums&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  A good part of &lt;code&gt;enums&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;Enums&lt;/code&gt; can help you create arrays and objects that we might need in other parts of the project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isRoleValueCorrect&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;UserRole&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;ROLE_VALUES&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or you can create options for select:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;entries&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;UserRole&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;arr&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;arr&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]}));&lt;/span&gt;
&lt;span class="cm"&gt;/*
[{
  "label": "None",
  "value": ""
}, {
  "label": "Moderator",
  "value": "moderator"
}, {
  "label": "Admin",
  "value": "admin"
}] 
 */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusions
&lt;/h2&gt;

&lt;p&gt;TypeScript &lt;code&gt;enums&lt;/code&gt; is not a "bad" feature.&lt;/p&gt;

&lt;p&gt;In some case it's confusing but only if you don't understand how to work with that.&lt;/p&gt;

&lt;p&gt;This is convenient if you want to create related data structures.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>typescript</category>
      <category>enums</category>
    </item>
    <item>
      <title>A minimum of books that should be read by a novice or experienced programmer</title>
      <dc:creator>Tertiumnon</dc:creator>
      <pubDate>Wed, 26 Mar 2025 12:57:17 +0000</pubDate>
      <link>https://dev.to/tertiumnon/a-minimum-of-books-that-should-be-read-by-a-novice-or-experienced-programmer-4hpb</link>
      <guid>https://dev.to/tertiumnon/a-minimum-of-books-that-should-be-read-by-a-novice-or-experienced-programmer-4hpb</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff899miuv13qubiq9dx7p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff899miuv13qubiq9dx7p.png" alt="Intro" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Below a small list of books that I can personally recommend for reading to all programmers, including beginners. As it usually happens that I bought, I sell it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Computer Science fundamentals
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Computer Science Distilled (Wladston Ferreira Filho)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F90rlmd5salhiupxqzsix.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F90rlmd5salhiupxqzsix.png" alt="Computer Science Distilled" width="311" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is an super-"based" book which is well-suited for beginners, particularly for those who have no specialized education.&lt;/p&gt;

&lt;h3&gt;
  
  
  Harvard CS50 video course
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe2wnmbf931jwmilxwi7h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe2wnmbf931jwmilxwi7h.png" alt="Harvard CS50" width="799" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is not a book, but perhaps the best that you can find for training a base. This is a magnificent Harvard course, on the example of which you will understand why people seek to get to study in places such as Harvard. You can watch this course &lt;a href="https://www.youtube.com/channel/UCcabW7890RKJzL968QWEykA" rel="noopener noreferrer"&gt;online&lt;/a&gt; absolutely free.&lt;/p&gt;

&lt;p&gt;Also, you can earn a certificate on &lt;a href="https://www.edx.org/cs50" rel="noopener noreferrer"&gt;edx.org&lt;/a&gt; or &lt;a href="https://pll.harvard.edu/course/cs50-introduction-computer-science" rel="noopener noreferrer"&gt;on the Harvard website&lt;/a&gt;. The course is regularly updated, so if you started, it is better to finish in the same year.&lt;/p&gt;

&lt;h2&gt;
  
  
  Programming
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Object-Oriented Thought Process (Matt Weisfeld)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F224kf7aposeonl7e37vr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F224kf7aposeonl7e37vr.png" alt="Object-Oriented Thought Process" width="370" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would describe this book as the initial one for those who want to use the OOP in their work. I know that this book is not very popular, but it personally helped me in due time to "set up" some concepts in my head.&lt;/p&gt;

&lt;h3&gt;
  
  
  Head First Design Patterns (Eric Freeman, Elisabeth Robson, Bert Bates, Kathy Sierra)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F95n70al28xn0ak021unv.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F95n70al28xn0ak021unv.jpg" alt="Head First Design Patterns" width="415" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are two versions of these books - one of them contains illustrations for better understanding. Understanding the patterns will allow you to structure various approaches in your head and communicate in the same language with other programmers, choosing solutions for certain problems.&lt;/p&gt;

&lt;h3&gt;
  
  
  Clean Code (Robert Martin)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F52387uvs93r8xr96otkb.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F52387uvs93r8xr96otkb.jpg" alt="Clean Code" width="363" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the book you will find a set of rules that will help you write understandable for yourself and, which is much more important in large companies, a code understood for other programmers. The sooner you read this book, the better.&lt;/p&gt;

&lt;h3&gt;
  
  
  Test Driven Development: By Example (Kent Beck)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fijwqwhao7fk8phfekt2e.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fijwqwhao7fk8phfekt2e.jpg" alt="Test Driven Development" width="381" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Sometimes programmers neglect testing (which is bad). The book will inspire you to write tests, or at least give food for thought.&lt;/p&gt;

&lt;h2&gt;
  
  
  Algorithms and data structures
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Grokking Algorithms (Aditya Y. Bhargava)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fydu8893pa9vmg04cvd1w.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fydu8893pa9vmg04cvd1w.jpg" alt="Grokking Algorithms" width="382" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The book gives basic ideas about the algorithms and data structures. The book is loved by many for its simplicity, with which the author explains key principles. If you read, understand and implement everything that is in this book, then you should not have problems with the next book. It is recommended to read the updated (fixed) version of the book.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cracking the Coding Interview (Gayle Laakmann McDowell)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmtyo580qlyo3uhovsnx9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmtyo580qlyo3uhovsnx9.jpg" alt="Cracking the Coding Interview" width="336" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Essentially, this book is intended for those who are going through interviews at major technology companies. A lot of material is dedicated to the main section – algorithmic.&lt;/p&gt;

&lt;h2&gt;
  
  
  System Design
&lt;/h2&gt;

&lt;h3&gt;
  
  
  System Design (Alex Xu)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffph8cbeb90bgq3a9uuuo.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffph8cbeb90bgq3a9uuuo.jpg" alt="System Design" width="320" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A well-structured book that is often recommended for reading before undergoing interviews. Numerous diagrams, describing various 'IT-related' things, by the same author can be found online.&lt;/p&gt;

&lt;h2&gt;
  
  
  High Load
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Designing Data-Intensive Applications (Martin Kleppmann)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbr5kibk4awefyjk3e6fx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbr5kibk4awefyjk3e6fx.jpg" alt="Designing Data-Intensive Applications" width="366" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Famous "book with the boar", one of the fundamental books for a programmer who wants to proudly call themselves a Software Engineer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Management
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Software Engineering at Google (Titus Winters, Tom Manshreck, Hyrum Wright)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Falzl83u6ibkr9umi1tau.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Falzl83u6ibkr9umi1tau.jpg" alt="Software Engineering at Google" width="366" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The book provides general insights into development at tech giants like Google. You can learn how to be a good manager, hire engineers and evaluate their performance, test, scale, and decide on tools to use – a lot of useful content.&lt;/p&gt;

&lt;h3&gt;
  
  
  Agile Estimating and Planning (Mike Cohn)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faiaalj2gtuhlla9d6can.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faiaalj2gtuhlla9d6can.jpg" alt="Agile Estimating and Planning" width="363" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In my opinion, the book is somewhat verbose. However, it contains very detailed descriptions of team interactions working with Agile methodology, which you'll start to understand and use better.&lt;/p&gt;

&lt;h2&gt;
  
  
  Afterword
&lt;/h2&gt;

&lt;p&gt;It would be interesting to see your minimum set of books in the comments. If there are any remarks, I'll try to improve the article or publish an updated version later.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>books</category>
    </item>
    <item>
      <title>You don't need Redux</title>
      <dc:creator>Tertiumnon</dc:creator>
      <pubDate>Wed, 12 Mar 2025 11:11:55 +0000</pubDate>
      <link>https://dev.to/tertiumnon/you-dont-need-redux-462b</link>
      <guid>https://dev.to/tertiumnon/you-dont-need-redux-462b</guid>
      <description>&lt;p&gt;As you're likely aware, Dan Abramov published a post titled "You Might Not Need Redux" back in 2016. Yet, here we are in 2025, and it appears that many projects and job postings haven't adapted. Sadly, not much has changed.&lt;/p&gt;

&lt;p&gt;The Yandex expert in the video below demonstrates that you can thrive without using Redux.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Please, be aware the video contains Russian language and auto-generated English subtitles.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/JHSslO7EJZc"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>react</category>
      <category>redux</category>
    </item>
  </channel>
</rss>
