chore: pin Node 24 via .nvmrc and enforce engines via .npmrc - #74
Conversation
Adds two top-level config files split out of #51: - .nvmrc -> 24, matches the version CI runs in .github/workflows/website.yml and docs.yml. Picked up automatically by nvm/fnm/Volta so local Node tracks CI. - .npmrc -> engine-strict=true, makes pnpm install hard-fail on engines.node mismatch instead of just warning. Turns the >=20.9.0 floor declared in package.json (from #51) into an enforced contract. Closes #52.
Deploying website with
|
| Latest commit: |
ac27878
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cf7eee0b.website-70y.pages.dev |
| Branch Preview URL: | https://chore-pin-node-24-engine-str.website-70y.pages.dev |
There was a problem hiding this comment.
Pull request overview
Pins the repository’s recommended Node.js version to match CI and enforces the existing package.json#engines.node requirement during installs, reducing “works locally but fails later” onboarding issues.
Changes:
- Add
.nvmrcwith24sonvm/fnm/Volta default to the CI-tested Node major. - Add
.npmrcwithengine-strict=truesopnpm installfails fast on unsupported Node versions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.nvmrc |
Pins recommended local Node major to 24, matching CI workflows. |
.npmrc |
Enforces engines.node at install time via engine-strict=true. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request introduces an .npmrc file to enforce strict engine checks and an .nvmrc file pinning the Node.js version to 24. Feedback indicates a discrepancy between the pinned version in .nvmrc and the range defined in package.json; it is recommended to update package.json to match the pinned version to ensure consistency across development environments and prevent runtime failures.
Summary
Follow-up to #51, which added
"engines": { "node": ">=20.9.0" }topackage.json. Two adjacent gaps were deliberately left out of that PR's scope and land here:.nvmrc→24. Matches the Node version CI runs (.github/workflows/website.yml,.github/workflows/docs.yml).nvm/fnm/ Volta pick this up automatically so contributors' local Node tracks the version we actually test against..npmrc→engine-strict=true. Promotes the existingengines.nodefloor from a soft warning to a hard install-time failure. New contributors on stale Node get a clear error frompnpm installinstead of an opaque Next runtime failure later.Blast radius
Anyone on Node < 20.9.0 will now be hard-blocked at
pnpm installinstead of silently warned. That's the point of this change, but worth surfacing explicitly. Recommended remediation for affected contributors:nvm use(or equivalent) — it'll auto-pick Node 24 from the new.nvmrc.Test plan
cat .nvmrc→24cat .npmrc→engine-strict=truepnpm install --frozen-lockfilesucceeds under Node 24 with no engine warningpnpm lintcleanpnpm format:checkcleanwebsiteworkflow green on this PRCloses #52.
🤖 Generated with Claude Code