Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/pr-docs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ jobs:
os:
- ubuntu-24.04
node-version:
- '18'
- '20'
steps:
# Install deps and cache
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Cache version builds
uses: actions/cache@v4
with:
key: lando-mvb-docs
path: docs/.vitepress/cache/@lando/mvb
save-always: true
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: npm
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
os:
- ubuntu-24.04
node-version:
- '18'
- '20'
steps:
# Install deps and cache
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: npm
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/pr-node-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,18 @@ jobs:
- examples/21
- examples/22
- examples/23
- examples/24
lando-version:
- 3-edge
os:
- ubuntu-24.04
node-version:
- '18'
- '20'
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
os:
- windows-2022
- ubuntu-24.04
- macos-14
- macos-15
node-version:
- '18'
- '20'
steps:
# Install deps and cache
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: npm
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ name: Publish to NPM
on:
release:
types:
- published
- edited
- created

permissions:
id-token: write
contents: read

jobs:
deploy:
Expand All @@ -18,25 +21,22 @@ jobs:
node-version:
- '20'
steps:
# Install deps and cache
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org
cache: npm
- name: Install dependencies
run: npm clean-install --prefer-offline --frozen-lockfile

# Let's do tests rq just to make sure we dont push something that is fundamentally broken
- name: Lint code
run: npm run lint
- name: Run unit tests
run: npm run test:unit

# Prepare release.
- name: Prepare release
uses: lando/prepare-release-action@v3
with:
Expand All @@ -45,7 +45,8 @@ jobs:
sync-token: ${{ secrets.RTFM47_COAXIUM_INJECTOR }}
sync-username: rtfm-47

# Deploy
- name: Upgrade npm for trusted publishing
run: npm install -g "npm@^11.5.1"
- name: Publish to npm
run: |
VERSION=$(node -p "require('./package.json').version")
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})

* Added support for Node LTS `24` (up to `24.11`)
* Updated Node LTS support to include the latest minor versions for `22` (up to `22.21`) and `20` (up to `20.19`)
* Fixed `test:leia`

## v1.5.0 - [March 5, 2025](https://github.com/lando/node/releases/tag/v1.5.0)

* Updated Node support to include the latest minor versions for Node `23` (up to `23.8`), `22` (up to `22.14`), `20` (up to `20.18`), `19` (up to `19.9`), `18` (up to `18.20`), and `16` (up to `16.20`)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Add a `node` service to your Landofile
```yaml
services:
myservice:
type: node:16
type: node:24
command: npm start
```

Expand Down
20 changes: 20 additions & 0 deletions builders/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ const _ = require('lodash');
// Constants
const LEGACY_DEFAULT_VERSION = '14';
const supportedVersions = [
'24',
'24.11',
'24.10',
'24.9',
'24.8',
'24.7',
'24.6',
'24.5',
'24.4',
'24.3',
'24.2',
'24.1',
'23',
'23.8',
'23.7',
Expand All @@ -16,6 +28,13 @@ const supportedVersions = [
'23.2',
'23.1',
'22',
'22.21',
'22.20',
'22.19',
'22.18',
'22.17',
'22.16',
'22.15',
'22.14',
'22.13',
'22.12',
Expand All @@ -39,6 +58,7 @@ const supportedVersions = [
'21.2',
'21.1',
'20',
'20.19',
'20.18',
'20.17',
'20.16',
Expand Down
8 changes: 4 additions & 4 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Also note that options, in addition to the [build steps](https://docs.lando.dev/
```yaml
services:
myservice:
type: node:18
type: node:24
ssl: false
command: tail -f /dev/null
globals: []
Expand Down Expand Up @@ -70,7 +70,7 @@ You can also set `ssl` to a specific port. This will do the same thing as `ssl:
```yaml
services:
myservice:
type: node
type: node:24
port: 3000
ssl: 4444
```
Expand All @@ -90,7 +90,7 @@ An example of globally installing the `latest` `gulp-cli` is shown below:
```yaml
services:
myservice:
type: node
type: node:24
globals:
gulp-cli: latest
command: npm start
Expand All @@ -101,7 +101,7 @@ An example of using a [build step](https://docs.lando.dev/services/lando-3.html#
```yaml
services:
myservice:
type: node
type: node:24
build:
- npm install
command: yarn start-app
Expand Down
2 changes: 1 addition & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ At the very least you will need to have the following installed:

* [Lando 3.21.0+](https://docs.lando.dev/getting-started/installation.html) preferably installed [from source](https://docs.lando.dev/install/source.html).
* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* [Node 18](https://nodejs.org/dist/latest-v18.x/)
* [Node 20](https://nodejs.org/dist/latest-v20.x/)

## Installation

Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
title: Node Lando Plugin
description: Add a highly configurable NodeJS service to Lando for local development with all the power of Docker and Docker Compose; comes with composer, xdebug and multiple versions for lols.
next: ./config.html
---

# Node
Expand All @@ -13,12 +12,13 @@ You can easily add it to your Lando app by adding an entry to the [services](htt
```yaml
services:
myservice:
type: node:16
type: node:24
command: npm start
```

## Supported versions

* [24](https://hub.docker.com/_/node)
* [23](https://hub.docker.com/_/node)
* [22](https://hub.docker.com/_/node)
* [21](https://hub.docker.com/_/node)
Expand All @@ -28,7 +28,7 @@ services:
* [17](https://hub.docker.com/_/node)
* [16](https://hub.docker.com/_/node)
* [15](https://hub.docker.com/_/node)
* **[14](https://hub.docker.com/_/node)** **(default)**
* [14](https://hub.docker.com/_/node)
* [custom](https://docs.lando.dev/services/lando-3.html#overrides)

## Legacy versions
Expand Down
2 changes: 1 addition & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mkdir -p ~/.lando/plugins
# Install plugin
# NOTE: Modify the "npm install @lando/node" line to install a particular version eg
# npm install @lando/node@0.5.2
docker run --rm -it -v ${HOME}/.lando/plugins:/plugins -w /tmp node:18-alpine sh -c \
docker run --rm -it -v ${HOME}/.lando/plugins:/plugins -w /tmp node:20-alpine sh -c \
"npm init -y \
&& npm install @lando/node --production --flat --no-default-rc --no-lockfile --link-duplicates \
&& npm install --production --cwd /tmp/node_modules/@lando/node \
Expand Down
3 changes: 3 additions & 0 deletions examples/24/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
*.log
package-lock.json
39 changes: 39 additions & 0 deletions examples/24/.lando.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: lando-node-24
services:
defaults:
type: node:24
build:
- yarn
command: /app/node_modules/.bin/nodemon src/app-http.js --watch src --ignore *.test.js
cli:
type: node
compass:
type: node:24
globals:
grunt-cli: latest
custom:
type: node:24
ssl: true
globals:
gulp-cli: latest
port: 3000
build:
- yarn
command: /app/node_modules/.bin/nodemon src/app-https.js --watch src --ignore *.test.js
custom2:
type: node:24.7.0
ssl: 4444
port: 3000
build:
- yarn
command: /app/node_modules/.bin/nodemon src/app-custom.js --watch src --ignore *.test.js
tooling:
grunt:
service: compass
npx:
service: cli

# This is important because it lets lando know to test against the plugin in this repo
# DO NOT REMOVE THIS!
plugins:
"@lando/node": ../..
Loading
Loading