Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:20000419 Fauxnix Runtime Version Gating

From Leeroopedia
Knowledge Sources
Domains Runtime_Support, Versioning
Last Updated 2026-10-26 00:00 GMT

Overview

A runtime version-gating technique that checks the running Node version against a single inclusive stable-version floor declared in the package manifest, failing fast before any work if the version is too low.

Description

Runtime Version Gating ensures fauxnix never runs on an unsupported Node version. The package declares a single >=x.y.z engine floor (not a general semver range). The gate parses this floor once at module load (from package.json or a bundled SEA banner global) and exports a supportsNode(version) predicate. The process entry point calls it before dispatching to the CLI; the doctor report uses it for diagnostics. A version below the floor exits with an actionable error message rather than attempting to run and failing with a confusing runtime error later.

Usage

Use this principle when a tool relies on Node APIs or syntax available only above a certain version. The fail-fast-at-entry approach is the right choice because it gives the user an actionable message before any side effects.

Theoretical Basis

floor = parse(">=x.y.z") from package.json engines.node (or SEA banner)
supportsNode(version):
  actual = parseVersion(version)
  for i in 0..2: if actual[i] != floor[i]: return actual[i] > floor[i]
  return true  # equal — meets the >= floor

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment