Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ else
INSTALL_DIR_EXPLICIT=false
fi
PYTHON_VERSION="3.11"
NODE_VERSION="22"
NODE_VERSION="26"

# FHS-style root install layout (set by resolve_install_layout when applicable):
# code at /usr/local/lib/hermes-agent, command at /usr/local/bin/hermes,
Expand Down
25 changes: 25 additions & 0 deletions tests/test_engines_satisfiable.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,31 @@ def test_node_floor_is_met_by_the_managed_runtime(self):
"declare, or the install we just performed cannot install deps."
)

def test_managed_node_bundles_an_npm_the_engines_accept(self):
"""The Node major install.sh fetches must ship an npm that clears
engines.npm. Node 22 bundles 11.16.0, which is in the excluded
11.10–11.16 band — fresh Hermes-managed installs then die at
`npm ci` with EBADENGINE (#80769).
"""
npm_range = _root_manifest()["engines"]["npm"]
install_sh = (REPO_ROOT / "scripts" / "install.sh").read_text()
for line in install_sh.splitlines():
if line.startswith("NODE_VERSION="):
managed_major = int(line.split("=", 1)[1].strip().strip('"').strip("'"))
break
else: # pragma: no cover
pytest.fail("install.sh does not define NODE_VERSION")
stock_npm = _STOCK_NPM_BY_NODE_MAJOR.get(managed_major)
assert stock_npm is not None, (
f"install.sh NODE_VERSION={managed_major} is not in the known "
f"stock map {_STOCK_NPM_BY_NODE_MAJOR}"
)
assert _satisfies_range(stock_npm, npm_range), (
f"install.sh provisions Node {managed_major}.x (stock npm "
f"{stock_npm}), but engines.npm is {npm_range!r}. A fresh "
"Hermes-managed install cannot run npm ci."
)

def test_desktop_node_floor_is_not_stricter_than_its_toolchain(self):
"""apps/desktop must not demand more Node than its own build tools do.

Expand Down
Loading