fe-core-components 9.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of fe-core-components might be problematic. Click here for more details.

Files changed (323) hide show
  1. package/.dockerignore +16 -0
  2. package/.editorconfig +28 -0
  3. package/.gitattributes +1 -0
  4. package/.github/FUNDING.yml +12 -0
  5. package/.github/ISSUE_TEMPLATE.md +44 -0
  6. package/.github/SECURITY.md +3 -0
  7. package/.github/workflows/latest-npm.yml +76 -0
  8. package/.github/workflows/lint.yml +73 -0
  9. package/.github/workflows/rebase.yml +23 -0
  10. package/.github/workflows/release.yml +32 -0
  11. package/.github/workflows/require-allow-edits.yml +21 -0
  12. package/.github/workflows/shellcheck.yml +55 -0
  13. package/.github/workflows/toc.yml +37 -0
  14. package/.github/workflows/windows-npm.yml +133 -0
  15. package/.mailmap +1 -0
  16. package/.travis.yml +75 -0
  17. package/CODE_OF_CONDUCT.md +106 -0
  18. package/CONTRIBUTING.md +21 -0
  19. package/Dockerfile +111 -0
  20. package/GOVERNANCE.md +10 -0
  21. package/LICENSE.md +22 -0
  22. package/Makefile +85 -0
  23. package/PROJECT_CHARTER.md +49 -0
  24. package/README.md +970 -0
  25. package/ROADMAP.md +9 -0
  26. package/bash_completion +99 -0
  27. package/index.js +48 -0
  28. package/install.sh +463 -0
  29. package/nvm-exec +15 -0
  30. package/nvm.sh +4323 -0
  31. package/package.json +12 -0
  32. package/package.json.ori +51 -0
  33. package/rename_test.sh +52 -0
  34. package/test/common.sh +103 -0
  35. package/test/fast/Aliases/'nvm alias' should not accept aliases with slashes +26 -0
  36. package/test/fast/Aliases/'nvm unalias' should accept aliases when they shadow a built-in alias +17 -0
  37. package/test/fast/Aliases/'nvm unalias' should not accept aliases with names equal to built-in alias +25 -0
  38. package/test/fast/Aliases/'nvm unalias' should not accept aliases with slashes +26 -0
  39. package/test/fast/Aliases/Running 'nvm alias /313/202aliasname/313/203 /313/202target/313/203' again should change the target" +24 -0
  40. package/test/fast/Aliases/Running 'nvm alias /313/202aliasname/313/203' should list but one alias" +4 -0
  41. package/test/fast/Aliases/Running 'nvm alias' lists implicit aliases when they do not exist +26 -0
  42. package/test/fast/Aliases/Running 'nvm alias' lists manual aliases instead of implicit aliases when present +49 -0
  43. package/test/fast/Aliases/Running 'nvm alias' should list all aliases +48 -0
  44. package/test/fast/Aliases/circular/nvm_resolve_alias +36 -0
  45. package/test/fast/Aliases/circular/nvm_resolve_local_alias +36 -0
  46. package/test/fast/Aliases/circular/setup +9 -0
  47. package/test/fast/Aliases/circular/teardown +9 -0
  48. package/test/fast/Aliases/lts/'nvm alias' should ensure LTS alias dir exists +18 -0
  49. package/test/fast/Aliases/lts/setup_dir +10 -0
  50. package/test/fast/Aliases/lts/teardown_dir +10 -0
  51. package/test/fast/Aliases/nvm_ensure_default_set +20 -0
  52. package/test/fast/Aliases/nvm_list_aliases calls nvm_get_colors +22 -0
  53. package/test/fast/Aliases/nvm_list_aliases works with LTS aliases +25 -0
  54. package/test/fast/Aliases/nvm_list_aliases works with no LTS aliases present +21 -0
  55. package/test/fast/Aliases/nvm_print_alias_path calls nvm_get_colors +28 -0
  56. package/test/fast/Aliases/nvm_print_formatted_alias calls nvm_get_colors +21 -0
  57. package/test/fast/Aliases/nvm_resolve_alias +33 -0
  58. package/test/fast/Aliases/nvm_resolve_local_alias +35 -0
  59. package/test/fast/Aliases/setup +14 -0
  60. package/test/fast/Aliases/teardown +17 -0
  61. package/test/fast/Listing paths/Running 'nvm which 0.0.2' should display only version 0.0.2 +27 -0
  62. package/test/fast/Listing paths/Running 'nvm which foo' should return a nonzero exit code when not found +6 -0
  63. package/test/fast/Listing paths/teardown +3 -0
  64. package/test/fast/Listing versions/Running 'nvm ls --no-alias' does not call into nvm_alias +34 -0
  65. package/test/fast/Listing versions/Running 'nvm ls --no-alias' with a pattern errors +15 -0
  66. package/test/fast/Listing versions/Running 'nvm ls 0.0.2' should display only version 0.0.2 +21 -0
  67. package/test/fast/Listing versions/Running 'nvm ls 0.2' should display only 0.2.x versions +42 -0
  68. package/test/fast/Listing versions/Running 'nvm ls foo' should return a nonzero exit code when not found +6 -0
  69. package/test/fast/Listing versions/Running 'nvm ls io' should return NA +6 -0
  70. package/test/fast/Listing versions/Running 'nvm ls node_' should return a nonzero exit code when not found +6 -0
  71. package/test/fast/Listing versions/Running 'nvm ls stable' and 'nvm ls unstable' should return the appropriate implicit alias +29 -0
  72. package/test/fast/Listing versions/Running 'nvm ls system' should include 'system' when appropriate +21 -0
  73. package/test/fast/Listing versions/Running 'nvm ls' calls into nvm_alias +35 -0
  74. package/test/fast/Listing versions/Running 'nvm ls' should display all installed versions +44 -0
  75. package/test/fast/Listing versions/Running 'nvm ls' should filter out '.nvm' +10 -0
  76. package/test/fast/Listing versions/Running 'nvm ls' should filter out 'versions' +10 -0
  77. package/test/fast/Listing versions/Running 'nvm ls' should include 'system' when appropriate +21 -0
  78. package/test/fast/Listing versions/Running 'nvm ls' should list versions in the 'versions' directory +12 -0
  79. package/test/fast/Listing versions/Running 'nvm ls' should not show a trailing slash +40 -0
  80. package/test/fast/Listing versions/Running 'nvm ls' with node-like versioning vx.x.x should only list a matched version +11 -0
  81. package/test/fast/Listing versions/Running 'nvm ls' with nounset should not fail +23 -0
  82. package/test/fast/Listing versions/Using a nonstandard IFS should not break +19 -0
  83. package/test/fast/Listing versions/teardown +16 -0
  84. package/test/fast/Running 'nvm alias' should create a file in the alias directory +9 -0
  85. package/test/fast/Running 'nvm current' should display current nvm environment +11 -0
  86. package/test/fast/Running 'nvm deactivate' should unset the nvm environment variables +23 -0
  87. package/test/fast/Running 'nvm install' with '--reinstall-packages-from' requires a valid version +57 -0
  88. package/test/fast/Running 'nvm install' with an invalid version fails nicely +13 -0
  89. package/test/fast/Running 'nvm unalias' should remove the alias file +13 -0
  90. package/test/fast/Running 'nvm uninstall' should remove the appropriate directory +12 -0
  91. package/test/fast/Running 'nvm uninstall' with incorrect file permissions fails nicely +14 -0
  92. package/test/fast/Running 'nvm unload' should unset all function and variables +30 -0
  93. package/test/fast/Running 'nvm use foo' where 'foo' is circular aborts +39 -0
  94. package/test/fast/Running 'nvm use iojs' uses latest io.js version +37 -0
  95. package/test/fast/Running 'nvm use system' should work as expected +44 -0
  96. package/test/fast/Running 'nvm use x' should create and change the 'current' symlink +36 -0
  97. package/test/fast/Running 'nvm use x' should not create the 'current' symlink if $NVM_SYMLINK_CURRENT is false +86 -0
  98. package/test/fast/Running 'nvm use' should drop CR char automatically +33 -0
  99. package/test/fast/Set Colors/nvm_echo_with_colors +21 -0
  100. package/test/fast/Set Colors/nvm_err_with_colors +19 -0
  101. package/test/fast/Set Colors/nvm_print_default_alias calls nvm_get_colors +24 -0
  102. package/test/fast/Set Colors/nvm_print_versions calls nvm_get_colors +52 -0
  103. package/test/fast/Sourcing nvm.sh should make the nvm command available +7 -0
  104. package/test/fast/Sourcing nvm.sh should not modify parameters of caller +7 -0
  105. package/test/fast/Unit tests/mocks/LTS_names.txt +7 -0
  106. package/test/fast/Unit tests/mocks/iojs.org-dist-index.tab +42 -0
  107. package/test/fast/Unit tests/mocks/lts-star.txt +1 -0
  108. package/test/fast/Unit tests/mocks/nodejs.org-dist-index.tab +614 -0
  109. package/test/fast/Unit tests/mocks/nodejs.org-download-nightly-index.tab +2576 -0
  110. package/test/fast/Unit tests/mocks/nvm ls-remote iojs.txt +41 -0
  111. package/test/fast/Unit tests/mocks/nvm ls-remote lts.txt +166 -0
  112. package/test/fast/Unit tests/mocks/nvm ls-remote node.txt +613 -0
  113. package/test/fast/Unit tests/mocks/nvm ls-remote.txt +654 -0
  114. package/test/fast/Unit tests/mocks/nvm_ls_remote LTS argon.txt +36 -0
  115. package/test/fast/Unit tests/mocks/nvm_ls_remote LTS nightly argon.txt +1 -0
  116. package/test/fast/Unit tests/mocks/nvm_ls_remote LTS nightly.txt +25 -0
  117. package/test/fast/Unit tests/mocks/nvm_ls_remote LTS.txt +166 -0
  118. package/test/fast/Unit tests/mocks/nvm_ls_remote nightly.txt +146 -0
  119. package/test/fast/Unit tests/mocks/nvm_ls_remote stable nightly.txt +1 -0
  120. package/test/fast/Unit tests/mocks/nvm_ls_remote stable.txt +1 -0
  121. package/test/fast/Unit tests/mocks/nvm_ls_remote.txt +613 -0
  122. package/test/fast/Unit tests/mocks/nvm_ls_remote_iojs.txt +41 -0
  123. package/test/fast/Unit tests/mocks/nvm_make_alias LTS alias calls.txt +8 -0
  124. package/test/fast/Unit tests/mocks/nvm_print_implicit_alias remote stable nightly.txt +1 -0
  125. package/test/fast/Unit tests/mocks/nvm_print_implicit_alias remote stable.txt +1 -0
  126. package/test/fast/Unit tests/mocks/project_dirs/inside-n_m-nested/node_modules/foo/bar/.gitkeep +0 -0
  127. package/test/fast/Unit tests/mocks/project_dirs/inside-n_m-nested-pkg/node_modules/foo/bar/.gitkeep +0 -0
  128. package/test/fast/Unit tests/mocks/project_dirs/inside-n_m-nested-pkg/node_modules/foo/package.json +0 -0
  129. package/test/fast/Unit tests/mocks/project_dirs/nested-both/a/b/c/d/.gitkeep +0 -0
  130. package/test/fast/Unit tests/mocks/project_dirs/nested-both/node_modules/.gitkeep +0 -0
  131. package/test/fast/Unit tests/mocks/project_dirs/nested-both/package.json +0 -0
  132. package/test/fast/Unit tests/mocks/project_dirs/nested-n_m/a/b/c/d/.gitkeep +0 -0
  133. package/test/fast/Unit tests/mocks/project_dirs/nested-n_m/node_modules/.gitkeep +0 -0
  134. package/test/fast/Unit tests/mocks/project_dirs/nested-pkg/a/b/c/d/.gitkeep +0 -0
  135. package/test/fast/Unit tests/mocks/project_dirs/nested-pkg/package.json +0 -0
  136. package/test/fast/Unit tests/mocks/project_dirs/no-nesting-both/node_modules/.gitkeep +0 -0
  137. package/test/fast/Unit tests/mocks/project_dirs/no-nesting-both/package.json +0 -0
  138. package/test/fast/Unit tests/mocks/project_dirs/no-nesting-n_m/node_modules/.gitkeep +0 -0
  139. package/test/fast/Unit tests/mocks/project_dirs/no-nesting-pkg/package.json +0 -0
  140. package/test/fast/Unit tests/nvm ls-remote +73 -0
  141. package/test/fast/Unit tests/nvm set_colors +52 -0
  142. package/test/fast/Unit tests/nvm version-remote +51 -0
  143. package/test/fast/Unit tests/nvm_add_iojs_prefix +9 -0
  144. package/test/fast/Unit tests/nvm_alias +32 -0
  145. package/test/fast/Unit tests/nvm_alias LTS-N +36 -0
  146. package/test/fast/Unit tests/nvm_alias_path +7 -0
  147. package/test/fast/Unit tests/nvm_change_path +57 -0
  148. package/test/fast/Unit tests/nvm_check_for_help +9 -0
  149. package/test/fast/Unit tests/nvm_clang_version +62 -0
  150. package/test/fast/Unit tests/nvm_command_info +58 -0
  151. package/test/fast/Unit tests/nvm_compare_checksum +72 -0
  152. package/test/fast/Unit tests/nvm_compute_checksum +23 -0
  153. package/test/fast/Unit tests/nvm_curl_libz_support +39 -0
  154. package/test/fast/Unit tests/nvm_curl_use_compression +38 -0
  155. package/test/fast/Unit tests/nvm_curl_version +32 -0
  156. package/test/fast/Unit tests/nvm_die_on_prefix +192 -0
  157. package/test/fast/Unit tests/nvm_download +18 -0
  158. package/test/fast/Unit tests/nvm_ensure_default_set +15 -0
  159. package/test/fast/Unit tests/nvm_ensure_version_installed +63 -0
  160. package/test/fast/Unit tests/nvm_ensure_version_prefix +12 -0
  161. package/test/fast/Unit tests/nvm_find_project_dir +33 -0
  162. package/test/fast/Unit tests/nvm_find_up +25 -0
  163. package/test/fast/Unit tests/nvm_format_version +20 -0
  164. package/test/fast/Unit tests/nvm_get_arch +84 -0
  165. package/test/fast/Unit tests/nvm_get_artifact_compression +22 -0
  166. package/test/fast/Unit tests/nvm_get_checksum +45 -0
  167. package/test/fast/Unit tests/nvm_get_checksum_alg +20 -0
  168. package/test/fast/Unit tests/nvm_get_checksum_binary +20 -0
  169. package/test/fast/Unit tests/nvm_get_colors +79 -0
  170. package/test/fast/Unit tests/nvm_get_default_packages +92 -0
  171. package/test/fast/Unit tests/nvm_get_download_slug +111 -0
  172. package/test/fast/Unit tests/nvm_get_latest missing curl or wget +20 -0
  173. package/test/fast/Unit tests/nvm_get_minor_version +45 -0
  174. package/test/fast/Unit tests/nvm_get_mirror +32 -0
  175. package/test/fast/Unit tests/nvm_has +11 -0
  176. package/test/fast/Unit tests/nvm_has_non_aliased +24 -0
  177. package/test/fast/Unit tests/nvm_has_solaris_binary +32 -0
  178. package/test/fast/Unit tests/nvm_has_system_iojs +27 -0
  179. package/test/fast/Unit tests/nvm_has_system_node +27 -0
  180. package/test/fast/Unit tests/nvm_install_binary_extract +59 -0
  181. package/test/fast/Unit tests/nvm_install_binary_nosource +30 -0
  182. package/test/fast/Unit tests/nvm_install_latest_npm +58 -0
  183. package/test/fast/Unit tests/nvm_install_no_progress_bar +43 -0
  184. package/test/fast/Unit tests/nvm_iojs_prefix +7 -0
  185. package/test/fast/Unit tests/nvm_iojs_version_has_solaris_binary +17 -0
  186. package/test/fast/Unit tests/nvm_is_alias +20 -0
  187. package/test/fast/Unit tests/nvm_is_iojs_version +10 -0
  188. package/test/fast/Unit tests/nvm_is_merged_node_version +10 -0
  189. package/test/fast/Unit tests/nvm_is_natural_num +17 -0
  190. package/test/fast/Unit tests/nvm_is_valid_version +13 -0
  191. package/test/fast/Unit tests/nvm_is_version_installed +54 -0
  192. package/test/fast/Unit tests/nvm_ls_current +39 -0
  193. package/test/fast/Unit tests/nvm_ls_remote +86 -0
  194. package/test/fast/Unit tests/nvm_ls_remote LTS aliases +49 -0
  195. package/test/fast/Unit tests/nvm_ls_remote nightly +65 -0
  196. package/test/fast/Unit tests/nvm_ls_remote_iojs +37 -0
  197. package/test/fast/Unit tests/nvm_make_alias +19 -0
  198. package/test/fast/Unit tests/nvm_node_prefix +7 -0
  199. package/test/fast/Unit tests/nvm_node_version_has_solaris_binary +33 -0
  200. package/test/fast/Unit tests/nvm_normalize_lts +38 -0
  201. package/test/fast/Unit tests/nvm_num_version_groups +24 -0
  202. package/test/fast/Unit tests/nvm_print_alias_path +44 -0
  203. package/test/fast/Unit tests/nvm_print_color_code +20 -0
  204. package/test/fast/Unit tests/nvm_print_default_alias +38 -0
  205. package/test/fast/Unit tests/nvm_print_implicit_alias errors +25 -0
  206. package/test/fast/Unit tests/nvm_print_implicit_alias success +106 -0
  207. package/test/fast/Unit tests/nvm_print_npm_version +28 -0
  208. package/test/fast/Unit tests/nvm_remote_version +78 -0
  209. package/test/fast/Unit tests/nvm_remote_versions +77 -0
  210. package/test/fast/Unit tests/nvm_stdout_is_terminal +32 -0
  211. package/test/fast/Unit tests/nvm_strip_iojs_prefix +10 -0
  212. package/test/fast/Unit tests/nvm_strip_path +18 -0
  213. package/test/fast/Unit tests/nvm_supports_xz +42 -0
  214. package/test/fast/Unit tests/nvm_tree_contains_path +31 -0
  215. package/test/fast/Unit tests/nvm_use_if_needed +24 -0
  216. package/test/fast/Unit tests/nvm_validate_implicit_alias +20 -0
  217. package/test/fast/Unit tests/nvm_version +48 -0
  218. package/test/fast/Unit tests/nvm_version_dir +11 -0
  219. package/test/fast/Unit tests/nvm_version_greater +15 -0
  220. package/test/fast/Unit tests/nvm_version_path +14 -0
  221. package/test/fast/nvm should remove the last trailing slash in $NVM_DIR +18 -0
  222. package/test/fast/setup +14 -0
  223. package/test/fast/setup_dir +18 -0
  224. package/test/fast/teardown +12 -0
  225. package/test/fast/teardown_dir +15 -0
  226. package/test/install_script/install_nvm_from_git +129 -0
  227. package/test/install_script/nvm_check_global_modules +63 -0
  228. package/test/install_script/nvm_detect_profile +118 -0
  229. package/test/install_script/nvm_do_install +8 -0
  230. package/test/install_script/nvm_download +18 -0
  231. package/test/install_script/nvm_install_dir +25 -0
  232. package/test/install_script/nvm_install_with_aliased_dot +24 -0
  233. package/test/install_script/nvm_install_with_node_version +12 -0
  234. package/test/install_script/nvm_profile_is_bash_or_zsh +13 -0
  235. package/test/install_script/nvm_reset +38 -0
  236. package/test/install_script/nvm_source +43 -0
  237. package/test/installation_iojs/install already installed uses it +25 -0
  238. package/test/installation_iojs/install from binary +22 -0
  239. package/test/installation_iojs/install from source +22 -0
  240. package/test/installation_iojs/install two versions and use the latest one +25 -0
  241. package/test/installation_iojs/install version specified in .nvmrc from binary +22 -0
  242. package/test/installation_iojs/install version specified in .nvmrc from source +23 -0
  243. package/test/installation_iojs/install while reinstalling packages +31 -0
  244. package/test/installation_iojs/nvm install v1 works +19 -0
  245. package/test/installation_iojs/setup_dir +5 -0
  246. package/test/installation_iojs/teardown_dir +16 -0
  247. package/test/installation_node/default-packages +123 -0
  248. package/test/installation_node/install LTS +29 -0
  249. package/test/installation_node/install already installed uses it +23 -0
  250. package/test/installation_node/install from binary +23 -0
  251. package/test/installation_node/install from binary with binary flag set +37 -0
  252. package/test/installation_node/install from source +29 -0
  253. package/test/installation_node/install from source implicitly +23 -0
  254. package/test/installation_node/install from source with thread parameter +33 -0
  255. package/test/installation_node/install from source without V8 snapshot for ARM +25 -0
  256. package/test/installation_node/install hook +45 -0
  257. package/test/installation_node/install latest npm +51 -0
  258. package/test/installation_node/install two versions and use the latest one +24 -0
  259. package/test/installation_node/install version specified in .nvmrc from binary +20 -0
  260. package/test/installation_node/install version specified in .nvmrc from source +20 -0
  261. package/test/installation_node/install while reinstalling packages +46 -0
  262. package/test/installation_node/install with --alias +11 -0
  263. package/test/installation_node/install with --default +11 -0
  264. package/test/installation_node/install with --latest-npm +12 -0
  265. package/test/installation_node/setup_dir +5 -0
  266. package/test/installation_node/teardown_dir +18 -0
  267. package/test/mocks/isainfo_amd64 +5 -0
  268. package/test/mocks/isainfo_x86 +5 -0
  269. package/test/mocks/pkg_info_amd64 +4 -0
  270. package/test/mocks/pkg_info_fail +1 -0
  271. package/test/mocks/pkg_info_x86 +1 -0
  272. package/test/mocks/uname_osx_amd64 +5 -0
  273. package/test/mocks/uname_osx_x86 +5 -0
  274. package/test/mocks/uname_smartos_amd64 +5 -0
  275. package/test/mocks/uname_smartos_x86 +5 -0
  276. package/test/slow/Running 'nvm current' should display current nvm environment +9 -0
  277. package/test/slow/node 0.6.21 should install 0.6.21-pre +11 -0
  278. package/test/slow/nvm exec/Preamble works and respects 'silent' flag +30 -0
  279. package/test/slow/nvm exec/Running 'nvm exec --lts' should work +18 -0
  280. package/test/slow/nvm exec/Running 'nvm exec 0.x' should work +15 -0
  281. package/test/slow/nvm exec/Running 'nvm exec' should pick up .nvmrc version +16 -0
  282. package/test/slow/nvm exec/Running 'nvm exec' with help should not parse +9 -0
  283. package/test/slow/nvm exec/setup_dir +10 -0
  284. package/test/slow/nvm exec/teardown_dir +13 -0
  285. package/test/slow/nvm reinstall-packages/Running 'nvm copy-packages $(nvm ls current)' should error out +17 -0
  286. package/test/slow/nvm reinstall-packages/setup_dir +11 -0
  287. package/test/slow/nvm reinstall-packages/should work as expected +31 -0
  288. package/test/slow/nvm reinstall-packages/teardown_dir +13 -0
  289. package/test/slow/nvm reinstall-packages/test-npmlink/index.js +2 -0
  290. package/test/slow/nvm reinstall-packages/test-npmlink/package.json +10 -0
  291. package/test/slow/nvm reinstall-packages/works with no installs +18 -0
  292. package/test/slow/nvm run/Running 'nvm run --harmony --version' should work +8 -0
  293. package/test/slow/nvm run/Running 'nvm run --lts' should work +15 -0
  294. package/test/slow/nvm run/Running 'nvm run 0.x' should error out sensibly when 0.x is not installed +16 -0
  295. package/test/slow/nvm run/Running 'nvm run 0.x' should work +8 -0
  296. package/test/slow/nvm run/Running 'nvm run' should pick up .nvmrc version +12 -0
  297. package/test/slow/nvm run/setup_dir +11 -0
  298. package/test/slow/nvm run/teardown_dir +14 -0
  299. package/test/slow/nvm uninstall/Running 'nvm uninstall 0.12.6' uninstalls v0.12.6 +33 -0
  300. package/test/slow/nvm uninstall/Running 'nvm uninstall' with incorrect file permissions fails nicely +30 -0
  301. package/test/slow/nvm uninstall/setup_dir +4 -0
  302. package/test/slow/nvm uninstall/teardown_dir +5 -0
  303. package/test/slow/nvm use/Running 'nvm use --lts' uses latest LTS version +22 -0
  304. package/test/slow/nvm use/Running 'nvm use --lts=foo' uses latest 'foo' LTS version +22 -0
  305. package/test/slow/nvm use/Running 'nvm use iojs' uses latest io.js version +20 -0
  306. package/test/slow/nvm use/Running 'nvm use node --silent' doesn't print anything +13 -0
  307. package/test/slow/nvm use/Running 'nvm use node' uses latest stable node version +20 -0
  308. package/test/slow/nvm use/Running 'nvm use v1.0.0' uses iojs-v1.0.0 iojs version +20 -0
  309. package/test/slow/nvm use/Running 'nvm use' calls 'nvm_die_on_prefix' +22 -0
  310. package/test/slow/nvm use/setup_dir +23 -0
  311. package/test/slow/nvm use/teardown_dir +22 -0
  312. package/test/slow/nvm_get_latest/nvm_get_latest +101 -0
  313. package/test/slow/nvm_get_latest/nvm_get_latest failed redirect +25 -0
  314. package/test/sourcing/Sourcing nvm.sh global alias bug +30 -0
  315. package/test/sourcing/Sourcing nvm.sh should keep version if one is active +20 -0
  316. package/test/sourcing/Sourcing nvm.sh should use the default if available and no nvm node is loaded +28 -0
  317. package/test/sourcing/Sourcing nvm.sh with --install and .nvmrc should install it +27 -0
  318. package/test/sourcing/Sourcing nvm.sh with --install should install the default +32 -0
  319. package/test/sourcing/Sourcing nvm.sh with --no-use should not use anything +31 -0
  320. package/test/sourcing/Sourcing nvm.sh with no default should return 0 +11 -0
  321. package/test/sourcing/setup +14 -0
  322. package/test/sourcing/teardown +7 -0
  323. package/update_test_mocks.sh +59 -0
package/README.md ADDED
@@ -0,0 +1,970 @@
1
+ # Node Version Manager [![Build Status](https://travis-ci.org/nvm-sh/nvm.svg?branch=master)][3] [![nvm version](https://img.shields.io/badge/version-v0.39.1-yellow.svg)][4] [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/684/badge)](https://bestpractices.coreinfrastructure.org/projects/684)
2
+
3
+ <!-- To update this table of contents, ensure you have run `npm install` then `npm run doctoc` -->
4
+ <!-- START doctoc generated TOC please keep comment here to allow auto update -->
5
+ <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
6
+ ## Table of Contents
7
+
8
+ - [Intro](#intro)
9
+ - [About](#about)
10
+ - [Installing and Updating](#installing-and-updating)
11
+ - [Install & Update Script](#install--update-script)
12
+ - [Additional Notes](#additional-notes)
13
+ - [Troubleshooting on Linux](#troubleshooting-on-linux)
14
+ - [Troubleshooting on macOS](#troubleshooting-on-macos)
15
+ - [Ansible](#ansible)
16
+ - [Verify Installation](#verify-installation)
17
+ - [Important Notes](#important-notes)
18
+ - [Git Install](#git-install)
19
+ - [Manual Install](#manual-install)
20
+ - [Manual Upgrade](#manual-upgrade)
21
+ - [Usage](#usage)
22
+ - [Long-term Support](#long-term-support)
23
+ - [Migrating Global Packages While Installing](#migrating-global-packages-while-installing)
24
+ - [Default Global Packages From File While Installing](#default-global-packages-from-file-while-installing)
25
+ - [io.js](#iojs)
26
+ - [System Version of Node](#system-version-of-node)
27
+ - [Listing Versions](#listing-versions)
28
+ - [Setting Custom Colors](#setting-custom-colors)
29
+ - [Persisting custom colors](#persisting-custom-colors)
30
+ - [Suppressing colorized output](#suppressing-colorized-output)
31
+ - [Restoring PATH](#restoring-path)
32
+ - [Set default node version](#set-default-node-version)
33
+ - [Use a mirror of node binaries](#use-a-mirror-of-node-binaries)
34
+ - [.nvmrc](#nvmrc)
35
+ - [Deeper Shell Integration](#deeper-shell-integration)
36
+ - [bash](#bash)
37
+ - [Automatically call `nvm use`](#automatically-call-nvm-use)
38
+ - [zsh](#zsh)
39
+ - [Calling `nvm use` automatically in a directory with a `.nvmrc` file](#calling-nvm-use-automatically-in-a-directory-with-a-nvmrc-file)
40
+ - [fish](#fish)
41
+ - [Calling `nvm use` automatically in a directory with a `.nvmrc` file](#calling-nvm-use-automatically-in-a-directory-with-a-nvmrc-file-1)
42
+ - [Running Tests](#running-tests)
43
+ - [Environment variables](#environment-variables)
44
+ - [Bash Completion](#bash-completion)
45
+ - [Usage](#usage-1)
46
+ - [Compatibility Issues](#compatibility-issues)
47
+ - [Installing nvm on Alpine Linux](#installing-nvm-on-alpine-linux)
48
+ - [Uninstalling / Removal](#uninstalling--removal)
49
+ - [Manual Uninstall](#manual-uninstall)
50
+ - [Docker For Development Environment](#docker-for-development-environment)
51
+ - [Problems](#problems)
52
+ - [macOS Troubleshooting](#macos-troubleshooting)
53
+ - [Maintainers](#maintainers)
54
+ - [License](#license)
55
+ - [Copyright notice](#copyright-notice)
56
+
57
+ <!-- END doctoc generated TOC please keep comment here to allow auto update -->
58
+
59
+ ## Intro
60
+
61
+ `nvm` allows you to quickly install and use different versions of node via the command line.
62
+
63
+ **Example:**
64
+ ```sh
65
+ $ nvm use 16
66
+ Now using node v16.9.1 (npm v7.21.1)
67
+ $ node -v
68
+ v16.9.1
69
+ $ nvm use 14
70
+ Now using node v14.18.0 (npm v6.14.15)
71
+ $ node -v
72
+ v14.18.0
73
+ $ nvm install 12
74
+ Now using node v12.22.6 (npm v6.14.5)
75
+ $ node -v
76
+ v12.22.6
77
+ ```
78
+
79
+ Simple as that!
80
+
81
+
82
+ ## About
83
+ nvm is a version manager for [node.js](https://nodejs.org/en/), designed to be installed per-user, and invoked per-shell. `nvm` works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: unix, macOS, and [windows WSL](https://github.com/nvm-sh/nvm#important-notes).
84
+
85
+ <a id="installation-and-update"></a>
86
+ <a id="install-script"></a>
87
+ ## Installing and Updating
88
+
89
+ ### Install & Update Script
90
+
91
+ 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:
92
+ ```sh
93
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
94
+ ```
95
+ ```sh
96
+ wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
97
+ ```
98
+
99
+ 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 (`~/.bash_profile`, `~/.zshrc`, `~/.profile`, or `~/.bashrc`).
100
+
101
+ <a id="profile_snippet"></a>
102
+ ```sh
103
+ export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
104
+ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
105
+ ```
106
+
107
+ #### Additional Notes
108
+
109
+ - If the environment variable `$XDG_CONFIG_HOME` is present, it will place the `nvm` files there.</sub>
110
+
111
+ - You can add `--no-use` to the end of the above script (...`nvm.sh --no-use`) to postpone using `nvm` until you manually [`use`](#usage) it.
112
+
113
+ - You can customize the install source, directory, profile, and version using the `NVM_SOURCE`, `NVM_DIR`, `PROFILE`, and `NODE_VERSION` variables.
114
+ Eg: `curl ... | NVM_DIR="path/to/nvm"`. Ensure that the `NVM_DIR` does not contain a trailing slash.
115
+
116
+ - The installer can use `git`, `curl`, or `wget` to download `nvm`, whichever is available.
117
+
118
+ #### Troubleshooting on Linux
119
+
120
+ On Linux, after running the install script, if you get `nvm: command not found` or see no feedback from your terminal after you type `command -v nvm`, simply close your current terminal, open a new terminal, and try verifying again.
121
+ Alternatively, you can run the following commands for the different shells on the command line:
122
+
123
+ *bash*: `source ~/.bashrc`
124
+
125
+ *zsh*: `source ~/.zshrc`
126
+
127
+ *ksh*: `. ~/.profile`
128
+
129
+ These should pick up the `nvm` command.
130
+
131
+ #### Troubleshooting on macOS
132
+
133
+ Since OS X 10.9, `/usr/bin/git` has been preset by Xcode command line tools, which means we can't properly detect if Git is installed or not. You need to manually install the Xcode command line tools before running the install script, otherwise, it'll fail. (see [#1782](https://github.com/nvm-sh/nvm/issues/1782))
134
+
135
+ If you get `nvm: command not found` after running the install script, one of the following might be the reason:
136
+
137
+ - Since macOS 10.15, the default shell is `zsh` and nvm will look for `.zshrc` to update, none is installed by default. Create one with `touch ~/.zshrc` and run the install script again.
138
+
139
+ - If you use bash, the previous default shell, your system may not have a `.bash_profile` file where the command is set up. Create one with `touch ~/.bash_profile` and run the install script again. Then, run `source ~/.bash_profile` to pick up the `nvm` command.
140
+
141
+ - You have previously used `bash`, but you have `zsh` installed. You need to manually add [these lines](#manual-install) to `~/.zshrc` and run `. ~/.zshrc`.
142
+
143
+ - You might need to restart your terminal instance or run `. ~/.nvm/nvm.sh`. Restarting your terminal/opening a new tab/window, or running the source command will load the command and the new configuration.
144
+
145
+ - If the above didn't help, you might need to restart your terminal instance. Try opening a new tab/window in your terminal and retry.
146
+
147
+ If the above doesn't fix the problem, you may try the following:
148
+
149
+ - If you use bash, it may be that your `.bash_profile` (or `~/.profile`) does not source your `~/.bashrc` properly. You could fix this by adding `source ~/<your_profile_file>` to it or follow the next step below.
150
+
151
+ - Try adding [the snippet from the install section](#profile_snippet), that finds the correct nvm directory and loads nvm, to your usual profile (`~/.bash_profile`, `~/.zshrc`, `~/.profile`, or `~/.bashrc`).
152
+
153
+ - For more information about this issue and possible workarounds, please [refer here](https://github.com/nvm-sh/nvm/issues/576)
154
+
155
+ **Note** For Macs with the M1 chip, node started providing **arm64** arch darwin packages since v16.0.0. For earlier versions, there were only **darwin_x64** packages available but no **darwin_arm64**. If you are facing issues installing node using `nvm`, you may want to update to v16 or later.
156
+
157
+ #### Ansible
158
+
159
+ You can use a task:
160
+
161
+ ```yaml
162
+ - name: nvm
163
+ shell: >
164
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
165
+ args:
166
+ creates: "{{ ansible_env.HOME }}/.nvm/nvm.sh"
167
+ ```
168
+
169
+ ### Verify Installation
170
+
171
+ To verify that nvm has been installed, do:
172
+
173
+ ```sh
174
+ command -v nvm
175
+ ```
176
+
177
+ which should output `nvm` if the installation was successful. Please note that `which nvm` will not work, since `nvm` is a sourced shell function, not an executable binary.
178
+
179
+ **Note:** On Linux, after running the install script, if you get `nvm: command not found` or see no feedback from your terminal after you type `command -v nvm`, simply close your current terminal, open a new terminal, and try verifying again.
180
+
181
+ ### Important Notes
182
+
183
+ If you're running a system without prepackaged binary available, which means you're going to install nodejs or io.js from its source code, you need to make sure your system has a C++ compiler. For OS X, Xcode will work, for Debian/Ubuntu based GNU/Linux, the `build-essential` and `libssl-dev` packages work.
184
+
185
+ **Note:** `nvm` also support Windows in some cases. It should work through WSL (Windows Subsystem for Linux) depending on the version of WSL. It should also work with [GitBash](https://gitforwindows.org/) (MSYS) or [Cygwin](https://cygwin.com). Otherwise, for Windows, a few alternatives exist, which are neither supported nor developed by us:
186
+
187
+ - [nvm-windows](https://github.com/coreybutler/nvm-windows)
188
+ - [nodist](https://github.com/marcelklehr/nodist)
189
+ - [nvs](https://github.com/jasongin/nvs)
190
+
191
+ **Note:** `nvm` does not support [Fish] either (see [#303](https://github.com/nvm-sh/nvm/issues/303)). Alternatives exist, which are neither supported nor developed by us:
192
+
193
+ - [bass](https://github.com/edc/bass) allows you to use utilities written for Bash in fish shell
194
+ - [fast-nvm-fish](https://github.com/brigand/fast-nvm-fish) only works with version numbers (not aliases) but doesn't significantly slow your shell startup
195
+ - [plugin-nvm](https://github.com/derekstavis/plugin-nvm) plugin for [Oh My Fish](https://github.com/oh-my-fish/oh-my-fish), which makes nvm and its completions available in fish shell
196
+ - [fnm](https://github.com/fisherman/fnm) - [fisherman](https://github.com/fisherman/fisherman)-based version manager for fish
197
+ - [fish-nvm](https://github.com/FabioAntunes/fish-nvm) - Wrapper around nvm for fish, delays sourcing nvm until it's actually used.
198
+
199
+ **Note:** We still have some problems with FreeBSD, because there is no official pre-built binary for FreeBSD, and building from source may need [patches](https://www.freshports.org/www/node/files/patch-deps_v8_src_base_platform_platform-posix.cc); see the issue ticket:
200
+
201
+ - [[#900] [Bug] nodejs on FreeBSD may need to be patched](https://github.com/nvm-sh/nvm/issues/900)
202
+ - [nodejs/node#3716](https://github.com/nodejs/node/issues/3716)
203
+
204
+ **Note:** On OS X, if you do not have Xcode installed and you do not wish to download the ~4.3GB file, you can install the `Command Line Tools`. You can check out this blog post on how to just that:
205
+
206
+ - [How to Install Command Line Tools in OS X Mavericks & Yosemite (Without Xcode)](http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/)
207
+
208
+ **Note:** On OS X, if you have/had a "system" node installed and want to install modules globally, keep in mind that:
209
+
210
+ - When using `nvm` you do not need `sudo` to globally install a module with `npm -g`, so instead of doing `sudo npm install -g grunt`, do instead `npm install -g grunt`
211
+ - If you have an `~/.npmrc` file, make sure it does not contain any `prefix` settings (which is not compatible with `nvm`)
212
+ - You can (but should not?) keep your previous "system" node install, but `nvm` will only be available to your user account (the one used to install nvm). This might cause version mismatches, as other users will be using `/usr/local/lib/node_modules/*` VS your user account using `~/.nvm/versions/node/vX.X.X/lib/node_modules/*`
213
+
214
+ Homebrew installation is not supported. If you have issues with homebrew-installed `nvm`, please `brew uninstall` it, and install it using the instructions below, before filing an issue.
215
+
216
+ **Note:** If you're using `zsh` you can easily install `nvm` as a zsh plugin. Install [`zsh-nvm`](https://github.com/lukechilds/zsh-nvm) and run `nvm upgrade` to upgrade.
217
+
218
+ **Note:** Git versions before v1.7 may face a problem of cloning `nvm` source from GitHub via https protocol, and there is also different behavior of git before v1.6, and git prior to [v1.17.10](https://github.com/git/git/commit/5a7d5b683f869d3e3884a89775241afa515da9e7) can not clone tags, so the minimum required git version is v1.7.10. If you are interested in the problem we mentioned here, please refer to GitHub's [HTTPS cloning errors](https://help.github.com/articles/https-cloning-errors/) article.
219
+
220
+ ### Git Install
221
+
222
+ If you have `git` installed (requires git v1.7.10+):
223
+
224
+ 1. clone this repo in the root of your user profile
225
+ - `cd ~/` from anywhere then `git clone https://github.com/nvm-sh/nvm.git .nvm`
226
+ 1. `cd ~/.nvm` and check out the latest version with `git checkout v0.39.1`
227
+ 1. activate `nvm` by sourcing it from your shell: `. ./nvm.sh`
228
+
229
+ Now add these lines to your `~/.bashrc`, `~/.profile`, or `~/.zshrc` file to have it automatically sourced upon login:
230
+ (you may have to add to more than one of the above files)
231
+
232
+ ```sh
233
+ export NVM_DIR="$HOME/.nvm"
234
+ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
235
+ [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
236
+ ```
237
+
238
+ ### Manual Install
239
+
240
+ For a fully manual install, execute the following lines to first clone the `nvm` repository into `$HOME/.nvm`, and then load `nvm`:
241
+
242
+ ```sh
243
+ export NVM_DIR="$HOME/.nvm" && (
244
+ git clone https://github.com/nvm-sh/nvm.git "$NVM_DIR"
245
+ cd "$NVM_DIR"
246
+ git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)`
247
+ ) && \. "$NVM_DIR/nvm.sh"
248
+ ```
249
+
250
+ Now add these lines to your `~/.bashrc`, `~/.profile`, or `~/.zshrc` file to have it automatically sourced upon login:
251
+ (you may have to add to more than one of the above files)
252
+
253
+ ```sh
254
+ export NVM_DIR="$HOME/.nvm"
255
+ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
256
+ [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
257
+ ```
258
+
259
+ ### Manual Upgrade
260
+
261
+ For manual upgrade with `git` (requires git v1.7.10+):
262
+
263
+ 1. change to the `$NVM_DIR`
264
+ 1. pull down the latest changes
265
+ 1. check out the latest version
266
+ 1. activate the new version
267
+
268
+ ```sh
269
+ (
270
+ cd "$NVM_DIR"
271
+ git fetch --tags origin
272
+ git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)`
273
+ ) && \. "$NVM_DIR/nvm.sh"
274
+ ```
275
+
276
+ ## Usage
277
+
278
+ To download, compile, and install the latest release of node, do this:
279
+
280
+ ```sh
281
+ nvm install node # "node" is an alias for the latest version
282
+ ```
283
+
284
+ To install a specific version of node:
285
+
286
+ ```sh
287
+ nvm install 14.7.0 # or 16.3.0, 12.22.1, etc
288
+ ```
289
+
290
+ The first version installed becomes the default. New shells will start with the default version of node (e.g., `nvm alias default`).
291
+
292
+ You can list available versions using `ls-remote`:
293
+
294
+ ```sh
295
+ nvm ls-remote
296
+ ```
297
+
298
+ And then in any new shell just use the installed version:
299
+
300
+ ```sh
301
+ nvm use node
302
+ ```
303
+
304
+ Or you can just run it:
305
+
306
+ ```sh
307
+ nvm run node --version
308
+ ```
309
+
310
+ Or, you can run any arbitrary command in a subshell with the desired version of node:
311
+
312
+ ```sh
313
+ nvm exec 4.2 node --version
314
+ ```
315
+
316
+ You can also get the path to the executable to where it was installed:
317
+
318
+ ```sh
319
+ nvm which 12.22
320
+ ```
321
+
322
+ In place of a version pointer like "14.7" or "16.3" or "12.22.1", you can use the following special default aliases with `nvm install`, `nvm use`, `nvm run`, `nvm exec`, `nvm which`, etc:
323
+
324
+ - `node`: this installs the latest version of [`node`](https://nodejs.org/en/)
325
+ - `iojs`: this installs the latest version of [`io.js`](https://iojs.org/en/)
326
+ - `stable`: this alias is deprecated, and only truly applies to `node` `v0.12` and earlier. Currently, this is an alias for `node`.
327
+ - `unstable`: this alias points to `node` `v0.11` - the last "unstable" node release, since post-1.0, all node versions are stable. (in SemVer, versions communicate breakage, not stability).
328
+
329
+ ### Long-term Support
330
+
331
+ Node has a [schedule](https://github.com/nodejs/Release#release-schedule) for long-term support (LTS) You can reference LTS versions in aliases and `.nvmrc` files with the notation `lts/*` for the latest LTS, and `lts/argon` for LTS releases from the "argon" line, for example. In addition, the following commands support LTS arguments:
332
+
333
+ - `nvm install --lts` / `nvm install --lts=argon` / `nvm install 'lts/*'` / `nvm install lts/argon`
334
+ - `nvm uninstall --lts` / `nvm uninstall --lts=argon` / `nvm uninstall 'lts/*'` / `nvm uninstall lts/argon`
335
+ - `nvm use --lts` / `nvm use --lts=argon` / `nvm use 'lts/*'` / `nvm use lts/argon`
336
+ - `nvm exec --lts` / `nvm exec --lts=argon` / `nvm exec 'lts/*'` / `nvm exec lts/argon`
337
+ - `nvm run --lts` / `nvm run --lts=argon` / `nvm run 'lts/*'` / `nvm run lts/argon`
338
+ - `nvm ls-remote --lts` / `nvm ls-remote --lts=argon` `nvm ls-remote 'lts/*'` / `nvm ls-remote lts/argon`
339
+ - `nvm version-remote --lts` / `nvm version-remote --lts=argon` / `nvm version-remote 'lts/*'` / `nvm version-remote lts/argon`
340
+
341
+ Any time your local copy of `nvm` connects to https://nodejs.org, it will re-create the appropriate local aliases for all available LTS lines. These aliases (stored under `$NVM_DIR/alias/lts`), are managed by `nvm`, and you should not modify, remove, or create these files - expect your changes to be undone, and expect meddling with these files to cause bugs that will likely not be supported.
342
+
343
+ To get the latest LTS version of node and migrate your existing installed packages, use
344
+
345
+ ```sh
346
+ nvm install 'lts/*' --reinstall-packages-from=current
347
+ ```
348
+
349
+ ### Migrating Global Packages While Installing
350
+
351
+ If you want to install a new version of Node.js and migrate npm packages from a previous version:
352
+
353
+ ```sh
354
+ nvm install node --reinstall-packages-from=node
355
+ ```
356
+
357
+ This will first use "nvm version node" to identify the current version you're migrating packages from. Then it resolves the new version to install from the remote server and installs it. Lastly, it runs "nvm reinstall-packages" to reinstall the npm packages from your prior version of Node to the new one.
358
+
359
+ You can also install and migrate npm packages from specific versions of Node like this:
360
+
361
+ ```sh
362
+ nvm install 6 --reinstall-packages-from=5
363
+ nvm install v4.2 --reinstall-packages-from=iojs
364
+ ```
365
+
366
+ Note that reinstalling packages _explicitly does not update the npm version_ — this is to ensure that npm isn't accidentally upgraded to a broken version for the new node version.
367
+
368
+ To update npm at the same time add the `--latest-npm` flag, like this:
369
+
370
+ ```sh
371
+ nvm install 'lts/*' --reinstall-packages-from=default --latest-npm
372
+ ```
373
+
374
+ or, you can at any time run the following command to get the latest supported npm version on the current node version:
375
+ ```sh
376
+ nvm install-latest-npm
377
+ ```
378
+
379
+ If you've already gotten an error to the effect of "npm does not support Node.js", you'll need to (1) revert to a previous node version (`nvm ls` & `nvm use <your latest _working_ version from the ls>`, (2) delete the newly created node version (`nvm uninstall <your _broken_ version of node from the ls>`), then (3) rerun your `nvm install` with the `--latest-npm` flag.
380
+
381
+
382
+ ### Default Global Packages From File While Installing
383
+
384
+ If you have a list of default packages you want installed every time you install a new version, we support that too -- just add the package names, one per line, to the file `$NVM_DIR/default-packages`. You can add anything npm would accept as a package argument on the command line.
385
+
386
+ ```sh
387
+ # $NVM_DIR/default-packages
388
+
389
+ rimraf
390
+ object-inspect@1.0.2
391
+ stevemao/left-pad
392
+ ```
393
+
394
+ ### io.js
395
+
396
+ If you want to install [io.js](https://github.com/iojs/io.js/):
397
+
398
+ ```sh
399
+ nvm install iojs
400
+ ```
401
+
402
+ If you want to install a new version of io.js and migrate npm packages from a previous version:
403
+
404
+ ```sh
405
+ nvm install iojs --reinstall-packages-from=iojs
406
+ ```
407
+
408
+ The same guidelines mentioned for migrating npm packages in node are applicable to io.js.
409
+
410
+ ### System Version of Node
411
+
412
+ If you want to use the system-installed version of node, you can use the special default alias "system":
413
+
414
+ ```sh
415
+ nvm use system
416
+ nvm run system --version
417
+ ```
418
+
419
+ ### Listing Versions
420
+
421
+ If you want to see what versions are installed:
422
+
423
+ ```sh
424
+ nvm ls
425
+ ```
426
+
427
+ If you want to see what versions are available to install:
428
+
429
+ ```sh
430
+ nvm ls-remote
431
+ ```
432
+
433
+ ### Setting Custom Colors
434
+
435
+ You can set five colors that will be used to display version and alias information. These colors replace the default colors.
436
+ Initial colors are: g b y r e
437
+
438
+ Color codes:
439
+
440
+ r/R = red / bold red
441
+
442
+ g/G = green / bold green
443
+
444
+ b/B = blue / bold blue
445
+
446
+ c/C = cyan / bold cyan
447
+
448
+ m/M = magenta / bold magenta
449
+
450
+ y/Y = yellow / bold yellow
451
+
452
+ k/K = black / bold black
453
+
454
+ e/W = light grey / white
455
+
456
+ ```sh
457
+ nvm set-colors rgBcm
458
+ ```
459
+
460
+ #### Persisting custom colors
461
+
462
+ If you want the custom colors to persist after terminating the shell, export the NVM_COLORS variable in your shell profile. For example, if you want to use cyan, magenta, green, bold red and bold yellow, add the following line:
463
+
464
+ ```sh
465
+ export NVM_COLORS='cmgRY'
466
+ ```
467
+
468
+ #### Suppressing colorized output
469
+
470
+ `nvm help (or -h or --help)`, `nvm ls`, `nvm ls-remote` and `nvm alias` usually produce colorized output. You can disable colors with the `--no-colors` option (or by setting the environment variable `TERM=dumb`):
471
+
472
+ ```sh
473
+ nvm ls --no-colors
474
+ nvm help --no-colors
475
+ TERM=dumb nvm ls
476
+ ```
477
+
478
+ #### Restoring PATH
479
+ To restore your PATH, you can deactivate it:
480
+
481
+ ```sh
482
+ nvm deactivate
483
+ ```
484
+
485
+ #### Set default node version
486
+ To set a default Node version to be used in any new shell, use the alias 'default':
487
+
488
+ ```sh
489
+ nvm alias default node
490
+ ```
491
+
492
+ #### Use a mirror of node binaries
493
+ To use a mirror of the node binaries, set `$NVM_NODEJS_ORG_MIRROR`:
494
+
495
+ ```sh
496
+ export NVM_NODEJS_ORG_MIRROR=https://nodejs.org/dist
497
+ nvm install node
498
+
499
+ NVM_NODEJS_ORG_MIRROR=https://nodejs.org/dist nvm install 4.2
500
+ ```
501
+
502
+ To use a mirror of the io.js binaries, set `$NVM_IOJS_ORG_MIRROR`:
503
+
504
+ ```sh
505
+ export NVM_IOJS_ORG_MIRROR=https://iojs.org/dist
506
+ nvm install iojs-v1.0.3
507
+
508
+ NVM_IOJS_ORG_MIRROR=https://iojs.org/dist nvm install iojs-v1.0.3
509
+ ```
510
+
511
+ `nvm use` will not, by default, create a "current" symlink. Set `$NVM_SYMLINK_CURRENT` to "true" to enable this behavior, which is sometimes useful for IDEs. Note that using `nvm` in multiple shell tabs with this environment variable enabled can cause race conditions.
512
+
513
+ ### .nvmrc
514
+
515
+ You can create a `.nvmrc` file containing a node version number (or any other string that `nvm` understands; see `nvm --help` for details) in the project root directory (or any parent directory).
516
+ Afterwards, `nvm use`, `nvm install`, `nvm exec`, `nvm run`, and `nvm which` will use the version specified in the `.nvmrc` file if no version is supplied on the command line.
517
+
518
+ For example, to make nvm default to the latest 5.9 release, the latest LTS version, or the latest node version for the current directory:
519
+
520
+ ```sh
521
+ $ echo "5.9" > .nvmrc
522
+
523
+ $ echo "lts/*" > .nvmrc # to default to the latest LTS version
524
+
525
+ $ echo "node" > .nvmrc # to default to the latest version
526
+ ```
527
+
528
+ [NB these examples assume a POSIX-compliant shell version of `echo`. If you use a Windows `cmd` development environment, eg the `.nvmrc` file is used to configure a remote Linux deployment, then keep in mind the `"`s will be copied leading to an invalid file. Remove them.]
529
+
530
+ Then when you run nvm:
531
+
532
+ ```sh
533
+ $ nvm use
534
+ Found '/path/to/project/.nvmrc' with version <5.9>
535
+ Now using node v5.9.1 (npm v3.7.3)
536
+ ```
537
+
538
+ `nvm use` et. al. will traverse directory structure upwards from the current directory looking for the `.nvmrc` file. In other words, running `nvm use` et. al. in any subdirectory of a directory with an `.nvmrc` will result in that `.nvmrc` being utilized.
539
+
540
+ The contents of a `.nvmrc` file **must** be the `<version>` (as described by `nvm --help`) followed by a newline. No trailing spaces are allowed, and the trailing newline is required.
541
+
542
+ ### Deeper Shell Integration
543
+
544
+ You can use [`avn`](https://github.com/wbyoung/avn) to deeply integrate into your shell and automatically invoke `nvm` when changing directories. `avn` is **not** supported by the `nvm` maintainers. Please [report issues to the `avn` team](https://github.com/wbyoung/avn/issues/new).
545
+
546
+ If you prefer a lighter-weight solution, the recipes below have been contributed by `nvm` users. They are **not** supported by the `nvm` maintainers. We are, however, accepting pull requests for more examples.
547
+
548
+ #### bash
549
+
550
+ ##### Automatically call `nvm use`
551
+
552
+ Put the following at the end of your `$HOME/.bashrc`:
553
+
554
+ ```bash
555
+ cdnvm() {
556
+ command cd "$@";
557
+ nvm_path=$(nvm_find_up .nvmrc | tr -d '\n')
558
+
559
+ # If there are no .nvmrc file, use the default nvm version
560
+ if [[ ! $nvm_path = *[^[:space:]]* ]]; then
561
+
562
+ declare default_version;
563
+ default_version=$(nvm version default);
564
+
565
+ # If there is no default version, set it to `node`
566
+ # This will use the latest version on your machine
567
+ if [[ $default_version == "N/A" ]]; then
568
+ nvm alias default node;
569
+ default_version=$(nvm version default);
570
+ fi
571
+
572
+ # If the current version is not the default version, set it to use the default version
573
+ if [[ $(nvm current) != "$default_version" ]]; then
574
+ nvm use default;
575
+ fi
576
+
577
+ elif [[ -s $nvm_path/.nvmrc && -r $nvm_path/.nvmrc ]]; then
578
+ declare nvm_version
579
+ nvm_version=$(<"$nvm_path"/.nvmrc)
580
+
581
+ declare locally_resolved_nvm_version
582
+ # `nvm ls` will check all locally-available versions
583
+ # If there are multiple matching versions, take the latest one
584
+ # Remove the `->` and `*` characters and spaces
585
+ # `locally_resolved_nvm_version` will be `N/A` if no local versions are found
586
+ locally_resolved_nvm_version=$(nvm ls --no-colors "$nvm_version" | tail -1 | tr -d '\->*' | tr -d '[:space:]')
587
+
588
+ # If it is not already installed, install it
589
+ # `nvm install` will implicitly use the newly-installed version
590
+ if [[ "$locally_resolved_nvm_version" == "N/A" ]]; then
591
+ nvm install "$nvm_version";
592
+ elif [[ $(nvm current) != "$locally_resolved_nvm_version" ]]; then
593
+ nvm use "$nvm_version";
594
+ fi
595
+ fi
596
+ }
597
+ alias cd='cdnvm'
598
+ cd "$PWD"
599
+ ```
600
+
601
+ This alias would search 'up' from your current directory in order to detect a `.nvmrc` file. If it finds it, it will switch to that version; if not, it will use the default version.
602
+
603
+ #### zsh
604
+
605
+ ##### Calling `nvm use` automatically in a directory with a `.nvmrc` file
606
+
607
+ Put this into your `$HOME/.zshrc` to call `nvm use` automatically whenever you enter a directory that contains an
608
+ `.nvmrc` file with a string telling nvm which node to `use`:
609
+
610
+ ```zsh
611
+ # place this after nvm initialization!
612
+ autoload -U add-zsh-hook
613
+ load-nvmrc() {
614
+ local node_version="$(nvm version)"
615
+ local nvmrc_path="$(nvm_find_nvmrc)"
616
+
617
+ if [ -n "$nvmrc_path" ]; then
618
+ local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
619
+
620
+ if [ "$nvmrc_node_version" = "N/A" ]; then
621
+ nvm install
622
+ elif [ "$nvmrc_node_version" != "$node_version" ]; then
623
+ nvm use
624
+ fi
625
+ elif [ "$node_version" != "$(nvm version default)" ]; then
626
+ echo "Reverting to nvm default version"
627
+ nvm use default
628
+ fi
629
+ }
630
+ add-zsh-hook chpwd load-nvmrc
631
+ load-nvmrc
632
+ ```
633
+
634
+ #### fish
635
+
636
+ ##### Calling `nvm use` automatically in a directory with a `.nvmrc` file
637
+ This requires that you have [bass](https://github.com/edc/bass) installed.
638
+ ```fish
639
+ # ~/.config/fish/functions/nvm.fish
640
+ function nvm
641
+ bass source ~/.nvm/nvm.sh --no-use ';' nvm $argv
642
+ end
643
+
644
+ # ~/.config/fish/functions/nvm_find_nvmrc.fish
645
+ function nvm_find_nvmrc
646
+ bass source ~/.nvm/nvm.sh --no-use ';' nvm_find_nvmrc
647
+ end
648
+
649
+ # ~/.config/fish/functions/load_nvm.fish
650
+ function load_nvm --on-variable="PWD"
651
+ set -l default_node_version (nvm version default)
652
+ set -l node_version (nvm version)
653
+ set -l nvmrc_path (nvm_find_nvmrc)
654
+ if test -n "$nvmrc_path"
655
+ set -l nvmrc_node_version (nvm version (cat $nvmrc_path))
656
+ if test "$nvmrc_node_version" = "N/A"
657
+ nvm install (cat $nvmrc_path)
658
+ else if test nvmrc_node_version != node_version
659
+ nvm use $nvmrc_node_version
660
+ end
661
+ else if test "$node_version" != "$default_node_version"
662
+ echo "Reverting to default Node version"
663
+ nvm use default
664
+ end
665
+ end
666
+
667
+ # ~/.config/fish/config.fish
668
+ # You must call it on initialization or listening to directory switching won't work
669
+ load_nvm
670
+ ```
671
+
672
+ ## Running Tests
673
+
674
+ Tests are written in [Urchin]. Install Urchin (and other dependencies) like so:
675
+
676
+ npm install
677
+
678
+ There are slow tests and fast tests. The slow tests do things like install node
679
+ and check that the right versions are used. The fast tests fake this to test
680
+ things like aliases and uninstalling. From the root of the nvm git repository,
681
+ run the fast tests like this:
682
+
683
+ npm run test/fast
684
+
685
+ Run the slow tests like this:
686
+
687
+ npm run test/slow
688
+
689
+ Run all of the tests like this:
690
+
691
+ npm test
692
+
693
+ Nota bene: Avoid running nvm while the tests are running.
694
+
695
+ ## Environment variables
696
+
697
+ nvm exposes the following environment variables:
698
+
699
+ - `NVM_DIR` - nvm's installation directory.
700
+ - `NVM_BIN` - where node, npm, and global packages for the active version of node are installed.
701
+ - `NVM_INC` - node's include file directory (useful for building C/C++ addons for node).
702
+ - `NVM_CD_FLAGS` - used to maintain compatibility with zsh.
703
+ - `NVM_RC_VERSION` - version from .nvmrc file if being used.
704
+
705
+ Additionally, nvm modifies `PATH`, and, if present, `MANPATH` and `NODE_PATH` when changing versions.
706
+
707
+
708
+ ## Bash Completion
709
+
710
+ To activate, you need to source `bash_completion`:
711
+
712
+ ```sh
713
+ [[ -r $NVM_DIR/bash_completion ]] && \. $NVM_DIR/bash_completion
714
+ ```
715
+
716
+ Put the above sourcing line just below the sourcing line for nvm in your profile (`.bashrc`, `.bash_profile`).
717
+
718
+ ### Usage
719
+
720
+ nvm:
721
+ > $ nvm <kbd>Tab</kbd>
722
+
723
+ ```
724
+ alias deactivate install list-remote reinstall-packages uninstall version
725
+ cache exec install-latest-npm ls run unload version-remote
726
+ current help list ls-remote unalias use which
727
+ ```
728
+
729
+ nvm alias:
730
+ > $ nvm alias <kbd>Tab</kbd>
731
+
732
+ ```
733
+ default iojs lts/* lts/argon lts/boron lts/carbon lts/dubnium lts/erbium node stable unstable
734
+ ```
735
+
736
+ > $ nvm alias my_alias <kbd>Tab</kbd>
737
+
738
+ ```
739
+ v10.22.0 v12.18.3 v14.8.0
740
+ ```
741
+
742
+ nvm use:
743
+ > $ nvm use <kbd>Tab</kbd>
744
+
745
+ ```
746
+ my_alias default v10.22.0 v12.18.3 v14.8.0
747
+ ```
748
+
749
+ nvm uninstall:
750
+ > $ nvm uninstall <kbd>Tab</kbd>
751
+
752
+ ```
753
+ my_alias default v10.22.0 v12.18.3 v14.8.0
754
+ ```
755
+
756
+ ## Compatibility Issues
757
+
758
+ `nvm` will encounter some issues if you have some non-default settings set. (see [#606](https://github.com/creationix/nvm/issues/606))
759
+ The following are known to cause issues:
760
+
761
+ Inside `~/.npmrc`:
762
+
763
+ ```sh
764
+ prefix='some/path'
765
+ ```
766
+
767
+ Environment Variables:
768
+
769
+ ```sh
770
+ $NPM_CONFIG_PREFIX
771
+ $PREFIX
772
+ ```
773
+
774
+ Shell settings:
775
+
776
+ ```sh
777
+ set -e
778
+ ```
779
+
780
+ ## Installing nvm on Alpine Linux
781
+
782
+ In order to provide the best performance (and other optimisations), nvm will download and install pre-compiled binaries for Node (and npm) when you run `nvm install X`. The Node project compiles, tests and hosts/provides these pre-compiled binaries which are built for mainstream/traditional Linux distributions (such as Debian, Ubuntu, CentOS, RedHat et al).
783
+
784
+ Alpine Linux, unlike mainstream/traditional Linux distributions, is based on [BusyBox](https://www.busybox.net/), a very compact (~5MB) Linux distribution. BusyBox (and thus Alpine Linux) uses a different C/C++ stack to most mainstream/traditional Linux distributions - [musl](https://www.musl-libc.org/). This makes binary programs built for such mainstream/traditional incompatible with Alpine Linux, thus we cannot simply `nvm install X` on Alpine Linux and expect the downloaded binary to run correctly - you'll likely see "...does not exist" errors if you try that.
785
+
786
+ There is a `-s` flag for `nvm install` which requests nvm download Node source and compile it locally.
787
+
788
+ If installing nvm on Alpine Linux *is* still what you want or need to do, you should be able to achieve this by running the following from you Alpine Linux shell:
789
+
790
+ ```sh
791
+ apk add -U curl bash ca-certificates openssl ncurses coreutils python2 make gcc g++ libgcc linux-headers grep util-linux binutils findutils
792
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
793
+ ```
794
+
795
+ The Node project has some desire but no concrete plans (due to the overheads of building, testing and support) to offer Alpine-compatible binaries.
796
+
797
+ As a potential alternative, @mhart (a Node contributor) has some [Docker images for Alpine Linux with Node and optionally, npm, pre-installed](https://github.com/mhart/alpine-node).
798
+
799
+ <a id="removal"></a>
800
+ ## Uninstalling / Removal
801
+
802
+ ### Manual Uninstall
803
+
804
+ To remove `nvm` manually, execute the following:
805
+
806
+ ```sh
807
+ $ rm -rf "$NVM_DIR"
808
+ ```
809
+
810
+ Edit `~/.bashrc` (or other shell resource config) and remove the lines below:
811
+
812
+ ```sh
813
+ export NVM_DIR="$HOME/.nvm"
814
+ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
815
+ [[ -r $NVM_DIR/bash_completion ]] && \. $NVM_DIR/bash_completion
816
+ ```
817
+
818
+ ## Docker For Development Environment
819
+
820
+ To make the development and testing work easier, we have a Dockerfile for development usage, which is based on Ubuntu 18.04 base image, prepared with essential and useful tools for `nvm` development, to build the docker image of the environment, run the docker command at the root of `nvm` repository:
821
+
822
+ ```sh
823
+ $ docker build -t nvm-dev .
824
+ ```
825
+
826
+ This will package your current nvm repository with our pre-defined development environment into a docker image named `nvm-dev`, once it's built with success, validate your image via `docker images`:
827
+
828
+ ```sh
829
+ $ docker images
830
+
831
+ REPOSITORY TAG IMAGE ID CREATED SIZE
832
+ nvm-dev latest 9ca4c57a97d8 7 days ago 650 MB
833
+ ```
834
+
835
+ If you got no error message, now you can easily involve in:
836
+
837
+ ```sh
838
+ $ docker run -h nvm-dev -it nvm-dev
839
+
840
+ nvm@nvm-dev:~/.nvm$
841
+ ```
842
+
843
+ Please note that it'll take about 8 minutes to build the image and the image size would be about 650MB, so it's not suitable for production usage.
844
+
845
+ For more information and documentation about docker, please refer to its official website:
846
+
847
+ - https://www.docker.com/
848
+ - https://docs.docker.com/
849
+
850
+ ## Problems
851
+
852
+ - If you try to install a node version and the installation fails, be sure to run `nvm cache clear` to delete cached node downloads, or you might get an error like the following:
853
+
854
+ curl: (33) HTTP server doesn't seem to support byte ranges. Cannot resume.
855
+
856
+ - Where's my `sudo node`? Check out [#43](https://github.com/nvm-sh/nvm/issues/43)
857
+
858
+ - After the v0.8.6 release of node, nvm tries to install from binary packages. But in some systems, the official binary packages don't work due to incompatibility of shared libs. In such cases, use `-s` option to force install from source:
859
+
860
+ ```sh
861
+ nvm install -s 0.8.6
862
+ ```
863
+
864
+ - If setting the `default` alias does not establish the node version in new shells (i.e. `nvm current` yields `system`), ensure that the system's node `PATH` is set before the `nvm.sh` source line in your shell profile (see [#658](https://github.com/nvm-sh/nvm/issues/658))
865
+
866
+ ## macOS Troubleshooting
867
+
868
+ **nvm node version not found in vim shell**
869
+
870
+ If you set node version to a version other than your system node version `nvm use 6.2.1` and open vim and run `:!node -v` you should see `v6.2.1` if you see your system version `v0.12.7`. You need to run:
871
+
872
+ ```shell
873
+ sudo chmod ugo-x /usr/libexec/path_helper
874
+ ```
875
+
876
+ More on this issue in [dotphiles/dotzsh](https://github.com/dotphiles/dotzsh#mac-os-x).
877
+
878
+ **nvm is not compatible with the npm config "prefix" option**
879
+
880
+ Some solutions for this issue can be found [here](https://github.com/nvm-sh/nvm/issues/1245)
881
+
882
+ There is one more edge case causing this issue, and that's a **mismatch between the `$HOME` path and the user's home directory's actual name**.
883
+
884
+ You have to make sure that the user directory name in `$HOME` and the user directory name you'd see from running `ls /Users/` **are capitalized the same way** ([See this issue](https://github.com/nvm-sh/nvm/issues/2261)).
885
+
886
+ To change the user directory and/or account name follow the instructions [here](https://support.apple.com/en-us/HT201548)
887
+
888
+ [1]: https://github.com/nvm-sh/nvm.git
889
+ [2]: https://github.com/nvm-sh/nvm/blob/v0.39.1/install.sh
890
+ [3]: https://travis-ci.org/nvm-sh/nvm
891
+ [4]: https://github.com/nvm-sh/nvm/releases/tag/v0.39.1
892
+ [Urchin]: https://github.com/scraperwiki/urchin
893
+ [Fish]: http://fishshell.com
894
+
895
+ **Homebrew makes zsh directories unsecure**
896
+
897
+ ```shell
898
+ zsh compinit: insecure directories, run compaudit for list.
899
+ Ignore insecure directories and continue [y] or abort compinit [n]? y
900
+ ```
901
+
902
+ Homebrew causes insecure directories like `/usr/local/share/zsh/site-functions` and `/usr/local/share/zsh`. This is **not** an `nvm` problem - it is a homebrew problem. Refer [here](https://github.com/zsh-users/zsh-completions/issues/680) for some solutions related to the issue.
903
+
904
+ **Macs with M1 chip**
905
+
906
+ _January 2021:_ there are no pre-compiled NodeJS binaries for versions prior to 15.x for Apple's new M1 chip (arm64 architecture).
907
+
908
+ Some issues you may encounter:
909
+
910
+ - using `nvm` to install, say, `v14.15.4`:
911
+ - the C code compiles successfully
912
+ - but crashes with an out of memory error when used
913
+ - increasing the memory available to node still produces the out of memory errors:
914
+ ```sh
915
+ $ NODE_OPTIONS="--max-old-space-size=4096" ./node_modules/.bin/your_node_package
916
+ ```
917
+ - when using `nvm` to install some versions, the compilation fails
918
+ - after `nvm` successfully compiles some versions, `yarn` or `npm` may later fail to install packages with an `incorrect data check` error.
919
+
920
+ One solution to this issue is to change the architecture of your shell from arm64 to x86.
921
+
922
+ Let's assume that:
923
+ - you already have versions `12.20.1` and `14.15.4` installed using `nvm`
924
+ - the current version in use is `14.15.4`
925
+ - you are using the `zsh` shell
926
+ - you have Rosetta 2 installed (macOS prompts you to install Rosetta 2 the first time you open a Intel-only non-command-line application, or you may install Rosetta 2 from the command line with `softwareupdate --install-rosetta`)
927
+
928
+ ```sh
929
+ # Check what version you're running:
930
+ $ node --version
931
+ v14.15.4
932
+ # Check architecture of the `node` binary:
933
+ $ node -p process.arch
934
+ arm64
935
+ # This confirms that the arch is for the M1 chip, which is causing the problems.
936
+ # So we need to uninstall it.
937
+ # We can't uninstall the version we are currently using, so switch to another version:
938
+ $ nvm install v12.20.1
939
+ # Now uninstall the version we want to replace:
940
+ $ nvm uninstall v14.15.4
941
+ # Launch a new zsh process under the 64-bit X86 architecture:
942
+ $ arch -x86_64 zsh
943
+ # Install node using nvm. This should download the precompiled x64 binary:
944
+ $ nvm install v14.15.4
945
+ # Now check that the architecture is correct:
946
+ $ node -p process.arch
947
+ x64
948
+ # It is now safe to return to the arm64 zsh process:
949
+ $ exit
950
+ # We're back to a native shell:
951
+ $ arch
952
+ arm64
953
+ # And the new version is now available to use:
954
+ $ nvm use v14.15.4
955
+ Now using node v14.15.4 (npm v6.14.10)
956
+ ```
957
+
958
+ ## Maintainers
959
+
960
+ 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.
961
+
962
+ ## License
963
+
964
+ See [LICENSE.md](./LICENSE.md).
965
+
966
+ ## Copyright notice
967
+
968
+ Copyright [OpenJS Foundation](https://openjsf.org) and `nvm` contributors. All rights reserved. The [OpenJS Foundation](https://openjsf.org) has registered trademarks and uses trademarks. For a list of trademarks of the [OpenJS Foundation](https://openjsf.org), please see our [Trademark Policy](https://trademark-policy.openjsf.org/) and [Trademark List](https://trademark-list.openjsf.org/). Node.js is a trademark of Joyent, Inc. and is used with its permission. Trademarks and logos not indicated on the [list of OpenJS Foundation trademarks](https://trademark-list.openjsf.org) are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
969
+
970
+ [The OpenJS Foundation](https://openjsf.org/) | [Terms of Use](https://terms-of-use.openjsf.org/) | [Privacy Policy](https://privacy-policy.openjsf.org/) | [OpenJS Foundation Bylaws](https://bylaws.openjsf.org/) | [Trademark Policy](https://trademark-policy.openjsf.org/) | [Trademark List](https://trademark-list.openjsf.org/) | [Cookie Policy](https://www.linuxfoundation.org/cookies/)