Skip to content

fix: relax docs site Node.js engine constraint to >=24#5269

Merged
thomhurst merged 1 commit intomainfrom
fix/docs-node-engine-constraint
Mar 27, 2026
Merged

fix: relax docs site Node.js engine constraint to >=24#5269
thomhurst merged 1 commit intomainfrom
fix/docs-node-engine-constraint

Conversation

@thomhurst
Copy link
Copy Markdown
Owner

Summary

  • Renovate PR chore(deps): update node.js to v24 #5264 bumped engines.node in docs/package.json to >=24.14.1, but GitHub Actions runners with setup-node@v6 and node-version: 24 only have 24.14.0 available
  • This caused the "Test Deploy to GitHub Pages" CI job to fail with an incompatible engine error
  • Relaxed the constraint to >=24 since a strict patch-level pin is unnecessary for the docs site build

Test plan

  • Verify "Test Deploy to GitHub Pages" CI job passes

Renovate PR #5264 bumped the engines.node constraint to >=24.14.1, but
GitHub Actions runners only have 24.14.0 available via setup-node,
causing the docs deploy CI job to fail.
Copy link
Copy Markdown
Contributor

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Code Review: Relax docs site Node.js engine constraint to >=24

Summary

This is a single-line fix in docs/package.json that changes the Node.js engine requirement from >=24.14.1 (set by Renovate in #5264) back to >=24. The root cause is that the GitHub Actions runner installs Node 24 via setup-node@v6 with node-version: 24, which resolves to 24.14.0 — one patch version below what Renovate pinned.


Verdict: Approve ✓

The fix is correct and appropriate. The patch-level pin >=24.14.1 was overly strict for a documentation build tool. The engines field in package.json is a compatibility signal, not a security boundary — requiring any Node.js 24.x release is sensible; requiring a specific patch version creates unnecessary fragility.


Potential Follow-up Concerns

1. Renovate will try to pin this again

Unless Renovate is configured to ignore the engines.node field in docs/package.json, it will re-introduce a strict patch pin the next time a new Node.js 24.x patch is released, causing the same CI breakage. Consider adding a Renovate rule to prevent over-pinning of the engines field:

{
  "packageRules": [
    {
      "matchFiles": ["docs/package.json"],
      "matchDepTypes": ["engines"],
      "enabled": false
    }
  ]
}

This is the more important follow-up — without it, this fix will need to be repeated after every Node.js patch release.

2. CI and package.json engines are now decoupled (minor drift risk)

Both workflow files pin node-version: 24 without specifying a patch. The engines field now says >=24. These will naturally drift over time. A longer-term improvement would be using a .node-version or .nvmrc file as a single source of truth and referencing it from both the workflows and package.json, but this is not required for this fix.

3. setup-node@v6 usage

Both workflows use actions/setup-node@v6. Worth confirming this is intentional — the currently widely-used major version is @v4. Unrelated to this PR but noticed during review.


Overall this is a clean, minimal, and correct fix. The Renovate config update is the only actionable follow-up to prevent recurrence.

thomhurst added a commit to thomhurst/RenovateConfig that referenced this pull request Mar 27, 2026
Prevents Renovate from bumping engine constraints (e.g. engines.node)
to strict patch versions, which broke CI when GitHub Actions runners
didn't have the exact version available. See thomhurst/TUnit#5269.
@thomhurst thomhurst merged commit c82d59f into main Mar 27, 2026
14 of 15 checks passed
@thomhurst thomhurst deleted the fix/docs-node-engine-constraint branch March 27, 2026 19:08
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