Compare commits

...

180 Commits

Author SHA1 Message Date
Jordan Harband
589a9112bd v0.32.1 2016-10-18 13:16:51 -07:00
Jordan Harband
76fe1ab1c6 [Fix] ensure that lts/* points to boron/latest, not argon/earliest.
- update test mocks
 - fix tests for Boron release

Fixes #1268.
2016-10-18 11:33:07 -07:00
sunxiaobo
a338f98a5a accerlate nvm invoke when change directory 2016-10-14 16:31:26 +08:00
Hiro Asari
4b88613508 Consolidate APT packages
Consolidate APT packages definition into one place, so that the folding is displayed correctly.
2016-10-12 13:58:24 -04:00
Atsushi Yamamoto
3342367981 Fix indent at L2672 2016-10-08 18:01:27 -07:00
Jordan Harband
f9e14b7d4d [Fix] nvm uninstall: work around nomatch zsh option.
Fixes #1228.
2016-10-04 01:43:24 -07:00
Jordan Harband
a29d0e49dc [Tests] improve + update test mocks 2016-09-28 22:42:48 -07:00
Peter Dave Hello
702d52f23b update test mocks 2016-09-29 10:27:24 +08:00
Joseph Frazier
7ca1186dbc Fix "Manual upgrade" link in readme 2016-09-27 21:40:36 -04:00
Jordan Harband
160a39c844 [Refactor] fix copy-paste error from 5c68141ede 2016-09-18 19:06:18 -07:00
Jordan Harband
d12ccb130d [Fix] zsh: when warncreateglobal is set, this line warns for some reason. Use env to suppress it.
Fixes #1236.
2016-09-18 13:39:50 -07:00
Jordan Harband
acbdd9a3fa [Fix] Fix trailing whitespace in nvm ls-remote 2016-09-18 12:26:06 -07:00
Jordan Harband
f60edbb6b4 [Tests] update test mocks 2016-09-18 11:58:18 -07:00
Jordan Harband
256e75c789 [Fix] Remove un-local var EXIT_CODE.
Might possibly be a fix to part of #1236
2016-09-18 02:00:32 -07:00
Peter Dave Hello
8b3cf6cbcb add a menu for readme for easier readability 2016-09-18 16:10:21 +08:00
Jordan Harband
5c68141ede [Refactor] nvm ls-remote: make the main ls-remote command call into nvm_remote_versions directly. 2016-09-15 23:52:01 -07:00
Jordan Harband
dc1d3aa943 [Refactor] nvm_install_source, nvm_install_binary, nvm_download_artifact: ensure a version is provided. 2016-09-17 09:24:42 -07:00
Jordan Harband
51b21bcad1 [Refactor] Use ||: and &&: when appropriate 2016-09-16 23:16:58 -07:00
Erez Zukerman
4a7973ea61 Removes fin from the readme
If you go to the [fin repo](https://github.com/fisherman/fin) you'll see that it isn't a node version manager, but simply a plugin manager for Fish. Seems out of scope for the readme, and there are other plugin solutions for fish as well. I suggest removing the reference.
2016-09-13 10:25:17 -04:00
Peter Dave Hello
68761c3200 Manually run git gc after nvm installation, fix #1226 2016-09-17 13:24:04 +08:00
Peter Dave Hello
ef5670fd82 Bump to require git v1.7+ and add docs, fix #1232 2016-09-17 13:23:04 +08:00
b264
9db5c06a63 [Docs] copyedit readme 2016-09-16 16:19:55 -05:00
Jordan Harband
3b5f088e01 [Refactor] nvm_ls_remote_index_tab: clean up to use nvm_get_mirror 2016-09-15 22:45:10 -07:00
Jordan Harband
dca0220275 [Refactor] nvm_install_binary: remove unused nvm_get_mirror call 2016-09-15 21:40:44 -07:00
Jordan Harband
63fe22d635 v0.32.0 2016-09-15 15:02:56 -07:00
Jordan Harband
01695056af [Road Map] update with completed feature 2016-09-15 14:23:30 -07:00
Jordan Harband
25c7260f1e [Tests] improve test matrix 2016-09-04 11:28:35 -07:00
Jordan Harband
ecba036cbf [Tests] show type output for debugging 2015-12-21 23:59:44 -08:00
Jordan Harband
332f413eb3 [New] expand xz support to more versions.
Per https://github.com/nodejs/node/pull/4894#issuecomment-175989848
2016-02-09 11:19:14 -08:00
Jordan Harband
6784767bea Merge pull request #1204 from ljharb/iojs_source
[New] [Refactor] Rewrite installation code path
2016-09-03 01:19:09 -07:00
Jordan Harband
25fa40e7cb v0.31.7 2016-09-02 23:43:04 -07:00
Jordan Harband
6abc36ee4f [Fix] ensure LTS alias dir exists before writing to it.
Fixes #1216
2016-08-29 09:15:57 -07:00
Jordan Harband
68bf93514b [Fix] when originally installed without git, ensure it can be upgraded to use git.
Fixes #1212. Closes #1213.
2016-08-25 00:59:32 -07:00
Jordan Harband
7e18328a88 Merge pull request #1214 from ljharb/shellcheck
[Tests] add `shellcheck`
2016-08-25 01:00:13 -07:00
Jordan Harband
85c5e12710 [Refactor] install.sh: use curlies in a few places. 2016-08-24 00:50:08 -07:00
Jordan Harband
d0180f7eb2 [shellcheck] build from source to get v0.4.4 2016-08-24 00:30:08 -07:00
Jordan Harband
5ba6e748b7 [Tests] run shellcheck in tests. 2016-08-23 23:07:42 -07:00
Jordan Harband
31c68adbcf v0.31.6 2016-08-23 14:36:15 -07:00
Aria Stewart
451b67fe78 Revert %s-formatting for SOURCE_STR when writing to shell profile 2016-08-23 17:32:28 -04:00
Jordan Harband
d179810b25 v0.31.5 2016-08-23 11:12:21 -07:00
Jordan Harband
1ac7e236b1 [New] Add lts/foo support to remote commands.
- `nvm ls-remote`
 - `nvm version-remote`
 - `nvm install`
 - `nvm uninstall`

Document existing support:
 - `nvm use`
 - `nvm exec`
 - `nvm run`

Fixes #1208.
2016-08-23 10:58:00 -07:00
Jordan Harband
681c81ad30 [shellcheck] clean up install.sh 2016-08-23 00:45:38 -07:00
Jordan Harband
2228323c0b [shellcheck] disable intentional violations via comments 2016-08-23 00:31:39 -07:00
Jordan Harband
cbeb654692 [shellcheck] properly quote arguments. 2016-08-23 00:31:36 -07:00
Jordan Harband
24a9c089ff [shellcheck] fix incorrect A && B || C usages. 2016-08-23 00:31:25 -07:00
Jordan Harband
d5f1d4530f [Tests] chmod a-x on io.js source tests, for now.
TODO: fix.
2016-08-21 22:52:54 -07:00
Jordan Harband
bc4639c1c9 [Docs] add a road map. 2016-08-21 12:11:43 -07:00
Jordan Harband
a5d7ff7440 [Tests] explicitly set $CXX and $CC 2016-08-15 14:45:42 -07:00
Jordan Harband
c7515bf108 [Tests] trying an alternative syntax for gcc upgrades 2016-08-15 12:58:51 -07:00
Jordan Harband
f178a09d89 [Tests] update gcc to 4.8 2016-08-15 12:55:49 -07:00
Jordan Harband
54cc3a383e [Tests] set -ex options on more tests 2016-08-14 09:48:25 -07:00
Jordan Harband
d3d768adcd Add nvm_get_mirror 2016-08-10 23:09:54 -07:00
Jordan Harband
9c65197b22 Add nvm_get_checksum_alg 2016-08-09 22:24:09 -07:00
Jordan Harband
bd3ca47714 [Fix] nvm unload: ensure all functions are unset 2016-08-11 10:58:16 -07:00
Jordan Harband
ec4efa3ec7 [Refactor] nvm install: remove unused REINSTALL_PACKAGES_FROM argument to inner installation helpers. 2016-08-11 10:42:32 -07:00
Jordan Harband
08cbcf2254 [Fix] when not using xz on merged node versions, use z to extract, not x 2016-08-10 23:26:29 -07:00
Jordan Harband
4aa6902dbe [Refactor] nvm_install_merged_node_binary: reduce nesting, fix var curlies. 2016-08-10 16:57:03 -07:00
Jordan Harband
0678652bd3 [New] nvm ls/nvm ls-remote/nvm alias: add --no-colors 2016-08-09 14:46:19 -07:00
Jordan Harband
206878460c [Refactor] always shift first argument to nvm 2016-08-09 13:33:43 -07:00
Jordan Harband
79270a579c [Refactor] create nvm_list_aliases 2016-08-06 22:33:37 -07:00
Jordan Harband
b6eb565ea1 [Refactor] nvm alias: reorganize so alias listing is done last 2016-08-08 15:50:05 -07:00
Jordan Harband
091c64c7c5 [Refactor] nvm alias: add in ---based argument support. 2016-08-08 13:37:14 -07:00
Jordan Harband
21b8f556b2 [Refactor] nvm alias: use named vars instead of positional args. 2016-08-08 13:21:42 -07:00
Jordan Harband
a3bc4d3e62 [Refactor] nvm alias: shift out the “alias” 2016-08-08 13:18:53 -07:00
Jordan Harband
150ed490d0 [Refactor] use curlies with variables 2016-08-07 23:31:16 -07:00
Peter Dave Hello
364096a3c3 Add trailing newline char to $SOURCE_STR
Line 302/301 `printf "$SOURCE_STR"` is missing a trailing newline char,
while line 281/282 and 285/286 have their own new line char, so I  just
remove the manually added newline char, and add it to the end of the
variable "$SOURCE_STR", so no more manually newline char needed there.
2016-08-05 15:52:01 +08:00
Peter Dave Hello
88fc93a71b Fix nvm dir path in install script, fix #1189 2016-08-05 15:23:09 +08:00
Jordan Harband
f9f140ec13 [Performance] make auto-using faster.
Per https://github.com/creationix/nvm/issues/539#issuecomment-236830764
2016-08-02 00:59:51 -07:00
Luke Childs
f653bdc606 Print shell version on Travis 2016-07-31 21:14:30 +01:00
Jordan Harband
31e58d1827 v0.31.4 2016-07-29 16:54:13 -07:00
Julien Gilli
a32b914bab Fix nvm on SmartOS setups using 64 bits pkgsrc repository
On SmartOS setups using 64 bits pkgsrc repositories, `nvm_get_arch`
would not handle pkg_info's output properly.

This would result in nvm not being to install any node binary when
running on SmartOS setups using a 64 bits pkgsrc repository.

This change fixes this problem, and fixes the tests suite on similar
setups.
2016-07-29 14:08:31 -07:00
Joe Lencioni
f51b1bf8ae Document required git version
git-describe was taught `--abbrev=0` in 1.5.0:

  https://github.com/git/git/blob/master/Documentation/RelNotes/1.5.0.txt

git-describe was taught `--match` in 1.5.5:

  https://github.com/git/git/blob/master/Documentation/RelNotes/1.5.5.txt

I don't see anything else potentially weird in here, so I think it is
safe to proclaim that the minimum git version required to run these
commands is 1.5.5.

Documenting this minimum version required here should help people debug
possible issues and help maintainers of this project understand the
impacts of modifying these commands in the future.
2016-07-28 10:51:00 -07:00
Jordan Harband
c874a17479 Merge pull request #1179 from lencioni/improve-upgrade-instructions
[Docs] Improve installation and upgrade instructions
2016-07-28 10:41:31 -07:00
Joe Lencioni
6eef4ce4d2 Use NVM_DIR in installation instructions
As suggested by @ljharb, this might be a little cleaner. I'm not
entirely sure, but in any case, it is consistent with the upgrade
instructions, so that is nice.
2016-07-28 10:36:51 -07:00
Joe Lencioni
54476476ab Use subshells for installation and upgrade instructions
I recently upgraded my copy of nvm and I was disappointed to be dropped
in the .nvm directory at the end of it. I also didn't like having to
copy and paste two separate blocks of code into my terminal, because I
missed the second one the first time around and was left in a slightly
confusing state. So, I decided to make this easier by utilizing
subshells and moving all of the instructions into one code block in this
document. I think this will improve people's experience maintaining this
tool.
2016-07-28 10:36:51 -07:00
Joe Lencioni
87a3a4425d Ensure git describe only matches version tags
`git describe` will match the latest tags, regardless of what it looks
like. We can make this a little safer by adding a `--match` flag to
match tags that look like version tags. This allows the maintainers of
this repo to more safely add other types of tags if they so wish,
without causing people to install or upgrade to those versions.
2016-07-28 10:36:51 -07:00
Joe Lencioni
17a3272b8a Ensure git describe gives latest tag
I recently ran the upgrade instructions and I ended up with the version
I was already on. This happened because `git describe` describes a
commit using the most recent tag reachable from it. Since I already had
a tag checked out, it was describing the tag I had already checked out.

Thankfully, `git describe` accepts an optional commit-ish, which it will
use instead of what we have currently checked out. Testing this in my
terminal now gives me the latest tag on origin, which is what I am
interested in when updating to the latest version.

  ~/.nvm ❯❯❯ git describe --abbrev=0 --tags
  v0.30.1
  ~/.nvm ❯❯❯ git describe --abbrev=0 --tags origin
  v0.31.3

I also added it to the manual install instructions for consistency and
extra safety.
2016-07-28 10:36:51 -07:00
Luke Childs
c08010f610 Fix typo in readme 2016-07-28 17:48:23 +01:00
Jordan Harband
2ee8ec886f Merge pull request #1178 from lukechilds/installation-improvements
Installation improvements
2016-07-28 08:49:28 -07:00
Luke Childs
978f7b4435 Only source nvm, not entire profile 2016-07-27 22:44:51 +01:00
Luke Childs
3417e9d9a3 Add message explaining how to use nvm 2016-07-27 22:39:50 +01:00
Luke Childs
eb4de62bc1 Remove incorrect message 2016-07-27 21:43:13 +01:00
Jordan Harband
8a199e00a2 Merge pull request #1173 from wiserweb/master
[Docs] Specify the lines that will be added by the installation script
2016-07-26 08:30:56 -07:00
wiserweb
6ac7ecf7dc Update README.markdown
Specifies the lines that will be added by the installation script.
2016-07-26 02:31:07 -04:00
Luke Childs
a09f225ec7 Update zsh-nvm upgrade command in readme 2016-07-24 21:13:51 +01:00
Jordan Harband
e0e1c0379a Merge pull request #1163 from sebthom/patch-1
[Fix] fix "find: warning: Unix filenames usually don't contain slashes" warning

Fixes #871.
2016-07-20 10:30:47 -07:00
Sebastian Thomschke
f4d57cc17d Fix for #871 find: warning: Unix filenames usually don't contain slashes 2016-07-20 13:31:47 +02:00
Jordan Harband
56417f88f9 v0.31.3 2016-07-20 00:51:48 -07:00
Jordan Harband
dbb65d98c2 Merge pull request #1070 from ljharb/display_lts_remote
[New] Add remote LTS support
2016-07-20 00:22:29 -07:00
Jordan Harband
fb49bf6f70 completion: add LTS aliases. 2016-07-18 23:40:32 -07:00
Jordan Harband
28822ff81e [Docs] update README for LTS. 2016-07-18 23:39:35 -07:00
Jordan Harband
876d117376 [Tests] add nvm run --lts tests. 2016-07-18 00:35:01 -07:00
Jordan Harband
b2c5616d7a [Tests] avoid accidental command execution in test failure message. 2016-07-17 19:54:26 -07:00
Jordan Harband
58a82a1d31 [Tests] add nvm exec --lts tests. 2016-07-17 19:54:10 -07:00
Jordan Harband
ecbd7d4572 [Tests] use -ex option during tests when possible
Relates to #1130
2016-07-10 19:58:32 -07:00
Jordan Harband
186eb8838d [Tests] make “nvm use iojs” test actually test that thing. 2016-07-07 15:38:34 -07:00
Jordan Harband
803adac676 [Fix] ensure proper checking of the “shwordsplit” zsh option. 2016-07-08 02:11:51 -07:00
Jordan Harband
940f850f8d [Tests] clean up some tests 2016-07-07 01:14:37 -07:00
Luke Childs
54d58f88db Link to zsh-nvm in readme 2016-07-09 09:24:01 +01:00
Jordan Harband
78a008c3c7 [Fix] use Solaris-compatible tail options.
Fixes #1148.
2016-07-06 15:31:25 -07:00
Owen Smith
8c8bf1204c [Fix] install should not exit after successful git clone
Fixes #1146 by grouping the commands that handle the error.

I also removed a subshell wrapper from a similar set of lines right
above. It looks to me like that is no longer necessary.
2016-07-05 22:03:52 -07:00
Jordan Harband
f3ce324e22 Merge pull request #1145 from robotlolita/patch-missing-version-error
`nvm install`: Improve error messages for missing versions
2016-07-05 19:10:45 -07:00
Quildreen Motta
730b253174 Updates tests for the new output messages 2016-07-05 21:40:45 -03:00
(Soreλ\a)
0f26656c2c npm -> nvm, and minor formatting issues 2016-07-05 20:34:08 -03:00
(Soreλ\a)
79d62fb16d Improve error messages for missing versions
`nvm use`, `nvm run` and others check if the version is installed before executing Node, but the error message could be clearer on what steps the user has to take to achieve what they want, this makes that clearer.
2016-07-05 19:55:39 -03:00
Mohit Agarwal
322d81d75f use git options instead of cd in install script 2016-07-06 01:26:06 +05:30
Cezar Augusto
70b8c59722 Add info about 'nvm: command not found'. Ref #576 2016-07-04 02:28:05 -03:00
Jordan Harband
42fedf6bc9 [Tests] add some basic nvm use --lts tests 2016-07-03 08:37:03 -07:00
Jordan Harband
4c010f442e [Tests] add tests for auto-creation of LTS aliases on nvm_ls_remote 2016-07-02 21:21:16 -07:00
Jordan Harband
0b40139caa [Tests] set x option in update mock to better locate failures 2016-07-02 18:42:57 -07:00
Jordan Harband
1bcd2f4743 Merge pull request #898 from PeterDaveHello/patch-1
[refactor] use "case" instead of if/else in install
2016-07-02 13:02:24 -07:00
Peter Dave Hello
d47887ae8f use sh syntax highlight in README.markdown 2016-07-02 14:01:39 +08:00
Peter Dave Hello
07bb79f405 Use case instead of multiple if/else statement. 2016-07-02 14:01:24 +08:00
Peter Dave Hello
9e09c30621 update nodejs version list 2016-07-01 23:39:54 +08:00
Jordan Harband
43c3c23928 [Fix] install script: remove more unnecessary cding.
Fixes #1137.
2016-06-30 13:26:31 -07:00
Jordan Harband
cb4e010de7 [Fix] install script: Don’t attempt to cd twice.
Fixes #1137.
2016-06-30 13:04:45 -07:00
Xavier Cambar
a24ff3e605 Optionally installs Node.js if a version is provided 2016-06-29 09:57:30 +02:00
Jordan Harband
39c119c5db Merge pull request #566 from xcambar/nvm_install_dir
[install script] Refactors NVM_DIR; adds tests
2016-06-28 23:17:27 -07:00
Xavier Cambar
6cee20a071 testing NVM_DIR 2016-06-28 12:36:08 +02:00
Jordan Harband
c4be39b8be [Fix] remove the need for sed -E
Fixes #1126
2016-06-27 21:50:45 -07:00
Jordan Harband
73aa35f508 [Tests] use $NVM_DIR instead of relative paths 2016-06-26 15:52:26 -07:00
Jordan Harband
f0668fd577 [Tests] nvm alias --lts: add tests 2016-06-26 15:11:37 -07:00
Jordan Harband
655830eb58 [Tests] nvm install --lts: add tests 2016-06-26 13:57:01 -07:00
Jordan Harband
e6606458f7 [Tests] add nvm version-remote unit tests. 2016-06-26 13:01:12 -07:00
Jordan Harband
ce60b6c44a [Tests] update test mocks 2016-06-25 17:03:46 -07:00
Jordan Harband
d2744014df [Tests] add some basic nvm ls-remote unit tests. 2016-06-25 17:00:19 -07:00
Jordan Harband
bcb1f0b1c7 nvm ls-remote: skip io.js lookup when LTS is set. 2016-07-17 10:54:24 -07:00
Jordan Harband
c3b16603c0 nvm uninstall: add --lts support 2016-07-17 20:18:05 -07:00
Jordan Harband
e1fdd316b7 [Refactor] create nvm_grep and remove standalone GREP_OPTIONS line. 2016-06-25 13:27:56 -07:00
Jordan Harband
9f5322ee84 v0.31.2 2016-06-25 09:42:53 -07:00
Jordan Harband
b0244a133b [Fix] nvm ls: avoid use of maxdepth which is not on Solaris/SmartOS
Fixes #1121.
2016-06-24 01:38:27 -07:00
Jordan Harband
fdc08122e3 [Tests] swap order of slow + sourcing tests. 2016-05-08 23:52:51 -07:00
Jordan Harband
62696cb0d6 Partially revert 494aa60bd8 2016-05-08 22:33:39 -07:00
Myles Borins
494aa60bd8 travis: enable trusty beta 2016-09-02 23:43:47 -07:00
Jordan Harband
adb6a187a9 [Tests] try v3.3 instead of v1 in hopes they will compile faster. 2016-09-02 23:43:47 -07:00
Jordan Harband
32a1b4124c Use watch to keepalive stdout while installing. 2016-09-02 23:43:47 -07:00
Jordan Harband
88ce2103f5 Use watch to keepalive stdout while installing. 2016-09-02 23:43:46 -07:00
Jordan Harband
4060de5285 [New] enable io.js and node 4+ source installs.
- consolidate `nvm_install_iojs_source` and `nvm_install_node_source` into `nvm_install_source`
2016-09-02 23:43:46 -07:00
Jordan Harband
715bb59c3b Adapt nvm_install_iojs_source to support specifying make jobs. 2016-09-02 23:43:46 -07:00
Jordan Harband
9b8eab3163 [New] Add nvm install -s iojs support. 2016-09-02 23:43:46 -07:00
Jordan Harband
e546149f7b [New] add nvm cache with “dir” and “clean” commands.
- cache the nvm cache on travis
2016-09-02 23:43:46 -07:00
Jordan Harband
57c2004ab2 [Breaking] adapt nvm_install_node_binary to nvm_install_binary, eg, io.js too.
- `nvm_get_checksum` now accepts 5 args (from 3): flavor (node/iojs), type (binary/source), version, slug, compression (xz/gz)
 - `nvm_install_binary` accepts 3 args (from 2): flavor (node/iojs), kind (std), version
 - remove `nvm_install_iojs_binary`
2016-09-02 23:43:46 -07:00
Jordan Harband
2214cb7ad7 [Breaking] cache previously downloaded artifacts for source installs
- `nvm uninstall` no longer removes source artifacts
2016-09-02 23:43:46 -07:00
Jordan Harband
ba3ad8e460 [Breaking] cache previously downloaded artifacts for binaries
- consolidate `nvm_install_merged_node_binary` with `nvm_install_node_binary`
 - add `nvm_get_download_slug`, `nvm_download_artifact`
 - `nvm uninstall` no longer removes artifacts
2016-09-02 23:43:45 -07:00
Jordan Harband
eba50de75e Add nvm_compare_checksum, nvm_compute_checksum, and nvm_get_checksum 2016-09-02 23:43:45 -07:00
Jordan Harband
c9b7ccdaea Run node and io.js installation test suites separately. 2016-05-08 22:21:33 -07:00
Jordan Harband
d000624489 Merge pull request #1114 from brajpanda/patch-1
[Docs] Slightly elaborated the instruction for manual install
2016-06-19 22:26:58 -07:00
Jordan Harband
36b1ea9236 [Fix] do not print help text on sourcing when an empty .nvmrc file is found.
Fixes #1113.
2016-06-14 09:57:37 -07:00
Jordan Harband
45ae48df2d [Fix] nvm install -s: when “core id” doesn’t appear in /proc/cpuinfo, fall back to counting “processor” lines.
Fixes #1115.
2016-06-13 08:41:17 -07:00
Braj
d50272040d Slightly elaborated the instruction for manual install 2016-06-11 17:56:11 +05:30
ra100
b6481583af On aarch64 use arm64 packages 2016-06-10 08:00:51 +02:00
Jordan Harband
03cf6950ce [shellcheck] remove use of expr 2016-06-06 17:55:06 -07:00
Jordan Harband
20c551c608 Merge pull request #1106 from neilstuartcraig/patch-1
[Docs] Add info WRT installing on Alpine Linux / Busybox
2016-06-03 13:57:50 -07:00
chriskohlbrenner
9327e49ab5 [docs] replace "simple" with "simply", revise to consistent colon usage 2016-06-01 14:20:57 -04:00
Neil Craig
337ddbac16 Lowercase NVM
Lowercase NPM

Ref @mhart

Add information WRT installling on Alpine Linux
2016-06-01 13:35:41 +01:00
Jordan Harband
251a2f3409 [Fix] ensure uname is unaliased.
Closes #1105
2016-05-30 21:50:30 -07:00
Jordan Harband
b227f4dc77 [Docs] add some OS X notes to the README
Update README.markdown
2016-05-25 11:34:54 +02:00
Rudolph Sand
a2111c735e Update README.markdown
Added notes for OS X users regarding globally installed modules.
2016-05-25 11:31:38 +02:00
Stephan DONIN
f62747c29c [Fix] set -u: is variable set test 2016-05-22 15:59:04 +09:00
Dayton
74f9674a5d Update README.markdown with some stylistic changes 2016-05-17 16:49:18 -05:00
Jordan Harband
ccde2898f8 [help] Add nvm ls-remote <version>.
Fixes #1094.
2016-05-13 10:14:12 -05:00
Jordan Harband
6e18d959c7 [shellcheck] clean up unquoted args etc 2016-05-11 15:37:21 -07:00
Jordan Harband
6dd6a0d213 [Fix] dash does not support string substitution :-( 2016-05-10 01:17:31 -07:00
Jordan Harband
36c65d7115 [shellcheck] add spellcheck override comments 2016-05-10 01:11:17 -07:00
Jordan Harband
859be3f6a1 nvm run: add --lts/--lts=argon support 2016-05-04 00:29:37 -07:00
Jordan Harband
45627d0a40 nvm exec: add --lts/--lts=argon support. 2016-05-03 23:18:44 -07:00
Jordan Harband
d1e51f361c nvm use: Add --lts/--lts=argon support 2016-05-01 23:41:39 -07:00
Jordan Harband
bf683272ea nvm alias: colorize LTS aliases. 2016-04-30 12:50:59 -07:00
Jordan Harband
c83664960e Automatically create LTS aliases every time we talk to nodejs.org/dist 2016-04-27 15:20:22 -07:00
Jordan Harband
17c9bef4aa nvm alias: add lts/ support. 2016-04-26 23:07:22 -07:00
Jordan Harband
9bd743e0be nvm install: Add support for --lts and --lts=argon 2016-04-25 00:44:24 -07:00
Jordan Harband
44f4817f7d Prevent attempts to nvm install --lts 2016-04-25 00:44:24 -07:00
Jordan Harband
4699657e98 Add --lts=argon etc, so the LTS line can be targeted. 2016-04-25 00:55:35 -07:00
Jordan Harband
1d908d8256 Add --lts support to nvm version-remote 2016-04-24 16:26:32 -07:00
Jordan Harband
584bdd8ba3 Print the LTS version on all versions with that info, but put the non-latest in gray. 2016-04-24 10:55:30 -07:00
Jordan Harband
ae07c3c345 Add support for nvm ls-remote --lts 2016-04-23 23:47:25 -07:00
Jordan Harband
cb326cb19d For now, keep the grep to do proper filtering 2016-04-22 10:25:47 -07:00
Jordan Harband
01c8b04fd5 Format LTS version when present. 2016-04-18 00:42:56 -07:00
Jordan Harband
865d2fe3d6 Include LTS version in nvm_ls_remote output. 2016-04-17 23:39:27 -07:00
Jordan Harband
9d8841a46c Ensure only the version string is printed out in relevant places. 2016-04-18 01:00:55 -07:00
116 changed files with 3704 additions and 1306 deletions

3
.gitignore vendored
View File

@@ -1,5 +1,5 @@
HEAD
src
.cache
v*
alias
@@ -7,6 +7,7 @@ alias
test/bak
.urchin.log
.urchin_stdout
test/**/test_output
node_modules/
npm-debug.log

View File

@@ -1,42 +1,71 @@
language: generic
sudo: required
addons:
apt_packages:
- zsh
- ksh
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-4.8
- g++-4.8
- zsh
- ksh
cache:
directories:
- $HOME/.stack
- $TRAVIS_BUILD_DIR/.cache
before_install:
- $SHELL --version 2> /dev/null || dpkg -s $SHELL 2> /dev/null || which $SHELL
- curl --version
- wget --version
- if [ -n "${SHELLCHECK-}" ]; then sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 575159689BEFB442 && echo 'deb http://download.fpcomplete.com/ubuntu precise main' | sudo tee /etc/apt/sources.list.d/fpco.list && sudo apt-get update && sudo apt-get install stack bc -y && stack setup && stack install ShellCheck && shellcheck --version ; fi
install:
- (mkdir /tmp/urchin && cd /tmp/urchin && curl -s "$(curl -s https://registry.npmjs.com/urchin | grep -Eo '"tarball":\s*"[^"]+"' | tail -n 1 | awk -F\" '{ print $4 }')" -O && tar -x -f urchin*)
- chmod +x /tmp/urchin/package/urchin
- '[ -z "$WITHOUT_CURL" ] || sudo apt-get remove curl -y'
script:
- export PATH=$(echo $PATH | sed 's/::/:/')
- NVM_DIR=$TRAVIS_BUILD_DIR make TEST_SUITE=$TEST_SUITE URCHIN=/tmp/urchin/package/urchin test-$SHELL
- if [ -n "${SHELLCHECK-}" ]; then shellcheck -s bash nvm.sh && shellcheck -s sh nvm.sh && shellcheck -s dash nvm.sh && shellcheck -s ksh nvm.sh && shellcheck -s bash install.sh ; fi
- if [ -z "${SHELLCHECK-}" ]; then make TEST_SUITE=$TEST_SUITE URCHIN=/tmp/urchin/package/urchin test-$SHELL ; fi
env:
- SHELL=bash TEST_SUITE=install_script
- SHELL=sh TEST_SUITE=fast
- SHELL=dash TEST_SUITE=fast
- SHELL=bash TEST_SUITE=fast
- SHELL=zsh TEST_SUITE=fast
# - SHELL=ksh TEST_SUITE=fast
- SHELL=sh TEST_SUITE=slow
- SHELL=dash TEST_SUITE=slow
- SHELL=bash TEST_SUITE=slow
- SHELL=zsh TEST_SUITE=slow
# - SHELL=ksh TEST_SUITE=slow
- SHELL=sh TEST_SUITE=sourcing
- SHELL=dash TEST_SUITE=sourcing
- SHELL=bash TEST_SUITE=sourcing
- SHELL=zsh TEST_SUITE=sourcing
# - SHELL=ksh TEST_SUITE=sourcing
- SHELL=sh TEST_SUITE=installation
# - SHELL=sh TEST_SUITE=installation WITHOUT_CURL=1
- SHELL=dash TEST_SUITE=installation
# - SHELL=dash TEST_SUITE=installation WITHOUT_CURL=1
- SHELL=bash TEST_SUITE=installation
# - SHELL=bash TEST_SUITE=installation WITHOUT_CURL=1
- SHELL=zsh TEST_SUITE=installation
# - SHELL=zsh TEST_SUITE=installation WITHOUT_CURL=1
# - SHELL=ksh TEST_SUITE=installation
# - SHELL=ksh TEST_SUITE=installation WITHOUT_CURL=1
global:
- CXX=g++-4.8
- CC=gcc-4.8
- PATH=$(echo $PATH | sed 's/::/:/')
- NVM_DIR="${TRAVIS_BUILD_DIR}"
matrix:
- SHELLCHECK=true
- SHELL=bash TEST_SUITE=install_script
- SHELL=sh TEST_SUITE=fast
- SHELL=dash TEST_SUITE=fast
- SHELL=bash TEST_SUITE=fast
- SHELL=zsh TEST_SUITE=fast
# - SHELL=ksh TEST_SUITE=fast
- SHELL=sh TEST_SUITE=sourcing
- SHELL=dash TEST_SUITE=sourcing
- SHELL=bash TEST_SUITE=sourcing
- SHELL=zsh TEST_SUITE=sourcing
# - SHELL=ksh TEST_SUITE=sourcing
- SHELL=sh TEST_SUITE=slow
- SHELL=dash TEST_SUITE=slow
- SHELL=bash TEST_SUITE=slow
- SHELL=zsh TEST_SUITE=slow
# - SHELL=ksh TEST_SUITE=slow
- SHELL=sh TEST_SUITE=installation_node
# - SHELL=sh TEST_SUITE=installation_node WITHOUT_CURL=1
- SHELL=dash TEST_SUITE=installation_node
# - SHELL=dash TEST_SUITE=installation_node WITHOUT_CURL=1
- SHELL=bash TEST_SUITE=installation_node
# - SHELL=bash TEST_SUITE=installation_node WITHOUT_CURL=1
- SHELL=zsh TEST_SUITE=installation_node
# - SHELL=zsh TEST_SUITE=installation_node WITHOUT_CURL=1
# - SHELL=ksh TEST_SUITE=installation_node
# - SHELL=ksh TEST_SUITE=installation_node WITHOUT_CURL=1
- SHELL=sh TEST_SUITE=installation_iojs
# - SHELL=sh TEST_SUITE=installation_iojs WITHOUT_CURL=1
- SHELL=dash TEST_SUITE=installation_iojs
# - SHELL=dash TEST_SUITE=installation_iojs WITHOUT_CURL=1
- SHELL=bash TEST_SUITE=installation_iojs
# - SHELL=bash TEST_SUITE=installation_iojs WITHOUT_CURL=1
- SHELL=zsh TEST_SUITE=installation_iojs
# - SHELL=zsh TEST_SUITE=installation_iojs WITHOUT_CURL=1
# - SHELL=ksh TEST_SUITE=installation_iojs
# - SHELL=ksh TEST_SUITE=installation_iojs WITHOUT_CURL=1

View File

@@ -1,54 +1,103 @@
# Node Version Manager [![Build Status](https://travis-ci.org/creationix/nvm.svg?branch=master)][3]
## Table of Contents
- [Installation](#installation)
- [Install script](#install-script)
- [Verify installation](#verify-installation)
- [Manual install](#manual-install)
- [Manual upgrade](#manual-upgrade)
- [Usage](#usage)
- [Long-term support](#long-term-support)
- [Migrating global packages while installing](#migrating-global-packages-while-installing)
- [io.js](#iojs)
- [System version of node](#system-version-of-node)
- [Listing versions](#listing-versions)
- [.nvmrc](#nvmrc)
- [Deeper Shell Integration](#deeper-shell-integration)
- [License](#license)
- [Running tests](#running-tests)
- [Bash completion](#bash-completion)
- [Usage](#usage-1)
- [Compatibility Issues](#compatibility-issues)
- [Installing nvm on Alpine Linux](#installing-nvm-on-alpine-linux)
- [Problems](#problems)
## Installation
First you'll need to make sure your system has a c++ compiler. For OSX, XCode will work, for Ubuntu, the build-essential and libssl-dev packages work.
First you'll need to make sure your system has a c++ compiler. For OS X, Xcode will work, for Ubuntu, the `build-essential` and `libssl-dev` packages work.
Note: `nvm` does not support Windows (see [#284](https://github.com/creationix/nvm/issues/284)). Two alternatives exist, which are neither supported nor developed by us:
- [nvm-windows](https://github.com/coreybutler/nvm-windows)
- [nodist](https://github.com/marcelklehr/nodist)
Note: `nvm` does not support [Fish] either (see [#303](https://github.com/creationix/nvm/issues/303)). Alternatives exist, which are neither supported nor developed by us:
- [bass](https://github.com/edc/bass) allows to use utilities written for Bash in fish shell
- [bass](https://github.com/edc/bass) allows you to use utilities written for Bash in fish shell
- [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
- [fin](https://github.com/fisherman/fin) is a pure fish node version manager for fish shell
- [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
Note: We still have some problems with FreeBSD, because there is no pre-built binary from official 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:
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:
- [[#900] [Bug] nodejs on FreeBSD need to be patched ](https://github.com/creationix/nvm/issues/900)
- [nodejs/node#3716](https://github.com/nodejs/node/issues/3716)
Note: On OSX, 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:
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:
- [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/)
Homebrew installation is not supported.
Note: On OS X, if you have/had a "system" node installed and want to install modules globally, keep in mind that:
- 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`
- If you have an `~/.npmrc` file, make sure it does not contain any `prefix` settings (which is not compatible with nvm)
- 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/*`
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.
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.
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, so the minimum required git version is v1.7.0 and we recommend v1.7.9.5 as it's the default version of the wildly used Ubuntu 12.04 LTS. 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.
### Install script
To install or update nvm, you can use the [install script][2] using cURL:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
```sh
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
```
or Wget:
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
```sh
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
```
<sub>The script clones the nvm repository to `~/.nvm` and adds the source line to your profile (`~/.bash_profile`, `~/.zshrc`, `~/.profile`, or `~/.bashrc`).</sub>
You can customize the install source, directory and profile using the `NVM_SOURCE`, `NVM_DIR`, and `PROFILE` variables.
Eg: `curl ... | NVM_DIR="path/to/nvm" bash`
```sh
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
```
You can customize the install source, directory, profile, and version using the `NVM_SOURCE`, `NVM_DIR`, `PROFILE`, and `NODE_VERSION` variables.
Eg: `curl ... | NVM_DIR=/usr/local/nvm bash` for a global install.
<sub>*NB. The installer can use `git`, `curl`, or `wget` to download `nvm`, whatever is available.*</sub>
Note: On OSX, if you get `nvm: command not found` after running the install script, your system may not have a [.bash_profile file] where the command is set up. Simple create one with `touch ~/.bash_profile` and run the install script again.
Note: On OS X, if you get `nvm: command not found` after running the install script, your system may not have a [.bash_profile file] where the command is set up. Simply create one with `touch ~/.bash_profile` and run the install script again.
If the above doesn't fix the problem, open your `.bash_profile` and add the following line of code:
`source ~/.bashrc`
- For more information about this issue and possible workarounds, please [refer here](https://github.com/creationix/nvm/issues/576)
### Verify installation
To verify that nvm has been installed, do
To verify that nvm has been installed, do:
command -v nvm
```sh
command -v nvm
```
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.
@@ -56,50 +105,75 @@ which should output 'nvm' if the installation was successful. Please note that `
For manual install create a folder somewhere in your filesystem with the `nvm.sh` file inside it. I put mine in `~/.nvm`.
Or if you have `git` installed, then just clone it, and check out the latest version:
Or if you have `git` installed (requires git v1.7+):
git clone https://github.com/creationix/nvm.git ~/.nvm && cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`
1. clone this repo
1. check out the latest version
1. activate nvm by sourcing it from your shell
To activate nvm, you need to source it from your shell:
. ~/.nvm/nvm.sh
```sh
export NVM_DIR="$HOME/.nvm" && (
git clone https://github.com/creationix/nvm.git "$NVM_DIR"
cd "$NVM_DIR"
git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" origin`
) && . "$NVM_DIR/nvm.sh"
```
Add these lines to your `~/.bashrc`, `~/.profile`, or `~/.zshrc` file to have it automatically sourced upon login:
(you may have to add to more than one of the above files)
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
```sh
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
```
### Manual upgrade
For manual upgrade with `git`, change to the `$NVM_DIR`, pull down the latest changes, and check out the latest version:
For manual upgrade with `git` (requires git v1.7+):
cd "$NVM_DIR" && git fetch origin && git checkout `git describe --abbrev=0 --tags`
1. change to the `$NVM_DIR`
1. pull down the latest changes
1. check out the latest version
1. activate the new version
After upgrading, don't forget to activate the new version:
. "$NVM_DIR/nvm.sh"
```sh
(
cd "$NVM_DIR"
git fetch origin
git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" origin`
) && . "$NVM_DIR/nvm.sh"
```
## Usage
To download, compile, and install the latest v5.0.x release of node, do this:
To download, compile, and install the latest release of node, do this:
nvm install 5.0
```sh
nvm install node
```
And then in any new shell just use the installed version:
nvm use 5.0
```sh
nvm use node
```
Or you can just run it:
nvm run 5.0 --version
```sh
nvm run node --version
```
Or, you can run any arbitrary command in a subshell with the desired version of node:
nvm exec 4.2 node --version
```sh
nvm exec 4.2 node --version
```
You can also get the path to the executable to where it was installed:
nvm which 5.0
```sh
nvm which 5.0
```
In place of a version pointer like "0.10" or "5.0" or "4.2.1", you can use the following special default aliases with `nvm install`, `nvm use`, `nvm run`, `nvm exec`, `nvm which`, etc:
@@ -108,63 +182,101 @@ In place of a version pointer like "0.10" or "5.0" or "4.2.1", you can use the f
- `stable`: this alias is deprecated, and only truly applies to `node` `v0.12` and earlier. Currently, this is an alias for `node`.
- `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).
### Long-term support
Node has a [schedule](https://github.com/nodejs/LTS#lts_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:
- `nvm install --lts` / `nvm install --lts=argon` / `nvm install 'lts/*'` / `nvm install lts/argon`
- `nvm uninstall --lts` / `nvm uninstall --lts=argon` / `nvm uninstall 'lts/*'` / `nvm uninstall lts/argon`
- `nvm use --lts` / `nvm use --lts=argon` / `nvm use 'lts/*'` / `nvm use lts/argon`
- `nvm exec --lts` / `nvm exec --lts=argon` / `nvm exec 'lts/*'` / `nvm exec lts/argon`
- `nvm run --lts` / `nvm run --lts=argon` / `nvm run 'lts/*'` / `nvm run lts/argon`
- `nvm ls-remote --lts` / `nvm ls-remote --lts=argon` `nvm ls-remote 'lts/*'` / `nvm ls-remote lts/argon`
- `nvm version-remote --lts` / `nvm version-remote --lts=argon` / `nvm version-remote 'lts/*'` / `nvm version-remote lts/argon`
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.
### Migrating global packages while installing
If you want to install a new version of Node.js and migrate npm packages from a previous version:
nvm install node --reinstall-packages-from=node
```sh
nvm install node --reinstall-packages-from=node
```
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.
You can also install and migrate npm packages from specific versions of Node like this:
nvm install v5.0 --reinstall-packages-from=4.2
nvm install v4.2 --reinstall-packages-from=iojs
```sh
nvm install 6 --reinstall-packages-from=5
nvm install v4.2 --reinstall-packages-from=iojs
```
### io.js
If you want to install [io.js](https://github.com/iojs/io.js/):
nvm install iojs
```sh
nvm install iojs
```
If you want to install a new version of io.js and migrate npm packages from a previous version:
nvm install iojs --reinstall-packages-from=iojs
```sh
nvm install iojs --reinstall-packages-from=iojs
```
The same guidelines mentioned for migrating npm packages in Node.js are applicable to io.js.
### System version of node
If you want to use the system-installed version of node, you can use the special default alias "system":
nvm use system
nvm run system --version
```sh
nvm use system
nvm run system --version
```
### Listing versions
If you want to see what versions are installed:
nvm ls
```sh
nvm ls
```
If you want to see what versions are available to install:
nvm ls-remote
```sh
nvm ls-remote
```
To restore your PATH, you can deactivate it.
To restore your PATH, you can deactivate it:
nvm deactivate
```sh
nvm deactivate
```
To set a default Node version to be used in any new shell, use the alias 'default':
nvm alias default node
```sh
nvm alias default node
```
To use a mirror of the node binaries, set `$NVM_NODEJS_ORG_MIRROR`:
export NVM_NODEJS_ORG_MIRROR=https://nodejs.org/dist
nvm install node
```sh
export NVM_NODEJS_ORG_MIRROR=https://nodejs.org/dist
nvm install node
NVM_NODEJS_ORG_MIRROR=https://nodejs.org/dist nvm install 4.2
NVM_NODEJS_ORG_MIRROR=https://nodejs.org/dist nvm install 4.2
```
To use a mirror of the iojs binaries, set `$NVM_IOJS_ORG_MIRROR`:
To use a mirror of the io.js binaries, set `$NVM_IOJS_ORG_MIRROR`:
export NVM_IOJS_ORG_MIRROR=https://iojs.org/dist
nvm install iojs-v1.0.3
```sh
export NVM_IOJS_ORG_MIRROR=https://iojs.org/dist
nvm install iojs-v1.0.3
NVM_IOJS_ORG_MIRROR=https://iojs.org/dist nvm install iojs-v1.0.3
NVM_IOJS_ORG_MIRROR=https://iojs.org/dist nvm install iojs-v1.0.3
```
`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.
`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.
### .nvmrc
@@ -173,13 +285,19 @@ You can create a `.nvmrc` file containing version number in the project root dir
For example, to make nvm default to the latest 5.9 release for the current directory:
$ echo "5.9" > .nvmrc
```sh
$ echo "5.9" > .nvmrc
$ echo "lts/*" > .nvmrc # to default to the latest LTS version
```
Then when you run nvm:
$ nvm use
Found '/path/to/project/.nvmrc' with version <5.9>
Now using node v5.9.1 (npm v3.7.3)
```sh
$ nvm use
Found '/path/to/project/.nvmrc' with version <5.9>
Now using node v5.9.1 (npm v3.7.3)
```
### Deeper Shell Integration
@@ -198,9 +316,16 @@ Put this into your `$HOME/.zshrc` to call `nvm use` automatically whenever you e
# place this after nvm initialization!
autoload -U add-zsh-hook
load-nvmrc() {
if [[ -f .nvmrc && -r .nvmrc ]]; then
nvm use
elif [[ $(nvm version) != $(nvm version default) ]]; then
local node_version="$(nvm version)"
local nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
if [ "$nvmrc_node_version" != "N/A" ] && [ "$nvmrc_node_version" != "$node_version" ]; then
nvm use
fi
elif [ "$node_version" != "$(nvm version default)" ]; then
echo "Reverting to nvm default version"
nvm use default
fi
@@ -214,7 +339,7 @@ load-nvmrc
nvm is released under the MIT license.
Copyright (C) 2010-2016 Tim Caswell
Copyright (C) 2010-2016 Tim Caswell and Jordan Harband
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
@@ -230,15 +355,15 @@ Tests are written in [Urchin]. Install Urchin (and other dependencies) like so:
There are slow tests and fast tests. The slow tests do things like install node
and check that the right versions are used. The fast tests fake this to test
things like aliases and uninstalling. From the root of the nvm git repository,
run the fast tests like this.
run the fast tests like this:
npm run test/fast
Run the slow tests like this.
Run the slow tests like this:
npm run test/slow
Run all of the tests like this
Run all of the tests like this:
npm test
@@ -248,20 +373,22 @@ Nota bene: Avoid running nvm while the tests are running.
To activate, you need to source `bash_completion`:
```sh
[[ -r $NVM_DIR/bash_completion ]] && . $NVM_DIR/bash_completion
```
Put the above sourcing line just below the sourcing line for NVM in your profile (`.bashrc`, `.bash_profile`).
Put the above sourcing line just below the sourcing line for nvm in your profile (`.bashrc`, `.bash_profile`).
### Usage
nvm
nvm:
$ nvm [tab][tab]
alias deactivate install ls run unload
clear-cache exec list ls-remote unalias use
current help list-remote reinstall-packages uninstall version
nvm alias
nvm alias:
$ nvm alias [tab][tab]
default
@@ -269,12 +396,12 @@ nvm alias
$ nvm alias my_alias [tab][tab]
v0.6.21 v0.8.26 v0.10.28
nvm use
nvm use:
$ nvm use [tab][tab]
my_alias default v0.6.21 v0.8.26 v0.10.28
nvm uninstall
nvm uninstall:
$ nvm uninstall [tab][tab]
my_alias default v0.6.21 v0.8.26 v0.10.28
@@ -283,20 +410,39 @@ nvm uninstall
`nvm` will encounter some issues if you have some non-default settings set. (see [#606](/../../issues/606))
The following are known to cause issues:
Inside `~/.npmrc`
```
Inside `~/.npmrc`:
```sh
prefix='some/path'
```
Environment Variables:
```
```sh
$NPM_CONFIG_PREFIX
$PREFIX
```
Shell settings:
```
```sh
set -e
```
## Installing nvm on Alpine Linux
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 pre-these compiled binaries which are built for mainstream/traditional Linux distributions (such as Debian, Ubuntu, CentOS, RedHat et al).
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.
There is a `-s` flag for `nvm install` which requests nvm download Node source and compile it locally but currently (May 2016), this is not available for Node versions newer than v0.10 so unless you need an older Node version, this won't help you. Work is in progress on source-builds for newer Node versions but is not yet complete.
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:
```sh
apk add bash
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | /bin/bash
```
The Node project has some desire but no concrete plans (due to the overheads of building, testing and support) to offer Alpine-compatible binaries.
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).
## Problems
If you try to install a node version and the installation fails, be sure to delete the node downloads from src (~/.nvm/src/) or you might get an error when trying to reinstall them again or you might get an error like the following:
@@ -307,9 +453,11 @@ Where's my 'sudo node'? Check out this link:
https://github.com/creationix/nvm/issues/43
On Arch Linux and other systems using python3 by default, before running *install* you need to
On Arch Linux and other systems using python3 by default, before running *install* you need to:
export PYTHON=python2
```sh
export PYTHON=python2
```
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:
@@ -318,7 +466,7 @@ After the v0.8.6 release of node, nvm tries to install from binary packages. But
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/creationix/nvm/issues/658))
[1]: https://github.com/creationix/nvm.git
[2]: https://github.com/creationix/nvm/blob/v0.31.1/install.sh
[2]: https://github.com/creationix/nvm/blob/v0.32.1/install.sh
[3]: https://travis-ci.org/creationix/nvm
[Urchin]: https://github.com/scraperwiki/urchin
[Fish]: http://fishshell.com

9
ROADMAP.md Normal file
View File

@@ -0,0 +1,9 @@
# nvm Road Map
This is a list of the primary features planned for `nvm`:
- [x] Rewriting installation code paths to support installing `io.js` and `node` `v4+` [from source](https://github.com/creationix/nvm/issues/1188).
- This will include [reusing previously downloaded tarballs](https://github.com/creationix/nvm/issues/1193) that match checksums, which is a nice performance and bandwith bonus.
- [ ] Adding opt-in environment variable support to list, download, and install `node` [release candidates](https://github.com/creationix/nvm/issues/779), and [nightly builds](https://github.com/creationix/nvm/issues/1053).
- [ ] [`nvm update`](https://github.com/creationix/nvm/issues/400): the ability to autoupdate `nvm` itself
- [ ] [v1.0.0](https://github.com/creationix/nvm/milestone/1), including updating the [nvm on npm](https://github.com/creationix/nvm/issues/304) to auto-install nvm properly

View File

@@ -57,9 +57,9 @@ __nvm_aliases ()
declare aliases
aliases=""
if [ -d $NVM_DIR/alias ]; then
aliases="`cd $NVM_DIR/alias && command ls`"
aliases="$(cd $NVM_DIR/alias && find $PWD -type f | sed "s:$PWD/::")"
fi
echo "${aliases}"
echo "${aliases} node stable unstable iojs"
}
__nvm_alias ()

View File

@@ -6,12 +6,12 @@ nvm_has() {
type "$1" > /dev/null 2>&1
}
if [ -z "$NVM_DIR" ]; then
NVM_DIR="$HOME/.nvm"
fi
nvm_install_dir() {
echo "${NVM_DIR:-"$HOME/.nvm"}"
}
nvm_latest_version() {
echo "v0.31.1"
echo "v0.32.1"
}
#
@@ -40,9 +40,16 @@ nvm_source() {
echo "$NVM_SOURCE_URL"
}
#
# Node.js version to install
#
nvm_node_version() {
echo "$NODE_VERSION"
}
nvm_download() {
if nvm_has "curl"; then
curl -q $*
curl -q "$@"
elif nvm_has "wget"; then
# Emulate curl with wget
ARGS=$(echo "$*" | command sed -e 's/--progress-bar /--progress=bar /' \
@@ -51,59 +58,113 @@ nvm_download() {
-e 's/-s /-q /' \
-e 's/-o /-O /' \
-e 's/-C - /-c /')
wget $ARGS
# shellcheck disable=SC2086
eval wget $ARGS
fi
}
install_nvm_from_git() {
if [ -d "$NVM_DIR/.git" ]; then
echo "=> nvm is already installed in $NVM_DIR, trying to update using git"
printf "\r=> "
cd "$NVM_DIR" && (command git fetch 2> /dev/null || {
echo >&2 "Failed to update nvm, run 'git fetch' in $NVM_DIR yourself." && exit 1
})
local INSTALL_DIR
INSTALL_DIR="$(nvm_install_dir)"
if [ -d "$INSTALL_DIR/.git" ]; then
echo "=> nvm is already installed in $INSTALL_DIR, trying to update using git"
command printf "\r=> "
command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" fetch 2> /dev/null || {
echo >&2 "Failed to update nvm, run 'git fetch' in $INSTALL_DIR yourself."
exit 1
}
else
# Cloning to $NVM_DIR
echo "=> Downloading nvm from git to '$NVM_DIR'"
printf "\r=> "
mkdir -p "$NVM_DIR"
command git clone "$(nvm_source git)" "$NVM_DIR"
# Cloning to $INSTALL_DIR
echo "=> Downloading nvm from git to '$INSTALL_DIR'"
command printf "\r=> "
mkdir -p "${INSTALL_DIR}"
if [ "$(ls -A "${INSTALL_DIR}")" ]; then
command git init "${INSTALL_DIR}" || {
echo >&2 'Failed to initialize nvm repo. Please report this!'
exit 2
}
command git --git-dir="${INSTALL_DIR}/.git" remote add origin "$(nvm_source)" 2> /dev/null \
|| command git --git-dir="${INSTALL_DIR}/.git" remote set-url origin "$(nvm_source)" || {
echo >&2 'Failed to add remote "origin" (or set the URL). Please report this!'
exit 2
}
command git --git-dir="${INSTALL_DIR}/.git" fetch origin --tags || {
echo >&2 'Failed to fetch origin with tags. Please report this!'
exit 2
}
else
command git clone "$(nvm_source)" "${INSTALL_DIR}" || {
echo >&2 'Failed to clone nvm repo. Please report this!'
exit 2
}
fi
fi
cd "$NVM_DIR" && command git checkout --quiet "$(nvm_latest_version)"
if [ ! -z "$(cd "$NVM_DIR" && git show-ref refs/heads/master)" ]; then
if git branch --quiet 2>/dev/null; then
cd "$NVM_DIR" && command git branch --quiet -D master >/dev/null 2>&1
command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" checkout -f --quiet "$(nvm_latest_version)"
if [ ! -z "$(command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" show-ref refs/heads/master)" ]; then
if command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" branch --quiet 2>/dev/null; then
command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" branch --quiet -D master >/dev/null 2>&1
else
echo >&2 "Your version of git is out of date. Please update it!"
cd "$NVM_DIR" && command git branch -D master >/dev/null 2>&1
command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" branch -D master >/dev/null 2>&1
fi
fi
echo "=> Compressing and cleaning up git repository"
if ! command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" gc --aggressive --prune=now ; then
echo >&2 "Your version of git is out of date. Please update it!"
fi
return
}
#
# Automatically install Node.js
#
nvm_install_node() {
local NODE_VERSION
NODE_VERSION="$(nvm_node_version)"
if [ -z "$NODE_VERSION" ]; then
return 0
fi
echo "=> Installing Node.js version $NODE_VERSION"
nvm install "$NODE_VERSION"
local CURRENT_NVM_NODE
CURRENT_NVM_NODE="$(nvm_version current)"
if [ "$(nvm_version "$NODE_VERSION")" == "$CURRENT_NVM_NODE" ]; then
echo "=> Node.js version $NODE_VERSION has been successfully installed"
else
echo >&2 "Failed to install Node.js $NODE_VERSION"
fi
}
install_nvm_as_script() {
local INSTALL_DIR
INSTALL_DIR="$(nvm_install_dir)"
local NVM_SOURCE_LOCAL
NVM_SOURCE_LOCAL=$(nvm_source script)
local NVM_EXEC_SOURCE
NVM_EXEC_SOURCE=$(nvm_source script-nvm-exec)
# Downloading to $NVM_DIR
mkdir -p "$NVM_DIR"
if [ -f "$NVM_DIR/nvm.sh" ]; then
echo "=> nvm is already installed in $NVM_DIR, trying to update the script"
# Downloading to $INSTALL_DIR
mkdir -p "$INSTALL_DIR"
if [ -f "$INSTALL_DIR/nvm.sh" ]; then
echo "=> nvm is already installed in $INSTALL_DIR, trying to update the script"
else
echo "=> Downloading nvm as script to '$NVM_DIR'"
echo "=> Downloading nvm as script to '$INSTALL_DIR'"
fi
nvm_download -s "$NVM_SOURCE_LOCAL" -o "$NVM_DIR/nvm.sh" || {
nvm_download -s "$NVM_SOURCE_LOCAL" -o "$INSTALL_DIR/nvm.sh" || {
echo >&2 "Failed to download '$NVM_SOURCE_LOCAL'"
return 1
}
nvm_download -s "$NVM_EXEC_SOURCE" -o "$NVM_DIR/nvm-exec" || {
nvm_download -s "$NVM_EXEC_SOURCE" -o "$INSTALL_DIR/nvm-exec" || {
echo >&2 "Failed to download '$NVM_EXEC_SOURCE'"
return 2
}
chmod a+x "$NVM_DIR/nvm-exec" || {
echo >&2 "Failed to mark '$NVM_DIR/nvm-exec' as executable"
chmod a+x "$INSTALL_DIR/nvm-exec" || {
echo >&2 "Failed to mark '$INSTALL_DIR/nvm-exec' as executable"
return 3
}
}
@@ -115,8 +176,8 @@ install_nvm_as_script() {
# Otherwise, an empty string is returned
#
nvm_detect_profile() {
if [ -n "$PROFILE" -a -f "$PROFILE" ]; then
echo "$PROFILE"
if [ -n "${PROFILE}" ] && [ -f "${PROFILE}" ]; then
echo "${PROFILE}"
return
fi
@@ -167,18 +228,18 @@ nvm_check_global_modules() {
local NPM_GLOBAL_MODULES
NPM_GLOBAL_MODULES="$(
npm list -g --depth=0 |
sed '/ npm@/d' |
sed '/ (empty)$/d'
command sed '/ npm@/d' |
command sed '/ (empty)$/d'
)"
local MODULE_COUNT
MODULE_COUNT="$(
printf %s\\n "$NPM_GLOBAL_MODULES" |
sed -ne '1!p' | # Remove the first line
command printf %s\\n "$NPM_GLOBAL_MODULES" |
command sed -ne '1!p' | # Remove the first line
wc -l | tr -d ' ' # Count entries
)"
if [ $MODULE_COUNT -ne 0 ]; then
if [ "${MODULE_COUNT}" != '0' ]; then
cat <<-'END_MESSAGE'
=> You currently have modules installed globally with `npm`. These will no
=> longer be linked to the active version of Node when you install a new node
@@ -186,7 +247,7 @@ nvm_check_global_modules() {
=> override the binaries of modules installed with `nvm`:
END_MESSAGE
printf %s\\n "$NPM_GLOBAL_MODULES"
command printf %s\\n "$NPM_GLOBAL_MODULES"
cat <<-'END_MESSAGE'
=> If you wish to uninstall them at a later point (or re-install them under your
@@ -200,24 +261,24 @@ nvm_check_global_modules() {
}
nvm_do_install() {
if [ -z "$METHOD" ]; then
if [ -z "${METHOD}" ]; then
# Autodetect install method
if nvm_has "git"; then
if nvm_has git; then
install_nvm_from_git
elif nvm_has "nvm_download"; then
elif nvm_has nvm_download; then
install_nvm_as_script
else
echo >&2 "You need git, curl, or wget to install nvm"
echo >&2 'You need git, curl, or wget to install nvm'
exit 1
fi
elif [ "~$METHOD" = "~git" ]; then
if ! nvm_has "git"; then
elif [ "${METHOD}" = 'git' ]; then
if ! nvm_has git; then
echo >&2 "You need git to install nvm"
exit 1
fi
install_nvm_from_git
elif [ "~$METHOD" = "~script" ]; then
if ! nvm_has "nvm_download"; then
elif [ "${METHOD}" = 'script' ]; then
if ! nvm_has nvm_download; then
echo >&2 "You need curl or wget to install nvm"
exit 1
fi
@@ -227,31 +288,40 @@ nvm_do_install() {
echo
local NVM_PROFILE
NVM_PROFILE=$(nvm_detect_profile)
NVM_PROFILE="$(nvm_detect_profile)"
local INSTALL_DIR
INSTALL_DIR="$(nvm_install_dir)"
SOURCE_STR="\nexport NVM_DIR=\"$NVM_DIR\"\n[ -s \"\$NVM_DIR/nvm.sh\" ] && . \"\$NVM_DIR/nvm.sh\" # This loads nvm"
SOURCE_STR="\nexport NVM_DIR=\"$INSTALL_DIR\"\n[ -s \"\$NVM_DIR/nvm.sh\" ] && . \"\$NVM_DIR/nvm.sh\" # This loads nvm\n"
if [ -z "$NVM_PROFILE" ] ; then
echo "=> Profile not found. Tried $NVM_PROFILE (as defined in \$PROFILE), ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile."
if [ -z "${NVM_PROFILE-}" ] ; then
echo "=> Profile not found. Tried ${NVM_PROFILE} (as defined in \$PROFILE), ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile."
echo "=> Create one of them and run this script again"
echo "=> Create it (touch $NVM_PROFILE) and run this script again"
echo "=> Create it (touch ${NVM_PROFILE}) and run this script again"
echo " OR"
echo "=> Append the following lines to the correct file yourself:"
printf "$SOURCE_STR"
echo
command printf "${SOURCE_STR}"
else
if ! command grep -qc '/nvm.sh' "$NVM_PROFILE"; then
echo "=> Appending source string to $NVM_PROFILE"
printf "$SOURCE_STR\n" >> "$NVM_PROFILE"
command printf "$SOURCE_STR" >> "$NVM_PROFILE"
else
echo "=> Source string already in $NVM_PROFILE"
echo "=> Source string already in ${NVM_PROFILE}"
fi
fi
# Source nvm
# shellcheck source=/dev/null
. "${INSTALL_DIR}/nvm.sh"
nvm_check_global_modules
echo "=> Close and reopen your terminal to start using nvm"
nvm_install_node
nvm_reset
echo "=> Close and reopen your terminal to start using nvm or run the following to use it now:"
command printf "$SOURCE_STR"
}
#
@@ -261,7 +331,8 @@ nvm_do_install() {
nvm_reset() {
unset -f nvm_reset nvm_has nvm_latest_version \
nvm_source nvm_download install_nvm_as_script install_nvm_from_git \
nvm_detect_profile nvm_check_global_modules nvm_do_install
nvm_detect_profile nvm_check_global_modules nvm_do_install \
nvm_install_dir nvm_node_version nvm_install_node
}
[ "_$NVM_ENV" = "_testing" ] || nvm_do_install

2081
nvm.sh

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "nvm",
"version": "0.31.1",
"version": "0.32.1",
"description": "Node Version Manager - Simple bash script to manage multiple active node.js versions",
"directories": {
"test": "test"
@@ -10,7 +10,9 @@
"test/fast": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=fast test-$shell",
"test/slow": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=slow test-$shell",
"test/install_script": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=install_script test-$shell",
"test/installation": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=installation test-$shell",
"test/installation": "npm run --silent test/installation/node && npm run --silent test/installation/iojs",
"test/installation/node": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=installation_node test-$shell",
"test/installation/iojs": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=installation_iojs test-$shell",
"test/sourcing": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=sourcing test-$shell"
},
"repository": {

View File

@@ -17,3 +17,61 @@ strip_colors() {
echo "$line" | LC_ALL=C command sed 's/\[[ -?]*[@-~]//g'
done
}
make_echo() {
echo "#!/bin/sh" > "$1"
echo "echo \"${2}\"" > "$1"
chmod a+x "$1"
}
make_fake_node() {
local VERSION
VERSION="${1-}"
[ -n "${VERSION}" ] || return 1
local BIN_PATH
BIN_PATH="$(nvm_version_path "${VERSION}")/bin"
mkdir -p "${BIN_PATH}" || {
echo >&2 'unable to make bin dir'
return 2
}
make_echo "${BIN_PATH}/node" "${VERSION}" || {
echo >&2 'unable to make fake node bin'
return 3
}
}
make_fake_iojs() {
local VERSION
VERSION="${1-}"
[ -n "${VERSION}" ] || return 1
local BIN_PATH
BIN_PATH="$(nvm_version_path "iojs-${VERSION}")/bin"
mkdir -p "${BIN_PATH}" || {
echo >&2 'unable to make bin dir'
return 2
}
make_echo "${BIN_PATH}/node" "${VERSION}" || {
echo >&2 'unable to make fake node bin'
return 3
}
make_echo "${BIN_PATH}/iojs" "${VERSION}" || {
echo >&2 'unable to make fake iojs bin'
return 3
}
}
watch() {
$@ &
local JOB
JOB=$!
while true; do sleep 15; >&2 echo '* ping *'; done &
wait $JOB;
local EXIT_CODE
EXIT_CODE=$?
kill %2;
return $EXIT_CODE
}

View File

@@ -5,18 +5,18 @@
die () { echo $@ ; cleanup ; exit 1; }
cleanup () {
rm -rf ../../../alias/stable
rm -rf ../../../alias/unstable
rm -rf ../../../alias/node
rm -rf ../../../alias/iojs
rm -rf ../../../v0.8.1
rm -rf ../../../v0.9.1
rm -rf ../../../versions/io.js/v0.2.1
rm -rf "$(nvm_alias_path)/stable"
rm -rf "$(nvm_alias_path)/unstable"
rm -rf "$(nvm_alias_path)/node"
rm -rf "$(nvm_alias_path)/iojs"
rm -rf "${NVM_DIR}/v0.8.1"
rm -rf "${NVM_DIR}/v0.9.1"
rm -rf "${NVM_DIR}/versions/io.js/v0.2.1"
}
mkdir ../../../v0.8.1
mkdir ../../../v0.9.1
mkdir -p ../../../versions/io.js/v0.2.1
mkdir "${NVM_DIR}/v0.8.1"
mkdir "${NVM_DIR}/v0.9.1"
mkdir -p "${NVM_DIR}/versions/io.js/v0.2.1"
EXPECTED_STABLE="$(nvm_print_implicit_alias local stable)"
STABLE_VERSION="$(nvm_version "$EXPECTED_STABLE")"

View File

@@ -0,0 +1,16 @@
#!/bin/sh
set -ex
. ../../../../nvm.sh
. ../../../common.sh
LTS_ALIAS_PATH="$(nvm_alias_path)/lts"
die () { echo $@ ; exit 1; }
[ ! -d "${LTS_ALIAS_PATH}" ] || die "'${LTS_ALIAS_PATH}' exists and should not"
nvm alias >/dev/null 2>&1
[ -d "${LTS_ALIAS_PATH}" ] || die "'${LTS_ALIAS_PATH}' does not exist and should"

10
test/fast/Aliases/lts/setup_dir Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
. ../../../../nvm.sh
LTS_ALIAS_PATH="$(nvm_alias_path)/lts"
if [ -d "${LTS_ALIAS_PATH}" ]; then
mv "${LTS_ALIAS_PATH}" "${LTS_ALIAS_PATH}.bak"
rm -rf "${LTS_ALIAS_PATH}"
fi

View File

@@ -0,0 +1,10 @@
#!/bin/sh
. ../../../../nvm.sh
LTS_ALIAS_PATH="$(nvm_alias_path)/lts"
if [ -d "${LTS_ALIAS_PATH}.bak" ]; then
rm -rf "${LTS_ALIAS_PATH}"
mv "${LTS_ALIAS_PATH}.bak" "${LTS_ALIAS_PATH}"
fi

View File

@@ -1,11 +1,11 @@
#!/bin/sh
mkdir -p ../../../v0.0.2
mkdir -p ../../../v0.0.20
mkdir -p ../../../versions/node/v0.12.0
. ../../../nvm.sh
mkdir -p "${NVM_DIR}/v0.0.2"
mkdir -p "${NVM_DIR}/v0.0.20"
mkdir -p "${NVM_DIR}/versions/node/v0.12.0"
die () { echo $@ ; exit 1; }
# The result should contain only the appropriate version numbers.
@@ -24,4 +24,3 @@ nvm which 0.12.0 || die "v0.0.20 not found"
NVM_BIN="$(nvm which 0.12.0)"
[ "_$NVM_BIN" = "_$(nvm_version_path v0.12.0)/bin/node" ] \
|| die "'nvm which 0.12.0' did not contain the correct path: got '$NVM_BIN'"

View File

@@ -1,10 +1,10 @@
#!/bin/sh
mkdir ../../../v0.0.2
mkdir ../../../v0.0.20
. ../../../nvm.sh
mkdir "${NVM_DIR}/v0.0.2"
mkdir "${NVM_DIR}/v0.0.20"
die () { echo $@ ; exit 1; }
# The result should contain only the appropriate version numbers.

View File

@@ -1,11 +1,11 @@
#!/bin/sh
mkdir ../../../v0.1.3
mkdir ../../../v0.2.3
mkdir ../../../v0.20.3
. ../../../nvm.sh
mkdir "${NVM_DIR}/v0.1.3"
mkdir "${NVM_DIR}/v0.2.3"
mkdir "${NVM_DIR}/v0.20.3"
die () { echo $@ ; exit 1; }
# The result should contain only the appropriate version numbers.

View File

@@ -4,8 +4,8 @@
die () { echo $@ ; exit 1; }
mkdir ../../../v0.2.3
mkdir ../../../v0.3.3
mkdir "${NVM_DIR}/v0.2.3"
mkdir "${NVM_DIR}/v0.3.3"
EXPECTED_STABLE="$(nvm_print_implicit_alias local stable)"
STABLE_VERSION="$(nvm_version "$EXPECTED_STABLE")"
@@ -19,7 +19,7 @@ nvm ls stable | \grep "$STABLE_VERSION" >/dev/null \
nvm ls unstable | \grep "$UNSTABLE_VERSION" >/dev/null \
|| die "expected 'nvm ls unstable' to give $UNSTABLE_VERSION, got $(nvm ls unstable)"
mkdir ../../../v0.1.2
mkdir "${NVM_DIR}/v0.1.2"
nvm alias stable 0.1
nvm ls stable | \grep -v "$STABLE_VERSION" >/dev/null \

View File

@@ -4,12 +4,12 @@ die () { echo $@ ; exit 1; }
. ../../../nvm.sh
mkdir -p ../../../v0.0.1
mkdir -p ../../../v0.0.3
mkdir -p ../../../v0.0.9
mkdir -p ../../../v0.3.1
mkdir -p ../../../v0.3.3
mkdir -p ../../../v0.3.9
mkdir -p "${NVM_DIR}/v0.0.1"
mkdir -p "${NVM_DIR}/v0.0.3"
mkdir -p "${NVM_DIR}/v0.0.9"
mkdir -p "${NVM_DIR}/v0.3.1"
mkdir -p "${NVM_DIR}/v0.3.3"
mkdir -p "${NVM_DIR}/v0.3.9"
nvm_has_system_node() { return 0; }
nvm ls system | grep system 2>&1 > /dev/null

View File

@@ -2,16 +2,16 @@
. ../../../nvm.sh
mkdir ../../../v0.0.1
mkdir ../../../v0.0.3
mkdir ../../../v0.0.9
mkdir ../../../v0.3.1
mkdir ../../../v0.3.3
mkdir ../../../v0.3.9
mkdir -p ../../../versions/node/v0.12.87
mkdir -p ../../../versions/node/v0.12.9
mkdir -p ../../../versions/io.js/v0.1.2
mkdir -p ../../../versions/io.js/v0.10.2
mkdir "${NVM_DIR}/v0.0.1"
mkdir "${NVM_DIR}/v0.0.3"
mkdir "${NVM_DIR}/v0.0.9"
mkdir "${NVM_DIR}/v0.3.1"
mkdir "${NVM_DIR}/v0.3.3"
mkdir "${NVM_DIR}/v0.3.9"
mkdir -p "${NVM_DIR}/versions/node/v0.12.87"
mkdir -p "${NVM_DIR}/versions/node/v0.12.9"
mkdir -p "${NVM_DIR}/versions/io.js/v0.1.2"
mkdir -p "${NVM_DIR}/versions/io.js/v0.10.2"
# The result should contain the version numbers.
nvm ls | grep v0.0.1 >/dev/null &&

View File

@@ -1,9 +1,9 @@
#!/bin/sh
mkdir ../../../v0.1.3
mkdir ../../../v0.2.3
. ../../../nvm.sh
mkdir "${NVM_DIR}/v0.1.3"
mkdir "${NVM_DIR}/v0.2.3"
[ -z `nvm ls | grep '^ *\.'` ]
# The result should contain only the appropriate version numbers.

View File

@@ -1,10 +1,10 @@
#!/bin/sh
mkdir ../../../v0.1.3
mkdir ../../../v0.2.3
mkdir -p ../../../versions/node
. ../../../nvm.sh
mkdir "${NVM_DIR}/v0.1.3"
mkdir "${NVM_DIR}/v0.2.3"
mkdir -p "${NVM_DIR}/versions/node"
[ -z "$(nvm ls | \grep 'versions')" ]
# The result should contain only the appropriate version numbers.

View File

@@ -4,12 +4,12 @@ die () { echo $@ ; exit 1; }
. ../../../nvm.sh
mkdir -p ../../../v0.0.1
mkdir -p ../../../v0.0.3
mkdir -p ../../../v0.0.9
mkdir -p ../../../v0.3.1
mkdir -p ../../../v0.3.3
mkdir -p ../../../v0.3.9
mkdir -p "${NVM_DIR}/v0.0.1"
mkdir -p "${NVM_DIR}/v0.0.3"
mkdir -p "${NVM_DIR}/v0.0.9"
mkdir -p "${NVM_DIR}/v0.3.1"
mkdir -p "${NVM_DIR}/v0.3.3"
mkdir -p "${NVM_DIR}/v0.3.9"
nvm_has_system_node() { return 0; }
nvm ls | grep system 2>&1 > /dev/null

View File

@@ -2,10 +2,10 @@
die () { echo $@ ; exit 1; }
mkdir -p ../../../versions/node/v0.12.1
mkdir ../../../v0.1.3
. ../../../nvm.sh
mkdir -p "${NVM_DIR}/versions/node/v0.12.1"
mkdir "${NVM_DIR}/v0.1.3"
nvm ls 0.12 | grep v0.12.1 || die '"nvm ls" did not list a version in the versions/ directory'
nvm ls 0.1 | grep v0.1.3 || die '"nvm ls" did not list a version not in the versions/ directory'

View File

@@ -1,9 +1,9 @@
#!/bin/sh
mkdir ../../../v0.1.2
. ../../../nvm.sh
mkdir "${NVM_DIR}/v0.1.2"
nvm ls v0.1 | grep v0.1.2 &&
nvm ls v0.1.2 | grep v0.1.2 &&
nvm ls v0.1. | grep v0.1.2 &&

View File

@@ -1,5 +1,9 @@
#!/bin/sh
set -ex
. ../../nvm.sh
nvm alias test v0.1.2
[ "$(cat ../../alias/test)" = "v0.1.2" ]
[ "$(cat "$(nvm_alias_path)/test")" = "v0.1.2" ]

View File

@@ -1,5 +1,7 @@
#!/bin/sh
set -ex
die () { echo $@ ; exit 1; }
. ../../nvm.sh
@@ -7,4 +9,3 @@ die () { echo $@ ; exit 1; }
nvm deactivate 2>&1
[ "$(nvm current)" = "system" ] || [ "$(nvm current)" = "none" ] || die '"nvm current" did not report "system" or "none" when deactivated'

View File

@@ -1,5 +1,7 @@
#!/bin/sh
set -ex
mkdir -p ../../v0.2.3
die () { echo $@ ; exit 1; }
@@ -7,6 +9,7 @@ die () { echo $@ ; exit 1; }
[ `expr $PATH : ".*v0.2.3/.*/bin"` = 0 ] || echo "WARNING: Unexpectedly found v0.2.3 already active" >&2
. ../../nvm.sh
nvm use --delete-prefix v0.2.3 || die "Failed to activate v0.2.3"
[ `expr "$PATH" : ".*v0.2.3/.*/bin"` != 0 ] || die "PATH not set up properly"
[ `expr "$NODE_PATH" : ".*v0.2.3/.*/lib/node_modules"` = 0 ] || die "NODE_PATH should not contain (npm root -g)"

View File

@@ -1,31 +1,42 @@
#!/bin/sh
set -ex
die () { echo $@ ; cleanup ; exit 1; }
cleanup () {
rm -rf ../../v0.10.4
rm -rf "${NVM_DIR}/v0.10.4"
}
mkdir ../../v0.10.4
. ../../nvm.sh
mkdir "${NVM_DIR}/v0.10.4"
nvm deactivate >/dev/null 2>&1
set +ex # needed for stderr
INSTALL_ERROR_MSG="$(nvm install v0.10.5 --reinstall-packages-from=0.11 2>&1)"
set -ex
EXPECTED_ERROR_MSG="If --reinstall-packages-from is provided, it must point to an installed version of node."
[ "~$INSTALL_ERROR_MSG" = "~$EXPECTED_ERROR_MSG" ] \
|| die ""nvm install --reinstall-packages-from" should fail when given an uninstalled version: expected '$EXPECTED_ERROR_MSG', got '$INSTALL_ERROR_MSG'"
set +e # TODO: fix
INSTALL_EXIT_CODE="$(nvm install v0.10.5 --reinstall-packages-from=0.11 >/dev/null 2>&1; echo $?)"
[ "~$INSTALL_EXIT_CODE" = "~5" ] \
|| die ""nvm install --reinstall-packages-from" should exit with code 5 when given an uninstalled version, got $INSTALL_EXIT_CODE"
set -e
[ $INSTALL_EXIT_CODE -eq 5 ] \
|| die ""nvm install --reinstall-packages-from" should exit with code 5 when given an uninstalled version, got ${INSTALL_EXIT_CODE}"
set +ex # needed for stderr
INSTALL_ERROR_MSG="$(nvm install v0.10.5 --reinstall-packages-from=0.10.5 2>&1)"
set -ex
EXPECTED_ERROR_MSG="You can't reinstall global packages from the same version of node you're installing."
[ "~$INSTALL_ERROR_MSG" = "~$EXPECTED_ERROR_MSG" ] \
|| die ""nvm install --reinstall-packages-from" should fail when given the same version: expected '$EXPECTED_ERROR_MSG', got '$INSTALL_ERROR_MSG'"
set +e # TODO: fix
INSTALL_EXIT_CODE="$(nvm install v0.10.5 --reinstall-packages-from=0.10.5 >/dev/null 2>&1; echo $?)"
[ "~$INSTALL_EXIT_CODE" = "~4" ] \
set -e
[ $INSTALL_EXIT_CODE -eq 4 ] \
|| die ""nvm install --reinstall-packages-from" should exit with code 4 when given the same version, got $INSTALL_EXIT_CODE"
cleanup

View File

@@ -1,7 +1,13 @@
#!/bin/sh
set -ex
die () { echo $@ ; exit 1; }
. ../../nvm.sh
[ "$(nvm install invalid.invalid 2>&1)" = "Version 'invalid.invalid' not found - try \`nvm ls-remote\` to browse available versions." ] || die "nvm installing an invalid version did not print a nice error message"
set +ex # needed for stderr
OUTPUT="$(nvm install invalid.invalid 2>&1)"
set -ex
EXPECTED_OUTPUT="Version 'invalid.invalid' not found - try \`nvm ls-remote\` to browse available versions."
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "nvm installing an invalid version did not print a nice error message"

View File

@@ -1,6 +1,13 @@
#!/bin/sh
echo v0.1.2 > ../../alias/test
set -ex
ALIAS_PATH="../../alias"
echo v0.1.2 > "${ALIAS_PATH}/test"
. ../../nvm.sh
nvm unalias test
! [ -e ../../alias/test ]
! [ -e "${ALIAS_PATH}/test" ]

View File

@@ -1,5 +1,7 @@
#!/bin/sh
set -ex
cd ../..
mkdir v0.0.1
mkdir src/node-v0.0.1
@@ -7,4 +9,4 @@ mkdir src/node-v0.0.1
. ./nvm.sh
nvm uninstall v0.0.1
[ ! -d 'v0.0.1' ] && [ ! -d 'src/node-v0.0.1' ]
[ ! -d 'v0.0.1' ] && [ ! -d 'src/node-v0.0.1/files' ]

View File

@@ -1,5 +1,7 @@
#!/bin/sh
set -ex
cd ../..
mkdir v0.0.1
mkdir src/node-v0.0.1
@@ -8,7 +10,7 @@ sudo touch v0.0.1/sudo
. ./nvm.sh
RETURN_MESSAGE="$(nvm uninstall v0.0.1 2>&1)"
RETURN_MESSAGE="$(nvm uninstall v0.0.1 2>&1 || echo)"
CHECK_FOR="Cannot uninstall, incorrect permissions on installation folder"
test "${RETURN_MESSAGE#*$CHECK_FOR}" != "$RETURN_MESSAGE" || exit 1
[ "${RETURN_MESSAGE#*$CHECK_FOR}" != "$RETURN_MESSAGE" ] || exit 1

View File

@@ -1,12 +1,13 @@
#!/bin/sh
fail () { echo $@ ; exit 1; }
set -ex
die () { echo $@ ; exit 1; }
. ../../nvm.sh
type nvm > /dev/null 2>&1 || fail "NVM not loaded"
type nvm > /dev/null 2>&1 || die "nvm not loaded"
nvm unload
type nvm > /dev/null 2>&1 && fail "NVM not unloaded" || exit 0
! type nvm > /dev/null 2>&1 || die "nvm not unloaded"

View File

@@ -1,30 +1,39 @@
#!/bin/sh
set -ex
die () { echo $@ ; cleanup ; exit 1; }
cleanup() {
rm -rf ../../alias/foo
rm -rf "$(nvm_alias_path)/foo"
}
. ../../nvm.sh
echo 'foo' > ../../alias/foo
nvm_make_alias foo foo
set +ex # needed for stderr
OUTPUT="$(nvm use foo 2>&1)"
set -ex
EXPECTED_OUTPUT='The alias "foo" leads to an infinite loop. Aborting.'
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] \
|| die "'nvm use foo' did not output '$EXPECTED_OUTPUT'; got '$OUTPUT'"
[ "_${OUTPUT}" = "_${EXPECTED_OUTPUT}" ] \
|| die "'nvm use foo' did not output >${EXPECTED_OUTPUT}<; got >${OUTPUT}<"
set +ex # needed for stderr
EXIT_CODE="$(nvm use foo 2>/dev/null ; echo $?)"
[ "_$EXIT_CODE" = "_8" ] || die "Expected exit code 8; got $EXIT_CODE"
set -ex
[ "_$EXIT_CODE" = "_8" ] || die "Expected exit code 8; got ${EXIT_CODE}"
set +ex # needed for stderr
OUTPUT="$(nvm use --silent foo 2>&1)"
set -ex
EXPECTED_OUTPUT=''
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] \
|| die "'nvm use --silent foo' did not output '$EXPECTED_OUTPUT'; got '$OUTPUT'"
[ "_${OUTPUT}" = "_${EXPECTED_OUTPUT}" ] \
|| die "'nvm use --silent foo' did not output >${EXPECTED_OUTPUT}<; got >${OUTPUT}<"
set +ex # needed for stderr
EXIT_CODE="$(nvm use --silent foo 2>/dev/null ; echo $?)"
[ "_$EXIT_CODE" = "_8" ] || die "Expected exit code 8 from 'nvm use --silent foo'; got $EXIT_CODE"
cleanup;
set -ex
[ $EXIT_CODE -eq 8 ] || die "Expected exit code 8 from 'nvm use --silent foo'; got ${EXIT_CODE}"
cleanup

View File

@@ -1,38 +1,35 @@
#!/bin/sh
set -ex
. ../common.sh
die () { echo $@ ; cleanup ; exit 1; }
VERSION="v3.99.0"
cleanup() {
rm -rf ../../alias/foo
unset -f make_echo cleanup
rm -rf "$(nvm_version_path "iojs-${VERSION}")"
}
. ../../nvm.sh
echo 'foo' > ../../alias/foo
nvm deactivate || die "unable to deactivate; current: >$(nvm current)<"
OUTPUT="$(nvm use foo 2>&1)"
EXPECTED_OUTPUT='The alias "foo" leads to an infinite loop. Aborting.'
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] \
|| die "'nvm use foo' did not output '$EXPECTED_OUTPUT'; got '$OUTPUT'"
make_fake_iojs "${VERSION}" || die "unable to make_fake_iojs ${VERSION}"
EXIT_CODE="$(nvm use foo 2>/dev/null ; echo $?)"
[ "_$EXIT_CODE" = "_8" ] || die "Expected exit code 8; got $EXIT_CODE"
IOJS_VERSION="$(nvm_version iojs)"
[ -n "${IOJS_VERSION}" ] || die 'expected an io.js version; got none'
OUTPUT="$(nvm use --silent foo 2>&1)"
EXPECTED_OUTPUT=''
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] \
|| die "'nvm use --silent foo' did not output '$EXPECTED_OUTPUT'; got '$OUTPUT'"
EXPECTED_OUTPUT="$(nvm_add_iojs_prefix ${VERSION})"
[ "${IOJS_VERSION}" = "${EXPECTED_OUTPUT}" ] || die "iojs version was not >${EXPECTED_OUTPUT}; got >${IOJS_VERSION}<"
OUTPUT="$(nvm use foo --silent 2>&1)"
EXPECTED_OUTPUT=''
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] \
|| die "'nvm use foo --silent' did not output '$EXPECTED_OUTPUT'; got '$OUTPUT'"
nvm use --delete-prefix iojs || die '`nvm use iojs` failed'
EXIT_CODE="$(nvm use --silent foo 2>/dev/null ; echo $?)"
[ "_$EXIT_CODE" = "_8" ] || die "Expected exit code 8 from 'nvm use --silent foo'; got $EXIT_CODE"
CURRENT="$(nvm current)"
echo "current: ${CURRENT}"
EXIT_CODE="$(nvm use foo --silent 2>/dev/null ; echo $?)"
[ "_$EXIT_CODE" = "_8" ] || die "Expected exit code 8 from 'nvm use foo --silent'; got $EXIT_CODE"
cleanup;
[ "${CURRENT}" = "${IOJS_VERSION}" ] || die "expected >${IOJS_VERSION}<; got >${CURRENT}<"
cleanup

View File

@@ -1,22 +1,44 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
set -ex
cleanup() {
unset -f nvm_has_system_node nvm_print_npm_version
}
die() { echo $@ ; cleanup ; exit 1; }
. ../../nvm.sh
nvm_has_system_node() { return 0; }
nvm_print_npm_version() { return ' (npm v1.2.3)'; }
nvm_print_npm_version() { command printf ' (npm v1.2.3)'; }
EXPECTED_OUTPUT="Now using system version of node: $(node -v)$(nvm_print_npm_version)"
[ "$(nvm use system 2>&1 | tail -n1)" = "$EXPECTED_OUTPUT" ] || die "Could not use system version of node"
set +x # since stderr is needed
OUTPUT="$(nvm use system 2>&1)"
set -x
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "Could not use system version of node. Got >${OUTPUT}<, expected >${EXPECTED_OUTPUT}<"
EXPECTED_OUTPUT=""
[ "$(nvm use --silent system 2>&1 | tail -n1)" = "$EXPECTED_OUTPUT" ] || die "Could not use system version of node or --silent was not silent"
set +x # since stderr is needed
OUTPUT="$(nvm use --silent system 2>&1 | tail -1)"
set -x
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "Could not use system version of node or --silent was not silent"
nvm_has_system_node() { return 1; }
nvm_print_npm_version() { return ''; }
nvm_print_npm_version() { command printf ''; }
EXPECTED_OUTPUT="System version of node not found."
[ "$(nvm use system 2>&1 | tail -n1)" = "$EXPECTED_OUTPUT" ] || die "Did not report error, system node not found"
set +x # since stderr is needed
OUTPUT="$(nvm use system 2>&1 | tail -1)"
set -x
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "Did not report error, system node not found"
nvm use system 2>&1 > /dev/null || [ $? -eq 127 ] || die "Did not return error code, system node not found"
EXPECTED_OUTPUT=""
[ "$(nvm use --silent system 2>&1 | tail -n1)" = "$EXPECTED_OUTPUT" ] || die "Did not report error, system node not found or --silent was not silent"
set +x # since stderr is needed
OUTPUT="$(nvm use --silent system 2>&1 | tail -1)"
set -x
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "Did not report error, system node not found or --silent was not silent"
nvm use --silent system 2>&1 > /dev/null || [ $? -eq 127 ] || die "Did not return error code, system node not found or --silent was not silent"
cleanup

View File

@@ -1,33 +1,35 @@
#!/usr/bin/env bash
#!/bin/sh
set -ex
export NVM_SYMLINK_CURRENT=true
. ../../nvm.sh
rm -rf ../../v0.10.29
mkdir ../../v0.10.29
nvm use 0.10.29
rmdir ../../v0.10.29
rm -rf "${NVM_DIR}/v0.10.29"
mkdir "${NVM_DIR}/v0.10.29"
nvm use --delete-prefix 0.10.29
rmdir "${NVM_DIR}/v0.10.29"
if [ ! -L ../../current ];then
if [ ! -L "${NVM_DIR}/current" ];then
echo "Expected 'current' symlink to be created!"
exit 1
fi
oldLink="$(readlink ../../current)"
oldLink="$(readlink "${NVM_DIR}/current")"
if [ "$(basename $oldLink)" != 'v0.10.29' ];then
echo "Expected 'current' to point to v0.10.29 but was $oldLink"
if [ "$(basename "${oldLink}")" != 'v0.10.29' ];then
echo "Expected 'current' to point to v0.10.29 but was ${oldLink}"
exit 1
fi
rm -rf ../../v0.11.13
mkdir ../../v0.11.13
nvm use 0.11.13
rmdir ../../v0.11.13
rm -rf "${NVM_DIR}/v0.11.13"
mkdir "${NVM_DIR}/v0.11.13"
nvm use --delete-prefix 0.11.13
rmdir "${NVM_DIR}/v0.11.13"
newLink="$(readlink ../../current)"
newLink="$(readlink "${NVM_DIR}/current")"
if [ "$(basename $newLink)" != 'v0.11.13' ];then
if [ "$(basename "${newLink}")" != 'v0.11.13' ];then
echo "Expected 'current' to point to v0.11.13 but was $newLink"
exit 1
fi

View File

@@ -1,4 +1,6 @@
#!/usr/bin/env bash
#!/bin/sh
set -ex
. ../../nvm.sh
@@ -8,17 +10,17 @@ TEST_COUNT=0
TEST_PASSED=0
TEST_FAILED=0
function registerExpectedSymlink() {
registerExpectedSymlink() {
registerResult ${1}
}
function registerExpectedNoSymlink() {
[ ${1} -ne 0 ]
registerExpectedNoSymlink() {
[ $1 -ne 0 ]
registerResult $?
}
function registerResult() {
result=${1}
registerResult() {
result="${1}"
TEST_COUNT=$(($TEST_COUNT + 1))
@@ -27,19 +29,19 @@ function registerResult() {
|| TEST_FAILED=$(($TEST_FAILED + 1))
}
function cleanup() {
rm -rf ../../${TEST_NODE_VERSION}
rm -f ../../current
cleanup() {
rm -rf "${NVM_DIR}/${TEST_NODE_VERSION}"
rm -f "${NVM_DIR}/current"
}
function runNvmUse() {
mkdir ../../${TEST_NODE_VERSION}
nvm use ${TEST_NODE_VERSION} > /dev/null 2>&1
rmdir ../../${TEST_NODE_VERSION}
runNvmUse() {
mkdir "${NVM_DIR}/${TEST_NODE_VERSION}"
nvm use --delete-prefix "${TEST_NODE_VERSION}" > /dev/null 2>&1
rmdir "${NVM_DIR}/${TEST_NODE_VERSION}"
}
function isCurrentSymlinkPresent() {
[ -L ../../current ]
isCurrentSymlinkPresent() {
[ -L "${NVM_DIR}/current" ]
}
NVM_SYMLINK_CURRENT=false
@@ -80,5 +82,4 @@ registerExpectedNoSymlink $?
cleanup
[ ${TEST_FAILED} -ne 0 ] && echo "${TEST_COUNT} tested, ${TEST_PASSED} passed, ${TEST_FAILED} failed" && exit 1 || true
[ $TEST_FAILED -ne 0 ] && echo "${TEST_COUNT} tested, ${TEST_PASSED} passed, ${TEST_FAILED} failed" && exit 1 || true

View File

@@ -1,4 +1,7 @@
#!/bin/sh
set -ex
. ../../nvm.sh
nvm

View File

@@ -1,5 +1,7 @@
#!/bin/sh
set -ex
set -- yes
. ../../nvm.sh
[ "$1" = yes ]

View File

@@ -1,40 +1,66 @@
version date files npm v8 uv zlib openssl modules lts
v6.0.0 2016-04-26 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 3.8.6 5.0.71.35 1.9.0 1.2.8 1.0.2g 48 -
v5.11.0 2016-04-21 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 3.8.6 4.6.85.31 1.8.0 1.2.8 1.0.2g 47 -
v5.10.1 2016-04-05 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 3.8.3 4.6.85.31 1.8.0 1.2.8 1.0.2g 47 -
v5.10.0 2016-04-01 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 3.8.3 4.6.85.31 1.8.0 1.2.8 1.0.2g 47 -
v5.9.1 2016-03-22 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 3.7.3 4.6.85.31 1.8.0 1.2.8 1.0.2g 47 -
v5.9.0 2016-03-16 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 3.7.3 4.6.85.31 1.8.0 1.2.8 1.0.2g 47 -
v5.8.0 2016-03-09 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 3.7.3 4.6.85.31 1.8.0 1.2.8 1.0.2g 47 -
v5.7.1 2016-03-02 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 3.6.0 4.6.85.31 1.8.0 1.2.8 1.0.2g 47 -
v5.7.0 2016-02-23 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 3.6.0 4.6.85.31 1.8.0 1.2.8 1.0.2f 47 -
v5.6.0 2016-02-09 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 3.6.0 4.6.85.31 1.8.0 1.2.8 1.0.2f 47 -
v5.5.0 2016-01-21 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 3.3.12 4.6.85.31 1.8.0 1.2.8 1.0.2e 47 -
v5.4.1 2016-01-12 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 3.3.12 4.6.85.31 1.8.0 1.2.8 1.0.2e 47 -
v5.4.0 2016-01-06 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 3.3.12 4.6.85.31 1.8.0 1.2.8 1.0.2e 47 -
v5.3.0 2015-12-15 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 3.3.12 4.6.85.31 1.8.0 1.2.8 1.0.2e 47 -
v5.2.0 2015-12-09 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 3.3.12 4.6.85.31 1.7.5 1.2.8 1.0.2e 47 -
v5.1.1 2015-12-03 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 3.3.12 4.6.85.31 1.7.5 1.2.8 1.0.2e 47 -
v5.1.0 2015-11-17 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 3.3.12 4.6.85.31 1.7.5 1.2.8 1.0.2d 47 -
v5.0.0 2015-10-29 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 3.3.6 4.6.85.28 1.7.5 1.2.8 1.0.2d 47 -
v4.4.3 2016-04-12 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 2.15.1 4.5.103.35 1.8.0 1.2.8 1.0.2g 46 Argon
v4.4.2 2016-04-01 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 2.15.0 4.5.103.35 1.8.0 1.2.8 1.0.2g 46 Argon
v4.4.1 2016-03-22 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 2.14.20 4.5.103.35 1.8.0 1.2.8 1.0.2g 46 Argon
v4.4.0 2016-03-08 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 2.14.20 4.5.103.35 1.8.0 1.2.8 1.0.2g 46 Argon
v4.3.2 2016-03-02 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 2.14.12 4.5.103.35 1.8.0 1.2.8 1.0.2g 46 Argon
v4.3.1 2016-02-16 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 2.14.12 4.5.103.35 1.8.0 1.2.8 1.0.2f 46 Argon
v4.3.0 2016-02-09 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 2.14.12 4.5.103.35 1.8.0 1.2.8 1.0.2f 46 Argon
v4.2.6 2016-01-21 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 2.14.12 4.5.103.35 1.8.0 1.2.8 1.0.2e 46 Argon
v4.2.5 2016-01-20 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 2.14.12 4.5.103.35 1.8.0 1.2.8 1.0.2e 46 Argon
v4.2.4 2015-12-23 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 2.14.12 4.5.103.35 1.7.5 1.2.8 1.0.2e 46 Argon
v4.2.3 2015-12-03 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 2.14.7 4.5.103.35 1.7.5 1.2.8 1.0.2e 46 Argon
v4.2.2 2015-11-03 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 2.14.7 4.5.103.35 1.7.5 1.2.8 1.0.2d 46 Argon
v4.2.1 2015-10-13 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 2.14.7 4.5.103.35 1.7.5 1.2.8 1.0.2d 46 Argon
v4.2.0 2015-10-12 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 2.14.7 4.5.103.35 1.7.5 1.2.8 1.0.2d 46 Argon
v4.1.2 2015-10-05 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 2.14.4 4.5.103.35 1.7.5 1.2.8 1.0.2d 46 -
v4.1.1 2015-09-23 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 2.14.4 4.5.103.33 1.7.4 1.2.8 1.0.2d 46 -
v4.1.0 2015-09-17 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 2.14.3 4.5.103.33 1.7.4 1.2.8 1.0.2d 46 -
v4.0.0 2015-09-08 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-msi,win-x86-msi 2.14.2 4.5.103.30 1.7.3 1.2.8 1.0.2d 46 -
v6.9.0 2016-10-18 aix-ppc64,headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.10.8 5.1.281.84 1.9.1 1.2.8 1.0.2j 48 Boron
v6.8.1 2016-10-14 aix-ppc64,headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.10.8 5.1.281.84 1.9.1 1.2.8 1.0.2j 48 -
v6.8.0 2016-10-12 aix-ppc64,headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.10.8 5.1.281.84 1.9.1 1.2.8 1.0.2j 48 -
v6.7.0 2016-09-27 aix-ppc64,headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.10.3 5.1.281.83 1.9.1 1.2.8 1.0.2j 48 -
v6.6.0 2016-09-14 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.10.3 5.1.281.83 1.9.1 1.2.8 1.0.2h 48 -
v6.5.0 2016-08-26 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.10.3 5.1.281.81 1.9.1 1.2.8 1.0.2h 48 -
v6.4.0 2016-08-12 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.10.3 5.0.71.60 1.9.1 1.2.8 1.0.2h 48 -
v6.3.1 2016-07-21 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.10.3 5.0.71.57 1.9.1 1.2.8 1.0.2h 48 -
v6.3.0 2016-07-06 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.10.3 5.0.71.52 1.9.1 1.2.8 1.0.2h 48 -
v6.2.2 2016-06-16 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.9.5 5.0.71.52 1.9.1 1.2.8 1.0.2h 48 -
v6.2.1 2016-06-02 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.9.3 5.0.71.52 1.9.1 1.2.8 1.0.2h 48 -
v6.2.0 2016-05-17 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.8.9 5.0.71.47 1.9.1 1.2.8 1.0.2h 48 -
v6.1.0 2016-05-05 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.8.6 5.0.71.35 1.9.0 1.2.8 1.0.2h 48 -
v6.0.0 2016-04-26 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.8.6 5.0.71.35 1.9.0 1.2.8 1.0.2g 48 -
v5.12.0 2016-06-23 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.8.6 4.6.85.32 1.8.0 1.2.8 1.0.2h 47 -
v5.11.1 2016-05-05 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.8.6 4.6.85.31 1.8.0 1.2.8 1.0.2h 47 -
v5.11.0 2016-04-21 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.8.6 4.6.85.31 1.8.0 1.2.8 1.0.2g 47 -
v5.10.1 2016-04-05 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.8.3 4.6.85.31 1.8.0 1.2.8 1.0.2g 47 -
v5.10.0 2016-04-01 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.8.3 4.6.85.31 1.8.0 1.2.8 1.0.2g 47 -
v5.9.1 2016-03-22 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.7.3 4.6.85.31 1.8.0 1.2.8 1.0.2g 47 -
v5.9.0 2016-03-16 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.7.3 4.6.85.31 1.8.0 1.2.8 1.0.2g 47 -
v5.8.0 2016-03-09 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.7.3 4.6.85.31 1.8.0 1.2.8 1.0.2g 47 -
v5.7.1 2016-03-02 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.6.0 4.6.85.31 1.8.0 1.2.8 1.0.2g 47 -
v5.7.0 2016-02-23 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.6.0 4.6.85.31 1.8.0 1.2.8 1.0.2f 47 -
v5.6.0 2016-02-09 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.6.0 4.6.85.31 1.8.0 1.2.8 1.0.2f 47 -
v5.5.0 2016-01-21 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.3.12 4.6.85.31 1.8.0 1.2.8 1.0.2e 47 -
v5.4.1 2016-01-12 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.3.12 4.6.85.31 1.8.0 1.2.8 1.0.2e 47 -
v5.4.0 2016-01-06 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.3.12 4.6.85.31 1.8.0 1.2.8 1.0.2e 47 -
v5.3.0 2015-12-15 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.3.12 4.6.85.31 1.8.0 1.2.8 1.0.2e 47 -
v5.2.0 2015-12-09 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.3.12 4.6.85.31 1.7.5 1.2.8 1.0.2e 47 -
v5.1.1 2015-12-03 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.3.12 4.6.85.31 1.7.5 1.2.8 1.0.2e 47 -
v5.1.0 2015-11-17 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.3.12 4.6.85.31 1.7.5 1.2.8 1.0.2d 47 -
v5.0.0 2015-10-29 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 3.3.6 4.6.85.28 1.7.5 1.2.8 1.0.2d 47 -
v4.6.1 2016-10-18 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.15.9 4.5.103.37 1.9.1 1.2.8 1.0.2j 46 Argon
v4.6.0 2016-09-27 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.15.9 4.5.103.37 1.9.1 1.2.8 1.0.2j 46 Argon
v4.5.0 2016-08-16 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.15.9 4.5.103.37 1.9.1 1.2.8 1.0.2h 46 Argon
v4.4.7 2016-06-28 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.15.8 4.5.103.36 1.8.0 1.2.8 1.0.2h 46 Argon
v4.4.6 2016-06-23 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.15.5 4.5.103.36 1.8.0 1.2.8 1.0.2h 46 Argon
v4.4.5 2016-05-24 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.15.5 4.5.103.35 1.8.0 1.2.8 1.0.2h 46 Argon
v4.4.4 2016-05-05 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.15.1 4.5.103.35 1.8.0 1.2.8 1.0.2h 46 Argon
v4.4.3 2016-04-12 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.15.1 4.5.103.35 1.8.0 1.2.8 1.0.2g 46 Argon
v4.4.2 2016-04-01 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.15.0 4.5.103.35 1.8.0 1.2.8 1.0.2g 46 Argon
v4.4.1 2016-03-22 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.14.20 4.5.103.35 1.8.0 1.2.8 1.0.2g 46 Argon
v4.4.0 2016-03-08 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.14.20 4.5.103.35 1.8.0 1.2.8 1.0.2g 46 Argon
v4.3.2 2016-03-02 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-ppc64le,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.14.12 4.5.103.35 1.8.0 1.2.8 1.0.2g 46 Argon
v4.3.1 2016-02-16 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.14.12 4.5.103.35 1.8.0 1.2.8 1.0.2f 46 Argon
v4.3.0 2016-02-09 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.14.12 4.5.103.35 1.8.0 1.2.8 1.0.2f 46 Argon
v4.2.6 2016-01-21 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.14.12 4.5.103.35 1.8.0 1.2.8 1.0.2e 46 Argon
v4.2.5 2016-01-20 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.14.12 4.5.103.35 1.8.0 1.2.8 1.0.2e 46 Argon
v4.2.4 2015-12-23 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.14.12 4.5.103.35 1.7.5 1.2.8 1.0.2e 46 Argon
v4.2.3 2015-12-03 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.14.7 4.5.103.35 1.7.5 1.2.8 1.0.2e 46 Argon
v4.2.2 2015-11-03 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.14.7 4.5.103.35 1.7.5 1.2.8 1.0.2d 46 Argon
v4.2.1 2015-10-13 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.14.7 4.5.103.35 1.7.5 1.2.8 1.0.2d 46 Argon
v4.2.0 2015-10-12 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.14.7 4.5.103.35 1.7.5 1.2.8 1.0.2d 46 Argon
v4.1.2 2015-10-05 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.14.4 4.5.103.35 1.7.5 1.2.8 1.0.2d 46 -
v4.1.1 2015-09-23 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.14.4 4.5.103.33 1.7.4 1.2.8 1.0.2d 46 -
v4.1.0 2015-09-17 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.14.3 4.5.103.33 1.7.4 1.2.8 1.0.2d 46 -
v4.0.0 2015-09-08 headers,linux-arm64,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.14.2 4.5.103.30 1.7.3 1.2.8 1.0.2d 46 -
v0.12.17 2016-10-18 headers,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x86-exe,win-x86-msi 2.15.1 3.28.71.19 1.6.1 1.2.8 1.0.1u 14 -
v0.12.16 2016-09-27 headers,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x86-exe,win-x86-msi 2.15.1 3.28.71.19 1.6.1 1.2.8 1.0.1u 14 -
v0.12.15 2016-06-23 headers,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x86-exe,win-x86-msi 2.15.1 3.28.71.19 1.6.1 1.2.8 1.0.1t 14 -
v0.12.14 2016-05-06 headers,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x86-exe,win-x86-msi 2.15.1 3.28.71.19 1.6.1 1.2.8 1.0.1t 14 -
v0.12.13 2016-03-31 headers,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x86-exe,win-x86-msi 2.15.0 3.28.71.19 1.6.1 1.2.8 1.0.1s 14 -
v0.12.12 2016-03-08 headers,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x86-exe,win-x86-msi 2.14.9 3.28.71.19 1.6.1 1.2.8 1.0.1s 14 -
v0.12.11 2016-03-03 headers,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x86-exe,win-x86-msi 2.14.9 3.28.71.19 1.6.1 1.2.8 1.0.1s 14 -
@@ -66,6 +92,10 @@ v0.11.3 2013-06-26 linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,s
v0.11.2 2013-05-13 linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x86-exe,win-x86-msi 1.2.21 3.19.0.0 0.11.2 1.2.3 1.0.1e 0x000C -
v0.11.1 2013-04-19 linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x86-exe,win-x86-msi 1.2.18 3.18.0.0 0.11.1 1.2.3 1.0.1e 0x000C -
v0.11.0 2013-03-28 linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x86-exe,win-x86-msi 1.2.15 3.17.13.0 0.10.3 1.2.3 1.0.1e 0x000C -
v0.10.48 2016-10-18 headers,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x86-exe,win-x86-msi 2.15.1 3.14.5.11 0.10.37 1.2.8 1.0.1u 11 -
v0.10.47 2016-09-27 headers,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x86-exe,win-x86-msi 2.15.1 3.14.5.11 0.10.37 1.2.8 1.0.1u 11 -
v0.10.46 2016-06-23 headers,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x86-exe,win-x86-msi 2.15.1 3.14.5.9 0.10.37 1.2.8 1.0.1t 11 -
v0.10.45 2016-05-06 headers,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x86-exe,win-x86-msi 2.15.1 3.14.5.9 0.10.36 1.2.8 1.0.1t 11 -
v0.10.44 2016-03-31 headers,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x86-exe,win-x86-msi 2.15.0 3.14.5.9 0.10.36 1.2.8 1.0.1s 11 -
v0.10.43 2016-03-03 headers,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x86-exe,win-x86-msi 1.4.29 3.14.5.9 0.10.36 1.2.8 1.0.1s 11 -
v0.10.42 2016-02-09 headers,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x86-exe,win-x86-msi 1.4.29 3.14.5.9 0.10.36 1.2.8 1.0.1r 11 -

View File

@@ -0,0 +1,41 @@
iojs-v1.0.0
iojs-v1.0.1
iojs-v1.0.2
iojs-v1.0.3
iojs-v1.0.4
iojs-v1.1.0
iojs-v1.2.0
iojs-v1.3.0
iojs-v1.4.1
iojs-v1.4.2
iojs-v1.4.3
iojs-v1.5.0
iojs-v1.5.1
iojs-v1.6.0
iojs-v1.6.1
iojs-v1.6.2
iojs-v1.6.3
iojs-v1.6.4
iojs-v1.7.1
iojs-v1.8.1
iojs-v1.8.2
iojs-v1.8.3
iojs-v1.8.4
iojs-v2.0.0
iojs-v2.0.1
iojs-v2.0.2
iojs-v2.1.0
iojs-v2.2.0
iojs-v2.2.1
iojs-v2.3.0
iojs-v2.3.1
iojs-v2.3.2
iojs-v2.3.3
iojs-v2.3.4
iojs-v2.4.0
iojs-v2.5.0
iojs-v3.0.0
iojs-v3.1.0
iojs-v3.2.0
iojs-v3.3.0
iojs-v3.3.1

View File

@@ -0,0 +1,22 @@
v4.2.0  (LTS: Argon)
v4.2.1  (LTS: Argon)
v4.2.2  (LTS: Argon)
v4.2.3  (LTS: Argon)
v4.2.4  (LTS: Argon)
v4.2.5  (LTS: Argon)
v4.2.6  (LTS: Argon)
v4.3.0  (LTS: Argon)
v4.3.1  (LTS: Argon)
v4.3.2  (LTS: Argon)
v4.4.0  (LTS: Argon)
v4.4.1  (LTS: Argon)
v4.4.2  (LTS: Argon)
v4.4.3  (LTS: Argon)
v4.4.4  (LTS: Argon)
v4.4.5  (LTS: Argon)
v4.4.6  (LTS: Argon)
v4.4.7  (LTS: Argon)
v4.5.0  (LTS: Argon)
v4.6.0  (LTS: Argon)
v4.6.1  (Latest LTS: Argon)
v6.9.0  (Latest LTS: Boron)

View File

@@ -0,0 +1,294 @@
v0.1.14
v0.1.15
v0.1.16
v0.1.17
v0.1.18
v0.1.19
v0.1.20
v0.1.21
v0.1.22
v0.1.23
v0.1.24
v0.1.25
v0.1.26
v0.1.27
v0.1.28
v0.1.29
v0.1.30
v0.1.31
v0.1.32
v0.1.33
v0.1.90
v0.1.91
v0.1.92
v0.1.93
v0.1.94
v0.1.95
v0.1.96
v0.1.97
v0.1.98
v0.1.99
v0.1.100
v0.1.101
v0.1.102
v0.1.103
v0.1.104
v0.2.0
v0.2.1
v0.2.2
v0.2.3
v0.2.4
v0.2.5
v0.2.6
v0.3.0
v0.3.1
v0.3.2
v0.3.3
v0.3.4
v0.3.5
v0.3.6
v0.3.7
v0.3.8
v0.4.0
v0.4.1
v0.4.2
v0.4.3
v0.4.4
v0.4.5
v0.4.6
v0.4.7
v0.4.8
v0.4.9
v0.4.10
v0.4.11
v0.4.12
v0.5.0
v0.5.1
v0.5.2
v0.5.3
v0.5.4
v0.5.5
v0.5.6
v0.5.7
v0.5.8
v0.5.9
v0.5.10
v0.6.0
v0.6.1
v0.6.2
v0.6.3
v0.6.4
v0.6.5
v0.6.6
v0.6.7
v0.6.8
v0.6.9
v0.6.10
v0.6.11
v0.6.12
v0.6.13
v0.6.14
v0.6.15
v0.6.16
v0.6.17
v0.6.18
v0.6.19
v0.6.20
v0.6.21
v0.7.0
v0.7.1
v0.7.2
v0.7.3
v0.7.4
v0.7.5
v0.7.6
v0.7.7
v0.7.8
v0.7.9
v0.7.10
v0.7.11
v0.7.12
v0.8.0
v0.8.1
v0.8.2
v0.8.3
v0.8.4
v0.8.5
v0.8.6
v0.8.7
v0.8.8
v0.8.9
v0.8.10
v0.8.11
v0.8.12
v0.8.13
v0.8.14
v0.8.15
v0.8.16
v0.8.17
v0.8.18
v0.8.19
v0.8.20
v0.8.21
v0.8.22
v0.8.23
v0.8.24
v0.8.25
v0.8.26
v0.8.27
v0.8.28
v0.9.0
v0.9.1
v0.9.2
v0.9.3
v0.9.4
v0.9.5
v0.9.6
v0.9.7
v0.9.8
v0.9.9
v0.9.10
v0.9.11
v0.9.12
v0.10.0
v0.10.1
v0.10.2
v0.10.3
v0.10.4
v0.10.5
v0.10.6
v0.10.7
v0.10.8
v0.10.9
v0.10.10
v0.10.11
v0.10.12
v0.10.13
v0.10.14
v0.10.15
v0.10.16
v0.10.17
v0.10.18
v0.10.19
v0.10.20
v0.10.21
v0.10.22
v0.10.23
v0.10.24
v0.10.25
v0.10.26
v0.10.27
v0.10.28
v0.10.29
v0.10.30
v0.10.31
v0.10.32
v0.10.33
v0.10.34
v0.10.35
v0.10.36
v0.10.37
v0.10.38
v0.10.39
v0.10.40
v0.10.41
v0.10.42
v0.10.43
v0.10.44
v0.10.45
v0.10.46
v0.10.47
v0.10.48
v0.11.0
v0.11.1
v0.11.2
v0.11.3
v0.11.4
v0.11.5
v0.11.6
v0.11.7
v0.11.8
v0.11.9
v0.11.10
v0.11.11
v0.11.12
v0.11.13
v0.11.14
v0.11.15
v0.11.16
v0.12.0
v0.12.1
v0.12.2
v0.12.3
v0.12.4
v0.12.5
v0.12.6
v0.12.7
v0.12.8
v0.12.9
v0.12.10
v0.12.11
v0.12.12
v0.12.13
v0.12.14
v0.12.15
v0.12.16
v0.12.17
v4.0.0
v4.1.0
v4.1.1
v4.1.2
v4.2.0  (LTS: Argon)
v4.2.1  (LTS: Argon)
v4.2.2  (LTS: Argon)
v4.2.3  (LTS: Argon)
v4.2.4  (LTS: Argon)
v4.2.5  (LTS: Argon)
v4.2.6  (LTS: Argon)
v4.3.0  (LTS: Argon)
v4.3.1  (LTS: Argon)
v4.3.2  (LTS: Argon)
v4.4.0  (LTS: Argon)
v4.4.1  (LTS: Argon)
v4.4.2  (LTS: Argon)
v4.4.3  (LTS: Argon)
v4.4.4  (LTS: Argon)
v4.4.5  (LTS: Argon)
v4.4.6  (LTS: Argon)
v4.4.7  (LTS: Argon)
v4.5.0  (LTS: Argon)
v4.6.0  (LTS: Argon)
v4.6.1  (Latest LTS: Argon)
v5.0.0
v5.1.0
v5.1.1
v5.2.0
v5.3.0
v5.4.0
v5.4.1
v5.5.0
v5.6.0
v5.7.0
v5.7.1
v5.8.0
v5.9.0
v5.9.1
v5.10.0
v5.10.1
v5.11.0
v5.11.1
v5.12.0
v6.0.0
v6.1.0
v6.2.0
v6.2.1
v6.2.2
v6.3.0
v6.3.1
v6.4.0
v6.5.0
v6.6.0
v6.7.0
v6.8.0
v6.8.1
v6.9.0  (Latest LTS: Boron)

View File

@@ -0,0 +1,335 @@
v0.1.14
v0.1.15
v0.1.16
v0.1.17
v0.1.18
v0.1.19
v0.1.20
v0.1.21
v0.1.22
v0.1.23
v0.1.24
v0.1.25
v0.1.26
v0.1.27
v0.1.28
v0.1.29
v0.1.30
v0.1.31
v0.1.32
v0.1.33
v0.1.90
v0.1.91
v0.1.92
v0.1.93
v0.1.94
v0.1.95
v0.1.96
v0.1.97
v0.1.98
v0.1.99
v0.1.100
v0.1.101
v0.1.102
v0.1.103
v0.1.104
v0.2.0
v0.2.1
v0.2.2
v0.2.3
v0.2.4
v0.2.5
v0.2.6
v0.3.0
v0.3.1
v0.3.2
v0.3.3
v0.3.4
v0.3.5
v0.3.6
v0.3.7
v0.3.8
v0.4.0
v0.4.1
v0.4.2
v0.4.3
v0.4.4
v0.4.5
v0.4.6
v0.4.7
v0.4.8
v0.4.9
v0.4.10
v0.4.11
v0.4.12
v0.5.0
v0.5.1
v0.5.2
v0.5.3
v0.5.4
v0.5.5
v0.5.6
v0.5.7
v0.5.8
v0.5.9
v0.5.10
v0.6.0
v0.6.1
v0.6.2
v0.6.3
v0.6.4
v0.6.5
v0.6.6
v0.6.7
v0.6.8
v0.6.9
v0.6.10
v0.6.11
v0.6.12
v0.6.13
v0.6.14
v0.6.15
v0.6.16
v0.6.17
v0.6.18
v0.6.19
v0.6.20
v0.6.21
v0.7.0
v0.7.1
v0.7.2
v0.7.3
v0.7.4
v0.7.5
v0.7.6
v0.7.7
v0.7.8
v0.7.9
v0.7.10
v0.7.11
v0.7.12
v0.8.0
v0.8.1
v0.8.2
v0.8.3
v0.8.4
v0.8.5
v0.8.6
v0.8.7
v0.8.8
v0.8.9
v0.8.10
v0.8.11
v0.8.12
v0.8.13
v0.8.14
v0.8.15
v0.8.16
v0.8.17
v0.8.18
v0.8.19
v0.8.20
v0.8.21
v0.8.22
v0.8.23
v0.8.24
v0.8.25
v0.8.26
v0.8.27
v0.8.28
v0.9.0
v0.9.1
v0.9.2
v0.9.3
v0.9.4
v0.9.5
v0.9.6
v0.9.7
v0.9.8
v0.9.9
v0.9.10
v0.9.11
v0.9.12
v0.10.0
v0.10.1
v0.10.2
v0.10.3
v0.10.4
v0.10.5
v0.10.6
v0.10.7
v0.10.8
v0.10.9
v0.10.10
v0.10.11
v0.10.12
v0.10.13
v0.10.14
v0.10.15
v0.10.16
v0.10.17
v0.10.18
v0.10.19
v0.10.20
v0.10.21
v0.10.22
v0.10.23
v0.10.24
v0.10.25
v0.10.26
v0.10.27
v0.10.28
v0.10.29
v0.10.30
v0.10.31
v0.10.32
v0.10.33
v0.10.34
v0.10.35
v0.10.36
v0.10.37
v0.10.38
v0.10.39
v0.10.40
v0.10.41
v0.10.42
v0.10.43
v0.10.44
v0.10.45
v0.10.46
v0.10.47
v0.10.48
v0.11.0
v0.11.1
v0.11.2
v0.11.3
v0.11.4
v0.11.5
v0.11.6
v0.11.7
v0.11.8
v0.11.9
v0.11.10
v0.11.11
v0.11.12
v0.11.13
v0.11.14
v0.11.15
v0.11.16
v0.12.0
v0.12.1
v0.12.2
v0.12.3
v0.12.4
v0.12.5
v0.12.6
v0.12.7
v0.12.8
v0.12.9
v0.12.10
v0.12.11
v0.12.12
v0.12.13
v0.12.14
v0.12.15
v0.12.16
v0.12.17
iojs-v1.0.0
iojs-v1.0.1
iojs-v1.0.2
iojs-v1.0.3
iojs-v1.0.4
iojs-v1.1.0
iojs-v1.2.0
iojs-v1.3.0
iojs-v1.4.1
iojs-v1.4.2
iojs-v1.4.3
iojs-v1.5.0
iojs-v1.5.1
iojs-v1.6.0
iojs-v1.6.1
iojs-v1.6.2
iojs-v1.6.3
iojs-v1.6.4
iojs-v1.7.1
iojs-v1.8.1
iojs-v1.8.2
iojs-v1.8.3
iojs-v1.8.4
iojs-v2.0.0
iojs-v2.0.1
iojs-v2.0.2
iojs-v2.1.0
iojs-v2.2.0
iojs-v2.2.1
iojs-v2.3.0
iojs-v2.3.1
iojs-v2.3.2
iojs-v2.3.3
iojs-v2.3.4
iojs-v2.4.0
iojs-v2.5.0
iojs-v3.0.0
iojs-v3.1.0
iojs-v3.2.0
iojs-v3.3.0
iojs-v3.3.1
v4.0.0
v4.1.0
v4.1.1
v4.1.2
v4.2.0  (LTS: Argon)
v4.2.1  (LTS: Argon)
v4.2.2  (LTS: Argon)
v4.2.3  (LTS: Argon)
v4.2.4  (LTS: Argon)
v4.2.5  (LTS: Argon)
v4.2.6  (LTS: Argon)
v4.3.0  (LTS: Argon)
v4.3.1  (LTS: Argon)
v4.3.2  (LTS: Argon)
v4.4.0  (LTS: Argon)
v4.4.1  (LTS: Argon)
v4.4.2  (LTS: Argon)
v4.4.3  (LTS: Argon)
v4.4.4  (LTS: Argon)
v4.4.5  (LTS: Argon)
v4.4.6  (LTS: Argon)
v4.4.7  (LTS: Argon)
v4.5.0  (LTS: Argon)
v4.6.0  (LTS: Argon)
v4.6.1  (Latest LTS: Argon)
v5.0.0
v5.1.0
v5.1.1
v5.2.0
v5.3.0
v5.4.0
v5.4.1
v5.5.0
v5.6.0
v5.7.0
v5.7.1
v5.8.0
v5.9.0
v5.9.1
v5.10.0
v5.10.1
v5.11.0
v5.11.1
v5.12.0
v6.0.0
v6.1.0
v6.2.0
v6.2.1
v6.2.2
v6.3.0
v6.3.1
v6.4.0
v6.5.0
v6.6.0
v6.7.0
v6.8.0
v6.8.1
v6.9.0  (Latest LTS: Boron)

View File

@@ -0,0 +1,21 @@
v4.2.0 Argon
v4.2.1 Argon
v4.2.2 Argon
v4.2.3 Argon
v4.2.4 Argon
v4.2.5 Argon
v4.2.6 Argon
v4.3.0 Argon
v4.3.1 Argon
v4.3.2 Argon
v4.4.0 Argon
v4.4.1 Argon
v4.4.2 Argon
v4.4.3 Argon
v4.4.4 Argon
v4.4.5 Argon
v4.4.6 Argon
v4.4.7 Argon
v4.5.0 Argon
v4.6.0 Argon
v4.6.1 Argon

View File

@@ -0,0 +1,22 @@
v4.2.0 Argon
v4.2.1 Argon
v4.2.2 Argon
v4.2.3 Argon
v4.2.4 Argon
v4.2.5 Argon
v4.2.6 Argon
v4.3.0 Argon
v4.3.1 Argon
v4.3.2 Argon
v4.4.0 Argon
v4.4.1 Argon
v4.4.2 Argon
v4.4.3 Argon
v4.4.4 Argon
v4.4.5 Argon
v4.4.6 Argon
v4.4.7 Argon
v4.5.0 Argon
v4.6.0 Argon
v4.6.1 Argon
v6.9.0 Boron

View File

@@ -0,0 +1 @@
v6.9.0 Boron

View File

@@ -195,6 +195,10 @@ v0.10.41
v0.10.42
v0.10.43
v0.10.44
v0.10.45
v0.10.46
v0.10.47
v0.10.48
v0.11.0
v0.11.1
v0.11.2
@@ -226,24 +230,35 @@ v0.12.10
v0.12.11
v0.12.12
v0.12.13
v0.12.14
v0.12.15
v0.12.16
v0.12.17
v4.0.0
v4.1.0
v4.1.1
v4.1.2
v4.2.0
v4.2.1
v4.2.2
v4.2.3
v4.2.4
v4.2.5
v4.2.6
v4.3.0
v4.3.1
v4.3.2
v4.4.0
v4.4.1
v4.4.2
v4.4.3
v4.2.0 Argon
v4.2.1 Argon
v4.2.2 Argon
v4.2.3 Argon
v4.2.4 Argon
v4.2.5 Argon
v4.2.6 Argon
v4.3.0 Argon
v4.3.1 Argon
v4.3.2 Argon
v4.4.0 Argon
v4.4.1 Argon
v4.4.2 Argon
v4.4.3 Argon
v4.4.4 Argon
v4.4.5 Argon
v4.4.6 Argon
v4.4.7 Argon
v4.5.0 Argon
v4.6.0 Argon
v4.6.1 Argon
v5.0.0
v5.1.0
v5.1.1
@@ -261,4 +276,19 @@ v5.9.1
v5.10.0
v5.10.1
v5.11.0
v5.11.1
v5.12.0
v6.0.0
v6.1.0
v6.2.0
v6.2.1
v6.2.2
v6.3.0
v6.3.1
v6.4.0
v6.5.0
v6.6.0
v6.7.0
v6.8.0
v6.8.1
v6.9.0 Boron

View File

@@ -0,0 +1,3 @@
lts/*|lts/boron
lts/boron|v6.9.0
lts/argon|v4.6.1

View File

@@ -0,0 +1,32 @@
#!/bin/sh
set -ex
die () { echo $@ ; cleanup ; exit 1; }
cleanup() {
unset -f nvm_download nvm_ls_remote nvm_ls_remote_iojs
}
. ../../../nvm.sh
nvm deactivate 2>/dev/null || die 'unable to deactivate'
. ../../common.sh
REMOTE="$PWD/mocks/nvm_ls_remote.txt"
nvm_ls_remote() {
cat "$REMOTE"
}
REMOTE_IOJS="$PWD/mocks/nvm_ls_remote_iojs.txt"
nvm_ls_remote_iojs() {
cat "$REMOTE_IOJS"
}
EXPECTED_OUTPUT_PATH="$PWD/mocks/nvm ls-remote.txt"
OUTPUT="$(nvm ls-remote | sed 's/[ \t]*$//')"
EXPECTED_OUTPUT="$(cat "$EXPECTED_OUTPUT_PATH" | sed 's/[ \t]*$//' )"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "bare nvm ls-remote did not output expected sorted versions; got $(echo ">$OUTPUT<") expected $(echo ">$EXPECTED_OUTPUT<")"
cleanup

View File

@@ -0,0 +1,51 @@
#!/bin/sh
set -ex
die () { echo $@ ; cleanup ; exit 1; }
cleanup() {
unset -f nvm_remote_version
}
. ../../../nvm.sh
. ../../common.sh
nvm_remote_version() {
echo "NVM_VERSION_ONLY:${NVM_VERSION_ONLY-},NVM_LTS:${NVM_LTS-},PATTERN:${PATTERN-}"
}
OUTPUT="$(nvm version-remote foo)"
EXPECTED_OUTPUT='NVM_VERSION_ONLY:true,NVM_LTS:,PATTERN:foo'
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "\`nvm version-remote foo\` called nvm_remote_version with >${OUTPUT}<, expected >${EXPECTED_OUTPUT}<"
OUTPUT="$(nvm version-remote --lts foo)"
EXPECTED_OUTPUT='NVM_VERSION_ONLY:true,NVM_LTS:*,PATTERN:foo'
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "\`nvm version-remote --lts foo\` called nvm_remote_version with >${OUTPUT}<, expected >${EXPECTED_OUTPUT}<"
OUTPUT="$(nvm version-remote foo --lts)"
EXPECTED_OUTPUT='NVM_VERSION_ONLY:true,NVM_LTS:*,PATTERN:foo'
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "\`nvm version-remote foo --lts\` called nvm_remote_version with >${OUTPUT}<, expected >${EXPECTED_OUTPUT}<"
OUTPUT="$(nvm version-remote --lts=argon foo)"
EXPECTED_OUTPUT='NVM_VERSION_ONLY:true,NVM_LTS:argon,PATTERN:foo'
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "\`nvm version-remote --lts=argon foo\` called nvm_remote_version with >${OUTPUT}<, expected >${EXPECTED_OUTPUT}<"
OUTPUT="$(nvm version-remote lts/foo)"
EXPECTED_OUTPUT='NVM_VERSION_ONLY:true,NVM_LTS:foo,PATTERN:'
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "\`nvm version-remote lts/foo\` called nvm_remote_version with >${OUTPUT}<, expected >${EXPECTED_OUTPUT}<"
OUTPUT="$(nvm version-remote 'lts/*')"
EXPECTED_OUTPUT='NVM_VERSION_ONLY:true,NVM_LTS:*,PATTERN:'
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "\`nvm version-remote lts/*\` called nvm_remote_version with >${OUTPUT}<, expected >${EXPECTED_OUTPUT}<"
set +ex # needed for stderr
OUTPUT="$(nvm version-remote --foo bar 2>&1)"
set -ex
EXPECTED_OUTPUT='Unsupported option "--foo".'
EXIT_CODE="$(nvm version-remote --foo bar >/dev/null 2>&1 && echo $? || echo $?)"
[ "${EXIT_CODE}" = 55 ] || die "\`nvm version-remote --foo bar\` did not exit with code 55, got >${EXIT_CODE}<"
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "\`nvm version-remote --foo bar\` errored with >${OUTPUT}<, expected >${EXPECTED_OUTPUT}<"
cleanup

View File

@@ -0,0 +1,72 @@
#!/bin/sh
cleanup () {
unset -f nvm_compute_checksum
}
die () { echo $@ ; cleanup ; exit 1; }
. ../../../nvm.sh
set -ex
nvm_compute_checksum() {
echo
}
set +x
OUTPUT="$(nvm_compare_checksum 2>&1 >/dev/null || echo)"
EXIT_CODE="$(nvm_compare_checksum >/dev/null 2>&1 || echo $?)"
set -x
EXPECTED_OUTPUT='Provided file to checksum is empty.'
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "expected >${EXPECTED_OUTPUT}<, got >${OUTPUT}<"
[ "${EXIT_CODE}" = 4 ] || die "expected to exit with code 4, got ${EXIT_CODE}"
set +x
OUTPUT="$(nvm_compare_checksum foo 2>&1 >/dev/null || echo)"
EXIT_CODE="$(nvm_compare_checksum foo >/dev/null 2>&1 || echo $?)"
set -x
EXPECTED_OUTPUT='Provided file to checksum does not exist.'
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "expected >${EXPECTED_OUTPUT}<, got >${OUTPUT}<"
[ "${EXIT_CODE}" = 3 ] || die "expected to exit with code 3, got ${EXIT_CODE}"
set +x
OUTPUT="$(nvm_compare_checksum ../../../nvm.sh 2>&1 >/dev/null || echo)"
EXIT_CODE="$(nvm_compare_checksum ../../../nvm.sh >/dev/null 2>&1 || echo $?)"
set -x
EXPECTED_OUTPUT='Provided checksum to compare to is empty.'
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "expected >${EXPECTED_OUTPUT}<, got >${OUTPUT}<"
[ "${EXIT_CODE}" = 2 ] || die "expected to exit with code 2, got ${EXIT_CODE}"
set +x
OUTPUT="$(nvm_compare_checksum ../../../nvm.sh checksum 2>&1 >/dev/null)"
EXIT_CODE="$(nvm_compare_checksum ../../../nvm.sh checksum >/dev/null 2>&1 ; echo $?)"
set -x
EXPECTED_OUTPUT="Computed checksum of '../../../nvm.sh' is empty.
WARNING: Continuing *without checksum verification*"
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "expected >${EXPECTED_OUTPUT}<, got >${OUTPUT}<"
[ "${EXIT_CODE}" = 0 ] || die "expected to exit with code 0, got ${EXIT_CODE}"
nvm_compute_checksum() {
echo "not checksum: ${1}"
}
set +x
OUTPUT="$(nvm_compare_checksum ../../../nvm.sh checksum 2>&1 >/dev/null || echo)"
EXIT_CODE="$(nvm_compare_checksum ../../../nvm.sh checksum >/dev/null 2>&1 || echo $?)"
set -x
EXPECTED_OUTPUT="Checksums do not match: 'not checksum: ../../../nvm.sh' found, 'checksum' expected."
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "expected >${EXPECTED_OUTPUT}<, got >${OUTPUT}<"
[ "${EXIT_CODE}" = 1 ] || die "expected to exit with code 1, got ${EXIT_CODE}"
nvm_compute_checksum() {
echo checksum
}
set +x
OUTPUT="$(nvm_compare_checksum ../../../nvm.sh checksum 2>&1 >/dev/null)"
EXIT_CODE="$(nvm_compare_checksum ../../../nvm.sh checksum >/dev/null 2>&1; echo $?)"
set -x
EXPECTED_OUTPUT='Checksums matched!'
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "expected >${EXPECTED_OUTPUT}<, got >${OUTPUT}<"
[ "${EXIT_CODE}" = 0 ] || die "expected to exit with code 0, got ${EXIT_CODE}"
cleanup

View File

@@ -0,0 +1,23 @@
#!/bin/sh
set -ex
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
set +x
OUTPUT="$(nvm_compute_checksum 2>&1 >/dev/null || echo)"
EXIT_CODE="$(nvm_compute_checksum >/dev/null 2>&1 || echo $?)"
set -x
EXPECTED_OUTPUT='Provided file to checksum is empty.'
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "expected >${EXPECTED_OUTPUT}<, got >${OUTPUT}<"
[ "${EXIT_CODE}" = 2 ] || die "expected to exit with code 2, got ${EXIT_CODE}"
set +x
OUTPUT="$(nvm_compute_checksum foo 2>&1 >/dev/null || echo)"
EXIT_CODE="$(nvm_compute_checksum foo >/dev/null 2>&1 || echo $?)"
set -x
EXPECTED_OUTPUT='Provided file to checksum does not exist.'
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "expected >${EXPECTED_OUTPUT}<, got >${OUTPUT}<"
[ "${EXIT_CODE}" = 1 ] || die "expected to exit with code 1, got ${EXIT_CODE}"

View File

@@ -36,7 +36,7 @@ nvm_has() { return 0; }
npm() {
local args
args="$@"
if [ "_$args" = "_config get prefix" ]; then
if [ "_$args" = "_config --loglevel=warn get prefix" ]; then
echo "$(nvm_version_dir new)/good prefix"
fi
}
@@ -60,7 +60,7 @@ EXIT_CODE="$(NPM_CONFIG_PREFIX=bar nvm_die_on_prefix 0 foo >/dev/null 2>&1; echo
npm() {
local args
args="$@"
if [ "_$args" = "_config get prefix" ]; then
if [ "_$args" = "_config --loglevel=warn get prefix" ]; then
echo "./bad prefix"
fi
}

View File

@@ -11,7 +11,9 @@ mkdir -p "$(nvm_version_path v0.1.2)"
OUTPUT="$(nvm_ensure_version_installed foo 2>&1)"
EXIT_CODE=$?
EXPECTED_OUTPUT='N/A: version "foo" is not yet installed'
EXPECTED_OUTPUT='N/A: version "foo" is not yet installed.
You need to run "nvm install foo" to install it before using it.'
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "expected 'nvm_ensure_version_installed foo' to give $EXPECTED_OUTPUT, got $OUTPUT"
[ "_$EXIT_CODE" = "_1" ] || die "expected 'nvm_ensure_version_installed foo' to exit with 1, got $EXIT_CODE"
@@ -23,7 +25,9 @@ EXIT_CODE=$?
# Special case for "iojs"
OUTPUT="$(nvm_ensure_version_installed iojs 2>&1)"
EXIT_CODE=$?
EXPECTED_OUTPUT='N/A: version "iojs" is not yet installed'
EXPECTED_OUTPUT='N/A: version "iojs" is not yet installed.
You need to run "nvm install iojs" to install it before using it.'
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "expected 'nvm_ensure_version_installed iojs' to give $EXPECTED_OUTPUT, got $OUTPUT"
[ "_$EXIT_CODE" = "_1" ] || die "expected 'nvm_ensure_version_installed iojs' to exit with 1, got $EXIT_CODE"

View File

@@ -32,6 +32,8 @@ setup_mock_arch() {
ln -sf "${MOCKS_DIR}/isainfo_${ARCH}" ./isainfo
if [ "_$OPT" != "_no_pkg_info" ]; then
ln -sf "${MOCKS_DIR}/pkg_info_${ARCH}" ./pkg_info
else
ln -sf "${MOCKS_DIR}/pkg_info_fail" ./pkg_info
fi
fi

View File

@@ -0,0 +1,45 @@
#!/bin/sh
set -ex
cleanup () {
unset -f nvm_download nvm_get_checksum_alg nvm_get_mirror
}
die () { echo $@ ; cleanup ; exit 1; }
set +e # TODO: fix
. ../../../nvm.sh
set -e
nvm_get_mirror() {
echo "mirror-${1}-${2}"
}
set +ex # needed to capture error output
OUTPUT="$(nvm_get_checksum 2>&1 >/dev/null)"
EXPECTED_OUTPUT='supported flavors: node, iojs'
EXIT_CODE="$(nvm_get_checksum >/dev/null 2>&1 ; echo $?)"
set -ex
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "expected error output >${EXPECTED_OUTPUT}<, got >${OUTPUT}<"
[ "${EXIT_CODE}" = 2 ] || die "expected exit code 2, got ${EXIT_CODE}"
nvm_download() {
echo "ERROR_FAILED_MATCH no_match more fields"
echo "${3} bar.tar.baz more fields"
}
nvm_get_checksum_alg() {
echo 'sha-256'
}
OUTPUT="$(nvm_get_checksum node std foo bar baz)"
EXPECTED_OUTPUT="mirror-node-std/foo/SHASUMS256.txt"
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "expected >${EXPECTED_OUTPUT}<, got >${OUTPUT}<"
nvm_get_checksum_alg() {
echo 'sha-1'
}
OUTPUT="$(nvm_get_checksum iojs std foo bar baz)"
EXPECTED_OUTPUT="mirror-iojs-std/foo/SHASUMS.txt"
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "expected >${EXPECTED_OUTPUT}<, got >${OUTPUT}<"
cleanup

View File

@@ -0,0 +1,18 @@
#!/bin/sh
set -ex
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
ALG="$(nvm_get_checksum_alg)"
case "$ALG" in
'sha-256' | 'sha-1')
echo 'sha-256 or sha-1 found'
;;
*)
die "sha-256 or sha-1 not found: found ${ALG}"
;;
esac

View File

@@ -0,0 +1,16 @@
#!/bin/sh
set -ex
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
! nvm_get_mirror || die 'unknown release type did not error'
! nvm_get_mirror node || die 'unknown release type did not error'
! nvm_get_mirror iojs || die 'unknown release type did not error'
! nvm_get_mirror node foo || die 'unknown release type did not error'
! nvm_get_mirror iojs foo || die 'unknown release type did not error'
[ "$(nvm_get_mirror node std)" = "${NVM_NODEJS_ORG_MIRROR}" ] || die 'node std did not yield NVM_NODEJS_ORG_MIRROR'
[ "$(nvm_get_mirror iojs std)" = "${NVM_IOJS_ORG_MIRROR}" ] || die 'node std did not yield NVM_NODEJS_ORG_MIRROR'

View File

@@ -1,17 +1,17 @@
#!/bin/sh
cleanup () {
rm ../../../versions/io.js/v0.1.2/node
rm ../../../versions/io.js/v0.1.2/iojs
rmdir ../../../versions/io.js/v0.1.2
rm "${NVM_DIR}/versions/io.js/v0.1.2/node"
rm "${NVM_DIR}/versions/io.js/v0.1.2/iojs"
rmdir "${NVM_DIR}/versions/io.js/v0.1.2"
}
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
mkdir ../../../versions/io.js/v0.1.2
touch ../../../versions/io.js/v0.1.2/node
touch ../../../versions/io.js/v0.1.2/iojs
mkdir "${NVM_DIR}/versions/io.js/v0.1.2"
touch "${NVM_DIR}/versions/io.js/v0.1.2/node"
touch "${NVM_DIR}/versions/io.js/v0.1.2/iojs"
nvm use iojs-v0.1.2
@@ -28,4 +28,3 @@ if command -v iojs; then
else
! nvm_has_system_iojs
fi

View File

@@ -1,15 +1,14 @@
#!/bin/sh
cleanup () {
rm ../../../v0.1.2/node
rmdir ../../../v0.1.2
}
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
mkdir ../../../v0.1.2
touch ../../../v0.1.2/node
cleanup () {
rm -rf "${NVM_DIR}/v0.1.2/node"
}
die () { echo $@ ; exit 1; }
mkdir "${NVM_DIR}/v0.1.2"
touch "${NVM_DIR}/v0.1.2/node"
nvm use 0.1.2
@@ -26,4 +25,3 @@ if command -v node; then
else
! nvm_has_system_node
fi

View File

@@ -8,13 +8,15 @@ cleanup() {
. ../../../nvm.sh
MOCKS_DIR="$PWD/mocks"
# sample output at the time the test was written
TAB_PATH="$PWD/mocks/nodejs.org-dist-index.tab"
TAB_PATH="$MOCKS_DIR/nodejs.org-dist-index.tab"
nvm_download() {
cat "$TAB_PATH"
}
EXPECTED_OUTPUT_PATH="$PWD/mocks/nvm_ls_remote.txt"
EXPECTED_OUTPUT_PATH="$MOCKS_DIR/nvm_ls_remote.txt"
OUTPUT="$(nvm_ls_remote foo)"
EXIT_CODE="$(nvm_ls_remote foo >/dev/null 2>&1 ; echo $?)"
@@ -40,7 +42,8 @@ v0.3.8"
# Sanity checks
OUTPUT="$(nvm_print_implicit_alias remote stable)"
EXPECTED_OUTPUT="6.0"
EXPECTED_OUTPUT_PATH="${MOCKS_DIR}/nvm_print_implicit_alias remote stable.txt"
EXPECTED_OUTPUT="$(cat "${EXPECTED_OUTPUT_PATH}")"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_print_implicit_alias remote stable did not output $EXPECTED_OUTPUT; got $OUTPUT"
OUTPUT="$(nvm_print_implicit_alias remote unstable)"
@@ -48,11 +51,23 @@ EXPECTED_OUTPUT="0.11"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_print_implicit_alias remote unstable did not output $EXPECTED_OUTPUT; got $OUTPUT"
OUTPUT="$(nvm_ls_remote stable)"
EXPECTED_OUTPUT="v6.0.0"
EXPECTED_OUTPUT_PATH="${MOCKS_DIR}/nvm_ls_remote stable.txt"
EXPECTED_OUTPUT="$(cat "${EXPECTED_OUTPUT_PATH}")"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_ls_remote stable did not output $EXPECTED_OUTPUT; got $OUTPUT"
OUTPUT="$(nvm_ls_remote unstable)"
EXPECTED_OUTPUT="v0.11.16"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_ls_remote unstable did not output $EXPECTED_OUTPUT; got $OUTPUT"
EXPECTED_OUTPUT_PATH="$MOCKS_DIR/nvm_ls_remote LTS.txt"
EXPECTED_OUTPUT="$(cat "$EXPECTED_OUTPUT_PATH")"
OUTPUT="$(NVM_LTS='*' nvm_ls_remote)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "\`NVM_LTS='*' nvm_ls_remote\` did not output >$EXPECTED_OUTPUT<; got >$OUTPUT<"
EXPECTED_OUTPUT_PATH="$MOCKS_DIR/nvm_ls_remote LTS argon.txt"
EXPECTED_OUTPUT="$(cat "$EXPECTED_OUTPUT_PATH")"
OUTPUT="$(NVM_LTS=argon nvm_ls_remote)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "\`NVM_LTS=argon nvm_ls_remote\` did not output >$EXPECTED_OUTPUT<; got >$OUTPUT<"
cleanup

View File

@@ -0,0 +1,48 @@
#!/bin/sh
die () { echo $@ ; cleanup ; exit 1; }
TEST_PATH="$PWD/test_output"
mkdir -p "$TEST_PATH"
CALL_COUNT_PATH="$TEST_PATH/call_count.txt"
: > "$CALL_COUNT_PATH"
ALIAS_ARGS_PATH="$TEST_PATH/nvm_make_alias_args.txt"
: > "$ALIAS_ARGS_PATH"
cleanup() {
unset -f nvm_download nvm_make_alias
rm -rf "$TEST_PATH"
}
. ../../../nvm.sh
set -ex
MOCKS_DIR="$PWD/mocks"
# sample output at the time the test was written
TAB_PATH="$MOCKS_DIR/nodejs.org-dist-index.tab"
nvm_download() {
cat "$TAB_PATH"
}
nvm_make_alias() {
CALL_COUNT="$(cat "$CALL_COUNT_PATH")"
CALL_COUNT="$((CALL_COUNT + 1))"
echo "$CALL_COUNT" > "$CALL_COUNT_PATH"
echo "${1}|${2}" >> "$ALIAS_ARGS_PATH"
}
nvm_ls_remote >/dev/null || die "nvm_ls_remote_failed?!"
CALL_COUNT="$(cat "$CALL_COUNT_PATH")"
EXPECTED_COUNT=3
[ "$CALL_COUNT" = "$EXPECTED_COUNT" ] || die "nvm_make_alias called $CALL_COUNT times; expected $EXPECTED_COUNT"
ARGS="$(cat "$ALIAS_ARGS_PATH")"
EXPECTED_ARGS_PATH="$MOCKS_DIR/nvm_make_alias LTS alias calls.txt"
EXPECTED_ARGS="$(cat "$EXPECTED_ARGS_PATH")"
[ "${ARGS}" = "${EXPECTED_ARGS}" ] || die "nvm_make_alias called with >${ARGS}<; expected >${EXPECTED_ARGS}<"
cleanup

View File

@@ -2,25 +2,25 @@
die () { echo $@ ; cleanup ; exit 1; }
cleanup() {
rm -rf ../../../v0.2.3
rm -rf ../../../v0.3.4
rm -rf ../../../v0.4.6
rm -rf ../../../v0.5.7
rm -rf ../../../v0.7.7
rm -rf ../../../versions/io.js/v0.98.0
rm -rf ../../../versions/node/v1.0.0
rm -rf ../../../versions/node/v1.1.0
rm -rf "${NVM_DIR}/v0.2.3"
rm -rf "${NVM_DIR}/v0.3.4"
rm -rf "${NVM_DIR}/v0.4.6"
rm -rf "${NVM_DIR}/v0.5.7"
rm -rf "${NVM_DIR}/v0.7.7"
rm -rf "${NVM_DIR}/versions/io.js/v0.98.0"
rm -rf "${NVM_DIR}/versions/node/v1.0.0"
rm -rf "${NVM_DIR}/versions/node/v1.1.0"
unset -f nvm_ls_remote nvm_ls_remote_iojs
}
. ../../../nvm.sh
mkdir ../../../v0.2.3
mkdir ../../../v0.3.4
mkdir ../../../v0.4.6
mkdir ../../../v0.5.7
mkdir ../../../v0.7.7
mkdir -p ../../../versions/io.js/v0.98.0
mkdir "${NVM_DIR}/v0.2.3"
mkdir "${NVM_DIR}/v0.3.4"
mkdir "${NVM_DIR}/v0.4.6"
mkdir "${NVM_DIR}/v0.5.7"
mkdir "${NVM_DIR}/v0.7.7"
mkdir -p "${NVM_DIR}/versions/io.js/v0.98.0"
LATEST_STABLE="$(nvm_print_implicit_alias local stable)"
[ "_$LATEST_STABLE" = "_0.4" ] || die "local stable is not latest even minor: expected 0.4, got $LATEST_STABLE"
@@ -35,8 +35,8 @@ LATEST_IOJS="$(nvm_print_implicit_alias local iojs)"
[ "_$LATEST_IOJS" = "_iojs-v0.98" ] || die "local iojs is not latest iojs: expected iojs-v0.98, got $LATEST_IOJS"
## node post v1.0/io.js merger ##
mkdir -p ../../../versions/node/v1.0.0
mkdir -p ../../../versions/node/v1.1.0
mkdir -p "${NVM_DIR}/versions/node/v1.0.0"
mkdir -p "${NVM_DIR}/versions/node/v1.1.0"
LATEST_STABLE="$(nvm_print_implicit_alias local stable)"
[ "_$LATEST_STABLE" = "_1.1" ] || die "local stable when post-v1.0 exists is not latest: expected 1.1, got $LATEST_STABLE"
@@ -102,4 +102,3 @@ LATEST_UNSTABLE="$(nvm_print_implicit_alias remote unstable)"
## ** ##
cleanup

View File

@@ -26,34 +26,34 @@ EXIT_CODE="$(nvm_remote_version iojs-foo >/dev/null 2>&1 ; echo $?)"
nvm_ls_remote() {
if ! nvm_is_iojs_version "$1"; then
echo "test output"
echo "more test output"
echo "pattern received: _$1_"
if [ -z "$1" ] || ! nvm_is_iojs_version "$1"; then
echo "test_output"
echo "more_test_output"
echo "pattern_received:_$1_"
fi
}
nvm_ls_remote_iojs() {
if [ -z "$1" ] || nvm_is_iojs_version "$1"; then
echo "test iojs output"
echo "more iojs test output"
echo "iojs pattern received: _$1_"
echo "test_iojs_output"
echo "more_iojs_test_output"
echo "iojs_pattern_received:_$1_"
fi
}
OUTPUT="$(nvm_remote_version foo)"
EXIT_CODE="$(nvm_remote_version foo >/dev/null 2>&1 ; echo $?)"
[ "_$OUTPUT" = "_pattern received: _foo_" ] \
[ "_$OUTPUT" = "_pattern_received:_foo_" ] \
|| die "nvm_remote_version foo did not return last line only of nvm_ls_remote foo; got $OUTPUT"
[ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_version foo did not exit with 0, got $EXIT_CODE"
OUTPUT="$(nvm_remote_version iojs-foo)"
EXIT_CODE="$(nvm_remote_version iojs-foo >/dev/null 2>&1 ; echo $?)"
[ "_$OUTPUT" = "_iojs pattern received: _iojs-foo_" ] \
[ "_$OUTPUT" = "_iojs_pattern_received:_iojs-foo_" ] \
|| die "nvm_remote_version iojs-foo did not return last line only of nvm_ls_remote_iojs foo; got $OUTPUT"
[ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_version iojs-foo did not exit with 0, got $EXIT_CODE"
OUTPUT="$(nvm_remote_version iojs)"
EXIT_CODE="$(nvm_remote_version iojs >/dev/null 2>&1 ; echo $?)"
[ "_$OUTPUT" = "_iojs pattern received: __" ] \
[ "_$OUTPUT" = "_iojs_pattern_received:__" ] \
|| die "nvm_remote_version iojs did not return last line only of nvm_ls_remote_iojs; got $OUTPUT"
[ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_version iojs did not exit with 0, got $EXIT_CODE"

View File

@@ -1,5 +1,7 @@
#!/bin/sh
set -ex
(
cd ../..

View File

@@ -1,5 +1,7 @@
#!/bin/sh
set -ex
(
cd ../..

View File

@@ -1,5 +1,7 @@
#!/bin/sh
set -ex
# Remove temporary files
(
cd ../..

View File

@@ -1,5 +1,7 @@
#!/bin/sh
set -ex
(
cd ../..

View File

@@ -0,0 +1,25 @@
#!/bin/sh
cleanup () {
unset -f die cleanup
unset install_dir
}
die () { echo $@ ; cleanup ; exit 1; }
NVM_ENV=testing . ../../install.sh
HOME="__home__"
# NVM_DIR is set
NVM_DIR="some_dir"
install_dir=$(nvm_install_dir)
[ "_$install_dir" = "_$NVM_DIR" ] || die "nvm_install_dir should use \$NVM_DIR if it exists. Current output: $install_dir"
unset NVM_DIR
# NVM_DIR is not set
install_dir=$(nvm_install_dir)
[ "_$install_dir" = "_$HOME/.nvm" ] || die "nvm_install_dir should default to \$HOME/.nvm. Current output: $install_dir"
cleanup

View File

@@ -5,12 +5,21 @@ cleanup () {
}
die () { echo $@ ; cleanup ; exit 1; }
NVM_ENV=testing . ../../install.sh
safe_type() {
type "$1" > /dev/null 2>&1
type "$1"
}
# precondition: the names should be unset
! safe_type nvm_do_install || die 'nvm_do_install is still available'
! safe_type nvm_has || die 'nvm_has is still available'
! safe_type nvm_download || die 'nvm_download is still available'
! safe_type install_nvm_as_script || die 'install_nvm_as_script is still available'
! safe_type install_nvm_from_git || die 'install_nvm_from_git is still available'
! safe_type nvm_reset || die 'nvm_reset is still available'
! safe_type nvm_detect_profile || die 'nvm_detect_profile is still available'
NVM_ENV=testing . ../../install.sh
# Check nvm_reset exists
safe_type nvm_reset || die 'nvm_reset is not available'

View File

@@ -1,19 +0,0 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
NVM_TEST_VERSION="v1.0.0"
NVM_PREFIXED_TEST_VERSION="iojs-$NVM_TEST_VERSION"
# Remove the stuff we're clobbering.
[ -e ../../../$NVM_TEST_VERSION ] && rm -R ../../../$NVM_TEST_VERSION
# Install from binary
nvm install $NVM_PREFIXED_TEST_VERSION || die "install $NVM_PREFIXED_TEST_VERSION failed"
# Check
[ -d ../../../versions/io.js/$NVM_TEST_VERSION ]
nvm run $NVM_PREFIXED_TEST_VERSION --version | grep $NVM_TEST_VERSION || die "'nvm run $NVM_PREFIXED_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

View File

@@ -1,24 +0,0 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
NVM_TEST_VERSION=v1.0.0
NVM_PREFIXED_TEST_VERSION="iojs-$NVM_TEST_VERSION"
VERSION_PATH="../../../versions/io.js/$NVM_TEST_VERSION"
# Remove the stuff we're clobbering.
[ -e $VERSION_PATH ] && rm -R $VERSION_PATH
# Install from binary
echo "$NVM_PREFIXED_TEST_VERSION" > .nvmrc
nvm install || die "'nvm install' failed"
# Check
[ -d $VERSION_PATH ] || die "./$VERSION_PATH did not exist"
nvm run $NVM_PREFIXED_TEST_VERSION --version | grep $NVM_TEST_VERSION \
|| "'nvm run $NVM_PREFIXED_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

View File

@@ -1,23 +0,0 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
nvm unalias default || die 'unable to unalias default'
NVM_TEST_VERSION=v0.10.7
# Remove the stuff we're clobbering.
[ -e ../../../$NVM_TEST_VERSION ] && rm -R ../../../$NVM_TEST_VERSION
# Install from source
nvm install -s $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed"
# Check
[ -d ../../../$NVM_TEST_VERSION ]
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"
# ensure default is set
NVM_CURRENT_DEFAULT="$(nvm_alias default)"
[ "$NVM_CURRENT_DEFAULT" = "$NVM_TEST_VERSION" ] || die "wrong default alias: $(nvm alias)"

View File

@@ -2,13 +2,13 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
. ../../nvm.sh
[ "$(nvm install invalid.invalid 2>&1)" = "Version 'invalid.invalid' not found - try \`nvm ls-remote\` to browse available versions." ] || die "nvm installing an invalid version did not print a nice error message"
# Remove the stuff we're clobbering.
[ -e ../../../versions/io.js/v1.0.0 ] && rm -R ../../../versions/io.js/v1.0.0
[ -e ../../../versions/io.js/v1.0.1 ] && rm -R ../../../versions/io.js/v1.0.1
[ -e "${NVM_DIR}/versions/io.js/v1.0.0" ] && rm -R "${NVM_DIR}/versions/io.js/v1.0.0"
[ -e "${NVM_DIR}/versions/io.js/v1.0.1" ] && rm -R "${NVM_DIR}/versions/io.js/v1.0.1"
# Install from binary
nvm install iojs-v1.0.0
@@ -23,4 +23,3 @@ nvm install iojs-v1.0.1
node --version | grep v1.0.1 || die "nvm install on already installed version doesn't use it (node binary)"
iojs --version | grep v1.0.1 || die "nvm install on already installed version doesn't use it (iojs binary)"

View File

@@ -0,0 +1,18 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
. ../../nvm.sh
NVM_TEST_VERSION="v1.0.0"
NVM_PREFIXED_TEST_VERSION="iojs-$NVM_TEST_VERSION"
# Remove the stuff we're clobbering.
[ -e "${NVM_DIR}/versions/io.js/${NVM_TEST_VERSION}" ] && rm -R "${NVM_DIR}/versions/io.js/${NVM_TEST_VERSION}"
# Install from binary
nvm install $NVM_PREFIXED_TEST_VERSION || die "install $NVM_PREFIXED_TEST_VERSION failed"
# Check
[ -d "${NVM_DIR}/versions/io.js/${NVM_TEST_VERSION}" ]
nvm run "${NVM_PREFIXED_TEST_VERSION}" --version | grep "${NVM_TEST_VERSION}" || die "'nvm run ${NVM_PREFIXED_TEST_VERSION} --version | grep ${NVM_TEST_VERSION}' failed"

View File

@@ -0,0 +1,22 @@
#!/bin/sh
. ../common.sh
die () { echo $@ ; exit 1; }
. ../../nvm.sh
set -ex
NVM_TEST_VERSION='v3.3.1'
NVM_PREFIXED_TEST_VERSION="iojs-${NVM_TEST_VERSION}"
# Remove the stuff we're clobbering.
nvm uninstall "${NVM_TEST_VERSION}" || echo 'not installed'
# Install from source
(watch nvm install -s "${NVM_PREFIXED_TEST_VERSION}") || die "'nvm install -s ${NVM_PREFIXED_TEST_VERSION}' failed"
# Check
nvm_is_version_installed "${NVM_PREFIXED_TEST_VERSION}" || die 'version not installed'
nvm run "${NVM_PREFIXED_TEST_VERSION}" --version | grep "${NVM_TEST_VERSION}" || "'nvm run ${NVM_PREFIXED_TEST_VERSION} --version | grep ${NVM_TEST_VERSION}' failed"

View File

@@ -2,19 +2,19 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
. ../../nvm.sh
# Remove the stuff we're clobbering.
[ -e ../../../versions/io.js/v1.0.0 ] && rm -R ../../../versions/io.js/v1.0.0
[ -e ../../../versions/io.js/v1.0.1 ] && rm -R ../../../versions/io.js/v1.0.1
[ -e "${NVM_DIR}/versions/io.js/v1.0.0" ] && rm -R "${NVM_DIR}/versions/io.js/v1.0.0"
[ -e "${NVM_DIR}/versions/io.js/v1.0.1" ] && rm -R "${NVM_DIR}/versions/io.js/v1.0.1"
# Install from binary
nvm install iojs-v1.0.0 || die "'nvm install iojs-v1.0.0' failed"
nvm i iojs-v1.0.1 || die "'nvm i iojs-v1.0.1' failed"
# Check
[ -d ../../../versions/io.js/v1.0.0 ] || die "iojs v1.0.0 didn't exist"
[ -d ../../../versions/io.js/v1.0.1 ] || die "iojs v1.0.1 didn't exist"
[ -d "${NVM_DIR}/versions/io.js/v1.0.0" ] || die "iojs v1.0.0 didn't exist"
[ -d "${NVM_DIR}/versions/io.js/v1.0.1" ] || die "iojs v1.0.1 didn't exist"
# Use the first one
nvm use iojs-1.0.0 || die "'nvm use iojs-1.0.0' failed"
@@ -23,4 +23,3 @@ nvm use iojs-1.0.0 || die "'nvm use iojs-1.0.0' failed"
nvm use iojs-1 || die "'nvm use iojs-1' failed"
[ "_$(node --version)" = "_v1.0.1" ] || die "'node --version' was not v1.0.1, got: $(node --version)"
[ "_$(iojs --version)" = "_v1.0.1" ] || die "'iojs --version' was not v1.0.1, got: $(iojs --version)"

View File

@@ -0,0 +1,22 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
. ../../nvm.sh
NVM_TEST_VERSION=v1.0.0
NVM_PREFIXED_TEST_VERSION="iojs-${NVM_TEST_VERSION}"
VERSION_PATH="${NVM_DIR}/versions/io.js/${NVM_TEST_VERSION}"
# Remove the stuff we're clobbering.
[ -e "${VERSION_PATH}" ] && rm -R "${VERSION_PATH}"
# Install from binary
echo "${NVM_PREFIXED_TEST_VERSION}" > .nvmrc
nvm install || die "'nvm install' failed"
# Check
[ -d "${VERSION_PATH}" ] || die "./${VERSION_PATH} did not exist"
nvm run "${NVM_PREFIXED_TEST_VERSION}" --version | grep "${NVM_TEST_VERSION}" \
|| "'nvm run \'${NVM_PREFIXED_TEST_VERSION}\' --version | grep \'${NVM_TEST_VERSION}\'' failed"

View File

@@ -0,0 +1,23 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
. ../../nvm.sh
set -ex
NVM_TEST_VERSION='v3.3.0'
NVM_PREFIXED_TEST_VERSION="iojs-${NVM_TEST_VERSION}"
# Remove the stuff we're clobbering.
nvm uninstall "${NVM_TEST_VERSION}" || echo 'not installed'
# Install from binary
echo "${NVM_PREFIXED_TEST_VERSION}" > .nvmrc
nvm install -s || "'nvm install -s' failed"
# Check
nvm_is_version_installed "${NVM_PREFIXED_TEST_VERSION}" || die 'version is not installed'
nvm run "${NVM_PREFIXED_TEST_VERSION}" --version | grep "${NVM_TEST_VERSION}" \
|| die "'nvm run ${NVM_PREFIXED_TEST_VERSION} --version | grep ${NVM_TEST_VERSION}' failed"

View File

@@ -2,17 +2,17 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
. ../../nvm.sh
# Remove the stuff we're clobbering.
[ -e ../../../versions/io.js/v1.0.0 ] && rm -R ../../../versions/io.js/v1.0.0
[ -e ../../../versions/io.js/v1.0.1 ] && rm -R ../../../versions/io.js/v1.0.1
[ -e "${NVM_DIR}/versions/io.js/v1.0.0" ] && rm -R "${NVM_DIR}/versions/io.js/v1.0.0"
[ -e "${NVM_DIR}/versions/io.js/v1.0.1" ] && rm -R "${NVM_DIR}/versions/io.js/v1.0.1"
# Install from binary
nvm install iojs-v1.0.0
# Check
[ -d ../../../versions/io.js/v1.0.0 ] || die "nvm install iojs-v1.0.0 didn't install"
[ -d "${NVM_DIR}/versions/io.js/v1.0.0" ] || die "nvm install iojs-v1.0.0 didn't install"
node --version | grep v1.0.0 > /dev/null || die "nvm install didn't use iojs-v1.0.0"
@@ -23,10 +23,9 @@ nvm ls iojs-1 | grep iojs-v1.0.0 > /dev/null || die "nvm ls iojs-1 didn't show i
nvm install iojs-v1.0.1 --reinstall-packages-from=iojs-1.0.0 || die "nvm install iojs-v1.0.1 --reinstall-packages-from=iojs-1.0.0 failed"
[ -d ../../../versions/io.js/v1.0.1 ] || die "nvm install iojs-v1.0.1 didn't install"
[ -d "${NVM_DIR}/versions/io.js/v1.0.1" ] || die "nvm install iojs-v1.0.1 didn't install"
nvm use iojs-1
node --version | grep v1.0.1 > /dev/null || die "nvm use iojs-1 didn't use v1.0.1"
npm list --global | grep object-is > /dev/null || die "object-is isn't installed"

View File

@@ -2,19 +2,18 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
. ../../nvm.sh
NVM_VERSION="v1"
NVM_PREFIXED_TEST_VERSION="$(nvm ls-remote "$NVM_VERSION" | tail -n1 | sed 's/^[ ]*//;s/[ ]*$//')"
NVM_PREFIXED_TEST_VERSION="$(nvm ls-remote "$NVM_VERSION" | tail -1 | sed 's/^[ ]*//;s/[ ]*$//')"
NVM_TEST_VERSION="$(nvm_strip_iojs_prefix "$NVM_PREFIXED_TEST_VERSION")"
# Remove the stuff we're clobbering.
[ -e ../../../$NVM_TEST_VERSION ] && rm -R ../../../$NVM_TEST_VERSION
[ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION
# Install from binary
nvm install "$NVM_VERSION" || die "nvm install $NVM_VERSION failed"
# Check
[ -d ../../../versions/io.js/$NVM_TEST_VERSION ]
[ -d "${NVM_DIR}/versions/io.js/$NVM_TEST_VERSION" ]
nvm run $NVM_PREFIXED_TEST_VERSION --version | grep $NVM_TEST_VERSION || die "'nvm run $NVM_PREFIXED_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

View File

@@ -1,8 +1,11 @@
#!/bin/sh
. ../../../nvm.sh
. ../../nvm.sh
nvm deactivate
nvm uninstall iojs-v1.0.0
nvm uninstall iojs-v1.0.3
nvm uninstall iojs-v3.3.0
nvm uninstall iojs-v3.3.1
if [ -f ".nvmrc" ]; then
rm .nvmrc

View File

@@ -0,0 +1,31 @@
#!/bin/sh
set -ex
die () { echo $@ ; exit 1; }
. ../../nvm.sh
nvm unalias default >/dev/null 2>&1 || die 'unable to unalias default'
set +ex # needed for stderr
OUTPUT="$(nvm install --lts 3 2>&1)"
set -ex
EXIT_CODE="$(nvm install --lts 3 >/dev/null 2>&1 && echo $? || echo $?)"
EXPECTED_OUTPUT="Version '3' (with LTS filter) not found - try \`nvm ls-remote --lts\` to browse available versions."
[ "${EXIT_CODE}" = 3 ] || die "\`nvm install --lts 3\` did not exit with 3, got >${EXIT_CODE}<"
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "\`nvm install --lts 3\` output >${OUTPUT}<, expected >${EXPECTED_OUTPUT}<"
set +ex # needed for stderr
OUTPUT="$(nvm install --lts=argon 3 2>&1)"
set -ex
EXIT_CODE="$(nvm install --lts=argon 3 >/dev/null 2>&1 && echo $? || echo $?)"
EXPECTED_OUTPUT="Version '3' (with LTS filter 'argon') not found - try \`nvm ls-remote --lts=argon\` to browse available versions."
[ "${EXIT_CODE}" = 3 ] || die "\`nvm install --lts=argon 3\` did not exit with 3, got >${EXIT_CODE}<"
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "\`nvm install --lts=argon 3\` output >${OUTPUT}<, expected >${EXPECTED_OUTPUT}<"
set +e # TODO: fix
nvm install --lts 4.2.2 || die 'nvm install --lts 4.2.2 failed'
set -e
[ "$(nvm current)" = "v4.2.2" ] || die "v4.2.2 not current, got $(nvm_current)"

View File

@@ -2,13 +2,13 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
. ../../nvm.sh
[ "$(nvm install invalid.invalid 2>&1)" = "Version 'invalid.invalid' not found - try \`nvm ls-remote\` to browse available versions." ] || die "nvm installing an invalid version did not print a nice error message"
# Remove the stuff we're clobbering.
[ -e ../../../v0.9.7 ] && rm -R ../../../v0.9.7
[ -e ../../../v0.9.12 ] && rm -R ../../../v0.9.12
[ -e "${NVM_DIR}/v0.9.7" ] && rm -R "${NVM_DIR}/v0.9.7"
[ -e "${NVM_DIR}/v0.9.12" ] && rm -R "${NVM_DIR}/v0.9.12"
# Install from binary
nvm install 0.9.7
@@ -21,4 +21,3 @@ node --version | grep v0.9.7 || die "precondition failed: node doesn't start at
nvm install 0.9.12
node --version | grep v0.9.12 || die "nvm install on already installed version doesn't use it"

View File

@@ -2,20 +2,20 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
. ../../nvm.sh
nvm unalias default || die 'unable to unalias default'
NVM_TEST_VERSION=v0.10.7
# Remove the stuff we're clobbering.
[ -e ../../../$NVM_TEST_VERSION ] && rm -R ../../../$NVM_TEST_VERSION
[ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION
# Install from binary
nvm install $NVM_TEST_VERSION || die "install $NVM_TEST_VERSION failed"
# Check
[ -d ../../../$NVM_TEST_VERSION ]
[ -d ../../$NVM_TEST_VERSION ]
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || die "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"
# ensure default is set

View File

@@ -0,0 +1,29 @@
#!/bin/sh
set -ex
die () { echo $@ ; exit 1; }
set +e # TODO: fix
. ../../nvm.sh
set -e
nvm deactivate || die 'deactivate failed'
nvm unalias default || die 'unable to unalias default'
NVM_TEST_VERSION=v0.10.7
# Remove the stuff we're clobbering.
nvm uninstall "${NVM_TEST_VERSION}" || die 'nvm uninstall failed'
# Install from source
nvm install -s "${NVM_TEST_VERSION}" || die "'nvm install -s ${NVM_TEST_VERSION}' failed"
# Check
[ -d ../../$NVM_TEST_VERSION ] || die "../../${NVM_TEST_VERSION} is not a directory"
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run ${NVM_TEST_VERSION} --version | grep ${NVM_TEST_VERSION}' failed"
# ensure default is set
NVM_CURRENT_DEFAULT="$(nvm_alias default)"
[ "${NVM_CURRENT_DEFAULT}" = "${NVM_TEST_VERSION}" ] || die "wrong default alias: $(nvm alias)"

View File

@@ -1,18 +1,24 @@
#!/bin/sh
set -ex
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
set +e # TODO: fix
. ../../nvm.sh
set -e
nvm deactivate || die 'deactivate failed'
NVM_TEST_VERSION=v0.8.5
# Remove the stuff we're clobbering.
[ -e ../../../$NVM_TEST_VERSION ] && rm -R ../../../$NVM_TEST_VERSION
nvm uninstall "${NVM_TEST_VERSION}" || die 'uninstall failed'
# Install from source implicitly (v0.8.6 is when binaries started)
nvm install $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed"
# Check
[ -d ../../../$NVM_TEST_VERSION ]
[ -d ../../$NVM_TEST_VERSION ]
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

View File

@@ -2,20 +2,20 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
. ../../nvm.sh
NVM_TEST_VERSION=v0.10.41
# STAGE 1 #
# Remove the stuff we're clobbering.
[ -e ../../../$NVM_TEST_VERSION ] && rm -R ../../../$NVM_TEST_VERSION
[ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION
# Install from source with 1 make job
nvm install -s -j 1 $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed"
# Check
[ -d ../../../$NVM_TEST_VERSION ]
[ -d ../../$NVM_TEST_VERSION ]
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"
@@ -23,11 +23,11 @@ nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_T
# STAGE 2 #
# Remove the stuff we're clobbering.
[ -e ../../../$NVM_TEST_VERSION ] && rm -R ../../../$NVM_TEST_VERSION
[ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION
# Install from source with 2 make jobs (and swapped arg order)
nvm install -j 2 -s $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed"
# Check
[ -d ../../../$NVM_TEST_VERSION ]
[ -d ../../$NVM_TEST_VERSION ]
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION || "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

View File

@@ -2,12 +2,12 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
. ../../nvm.sh
NVM_TEST_VERSION=v0.10.7
# Remove the stuff we're clobbering.
[ -e ../../../$NVM_TEST_VERSION ] && rm -R ../../../$NVM_TEST_VERSION
[ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION
# Fake ARM arch
nvm_get_arch() {
@@ -18,7 +18,7 @@ nvm_get_arch() {
nvm install -s $NVM_TEST_VERSION || die "'nvm install -s $NVM_TEST_VERSION' failed"
# Check Install
[ -d ../../../$NVM_TEST_VERSION ]
[ -d ../../$NVM_TEST_VERSION ]
node --version | grep $NVM_TEST_VERSION || "'node --version | grep $NVM_TEST_VERSION' failed"
# Check V8 snapshot isn't compiled

View File

@@ -2,19 +2,19 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
. ../../nvm.sh
# Remove the stuff we're clobbering.
[ -e ../../../v0.9.7 ] && rm -R ../../../v0.9.7
[ -e ../../../v0.9.12 ] && rm -R ../../../v0.9.12
[ -e "${NVM_DIR}/v0.9.7" ] && rm -R "${NVM_DIR}/v0.9.7"
[ -e "${NVM_DIR}/v0.9.12" ] && rm -R "${NVM_DIR}/v0.9.12"
# Install from binary
nvm install 0.9.7 || die "'nvm install 0.9.7' failed"
nvm i 0.9.12 || die "'nvm i 0.9.12' failed"
# Check
[ -d ../../../v0.9.7 ] || die "v0.9.7 didn't exist"
[ -d ../../../v0.9.12 ] || die "v0.9.12 didn't exist"
[ -d "${NVM_DIR}/v0.9.7" ] || die "v0.9.7 didn't exist"
[ -d "${NVM_DIR}/v0.9.12" ] || die "v0.9.12 didn't exist"
# Use the first one
nvm use 0.9.7 || die "'nvm use 0.9.7' failed"
@@ -22,4 +22,3 @@ nvm use 0.9.7 || die "'nvm use 0.9.7' failed"
# Use the latest one
nvm use 0.9 || die "'nvm use 0.9' failed"
node --version | grep v0.9.12 || die "'node --version' was not v0.9.12, got: $(node --version)"

View File

@@ -2,12 +2,12 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
. ../../nvm.sh
NVM_TEST_VERSION=v0.10.7
# Remove the stuff we're clobbering.
[ -e ../../../$NVM_TEST_VERSION ] && rm -R ../../../$NVM_TEST_VERSION
[ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION
# Install from binary
echo "$NVM_TEST_VERSION" > .nvmrc
@@ -15,7 +15,7 @@ echo "$NVM_TEST_VERSION" > .nvmrc
nvm install || die "'nvm install' failed"
# Check
[ -d ../../../$NVM_TEST_VERSION ] || die "./$NVM_TEST_VERSION did not exist"
[ -d ../../$NVM_TEST_VERSION ] || die "./$NVM_TEST_VERSION did not exist"
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION \
|| "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

View File

@@ -2,12 +2,12 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
. ../../nvm.sh
NVM_TEST_VERSION=v0.10.7
# Remove the stuff we're clobbering.
[ -e ../../../$NVM_TEST_VERSION ] && rm -R ../../../$NVM_TEST_VERSION
[ -e ../../$NVM_TEST_VERSION ] && rm -R ../../$NVM_TEST_VERSION
# Install from binary
echo "$NVM_TEST_VERSION" > .nvmrc
@@ -15,7 +15,7 @@ echo "$NVM_TEST_VERSION" > .nvmrc
nvm install -s || "'nvm install -s' failed"
# Check
[ -d ../../../$NVM_TEST_VERSION ] || die "$NVM_TEST_VERSION did not exist"
[ -d ../../$NVM_TEST_VERSION ] || die "$NVM_TEST_VERSION did not exist"
nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION \
|| die "'nvm run $NVM_TEST_VERSION --version | grep $NVM_TEST_VERSION' failed"

View File

@@ -2,17 +2,17 @@
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
. ../../nvm.sh
# Remove the stuff we're clobbering.
[ -e ../../../v0.9.7 ] && rm -R ../../../v0.9.7
[ -e ../../../v0.9.12 ] && rm -R ../../../v0.9.12
[ -e "${NVM_DIR}/v0.9.7" ] && rm -R "${NVM_DIR}/v0.9.7"
[ -e "${NVM_DIR}/v0.9.12" ] && rm -R "${NVM_DIR}/v0.9.12"
# Install from binary
nvm install 0.9.7
# Check
[ -d ../../../v0.9.7 ] || die "nvm install 0.9.7 didn't install"
[ -d "${NVM_DIR}/v0.9.7" ] || die "nvm install 0.9.7 didn't install"
nvm use 0.9.7
@@ -25,10 +25,9 @@ nvm ls 0.9 | grep v0.9.7 > /dev/null || die "nvm ls 0.9 didn't show v0.9.7"
nvm install 0.9.12 --reinstall-packages-from=0.9 || die "nvm install 0.9.12 --reinstall-packages-from=0.9 failed"
[ -d ../../../v0.9.12 ] || die "nvm install 0.9.12 didn't install"
[ -d "${NVM_DIR}/v0.9.12" ] || die "nvm install 0.9.12 didn't install"
nvm use 0.9
node --version | grep v0.9.12 > /dev/null || die "nvm ls 0.9 didn't use v0.9.12"
npm list --global | grep object-is > /dev/null || die "object-is isn't installed"

View File

@@ -1,8 +1,9 @@
#!/bin/sh
. ../../../nvm.sh
. ../../nvm.sh
nvm deactivate
nvm uninstall v0.10.7
nvm uninstall v4.2.2
if [ -f ".nvmrc" ]; then
rm .nvmrc

View File

@@ -1 +1,4 @@
# On SmartOS 64bits setups, pkg_info outputs _both_ i386 and x86_64
# architectures as architectures supported by pkg_install.
echo "i386"
echo "x86_64"

Some files were not shown because too many files have changed in this diff Show More