https://github.com/fvdm/nodejs-versions
The current Node.js LTS versions for use in automation scripts
https://github.com/fvdm/nodejs-versions
Last synced: over 1 year ago
JSON representation
The current Node.js LTS versions for use in automation scripts
- Host: GitHub
- URL: https://github.com/fvdm/nodejs-versions
- Owner: fvdm
- License: gpl-3.0
- Created: 2021-06-14T16:33:06.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-05-22T22:11:30.000Z (about 2 years ago)
- Last Synced: 2025-02-19T12:54:58.456Z (over 1 year ago)
- Language: JavaScript
- Size: 81.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# nodejs-versions
[](https://github.com/fvdm/nodejs-versions/actions/workflows/update_versions.yml)
The current major Node.js versions for use in
automation scripts.
At the moment the list is maintained by hand.
My packages are always tested against the officialy
supported LTS (active) versions.
## Files
file | stages
:----------------|:------
current.json | Only current
lts.json | Only active LTS
lts-current.json | LTS + current
## Data source
- [Node.js release schedule](https://github.com/nodejs/Release)
- [Node.js release.json](https://raw.githubusercontent.com/nodejs/Release/main/schedule.json)
## Github action
Here the `lts.json` is retrieved and made available in
`needs.lts_versions.outputs.matrix`.
Then in the build you convert the JSON array to a matrix.
```yml
jobs:
lts_versions:
name: "Get versions"
runs-on: ubuntu-latest
steps:
- id: set-matrix
run: echo "matrix=$(curl -s https://raw.githubusercontent.com/fvdm/nodejs-versions/main/lts.json)" >> $GITHUB_OUTPUT
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
build:
name: "Node"
needs: lts_versions
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ${{ fromJson(needs.lts_versions.outputs.matrix) }}
steps:
- uses: actions/checkout@v2
- name: Test on Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
```