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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})

* 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`)
* Fixed issue causing npx scripts to fail ([#97](https://github.com/lando/node/issues/97))

## v1.4.0 - [December 20, 2024](https://github.com/lando/node/releases/tag/v1.4.0)

Expand Down
8 changes: 5 additions & 3 deletions builders/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
const _ = require('lodash');

// Constants
const LEGACY_DEFAULT_VERSION = '14';
const supportedVersions = [
'23',
'23.8',
Expand Down Expand Up @@ -220,7 +221,7 @@ const pkger = (pkg, version = 'latest') => `${pkg}@${version}`;
module.exports = {
name: 'node',
config: {
version: '14',
version: LEGACY_DEFAULT_VERSION,
supported: supportedVersions,
patchesSupported: true,
legacy: ['12', '10', '8', '6'],
Expand Down Expand Up @@ -270,10 +271,11 @@ module.exports = {
// Add port to "moreHttpsPorts"
options.moreHttpPorts.push(options.port);
// Add our npm things to run step
let commands = ['mkdir -p $NPM_CONFIG_PREFIX/{bin,lib,share}'];
if (!_.isEmpty(options.globals)) {
const commands = require('../utils/get-install-commands')(options.globals, pkger, ['npm', 'install', '-g']);
require('../utils/add-build-step')(commands, options._app, options.name);
commands = require('../utils/get-install-commands')(options.globals, pkger, ['npm', 'install', '-g']);
}
require('../utils/add-build-step')(commands, options._app, options.name);
// Set the sport and moreHttpPorts if ssl is numeric
if (options.ssl) {
options.sport = _.isInteger(options.ssl) ? options.ssl : 443;
Expand Down
2 changes: 2 additions & 0 deletions examples/20/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ services:
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!
Expand Down
3 changes: 3 additions & 0 deletions examples/20/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ lando exec custom -- "which gulp | grep /var/www/.npm-global"
# Should not serve port for cli
lando exec cli -- "curl http://localhost" || echo $? | grep 7

# Should execute npx scripts
lando npx cowsay "Hello World"

# Should install gruntcli
lando grunt -V
```
Expand Down
2 changes: 2 additions & 0 deletions examples/21/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ services:
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!
Expand Down
3 changes: 3 additions & 0 deletions examples/21/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ lando exec cli -- "curl http://localhost" || echo $? | grep 7

# Should install gruntcli
lando grunt -V

# Should execute npx scripts
lando npx cowsay "Hello World"
```

## Destroy tests
Expand Down
2 changes: 2 additions & 0 deletions examples/22/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ services:
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!
Expand Down
3 changes: 3 additions & 0 deletions examples/22/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ lando exec cli -- "curl http://localhost" || echo $? | grep 7

# Should install gruntcli
lando grunt -V

# Should execute npx scripts
lando npx cowsay "Hello World"
```

## Destroy tests
Expand Down
2 changes: 2 additions & 0 deletions examples/23/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ services:
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!
Expand Down
3 changes: 3 additions & 0 deletions examples/23/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ lando exec cli -- "curl http://localhost" || echo $? | grep 7

# Should install gruntcli
lando grunt -V

# Should execute npx scripts
lando npx cowsay "Hello World"
```

## Destroy tests
Expand Down
Loading