diff --git a/src/node/devcontainer-feature.json b/src/node/devcontainer-feature.json index b8d699def..1828ba0d5 100644 --- a/src/node/devcontainer-feature.json +++ b/src/node/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "node", - "version": "1.6.2", + "version": "1.6.3", "name": "Node.js (via nvm), yarn and pnpm", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/node", "description": "Installs Node.js, nvm, yarn, pnpm, and needed dependencies.", @@ -11,9 +11,8 @@ "lts", "latest", "none", - "18", - "16", - "14" + "22", + "20" ], "default": "lts", "description": "Select or enter a Node.js version to install" diff --git a/test/node/install_additional_node.sh b/test/node/install_additional_node.sh old mode 100644 new mode 100755 index 57d615a0a..527dacf25 --- a/test/node/install_additional_node.sh +++ b/test/node/install_additional_node.sh @@ -5,13 +5,12 @@ set -e # Optional: Import test library source dev-container-features-test-lib -# 'lts' is now some version of node 20... -check "version_on_path" node -v | grep 20 +# 'lts' is now some version of node 22... +check "version_on_path" node -v | grep 22 check "pnpm" bash -c "pnpm -v | grep 8.8.0" -check "v20_installed" ls -1 /usr/local/share/nvm/versions/node | grep 20 -check "v14_installed" ls -1 /usr/local/share/nvm/versions/node | grep 14.19.3 -check "v17_installed" ls -1 /usr/local/share/nvm/versions/node | grep 17.9.1 +check "v20_installed" ls -1 /usr/local/share/nvm/versions/node | grep 20.19.1 +check "v19_installed" ls -1 /usr/local/share/nvm/versions/node | grep 19.9.0 # Report result diff --git a/test/node/install_additional_node_on_rhel_family.sh b/test/node/install_additional_node_on_rhel_family.sh index 3300f7f1a..a10ca82f4 100644 --- a/test/node/install_additional_node_on_rhel_family.sh +++ b/test/node/install_additional_node_on_rhel_family.sh @@ -5,13 +5,13 @@ set -e # Optional: Import test library source dev-container-features-test-lib -# 'lts' is now some version of node 20... -check "version_on_path" node -v | grep 20 +# 'lts' is now some version of node 22... +check "version_on_path" node -v | grep 22 check "pnpm" bash -c "pnpm -v | grep 6.16.0" check "v20_installed" ls -1 /usr/local/share/nvm/versions/node | grep 20 -check "v14_installed" ls -1 /usr/local/share/nvm/versions/node | grep 14.19.3 -check "v17_installed" ls -1 /usr/local/share/nvm/versions/node | grep 17.9.1 +check "v19_installed" ls -1 /usr/local/share/nvm/versions/node | grep 19.9.0 +check "v20_installed" ls -1 /usr/local/share/nvm/versions/node | grep 20.19.1 # Report result diff --git a/test/node/install_node_22_on_jammy.sh b/test/node/install_node_22_on_jammy.sh new file mode 100644 index 000000000..6f3aee27c --- /dev/null +++ b/test/node/install_node_22_on_jammy.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e + +# Optional: Import test library +source dev-container-features-test-lib + +# Definition specific tests +check "version" bash -c "node --version | grep 22" +check "pnpm" bash -c "pnpm -v | grep 8.8.0" +check "nvm" bash -c ". /usr/local/share/nvm/nvm.sh && nvm install 10" + +# Report result +reportResults + diff --git a/test/node/scenarios.json b/test/node/scenarios.json index df03128d6..d9a0c527e 100644 --- a/test/node/scenarios.json +++ b/test/node/scenarios.json @@ -6,13 +6,13 @@ "version": "lts" } } - }, + }, "install_additional_node": { "image": "debian:11", "features": { "node": { "version": "lts", - "additionalVersions": "v17.9.1,v14.19.3", + "additionalVersions": "v20.19.1,v19.9.0", "pnpmVersion": "8.8.0" } } @@ -22,7 +22,7 @@ "features": { "node": { "version": "lts", - "additionalVersions": "v17.9.1,v14.19.3", + "additionalVersions": "v20.19.1,v19.9.0", "pnpmVersion": "6.16.0" } } @@ -77,11 +77,11 @@ } } }, - "install_node_16_on_bionic": { - "image": "mcr.microsoft.com/devcontainers/base:ubuntu-18.04", + "install_node_22_on_jammy": { + "image": "mcr.microsoft.com/devcontainers/base:ubuntu-22.04", "features": { "node": { - "version": "16", + "version": "22", "pnpmVersion":"8.8.0" } } @@ -200,4 +200,4 @@ } } } -} \ No newline at end of file +}