The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(dashboard): harden Node engine alignment checks
fangliquanflqbb06a8d41441
diff --git a/contributors/emails/[email protected] b/contributors/emails/[email protected]new file mode 100644index 00000000000..850e0a4eb07--- /dev/null+++ b/contributors/emails/[email protected]@@ -0,0 +1 @@+momomojodiff --git a/scripts/install.ps1 b/scripts/install.ps1index 93a5933d834..f790c4ff39a 100644--- a/scripts/install.ps1+++ b/scripts/install.ps1@@ -1643,10 +1643,10 @@ function Set-GitBashEnvVar {Write-Info "If needed, set HERMES_GIT_BASH_PATH manually to your bash.exe path."}-# The dependency tree supports Node 22.22+, 24, and 26+. nanoid 6 deliberately-# excludes odd-numbered Node releases, so accepting Node 23/25 here only defers-# the failure to `npm ci` under engine-strict. Keep this in sync with the root-# package.json.+# The dependency tree supports Node 22.22+, 24, and 26+. nanoid 6 excludes+# Node 23 and 25 while its >=26 arm accepts later releases, so accepting 23/25+# only defers the failure to `npm ci` under engine-strict. Keep this in sync+# with the root package.json.function Test-NodeVersionOk {param([string]$Version)try {diff --git a/scripts/install.sh b/scripts/install.shindex 2fb5d680161..67e326842ed 100755--- a/scripts/install.sh+++ b/scripts/install.sh@@ -882,11 +882,11 @@ check_cxx_compiler() {return 1}-# The dependency tree supports Node 22.22+, 24, and 26+. nanoid 6 deliberately-# excludes odd-numbered Node releases, so accepting Node 23/25 here only defers-# the failure to `npm ci` under engine-strict. Keep this in sync with the root-# package.json. Anything outside the supported lines is replaced with the-# Hermes-managed Node $NODE_VERSION.+# The dependency tree supports Node 22.22+, 24, and 26+. nanoid 6 excludes+# Node 23 and 25 while its >=26 arm accepts later releases, so accepting 23/25+# here only defers the failure to `npm ci` under engine-strict. Keep this in+# sync with the root package.json. Anything outside the supported lines is+# replaced with the Hermes-managed Node $NODE_VERSION.node_satisfies_build() {local ver="${1#v}"local major="${ver%%.*}"diff --git a/tests-js/node-engine-alignment.test.ts b/tests-js/node-engine-alignment.test.tsindex ec91ac3c2b5..b944f0903f7 100644--- a/tests-js/node-engine-alignment.test.ts+++ b/tests-js/node-engine-alignment.test.ts@@ -36,6 +36,11 @@ function compare(left: string, right: string): number {}function satisfiesClause(version: string, clause: string): boolean {+ assert.match(+ clause,+ /^(?:\^|>=|<=|>|<|=)?\d+(?:\.\d+){0,2}$/,+ `unsupported semver clause: ${clause}`+ )if (clause.startsWith('^')) {const bound = clause.slice(1)return parseVersion(version)[0] === parseVersion(bound)[0] && compare(version, bound) >= 0