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

v2.0.2

Published

Get the maintained LTS versions of Node.js

Readme

CI Conventional Commits codecov Maintainability

node-lts-versions

Stop hardcoding Node.js versions in your CI. This GitHub Action publishes the current Node.js release schedule as job outputs, so your matrix stays up-to-date without manual updates.

GitHub Actions

Outputs

| Output | Description | | ------------- | -------------------------------------------------------------------------------- | | lts | All maintained LTS versions (active + maintenance) | | active | Versions in the Active LTS phase | | maintenance | All non-EOL versions | | current | The Current (non-LTS) release, or the highest LTS version between release cycles | | min | The lowest maintained LTS version |

lts

The most useful output for most projects. Use this to test against every version the Node.js project still maintains as LTS. Odd-numbered releases (which never receive LTS status) are excluded.

active

Versions currently in the Active LTS phase — a narrower target for projects that want to track the leading edge of LTS without including older maintenance releases.

maintenance

Every non-EOL version, including the Current release. Wider than lts; useful if you want the broadest possible compatibility signal.

current

The newest Node.js release, still in its initial six-month window before transitioning to LTS. Useful for catching breakage early, typically in an allow-failure job. Returns the highest LTS version when no Current release is active.

min

The lowest maintained LTS version. Useful for projects that want to guarantee a minimum supported version without tracking every release.

Hardcoded versions

If you prefer to control the matrix yourself, you can pin versions directly:

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

Auto-updating versions

To keep the matrix current automatically, add a get-lts job and reference its outputs:

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@v2
  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 }}

JavaScript API

Install the package and import the default singleton or the class directly:

import ltsv from 'node-lts-versions'
await ltsv.fetchLTS()
console.log(ltsv.json('lts'))
console.log(ltsv.get('lts'))
ltsv.print()
import { getNodeLTS } from 'node-lts-versions'
const ltsv = new getNodeLTS()
await ltsv.fetchLTS()
console.log(ltsv.json('lts'))
console.log(ltsv.get('lts'))
ltsv.print()

Methods

fetchLTS()

Fetches the Node.js release index and populates the internal version data. Concurrent calls share the same request. Call this once before using any other method.

json(filter?)

Returns a JSON string containing an array of major version numbers matching filter. Defaults to 'lts'.

ltsv.json('active') // '["24"]'
ltsv.json('lts') // '["20","22","24"]'
ltsv.json() // '["20","22","24"]'

get(filter?)

Returns an array of major version number strings matching filter. Accepts 'lts' (default), 'active', 'maintenance', or 'current'.

ltsv.get('lts') // [ '20', '22', '24' ]
ltsv.get('active') // [ '24' ]
ltsv.get('maintenance') // [ '20', '22', '24' ]
ltsv.get('current') // [ '25' ]

print(mode?)

Prints a formatted table to stdout. Pass 'initial' to show the first release of each major version; omit or pass 'lts' for the latest releases with LTS dates.

Ver Codename  Latest Release           LTS Period
20    Iron    v20.20.2 on 2026-03-24   2023-10-17 to 2026-04-30
22    Jod     v22.22.2 on 2026-03-24   2024-10-24 to 2027-04-30
24    Krypton v24.15.0 on 2026-04-15   2025-11-06 to 2028-05-31

Reference