|
1 | | -# nvm(-rust) |
2 | | - |
3 | | -Cross platform nvm that doesn't suck™ |
4 | | - |
5 | | -## Feature Comparison |
6 | | - |
7 | | -| | **nvm-rust** | [nvm-windows](https://github.com/coreybutler/nvm-windows) | [nvm](https://github.com/nvm-sh/nvm) | |
8 | | -| ---: | :---: | :---: | :---: | |
9 | | -| Platforms | [Rust Platforms](https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-1) | Windows | POSIX | |
10 | | -| [Range matching](#range-matching) | ✅ | ❌ | ✅ | |
11 | | -| [.nvmrc](#nvmrc) | 🔧 | ❌ | ✅ | |
12 | | -| [Default global packages](#default-global-packages) | 🔧 | ❌ | ✅ | |
13 | | -| Node <4 | ✅* | ✅ | ✅ | |
14 | | -| Disabling nvm temporarily | ❌ | ✅ | ✅ | |
15 | | -| Caching | ❌ | ❌ | ✅ | |
16 | | -| Aliases | ❌ | ❌ | ✅ | |
17 | | - |
18 | | -\*not supported, might work? |
19 | | - |
20 | | -### Range Matching |
21 | | - |
22 | | -Allowing you to not have to write out the full versions when running a command. |
23 | | - |
24 | | -For example: |
25 | | - |
26 | | -- `nvm install 12` will install the latest version matching `12`, instead of `12.0.0`. |
27 | | -- `nvm install "12 <12.18"` will install the latest `12.17.x` version, instead of just giving you an error. |
28 | | -- `nvm use 12` switch use the newest installed `12.x.x` version instead of `12.0.0` (and most likely giving you an error, who has that version installed?). |
29 | | - |
30 | | -### .nvmrc |
31 | | - |
32 | | -### Default global packages |
| 1 | +# nvm(-rust) |
| 2 | + |
| 3 | +Cross platform nvm that doesn't suck™ |
| 4 | + |
| 5 | +## Feature Comparison |
| 6 | + |
| 7 | +| | **nvm-rust** | [nvm-windows](https://github.com/coreybutler/nvm-windows) | [nvm](https://github.com/nvm-sh/nvm) | |
| 8 | +|-----------------------------------------------------------------------:|:---------------:|:---------------------------------------------------------:|:------------------------------------:| |
| 9 | +| Platforms | Win, Mac, Linux | Windows | POSIX | |
| 10 | +| [Range matching](#range-matching) | ✅ | ❌ | ✅ | |
| 11 | +| [Version files](#version-files-packagejsonengines-nvmrc-tool-versions) | ✅ | ❌ | ✅ | |
| 12 | +| [Default global packages](#default-global-packages) | 🔧 | ❌ | ✅ | |
| 13 | +| Node <4 | ✅* | ✅ | ✅ | |
| 14 | +| Disabling nvm temporarily | ❌ | ✅ | ✅ | |
| 15 | +| Caching | ❌ | ❌ | ✅ | |
| 16 | +| Aliases | ❌ | ❌ | ✅ | |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | +**not supported, might work? |
| 21 | + |
| 22 | +### Range Matching |
| 23 | + |
| 24 | +Allowing you to not have to write out the full versions when running a command. |
| 25 | + |
| 26 | +For example: |
| 27 | + |
| 28 | +- `nvm install 12` will install the latest version matching `12`, instead of `12.0.0`. |
| 29 | +- `nvm install "12 <12.18"` will install the latest `12.17.x` version, instead of just giving you an error. |
| 30 | +- `nvm use 12` switch use the newest installed `12.x.x` version instead of `12.0.0` (and most likely giving you an error, who has that version installed?). |
| 31 | + |
| 32 | +### Version files (`package.json#engines`, `.nvmrc`, `.tool-versions`) |
| 33 | + |
| 34 | +If a version is not specified for the `use` and `install` commands nvm-rust will look for and parse any files containing Node version specifications amd use that! |
| 35 | + |
| 36 | +nvm-rust handles files containing ranges, unlike [nvm](https://github.com/nvm-sh/nvm). |
| 37 | + |
| 38 | +e.g. |
| 39 | + |
| 40 | +``` |
| 41 | +// package.json |
| 42 | +{ |
| 43 | + ... |
| 44 | + "engines": { |
| 45 | + "node": "^14.17" |
| 46 | + } |
| 47 | + ... |
| 48 | +} |
| 49 | +
|
| 50 | +# Installs 14.19.3 as of the time of writing |
| 51 | +$ nvm install |
| 52 | +``` |
| 53 | + |
| 54 | +The program will use the following file priority: |
| 55 | + |
| 56 | +1. `package.json#engines` |
| 57 | +2. `.nvmrc` |
| 58 | +3. `.node-version` |
| 59 | +4. [`.tool-versions` from `asdf`](https://asdf-vm.com/guide/getting-started.html#local) |
| 60 | + |
| 61 | +### Default global packages |
0 commit comments