Skip to content

feat: add Node.js and npm doctor diagnostics - #58

Merged
dDevAhmed merged 9 commits into
mainfrom
feat/cli-017-node-npm-diagnostics
Sep 8, 2026
Merged

dDevAhmed merged 9 commits into
mainfrom
feat/cli-017-node-npm-diagnostics

Conversation

@dDevAhmed

Copy link
Copy Markdown
Contributor

Summary

Implements CLI-017 by adding Node.js and npm environment diagnostics to the default stellarforge doctor run.

Included

  • dependency-free numeric version parser/comparator
  • Node.js diagnostic using process.versions.node
  • npm availability/version diagnostic using a safe injectable subprocess adapter
  • support policy aligned to package engines:
    • Node.js >=22.13.0 <25
    • npm >=10.9.0
  • actionable remediation for missing, malformed, and unsupported versions
  • default registration of Node/npm checks in doctor
  • unit tests for supported/unsupported/malformed/missing cases
  • secret-leakage regression test for subprocess failures
  • built-CLI integration test proving both default checks pass in the supported CI toolchain
  • minor Changeset for the new user-visible capability

Security

  • npm is executed as spawnSync('npm', ['--version'])
  • shell: false
  • no command interpolation
  • no environment dump
  • stderr/error details from a failed npm process are not rendered to users
  • no new runtime or development dependencies

Scope boundaries

This PR does not add Git, Rust/Cargo, Stellar CLI, or Docker diagnostics; those remain CLI-018 through CLI-021.

Closes #20

@dDevAhmed
dDevAhmed merged commit 44894a7 into main Sep 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI-017 — Implement Node.js and npm environment diagnostics

1 participant