Skip to content

feat(cli): use dynamic validation for Node.js version instead of hardcoded values#1889

Draft
christian-bromann wants to merge 2 commits intomainfrom
cb/better-node-version-definition
Draft

feat(cli): use dynamic validation for Node.js version instead of hardcoded values#1889
christian-bromann wants to merge 2 commits intomainfrom
cb/better-node-version-definition

Conversation

@christian-bromann
Copy link
Member

Summary

  • Replace hardcoded Node.js version literals ("20", "22", "24") in NodeVersionSchema with a dynamic validation that accepts any version string where the major version is >= 20
  • Update default Node.js version from "20" to "24"
  • Add comprehensive unit tests for node version validation covering valid versions, versions below minimum, and invalid strings

Motivation

Previously, adding support for new Node.js versions required updating the hardcoded list in NodeVersionSchema. This change makes the validation future-proof by validating that the major version is at least 20 (the minimum supported version), allowing any current or future Node.js version to work automatically.

The schema now:

  • Accepts major versions: "20", "22", "24", "26", etc.
  • Accepts semver strings: "20.10.0", "22.1.5", etc.
  • Rejects versions below 20: "18", "19.9.0", etc.
  • Rejects invalid strings: "invalid", "abc.def.ghi", etc.

…coded values

Replace hardcoded Node.js version literals ("20", "22", "24") with a flexible
validation schema that accepts any version string with major version >= 20.
This allows future Node.js versions to work automatically without code changes.

- Add MIN_NODE_VERSION constant (20) for validation
- Update default Node version to 24
- Add comprehensive unit tests for version validation
@changeset-bot
Copy link

changeset-bot bot commented Jan 12, 2026

🦋 Changeset detected

Latest commit: f6abdac

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@langchain/langgraph-cli Patch
@langchain/langgraph-api Patch
@langchain/langgraph-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@christian-bromann christian-bromann marked this pull request as draft February 3, 2026 00:42
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