DEV Community

Cover image for Node 22 Was Already in Maintenance When I Picked It
Mustafa ERBAY
Mustafa ERBAY

Posted on Originally published at mustafaerbay.com.tr

Node 22 Was Already in Maintenance When I Picked It

This morning started with asking my own server what versions it runs. Which Node carries the blog, which nginx — a ten-minute round I do now and then, usually turning up nothing. The answer was what I expected: Node v22.23.5, the newest patch on the 22 line, released on 11 November. Nearly all of the nginx patch debt I noted to myself two weeks ago has closed too: 1.30.0 gone, 1.30.7 in.

Except 1.30.7 isn't the end either; checking during that round, 1.30.8 landed on 23 November. One patch behind again — but that much is a morning's work.

That wasn't the real issue. Nothing in the record looked missing; what was missing is a column the record never carries: the date.

A version number tells you two different things at once. One is "how new are you" — the patch number answers that, and my machine scores full marks. The other is "how much life is left in you". Only a calendar answers that, and the calendar appears nowhere in my repository.

Twenty files name a number, none names a date

Start with what the repo itself claims. Counting the files that say "22" — the ones that decide which release line the runtime will be, or that describe it — gives 20. (The scan excludes the content folder and the lockfile; code blocks inside articles shouldn't count.)

Where What it says
11 workflows (.github/workflows/) node-version: 22
package.json "engines": { "node": ">=22.12.0" }
deploy/runner/Dockerfile FROM node:22-bookworm
deploy/docker-compose.serve.yml image: node:22-bookworm
scripts/setup.sh setup_22.x (NodeSource repository)
deploy/README.md "Node.js 22 installation"
BLUEPRINT.md · AGENTS.md "Node 22" in the architecture notes
README.md "Node 22" in the runtime table
CLAUDE.md "Node 22" in the setup instructions

All twenty name a number. Not one names a date. That isn't negligence, it is the language the tools speak: write node-version: 22 and the setup step fetches the newest patch on the 22 line; the node:22-bookworm tag behaves the same way. The patch flows, the line freezes. For months I took the feeling of "I'm on the latest" from that flowing patch.

Searching the same repository for any line that mentions an end-of-support date returns zero. No 2027-04, no end-of-life, nothing of the sort in the workflows or the deployment files. The single hit is a word inside a measurement note in my content calendar — a memory, not a mechanism.

One note in my own defence: the >=22.12.0 in engines is a floor, not a ceiling. If I install 26 tomorrow, that line won't object. What nails me to today isn't a ceiling; it is the other nineteen files repeating the same number.

What the calendar says

Node publishes its release schedule in both machine-readable and human-readable form: a JSON file in the release working group's repository, and a page on nodejs.org. Three dates matter for my line:

Line Active LTS start Maintenance start End of support
22.x (Jod) 2024-10-29 2025-10-21 2027-04-30
24.x (Krypton) 2025-10-28 2026-10-20 2028-04-30
26.x (Lithium) 2026-10-28 2027-10-20 2029-04-30

The same document defines what the phases mean. In "Active LTS" a line receives new features, bug fixes and updates. In "Maintenance" — which applies to lines up to and including 26 — it receives critical bug fixes and security updates; the document adds that new features may still land at the release team's discretion, typically only when they help migration to a later line. So the v22.23.5 sitting on my machine today is the latest patch of a line that stopped learning anything new more than a year ago.

There is also the sentence everyone repeats, me included: "LTS means thirty months of support." Opening up that piece of received wisdom produced a ratio I did not enjoy. The LTS window of the 22 line really is 913 days, exactly thirty months. But 357 of those days are active and 556 are maintenance. Sixty-one percent of the thirty months is the "nothing new is coming, we'll look if it's critical" phase. Whenever I heard those thirty months, I pictured the first half.

This repo was born on a maintenance line

Up to here the story is tedious but familiar: support windows narrow, upgrade debt accumulates. What stopped me was putting two dates side by side.

The first commit of this repository is dated 2026-03-31. That commit already contains node-version: 22 — searching the git history for that line, the oldest hit is the commit the repo was born in. The 22 line moved into maintenance on 2025-10-21.

There are 161 days between them.

So when I set this platform up, the 22 line had been in maintenance for more than five months. This repository has never once pointed at an actively supported Node line. The repo is 244 days old and carries 3,773 commits — and the line it points at has been on critical-fix rations from day one.

Let me say immediately that this is not a rule violation, because that was my first reaction. Node's own page is explicit: production applications should use only Active LTS or Maintenance LTS releases. Maintenance is a supported phase. What I did was not forbidden.

What was wrong was my assumption. In March 2026 I thought "I installed the current LTS"; in fact the line that was Active LTS that day was 24, and I reached for the shelf one line back. That choice spent half of the thirty months I'd been promised. From today, 151 days remain.

My instinct was walking me one line back again

A confession: sitting with this finding, my reflex was "fine, I'll move to 24." The next even number, the familiar road, the known behaviour.

The calendar showed the reflex taking me to the same kind of place. The 24 line is in maintenance too — since 2026-10-20, so for 41 days. Today's Active LTS line is 26, and it has been on that shelf for 33 days. My instinct was selling me a line demoted six weeks ago as "the new one".

In numbers, the options look like this:

  • Staying on 22: 151 days of support, then nothing (apart from the commercial support programme).
  • Moving to 24: 517 days of support, but maintenance from the first day — a full upgrade round to land on a line that will never bring a new feature.
  • Moving to 26: 882 days of support, 324 of which are the active phase.

Moving to 24 is like paying twice for the same job: the same smoke test, the same dependency wrangling, the same evening — and the same table again seventeen months later. In a one-person shop the most expensive resource is evenings, so there's no room for hesitation here. I'm going to 26.

The rule in my head is retiring as well

Here's the uncomfortable part: where I wasn't reading the date, I was using a rule instead. "Even numbers become LTS, odd numbers die in six months." We have carried that piece of folklore for years and it has served well.

That folklore now has an expiry date of its own. Node's release page says lines up to 26 follow the old schedule, and that starting with Node 27 the cycle becomes annual and every major version moves to LTS after its six-month Current phase. The release group's repository tells the same change from the phase side: from 27 on, every line passes through an Alpha phase, every line is promoted to LTS, and it spends all thirty months as Active LTS — there is no maintenance stop any more. Fittingly, the 27 alphas started appearing on 29 October; the most recent one is dated 25 November.

So three years from now, when somebody tells me "odd numbers don't go to production", that person will be wrong. And I will probably say the same sentence myself, because folklore doesn't cite sources.

There's a symmetry here I rather like. A version number doesn't age — "22" is still 22 today. Two other things age: the support date behind that number, and the rule I use while looking at the number. Neither is written anywhere in my repository.

Why nothing warned me

It's easy to get defensive here: "nobody told me." Nobody did, true. But understanding why turned out to be more useful than looking for someone to blame.

This repository has an alert machine working on dependencies, and it isn't lazy: 37 alerts closed to date, 31 still open. Those 37 were the subject of a separate piece a month ago, where the question was how fast they got closed. Today's question is the inverse: the same machine never said a word about a far larger risk. Why?

The answer is in its triggers. Per the documentation, an alert is born in two cases: when a new vulnerability is added to the GitHub Advisory Database, or when the repository's dependency graph changes. Both are version-shaped events; the alert appears when a package's version intersects the range an advisory affects.

The calendar doesn't work that way. On the morning of 2025-10-21, when the 22 line moved into maintenance, nothing changed in my repository: no package version, no file, no hash. No record landed in the advisory database either, because entering the maintenance phase is not a vulnerability. No graph changed, so no alert was born. The only way to learn that the date had passed was to go and look at the calendar.

How fine that distinction is shows up in one number: over the repo's whole life, the number of commits that touched package.json or package-lock.json is 27. So on the dependency side I make a handful of moves a year, and most of them happen because something reminded me. The number of commits that changed the runtime's major version is zero. Ten commits touched those lines, but every one of them was adding a new workflow and writing the same number once more; nobody ever changed it — because nothing reminds me.

Squeezed into one sentence: version-shaped risk comes to you; date-shaped risk you have to go and fetch. In a one-person shop that's where the difference hurts, because in a place like this the work order is set in practice by the notifications that arrive. Nothing that fails to arrive gets in line.

"The missing piece was a trigger" is a conclusion I have reached before — with seventeen workflows that never run when a PR opens and with a security contact address that leads nowhere. In both cases the trigger was writable: the event existed and I wasn't listening. This one is worse. There is no event to fire. A calendar passing a date produces not one line in any system — so this isn't a notification I missed, it's a class of notification that never existed.

I learned a cousin of this lesson two months ago with a provider's API version: I had framed the right hypothesis two months early but had no discriminating test. The difference is this: there, a provider changed behaviour without my knowing. Here, nobody changed anything. The calendar had been sitting in the open since 2024; I didn't read it.

I thought I had a safety net; I never measured its reach

This piece was going to end with "what delayed the upgrade wasn't risk, because the risk part was paid for months ago." It wasn't. That became clear while writing, and it turned out to be the most useful part of the finding.

My deployment script has a step that brings the new server bundle up on a temporary port before touching production: it checks whether the bundle actually boots and can answer a static address; if it isn't standing within fifteen seconds, the swap is cancelled and production never changes. The comment inside the script explains why the step exists — on 6 July 2026 an Astro upgrade crashed the server at boot and cost roughly 70 minutes of downtime. That's the day the check got written.

Then came the thought "so trying Node 26 is free", and following the chain says otherwise. The smoke test opens the bundle with whatever Node is on the build machine's PATH (node server/entry.mjs). What serves the site is a separate container, and that container's image is node:22-bookworm. On top of that, node_modules isn't installed inside the container; it is built on the build machine and bind-mounted in read-only. Two of my dependencies — better-sqlite3 and sharp — are native modules bound to Node's binary interface.

So if the container tag alone became node:26-bookworm, the smoke test would pass happily under the old Node while production hit the floor on the first require. The check isn't giving false comfort in general; it still solves the problem it was written for — a package upgrade on the same line, which is exactly what the 6 July accident was. But it does not cover a major version change, and its reach had never been measured.

That's a better lesson than the sentence I meant to write: building a safety net is one job, knowing how far it stretches is another. Skip the second and you catch yourself calling a move cheap when it isn't covered at all.

So what should those places say: a number or a calendar?

The concrete consequence of the finding is deciding what to write in those twenty files. The setup step's version field doesn't take only numbers; its documentation counts aliases too: codename-based ones like lts/jod, countdown ones like lts/-n, and lts/*.

At first glance lts/* is exactly what I want: "the newest LTS line of the day", an expression that tracks the calendar on my behalf. I have two reservations, and both are real.

First, tracking the calendar and jumping a major version unawares are the same thing. The day the resolution list sees 26 as the newest LTS, a workflow that says lts/* moves itself from 24 to 26 — which means right around 28 October, when 26 became Active LTS. On a build machine I want that; on the server that serves the blog, without my knowing, I don't. The second reservation is subtler: the documentation says LTS aliases need a manifest to resolve. Writing a number makes me dependent only on a download address; writing an alias adds a resolution step.

Where I landed is a middle road, and I think the right trade-off sits there:

  • In workflows, read the version from a file (node-version-file) and make that file the single source of truth. One file instead of eleven numbers in eleven places.
  • On the server and image side, keep naming the major version explicitly. I don't want surprises in production; what I allow the node:22-bookworm tag to float is the patch, not the line.
  • Put the date into code. A small check that reads which line I'm on from a file, takes that line's dates from the release schedule, and annoys me once the remaining days drop below a threshold. There's a subtlety here: set the threshold at end-of-support and the check would have stayed silent until today, because that date is still ahead. The threshold that matters to me is the end of the active phase — for 22 that day passed 405 days ago. And there's a silence trap: if my line isn't in the schedule at all, or the line has no maintenance key (27 doesn't), the check should shout rather than report "nothing to see".
  • Tie the three ends together. The same check can verify that the version file the workflows read, the container tag and the setup script all name the same major version. It is the easiest piece to write and the clearest win.

And an honest reminder: the server's Node comes from the NodeSource repository, and the setup script says setup_22.x. So the upgrade decision isn't one line inside a repository; the three ends of the chain above — container tag, build image, the server's package repository — have to meet on the same major version.

This is where today's measurement earns its keep: the container sits at v22.23.4, the host at v22.23.5. Because the major version matches, that gap is harmless; the binary interface doesn't move between two patches. The dangerous day isn't the patch gap nobody noticed — it's the day one of the three jumps a major and the others don't.

A short list for asking your own repository

Running this check on yourself takes ten minutes. The order matters, because each step changes the next one's question.

  1. Count the number. How many places in your repository name the runtime's major version? Workflows, image tags, package-repository scripts, installation docs, architecture notes. The count usually comes out higher than you'd guess.
  2. Look for the date. How many places in the same repository mention an end-of-support date? If that number is zero you aren't alone; mine was zero too.
  3. Put two dates side by side. The project's first commit date and the maintenance-start date of the line you pinned. If the first is later than the second, your project has never run on active support.
  4. Check your reflex. What phase is the line you call "the next even number" in today? Asking before the upgrade is how you avoid living through upgrade fatigue twice.
  5. Verify the running version, not the written one. What the repo says and what the machine runs can differ; a gap can even open between the serving container and the host.
  6. Turn the date into a mechanism. Write a check that computes the remaining days and speaks once a threshold is crossed. No plan built on remembering a calendar is remembered six months later.

Closing

Most people doing this work, me included, answer "are you up to date?" by looking at a version number. What today's round taught me is that the question is really two questions: how new are you and how much life is left. Your package manager answers the first one, and so does your alert feed. Nobody answers the second, because nobody holds an event to fire; there is only a day passing quietly.

A number doesn't age. What ages it is a date written in none of my files. Until this morning, my count of such dates was zero.

Two promises here, and since an audit of the promises made to readers in early November found most of them still open, both get a date: the check that counts the remaining days gets written before 2026 ends, and the move to 26 lands before the support window is 90 days out, so before February 2027. An article recommending that you turn dates into code can hardly leave its own recommendation dateless.

Official Sources

Top comments (0)