Skip to content

chore: declare the Node and npm toolchain the build already assumes - #272

Open
escooterclinic wants to merge 1 commit into
reqcore-inc:mainfrom
eMobility-Innovations:chore/declare-toolchain
Open

chore: declare the Node and npm toolchain the build already assumes#272
escooterclinic wants to merge 1 commit into
reqcore-inc:mainfrom
eMobility-Innovations:chore/declare-toolchain

Conversation

@escooterclinic

@escooterclinic escooterclinic commented Aug 12, 2026

Copy link
Copy Markdown

Summary

What: adds engines and .nvmrc declaring the Node and npm the build already assumes.

Why: the repo pins Node 22.22 in four places —

where pin
Dockerfile (builder stage) node:22.22-alpine
Dockerfile (runner stage) node:22.22-alpine
.github/workflows/pr-validation.yml node-version: 22.22
.github/workflows/e2e-tests.yml node-version: 22.22

— but nothing declares it. There is no engines, no packageManager, and no .nvmrc, so
a fresh clone builds against whatever Node is on PATH, and a mismatch only surfaces
later, inside a build.

engines.node here is not a preference. It is the strictest range the dependency tree
already demands: @nuxt/nitro-server@4.5.2 and nuxt@4.5.2 require
^22.19.0 || ^24.11.0 || >=26.0.0; @nuxt/vite-builder@4.5.2 (^22.18.0 || …) and the
cssnano / postcss-* family (^22.11.0 || …) are looser subsets. On Node 25 — a
current release someone could easily be running — npm install emits 33 EBADENGINE
warnings against this tree today, and nothing in the repo says Node 25 is out of scope.

engines.npm is the npm bundled with the pinned Node (10.9.8). That is the npm that has
to be able to consume the committed lockfile, and it is the one part of the toolchain
nothing anywhere records.

.nvmrc is 22.22, matching the Dockerfile and both workflows exactly.

Scope, honestly

This declares intent; it does not enforce it. engines only warns unless
engine-strict=true is set in .npmrc, which this PR deliberately does not do — that is
a behaviour change for every contributor and should be your call, not a side effect of a
declaration. It would also not, on its own, have prevented an out-of-sync lockfile
reaching main.

If you would rather move the toolchain forward than pin it back, the same two files are
the right place — change engines.npm to ^11 and the base image and workflows to a Node
that ships npm 11. The point of the PR is that the version should be written down
somewhere, not that it should be 22.22.

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Chore

Validation

  • I tested locally — npm ci still resolves, and npm install --package-lock-only
    after the change produces only the 4-line engines block in the lockfile root entry
    (included here). No dependency version moves.
  • I added/updated relevant documentation — CONTRIBUTING's setup steps still hold
    verbatim; happy to add a "use Node 22.22 / nvm use" line if you want it.
  • I verified multi-tenant scoping and auth behavior for affected API paths — n/a, no
    runtime code touched.

DCO

  • All commits in this PR are signed off (Signed-off-by) via git commit -s

Summary by CodeRabbit

  • Chores
    • Updated the supported Node.js runtime configuration.
    • Added minimum version requirements for Node.js and npm to improve environment consistency.

The repo pins Node 22.22 in four places — `node:22.22-alpine` in both
Dockerfile stages, and `node-version: 22.22` in pr-validation.yml and
e2e-tests.yml — but nothing declares it to a contributor or to tooling. There
is no `engines`, no `packageManager` and no `.nvmrc`, so a clone gives whatever
Node happens to be on PATH and the mismatch only surfaces later, in a build.

`engines.node` here is not a preference: it is the strictest range the
dependency tree already demands (`@nuxt/nitro-server@4.5.2` requires
`^22.19.0 || ^24.11.0 || >=26.0.0`; @nuxt/vite-builder and the cssnano/postcss
family are looser subsets of it). `engines.npm` matches the npm bundled with
the pinned Node, 10.9.8, which is the npm that has to be able to consume the
committed lockfile. `.nvmrc` matches the Dockerfile and CI exactly.

The lockfile change is npm recording the same `engines` block in the root
entry; no dependency versions move.

This declares intent — it does not enforce it. `engines` only warns unless
`engine-strict=true` is set in .npmrc, which this commit deliberately does not
do.

Signed-off-by: Patryk Radek <patryk@escooterclinic.co.uk>
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f7dd644c-7a1b-4963-95b4-35b63454c688

📥 Commits

Reviewing files that changed from the base of the PR and between 63a2968 and b3930f2.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • .nvmrc
  • package.json

📝 Walkthrough

Walkthrough

The project now specifies Node.js 22.22 and declares supported Node.js and npm engine ranges.

Changes

Runtime alignment

Layer / File(s) Summary
Runtime version constraints
.nvmrc, package.json
.nvmrc specifies Node.js 22.22. package.json declares supported Node.js and npm versions.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: joachimlk

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title uses Conventional Commits format and clearly describes documenting the Node.js and npm toolchain.
Description check ✅ Passed The description covers the required summary, change type, validation, and DCO sections with specific implementation and testing details.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant