Node.js Version Upgrade

June 11, 2026 ยท View on GitHub

This project pins one Node.js major version at a time. Minor and patch releases within that major line may update automatically; major upgrades are manual.

Policy

  • Use an Active LTS or Maintenance LTS Node.js line.
  • Keep local development, CI, Docker, and @types/node on the same Node.js major.
  • Let dependency automation update @types/node minor and patch versions only; keep major updates manual.

Inputs

Before editing, identify these values:

  • <node-major>: target LTS Node.js major.
  • <next-node-major>: the next integer major after <node-major>.

If the target major is not specified, confirm it before changing files.

Files

Update these files together when changing the Node.js major version:

These files should usually keep their existing behavior:

Upgrade Checklist

  1. Confirm the target Node.js major is LTS, not Current.

  2. Update the version files:

    • .nvmrc: Set to <node-major>.
    • package.json
      • engines.node: Set to >=<node-major>.0.0 <next-node-major>.0.0.
      • devDependencies.@types/node: Update with pnpm add --save-dev --save-exact @types/node@<node-major>.
    • Dockerfile: Set build stage FROM to node:<node-major>-slim.
  3. Reinstall dependencies with the target Node.js major:

    fnm install
    fnm use
    pnpm install
    
  4. Run verification:

    pnpm run lint
    pnpm run test
    pnpm run build