fix(dashboard): harden Node engine alignment checks
This commit is contained in:
@@ -0,0 +1 @@
|
||||
momomojo
|
||||
+4
-4
@@ -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 {
|
||||
|
||||
+5
-5
@@ -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%%.*}"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user