Repository navigation
Warn when the CLI runs on an unsupported Node.js version - #89
Merged
Merged
Conversation
engines.node is >=22.12, but the CLI still runs on Node.js 20 (checked: --version and demo exit 0 on 20.19.0), and npm's EBADENGINE warning is easy to miss under npx. When the CLI is run directly on an older release, print one stderr line with the supported floor and the nodejs.org download link, then carry on. Library imports and stdout (including --json) are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GDyUamKnmW15VzoFLkwnX5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before: running the CLI on Node.js older than 22.12 (for example 20.19) worked with no hint that the version is no longer supported.
After: on Node.js older than 22.12 the CLI prints one warning to stderr and then runs as usual:
It is a warning, not a hard stop, because the CLI still works on Node 20.
How:
src/system/node-support.tsholds the 22.12 minimum and builds the message;src/index.tswrites it only when the CLI is invoked directly, so library imports and tests stay quiet. Unit tests cover versions below, at and above the floor. CHANGELOG entry added under Changed.Replaces #88.
🤖 Generated with Claude Code
https://claude.ai/code/session_01GDyUamKnmW15VzoFLkwnX5
Generated by Claude Code