v0.40.6
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Jordan Harband · committed by Jordan Harband · parent 9275c5b · Browse files · 4 files·+19 added−19 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+19 added−19 removed
- other:+19 added−19 removed
Provenance
- Commit
b6cf55f- Tree
749cedb- Author
Jordan Harband <ljharb@gmail.com>- Committer
Jordan Harband <ljharb@gmail.com>- Parent
9275c5b
4 files changed+19 added−19 removed
modified:install.sh+1 added-1 removed
43 unmodified lines44 fi45 }46 47 nvm_latest_version() {48- nvm_echo "v0.40.5"48+ nvm_echo "v0.40.6"49 }50 51 nvm_profile_is_bash_or_zsh() {52 local TEST_PROFILE467 unmodified linesmodified:nvm.sh+1 added-1 removed
4735 unmodified lines4736 esac4737 NVM_VERSION_ONLY=true NVM_LTS="${NVM_LTS-}" nvm_remote_version "${PATTERN:-node}"4738 ;;4739 "--version" | "-v")4740- nvm_echo '0.40.5'4740+ nvm_echo '0.40.6'4741 ;;4742 "unload")4743 nvm deactivate >/dev/null 2>&14744 unset -f nvm \216 unmodified linesmodified:package.json+1 added-1 removed
1233456746 unmodified lines{ "name": "nvm", "version": "0.40.5", "version": "0.40.6", "description": "Node Version Manager - Simple bash script to manage multiple active node.js versions", "directories": { "test": "test" },46 unmodified linesmodified:README.md+16 added-16 removed
4 unmodified lines5 </picture>6 </a>7 8 9-# Node Version Manager [][3] [][4] [](https://bestpractices.dev/projects/684)9+# Node Version Manager [][3] [][4] [](https://bestpractices.dev/projects/684)10 11 <!-- To update this table of contents, ensure you have run `npm install` then `npm run doctoc` -->12 <!-- START doctoc generated TOC please keep comment here to allow auto update -->13 <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->91 unmodified lines105 ### Install & Update Script106 107 To **install** or **update** nvm, you should run the [install script][2]. To do that, you may either download and run the script manually, or use the following cURL or Wget command:108 ```sh109-curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.5/install.sh | bash109+curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.6/install.sh | bash110 ```111 ```sh112-wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.5/install.sh | bash112+wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.6/install.sh | bash113 ```114 115 Running either of the above commands downloads a script and runs it. The script clones the nvm repository to `~/.nvm`, and attempts to add the source lines from the snippet below to the correct profile file (`~/.bashrc`, `~/.bash_profile`, `~/.zshrc`, or `~/.profile`). If you find the install script is updating the wrong profile file, set the `$PROFILE` env var to the profile file’s path, and then rerun the installation script.116 18 unmodified lines135 Eg: `curl ... | NVM_DIR="path/to/nvm"`. Ensure that the `NVM_DIR` does not contain a trailing slash.136 137 - The installer can use `git`, `curl`, or `wget` to download `nvm`, whichever is available.138 139-- You can instruct the installer to not edit your shell config (for example if you already get completions via a [zsh nvm plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/nvm)) by setting `PROFILE=/dev/null` before running the `install.sh` script. Here's an example one-line command to do that: `PROFILE=/dev/null bash -c 'curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.5/install.sh | bash'`139+- You can instruct the installer to not edit your shell config (for example if you already get completions via a [zsh nvm plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/nvm)) by setting `PROFILE=/dev/null` before running the `install.sh` script. Here's an example one-line command to do that: `PROFILE=/dev/null bash -c 'curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.6/install.sh | bash'`140 141 #### Installing in Docker142 143 When invoking bash as a non-interactive shell, like in a Docker container, none of the regular profile files are sourced. In order to use `nvm`, `node`, and `npm` like normal, you can instead specify the special `BASH_ENV` variable, which bash sources when invoked non-interactively.7 unmodified lines151 RUN touch "${BASH_ENV}"152 RUN echo '. "${BASH_ENV}"' >> ~/.bashrc153 154 # Download and install nvm155-RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.5/install.sh | PROFILE="${BASH_ENV}" bash155+RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.6/install.sh | PROFILE="${BASH_ENV}" bash156 RUN echo node > .nvmrc157 RUN nvm install158 ```159 9 unmodified lines169 # install curl170 RUN apt update && apt install curl -y171 172 # install nvm173-RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.5/install.sh | bash173+RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.6/install.sh | bash174 175 # set env176 ENV NVM_DIR=/root/.nvm177 17 unmodified lines195 ```196 docker run --rm -it nvmimage197 198 root@0a6b5a237c14:/# nvm -v199-0.40.5199+0.40.6200 201 root@0a6b5a237c14:/# node -v202 v19.9.0203 54 unmodified lines258 259 ```yaml260 - name: Install nvm261 ansible.builtin.shell: >262- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.5/install.sh | bash262+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.6/install.sh | bash263 args:264 creates: "{{ ansible_env.HOME }}/.nvm/nvm.sh"265 ```266 53 unmodified lines320 If you have `git` installed (requires git v1.7.10+):321 322 1. clone this repo in the root of your user profile323 - `cd ~/` from anywhere then `git clone https://github.com/nvm-sh/nvm.git .nvm`324-1. `cd ~/.nvm` and check out the latest version with `git checkout v0.40.5`324+1. `cd ~/.nvm` and check out the latest version with `git checkout v0.40.6`325 1. activate `nvm` by sourcing it from your shell: `. ./nvm.sh`326 327 Now add these lines to your `~/.bashrc`, `~/.profile`, or `~/.zshrc` file to have it automatically sourced upon login:328 (you may have to add to more than one of the above files)628 unmodified lines957 958 ### Alpine Linux 3.13+959 ```sh960 apk add -U curl bash ca-certificates openssl ncurses coreutils python3 make gcc g++ libgcc linux-headers grep util-linux binutils findutils961-curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.5/install.sh | bash961+curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.6/install.sh | bash962 ```963 964 ### Alpine Linux 3.5 - 3.12965 ```sh966 apk add -U curl bash ca-certificates openssl ncurses coreutils python2 make gcc g++ libgcc linux-headers grep util-linux binutils findutils967-curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.5/install.sh | bash967+curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.6/install.sh | bash968 ```969 970 _Note: Alpine 3.5 can only install NodeJS versions up to v6.9.5, Alpine 3.6 can only install versions up to v6.10.3, Alpine 3.7 installs versions up to v8.9.3, Alpine 3.8 installs versions up to v8.14.0, Alpine 3.9 installs versions up to v10.19.0, Alpine 3.10 installs versions up to v10.24.1, Alpine 3.11 installs versions up to v12.22.6, Alpine 3.12 installs versions up to v12.22.12, Alpine 3.13 & 3.14 install versions up to v14.20.0, Alpine 3.15 & 3.16 install versions up to v16.16.0 (**These are all versions on the main branch**). Alpine 3.5 - 3.12 required the package `python2` to build NodeJS, as they are older versions to build. Alpine 3.13+ requires `python3` to successfully build newer NodeJS versions, but you can use `python2` with Alpine 3.13+ if you need to build versions of node supported in Alpine 3.5 - 3.15, you just need to specify what version of NodeJS you need to install in the package install script._971 91 unmodified lines1063 1064 To change the user directory and/or account name follow the instructions [here](https://support.apple.com/en-us/HT201548)1065 1066 [1]: https://github.com/nvm-sh/nvm.git1067-[2]: https://github.com/nvm-sh/nvm/blob/v0.40.5/install.sh1067+[2]: https://github.com/nvm-sh/nvm/blob/v0.40.6/install.sh1068 [3]: https://github.com/nvm-sh/nvm/actions/workflows/tests-fast.yml1069-[4]: https://github.com/nvm-sh/nvm/releases/tag/v0.40.51069+[4]: https://github.com/nvm-sh/nvm/releases/tag/v0.40.61070 [Urchin]: https://git.sdf.org/tlevine/urchin1071 [Fish]: https://fishshell.com1072 1073 **Homebrew makes zsh directories insecure**49 unmodified lines1123 There's a bug in recent versions of Apple's system `clang` compiler.1124 If one of these broken versions is installed on your system, the above step will likely still succeed even if you didn't include the `--shared-zlib` flag.1125 However, later, when you attempt to `npm install` something using your old version of node.js, you will see `incorrect data check` errors.1126 If you want to avoid the possible hassle of dealing with this, include that flag.1127- For more details, see [this issue](https://github.com/nodejs/node/issues/39313) and [this comment](https://github.com/nodejs/node/issues/39313#issuecomment-90.40.576)1127+ For more details, see [this issue](https://github.com/nodejs/node/issues/39313) and [this comment](https://github.com/nodejs/node/issues/39313#issuecomment-90.40.676)1128 1129 - Exit back to your native shell.1130 1131 ```sh18 unmodified lines1150 1151 If you've encountered this error on WSL-2:1152 1153 ```sh1154- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.5/install.sh | bash1154+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.6/install.sh | bash1155 % Total % Received % Xferd Average Speed Time Time Time Current1156 Dload Upload Total Spent Left Speed1157 0 0 0 0 0 0 0 0 --:--:-- 0:00:09 --:--:-- 0curl: (6) Could not resolve host: raw.githubusercontent.com1158 ```26 unmodified lines1185 Currently, the sole maintainer is [@ljharb](https://github.com/ljharb) - more maintainers are quite welcome, and we hope to add folks to the team over time. [Governance](./GOVERNANCE.md) will be re-evaluated as the project evolves.1186 1187 ## Project Support1188 1189-Only the latest version (v0.40.5 at this time) is supported.1189+Only the latest version (v0.40.6 at this time) is supported.1190 1191 ## Enterprise Support1192 1193 If you are unable to update to the latest version of `nvm`, our [partners](https://openjsf.org/ecosystem-sustainability-program) provide commercial security fixes for all unsupported versions:15 unmodified lines