JSPM

@azu/node-versions

2.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q23762F
  • License WTFPL

Get the 'latest' and 'LTS' versions of Node JS.

Package Exports

  • @azu/node-versions

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@azu/node-versions) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Fork of @darkobits/node-versions

Diff

  • lts return multiple LTS versions
  • Remove CLI

Install

This package is available as a CLI and as a Node API. If only using the Node API, you should install it locally in your project:

npm i @azu/node-versions

If using the CLI, it may be preferable to install it globally:

npm i -g @azu/node-versions

Use

Node API

This package exports an async function that returns a JSON object with 2 keys, latest and lts, each with the following sub-keys:

interface VersionDescriptor {
  /**
   * Full semver version. (ex: '10.14.1')
   */
  full: string;

  /**
   * Major version number. (ex: 10)
   */
  major?: number;

  /**
   * Minor version number. (ex: 14)
   */
  minor?: number;

  /**
   * Patch version number. (ex: 1)
   */
  patch?: number;
}

interface NodeReleaseDescriptor {
  /**
   * Release date.
   */
  date: string;

  /**
   * Release version.
   */
  version: VersionDescriptor;

  /**
   * NPM version included in the release.
   */
  npm: VersionDescriptor;

  /**
   * V8 version included in the release.
   */
  v8: VersionDescriptor;

  /**
   * libuv version included in the release.
   */
  uv: VersionDescriptor;

  /**
   * zlib version included in the release.
   */
  zlib: VersionDescriptor;

  /**
   * OpenSSL version included in the release.
   */
  openssl: VersionDescriptor;
}