chore: pin Node toolchain to 22 across machines and CI#48
Merged
Conversation
Docker only containerizes Postgres, so the Node version still drifted between machines (local 22, CI 20, README 20+), which is a source of the recurring environment problems. - Add .nvmrc (22) and engines.node so every checkout targets one Node. - Add .npmrc engine-strict so npm install fails fast on a wrong Node instead of producing a subtly different install. - Bump CI to Node 22 and update the README prerequisite.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
.nvmrc(22) andengines.nodeso every checkout targets one Node version..npmrcwithengine-strictsonpm installfails fast on the wrong Node instead of producing a subtly different install.Why
Docker here only containerizes Postgres, so it pins the database engine but not the Node toolchain. The Node version still drifted between machines (local 22, CI 20, README "20 or later"), a source of the recurring cross-machine environment problems. This pins the JS side to match.
Verification
npm ci --dry-runreports no engine error on Node 22,npm test(6 passing) andnpm run lint -- --max-warnings 0green locally.