Compare the running Node.js version with version declarations in a project or a small monorepo.
Reads .nvmrc, .node-version, the Node entry in .tool-versions, and package.json engines. Separate modes list package requirements, build a compatibility matrix or emit CI annotations.
Package runtime requirement: Node.js >=20. Git is needed to obtain this pinned source checkout.
git clone https://github.com/NickCirv/node-version-check.git
cd node-version-check
git checkout 62d0c7db49a1dcba16f329928b5f2916e7d3125c
node index.js --helpThis source-derived example has not been executed in this review. Help lists modes without modifying version files.
node index.js --dir .
node index.js --scan ./packages
node index.js ci --format github
node index.js --latestci exits 1 for a detected incompatibility. --fix proposes changes to .nvmrc and .node-version using the first major number in engines.node, then asks for confirmation.
Command reference covers arguments, modes and output controls.
Range handling is implemented locally rather than through a complete semver library. The matrix uses hard-coded versions, so it is not a current support-policy table. --latest fetches release data from nodejs.org. Missing requirements produce a warning and success in CI mode; success does not establish that requirements exist.
Declared package scripts:
| Script | Command |
|---|---|
test |
node --test |
The smoke test syntax-checks the entrypoint; it does not exercise CLI behavior or integrations.
Source review and claim ledger records revision 62d0c7db49a1, inspected files and verification gaps.
Protected license and attribution files remain unchanged: LICENSE.
