node-version is a lightweight JavaScript utility designed to parse the current Node.js runtime version (from `process.version`) into a structured object. It provides granular access to major, minor, and patch segments, alongside powerful helper methods for semantic version comparison, such as `isAtLeast`, `isAbove`, `isBelow`, and `isAtMost`. The package, currently at stable version 4.3.0, maintains an active release cadence with minor and patch updates introducing features like `eolDate` and `daysUntilEOL`. Key differentiators include its pure ESM architecture (since v4), full TypeScript support, and built-in checks for Node.js Long Term Support (LTS) status and End-of-Life (EOL) dates, making it an ideal choice for modern Node.js applications that require robust version management and awareness.
npm install node-versionVerified import paths — ran on the pinned version, not inferred.
Demonstrates importing the `version` object and accessing its parsed properties and helper methods, including LTS/EOL checks. Also shows `getVersion()`.
Migrate your project to use ES Modules (`import`/`export` syntax) or, if CommonJS is strictly required, pin your dependency to `node-version@3` (`npm install node-version@3`).
Ensure your Node.js environment is upgraded to version 20.0.0 or newer. If you must support older Node.js versions, use `node-version@3`.
Always use `import { symbol } from 'node-version';` for all exports. If you need CommonJS, install `node-version@3`.If migrating to ESM is not an option, explicitly install `node-version@3` (e.g., `npm install node-version@3`). Be aware that this version may not receive new features or EOL data updates present in v4+.
Change your import statement from `const { version } = require('node-version');` to `import { version } from 'node-version';`. Ensure your project or file is configured for ESM (e.g., `"type": "module"` in `package.json` or `.mjs` file extension). If you cannot use ESM, install `node-version@3`.Upgrade your Node.js environment to version 20.0.0 or newer. Alternatively, if your project must run on an older Node.js version, you can install `node-version@3` which supports earlier Node.js versions.
No dependency data recorded yet.