Skip to content

fix: use Node.js 22 in Nix flake#1177

Open
leno23 wants to merge 2 commits into
Fission-AI:mainfrom
leno23:codex/fix-nix-nodejs-22
Open

fix: use Node.js 22 in Nix flake#1177
leno23 wants to merge 2 commits into
Fission-AI:mainfrom
leno23:codex/fix-nix-nodejs-22

Conversation

@leno23

@leno23 leno23 commented Jun 5, 2026

Copy link
Copy Markdown

Summary

  • update the Nix package build inputs from nodejs_20 to nodejs_22
  • update the dev shell Node runtime to nodejs_22 as well

Why

Node.js 20 is now marked insecure in nixpkgs after reaching EOL, which causes Nix evaluation/builds to fail for OpenSpec users.

Fixes #1119.

Validation

  • Confirmed flake.nix no longer references nodejs_20
  • Not run: nix build, because Nix is not installed in this local environment

Summary by CodeRabbit

  • Chores
    • Updated Node.js runtime to version 22 for build and development environments.
    • Updated CI workflows to use Node.js 22 for testing, linting, type-checking, and release validation.

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2326c87e-34d9-48a0-9770-86c5a4c62f73

📥 Commits

Reviewing files that changed from the base of the PR and between d44fc58 and 8494c88.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/ci.yml

📝 Walkthrough

Walkthrough

Replaces Node.js 20 with Node.js 22 in the Nix flake (build and dev shell inputs) and in GitHub Actions workflow job configurations.

Changes

Node.js Version Update

Layer / File(s) Summary
Bump Node.js in flake (build + dev shell)
flake.nix
nativeBuildInputs for packages.default and devShells.default.buildInputs switch from nodejs_20 to nodejs_22.
Bump Node.js in CI workflow jobs
.github/workflows/ci.yml
All actions/setup-node entries in test, lint, and validate-changesets jobs now use node-version: '22' instead of '20'.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • TabishB

Poem

🐰 I hopped from twenty, light and spry,
To twenty-two beneath the sky,
Builds hum along, CI sings too,
A cozy bump — a rabbit's view. 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: updating Node.js from version 20 to 22 in the Nix flake configuration.
Linked Issues check ✅ Passed The PR successfully addresses issue #1119 by replacing nodejs_20 with nodejs_22 in flake.nix, eliminating the insecure package error and restoring Nix build functionality.
Out of Scope Changes check ✅ Passed The PR includes changes to both flake.nix and GitHub Actions workflow (.github/workflows/ci.yml), with the workflow updates being necessary and related to maintaining CI consistency with the Node.js version upgrade.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@leno23 leno23 marked this pull request as ready for review June 5, 2026 10:04
@leno23 leno23 requested a review from TabishB as a code owner June 5, 2026 10:04

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
flake.nix (1)

58-58: ⚡ Quick win

Update specification document to reflect Node.js 22.

The Nix flake support specification at openspec/changes/archive/2026-01-07-add-nix-flake-support/specs/nix-flake-support/spec.md (lines 47-73) explicitly states "The system SHALL use Node.js 20 as specified in package.json engines field" and references nodejs_20 in scenarios. This documentation is now outdated and inconsistent with the actual implementation.

Update the spec document to reflect the Node.js 22 requirement.

Also applies to: 100-100

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@flake.nix` at line 58, The spec currently asserts "The system SHALL use
Node.js 20" and references nodejs_20; update the specification text and all
scenario references to reflect Node.js 22 by replacing "Node.js 20" and
nodejs_20 with "Node.js 22" and nodejs_22, and also update any mention of the
package.json engines field to match Node.js 22 so the document aligns with the
flake change (nodejs_22).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@flake.nix`:
- Line 58: The CI workflow uses Node.js 20 while the flake uses nodejs_22;
update the GitHub Actions workflow (.github/workflows/ci.yml) to match by
changing the setup-node/node-version or matrix value from 20 to 22 so CI and the
Nix flake (nodejs_22) use the same Node.js version consistently.

---

Nitpick comments:
In `@flake.nix`:
- Line 58: The spec currently asserts "The system SHALL use Node.js 20" and
references nodejs_20; update the specification text and all scenario references
to reflect Node.js 22 by replacing "Node.js 20" and nodejs_20 with "Node.js 22"
and nodejs_22, and also update any mention of the package.json engines field to
match Node.js 22 so the document aligns with the flake change (nodejs_22).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 816f47f5-af50-4751-8390-2c02c2683a8b

📥 Commits

Reviewing files that changed from the base of the PR and between 1b06fdd and d44fc58.

📒 Files selected for processing (1)
  • flake.nix

Comment thread flake.nix
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.

[build] Nix build fails because NodeJS 20 was marked as insecure in nixpkgs

1 participant