Node.js 26 LTS: what to check before upgrading from 22 or 24
Node.js 26 became Active LTS on 28 October 2026 and is supported until April 2029. Node 24 is already in maintenance, Node 22 has until April 2027. Here is what changes for application code, what can break, and a test plan that fits into one sprint.
Мнение авторов может не совпадать с позицией редакции
Этой статьи нет на выбранном языке. Показана версия: English
☰ Содержание · 8
Where each line stands
| Line | Status | Until |
|---|---|---|
| 20.x | end of life | — |
| 22.x | Maintenance | 30.04.2027 |
| 24.x | Maintenance since 20.10.2026 | per the Release schedule |
| 26.x | Active LTS since 28.10.2026 (v26.13.0) | 30.04.2029 |
The schedule also changes from the next major: starting with Node 27 there is one major a year, and each of them becomes LTS. The odd/even rule many teams have in their upgrade docs no longer applies after 26.
If you are on 20, you are already running an unsupported runtime; that is the first thing to fix, independent of everything below.
What is new and worth using
Temporal is on by default. The date and time API that replaces most uses of Date and of libraries such as moment:
const now = Temporal.Now.zonedDateTimeISO("Asia/Tbilisi");
const due = now.add({ days: 30 }).toPlainDate();
console.log(due.toString()); // e.g. 2026-12-04
const a = Temporal.PlainDate.from("2026-10-28");
const b = Temporal.PlainDate.from("2029-04-30");
console.log(a.until(b, { largestUnit: "months" }).months);
If your code loads a Temporal polyfill, check that it does not overwrite the built-in globalThis.Temporal, or remove it.
V8 14.6 brings Map.prototype.getOrInsert and Iterator.concat:
const byUser = new Map();
for (const e of events) byUser.getOrInsert(e.userId, []).push(e);
for (const x of Iterator.concat(firstPage, secondPage)) handle(x);
Undici 8 is the engine behind fetch. If you configure agents, dispatchers or interceptors directly, read the Undici 8 changes; plain fetch() calls are usually unaffected.
What can break
--experimental-transform-types is gone
Type stripping stays (default since 22.18, stable since 24.12), but the flag that also transformed TypeScript-only syntax was removed. Node only erases types. That means no enum, no namespace with values, no parameter properties, no decorators, no .tsx, and tsconfig.json is not read at all.
The TypeScript compiler can tell you in advance what would fail:
{
"compilerOptions": {
"erasableSyntaxOnly": true,
"verbatimModuleSyntax": true,
"noEmit": true
}
}
Run tsc with this, fix the errors (an enum usually becomes an as const object), and the same files will run under node file.ts.
module.register() is deprecated
Custom loaders registered with module.register() still work but print a deprecation warning. The direction is the synchronous module.registerHooks(). If you use a tool that registers hooks for you (test runners, TS loaders, APM agents), check its release notes for Node 26 support before upgrading.
node --trace-deprecation app.js 2>&1 | grep -i deprecat
Permission Model: update, then rely on it
The Permission Model (--permission with --allow-fs-read, --allow-fs-write and others) is useful as a seat belt. The July 2026 security release fixed CVE-2026-58043, a bypass of --allow-fs-*. If you depend on these flags, run a patched release, and remember the Node docs themselves say the model does not protect against malicious code.
node --permission --allow-fs-read=/srv/app --allow-fs-write=/srv/app/tmp server.js
Test plan
- Pin the version in
.nvmrc/enginesand in the CI matrix: run 24 and 26 side by side for a while. - Run the full test suite with
--trace-deprecationand collect every warning. - Run
tscwitherasableSyntaxOnlyif you execute.tsdirectly. - Rebuild native addons (
npm rebuild) and check prebuilt binaries exist for 26. - Check your loaders, APM agent and test runner for Node 26 support.
- If you use
fetchwith custom dispatchers, add an integration test against a real endpoint. - Deploy to one instance first, compare memory and latency, then roll out.
One date to keep in mind: Node.js announced security releases for 11 November 2026. If you upgrade this week, plan to take that patch right after.
Sources
- Node.js Release — status and end dates of each line
- Node.js v26.13.0 — 26.x becomes Active LTS, 28.10.2026
- Node.js v26.0.0, 05.05.2026 — Temporal, V8 14.6, Undici 8, removed
--experimental-transform-types,module.register()deprecated - Node.js, 10.03.2026 — one major a year from 27
- Node.js docs: TypeScript — type stripping and its limits
- Node.js, July 2026 security releases — CVE-2026-58043, Permission Model bypass
- Node.js, 03.11.2026 — security releases on 11.11.2026
Комментарии 7
We run our API with ts-node and we have enums all over the place 🙂 Is it realistic to move to plain
node file.ts, or should we just keep compiling with tsc?>>3
Both are fine. Compiling with
tscto JavaScript keeps working on 26 and does not depend on type stripping at all. If you wantnode file.ts, turn onerasableSyntaxOnlyfirst and see how many errors you get. Enums usually convert toas constobjects mechanically, but do it as a separate change, not together with the runtime upgrade.Ещё 5 на других языках
По Permission Model. Имеет смысл включать его в проде для обычного HTTP-сервиса, или это скорее для CLI-утилит и скриптов? Интересует накладной расход на проверки при чтении файлов.
>>1
Для сервиса имеет смысл как дополнительный слой: если в зависимости окажется код, который полезет читать
~/.sshили писать вне каталога приложения, он упрётся в запрет. Но основная изоляция остаётся на уровне контейнера и пользователя ОС. Цифр по накладным расходам в официальных источниках нет, поэтому лучше замерить на своём профиле нагрузки: тот же нагрузочный тест с--permissionи без. И обязательно на версии с исправлением CVE-2026-58043.а с 22 прыгать сразу на 26 норм или лучше через 24 чтобы ловить поломки по одной
>>5
Промежуточная остановка на 24 сама по себе ничего не ловит, ломается то же самое, просто в два захода. Практичнее сразу 26, но с матрицей в CI: 22 (текущий прод) и 26 параллельно, и список предупреждений из
--trace-deprecationна 22 разобрать до переключения. В проде я бы не стал совмещать переход с обновлением крупных зависимостей.>>5 >>6
Согласен. Добавлю только про сроки: 11.11 выходят релизы безопасности, так что первую выкатку на 26 удобно делать уже на этом патче, а не за пару дней до него.
Войдите, чтобы комментировать