Skip to content

Commit 704147d

Browse files
[Node]-Update Readme (#1641)
* feat(node): add npm version selection and installation options * add 'lts' and 'latest' options for npm version selection * feat(node): enhance npm installation with compatibility checks and fallback for incompatible Node.js versions * Update src/node/devcontainer-feature.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/node/devcontainer-feature.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * feat(tests): enhance npm version checks for compatibility and fallback scenarios * Version bump * Version bump * fix(install): update npm version check logic and improve compatibility messaging * fix(install): update npm version check logic and improve compatibility messaging * fix(install): update npm installation loop syntax for clarity * feat(README): update Node.js feature version and add npm version option --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 50fd979 commit 704147d

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/node/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,16 @@ Installs Node.js, nvm, yarn, pnpm, and needed dependencies.
77

88
```json
99
"features": {
10-
"ghcr.io/devcontainers/features/node:1": {}
10+
"ghcr.io/devcontainers/features/node:2": {}
11+
}
12+
```
13+
14+
```json
15+
"features": {
16+
"ghcr.io/devcontainers/features/node:2": {
17+
"version": "20",
18+
"npmVersion": "10.8.0"
19+
}
1120
}
1221
```
1322

@@ -18,6 +27,7 @@ Installs Node.js, nvm, yarn, pnpm, and needed dependencies.
1827
| version | Select or enter a Node.js version to install | string | lts |
1928
| nodeGypDependencies | Install dependencies to compile native node modules (node-gyp)? | boolean | true |
2029
| nvmInstallPath | The path where NVM will be installed. | string | /usr/local/share/nvm |
30+
| npmVersion | Select or enter a specific NPM version to install globally. Use 'latest' for the latest version, 'none' to skip npm version update, or specify a version like '10.9.0'. | string | none |
2131
| pnpmVersion | Select or enter the PNPM version to install | string | latest |
2232
| nvmVersion | Version of NVM to install. | string | latest |
2333
| installYarnUsingApt | On Debian and Ubuntu systems, you have the option to install Yarn globally via APT. If you choose not to use this option, Yarn will be set up using Corepack instead. This choice is specific to Debian and Ubuntu; for other Linux distributions, Yarn is always installed using Corepack, with a fallback to installation via NPM if an error occurs. | boolean | false |

0 commit comments

Comments
 (0)