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

Open
opened 2026-02-15 20:16:55 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraphjs/pull/1889
Author: @christian-bromann
Created: 1/12/2026
Status: 🔄 Open

Base: mainHead: cb/better-node-version-definition


📝 Commits (2)

  • 7bb0194 feat(cli): use dynamic validation for Node.js version instead of hardcoded values
  • f6abdac Create friendly-cycles-wash.md

📊 Changes

3 files changed (+131 additions, -8 deletions)

View changed files

.changeset/friendly-cycles-wash.md (+5 -0)
📝 libs/langgraph-cli/src/utils/config.mts (+11 -2)
📝 libs/langgraph-cli/tests/config.test.mts (+115 -6)

📄 Description

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.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/langgraphjs/pull/1889 **Author:** [@christian-bromann](https://github.com/christian-bromann) **Created:** 1/12/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `cb/better-node-version-definition` --- ### 📝 Commits (2) - [`7bb0194`](https://github.com/langchain-ai/langgraphjs/commit/7bb0194ed91823ba2dcecf3f4906528ef5fb93bb) feat(cli): use dynamic validation for Node.js version instead of hardcoded values - [`f6abdac`](https://github.com/langchain-ai/langgraphjs/commit/f6abdac4c27b3b87aac07f22ea11150cf64964e6) Create friendly-cycles-wash.md ### 📊 Changes **3 files changed** (+131 additions, -8 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/friendly-cycles-wash.md` (+5 -0) 📝 `libs/langgraph-cli/src/utils/config.mts` (+11 -2) 📝 `libs/langgraph-cli/tests/config.test.mts` (+115 -6) </details> ### 📄 Description ## 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 20:16:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#1813