← All tools

ehmicky/all-node-versions

Popularity 65 Updated Development & Build

List all available Node.js versions

githubauto-collected

Installation

A directly usable install command is not verified yet. Check the project documentation or releases.

List all available Node.js versions.

Sorted from the most to the least recent. Includes major release and LTS information.

Install

npm install all-node-versions

This package works in Node.js =18.18.0.

This is an ES module. It must be loaded using an import or import() statement, not require(). If TypeScript is used, it must be configured to output ES modules, not CommonJS.

Usage

import allNodeVersions from 'all-node-versions'

const {
  versions,
  // [
  //   { node: '18.4.0', npm: '8.12.1' },
  //   { node: '18.3.0', npm: '8.11.0' },
  //   ...
  //   { node: '0.1.14' },
  // ]
  majors,
  // [

// { major: 17, latest: '17.9.1' }, // { major: 16, latest: '16.15.1', lts: 'gallium' }, // { major: 15, latest: '15.14.0' }, // { major: 14, latest: '14.19.3', lts: 'fermium }, // { major: 13, latest: '13.14.0' }, // { major: 12, latest: '12.22.12', lts: 'erbium' }, // { major: 11, latest: '11.15.0' }, // { major: 10, latest: '10.24.1', lts: 'dubnium' }, // { major: 9, latest: '9.11.2' }, // { major: 8, latest: '8.17.0', lts: 'carbon' }, // { major: 7, latest: '7.10.1' }, // { major: 6, latest: '6.17.1', lts: 'boron' }, // { major: 5, latest: '5.12.0' }, // { major: 4, latest: '4.9.1', lts: 'argon' }, // { major: 0, latest: '0.12.18' } // ] } = await allNodeVersions(options)


## allNodeVersions(options?)

`options`: `object`\
_Returns_: `Promise<object>`

### Return value

The return value resolves to an object with the following properties.

#### versions

List of available Node.js versions and related information. Sorted from the most to the least recent Node.js version.

##### node

Type: string

Node.js version as a major.minor.patch string.

##### npm

Type: string?

Default NPM version as a major.minor.patch[-tags] string. undefined if the node version is 0.6.2 or older.

#### majors