Skip to content

Commit 3442a4e

Browse files
[node] - Node 18 EOL changes (#1349)
* Node 18 EOL changes * Fixing failing tests * Updating based on review comments --------- Co-authored-by: Álvaro Rausell Guiard <33221237+AlvaroRausell@users.noreply.github.com>
1 parent 600cda6 commit 3442a4e

File tree

5 files changed

+33
-20
lines changed

5 files changed

+33
-20
lines changed

src/node/devcontainer-feature.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "node",
3-
"version": "1.6.2",
3+
"version": "1.6.3",
44
"name": "Node.js (via nvm), yarn and pnpm",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/node",
66
"description": "Installs Node.js, nvm, yarn, pnpm, and needed dependencies.",
@@ -11,9 +11,8 @@
1111
"lts",
1212
"latest",
1313
"none",
14-
"18",
15-
"16",
16-
"14"
14+
"22",
15+
"20"
1716
],
1817
"default": "lts",
1918
"description": "Select or enter a Node.js version to install"

test/node/install_additional_node.sh

100644100755
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ set -e
55
# Optional: Import test library
66
source dev-container-features-test-lib
77

8-
# 'lts' is now some version of node 20...
9-
check "version_on_path" node -v | grep 20
8+
# 'lts' is now some version of node 22...
9+
check "version_on_path" node -v | grep 22
1010
check "pnpm" bash -c "pnpm -v | grep 8.8.0"
1111

12-
check "v20_installed" ls -1 /usr/local/share/nvm/versions/node | grep 20
13-
check "v14_installed" ls -1 /usr/local/share/nvm/versions/node | grep 14.19.3
14-
check "v17_installed" ls -1 /usr/local/share/nvm/versions/node | grep 17.9.1
12+
check "v20_installed" ls -1 /usr/local/share/nvm/versions/node | grep 20.19.1
13+
check "v19_installed" ls -1 /usr/local/share/nvm/versions/node | grep 19.9.0
1514

1615

1716
# Report result

test/node/install_additional_node_on_rhel_family.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ set -e
55
# Optional: Import test library
66
source dev-container-features-test-lib
77

8-
# 'lts' is now some version of node 20...
9-
check "version_on_path" node -v | grep 20
8+
# 'lts' is now some version of node 22...
9+
check "version_on_path" node -v | grep 22
1010
check "pnpm" bash -c "pnpm -v | grep 6.16.0"
1111

1212
check "v20_installed" ls -1 /usr/local/share/nvm/versions/node | grep 20
13-
check "v14_installed" ls -1 /usr/local/share/nvm/versions/node | grep 14.19.3
14-
check "v17_installed" ls -1 /usr/local/share/nvm/versions/node | grep 17.9.1
13+
check "v19_installed" ls -1 /usr/local/share/nvm/versions/node | grep 19.9.0
14+
check "v20_installed" ls -1 /usr/local/share/nvm/versions/node | grep 20.19.1
1515

1616

1717
# Report result
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Optional: Import test library
6+
source dev-container-features-test-lib
7+
8+
# Definition specific tests
9+
check "version" bash -c "node --version | grep 22"
10+
check "pnpm" bash -c "pnpm -v | grep 8.8.0"
11+
check "nvm" bash -c ". /usr/local/share/nvm/nvm.sh && nvm install 10"
12+
13+
# Report result
14+
reportResults
15+

test/node/scenarios.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
"version": "lts"
77
}
88
}
9-
},
9+
},
1010
"install_additional_node": {
1111
"image": "debian:11",
1212
"features": {
1313
"node": {
1414
"version": "lts",
15-
"additionalVersions": "v17.9.1,v14.19.3",
15+
"additionalVersions": "v20.19.1,v19.9.0",
1616
"pnpmVersion": "8.8.0"
1717
}
1818
}
@@ -22,7 +22,7 @@
2222
"features": {
2323
"node": {
2424
"version": "lts",
25-
"additionalVersions": "v17.9.1,v14.19.3",
25+
"additionalVersions": "v20.19.1,v19.9.0",
2626
"pnpmVersion": "6.16.0"
2727
}
2828
}
@@ -77,11 +77,11 @@
7777
}
7878
}
7979
},
80-
"install_node_16_on_bionic": {
81-
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-18.04",
80+
"install_node_22_on_jammy": {
81+
"image": "mcr.microsoft.com/devcontainers/base:ubuntu-22.04",
8282
"features": {
8383
"node": {
84-
"version": "16",
84+
"version": "22",
8585
"pnpmVersion":"8.8.0"
8686
}
8787
}
@@ -200,4 +200,4 @@
200200
}
201201
}
202202
}
203-
}
203+
}

0 commit comments

Comments
 (0)