Moving a Node project to the current LTS: a checklist
Node 18 reached end of life on April 30, 2025 and Node 20 on April 30, 2026, which means neither gets security fixes any more. This checklist covers the runtime move, the two tools that usually move with it (Jest 30 and ESLint 9), and the lockfile and CI changes that make it stick. Dates and breaking changes come from the Node release schedule and the official Jest and ESLint migration guides.
1. Pick the target from the release schedule
| Node | Active LTS from | Maintenance from | End of life |
|---|---|---|---|
| 18 (Hydrogen) | 2022-10-25 | 2023-10-18 | 2025-04-30 (ended) |
| 20 (Iron) | 2023-10-24 | 2024-10-22 | 2026-04-30 (ended) |
| 22 (Jod) | 2024-10-29 | 2025-10-21 | 2027-04-30 |
| 24 (Krypton) | 2025-10-28 | 2026-10-20 | 2028-04-30 |
| 26 (Lithium) | 2026-10-28 | 2027-10-20 | 2029-04-30 |
The Node project says production applications should use only Active LTS or Maintenance LTS releases, which means the even-numbered lines in the table. Odd-numbered releases such as 25 are short-lived and not for production. A later LTS gives you the longest support window; an earlier one may have the widest compatibility with your dependencies. Whichever you choose, check that every native or binary dependency in your tree publishes builds for it before you commit.
Dates are as of 2026-11-18; check the schedule for changes.
2. Find what pins the old version
.nvmrc,.node-version,.tool-versions, theenginesfield ofpackage.json, DockerfileFROM node:lines, and CI configuration.- The
enginesfield is advisory only unlessengine-strictis set: a mismatch produces a warning when your package is installed as a dependency, not an error. Do not rely on it to stop a bad Node version. - If you use GitHub Actions,
actions/setup-nodecan read the version from.nvmrc,.node-version,.tool-versionsorpackage.json(it checksvolta.node, thendevEngines.runtime, thenengines.node) with itsnode-version-fileinput. One source of truth beats three that drift apart.
3. Jest 30
If you are on an older Jest, the Node move often brings Jest 30 with it. Jest 30 supports Node 18 and newer (it drops 14, 16, 19 and 21) and TypeScript 5.4 or newer, and jest-environment-jsdom now uses JSDOM 26. The breaking changes from the official guide most likely to hit a test suite:
- Removed matcher aliases.
toBeCalled,toBeCalledTimes,toBeCalledWith,lastCalledWith,nthCalledWith,toReturn,toReturnTimes,toReturnWith,lastReturnedWith,nthReturnedWithandtoThrowErrorare gone. UsetoHaveBeenCalled,toHaveBeenCalledTimes,toHaveBeenCalledWith,toHaveBeenLastCalledWith,toHaveBeenNthCalledWith,toHaveReturned,toHaveReturnedTimes,toHaveReturnedWith,toHaveLastReturnedWith,toHaveNthReturnedWithandtoThrow. This is a rename, not a change in what the test asserts. jest.genMockFromModuleis removed. Usejest.createMockFromModule.jest.mock()paths are case-sensitive. A path that matched with the wrong case in Jest 29 fails in 30.- Non-enumerable properties are excluded from object matchers by default, which can affect
expect.objectContainingand equality checks. - CLI:
--testPathPatternis now--testPathPatterns;--initis removed (usenpm init jest@latest); flags such as--maxWorkersnow error when the value is missing. - Config:
moduleFileExtensionsnow includes.mtsand.cts, and the defaulttestMatchandtestRegexrecognise.mjs,.cjs,.mtsand.ctstest files. Glob handling moved to glob v10, which is stricter, so customtestMatchormoduleNameMapperpatterns may need adjusting. - Snapshots: an
Error'scauseis now included, the React serializer no longer renders empty-string children, and the deprecated goo.gl URL is removed from snapshot headers. Expect snapshot diffs; review each rather than updating them blindly. - Unhandled rejections: Jest waits an extra event-loop turn before failing a test on one, which can slow tests that reject on purpose.
- Deep imports into Jest internals (for example
jest-runner/build/testWorker) no longer exist.
4. ESLint 9 and the flat config
This section is about the v8 to v9 move; if you are already past 9, check the official migration pages for later majors. The v9 breaking changes that matter most:
- Node requirement: ESLint 9 needs Node 18.18.0 or newer, 20.9.0 or newer, or 21 and up. Node versions below 18.18 and Node 19 are dropped.
- Flat config is the default.
eslint.config.jsis read, and eslintrc files (.eslintrc.*) are no longer searched for. You can setESLINT_USE_FLAT_CONFIGtofalseto keep using eslintrc for a while, or migrate:npx @eslint/migrate-config .eslintrc.jsongives a starting point that usually needs manual edits. - Config changes in flat config:
extends: "eslint:recommended"becomes an import (import js from "@eslint/js", thenjs.configs.recommended); theenvkey is gone, so runtime globals come from theglobalspackage underlanguageOptions.globals; plugins and parsers are imported as objects;.eslintignoreis not read, so move its patterns into anignoresobject;filesmust be an array; and files matching**/*.{js,mjs,cjs}are linted by default. A shareable config that is not yet flat-ready can be wrapped withFlatCompatfrom@eslint/eslintrc. eslint:recommendedchanged. Added:no-constant-binary-expression,no-empty-static-block,no-new-native-nonconstructor,no-unused-private-class-members. Removed:no-extra-semi,no-inner-declarations,no-mixed-spaces-and-tabs,no-new-symbol.no-unused-varsis stricter.caughtErrorsnow defaults to"all", so unusedcatch (e)bindings are reported (set it to"none"for the old behaviour, or drop the binding), andvarsIgnorePatternno longer applies to catch arguments.- Other rule changes:
no-useless-computed-keynow checks class members by default, andno-implicit-coercionreports-(-foo)andfoo - 0by default. - Removed formatters:
checkstyle,compact,jslint-xml,junit,tap,unixandvisualstudionow need a separateeslint-formatter-*package. The rulesrequire-jsdocandvalid-jsdocare removed.
In our own test upgrades, the newer ESLint rules reported new errors (unused variables) on one project after the move, so budget time for a lint pass.
5. Lockfile and install
- Regenerate the lockfile on the new Node as a deliberate, reviewed change, and commit it with the version bumps. A lockfile change that is buried in another commit is hard to review.
- Use
npm ciin CI. It requires an existingpackage-lock.json(ornpm-shrinkwrap.json), fails if the lock andpackage.jsondisagree instead of silently updating it, deletes any existingnode_modulesfirst, and never writes topackage.jsonor the lockfile. That is the behaviour you want from a build. - Re-run the install from a clean checkout after the lockfile change and confirm the tests still pass. A run that passed on a warm cache does not prove the lock is sound.
6. CI matrix
- Test on the new LTS. If your project is a library others install, also keep the older supported lines in the matrix; if it is an application you deploy, test on the version you deploy and, during the move, on the one you are leaving.
- With
actions/setup-node, a matrix looks likenode_version: [22, 24, 26]andnode-version: ${{ matrix.node_version }}.cache: 'npm'caches installs. Settingcheck-latest: truemakes it look for the newest matching version at a speed cost. - Update the Dockerfile base image and any deploy configuration to the same version as CI, so you do not test one Node and run another.
- Update
engines.nodeinpackage.jsonto the range you now support, and update.nvmrcin the same commit.
7. A short order of work
- Green baseline on the current Node: record the test count and the lint result.
- Bump Node in every place from section 2. Run the tests. Fix what Node itself broke before touching other tools.
- Move Jest, then ESLint, one at a time, with a commit for each, so a regression points at one change.
- Regenerate the lockfile, run
npm cifrom a clean checkout, and run the full CI matrix. - Do not delete, skip or weaken tests to get green. If a test needs a rename (such as a removed Jest matcher alias), change the name and nothing else.
In our own test upgrades of open-source Node projects, we moved Node 16, 18 and 20 projects to Node 24 together with Express 4 to 5 and new Jest and ESLint majors.
Start with the $79 baseline check: we run your tests as they are today and report passes, failures and skips, with no code changed. If your project has at least 30 meaningful tests and CI that is green today, the fixed-price Node bundle upgrade is $599: the Node runtime to Node 24 or 26 (both LTS; we target 24 by default, or 26 on request once tested on your project) plus Express 4 to 5, Jest and ESLint majors, for one project, delivered as a pull request or patch. The baseline fee is credited to an upgrade ordered within 30 days. The delivery check is that your own tests pass at least as well as before, with none deleted, skipped or weakened, and every package we held back is listed with the reason. If we cannot deliver a result that meets it, you pay nothing beyond the baseline fee. Green tests cover only what your tests cover, and we tell you where they do not reach.
Sources
- Node.js release schedule (dates in the table; machine-readable copy at schedule.json)
- Node.js: Previous releases (LTS and production guidance, end-of-life status)
- Jest: Upgrading to Jest 30
- ESLint: Migrate to v9.x
- ESLint: Configuration migration guide (flat config)
- npm docs: npm ci
- npm docs: package.json (engines)
- actions/setup-node: advanced usage (node-version-file, matrix, cache)
Written 2026-11-18 against the sources above as published that day.