Skip to content

fix: use the Node.js LTS in the pre-commit workflow - #125

Merged
shenxianpeng merged 1 commit into
mainfrom
claude/project-thread-a3krfd
Oct 29, 2026
Merged

shenxianpeng merged 1 commit into
mainfrom
claude/project-thread-a3krfd

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

actions/setup-node with node-version: latest now installs v27.0.0-alpha.0.0.0, and cspell-cli refuses to run on it:

Attempting to download v27.0.0-alpha.0.0.0...
...
Unsupported NodeJS version (27.0.0-alpha.0.0.0); >=22.18.0 is required

So both jobs of this shared workflow (the cspell pre-commit hook and the PR title spell check) fail in every repo that calls it, for example cpp-linter/cpp-linter-rs#530, #531 and #532.

Changes

  • node-version: latest → node-version: lts/* in both jobs of pre-commit.yml.

Summary by CodeRabbit

  • Chores
    • Updated the Node.js version used by automated pre-commit checks and pull request title spell-checking to the latest LTS release, replacing the latest available release. This keeps both checks aligned with the LTS release channel. No changes to application features or user-facing behavior are included.

`node-version: latest` now resolves to v27.0.0-alpha.0.0.0, which
cspell-cli refuses to run on (it needs >=22.18.0). So the cspell hook
and the PR title spell check fail in every repo that uses this workflow.
@shenxianpeng shenxianpeng self-assigned this Oct 29, 2026
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Walkthrough

The pre-commit and PR-title spell-check jobs now select the latest LTS release for Node.js instead of the latest release.

Changes

Node.js LTS Selection

Layer / File(s) Summary
Update Node.js selection in both jobs
.github/workflows/pre-commit.yml
The pre-commit and PR-title spell-check jobs now select the latest LTS release for Node.js.

Priority: Normal

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

Merge Risk: Minimal · up to d4ed8

The Node.js compatibility issue is addressed in both spell-check workflows, with no remaining merge-blocking risk.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the pre-commit workflow now uses the Node.js LTS line instead of latest. The raw summary confirms that both Node.js setup steps (the pre-commit job and the PR-title sp…
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.
Full details: Title check

Explanation

The title names the main change: the pre-commit workflow now uses the Node.js LTS line instead of latest. The raw summary confirms that both Node.js setup steps (the pre-commit job and the PR-title spell-check job) switch from latest to lts/*. The title covers the primary change and omits the second job, which is acceptable. It uses the conventional fix: prefix and is specific enough for a teammate scanning history.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@shenxianpeng
shenxianpeng requested a review from 2bndy5 October 29, 2026 22:13

@2bndy5 2bndy5 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I didn't know about the lts/* syntax.

@shenxianpeng

Copy link
Copy Markdown
Member Author

me too 😀

@shenxianpeng
shenxianpeng merged commit 257c8ff into main Oct 29, 2026
12 checks passed
@shenxianpeng
shenxianpeng deleted the claude/project-thread-a3krfd branch October 29, 2026 22:21
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.

2 participants