npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

node-lts-versions

v1.7.5

Published

Get the maintained LTS versions of Node.js

Readme

CI Conventional Commits

Node.js versions

Avoid needing to update your CI config files for every Node.js release or EOL event.

This action retrieves a list of Node.js release versions and exports the versions for consumption by automated processes.

The output of the yaml function is designed to populate a GitHub Actions matrix declaration so that your CI is testing with the version(s) of Node.js you choose, typically the LTS version(s).

Usage

This action has the following outputs:

  • active are Active LTS versions
  • maintenance are Maintenance LTS versions
  • lts is all LTS versions (active + maintenance)
  • current is the Current node version
  • min is the lowest LTS version

active

The currently active Node.js version. This is like a baton that is handed from one version of Node.js to the next.

maintenance

Every version of Node.js that is actively maintained by the Node.js project.

lts

Similar to maintenance, except it excludes odd number releases that are never considered Long Term Stable. This is the target most modules should use in their CI tests.

current

The current version would usually be used in your CI tests to always tests your code against the latest Node.js version, but perhaps without failing the CI tests.

min

The min version is the lowest supported version of Node.js. It couple be used for modules with scarce updates, whose SLA is a best effort to support any version of Node.js.

manually (the normal way)

test:
  strategy:
    matrix:
      os: [ubuntu-latest, windows-latest, macos-latest]
      node-version: [20, 22]
    fail-fast: false
  steps:

automatically

test:
  needs: get-lts
  strategy:
    matrix:
      os: [ubuntu-latest, windows-latest, macos-latest]
      node-version: ${{ fromJson(needs.get-lts.outputs.lts) }}
    fail-fast: false
  steps:
get-lts:
  runs-on: ubuntu-latest
  steps:
    - id: get
      uses: msimerson/node-lts-versions@v1
  outputs:
    active: ${{ steps.get.outputs.active }}
    maintenance: ${{ steps.get.outputs.maintenance }}
    lts: ${{ steps.get.outputs.lts }}
    current: ${{ steps.get.outputs.current }}
    min: ${{ steps.get.outputs.min }}

Example

✗ node main.js
::set-output name=active::["22"]
::set-output name=maintenance::["18","20"]
::set-output name=lts::["18","20","22"]
::set-output name=current::["23"]
::set-output name=min::"18"

RAW

const ltsv = require('node-lts-versions')
ltsv.fetchLTS().then(() => {
  console.log(ltsv.json())
  console.log(ltsv.yaml())
  ltsv.print()
})

or

const { getNodeLTS } = require('node-lts-versions')
const ltsv = new getNodeLTS()
ltsv.fetchLTS().then(() => {
  console.log(ltsv.json())
  console.log(ltsv.yaml())
  ltsv.print()
})

Methods

fetchLTS

Retrieves Node.js version information.

json

Display Node.js version information in JSON format.

> ltsv.json('active')
'["22"]'
> ltsv.json('lts')
'["18","20","22"]'
> ltsv.json()
'["23"]'

yaml

Display Node.js version information in YAML format.

> ltsv.yaml('lts')
[ '18', '20', '22' ]
> ltsv.yaml('active')
[ '22' ]
> ltsv.yaml('maintenance')
[ '18', '20' ]
> ltsv.yaml('current')
[ '23' ]

print

Display Node.js version information in tabular format.

Ver Codename    Latest Release          LTS Period
18    Hydrogen  v18.20.8 on 2025-03-27  2022-10-17 to 2025-04-30
20    Iron      v20.19.1 on 2025-04-22  2023-10-16 to 2026-04-30
22    Jod       v22.15.0 on 2025-04-22  2024-10-23 to 2027-04-30

Reference

Future

Got ideas? Contributions are welcome. Submit a PR with tests and it will likely be accepted.