From 324b9284f677003d8c71b27a7bf2870e90fcee9c Mon Sep 17 00:00:00 2001 From: Kaniska Date: Fri, 25 Apr 2025 11:19:24 +0000 Subject: [PATCH 1/2] Node 18 EOL changes --- src/node/devcontainer-feature.json | 7 +++---- test/node/install_node_22_on_jammy.sh | 15 +++++++++++++++ test/node/scenarios.json | 8 ++++---- 3 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 test/node/install_node_22_on_jammy.sh 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_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..717a2e6ba 100644 --- a/test/node/scenarios.json +++ b/test/node/scenarios.json @@ -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 +} From 9ae64f34c16f3be4db8df478fcef92cf91322e65 Mon Sep 17 00:00:00 2001 From: Kaniska Date: Fri, 25 Apr 2025 14:07:56 +0000 Subject: [PATCH 2/2] Fixing failing tests --- test/node/install_additional_node.sh | 2 +- test/node/install_additional_node_on_rhel_family.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 test/node/install_additional_node.sh diff --git a/test/node/install_additional_node.sh b/test/node/install_additional_node.sh old mode 100644 new mode 100755 index 57d615a0a..223d1ae64 --- a/test/node/install_additional_node.sh +++ b/test/node/install_additional_node.sh @@ -6,7 +6,7 @@ set -e source dev-container-features-test-lib # 'lts' is now some version of node 20... -check "version_on_path" node -v | grep 20 +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 diff --git a/test/node/install_additional_node_on_rhel_family.sh b/test/node/install_additional_node_on_rhel_family.sh index 3300f7f1a..653d17a28 100644 --- a/test/node/install_additional_node_on_rhel_family.sh +++ b/test/node/install_additional_node_on_rhel_family.sh @@ -6,7 +6,7 @@ set -e source dev-container-features-test-lib # 'lts' is now some version of node 20... -check "version_on_path" node -v | grep 20 +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