Skip to content

chore: pin Node 24 via .nvmrc and enforce engines via .npmrc - #74

Merged
thiras merged 1 commit into
mainfrom
chore/pin-node-24-engine-strict
May 11, 2026
Merged

thiras merged 1 commit into
mainfrom
chore/pin-node-24-engine-strict

Conversation

@thiras

@thiras thiras commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #51, which added "engines": { "node": ">=20.9.0" } to package.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 existing engines.node floor from a soft warning to a hard install-time failure. New contributors on stale Node get a clear error from pnpm install instead of an opaque Next runtime failure later.

Blast radius

Anyone on Node < 20.9.0 will now be hard-blocked at pnpm install instead 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 → 24
  • cat .npmrc → engine-strict=true
  • pnpm install --frozen-lockfile succeeds under Node 24 with no engine warning
  • pnpm lint clean
  • pnpm format:check clean
  • CI website workflow green on this PR

Closes #52.

🤖 Generated with Claude Code

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.
Copilot AI review requested due to automatic review settings May 11, 2026 15:07
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying website with  Cloudflare Pages  Cloudflare Pages

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

View logs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .nvmrc with 24 so nvm/fnm/Volta default to the CI-tested Node major.
  • Add .npmrc with engine-strict=true so pnpm install fails 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.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .npmrc
@thiras
thiras merged commit 197499c into main May 11, 2026
11 checks passed
@thiras
thiras deleted the chore/pin-node-24-engine-strict branch May 11, 2026 15:11
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.

Pin recommended Node via .nvmrc and enforce engines via .npmrc (engine-strict)

2 participants