Files
civitai__civitai/.devcontainer
Justin Maier 2893ecf19a chore: align Node version across engines, nvmrc, Dockerfile and types (#3365)
* chore: align Node version across engines, nvmrc, Dockerfile and types

.nvmrc was left at 24.18.0 when #3311 rolled the runtime base image back
from node:24-alpine3.22 to node:22-alpine3.20 over the V8 13.6 server-CPU
regression. The Dockerfile is the shipping truth, so everything else moves
to 22:

- .nvmrc: 24.18.0 -> 22 (bare major mirrors the Dockerfile's floating
  node:22 tag; an exact patch here would re-drift on every 22.x release)
- package.json: add engines.node ">=22.0.0" (Node 20 is EOL as of
  2026-04-30; floor, not a ceiling)
- @types/node: 20.19.9 -> 22.20.1, matching the runtime

Typecheck is clean; the @types/node bump surfaced no errors.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* chore: pin .nvmrc to the image's exact Node, bump nix + devcontainer off 20

node:22-alpine3.20 is frozen at Node 22.16.0 (last pushed 2025-05-21; Alpine
3.20 went EOL 2026-04-01 and the tag is no longer rebuilt). A bare "22" in
.nvmrc resolves to 22.23.1 via actions/setup-node, so #3362's CI would have
typechecked seven minors ahead of prod. 22.16.0 is the value #3242 replaced
and the only one that matches the shipping image.

Two more Node 20 environments moved off the EOL line (neither is a
production surface):
- flake.nix: nodejs_20 -> nodejs_22 (devShell; would have warned on every
  pnpm install against the new engines floor)
- .devcontainer/public: typescript-node:1-20 -> 1-22 (outside-contributor
  onboarding path)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-24 16:53:43 -06:00
..