Compare commits

..

431 Commits

Author SHA1 Message Date
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
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
ec2f450b6e v0.31.1 2016-05-09 22:06:43 -07:00
Jordan Harband
eeaddf9ab0 Don’t restrict colors to TTYs.
This restriction prevents subcommands from producing colors and passing them up the tree to the actual TTY.
2016-05-08 21:24:24 -07:00
Jordan Harband
0880539972 nvm_strip_path: Error out when $NVM_DIR is not set.
Per https://github.com/creationix/nvm/issues/1083#issuecomment-217752185
2016-05-08 20:06:17 -07:00
Jordan Harband
6311a0e9c4 nvm ls/nvm alias/nvm ls-remote: only colorize when colors are supported. 2016-05-07 18:51:21 -07:00
Jordan Harband
bc3d028152 nvm alias: colorize output when creating aliases. 2016-05-07 18:14:11 -07:00
Jordan Harband
fc82742a8b [Robustness] add a missing command to a sed call 2016-05-06 12:29:01 -07:00
Jordan Harband
a551306275 Merge pull request #1076 from ejinotti/master
[Docs] Improve zsh script in README
2016-05-06 10:24:07 -07:00
Edward J. Jinotti
d4d879e622 zsh script: Check version / .nvmrc on new shell also. 2016-05-06 09:32:52 -04:00
Edward J. Jinotti
05a2d986a4 Improve zsh script to revert to default node version when exiting a .nvmrc directory. 2016-05-06 09:32:52 -04:00
Jordan Harband
a94ade8ec2 [Fix] don’t use bash == in conditionals 2016-05-06 01:00:56 -07:00
Jordan Harband
eb329ae7a9 [minor] display chmod command as well to fix file permissions. 2016-05-05 23:58:27 -07:00
Jordan Harband
1ca2aa648f [minor] Echo nonwritable file path to stderr. 2016-05-05 23:53:13 -07:00
Jordan Harband
f49eb61f8e [Improvement] Use nvm_sanitize_path in nvm_check_file_permissions. 2016-05-05 23:52:51 -07:00
Jordan Harband
d1962c6742 [Refactor] clean up nvm_sanitize_path 2016-05-05 23:52:26 -07:00
Jordan Harband
06c1cfcd85 [Refactor] avoid some pipes to awk 2016-05-05 01:30:38 -07:00
Jordan Harband
8a138d98ed [Refactor] Use awk to improve version comparison performance 2016-05-05 01:27:17 -07:00
Jordan Harband
4842641e78 [Refactor] create nvm_echo and nvm_err 2016-05-05 00:17:35 -07:00
Jordan Harband
62cca4e6d8 Prefer nvm --help over nvm help 2016-05-05 00:14:12 -07:00
Jordan Harband
ab49a5b0c3 [refactor] nvm run: call through to nvm exec to remove redundant code 2016-05-04 00:58:12 -07:00
Jordan Harband
a69f9a8898 [fix] nvm run: pass through --silent on bare nvm run 2016-05-04 00:58:08 -07:00
Jordan Harband
e8355e3189 [refactor] nvm run: refactor argument parsing. 2016-05-04 00:35:43 -07:00
Jordan Harband
0d62626ac6 [refactor] nvm exec: refactor argument parsing. 2016-05-04 00:34:07 -07:00
Jordan Harband
6fb94e0dab [fix] nvm exec: show “io.js” for io.js versions. 2016-05-04 00:33:56 -07:00
Jordan Harband
0dd2846215 [fix] set -e: ensure nvm_version returning 3, and nvm_alias returning 2, doesn’t terminate the process. 2016-05-04 01:03:14 -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
1c3f8da6c3 nvm alias: factor out alias creation to nvm_make_alias 2016-04-27 14:23:34 -07:00
Jordan Harband
2d50606a78 [Tests] flesh out nvm_print_default_alias tests 2016-04-30 00:38:49 -07:00
Jordan Harband
d705ec7ebf [refactor] run through shellcheck 2016-04-30 00:33:28 -07:00
Jordan Harband
09f86b0e6e [Refactor] Create and use nvm_is_version_installed 2016-04-27 17:11:16 -07:00
Cătălin Mariș
1f336ffbfe Use language: generic in .travis.yml
Since the tests don't rely on / fall into any of the language
categories¹ defined by Travis CI, `language: generic`² can be used.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

¹ https://docs.travis-ci.com/user/languages/
² https://github.com/travis-ci/travis-ci/issues/4895#issuecomment-150703192
2016-04-29 00:57:10 +03:00
Jordan Harband
fc68e615b2 nvm alias: colorize output to match nvm ls 2016-04-27 22:35:14 -07:00
Jordan Harband
379d079c30 [Tests] Ensure color codes are stripped in alias tests. 2016-04-27 17:05:33 -07:00
Philip Ingrey
9106cc25a4 Switch from pull to fetch in the manual update guide 2016-04-28 08:57:16 +01:00
Jordan Harband
91c77c6ba8 [Tests] fix shebangs 2016-04-27 17:34:53 -07:00
Jordan Harband
ec54c925c1 [Tests] use mocks for nvm_ls_remote/nvm_ls_remote_iojs tests. 2016-04-27 01:25:56 -07:00
Jordan Harband
17c9bef4aa nvm alias: add lts/ support. 2016-04-26 23:07:22 -07:00
Jordan Harband
677c69dda0 nvm alias: explicitly forbid user aliases in subdirs. 2016-04-26 23:07:10 -07:00
Jordan Harband
1eb4d482e0 nvm alias: If the alias target is empty, call into nvm unalias 2016-04-26 22:58:31 -07:00
Jordan Harband
4df2a7fca9 nvm alias: factor out alias printing logic to functions 2016-04-26 22:29:55 -07:00
Jordan Harband
7b1a4e5126 nvm alias: slightly speed up alias resolution. 2016-04-26 22:21:57 -07:00
Jordan Harband
886cde7da5 Readme: Clean up trailing whitespace 2016-04-27 01:08:20 -07:00
Oskar Eriksson
804eae30fb Added section about verifying nvm install using the command util 2016-04-27 09:59:36 +02:00
Jorge Bucaran
b0693f2d6a Add fin https://github.com/fisherman/fin.
fin is a pure fish, node version manager for fish-shell.
2016-04-27 11:24:59 +09: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
96afff7af2 [Tests] Set up “mocks” directory, and updater script. 2016-04-19 22:49:49 -07:00
Jordan Harband
ac18d01854 [Tests] update index.tab data mocks. 2016-04-18 20:43:08 -07:00
Jordan Harband
755c39209e [Refactor] make check_file_permissions be pure instead of relying on a closure.
Also, make it return early, to be a bit more efficient.

(from #847)
2016-04-18 19:23:51 -07:00
Jordan Harband
86c8b116d1 Merge pull request #847 from lukechilds/uninstall-bug
[New] `nvm uninstall`: Check installation dir permissions before uninstalling
2016-04-18 17:53:41 -07:00
Luke Childs
3a2d35f167 Check permissions in shell rather than using find -exec 2016-04-19 01:40:16 +01:00
Luke Childs
5970a06b19 Add slow test to check nvm uninstall with file permission error 2016-04-18 22:08:40 +01:00
Luke Childs
dff4f80f32 Add fast test to check nvm uninstall with file permission error 2016-04-18 21:17:44 +01:00
Luke Childs
6fb528f4e4 Add slow test to check nvm uninstall 2016-04-18 21:17:44 +01:00
Luke Childs
005e29a223 Check dir permissions before attempting to nvm uninstall 2016-04-18 21:16:37 +01: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
Jordan Harband
d3e334d86d [Fix] read exits 1 when .nvmrc lacks a trailing newline - avoid that.
Per https://github.com/creationix/nvm/issues/993#issuecomment-205399603
2016-04-04 22:08:36 -07:00
igrayson
6299cba467 Update README.markdown
Add mention for ~/.bashrc
2016-04-02 16:48:37 -07:00
Vincent Tunru
b6f160a7b3 Fixes #995: Add example .nvmrc to the README 2016-03-27 00:15:31 +01:00
Jordan Harband
273ebedc55 [Fix] avoid an unbound variable when nounset bash option is set.
Per https://github.com/creationix/nvm/issues/868#issuecomment-198232952
2016-03-18 00:28:30 -07:00
Frankie Bagnardi
d03f575446 Adds fast-nvm-fish to README 2016-03-17 14:14:21 -07:00
Robson Peixoto
8fb4ee0789 Unset unnecessary environment variables 2016-03-11 14:53:36 -03:00
flowmemo
d8a3b074a6 fixed the number of alternatives in Windows in README.markdown 2016-03-11 23:31:28 +08:00
Whitney Young
972be30a1a Add link to avn
Also, clarified the existing shell integration intro text.
2016-03-08 19:48:27 -08:00
Tobias Witt
ae70d558cb Add section about "Deeper shell integration"
Also adds a snippet for zsh user to auto-issue `nvm use` when entering a
directory.
2016-03-08 18:44:30 +01:00
Adam Patridge
e76221fd15 Added note about OSX's missing .bash_profile file. 2016-03-03 14:01:23 -07:00
Jordan Harband
2176894a5b v0.31.0 2016-02-15 09:18:15 -08:00
Jordan Harband
cf7d5d8042 Merge pull request #1011 from dohse/keep-parameters
[Fix] Do not modify args of sourcing script when parsing `--install`/`--no-use` arg

Fixes #976.
2016-02-15 09:17:24 -08:00
Jonas Dohse
7135873f80 Do not modify parameters of sourcing script in zsh
When sourcing a script without parameters in zsh the sourced scripts
gets the same parameters as the sourcing file and is able to modify
these parameters. Prevent nvm from removing all parameters of sourcing
script by processing a copy of the parameters in a function.
2016-02-15 17:49:46 +01:00
Jordan Harband
dc9020b133 Merge pull request #1004 from tlevine/env-bash
[Fix] use env bash rather than /bin/bash
2016-02-14 12:05:10 -08:00
Thomas Levine
0eaa7e0bde use env bash in nvm-exec and install.sh 2016-02-14 19:34:19 +00:00
Thomas Levine
06b81f0f36 use env bash rather than /bin/bash
My bash is not installed in /bin/bash.
2016-02-14 19:34:19 +00:00
gmisra
8a20234586 Document how to reload nvm after upgrading 2016-02-09 19:12:22 -08:00
Jordan Harband
44541b416f [New] After installing, ensure that the default is set. 2016-02-04 00:26:33 -08:00
Jordan Harband
731c2f3f70 Add nvm_get_minor_version 2016-02-04 11:16:09 -08:00
Jordan Harband
de64a2d95f [Fix] nvm_format_version should only return 3 version groups 2016-02-06 22:34:49 -08:00
Jordan Harband
77e0449c89 [Fix] nvm-exec: properly exit when failing; improve error messages, suppress nvm use --help output
Fixes #997.
2016-02-04 11:19:34 -08:00
Sébastien Larivière
649e416017 [Refactor]Double quote to prevent globbing and word splitting. 2016-01-30 22:17:15 -05:00
Jordan Harband
754a0d7c5b Merge pull request #981 from woodb/node-v4-checksums
[New] Added support for sha256 checksums on `io.js` / merged `node`.

Fixes #664, relates to #736 and #687.
2016-01-24 10:40:06 -08:00
Brandon Wood
f73bfb6578 Updated warning message when sha256sum utility not found
Relates to @ljharb's comment on the warning message not including all of the
utilties searched for.

https://github.com/creationix/nvm/pull/981#discussion_r50638351
2016-01-24 11:53:19 -06:00
Brandon Wood
f1bca106a8 Added (optional) support for sha256 checksum utils
This commit adds (optional) support for additional sha256 checksum utilities
for newer versions of node.js and io.js that use sha256 checksums rather than
sha1.

If nothing is found to do a sha256 checksum on the client machine, a warning is
printed and things continue on as normal.

Following comments from @ljharb on incorporating some of @DomT4's PR
creationix/nvm#664, and making this checksum optional.  If I could I would
gladly include this as an addon to the now closed PR creationix/nvm#664. I am
choosing not to file it onto that PR because it's closed and (currently)
significantly behind the master branch.

@DomT4 did the hard work of actually finding all the different ways in which
one could verify a sha256 checksum, I've just included those here in an effort
to move forward with sha256 checksum support.
2016-01-24 10:31:26 -06:00
Brandon Wood
560c8c9500 Added support for sha256 checksums 2016-01-23 21:25:03 -06:00
Jordan Harband
21c3727955 v0.30.2 2016-01-21 00:23:01 -08:00
Jordan Harband
4fcf37fa29 [New] support --no-use on sourcing, in supported shells.
Fixes #972.
2016-01-20 12:50:45 -08:00
Nick Hwang
e76fe61d95 Add missing space before closing bracket 2016-01-19 13:03:11 -05:00
Jordan Harband
00a8b36b78 [Fix] handle unbound shell variables.
Fixes #868.
2016-01-17 15:12:02 -08:00
Dwayne Crooks
1e1a005a53 [Docs] Add manual upgrade instructions to README.markdown 2016-01-16 07:01:46 -04:00
Jordan Harband
1ba8a96ec9 Merge pull request #957 from matthew-campbell/fix-profile-var
[Fix] `install.sh`: honor PROFILE var.

Closes #888. Fixes #830.
2016-01-02 09:04:07 -08:00
Matthew Campbell
4f4ff208eb Improve error messages 2016-01-02 11:16:50 -05:00
Matthew Campbell
78fee866f5 Remove usage of declare 2016-01-01 22:33:45 -05:00
Matthew Campbell
8dc53d4dd5 Refactor and fix nvm_detect_profile tests
close #833
close #957
2016-01-01 20:45:36 -05:00
Matthew Campbell
645bda4987 Addresses comments to close #833 2016-01-01 14:09:35 -05:00
David Mankin
918fcb4bd2 PROFILE env var should override detected profile
Add tests for PROFILE overriding detected files
2016-01-01 14:00:36 -05:00
David Mankin
cb138a1815 Fix error messages in tests 2016-01-01 13:34:34 -05:00
Jordan Harband
6094dac1c1 [Fix] nvm debug was printing a red herring error message in non-zsh. 2015-12-30 09:45:13 -08:00
Jordan Harband
0aa3118de3 v0.30.1 2015-12-28 12:46:41 -08:00
Jordan Harband
2541baaf7d [Refactor] Create nvm_get_make_jobs to abstract out “-j” logic. 2015-12-28 12:20:14 -08:00
Jordan Harband
dc8b63cb25 [Fix] nvm install -s: fix syntax errors. 2015-12-28 12:19:50 -08:00
Jordan Harband
f3cc95bc66 Merge pull request #952 from davemay99/install-fix-quotes
[Fix] install.sh: quote `$DETECTED_PROFILE`
2015-12-28 09:24:42 -08:00
Dave May
00d4520d35 Merge remote-tracking branch 'creationix/master' into install-fix-quotes 2015-12-28 12:08:57 -05:00
Jordan Harband
8ec056f768 v0.30.0 2015-12-27 23:19:14 -08:00
Dave May
f113c5d030 fix quoting for usernames with space 2015-12-28 00:34:38 -05:00
Jordan Harband
f279837d5c [Refactor] fix some bugs in nvm_is_natural_num, add unit tests. 2015-12-27 13:15:53 -08:00
Jordan Harband
32d184099c [Tests] fix cleanup in nvm_supports_xz unit test 2015-12-27 13:18:28 -08:00
Jordan Harband
31457fec3f [Refactor] nvm install: make -j and -s order-independent. 2015-12-27 12:52:01 -08:00
thelostspore
1a6f85da46 README: troubleshooting scenario and homebrew unsupported note 2015-12-27 12:55:35 -08:00
Jordan Harband
d40eca8126 Merge pull request #752 from PeterDaveHelloKitchen/parallel_build
[New] `nvm install`: Enable multiple jobs for make when build from source via `-j`
2015-12-27 12:37:48 -08:00
Peter Dave Hello
cfccf03b3d add test for install from source 2015-12-28 01:37:57 +08:00
Peter Dave Hello
e78dc5110e fix CPU_THREADS/CPU_THREAD_VALID/MAKE_JOBS prefix 2015-12-28 01:37:57 +08:00
Peter Dave Hello
6320719dd8 Support parameter -j to set jobs for make 2015-12-28 01:37:57 +08:00
Peter Dave Hello
a8e6fee001 Enable multiple jobs for when build from source 2015-12-28 01:37:57 +08:00
Mathias Meyer
f851716601 Add workaround for Travis CI environment issue.
Per https://github.com/travis-ci/travis-ci/issues/5363
2015-12-22 11:28:25 +01:00
Jordan Harband
9787c438bb Merge pull request #950 from kui/commands-includes-spaces
[Fix] fix `nvm-exec` for commands including spaces.

Relates to #903.
2015-12-24 08:42:01 -08:00
Keiichiro Ui
b76d43e9f8 Fix nvm-exec for the commands includes white-spaces 2015-12-24 19:48:35 +09:00
emparq
91ce41b702 [Fix: Install] incorrect check for "$NVM_DIR/nvm.sh"
Should be using `-f` if checking for a file.

Closes #887.
2015-10-30 18:48:08 -07:00
Kilian Ciuffolo
6638ac3318 [refactor] improved bootstrap time
Fixes #860, closes #927.
2015-12-06 23:52:40 -08:00
Peter Dave Hello
605a305300 add iojs as one of the keywords in package.json 2015-12-21 23:07:52 -08:00
Jordan Harband
4976788d1b Merge pull request #945 from PeterDaveHello/update_nodejs_index.tab
[tests] update nodejs.org-dist-index.tab
2015-12-21 23:06:40 -08:00
Peter Dave Hello
ec9232bb06 update nodejs.org-dist-index.tab and related test
Src: https://iojs.org/dist/index.tab
2015-12-21 20:50:54 +08:00
Jordan Harband
c56c26badd Merge pull request #938 from tomByrer/patch-1
[Docs] del `nvmw` link
2015-12-13 22:55:03 -08:00
Jordan Harband
04c5e3540e nvm unalias: Provide a restore command when unaliasing.
Fixes #916.
2015-12-13 21:34:28 -08:00
Tom Byrer
2a8caf48e8 del nvmw link
Seems to be abandoned:
- https://github.com/hakobera/nvmw/issues/67
- https://github.com/hakobera/nvmw/issues/66
- https://github.com/hakobera/nvmw/issues/69
2015-12-13 18:16:14 -07:00
Daniel Kmak
896199facc Update README.markdown and LICENSE.md 2015-12-12 20:00:49 +01:00
Jordan Harband
8746344e02 Merge pull request #925 from riyadhalnur/patch-1
[Docs] add note about Xcode Command Line Tools on OS X
2015-12-04 23:57:57 -08:00
Riyadh Al Nur
dbe2a1b2b4 Updated README
Updated README to inform OSX users that XCode doesn't need to be installed in order to get stsrted using `nvm`.

Fixes #921
2015-12-05 13:52:30 +06:00
Jordan Harband
317f8f9e68 Merge pull request #901 from PeterDaveHello/patch-4
[Docs] add FreeBSD info to README
2015-12-04 23:42:51 -08:00
Peter Dave Hello
4ef9e1583c Update README.markdown
Talk about FreeBSD support.
Hope user can easily know that earlier, and also hope we can get much more help about this topic.
2015-12-05 15:41:04 +08:00
Jordan Harband
09bf45ce6c Merge pull request #908 from nullivex/master
[Docs] Add another Windows alternative.
2015-12-04 23:35:30 -08:00
Jordan Harband
641abc8407 Merge pull request #899 from PeterDaveHello/patch-2
[install] on install, indicate that there's no binary for FreeBSD
2015-12-04 23:31:49 -08:00
Peter Dave Hello
2a174d03d8 Update nvm.sh
Add prompt when there is no binary for node version greater than v1.0.0

Currently, on FreeBSD, if we try `nvm install 4.2`, we will only get:
> Installing node v1.0 and greater from source is not currently supported

In fact I had no idea what's wrong because I didn't use `-s` parameter for it,
and then I found that there are two reasons:
1. There was no pre-built nodejs binary from official for FreeBSD, which means we need to build from source.
2. nvm doesn't support build for v1.0 and greater version from source yet.

So I think there should be a prompt message to tell the user about the reason why nvm will go to build from source,
no matter it will succeed or fail.
2015-12-05 15:00:00 +08:00
Jordan Harband
803be3a4eb [Tests] temporarily disable WITHOUT_CURL tests.
Blocked by https://github.com/nodejs/build/issues/233
2015-12-02 22:49:38 -08:00
Jordan Harband
6d2c9a95b0 [Docs] remove note about "global install", since nvm is not intended for multiuser installs.
Per https://github.com/creationix/nvm/issues/918#issuecomment-161527422
2015-12-02 22:14:08 -08:00
Bryan Tong
720087b009 Add another Windows alternative.
Nodist is a similar CLI interface providing similar functionality. Nodist also recently added a Windows install wizard.
2015-11-18 20:18:55 -07:00
Jordan Harband
c742ab7e66 Fix npm version output for nvm run and nvm exec 2015-11-10 23:31:16 -08:00
Jordan Harband
e10705b896 [Docs] improve manual install instructions 2015-11-09 11:36:30 -08:00
Jordan Harband
9972de6dec [Docs] update version numbers in the readme; add default alias info 2015-11-04 21:19:32 -08:00
Jordan Harband
45e4387ce3 [Tests] Print out curl and wget versions inside travis-ci 2015-11-02 00:50:40 -08:00
Jordan Harband
cb03acf458 Merge pull request #892 from wbyoung/stable-node
[Docs] use "node", not "stable", since everything is stable now
2015-11-03 10:46:14 -08:00
Whitney Young
9cceded178 Updated docs for alias default. 2015-11-03 10:44:07 -08:00
Jordan Harband
772d3223e9 Merge pull request #875 from mrueg/remove-backticks
[shellcheck] Replace backticks with $() command substitution
2015-10-29 01:15:02 -07:00
Manuel Rüger
1adcabf5e8 Replace backticks with $() command substitution 2015-10-28 20:53:15 +01:00
Jordan Harband
a43ff7c9d9 Ensure that npm doesn't print out excess data, regardless of the user's log level.
Fixes #881.
2015-10-23 00:12:14 -07:00
Jordan Harband
149e5d483d Use real snapshot of iojs.org data for nvm_ls_remote_iojs tests. 2015-10-17 12:05:44 -07:00
Jordan Harband
114f27a075 Use nvm_ls_remote_index_tab for listing nodejs.org versions.
Enabled by https://github.com/nodejs/build/issues/218, unblocks #870.
2015-10-17 10:34:42 -07:00
Jordan Harband
690543d6ad Rename nvm_ls_remote_iojs_org → nvm_ls_remote_index_tab and make it generic. 2015-10-17 10:19:39 -07:00
Jordan Harband
b5e0603e64 Merge pull request #876 from derekstavis/patch-1
README: Add link to a dedicated nvm wrapper for fish shell
2015-10-15 17:17:13 -07:00
Derek Willian Stavis
84c2d6a91f README: Add link to a dedicated nvm wrapper for fish shell
Includes references to `nvm` plugin for Oh My Fish framework,
which implements not only a fish wrapper to official `nvm` script,
but also provides completions.
2015-10-15 21:00:23 -03:00
Jordan Harband
0b9526e3b4 Don't check $1 unless $# is >= 1.
Fixes #873. Partially fixes #868.
2015-10-14 23:02:00 -07:00
Jordan Harband
016e7dfdab [nvm run / nvm exec]: Silence "find nvmrc" output when --silent is provided.
Per https://github.com/creationix/nvm/issues/846#issuecomment-147588453
2015-10-13 21:58:35 -07:00
Jordan Harband
2a0316f80d [shellcheck] Remove useless echo 2015-10-13 01:26:43 -07:00
Jordan Harband
e7e28f436e [shellcheck] double-quote vars in more places 2015-10-12 16:07:29 -07:00
Jordan Harband
84aad508f7 Check $# before trying to check $1. Avoids failure due to nounset bash option.
Partially fixes #868.
2015-10-12 16:57:45 -07:00
Jordan Harband
8f3ee23390 [shellcheck] Correct redirection order: we want both stdout and stderr sent to /dev/null here. 2015-10-12 16:48:12 -07:00
Jordan Harband
032fab7172 locals need to be declared and assigned separately, for ksh. 2015-10-12 16:30:59 -07:00
Jordan Harband
46833efd79 [shellcheck] Remove useless echo 2015-10-12 16:10:43 -07:00
Jordan Harband
9407f850f1 [shellcheck] read without -r will mangle backslashes.
http://pubs.opengroup.org/onlinepubs/009695399/utilities/read.html / https://github.com/koalaman/shellcheck/wiki/SC2162
2015-10-12 16:05:55 -07:00
Jordan Harband
bf284203cb [shellcheck] Declare and assign separately to avoid masking return values
https://github.com/koalaman/shellcheck/wiki/SC2155
2015-10-12 16:02:35 -07:00
Jordan Harband
c957989fa9 Add nvm --version and $HOME to nvm debug 2015-10-10 14:27:00 -07:00
Jordan Harband
bc4d14bea6 Merge pull request #866 from jfirebaugh/patch-1
[Docs] Note compatibility issue with `set -e` (#866, #865, #721)
2015-10-09 11:32:52 -07:00
John Firebaugh
affe0baa95 Note compatibility issue with set -e
See discussion in #865.
2015-10-09 11:01:07 -07:00
Jordan Harband
e1c84bae37 v0.29.0 2015-10-09 01:52:19 -07:00
Jordan Harband
a928a8f181 nvm exec: don't fall back to .nvmrc when the provided version is not installed. 2015-10-08 17:37:53 -07:00
Jordan Harband
937c29c95a nvm run: use common code path for "ensure version installed"
Better than cb033adc6f
2015-10-08 16:48:17 -07:00
Jordan Harband
a0e94e16de Make sure nvm debug doesn't use an overridden sed 2015-10-08 00:19:53 -07:00
Jordan Harband
7028e5df19 Merge pull request #823 from jbergstroem/feature/prefer-xz
Support `xz` tarballs if available (on io.js >= 2.3.2 and node >= 4)
2015-10-08 00:19:35 -07:00
Johan Bergström
b8e4917646 Use xz tarballs if available
Saves us ~25% bandwidth while downloading the payload. This only applies
to hosts that has the `xz` binary and attempts to use iojs 2.3.2 or newer
(this includes nodejs 4.0+ as well). Older targets are unaffected.
2015-10-08 16:45:26 +11:00
Jordan Harband
cb033adc6f nvm run: use common code path for "ensure version installed" 2015-10-07 18:08:48 -07:00
Jordan Harband
20f4acdd25 [installing] echo the URL that the tarball is being downloaded from. 2015-10-07 20:28:18 -07:00
Jordan Harband
41153e207d Ensure nvm use output shows up *after* prefix check passes. 2015-10-07 14:40:31 -07:00
Jordan Harband
6b3c34313c Fix nvm_ls when $NVM_DIR has spaces in it.
Mostly fixes #861.
2015-10-07 13:57:29 -07:00
Jordan Harband
8541e2e1ee Properly quote some possible variables with spaces. 2015-10-07 13:57:13 -07:00
Jordan Harband
1efc8b4dbe Merge pull request #859 from fresheneesz/patch-1
[docs] Make sure to note "Install OR update"
2015-10-05 16:01:58 -07:00
fresheneesz
49f2c95013 Install OR update 2015-10-05 15:56:41 -07:00
Jordan Harband
06a21284ed Protect against cat clobbering. Fixes #858. 2015-10-04 14:28:38 -07:00
Jordan Harband
ebdcdc4363 v0.28.0 2015-10-02 01:50:44 -07:00
Jordan Harband
b805de80cb Add PREFIX and NPM_CONFIG_PREFIX env vars to nvm debug 2015-10-01 10:05:13 -07:00
Jordan Harband
44f416d58f Create and use nvm_sanitize_path for nvm debug 2015-10-01 09:41:34 -07:00
Jordan Harband
3d1ccfec70 Sort nvm ls results by semver version, so the order goes: "unmerged node", "iojs", "merged node". 2015-09-30 22:05:18 -07:00
Jordan Harband
f73ee40dfe Merge pull request #854 from misterdjules/fix-node-smartos-support
Fix support for installing node on SmartOS
2015-10-01 00:04:13 -07:00
Julien Gilli
2d692d9d78 Fix support for installing node on SmartOS
uname on SmartOS cannot be used to guess if 32 and/or 64 bits binaries
are supported, and its output is different than other uname commands on
other operating systems.

This change uses pkg_info to determine what types of binaries pkgsrc
would install. If pkg_info fails to run or is not present, this change
falls back to using isainfo -n, which determines what the kernel
supports.

It allows users to install node binaries on Solaris derivatives. io.js
can also be installed on Solaris derivatives starting with version
v3.3.1.
2015-09-30 22:10:29 -07:00
Jordan Harband
8aebf86329 v0.27.1 2015-09-27 06:40:29 -07:00
Jordan Harband
39dad845cf Do not exit install.sh on errors (revert part of 0787a559). Fixes #853. 2015-09-27 06:32:00 -07:00
Jordan Harband
838d72688f v0.27.0 2015-09-26 10:13:10 -07:00
Jordan Harband
8ee6f30352 Add support for $NPM_CONFIG_PREFIX to nvm_die_on_prefix.
Fixes #606.
2015-09-23 06:25:55 -07:00
Jordan Harband
1458de7293 Ensure that if npm config get prefix is set to something outside nvm, that nvm use refuses to work.
Fixes #606.
2015-09-21 04:47:37 -07:00
Jordan Harband
a1def71062 Add nvm_die_on_prefix 2015-09-21 04:47:30 -07:00
Jordan Harband
eb81fba8f7 Add support for --silent to nvm run and nvm exec.
Fixes #842.
2015-09-23 05:16:45 -07:00
Jordan Harband
7496a24bd6 Print the npm version when using nvm exec or nvm run. 2015-09-23 05:02:41 -07:00
Jordan Harband
c64a0343af [Docs] Add nvm help documentation for nvm exec 2015-09-23 04:51:55 -07:00
Jordan Harband
643365a948 Allow --silent option to nvm use to be in any position. 2015-09-23 04:51:55 -07:00
Jordan Harband
6e894520ec Use a tighter grep to avoid dnvm.sh conflicts.
Fixes #838.
2015-09-19 22:55:19 +09:00
Jordan Harband
9e389eb9fe Attempt to fix #829. 2015-09-19 13:37:08 +09:00
Jordan Harband
151efc32f5 Merge pull request #827 from lukechilds/master
Revert "Source the nvm.sh file"
2015-09-13 23:57:45 +09:00
Luke Childs
bda1d2ec29 Revert "Source the nvm.sh file"
Fixes #826
This reverts commit b4151e1446.
2015-09-12 23:05:56 +01:00
Jordan Harband
e3528b0d9e Fix nvm_ensure_version_installed iojs to not print an empty string for the version. 2015-09-11 10:42:47 +09:00
Jordan Harband
014a44e154 Minor refactoring to "install from source" logic tree. 2015-09-10 22:37:50 +09:00
Jordan Harband
c9215a127f When no io.js versions are installed, show N/A, not io.js-, as the resolved default alias.
Fixes #822.
2015-09-09 22:37:32 +09:00
Jordan Harband
c92effc6da Don't double-print *default* alias resolutions either. 2015-09-09 22:38:54 +09:00
Jordan Harband
1e2a7a8de4 Sort nvm ls-remote output so the order is: "pre-merged", "iojs", "post-merged". 2015-09-09 22:23:22 +09:00
Jordan Harband
d4caf9fb67 Fix some logic errors in the new "merged node" code path. 2015-09-09 09:46:39 +09:00
Jordan Harband
0ef20199dc Use NVM_VERSION instead of VERSION to be a bit less intrusive.
Fixes #820.
2015-09-07 21:43:21 +09:00
Jordan Harband
0d898b0aa4 When node version is not io.js and is v1.0 or later, on nvm install, run nvm_install_merged_node_binary 2015-08-28 00:51:19 -07:00
Jordan Harband
0181821b51 Add nvm_install_merged_node_binary 2015-08-28 00:51:19 -07:00
Jordan Harband
f34fef96d8 Add nvm_is_merged_node_version 2015-08-28 00:51:18 -07:00
Jordan Harband
26ee4aafc0 v0.26.1 2015-08-22 20:54:31 -07:00
Jordan Harband
8746d63041 Ensure after node v4.0 is released, stable will simply refer to the latest node. 2015-08-22 09:45:49 -07:00
Jordan Harband
b7e2d7d24d Oops, the string passed to awk isn't the same as a shell command.
Fixes #808.
2015-08-16 18:08:50 -07:00
Jordan Harband
58ffa407c2 Prefixing more commands with command to bypass aliases.
Related to #805 and #804.
2015-08-15 23:56:32 -07:00
Jordan Harband
49abc9ce02 v0.26.0 2015-08-13 17:10:08 -07:00
Jordan Harband
15876280f7 Remove trailing whitespace. 2015-08-13 17:09:22 -07:00
Jordan Harband
9f653cc196 Merge pull request #802 from Alex7Kom/master
Replace links to nvm-fish and nvm-fish-wrapper with a link to bass
2015-08-13 00:04:07 -07:00
Alexey Komarov
543b86c060 Replace links to nvm-fish and nvm-fish-wrapper with a link to bass 2015-08-13 09:09:51 +03:00
Jordan Harband
ba01993ea6 Merge pull request #799 from hkdobrev/neither
[Docs] Use "neither" in README
2015-08-10 11:09:46 -07:00
Haralan Dobrev
31e7d5b36a Use neither in README
Correct usage of the [neither-nor](https://en.wiktionary.org/wiki/neither) construction.
2015-08-10 20:34:10 +03:00
Jordan Harband
17c68075e8 Use single quotes instead of double quotes for help output. 2015-08-05 23:53:29 -07:00
Jordan Harband
3fcff872af Add explanatory note for <version>
Per https://github.com/creationix/nvm/pull/797#discussion_r36379740
2015-08-05 23:53:17 -07:00
Jordan Harband
c07838fcc0 Merge pull request #797 from Sequoia/patch-1
Add usage string for --reinstall-packages-from
2015-08-05 21:03:30 -07:00
Sequoia McDowell
fe1ed37520 Add usage string for --reinstall-packages-from 2015-08-05 22:26:17 -04:00
Jordan Harband
ae1c488fe1 Merge pull request #795 from reybango/master
Updated readme file to include --reinstall-packages-from
2015-08-04 14:38:38 -07:00
Rey Bango
d9662f138f Updated based on feedback from @ljharb on syntax description and functionality 2015-08-04 17:35:03 -04:00
Jordan Harband
071323847c Add nvm version-remote; document nvm version 2015-08-04 14:03:57 -07:00
Rey Bango
b7a93be02e Updated to added npm to the text 2015-08-04 15:23:07 -04:00
Rey Bango
3543cd5d2f Updated usage instructions to include --reinstall-packages-from syntax and example 2015-08-04 15:19:38 -04:00
Jordan Harband
d7035c5e61 Redirect stderr output from npm ls -g to /dev/null.
Fixes #756.
2015-08-03 16:41:47 -07:00
Jordan Harband
1f679fc055 Merge pull request #765 from CristianCantoro/master
Detect shell type from $SHELL variable instead of .$SHELLrc files
2015-07-21 16:37:03 -07:00
Cristian Consonni
c37dbbecb4 Detect shell type from $SHELL variable instead of .$SHELLrc files 2015-07-19 02:03:15 +02:00
Jordan Harband
f81b6d6b7b Update semver 2015-07-18 12:20:53 -07:00
Jordan Harband
d57f7ea54a Merge pull request #776 from IonicaBizauKitchen/source-nvm.sh
Source the nvm.sh file upon install
2015-07-18 12:02:08 -07:00
Jordan Harband
759f86f946 Tweaking local variable name to avoid pollution under ksh. 2015-07-18 09:31:07 -07:00
Jordan Harband
60c2f3705e Merge pull request #780 from alanmquach/silent-source
Adding --silent option for nvm use, and using it to disable processing certain output to speed up shell startup

Relates to #781.
2015-07-18 09:29:40 -07:00
Alan Quach
657192dd27 Adding unit tests for --silent 2015-07-10 10:27:35 +10:00
Alan Quach
98e40a8da5 Expanding to full if statements because the shorthand results in non-zero exit codes 2015-07-09 18:40:52 +10:00
Alan Quach
2da44f90d2 Silencing error outputs as well (for consistency and following after things like curl) 2015-07-09 18:00:13 +10:00
Alan Quach
88a50780fc Removing global NVM_SILENT and adding/using '--silent' option to nvm use instead 2015-07-09 17:44:09 +10:00
Alan Quach
9419794b19 Guarding npm version printing with NVM_SILENT flag check; when sourcing nvm.sh, a considerable amount of time is spent running npm --version only for that output to be black-holed to /dev/null 2015-07-09 09:56:26 +10:00
Ionică Bizău
b4151e1446 Source the nvm.sh file
Fixes #775. After everything is installed, instead of restarting the terminal, just load the nvm.sh file.
2015-07-06 11:19:48 +03:00
Jordan Harband
f2d31b0458 Some refactoring to clear up the path to io.js release candidate support.
(unblocks #779)
2015-07-04 17:05:24 -07:00
Jordan Harband
0b41352210 Factor out global installs/links into nvm_npm_global_modules function. 2015-07-02 23:47:29 -07:00
Jordan Harband
be5e8de0c8 Fix nvm reinstall-packages for linked packages, broken in 7bce6c6c68 2015-07-02 23:12:06 -07:00
Jordan Harband
3ef937a64e Make nvm_ensure_version_installed slightly more efficient. 2015-06-28 18:15:15 -07:00
Jordan Harband
a21b2e6962 Refactor this nvm use case statement out into an nvm_match_version function. 2015-06-28 18:08:38 -07:00
Jordan Harband
cc090f4476 Speed up nvm_print_npm_version. 2015-06-28 16:23:12 -07:00
Jordan Harband
c31b072145 Fix nvm debug output in zsh. 2015-06-28 17:19:15 -07:00
Jordan Harband
7bce6c6c68 nvm reinstall-packages should install the same version it had before. 2015-06-29 00:04:59 -07:00
Jordan Harband
fb2f1ac627 Merge pull request #778 from williamboman/chore/rewording
nvm.sh: s/copying/reinstalling/
2015-07-02 12:44:37 -07:00
William Boman
bc3840b6f3 nvm.sh: s/copying/reinstalling/ 2015-07-02 21:21:51 +02:00
Jordan Harband
6b8fd19d76 Merge pull request #766 from lukechilds/master
Add --without-snapshot configure flag to ARM devices by default
2015-06-18 13:42:48 -07:00
lukechilds
c1ef31df53 Remove unnecessary nvm use 2015-06-13 19:38:28 +01:00
lukechilds
3b67b3b9bb Use node instead of nvm run and check v8_use_snapshot in node rather than shell 2015-06-13 18:52:54 +01:00
lukechilds
83466446ce Added newline to end of ARM test 2015-06-13 16:10:49 +01:00
lukechilds
3214caa4ec Adding installation test for disabling V8 snapshot on ARM 2015-06-13 15:58:27 +01:00
lukechilds
67f2ee82ca POSIX compatibility 2015-06-13 10:18:58 +01:00
lukechilds
1f13f15620 Add --without-snapshot configure flag to ARM devices 2015-06-12 23:36:02 +01:00
Jordan Harband
fe044c5e3b spawn-sync now dedupes to the top level with this group of packages. 2015-06-07 01:10:55 -07:00
Jordan Harband
3cfa1ed4e1 Remove $NVM_IOJS_ORG_VERSION_LISTING env var. 2015-06-06 22:39:03 -07:00
Jordan Harband
d78722b284 v0.25.4 2015-05-29 11:11:40 -07:00
Jordan Harband
4c475b2767 Use the original ls instead of aliases.
Fixes #755
2015-05-29 11:11:14 -07:00
Jordan Harband
a539cba11e v0.25.3 2015-05-22 15:18:46 -07:00
Jordan Harband
472ba5fc46 Make sure sourcing nvm.sh on shells that don't support source options doesn't exit nonzero.
Fixes #721
2015-05-22 00:15:43 -07:00
Jordan Harband
96c96ec714 v0.25.2 2015-05-19 14:05:43 -07:00
Jordan Harband
475b8bd6b4 Update semver 2015-05-17 21:12:03 -07:00
Jordan Harband
5e805905ca Add undocumented nvm debug to print out helpful debugging info. 2015-05-14 14:56:26 -07:00
Jordan Harband
2dec01da9c nvm reinstall-packages: On systems where npm ls -g --depth=0 does not include npm for some reason, make sure to filter out (empty). 2015-05-08 14:24:51 -07:00
Jordan Harband
63672641a5 Add wrapping curly braces to ensure that the entire scripts are downloaded.
If the closing curly brace isn't present, the script will error out.
2015-05-11 01:46:18 -07:00
Jordan Harband
94bba31de3 Make sure that nvm reinstall-packages system has the right std output. 2015-05-08 14:15:42 -07:00
Jordan Harband
f70530ef18 Fix installation instructions. 2015-05-07 10:43:47 -07:00
Jordan Harband
ec33e8b720 v0.25.1 2015-05-03 15:31:54 -07:00
Jordan Harband
a4f89c6223 Make sure to ignore ~/.curlrc if it exists. 2015-05-01 02:00:49 -07:00
Jordan Harband
517817f1a3 Actually try to install from source when the error message says "binary failed, trying source". 2015-04-27 14:02:45 -07:00
Jordan Harband
a6f5eff0f3 Use uname -m instead of uname -a.
Fixes #744.
2015-04-28 22:56:43 -07:00
Jordan Harband
0aac462b15 Improve the error message when the binary tarball URL 404s.
Fixes #743
2015-04-27 13:48:22 -07:00
Jordan Harband
bb2fe618cb The install script only runs in bash. 2015-04-27 16:55:21 -07:00
Jordan Harband
eb5cecc970 v0.25.0 2015-04-26 12:58:05 -07:00
Jordan Harband
36f933984d Remove trailing whitespace. 2015-04-25 11:21:33 -07:00
Jordan Harband
54d2d70048 Merge pull request #742 from sjasperse/bugfix/rasp-pi-2-arch-detect
adding architecture detection for Raspberry Pi 2
2015-04-26 00:04:00 -07:00
Scott Jasperse
e1009149c9 adding architecture detection for Raspberry Pi 2 2015-04-25 19:10:02 -04:00
Jordan Harband
153ee6887e Merge pull request #741 from phillipsj/master
Adding .gitattributes to force unix line endings.

Fixes #728
2015-04-25 10:58:52 -07:00
Jamie Phillips
295f2b7db4 Adding .gitattributes to force unix line endings.
Hopefully this helps with issue #728
2015-04-25 10:35:22 -04:00
Jordan Harband
356ac7a697 install.sh: Ensure that the --quiet option is available before trying to use it.
Fixes #738, #657.
2015-04-22 00:40:27 -07:00
Jordan Harband
64c88ce62e Merge pull request #735 from madarche/fix-doc
Remove source bashism
2015-04-19 10:32:48 -07:00
Marc-Aurèle DARCHE
4612d8d827 Remove source bashism
Using `.` and not `source`, since it's more portable

cf. #704 and https://wiki.ubuntu.com/DashAsBinSh#source
2015-04-19 16:25:34 +02:00
Jordan Harband
6644f33a77 Update semver, use ^ instead of ~ 2015-04-17 00:24:44 -07:00
Jordan Harband
cbf0f12aac Create nvm_print_npm_version and use that when printing the npm version. 2015-04-12 10:59:17 -07:00
Jordan Harband
de93dc46d0 Merge pull request #726 from SeeThruHead/master
README: Add note about `~/.npmrc` compatibility issues.

Relates to #606.
2015-04-13 13:58:53 -07:00
Shane Keulen
7ea15a7618 Added compatibility issues section
Sections includes warnings for cretain nonstandard path settings and environment variables that conflict with nvm.
2015-04-13 16:54:20 -04:00
Jordan Harband
6a114eddcc Merge pull request #722 from ajcrites/list-npm-version
Include npm version when displaying results of switch.
2015-04-12 10:53:37 -07:00
Andrew Crites
e4149c380b Only print npm version if it exists 2015-04-09 02:31:57 -04:00
Andrew Crites
caa69bc500 npm version: shell compatibility, test update
* Update test string that checks printed node version to pass with additional npm version display
* Remove echo -n for compatibility with shells that do not support it
2015-04-09 02:12:35 -04:00
Andrew Crites
e01bcb740b Include npm version when displaying results of switch.
When running nvm use, successful changing of versions lists the new node version.  The npm version may also be switched, but this is not listed.

This commit updates nvm to display the npm version that was switched to alongside the node version
2015-04-09 01:20:51 -04:00
Jordan Harband
276d55c912 Merge pull request #718 from joliss/performance
Consolidate and avoid sed/cut calls, clean up pattern matches
2015-04-06 21:06:46 -07:00
Jo Liss
0dc177bf9c Consolidate and avoid sed/cut calls, clean up pattern matches
Some patterns contained a no-op `*`; the `*` would match the empty string
because # or % replacement (unlike ## or %%) tries to find the shortest match.
2015-04-06 20:30:38 +00:00
Jordan Harband
c34502ebc2 nvm_num_version_groups should report 0 when given just a v or a . 2015-04-06 11:10:43 -07:00
Jordan Harband
3d764e6833 Add nvm_ensure_default_set 2015-04-05 16:49:29 -07:00
Jordan Harband
a26ef4f1be Consolidate reinstall-packages-from logic to one place nvm install 2015-04-05 16:09:47 -07:00
Jordan Harband
d68f667464 When no arguments are passed to nvm run X, use nvm exec to open a REPL.
Fixes #625. Tests will be in #717.
2015-04-05 15:13:35 -07:00
Jordan Harband
c966204cd6 v0.24.1 2015-04-05 12:55:17 -07:00
Jordan Harband
d72b35b7b8 Remove external calls to sed using parameter filtering.
POSIX-compliant per http://stackoverflow.com/a/25536935/632724

Relates to #709
2015-04-05 02:35:05 -07:00
Jordan Harband
d50a0f46e9 Avoid some external calls by using case statements.
Relates to #709.
2015-04-04 23:59:12 -07:00
Jordan Harband
82393f5b36 Making sure this test passes whether a system node is installed or not. 2015-04-04 23:49:43 -07:00
Jordan Harband
a1a8e5a51b Clean up logic a bit. 2015-04-04 14:53:38 -07:00
Jordan Harband
108f630732 Cache the nvm_node_prefix call. 2015-04-04 14:31:56 -07:00
Jordan Harband
96e73825bd Consolidate faster default alias lookup, and use that explicit version to avoid a second default alias lookup in nvm use default.
Related to #709.
2015-04-04 15:45:40 -07:00
Jordan Harband
9fc20bb14b Merge pull request #710 from joliss/sed
Combine sed and grep commands
2015-04-02 17:00:20 -07:00
Jordan Harband
3401d15a18 Merge pull request #705 from joliss/performance
Improve startup performance. Closes #703
2015-04-02 16:59:38 -07:00
Jo Liss
394e8505d9 Combine sed and grep commands 2015-04-02 16:58:31 +00:00
Jo Liss
fc86834e29 Add comment re nvm_ensure_version_installed performance 2015-04-02 15:30:33 +00:00
Jo Liss
609d9ee4ea Improve startup performance. Closes #703 2015-04-02 15:30:33 +00:00
Jordan Harband
70370a857f No more need for sudo to install ksh and zsh. 2015-03-19 11:05:31 -07:00
Jordan Harband
65a986c633 Merge pull request #693 from hax/reinstall-links
support npm link for reinstall-packages
2015-03-18 22:22:23 -07:00
Jordan Harband
3cc5d6af67 Merge pull request #694 from pfac/pfac-fix-source-nvm-sh-error-message
Fix error message when sourcing nvm.sh
2015-03-18 10:05:22 -07:00
Pedro Costa
999c4111c1 Supresses error message on checking source options 2015-03-18 10:21:11 +00:00
HE Shi-Jun
3d69cf7437 update testcase 2015-03-17 15:54:50 +08:00
HE Shi-Jun
207521d54b support npm link 2015-03-17 14:19:32 +08:00
Jordan Harband
7750253bca Merge pull request #690 from hax/patch-1
Only filter the package `npm`, not any package name that contains 'npm'
2015-03-16 03:10:50 -07:00
HE Shi-Jun
14b23bfa95 fix reinstall-packages test 2015-03-15 06:21:35 +08:00
HE Shi-Jun
bf7bd3e793 Only filter the package npm, not any package name contains 'npm' 2015-03-15 06:21:35 +08:00
Jordan Harband
2b63f37f8d Make nvm_resolve_local_alias not return N/A - that should be done as shallowly as possible. 2015-03-14 10:55:31 -07:00
Jordan Harband
230b479648 Making help error output actually output to stderr consistently. 2015-03-14 10:34:52 -07:00
Jordan Harband
5802ac3ea7 v0.24.0 2015-03-05 21:35:37 -08:00
Jordan Harband
b18126cb15 Merge pull request #686 from jarrettchisholm/master
- fixed return code of 1 when updating from git
2015-03-05 16:53:39 -08:00
Jarrett Chisholm
c16919becd - fixed return code of 1 when updating from git 2015-03-05 18:21:46 -05:00
Jordan Harband
8ae7a37d43 Fix bare nvm use when nvm_ls_current is "none". 2015-03-03 11:29:15 -08:00
Jordan Harband
ceb66d1356 Merge pull request #680 from sayanee/armv6l-armv7l-support
fix: download url for iojs armv6l and armv7l. #678 #227
2015-03-01 22:57:21 -08:00
Sayanee
16a730f4cc amend all variables nvm_arch to capitalise 2015-03-02 12:28:21 +08:00
Sayanee
f8064b259d fix: if case and capitalising variable 2015-03-02 12:19:34 +08:00
Sayanee
f8ee25ab5b fix: local declaration of ksh compatibility 2015-03-02 01:04:29 +08:00
Sayanee
fb48129cd4 add support for node builds for armv6l named as arm-pi 2015-02-28 14:48:38 +08:00
Sayanee
9e154b159e fix: download url for iojs armv6l and armv7l. #678 #227 2015-02-27 09:49:45 +08:00
Jordan Harband
fb853614a7 Use nvm_ensure_version_installed to consistently check if a version is installed.
Fixes #675.
2015-02-22 11:10:19 -08:00
Jordan Harband
0d9329435c Create nvm_ensure_version_installed 2015-02-22 02:26:27 -08:00
Jordan Harband
a0d04d0b6b Preventing an unalias error in tests. 2015-02-22 02:21:00 -08:00
Jordan Harband
6c1a310846 Fix nvm_resolve_alias default from 7d22e0c458 2015-02-22 00:43:14 -08:00
Jordan Harband
758141f41e Remove trailing whitespace 2015-02-22 00:29:25 -08:00
Jordan Harband
7d22e0c458 Separate nvm_resolve_alias's nvm_version behavior into nvm_resolve_local_alias. 2015-02-21 16:10:42 -08:00
Jordan Harband
cd481ff548 When none of the directories exist, don't find within them. 2015-02-20 23:12:44 -08:00
Jordan Harband
12ca8f2607 Add nvm_is_alias unit tests.
Fixes 670.
2015-02-20 13:59:08 -08:00
Jordan Harband
e58d4abf11 Add bash_completion for nvm exec 2015-02-16 00:39:05 -08:00
Jordan Harband
820074e1d7 Make sure checksum commands are not aliases.
Fixes #659, #420, #640.
2015-02-16 00:16:54 -08:00
Jordan Harband
3d6b7976e7 Attempt to fix script install - no shadowing $NVM_SOURCE; nvm-exec and nvm.sh should not both use $NVM_SOURCE since they're different URLs.
Fixes #654.
2015-02-11 14:32:25 -08:00
Jordan Harband
3190effedd Add support for node and iojs implicit aliases. 2015-02-10 23:43:47 -08:00
Jordan Harband
d0617b5b79 Suppressing extraneous output from #622. 2015-02-10 11:07:13 -08:00
Jordan Harband
286c808739 Cache values in local variables to avoid repeated lookups. 2015-02-10 10:36:12 -08:00
Jordan Harband
f0d81e2d33 Revert "install: adding some debugging output"
This reverts commit c8efe3d28a.

Conflicts:
	install.sh
2015-02-09 17:16:56 -08:00
Jordan Harband
4768973a85 Merge pull request #631 from ELLIOTTCABLE/notify-about-global-modules
Notify the user that they're losing access to global modules
2015-02-09 16:54:20 -08:00
elliottcable
4508f7c33e install: further support for older npm versions 2015-02-08 02:43:05 -06:00
elliottcable
ea4264645b install: support npms lower than v2 2015-02-07 21:12:46 -06:00
elliottcable
a216f56443 tests: fail install_script test if npm can't install package 2015-02-07 20:53:53 -06:00
elliottcable
c8efe3d28a install: adding some debugging output 2015-02-07 20:50:10 -06:00
elliottcable
0717d5f995 install: some tweaks and clean-up 2015-02-07 17:17:43 -06:00
elliottcable
6cfc309336 install: Pass global-module check in the absence of npm 2015-02-07 17:17:43 -06:00
elliottcable
dd1a9ca6a0 install: Adding global-module check to function resets 2015-02-07 17:17:43 -06:00
elliottcable
4ba7ee5797 install: Show a warning when global packages exist 2015-02-07 17:17:43 -06:00
Jordan Harband
40c9d6fd11 Merge pull request #648 from passcod/patch-1
Update README: Point fish users in the right direction (relates to #303)
2015-02-07 14:33:20 -08:00
Félix Saparelli
2db71a85a5 Move mention of Fish near the Windows alternatives 2015-02-08 11:31:31 +13:00
Félix Saparelli
64b16faf72 Point fish users in the right direction 2015-02-08 11:05:21 +13:00
Jordan Harband
be56ff3b2e Make sure multiple nvm run arguments get passed through to node/iojs properly.
Fixes #641.
2015-02-07 10:09:37 -08:00
Jordan Harband
59e27f8108 Prevent VERSION='' output caused by double local declaration.
Fixes #644.
2015-02-03 17:28:40 -08:00
174 changed files with 5974 additions and 1606 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
*.sh eol=lf

1
.gitignore vendored
View File

@@ -7,6 +7,7 @@ alias
test/bak test/bak
.urchin.log .urchin.log
.urchin_stdout .urchin_stdout
test/**/test_output
node_modules/ node_modules/
npm-debug.log npm-debug.log

View File

@@ -1,39 +1,52 @@
language: c # defaults to ruby language: generic
addons:
apt_packages:
- zsh
- ksh
before_install:
- curl --version
- wget --version
install: install:
- sudo apt-get install zsh -y # ksh
- (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*) - (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 - chmod +x /tmp/urchin/package/urchin
- '[ -z "$WITHOUT_CURL" ] || sudo apt-get remove curl -y' - '[ -z "$WITHOUT_CURL" ] || sudo apt-get remove curl -y'
script: script:
- export PATH=$(echo $PATH | sed 's/::/:/')
- NVM_DIR=$TRAVIS_BUILD_DIR make TEST_SUITE=$TEST_SUITE URCHIN=/tmp/urchin/package/urchin test-$SHELL - NVM_DIR=$TRAVIS_BUILD_DIR make TEST_SUITE=$TEST_SUITE URCHIN=/tmp/urchin/package/urchin test-$SHELL
env: env:
- SHELL=sh TEST_SUITE=install_script
- SHELL=dash TEST_SUITE=install_script
- SHELL=bash TEST_SUITE=install_script - SHELL=bash TEST_SUITE=install_script
- SHELL=zsh TEST_SUITE=install_script
# - SHELL=ksh TEST_SUITE=install_script
- SHELL=sh TEST_SUITE=fast - SHELL=sh TEST_SUITE=fast
- SHELL=dash TEST_SUITE=fast - SHELL=dash TEST_SUITE=fast
- SHELL=bash TEST_SUITE=fast - SHELL=bash TEST_SUITE=fast
- SHELL=zsh TEST_SUITE=fast - SHELL=zsh TEST_SUITE=fast
# - SHELL=ksh 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=sh TEST_SUITE=sourcing
- SHELL=dash TEST_SUITE=sourcing - SHELL=dash TEST_SUITE=sourcing
- SHELL=bash TEST_SUITE=sourcing - SHELL=bash TEST_SUITE=sourcing
- SHELL=zsh TEST_SUITE=sourcing - SHELL=zsh TEST_SUITE=sourcing
# - SHELL=ksh TEST_SUITE=sourcing # - SHELL=ksh TEST_SUITE=sourcing
- SHELL=sh TEST_SUITE=installation - SHELL=sh TEST_SUITE=slow
- SHELL=sh TEST_SUITE=installation WITHOUT_CURL=1 - SHELL=dash TEST_SUITE=slow
- SHELL=dash TEST_SUITE=installation - SHELL=bash TEST_SUITE=slow
- SHELL=dash TEST_SUITE=installation WITHOUT_CURL=1 - SHELL=zsh TEST_SUITE=slow
- SHELL=bash TEST_SUITE=installation # - SHELL=ksh TEST_SUITE=slow
- SHELL=bash TEST_SUITE=installation WITHOUT_CURL=1 - SHELL=sh TEST_SUITE=installation_node
- SHELL=zsh TEST_SUITE=installation # - SHELL=sh TEST_SUITE=installation_node WITHOUT_CURL=1
- SHELL=zsh TEST_SUITE=installation WITHOUT_CURL=1 - SHELL=dash TEST_SUITE=installation_node
# - SHELL=ksh TEST_SUITE=installation # - SHELL=dash TEST_SUITE=installation_node WITHOUT_CURL=1
# - SHELL=ksh TEST_SUITE=installation 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,6 +1,6 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2010-2014 Tim Caswell Copyright (c) 2010-2016 Tim Caswell
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View File

@@ -2,123 +2,303 @@
## Installation ## 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 not supported nor developed by us: 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:
- [nvmw](https://github.com/hakobera/nvmw)
- [nvm-windows](https://github.com/coreybutler/nvm-windows) - [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
- [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:
- [[#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 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/)
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_update` to update.
### Install script ### Install script
To install you could use the [install script][2] using cURL: To install or update nvm, you can use the [install script][2] using cURL:
curl https://raw.githubusercontent.com/creationix/nvm/v0.23.3/install.sh | bash ```sh
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash
```
or Wget: or Wget:
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.23.3/install.sh | bash ```sh
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash
```
<sub>The script clones the nvm repository to `~/.nvm` and adds the source line to your profile (`~/.bash_profile`, `~/.zshrc` or `~/.profile`).</sub> <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. 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. 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> <sub>*NB. The installer can use `git`, `curl`, or `wget` to download `nvm`, whatever is available.*</sub>
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:
```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.
### Manual install ### Manual install
For manual install create a folder somewhere in your filesystem with the `nvm.sh` file inside it. I put mine in a folder called `nvm`. 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, then just clone it, and check out the latest version:
git clone https://github.com/creationix/nvm.git ~/.nvm && cd ~/.nvm && git checkout `git describe --abbrev=0 --tags` ```sh
git clone https://github.com/creationix/nvm.git ~/.nvm && cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`
```
To activate nvm, you need to source it from your shell: To activate nvm, you need to source it from your shell:
source ~/.nvm/nvm.sh ```sh
. ~/.nvm/nvm.sh
```
I always add this line to my `~/.bashrc`, `~/.profile`, or `~/.zshrc` file to have it automatically sourced upon login. Add these lines to your `~/.bashrc`, `~/.profile`, or `~/.zshrc` file to have it automatically sourced upon login:
Often I also put in a line to use a specific version of node. (you may have to add to more than one of the above files)
```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:
```sh
cd "$NVM_DIR" && git fetch origin && git checkout `git describe --abbrev=0 --tags`
```
After upgrading, don't forget to activate the new version:
```sh
. "$NVM_DIR/nvm.sh"
```
## Usage ## Usage
You can create an `.nvmrc` file containing version number in the project root directory (or any parent directory). To download, compile, and install the latest release of node, do this:
`nvm use`, `nvm install`, `nvm exec`, `nvm run`, and `nvm which` will all respect an `.nvmrc` file when a version is not supplied.
To download, compile, and install the latest v0.10.x release of node, do this: ```sh
nvm install node
nvm install 0.10 ```
And then in any new shell just use the installed version: And then in any new shell just use the installed version:
nvm use 0.10 ```sh
nvm use node
```
Or you can just run it: Or you can just run it:
nvm run 0.10 --version ```sh
nvm run node --version
```
Or, you can run any arbitrary command in a subshell with the desired version of node: Or, you can run any arbitrary command in a subshell with the desired version of node:
nvm exec 0.10 node --version ```sh
nvm exec 4.2 node --version
```
You can also get the path to the executable to where it was installed: You can also get the path to the executable to where it was installed:
nvm which 0.10 ```sh
nvm which 5.0
```
In place of a version pointer like "0.10", you can use the special default aliases "stable" and "unstable": 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:
nvm install stable - `node`: this installs the latest version of [`node`](https://nodejs.org/en/)
nvm install unstable - `iojs`: this installs the latest version of [`io.js`](https://iojs.org/en/)
nvm use stable - `stable`: this alias is deprecated, and only truly applies to `node` `v0.12` and earlier. Currently, this is an alias for `node`.
nvm run unstable --version - `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 uninstall --lts` / `nvm uninstall --lts=argon`
- `nvm use --lts` / `nvm use --lts=argon`
- `nvm exec --lts` / `nvm exec --lts=argon`
- `nvm run --lts` / `nvm run --lts=argon`
- `nvm ls-remote --lts` / `nvm ls-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:
```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:
```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/): 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:
```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": If you want to use the system-installed version of node, you can use the special default alias "system":
nvm use system ```sh
nvm run system --version nvm use system
nvm run system --version
```
### Listing versions
If you want to see what versions are installed: 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: 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': To set a default Node version to be used in any new shell, use the alias 'default':
nvm alias default stable ```sh
nvm alias default node
```
To use a mirror of the node binaries, set `$NVM_NODEJS_ORG_MIRROR`: To use a mirror of the node binaries, set `$NVM_NODEJS_ORG_MIRROR`:
export NVM_NODEJS_ORG_MIRROR=https://nodejs.org/dist ```sh
nvm install 0.10 export NVM_NODEJS_ORG_MIRROR=https://nodejs.org/dist
nvm install node
NVM_NODEJS_ORG_MIRROR=https://nodejs.org/dist nvm install 0.10 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 ```sh
nvm install iojs-v1.0.3 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
You can create a `.nvmrc` file containing version number in the project root directory (or any parent directory).
`nvm use`, `nvm install`, `nvm exec`, `nvm run`, and `nvm which` will all respect an `.nvmrc` file when a version is not supplied.
For example, to make nvm default to the latest 5.9 release for the current directory:
```sh
$ echo "5.9" > .nvmrc
$ echo "lts/*" > .nvmrc # to default to the latest LTS version
```
Then when you run nvm:
```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
You can use [`avn`](https://github.com/wbyoung/avn) to deeply integrate into your shell and automatically invoke `nvm` when changing directories. `avn` is **not** supported by the `nvm` development team. Please [report issues to the `avn` team](https://github.com/wbyoung/avn/issues/new).
If you prefer a lighter-weight solution, the recipes below have been contributed by `nvm` users. They are **not** supported by the `nvm` development team. We are, however, accepting pull requests for more examples.
#### Zsh
##### Calling `nvm use` automatically in a directory with a `.nvmrc` file
Put this into your `$HOME/.zshrc` to call `nvm use` automatically whenever you enter a directory that contains an
`.nvmrc` file with a string telling nvm which node to `use`:
```zsh
# 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
echo "Reverting to nvm default version"
nvm use default
fi
}
add-zsh-hook chpwd load-nvmrc
load-nvmrc
```
## License ## License
nvm is released under the MIT license. nvm is released under the MIT license.
Copyright (C) 2010-2014 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: 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:
@@ -134,15 +314,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 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 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, 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 npm run test/fast
Run the slow tests like this. Run the slow tests like this:
npm run test/slow npm run test/slow
Run all of the tests like this Run all of the tests like this:
npm test npm test
@@ -152,20 +332,22 @@ Nota bene: Avoid running nvm while the tests are running.
To activate, you need to source `bash_completion`: To activate, you need to source `bash_completion`:
```sh
[[ -r $NVM_DIR/bash_completion ]] && . $NVM_DIR/bash_completion [[ -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 ### Usage
nvm nvm:
$ nvm [tab][tab] $ nvm [tab][tab]
alias deactivate install ls run unload alias deactivate install ls run unload
clear-cache exec list ls-remote unalias use clear-cache exec list ls-remote unalias use
current help list-remote reinstall-packages uninstall version current help list-remote reinstall-packages uninstall version
nvm alias nvm alias:
$ nvm alias [tab][tab] $ nvm alias [tab][tab]
default default
@@ -173,36 +355,77 @@ nvm alias
$ nvm alias my_alias [tab][tab] $ nvm alias my_alias [tab][tab]
v0.6.21 v0.8.26 v0.10.28 v0.6.21 v0.8.26 v0.10.28
nvm use nvm use:
$ nvm use [tab][tab] $ nvm use [tab][tab]
my_alias default v0.6.21 v0.8.26 v0.10.28 my_alias default v0.6.21 v0.8.26 v0.10.28
nvm uninstall nvm uninstall:
$ nvm uninstall [tab][tab] $ nvm uninstall [tab][tab]
my_alias default v0.6.21 v0.8.26 v0.10.28 my_alias default v0.6.21 v0.8.26 v0.10.28
## Compatibility Issues
`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`:
```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.31.3/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 ## 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: 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:
curl: (33) HTTP server doesn't seem to support byte ranges. Cannot resume. curl: (33) HTTP server doesn't seem to support byte ranges. Cannot resume.
Where's my 'sudo node'? Checkout this link: Where's my 'sudo node'? Check out this link:
https://github.com/creationix/nvm/issues/43 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: 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:
nvm install -s 0.8.6 nvm install -s 0.8.6
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 [1]: https://github.com/creationix/nvm.git
[2]: https://github.com/creationix/nvm/blob/v0.23.3/install.sh [2]: https://github.com/creationix/nvm/blob/v0.31.3/install.sh
[3]: https://travis-ci.org/creationix/nvm [3]: https://travis-ci.org/creationix/nvm
[Urchin]: https://github.com/scraperwiki/urchin [Urchin]: https://github.com/scraperwiki/urchin
[Fish]: http://fishshell.com

View File

@@ -57,9 +57,9 @@ __nvm_aliases ()
declare aliases declare aliases
aliases="" aliases=""
if [ -d $NVM_DIR/alias ]; then if [ -d $NVM_DIR/alias ]; then
aliases="`cd $NVM_DIR/alias && ls`" aliases="$(cd $NVM_DIR/alias && find $PWD -type f | sed "s:$PWD/::")"
fi fi
echo "${aliases}" echo "${aliases} node stable unstable iojs"
} }
__nvm_alias () __nvm_alias ()
@@ -73,7 +73,7 @@ __nvm ()
previous_word="${COMP_WORDS[COMP_CWORD-1]}" previous_word="${COMP_WORDS[COMP_CWORD-1]}"
case "$previous_word" in case "$previous_word" in
use|run|ls|list|uninstall) __nvm_installed_nodes ;; use|run|exec|ls|list|uninstall) __nvm_installed_nodes ;;
alias|unalias) __nvm_alias ;; alias|unalias) __nvm_alias ;;
*) __nvm_commands ;; *) __nvm_commands ;;
esac esac

View File

@@ -1,48 +1,55 @@
#!/bin/bash #!/usr/bin/env bash
set -e { # this ensures the entire script is downloaded #
nvm_has() { nvm_has() {
type "$1" > /dev/null 2>&1 type "$1" > /dev/null 2>&1
} }
if [ -z "$NVM_DIR" ]; then nvm_install_dir() {
NVM_DIR="$HOME/.nvm" echo ${NVM_DIR:-"$HOME/.nvm"}
fi }
nvm_latest_version() { nvm_latest_version() {
echo "v0.23.3" echo "v0.31.3"
} }
# #
# Outputs the location to NVM depending on: # Outputs the location to NVM depending on:
# * The availability of $NVM_SOURCE # * The availability of $NVM_SOURCE
# * The method used ("script" or "git" in the script, defaults to "git") # * The method used ("script" or "git" in the script, defaults to "git")
# NVM_SOURCE always takes precedence # NVM_SOURCE always takes precedence unless the method is "script-nvm-exec"
# #
nvm_source() { nvm_source() {
local NVM_METHOD local NVM_METHOD
NVM_METHOD="$1" NVM_METHOD="$1"
if [ -z "$NVM_SOURCE" ]; then local NVM_SOURCE_URL
local NVM_SOURCE NVM_SOURCE_URL="$NVM_SOURCE"
if [ "_$NVM_METHOD" = "_script-nvm-exec" ]; then
NVM_SOURCE_URL="https://raw.githubusercontent.com/creationix/nvm/$(nvm_latest_version)/nvm-exec"
elif [ -z "$NVM_SOURCE_URL" ]; then
if [ "_$NVM_METHOD" = "_script" ]; then if [ "_$NVM_METHOD" = "_script" ]; then
NVM_SOURCE="https://raw.githubusercontent.com/creationix/nvm/$(nvm_latest_version)/nvm.sh" NVM_SOURCE_URL="https://raw.githubusercontent.com/creationix/nvm/$(nvm_latest_version)/nvm.sh"
elif [ "_$NVM_METHOD" = "_script-nvm-exec" ]; then
NVM_SOURCE="https://raw.githubusercontent.com/creationix/nvm/$(nvm_latest_version)/nvm-exec"
elif [ "_$NVM_METHOD" = "_git" ] || [ -z "$NVM_METHOD" ]; then elif [ "_$NVM_METHOD" = "_git" ] || [ -z "$NVM_METHOD" ]; then
NVM_SOURCE="https://github.com/creationix/nvm.git" NVM_SOURCE_URL="https://github.com/creationix/nvm.git"
else else
echo >&2 "Unexpected value \"$NVM_METHOD\" for \$NVM_METHOD" echo >&2 "Unexpected value \"$NVM_METHOD\" for \$NVM_METHOD"
return 1 return 1
fi fi
fi fi
echo "$NVM_SOURCE" echo "$NVM_SOURCE_URL"
return 0 }
#
# Node.js version to install
#
nvm_node_version() {
echo "$NODE_VERSION"
} }
nvm_download() { nvm_download() {
if nvm_has "curl"; then if nvm_has "curl"; then
curl $* curl -q $*
elif nvm_has "wget"; then elif nvm_has "wget"; then
# Emulate curl with wget # Emulate curl with wget
ARGS=$(echo "$*" | command sed -e 's/--progress-bar /--progress=bar /' \ ARGS=$(echo "$*" | command sed -e 's/--progress-bar /--progress=bar /' \
@@ -56,38 +63,79 @@ nvm_download() {
} }
install_nvm_from_git() { install_nvm_from_git() {
if [ -d "$NVM_DIR/.git" ]; then local INSTALL_DIR
echo "=> nvm is already installed in $NVM_DIR, trying to update using git" INSTALL_DIR="$(nvm_install_dir)"
if [ -d "$INSTALL_DIR/.git" ]; then
echo "=> nvm is already installed in $INSTALL_DIR, trying to update using git"
printf "\r=> " printf "\r=> "
cd "$NVM_DIR" && (command git fetch 2> /dev/null || { 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 $NVM_DIR yourself." && exit 1 echo >&2 "Failed to update nvm, run 'git fetch' in $INSTALL_DIR yourself."
}) exit 1
}
else else
# Cloning to $NVM_DIR # Cloning to $NVM_DIR
echo "=> Downloading nvm from git to '$NVM_DIR'" echo "=> Downloading nvm from git to '$INSTALL_DIR'"
printf "\r=> " printf "\r=> "
mkdir -p "$NVM_DIR" mkdir -p "$INSTALL_DIR"
command git clone "$(nvm_source git)" "$NVM_DIR" command git clone "$(nvm_source)" "$INSTALL_DIR" || {
echo >&2 "Failed to clone nvm repo. Please report this!"
exit 1
}
fi
command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" checkout --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!"
command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" branch -D master >/dev/null 2>&1
fi
fi fi
cd "$NVM_DIR" && command git checkout --quiet $(nvm_latest_version) && command git branch --quiet -D master >/dev/null 2>&1
return return
} }
#
# Automatically install Node.js
#
nvm_install_node() {
local NODE_VERSION
NODE_VERSION="$(nvm_node_version)"
if [ -z "$NODE_VERSION" ]; then
echo "=> You can now install Node.js by running \`nvm install\`"
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() { install_nvm_as_script() {
local NVM_SOURCE local INSTALL_DIR
NVM_SOURCE=$(nvm_source script) INSTALL_DIR="$(nvm_install_dir)"
local NVM_SOURCE_LOCAL
NVM_SOURCE_LOCAL=$(nvm_source script)
local NVM_EXEC_SOURCE local NVM_EXEC_SOURCE
NVM_EXEC_SOURCE=$(nvm_source script-nvm-exec) NVM_EXEC_SOURCE=$(nvm_source script-nvm-exec)
# Downloading to $NVM_DIR # Downloading to $INSTALL_DIR
mkdir -p "$NVM_DIR" mkdir -p "$INSTALL_DIR"
if [ -d "$NVM_DIR/nvm.sh" ]; then if [ -f "$INSTALL_DIR/nvm.sh" ]; then
echo "=> nvm is already installed in $NVM_DIR, trying to update the script" echo "=> nvm is already installed in $INSTALL_DIR, trying to update the script"
else else
echo "=> Downloading nvm as script to '$NVM_DIR'" echo "=> Downloading nvm as script to '$INSTALL_DIR'"
fi fi
nvm_download -s "$NVM_SOURCE" -o "$NVM_DIR/nvm.sh" || { nvm_download -s "$NVM_SOURCE_LOCAL" -o "$INSTALL_DIR/nvm.sh" || {
echo >&2 "Failed to download '$NVM_SOURCE'" echo >&2 "Failed to download '$NVM_SOURCE_LOCAL'"
return 1 return 1
} }
nvm_download -s "$NVM_EXEC_SOURCE" -o "$NVM_DIR/nvm-exec" || { nvm_download -s "$NVM_EXEC_SOURCE" -o "$NVM_DIR/nvm-exec" || {
@@ -107,16 +155,87 @@ install_nvm_as_script() {
# Otherwise, an empty string is returned # Otherwise, an empty string is returned
# #
nvm_detect_profile() { nvm_detect_profile() {
if [ -f "$PROFILE" ]; then if [ -n "$PROFILE" -a -f "$PROFILE" ]; then
echo "$PROFILE" echo "$PROFILE"
elif [ -f "$HOME/.bashrc" ]; then return
echo "$HOME/.bashrc" fi
elif [ -f "$HOME/.bash_profile" ]; then
echo "$HOME/.bash_profile" local DETECTED_PROFILE
elif [ -f "$HOME/.zshrc" ]; then DETECTED_PROFILE=''
echo "$HOME/.zshrc" local SHELLTYPE
elif [ -f "$HOME/.profile" ]; then SHELLTYPE="$(basename "/$SHELL")"
echo "$HOME/.profile"
if [ "$SHELLTYPE" = "bash" ]; then
if [ -f "$HOME/.bashrc" ]; then
DETECTED_PROFILE="$HOME/.bashrc"
elif [ -f "$HOME/.bash_profile" ]; then
DETECTED_PROFILE="$HOME/.bash_profile"
fi
elif [ "$SHELLTYPE" = "zsh" ]; then
DETECTED_PROFILE="$HOME/.zshrc"
fi
if [ -z "$DETECTED_PROFILE" ]; then
if [ -f "$HOME/.profile" ]; then
DETECTED_PROFILE="$HOME/.profile"
elif [ -f "$HOME/.bashrc" ]; then
DETECTED_PROFILE="$HOME/.bashrc"
elif [ -f "$HOME/.bash_profile" ]; then
DETECTED_PROFILE="$HOME/.bash_profile"
elif [ -f "$HOME/.zshrc" ]; then
DETECTED_PROFILE="$HOME/.zshrc"
fi
fi
if [ ! -z "$DETECTED_PROFILE" ]; then
echo "$DETECTED_PROFILE"
fi
}
#
# Check whether the user has any globally-installed npm modules in their system
# Node, and warn them if so.
#
nvm_check_global_modules() {
command -v npm >/dev/null 2>&1 || return 0
local NPM_VERSION
NPM_VERSION="$(npm --version)"
NPM_VERSION="${NPM_VERSION:--1}"
[ "${NPM_VERSION%%[!-0-9]*}" -gt 0 ] || return 0
local NPM_GLOBAL_MODULES
NPM_GLOBAL_MODULES="$(
npm list -g --depth=0 |
sed '/ npm@/d' |
sed '/ (empty)$/d'
)"
local MODULE_COUNT
MODULE_COUNT="$(
printf %s\\n "$NPM_GLOBAL_MODULES" |
sed -ne '1!p' | # Remove the first line
wc -l | tr -d ' ' # Count entries
)"
if [ $MODULE_COUNT -ne 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
=> with `nvm`; and they may (depending on how you construct your `$PATH`)
=> override the binaries of modules installed with `nvm`:
END_MESSAGE
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
=> `nvm` Nodes), you can remove them from the system Node as follows:
$ nvm use system
$ npm uninstall -g a_module
END_MESSAGE
fi fi
} }
@@ -149,8 +268,10 @@ nvm_do_install() {
local NVM_PROFILE 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"
if [ -z "$NVM_PROFILE" ] ; then if [ -z "$NVM_PROFILE" ] ; then
echo "=> Profile not found. Tried $NVM_PROFILE (as defined in \$PROFILE), ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile." echo "=> Profile not found. Tried $NVM_PROFILE (as defined in \$PROFILE), ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile."
@@ -161,7 +282,7 @@ nvm_do_install() {
printf "$SOURCE_STR" printf "$SOURCE_STR"
echo echo
else else
if ! grep -qc 'nvm.sh' "$NVM_PROFILE"; then if ! command grep -qc '/nvm.sh' "$NVM_PROFILE"; then
echo "=> Appending source string to $NVM_PROFILE" echo "=> Appending source string to $NVM_PROFILE"
printf "$SOURCE_STR\n" >> "$NVM_PROFILE" printf "$SOURCE_STR\n" >> "$NVM_PROFILE"
else else
@@ -169,7 +290,13 @@ nvm_do_install() {
fi fi
fi fi
echo "=> Close and reopen your terminal to start using nvm" # Sourcing $PROFILE to take into account the new environment
. "$NVM_PROFILE"
nvm_check_global_modules
nvm_install_node
nvm_reset nvm_reset
} }
@@ -178,7 +305,12 @@ nvm_do_install() {
# during the execution of the install script # during the execution of the install script
# #
nvm_reset() { nvm_reset() {
unset -f nvm_do_install nvm_has nvm_download install_nvm_as_script install_nvm_from_git nvm_reset nvm_detect_profile nvm_latest_version 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_install_dir nvm_node_version nvm_install_node
} }
[ "_$NVM_ENV" = "_testing" ] || nvm_do_install [ "_$NVM_ENV" = "_testing" ] || nvm_do_install
} # this ensures the entire script is downloaded #

View File

@@ -1,14 +1,14 @@
#!/bin/bash #!/usr/bin/env bash
DIR="$(command cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" DIR="$(command cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$DIR/nvm.sh" . "$DIR/nvm.sh" --no-use
if [ -n "$NODE_VERSION" ]; then if [ -n "$NODE_VERSION" ]; then
nvm use $NODE_VERSION > /dev/null || (echo "NODE_VERSION not set" >&2 && exit 127) nvm use $NODE_VERSION > /dev/null || exit 127
else elif ! nvm use >/dev/null 2>&1; then
nvm use > /dev/null || (echo "No .nvmrc file found" >&2 && exit 127) echo "No NODE_VERSION provided; no .nvmrc file found" >&2
exit 127
fi fi
exec $@ exec "$@"

2406
nvm.sh

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{ {
"name": "nvm", "name": "nvm",
"version": "0.23.3", "version": "0.31.3",
"description": "Node Version Manager - Simple bash script to manage multiple active node.js versions", "description": "Node Version Manager - Simple bash script to manage multiple active node.js versions",
"directories": { "directories": {
"test": "test" "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/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/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/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" "test/sourcing": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=sourcing test-$shell"
}, },
"repository": { "repository": {
@@ -20,6 +22,7 @@
"keywords": [ "keywords": [
"nvm", "nvm",
"node", "node",
"iojs",
"version", "version",
"manager" "manager"
], ],
@@ -30,8 +33,8 @@
}, },
"homepage": "https://github.com/creationix/nvm", "homepage": "https://github.com/creationix/nvm",
"devDependencies": { "devDependencies": {
"replace": "~0.3.0", "replace": "^0.3.0",
"semver": "~4.2.0", "semver": "^5.0.1",
"urchin": "~0.0.5" "urchin": "^0.0.5"
} }
} }

65
test/common.sh Normal file
View File

@@ -0,0 +1,65 @@
assert_ok() {
local FUNCTION=$1
shift
$($FUNCTION $@) || die '"'"$FUNCTION $@"'" should have succeeded, but failed'
}
assert_not_ok() {
local FUNCTION=$1
shift
! $($FUNCTION $@) || die '"'"$FUNCTION $@"'" should have failed, but succeeded'
}
strip_colors() {
while read -r line; do
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
}
}

View File

@@ -0,0 +1,27 @@
#!/bin/sh
. ../../../nvm.sh
die () { echo $@ ; exit 1; }
OUTPUT="$(nvm alias foo/bar baz 2>&1)"
EXPECTED_OUTPUT="Aliases in subdirectories are not supported."
[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "trying to create an alias with a slash should fail with '$EXPECTED_OUTPUT', got '$OUTPUT'"
EXIT_CODE="$(nvm alias foo/bar baz >/dev/null 2>&1 ; echo $?)"
[ "$EXIT_CODE" = "1" ] || die "trying to create an alias with a slash should fail with code 1, got '$EXIT_CODE'"
OUTPUT="$(nvm alias foo/ baz 2>&1)"
EXPECTED_OUTPUT="Aliases in subdirectories are not supported."
[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "trying to create an alias ending with a slash should fail with '$EXPECTED_OUTPUT', got '$OUTPUT'"
EXIT_CODE="$(nvm alias foo/ baz >/dev/null 2>&1 ; echo $?)"
[ "$EXIT_CODE" = "1" ] || die "trying to create an alias ending with a slash should fail with code 1, got '$EXIT_CODE'"
OUTPUT="$(nvm alias /bar baz 2>&1)"
EXPECTED_OUTPUT="Aliases in subdirectories are not supported."
[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "trying to create an alias starting with a slash should fail with '$EXPECTED_OUTPUT', got '$OUTPUT'"
EXIT_CODE="$(nvm alias /bar baz >/dev/null 2>&1 ; echo $?)"
[ "$EXIT_CODE" = "1" ] || die "trying to create an alias starting with a slash should fail with code 1, got '$EXIT_CODE'"

View File

@@ -0,0 +1,27 @@
#!/bin/sh
. ../../../nvm.sh
die () { echo $@ ; exit 1; }
OUTPUT="$(nvm unalias foo/bar 2>&1)"
EXPECTED_OUTPUT="Aliases in subdirectories are not supported."
[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "trying to remove an alias with a slash should fail with '$EXPECTED_OUTPUT', got '$OUTPUT'"
EXIT_CODE="$(nvm unalias foo/bar >/dev/null 2>&1 ; echo $?)"
[ "$EXIT_CODE" = "1" ] || die "trying to remove an alias with a slash should fail with code 1, got '$EXIT_CODE'"
OUTPUT="$(nvm unalias foo/ 2>&1)"
EXPECTED_OUTPUT="Aliases in subdirectories are not supported."
[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "trying to remove an alias ending with a slash should fail with '$EXPECTED_OUTPUT', got '$OUTPUT'"
EXIT_CODE="$(nvm unalias foo/ >/dev/null 2>&1 ; echo $?)"
[ "$EXIT_CODE" = "1" ] || die "trying to remove an alias ending with a slash should fail with code 1, got '$EXIT_CODE'"
OUTPUT="$(nvm unalias /bar 2>&1)"
EXPECTED_OUTPUT="Aliases in subdirectories are not supported."
[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "trying to remove an alias starting with a slash should fail with '$EXPECTED_OUTPUT', got '$OUTPUT'"
EXIT_CODE="$(nvm unalias /bar >/dev/null 2>&1 ; echo $?)"
[ "$EXIT_CODE" = "1" ] || die "trying to remove an alias starting with a slash should fail with code 1, got '$EXIT_CODE'"

View File

@@ -1,6 +1,7 @@
#!/bin/sh #!/bin/sh
. ../../../nvm.sh . ../../../nvm.sh
. ../../common.sh
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
@@ -10,12 +11,14 @@ if [ -n "$ZSH_VERSION" ]; then
setopt noclobber setopt noclobber
fi fi
nvm alias test-stable-1 0.0.2 nvm alias test-stable-1 0.0.2 || die '`nvm alias test-stable-1 0.0.2` failed'
nvm alias test-stable-1 | \grep -e "test-stable-1 -> 0.0.2 (-> v0.0.2)" \ OUTPUT="$(nvm alias test-stable-1 | strip_colors)"
|| die "nvm alias test-stable-1 0.0.2 did not set test-stable-1 to 0.0.2" EXPECTED_OUTPUT='test-stable-1 -> 0.0.2 (-> v0.0.2)'
echo "$OUTPUT" | \grep -F "$EXPECTED_OUTPUT" || die "nvm alias test-stable-1 0.0.2 did not set test-stable-1 to 0.0.2: got '$OUTPUT'"
nvm alias test-stable-1 0.0.1 nvm alias test-stable-1 0.0.1 || die '`nvm alias test-stable-1 0.0.1` failed'
nvm alias test-stable-1 | \grep -e "test-stable-1 -> 0.0.1 (-> v0.0.1)" \ OUTPUT="$(nvm alias test-stable-1 | strip_colors)"
|| die "nvm alias test-stable-1 0.0.1 did not set test-stable-1 to 0.0.1" EXPECTED_OUTPUT='test-stable-1 -> 0.0.1 (-> v0.0.1)'
echo "$OUTPUT" | \grep -F "$EXPECTED_OUTPUT" || die "nvm alias test-stable-1 0.0.1 did not set test-stable-1 to 0.0.1: got '$OUTPUT'"

View File

@@ -1,18 +1,27 @@
#!/bin/sh #!/bin/sh
. ../../../nvm.sh . ../../../nvm.sh
. ../../common.sh
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
NVM_ALIAS_OUTPUT=$(nvm alias) NVM_ALIAS_OUTPUT=$(nvm alias | strip_colors)
EXPECTED_STABLE="$(nvm_print_implicit_alias local stable)" EXPECTED_STABLE="$(nvm_print_implicit_alias local stable)"
STABLE_VERSION="$(nvm_version "$EXPECTED_STABLE")" STABLE_VERSION="$(nvm_version "$EXPECTED_STABLE")"
echo "$NVM_ALIAS_OUTPUT" | \grep -e "^stable -> $EXPECTED_STABLE (-> $STABLE_VERSION) (default)$" \ echo "$NVM_ALIAS_OUTPUT" | \grep -F "stable -> $EXPECTED_STABLE (-> $STABLE_VERSION) (default)" \
|| die "nvm alias did not contain the default local stable node version" || die "nvm alias did not contain the default local stable node version; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -F "node -> stable (-> $STABLE_VERSION) (default)" \
|| die "nvm alias did not contain the default local stable node version under 'node'; got '$NVM_ALIAS_OUTPUT'"
EXPECTED_UNSTABLE="$(nvm_print_implicit_alias local unstable)" EXPECTED_UNSTABLE="$(nvm_print_implicit_alias local unstable)"
UNSTABLE_VERSION="$(nvm_version "$EXPECTED_UNSTABLE")" UNSTABLE_VERSION="$(nvm_version "$EXPECTED_UNSTABLE")"
echo "$NVM_ALIAS_OUTPUT" | \grep -e "^unstable -> $EXPECTED_UNSTABLE (-> $UNSTABLE_VERSION) (default)$" \ echo "$NVM_ALIAS_OUTPUT" | \grep -F "unstable -> $EXPECTED_UNSTABLE (-> $UNSTABLE_VERSION) (default)" \
|| die "nvm alias did not contain the default local unstable node version" || die "nvm alias did not contain the default local unstable node version; got '$NVM_ALIAS_OUTPUT'"
EXPECTED_IOJS="$(nvm_print_implicit_alias local iojs)"
IOJS_VERSION="$(nvm_version "$EXPECTED_IOJS")"
echo "$NVM_ALIAS_OUTPUT" | \grep -F "iojs -> $EXPECTED_IOJS (-> $IOJS_VERSION) (default)" \
|| die "nvm alias did not contain the default local iojs version; got '$NVM_ALIAS_OUTPUT'"

View File

@@ -1,17 +1,22 @@
#!/bin/sh #!/bin/sh
. ../../../nvm.sh . ../../../nvm.sh
. ../../common.sh
die () { echo $@ ; cleanup ; exit 1; } die () { echo $@ ; cleanup ; exit 1; }
cleanup () { cleanup () {
rm -rf ../../../alias/stable rm -rf "$(nvm_alias_path)/stable"
rm -rf ../../../alias/unstable rm -rf "$(nvm_alias_path)/unstable"
rm -rf ../../../v0.8.1 rm -rf "$(nvm_alias_path)/node"
rm -rf ../../../v0.9.1 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 "${NVM_DIR}/v0.8.1"
mkdir ../../../v0.9.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)" EXPECTED_STABLE="$(nvm_print_implicit_alias local stable)"
STABLE_VERSION="$(nvm_version "$EXPECTED_STABLE")" STABLE_VERSION="$(nvm_version "$EXPECTED_STABLE")"
@@ -24,14 +29,21 @@ UNSTABLE_VERSION="$(nvm_version "$EXPECTED_UNSTABLE")"
nvm alias stable "$EXPECTED_UNSTABLE" nvm alias stable "$EXPECTED_UNSTABLE"
nvm alias unstable "$EXPECTED_STABLE" nvm alias unstable "$EXPECTED_STABLE"
nvm alias node stable
nvm alias iojs unstable
NVM_ALIAS_OUTPUT=$(nvm alias) NVM_ALIAS_OUTPUT=$(nvm alias | strip_colors)
echo "$NVM_ALIAS_OUTPUT" | \grep -e "^stable -> $EXPECTED_UNSTABLE (-> $UNSTABLE_VERSION)$" \ echo "$NVM_ALIAS_OUTPUT" | command grep -F "stable -> $EXPECTED_UNSTABLE (-> $UNSTABLE_VERSION)" \
|| die "nvm alias did not contain the overridden 'stable' alias" || die "nvm alias did not contain the overridden 'stable' alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -e "^unstable -> $EXPECTED_STABLE (-> $STABLE_VERSION)$" \ echo "$NVM_ALIAS_OUTPUT" | command grep -F "unstable -> $EXPECTED_STABLE (-> $STABLE_VERSION)" \
|| die "nvm alias did not contain the overridden 'unstable' alias" || die "nvm alias did not contain the overridden 'unstable' alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | command grep -F "node -> stable (-> $UNSTABLE_VERSION)" \
|| die "nvm alias did not contain the overridden 'node' alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | command grep -F "iojs -> unstable (-> $STABLE_VERSION)" \
|| die "nvm alias did not contain the overridden 'iojs' alias; got '$NVM_ALIAS_OUTPUT'"
cleanup cleanup

View File

@@ -1,48 +1,48 @@
#!/bin/sh #!/bin/sh
. ../../../nvm.sh . ../../../nvm.sh
. ../../common.sh
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
NVM_ALIAS_OUTPUT=$(nvm alias) NVM_ALIAS_OUTPUT="$(nvm alias | strip_colors)"
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-stable-1 -> 0.0.1 (-> v0.0.1)$' \ echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-stable-1 -> 0.0.1 (-> v0.0.1)' \
|| die "did not find test-stable-1 alias" || die "did not find test-stable-1 alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-stable-2 -> 0.0.2 (-> v0.0.2)$' \ echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-stable-2 -> 0.0.2 (-> v0.0.2)' \
|| die "did not find test-stable-2 alias" || die "did not find test-stable-2 alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-stable-3 -> 0.0.3 (-> v0.0.3)$' \ echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-stable-3 -> 0.0.3 (-> v0.0.3)' \
|| die "did not find test-stable-3 alias" || die "did not find test-stable-3 alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-stable-4 -> 0.0.4 (-> v0.0.4)$' \ echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-stable-4 -> 0.0.4 (-> v0.0.4)' \
|| die "did not find test-stable-4 alias" || die "did not find test-stable-4 alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-stable-5 -> 0.0.5 (-> v0.0.5)$' \ echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-stable-5 -> 0.0.5 (-> v0.0.5)' \
|| die "did not find test-stable-5 alias" || die "did not find test-stable-5 alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-stable-6 -> 0.0.6 (-> v0.0.6)$' \ echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-stable-6 -> 0.0.6 (-> v0.0.6)' \
|| die "did not find test-stable-6 alias" || die "did not find test-stable-6 alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-stable-7 -> 0.0.7 (-> v0.0.7)$' \ echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-stable-7 -> 0.0.7 (-> v0.0.7)' \
|| die "did not find test-stable-7 alias" || die "did not find test-stable-7 alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-stable-8 -> 0.0.8 (-> v0.0.8)$' \ echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-stable-8 -> 0.0.8 (-> v0.0.8)' \
|| die "did not find test-stable-8 alias" || die "did not find test-stable-8 alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-stable-9 -> 0.0.9 (-> v0.0.9)$' \ echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-stable-9 -> 0.0.9 (-> v0.0.9)' \
|| die "did not find test-stable-9 alias" || die "did not find test-stable-9 alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-stable-10 -> 0.0.10 (-> v0.0.10)$' \ echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-stable-10 -> 0.0.10 (-> v0.0.10)' \
|| die "did not find test-stable-10 alias" || die "did not find test-stable-10 alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-unstable-1 -> 0.1.1 (-> v0.1.1)$' \ echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-unstable-1 -> 0.1.1 (-> v0.1.1)' \
|| die "did not find test-unstable-1 alias" || die "did not find test-unstable-1 alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-unstable-2 -> 0.1.2 (-> v0.1.2)$' \ echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-unstable-2 -> 0.1.2 (-> v0.1.2)' \
|| die "did not find test-unstable-2 alias" || die "did not find test-unstable-2 alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-unstable-3 -> 0.1.3 (-> v0.1.3)$' \ echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-unstable-3 -> 0.1.3 (-> v0.1.3)' \
|| die "did not find test-unstable-3 alias" || die "did not find test-unstable-3 alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-unstable-4 -> 0.1.4 (-> v0.1.4)$' \ echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-unstable-4 -> 0.1.4 (-> v0.1.4)' \
|| die "did not find test-unstable-4 alias" || die "did not find test-unstable-4 alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-unstable-5 -> 0.1.5 (-> v0.1.5)$' \ echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-unstable-5 -> 0.1.5 (-> v0.1.5)' \
|| die "did not find test-unstable-5 alias" || die "did not find test-unstable-5 alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-unstable-6 -> 0.1.6 (-> v0.1.6)$' \ echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-unstable-6 -> 0.1.6 (-> v0.1.6)' \
|| die "did not find test-unstable-6 alias" || die "did not find test-unstable-6 alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-unstable-7 -> 0.1.7 (-> v0.1.7)$' \ echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-unstable-7 -> 0.1.7 (-> v0.1.7)' \
|| die "did not find test-unstable-7 alias" || die "did not find test-unstable-7 alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-unstable-8 -> 0.1.8 (-> v0.1.8)$' \ echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-unstable-8 -> 0.1.8 (-> v0.1.8)' \
|| die "did not find test-unstable-8 alias" || die "did not find test-unstable-8 alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-unstable-9 -> 0.1.9 (-> v0.1.9)$' \ echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-unstable-9 -> 0.1.9 (-> v0.1.9)' \
|| die "did not find test-unstable-9 alias" || die "did not find test-unstable-9 alias; got '$NVM_ALIAS_OUTPUT'"
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-unstable-10 -> 0.1.10 (-> v0.1.10)$' \ echo "$NVM_ALIAS_OUTPUT" | \grep -F 'test-unstable-10 -> 0.1.10 (-> v0.1.10)' \
|| die "did not find test-unstable-10 alias" || die "did not find test-unstable-10 alias; got '$NVM_ALIAS_OUTPUT'"

View File

@@ -1,36 +1,36 @@
#!/bin/sh #!/bin/sh
. ../../../common.sh
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
. ../../../../nvm.sh . ../../../../nvm.sh
ALIAS="$(nvm_resolve_alias loopback)" ALIAS="$(nvm_resolve_alias loopback | strip_colors)"
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_alias loopback was not ∞; got $ALIAS" [ "_$ALIAS" = "_∞" ] || die "nvm_resolve_alias loopback was not ∞; got $ALIAS"
OUTPUT="$(nvm alias loopback)" OUTPUT="$(nvm alias loopback | strip_colors)"
EXPECTED_OUTPUT="loopback -> loopback (-> ∞)" EXPECTED_OUTPUT="loopback -> loopback (-> ∞)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias loopback was not $EXPECTED_OUTPUT; got $OUTPUT" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias loopback was not $EXPECTED_OUTPUT; got $OUTPUT"
ALIAS="$(nvm_resolve_alias one)" ALIAS="$(nvm_resolve_alias one | strip_colors)"
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_alias one was not ∞; got $ALIAS" [ "_$ALIAS" = "_∞" ] || die "nvm_resolve_alias one was not ∞; got $ALIAS"
OUTPUT="$(nvm alias one)" OUTPUT="$(nvm alias one | strip_colors)"
EXPECTED_OUTPUT="one -> two (-> ∞)" EXPECTED_OUTPUT="one -> two (-> ∞)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias one was not $EXPECTED_OUTPUT; got $OUTPUT" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias one was not $EXPECTED_OUTPUT; got $OUTPUT"
ALIAS="$(nvm_resolve_alias two)" ALIAS="$(nvm_resolve_alias two | strip_colors)"
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_alias two was not ∞; got $ALIAS" [ "_$ALIAS" = "_∞" ] || die "nvm_resolve_alias two was not ∞; got $ALIAS"
OUTPUT="$(nvm alias two)" OUTPUT="$(nvm alias two | strip_colors)"
EXPECTED_OUTPUT="two -> three (-> ∞)" EXPECTED_OUTPUT="two -> three (-> ∞)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias two was not $EXPECTED_OUTPUT; got $OUTPUT" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias two was not $EXPECTED_OUTPUT; got $OUTPUT"
ALIAS="$(nvm_resolve_alias three)" ALIAS="$(nvm_resolve_alias three | strip_colors)"
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_alias three was not ∞; got $ALIAS" [ "_$ALIAS" = "_∞" ] || die "nvm_resolve_alias three was not ∞; got $ALIAS"
OUTPUT="$(nvm alias three)" OUTPUT="$(nvm alias three | strip_colors)"
EXPECTED_OUTPUT="three -> one (-> ∞)" EXPECTED_OUTPUT="three -> one (-> ∞)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias three was not $EXPECTED_OUTPUT; got $OUTPUT" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias three was not $EXPECTED_OUTPUT; got $OUTPUT"
ALIAS="$(nvm_resolve_alias four)" ALIAS="$(nvm_resolve_alias four | strip_colors)"
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_alias four was not ∞; got $ALIAS" [ "_$ALIAS" = "_∞" ] || die "nvm_resolve_alias four was not ∞; got $ALIAS"
OUTPUT="$(nvm alias four)" OUTPUT="$(nvm alias four | strip_colors)"
EXPECTED_OUTPUT="four -> two (-> ∞)" EXPECTED_OUTPUT="four -> two (-> ∞)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias four was not $EXPECTED_OUTPUT; got $OUTPUT" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias four was not $EXPECTED_OUTPUT; got $OUTPUT"

View File

@@ -0,0 +1,36 @@
#!/bin/sh
. ../../../common.sh
die () { echo $@ ; exit 1; }
. ../../../../nvm.sh
ALIAS="$(nvm_resolve_local_alias loopback | strip_colors)"
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_local_alias loopback was not ∞; got $ALIAS"
OUTPUT="$(nvm alias loopback | strip_colors)"
EXPECTED_OUTPUT="loopback -> loopback (-> ∞)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias loopback was not $EXPECTED_OUTPUT; got $OUTPUT"
ALIAS="$(nvm_resolve_local_alias one | strip_colors)"
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_local_alias one was not ∞; got $ALIAS"
OUTPUT="$(nvm alias one | strip_colors)"
EXPECTED_OUTPUT="one -> two (-> ∞)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias one was not $EXPECTED_OUTPUT; got $OUTPUT"
ALIAS="$(nvm_resolve_local_alias two | strip_colors)"
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_local_alias two was not ∞; got $ALIAS"
OUTPUT="$(nvm alias two | strip_colors)"
EXPECTED_OUTPUT="two -> three (-> ∞)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias two was not $EXPECTED_OUTPUT; got $OUTPUT"
ALIAS="$(nvm_resolve_local_alias three | strip_colors)"
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_local_alias three was not ∞; got $ALIAS"
OUTPUT="$(nvm alias three | strip_colors)"
EXPECTED_OUTPUT="three -> one (-> ∞)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias three was not $EXPECTED_OUTPUT; got $OUTPUT"
ALIAS="$(nvm_resolve_local_alias four | strip_colors)"
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_local_alias four was not ∞; got $ALIAS"
OUTPUT="$(nvm alias four | strip_colors)"
EXPECTED_OUTPUT="four -> two (-> ∞)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias four was not $EXPECTED_OUTPUT; got $OUTPUT"

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

@@ -0,0 +1,20 @@
#!/bin/sh
. ../../common.sh
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
nvm alias default 0.1 >/dev/null || die "'nvm alias default 0.1' failed"
nvm_ensure_default_set 0.3 || die "'nvm_ensure_default_set' with an existing default alias exits 0"
nvm unalias default || die "'nvm unalias default' failed"
OUTPUT="$(nvm_ensure_default_set 0.2)"
EXPECTED_OUTPUT="Creating default alias: default -> 0.2 (-> iojs-v0.2.10)"
EXIT_CODE="$?"
[ "_$(echo "$OUTPUT" | strip_colors)" = "_$EXPECTED_OUTPUT" ] || die "'nvm_ensure_default_set 0.2' did not output '$EXPECTED_OUTPUT', got '$OUTPUT'"
[ "_$EXIT_CODE" = "_0" ] || die "'nvm_ensure_default_set 0.2' did not exit with 0, got $EXIT_CODE"

View File

@@ -21,8 +21,13 @@ EXIT_CODE=$(nvm_resolve_alias nonexistent ; echo $?)
[ $EXIT_CODE = "2" ] || die "'nvm_resolve_alias nonexistent' did not return 2; got $EXIT_CODE" [ $EXIT_CODE = "2" ] || die "'nvm_resolve_alias nonexistent' did not return 2; got $EXIT_CODE"
STABLE="$(nvm_resolve_alias stable)" STABLE="$(nvm_resolve_alias stable)"
[ "_$STABLE" = "_v0.0.10" ] || die "'nvm_resolve_alias stable' was not v0.0.10; got $STABLE" [ "_$STABLE" = "_v0.0" ] || die "'nvm_resolve_alias stable' was not v0.0; got $STABLE"
NODE="$(nvm_resolve_alias node)"
[ "_$NODE" = "_stable" ] || die "'nvm_resolve_alias node' was not stable; got $NODE"
UNSTABLE="$(nvm_resolve_alias unstable)" UNSTABLE="$(nvm_resolve_alias unstable)"
[ "_$UNSTABLE" = "_v0.1.10" ] || die "'nvm_resolve_alias unstable' was not v0.1.10; got $UNSTABLE" [ "_$UNSTABLE" = "_v0.1" ] || die "'nvm_resolve_alias unstable' was not v0.1; got $UNSTABLE"
IOJS="$(nvm_resolve_alias iojs)"
[ "_$IOJS" = "_iojs-v0.2" ] || die "'nvm_resolve_alias iojs' was not iojs-v0.2; got $IOJS"

View File

@@ -0,0 +1,35 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
EXIT_CODE=$(nvm_resolve_local_alias ; echo $?)
[ "_$EXIT_CODE" = "_1" ] || die "nvm_resolve_local_alias without an argument did not return 1; got $EXIT_CODE"
for i in $(seq 1 10)
do
STABLE_ALIAS="$(nvm_resolve_local_alias test-stable-$i)"
[ "_$STABLE_ALIAS" = "_v0.0.$i" ] \
|| die "'nvm_resolve_local_alias test-stable-$i' was not v0.0.$i; got $STABLE_ALIAS"
UNSTABLE_ALIAS="$(nvm_resolve_local_alias test-unstable-$i)"
[ "_$UNSTABLE_ALIAS" = "_v0.1.$i" ] \
|| die "'nvm_resolve_local_alias test-unstable-$i' was not v0.1.$i; got $UNSTABLE_ALIAS"
done
OUTPUT="$(nvm_resolve_local_alias nonexistent)"
EXIT_CODE=$(nvm_resolve_local_alias nonexistent > /dev/null 2>&1 ; echo $?)
[ "_$EXIT_CODE" = "_2" ] || die "'nvm_resolve_local_alias nonexistent' did not return 2; got $EXIT_CODE"
[ "_$OUTPUT" = "_" ] || die "'nvm_resolve_local_alias nonexistent' did not have empty output; got $OUTPUT"
STABLE="$(nvm_resolve_local_alias stable)"
[ "_$STABLE" = "_v0.0.10" ] || die "'nvm_resolve_local_alias stable' was not v0.0.10; got $STABLE"
NODE="$(nvm_resolve_local_alias node)"
[ "_$NODE" = "_v0.0.10" ] || die "'nvm_resolve_local_alias node' was not v0.0.10; got $NODE"
UNSTABLE="$(nvm_resolve_local_alias unstable)"
[ "_$UNSTABLE" = "_v0.1.10" ] || die "'nvm_resolve_local_alias unstable' was not v0.1.10; got $UNSTABLE"
IOJS="$(nvm_resolve_local_alias iojs)"
[ "_$IOJS" = "_iojs-v0.2.10" ] || die "'nvm_resolve_local_alias iojs' was not iojs-v0.2.10; got $IOJS"

View File

@@ -6,4 +6,6 @@ for i in $(seq 1 10)
mkdir -p ../../../v0.0.$i mkdir -p ../../../v0.0.$i
echo 0.1.$i > ../../../alias/test-unstable-$i echo 0.1.$i > ../../../alias/test-unstable-$i
mkdir -p ../../../v0.1.$i mkdir -p ../../../v0.1.$i
echo 0.2.$i > ../../../alias/test-iojs-$i
mkdir -p ../../../versions/io.js/v0.2.$i
done done

View File

@@ -6,8 +6,12 @@ for i in $(seq 1 10)
rm -rf "../../../v0.0.$i" rm -rf "../../../v0.0.$i"
rm -f "../../../alias/test-unstable-$i" rm -f "../../../alias/test-unstable-$i"
rm -rf "../../../v0.1.$i" rm -rf "../../../v0.1.$i"
rm -rf "../../../alias/test-iojs-$i"
rm -rf "../../../versions/io.js/v0.2.$i"
done done
rm -f "../../../alias/stable" rm -f "../../../alias/stable"
rm -f "../../../alias/unstable" rm -f "../../../alias/unstable"
rm -f "../../../alias/node"
rm -f "../../../alias/iojs"
rm -f "../../../alias/default"

View File

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

View File

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

View File

@@ -1,10 +1,10 @@
#!/bin/sh #!/bin/sh
mkdir ../../../v0.0.2
mkdir ../../../v0.0.20
. ../../../nvm.sh . ../../../nvm.sh
mkdir "${NVM_DIR}/v0.0.2"
mkdir "${NVM_DIR}/v0.0.20"
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
# The result should contain only the appropriate version numbers. # The result should contain only the appropriate version numbers.
@@ -18,4 +18,3 @@ nvm ls 0.0.2 | grep 'v0.0.20' > /dev/null
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
die '"nvm ls 0.0.2" contained v0.0.20' die '"nvm ls 0.0.2" contained v0.0.20'
fi fi

View File

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

View File

@@ -1,7 +1,6 @@
#!/bin/sh #!/bin/sh
. ../../../nvm.sh . ../../../nvm.sh
nvm ls nonexistent_version nvm ls nonexistent_version
[ "$?" = "3" ] [ "$?" = "3" ]

View File

@@ -1,7 +1,6 @@
#!/bin/sh #!/bin/sh
. ../../../nvm.sh . ../../../nvm.sh
nvm ls io nvm ls io
[ "$?" = "3" ] [ "$?" = "3" ]

View File

@@ -1,7 +1,6 @@
#!/bin/sh #!/bin/sh
. ../../../nvm.sh . ../../../nvm.sh
nvm ls node_ nvm ls node_
[ "$?" = "3" ] [ "$?" = "3" ]

View File

@@ -1,11 +1,11 @@
#!/bin/sh #!/bin/sh
. ../../../nvm.sh . ../../../nvm.sh
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
mkdir ../../../v0.2.3 mkdir "${NVM_DIR}/v0.2.3"
mkdir ../../../v0.3.3 mkdir "${NVM_DIR}/v0.3.3"
EXPECTED_STABLE="$(nvm_print_implicit_alias local stable)" EXPECTED_STABLE="$(nvm_print_implicit_alias local stable)"
STABLE_VERSION="$(nvm_version "$EXPECTED_STABLE")" STABLE_VERSION="$(nvm_version "$EXPECTED_STABLE")"
@@ -19,11 +19,10 @@ nvm ls stable | \grep "$STABLE_VERSION" >/dev/null \
nvm ls unstable | \grep "$UNSTABLE_VERSION" >/dev/null \ nvm ls unstable | \grep "$UNSTABLE_VERSION" >/dev/null \
|| die "expected 'nvm ls unstable' to give $UNSTABLE_VERSION, got $(nvm ls unstable)" || 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 alias stable 0.1
nvm ls stable | \grep -v "$STABLE_VERSION" >/dev/null \ nvm ls stable | \grep -v "$STABLE_VERSION" >/dev/null \
|| die "'nvm ls stable' contained $STABLE_VERSION instead of v0.1.2" || die "'nvm ls stable' contained $STABLE_VERSION instead of v0.1.2"
nvm ls stable | \grep v0.1.2 >/dev/null \ nvm ls stable | \grep v0.1.2 >/dev/null \
|| die "'nvm ls stable' did not contain v0.1.2" || die "'nvm ls stable' did not contain v0.1.2"

View File

@@ -4,12 +4,12 @@ die () { echo $@ ; exit 1; }
. ../../../nvm.sh . ../../../nvm.sh
mkdir -p ../../../v0.0.1 mkdir -p "${NVM_DIR}/v0.0.1"
mkdir -p ../../../v0.0.3 mkdir -p "${NVM_DIR}/v0.0.3"
mkdir -p ../../../v0.0.9 mkdir -p "${NVM_DIR}/v0.0.9"
mkdir -p ../../../v0.3.1 mkdir -p "${NVM_DIR}/v0.3.1"
mkdir -p ../../../v0.3.3 mkdir -p "${NVM_DIR}/v0.3.3"
mkdir -p ../../../v0.3.9 mkdir -p "${NVM_DIR}/v0.3.9"
nvm_has_system_node() { return 0; } nvm_has_system_node() { return 0; }
nvm ls system | grep system 2>&1 > /dev/null nvm ls system | grep system 2>&1 > /dev/null
@@ -18,4 +18,3 @@ nvm ls system | grep system 2>&1 > /dev/null
nvm_has_system_node() { return 1; } nvm_has_system_node() { return 1; }
nvm ls system | grep system 2>&1 > /dev/null nvm ls system | grep system 2>&1 > /dev/null
[ $? -ne 0 ] || die '"nvm ls system" contained "system" when system node is not present' [ $? -ne 0 ] || die '"nvm ls system" contained "system" when system node is not present'

View File

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

View File

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

View File

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

View File

@@ -4,12 +4,12 @@ die () { echo $@ ; exit 1; }
. ../../../nvm.sh . ../../../nvm.sh
mkdir -p ../../../v0.0.1 mkdir -p "${NVM_DIR}/v0.0.1"
mkdir -p ../../../v0.0.3 mkdir -p "${NVM_DIR}/v0.0.3"
mkdir -p ../../../v0.0.9 mkdir -p "${NVM_DIR}/v0.0.9"
mkdir -p ../../../v0.3.1 mkdir -p "${NVM_DIR}/v0.3.1"
mkdir -p ../../../v0.3.3 mkdir -p "${NVM_DIR}/v0.3.3"
mkdir -p ../../../v0.3.9 mkdir -p "${NVM_DIR}/v0.3.9"
nvm_has_system_node() { return 0; } nvm_has_system_node() { return 0; }
nvm ls | grep system 2>&1 > /dev/null nvm ls | grep system 2>&1 > /dev/null
@@ -18,4 +18,3 @@ nvm ls | grep system 2>&1 > /dev/null
nvm_has_system_node() { return 1; } nvm_has_system_node() { return 1; }
nvm ls | grep system 2>&1 > /dev/null nvm ls | grep system 2>&1 > /dev/null
[ $? -ne 0 ] || die '"nvm ls" contained "system" when system node is not present' [ $? -ne 0 ] || die '"nvm ls" contained "system" when system node is not present'

View File

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

View File

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

View File

@@ -1,5 +1,9 @@
#!/bin/sh #!/bin/sh
set -ex
. ../../nvm.sh . ../../nvm.sh
nvm alias test v0.1.2 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 #!/bin/sh
set -ex
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
. ../../nvm.sh . ../../nvm.sh
@@ -7,4 +9,3 @@ die () { echo $@ ; exit 1; }
nvm deactivate 2>&1 nvm deactivate 2>&1
[ "$(nvm current)" = "system" ] || [ "$(nvm current)" = "none" ] || die '"nvm current" did not report "system" or "none" when deactivated' [ "$(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 #!/bin/sh
set -ex
mkdir -p ../../v0.2.3 mkdir -p ../../v0.2.3
die () { echo $@ ; exit 1; } die () { echo $@ ; exit 1; }
@@ -7,11 +9,16 @@ die () { echo $@ ; exit 1; }
[ `expr $PATH : ".*v0.2.3/.*/bin"` = 0 ] || echo "WARNING: Unexpectedly found v0.2.3 already active" >&2 [ `expr $PATH : ".*v0.2.3/.*/bin"` = 0 ] || echo "WARNING: Unexpectedly found v0.2.3 already active" >&2
. ../../nvm.sh . ../../nvm.sh
nvm use v0.2.3 || die "Failed to activate v0.2.3"
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 "$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)" [ `expr "$NODE_PATH" : ".*v0.2.3/.*/lib/node_modules"` = 0 ] || die "NODE_PATH should not contain (npm root -g)"
[ `expr "$NVM_BIN" : ".*v0.2.3/bin"` != 0 ] || die "NODE_BIN should contain bin directory path"
[ `expr "$NVM_PATH" : ".*v0.2.3/lib/node"` != 0 ] || die "NODE_PATH should contain lib node directory path"
# ^ note: NODE_PATH should not contain `npm root -g` since globals should not be requireable # ^ note: NODE_PATH should not contain `npm root -g` since globals should not be requireable
nvm deactivate || die "Failed to deactivate v0.2.3" nvm deactivate || die "Failed to deactivate v0.2.3"
[ `expr "$PATH" : ".*v0.2.3/.*/bin"` = 0 ] || die "PATH not cleaned properly" [ `expr "$PATH" : ".*v0.2.3/.*/bin"` = 0 ] || die "PATH not cleaned properly"
[ `expr "$NODE_PATH" : ".*v0.2.3/.*/lib/node_modules"` = 0 ] || die "NODE_PATH not cleaned properly" [ `expr "$NODE_PATH" : ".*v0.2.3/.*/lib/node_modules"` = 0 ] || die "NODE_PATH not cleaned properly"
[ "_$NVM_BIN" = "_" ] || die "NVM_BIN should be unset: got '$NVM_BIN'"
[ "_$NVM_PATH" = "_" ] || die "NVM_PATH should be unset: got '$NVM_PATH'"

View File

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

View File

@@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
set -ex
cd ../.. cd ../..
mkdir v0.0.1 mkdir v0.0.1
mkdir src/node-v0.0.1 mkdir src/node-v0.0.1

View File

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

View File

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

View File

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

View File

@@ -1,13 +1,44 @@
#!/bin/sh #!/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.sh
nvm_has_system_node() { return 0; } nvm_has_system_node() { return 0; }
[ "$(nvm use system 2>&1 | tail -n1)" = "Now using system version of node: $(node -v)." ] || die "Could not use system version of node" nvm_print_npm_version() { command printf ' (npm v1.2.3)'; }
EXPECTED_OUTPUT="Now using system version of node: $(node -v)$(nvm_print_npm_version)"
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=""
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_has_system_node() { return 1; }
[ "$(nvm use system 2>&1 | tail -n1)" = "System version of node not found." ] || die "Did not report error, system node not found" nvm_print_npm_version() { command printf ''; }
nvm use system 2>&1 > /dev/null || [ $? -eq 127 ] || die "Did not return error code, system node not found"
EXPECTED_OUTPUT="System version of 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=""
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 @@
#!/bin/bash #!/bin/sh
set -ex
export NVM_SYMLINK_CURRENT=true export NVM_SYMLINK_CURRENT=true
. ../../nvm.sh . ../../nvm.sh
rm -rf ../../v0.10.29 rm -rf "${NVM_DIR}/v0.10.29"
mkdir ../../v0.10.29 mkdir "${NVM_DIR}/v0.10.29"
nvm use 0.10.29 nvm use --delete-prefix 0.10.29
rmdir ../../v0.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!" echo "Expected 'current' symlink to be created!"
exit 1 exit 1
fi fi
oldLink="$(readlink ../../current)" oldLink="$(readlink "${NVM_DIR}/current")"
if [ "$(basename $oldLink)" != 'v0.10.29' ];then if [ "$(basename "${oldLink}")" != 'v0.10.29' ];then
echo "Expected 'current' to point to v0.10.29 but was $oldLink" echo "Expected 'current' to point to v0.10.29 but was ${oldLink}"
exit 1 exit 1
fi fi
rm -rf ../../v0.11.13 rm -rf "${NVM_DIR}/v0.11.13"
mkdir ../../v0.11.13 mkdir "${NVM_DIR}/v0.11.13"
nvm use 0.11.13 nvm use --delete-prefix 0.11.13
rmdir ../../v0.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" echo "Expected 'current' to point to v0.11.13 but was $newLink"
exit 1 exit 1
fi fi

View File

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

View File

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

View File

@@ -0,0 +1,17 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
. ../../common.sh
assert_not_ok iojs_version_has_solaris_binary ""
assert_not_ok iojs_version_has_solaris_binary "foo"
assert_not_ok iojs_version_has_solaris_binary "v1.1.0"
assert_ok iojs_version_has_solaris_binary "v3.3.1"
assert_ok iojs_version_has_solaris_binary "iojs-v3.3.1"
assert_ok iojs_version_has_solaris_binary "v3.3.2"
assert_ok iojs_version_has_solaris_binary "iojs-v3.3.2"
assert_ok iojs_version_has_solaris_binary "v3.4.1"
assert_ok iojs_version_has_solaris_binary "iojs-v3.4.1"

View File

@@ -0,0 +1,42 @@
version date files npm v8 uv zlib openssl modules
v3.3.1 2015-09-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 2.14.3 4.4.63.30 1.7.4 1.2.8 1.0.2d 45
v3.3.0 2015-09-02 headers,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.13.3 4.4.63.30 1.7.3 1.2.8 1.0.2d 45
v3.2.0 2015-08-25 headers,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.13.3 4.4.63.26 1.6.1 1.2.8 1.0.2d 45
v3.1.0 2015-08-19 headers,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.13.3 4.4.63.26 1.6.1 1.2.8 1.0.2d 45
v3.0.0 2015-08-04 headers,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.13.3 4.4.63.26 1.6.1 1.2.8 1.0.2d 45
v2.5.0 2015-07-28 headers,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.13.2 4.2.77.21 1.6.1 1.2.8 1.0.2d 44
v2.4.0 2015-07-17 headers,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.13.0 4.2.77.20 1.6.1 1.2.8 1.0.2d 44
v2.3.4 2015-07-12 headers,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.12.1 4.2.77.20 1.6.1 1.2.8 1.0.2d 44
v2.3.3 2015-07-04 headers,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.11.3 4.2.77.20 1.6.1 1.2.8 1.0.2c 44
v2.3.2 2015-07-02 headers,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.11.3 4.2.77.20 1.6.1 1.2.8 1.0.2c 44
v2.3.1 2015-06-23 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.11.3 4.2.77.20 1.6.1 1.2.8 1.0.2c 44
v2.3.0 2015-06-13 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.11.1 4.2.77.20 1.6.1 1.2.8 1.0.2c 44
v2.2.1 2015-06-01 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.11.0 4.2.77.20 1.5.0 1.2.8 1.0.2a 44
v2.2.0 2015-06-01 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.11.0 4.2.77.20 1.5.0 1.2.8 1.0.2a 44
v2.1.0 2015-05-24 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.10.1 4.2.77.20 1.5.0 1.2.8 1.0.2a 44
v2.0.2 2015-05-15 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.9.0 4.2.77.20 1.5.0 1.2.8 1.0.2a 44
v2.0.1 2015-05-08 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.9.0 4.2.77.20 1.5.0 1.2.8 1.0.2a 44
v2.0.0 2015-05-04 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.9.0 4.2.77.18 1.4.2 1.2.8 1.0.2a 44
v1.8.4 2015-07-12 headers,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.9.0 4.1.0.27 1.4.2 1.2.8 1.0.2d 43
v1.8.3 2015-07-04 headers,linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.9.0 4.1.0.27 1.4.2 1.2.8 1.0.2c 43
v1.8.2 2015-05-18 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.9.0 4.1.0.27 1.4.2 1.2.8 1.0.2a 43
v1.8.1 2015-04-21 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.8.3 4.1.0.27 1.4.2 1.2.8 1.0.2a 43
v1.7.1 2015-04-17 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.7.6 4.1.0.27 1.4.2 1.2.8 1.0.1m 43
v1.6.4 2015-04-06 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.7.5 4.1.0.27 1.4.2 1.2.8 1.0.1m 43
v1.6.3 2015-03-31 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.7.4 4.1.0.27 1.4.2 1.2.8 1.0.1m 43
v1.6.2 2015-03-23 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.7.1 4.1.0.25 1.4.2 1.2.8 1.0.1m 43
v1.6.1 2015-03-20 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.7.1 4.1.0.21 1.4.2 1.2.8 1.0.1m 43
v1.6.0 2015-03-20 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.7.1 4.1.0.21 1.4.2 1.2.8 1.0.1m 43
v1.5.1 2015-03-09 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.7.0 4.1.0.21 1.4.2 1.2.8 1.0.1k 43
v1.5.0 2015-03-06 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.7.0 4.1.0.21 1.4.2 1.2.8 1.0.1k 43
v1.4.3 2015-03-03 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.6.1 4.1.0.21 1.4.2 1.2.8 1.0.1k 43
v1.4.2 2015-02-28 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.6.1 4.1.0.21 1.4.2 1.2.8 1.0.1k 43
v1.4.1 2015-02-27 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.6.0 4.1.0.21 1.4.2 1.2.8 1.0.1k 43
v1.3.0 2015-02-20 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.5.1 4.1.0.14 1.4.0 1.2.8 1.0.1k 43
v1.2.0 2015-02-11 linux-armv6l,linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.5.1 4.1.0.14 1.4.0 1.2.8 1.0.1k 43
v1.1.0 2015-02-03 linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.4.1 4.1.0.14 1.3.0 1.2.8 1.0.1k 43
v1.0.4 2015-01-24 linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.3.0 4.1.0.12 1.2.1 1.2.8 1.0.1k 42
v1.0.3 2015-01-20 linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.2.0 4.1.0.7 1.2.1 1.2.8 1.0.1k 42
v1.0.2 2015-01-16 linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.1.18 3.31.74.1 1.2.1 1.2.8 1.0.1k 42
v1.0.1 2015-01-14 linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.1.18 3.31.74.1 1.2.0 1.2.8 1.0.1k 42
v1.0.0 2015-01-14 linux-armv7l,linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 2.1.18 3.31.74.1 1.2.0 1.2.8 1.0.1k 42

View File

@@ -0,0 +1,279 @@
version date files npm v8 uv zlib openssl modules lts
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-msi,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-msi,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-msi,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-msi,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-msi,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-msi,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-msi,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-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.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-msi,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-msi,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-msi,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-msi,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-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 -
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 -
v0.12.10 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 2.14.9 3.28.71.19 1.6.1 1.2.8 1.0.1r 14 -
v0.12.9 2015-12-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.1q 14 -
v0.12.8 2015-11-24 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.1p 14 -
v0.12.7 2015-07-09 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.11.3 3.28.71.19 1.6.1 1.2.8 1.0.1p 14 -
v0.12.6 2015-07-04 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.11.2 3.28.71.19 1.6.1 1.2.8 1.0.1o 14 -
v0.12.5 2015-06-22 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.11.2 3.28.71.19 1.6.1 1.2.8 1.0.1o 14 -
v0.12.4 2015-05-23 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.10.1 3.28.71.19 1.5.0 1.2.8 1.0.1m 14 -
v0.12.3 2015-05-14 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.9.1 3.28.71.19 1.5.0 1.2.8 1.0.1m 14 -
v0.12.2 2015-03-31 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.7.4 3.28.73.0 1.4.2 1.2.8 1.0.1m 14 -
v0.12.1 2015-03-24 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.5.1 3.28.73.0 1.0.2 1.2.8 1.0.1m 14 -
v0.12.0 2015-02-06 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.5.1 3.28.73.0 1.0.2 1.2.8 1.0.1l 14 -
v0.11.16 2015-01-30 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.3.0 3.28.73.0 1.0.2 1.2.8 1.0.1l 14 -
v0.11.15 2015-01-20 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.1.6 3.28.73.0 1.0.2 1.2.8 1.0.1j 14 -
v0.11.14 2014-08-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 2.0.0 3.26.33.0 1.0.0 1.2.3 1.0.1i 14 -
v0.11.13 2014-05-02 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.9 3.25.30.0 0.11.25 1.2.3 1.0.1g 14 -
v0.11.12 2014-03-11 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.3 3.22.24.19 0.11.22 1.2.3 1.0.1f 14 -
v0.11.11 2014-01-29 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.3.25 3.22.24.19 0.11.18 1.2.3 1.0.1f 14 -
v0.11.10 2013-12-31 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.3.22 3.22.24.10 0.11.17 1.2.3 1.0.1e 13 -
v0.11.9 2013-11-21 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.3.15 3.22.24.5 0.11.15 1.2.3 1.0.1e 13 -
v0.11.8 2013-10-30 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.3.13 3.21.18.3 0.11.14 1.2.3 1.0.1e 13 -
v0.11.7 2013-09-04 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.3.8 3.20.17.0 0.11.13 1.2.3 1.0.1e 0x000C -
v0.11.6 2013-08-21 linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x86-msi 1.3.8 3.20.14.1 0.11.8 1.2.3 1.0.1e 0x000C -
v0.11.5 2013-08-07 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.3.6 3.20.11.0 0.11.7 1.2.3 1.0.1e 0x000C -
v0.11.4 2013-07-12 linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x86-msi 1.3.4 3.20.2.0 0.11.5 1.2.3 1.0.1e 0x000C -
v0.11.3 2013-06-26 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.25 3.19.13.0 0.11.5 1.2.3 1.0.1e 0x000C -
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.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 -
v0.10.41 2015-12-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.1q 11 -
v0.10.40 2015-07-09 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.28 3.14.5.9 0.10.36 1.2.8 1.0.1p 11 -
v0.10.39 2015-06-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.4.28 3.14.5.9 0.10.36 1.2.8 1.0.1o 11 -
v0.10.38 2015-03-23 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.28 3.14.5.9 0.10.36 1.2.8 1.0.1m 11 -
v0.10.37 2015-03-11 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.28 3.14.5.9 0.10.36 1.2.8 1.0.1l 11 -
v0.10.36 2015-01-26 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.28 3.14.5.9 0.10.30 1.2.8 1.0.1l 11 -
v0.10.35 2014-12-22 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.28 3.14.5.9 0.10.30 1.2.8 1.0.1j 11 -
v0.10.34 2014-12-17 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.28 3.14.5.9 0.10.30 1.2.8 1.0.1j 11 -
v0.10.33 2014-10-21 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.28 3.14.5.9 0.10.29 1.2.3 1.0.1j 11 -
v0.10.32 2014-09-16 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.28 3.14.5.9 0.10.28 1.2.3 1.0.1i 11 -
v0.10.31 2014-08-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.4.23 3.14.5.9 0.10.28 1.2.3 1.0.1i 11 -
v0.10.30 2014-07-31 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.21 3.14.5.9 0.10.28 1.2.3 1.0.1h 11 -
v0.10.29 2014-06-09 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.14 3.14.5.9 0.10.27 1.2.3 1.0.1h 11 -
v0.10.28 2014-05-02 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.9 3.14.5.9 0.10.27 1.2.3 1.0.1g 11 -
v0.10.27 2014-05-01 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.8 3.14.5.9 0.10.27 1.2.3 1.0.1g 11 -
v0.10.26 2014-02-18 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.3 3.14.5.9 0.10.25 1.2.3 1.0.1e 11 -
v0.10.25 2014-01-23 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.3.24 3.14.5.9 0.10.23 1.2.3 1.0.1e 11 -
v0.10.24 2013-12-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.3.21 3.14.5.9 0.10.21 1.2.3 1.0.1e 11 -
v0.10.23 2013-12-12 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.3.17 3.14.5.9 0.10.20 1.2.3 1.0.1e 11 -
v0.10.22 2013-11-12 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.3.14 3.14.5.9 0.10.19 1.2.3 1.0.1e 11 -
v0.10.21 2013-10-18 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.3.11 3.14.5.9 0.10.18 1.2.3 1.0.1e 11 -
v0.10.20 2013-09-30 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.3.11 3.14.5.9 0.10.17 1.2.3 1.0.1e 11 -
v0.10.19 2013-09-24 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.3.11 3.14.5.9 0.10.17 1.2.3 1.0.1e 11 -
v0.10.18 2013-09-04 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.3.8 3.14.5.9 0.10.15 1.2.3 1.0.1e 11 -
v0.10.17 2013-08-21 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.3.8 3.14.5.9 0.10.14 1.2.3 1.0.1e 11 -
v0.10.16 2013-08-16 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.3.8 3.14.5.9 0.10.13 1.2.3 1.0.1e 11 -
v0.10.15 2013-07-25 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.3.5 3.14.5.9 0.10.13 1.2.3 1.0.1e 11 -
v0.10.14 2013-07-25 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.3.5 3.14.5.9 0.10.13 1.2.3 1.0.1e 11 -
v0.10.13 2013-07-09 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.3.2 3.14.5.9 0.10.12 1.2.3 1.0.1e 11 -
v0.10.12 2013-06-18 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.32 3.14.5.9 0.10.11 1.2.3 1.0.1e 11 -
v0.10.11 2013-06-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.30 3.14.5.9 0.10.11 1.2.3 1.0.1e 11 -
v0.10.10 2013-06-04 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.25 3.14.5.9 0.10.10 1.2.3 1.0.1e 11 -
v0.10.9 2013-05-30 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.24 3.14.5.9 0.10.9 1.2.3 1.0.1e 11 -
v0.10.8 2013-05-24 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.23 3.14.5.9 0.10.8 1.2.3 1.0.1e 11 -
v0.10.7 2013-05-17 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.14.5.8 0.10.7 1.2.3 1.0.1e 11 -
v0.10.6 2013-05-14 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.14.5.8 0.10.5 1.2.3 1.0.1e 11 -
v0.10.5 2013-04-23 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.14.5.8 0.10.5 1.2.3 1.0.1e 11 -
v0.10.4 2013-04-11 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.14.5.8 0.10.4 1.2.3 1.0.1e 11 -
v0.10.3 2013-04-03 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.17 3.14.5.8 0.10.3 1.2.3 1.0.1e 0x000B -
v0.10.2 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.14.5.8 0.10.3 1.2.3 1.0.1e 0x000B -
v0.10.1 2013-03-21 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.14.5.8 0.10 1.2.3 1.0.1e 0x000B -
v0.10.0 2013-03-11 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.14 3.14.5.8 0.9 1.2.3 1.0.1e 0x000B -
v0.9.12 2013-03-06 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.12 3.14.5.8 0.9 1.2.3 1.0.1e 0x000B -
v0.9.11 2013-03-01 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.12 3.14.5.0 0.9 1.2.3 1.0.1e 0x000B -
v0.9.10 2013-02-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.12 3.15.11.15 0.9 1.2.3 1.0.1c 0x000B -
v0.9.9 2013-02-07 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.10 3.15.11.10 0.9 1.2.3 1.0.1c 0x000B -
v0.9.8 2013-01-24 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.3 3.15.11.10 0.9 1.2.3 1.0.1c 0x000A -
v0.9.7 2013-01-18 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.2 3.15.11.7 0.9 1.2.3 1.0.1c 0x000A -
v0.9.6 2013-01-11 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.0 3.15.11.5 0.9 1.2.3 1.0.1c 0x000A -
v0.9.5 2012-12-30 linux-x64,linux-x86,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x86-exe,win-x86-msi 1.1.70 3.13.7.4 0.9 1.2.3 1.0.1c 0x000A -
v0.9.4 2012-12-21 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.1.70 3.13.7.4 0.9 1.2.3 1.0.1c 0x000A -
v0.9.3 2012-10-24 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.1.64 3.13.7.4 0.9 1.2.3 1.0.1c 0x000A -
v0.9.2 2012-09-17 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.1.61 3.11.10.22 0.9 1.2.3 1.0.1c 0x000A -
v0.9.1 2012-08-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.1.59 3.11.10.19 0.9 1.2.3 1.0.0f 0x000A -
v0.9.0 2012-07-20 osx-x64-pkg,src,win-x64-exe,win-x86-exe,win-x86-msi 1.1.44 3.11.10.15 0.9 1.2.3 1.0.0f 1 -
v0.8.28 2014-07-31 linux-x64,linux-x86,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x86-exe,win-x86-msi 1.2.30 3.11.10.26 0.8 1.2.3 1.0.0f 1 -
v0.8.27 2014-06-09 linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x86-msi 1.2.30 3.11.10.26 0.8 1.2.3 1.0.0f 1 -
v0.8.26 2013-10-18 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.30 3.11.10.26 0.8 1.2.3 1.0.0f 1 -
v0.8.25 2013-06-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.30 3.11.10.25 0.8 1.2.3 1.0.0f 1 -
v0.8.24 2013-06-03 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.24 3.11.10.25 0.8 1.2.3 1.0.0f 1 -
v0.8.23 2013-04-09 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.11.10.25 0.8 1.2.3 1.0.0f 1 -
v0.8.22 2013-03-06 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.14 3.11.10.25 0.8 1.2.3 1.0.0f 1 -
v0.8.21 2013-02-25 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.11 3.11.10.25 0.8 1.2.3 1.0.0f 1 -
v0.8.20 2013-02-15 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.11 3.11.10.25 0.8 1.2.3 1.0.0f 1 -
v0.8.19 2013-02-06 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.10 3.11.10.25 0.8 1.2.3 1.0.0f 1 -
v0.8.18 2013-01-18 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.2 3.11.10.25 0.8 1.2.3 1.0.0f 1 -
v0.8.17 2013-01-10 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.0 3.11.10.25 0.8 1.2.3 1.0.0f 1 -
v0.8.16 2012-12-12 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.1.69 3.11.10.25 0.8 1.2.3 1.0.0f 1 -
v0.8.15 2012-11-26 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.1.66 3.11.10.25 0.8 1.2.3 1.0.0f 1 -
v0.8.14 2012-10-25 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.1.65 3.11.10.25 0.8 1.2.3 1.0.0f 1 -
v0.8.13 2012-10-25 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.1.65 3.11.10.25 0.8 1.2.3 1.0.0f 1 -
v0.8.12 2012-10-11 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.1.63 3.11.10.22 0.8 1.2.3 1.0.0f 1 -
v0.8.11 2012-09-27 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.1.62 3.11.10.22 0.8 1.2.3 1.0.0f 1 -
v0.8.10 2012-09-25 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.1.62 3.11.10.22 0.8 1.2.3 1.0.0f 1 -
v0.8.9 2012-09-11 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.1.61 3.11.10.22 0.8 1.2.3 1.0.0f 1 -
v0.8.8 2012-08-22 linux-x64,linux-x86,osx-x64-pkg,osx-x64-tar,osx-x86-tar,src,sunos-x64,sunos-x86,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 1.1.59 3.11.10.19 0.8 1.2.3 1.0.0f 1 -
v0.8.7 2012-08-15 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.1.49 3.11.10.17 0.8 1.2.3 1.0.0f 1 -
v0.8.6 2012-08-06 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.1.48 3.11.10.17 0.8 1.2.3 1.0.0f 1 -
v0.8.5 2012-08-02 osx-x64-pkg,src,win-x64-exe,win-x86-exe,win-x86-msi 1.1.46 3.11.10.17 0.8 1.2.3 1.0.0f 1 -
v0.8.4 2012-07-24 osx-x64-pkg,src,win-x64-exe,win-x86-exe,win-x86-msi 1.1.45 3.11.10.17 0.8 1.2.3 1.0.0f 1 -
v0.8.3 2012-07-17 osx-x64-pkg,src,win-x64-exe,win-x86-exe,win-x86-msi 1.1.43 3.11.10.15 0.8 1.2.3 1.0.0f 1 -
v0.8.2 2012-07-09 osx-x64-pkg,src,win-x64-exe,win-x86-exe,win-x86-msi 1.1.36 3.11.10.14 0.8 1.2.3 1.0.0f 1 -
v0.8.1 2012-06-29 osx-x64-pkg,src,win-x64-exe,win-x86-exe,win-x86-msi 1.1.33 3.11.10.12 0.8 1.2.3 1.0.0f 1 -
v0.8.0 2012-06-22 osx-x64-pkg,src,win-x64-exe,win-x86-exe,win-x86-msi 1.1.32 3.11.10.10 0.8 1.2.3 1.0.0f 1 -
v0.7.12 2012-06-19 osx-x64-pkg,src,win-x64-exe,win-x86-exe,win-x86-msi 1.1.30 3.11.10.0 0.6 1.2.3 1.0.0f 1 -
v0.7.11 2012-06-15 osx-x64-pkg,src,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi 1.1.26 3.11.10.0 0.6 1.2.3 1.0.0f 1 -
v0.7.10 2012-06-11 osx-x64-pkg,src,win-x64-exe,win-x86-exe 1.1.25 3.9.24.31 0.6 1.2.3 1.0.0f 1 -
v0.7.9 2012-05-29 osx-x64-pkg,src,win-x64-exe,win-x86-exe 1.1.23 3.11.1.0 0.6 1.2.3 1.0.0f 1 -
v0.7.8 2012-04-18 osx-x64-pkg,src,win-x64-exe,win-x86-exe 1.1.18 3.9.24.9 0.6 1.2.3 1.0.0f 1 -
v0.7.7 2012-03-30 osx-x64-pkg,src,win-x64-exe,win-x86-exe 1.1.15 3.9.24.7 0.6 1.2.3 0.9.8r 1 -
v0.7.6 2012-03-13 osx-x64-pkg,src,win-x64-exe,win-x86-exe 1.1.8 3.9.17.0 0.6 1.2.3 0.9.8r 1 -
v0.7.5 2012-02-23 osx-x64-pkg,src,win-x64-exe,win-x86-exe 1.1.1 3.9.5.0 0.6 1.2.3 0.9.8r 1 -
v0.7.4 2012-02-14 osx-x64-pkg,src,win-x64-exe,win-x86-exe 1.1.1 3.9.5.0 0.6 1.2.3 0.9.8r 1 -
v0.7.3 2012-02-07 osx-x64-pkg,src,win-x86-exe 1.1.0-3 3.9.2.0 0.6 1.2.3 0.9.8r 1 -
v0.7.2 2012-02-01 osx-x64-pkg,src,win-x86-exe 1.1.0-3 3.8.9.0 0.6 1.2.3 0.9.8r 1 -
v0.7.1 2012-01-23 osx-x64-pkg,src,win-x86-exe 1.1.0-2 3.8.8.0 0.6 1.2.3 0.9.8r 1 -
v0.7.0 2012-01-17 osx-x64-pkg,src,win-x86-exe 1.1.0-2 3.8.6.0 0.6 1.2.3 0.9.8r 1 -
v0.6.21 2012-08-03 osx-x64-pkg,src,win-x64-exe,win-x86-exe 1.1.37 3.6.6.25 0.6 1.2.3 0.9.8r 1 -
v0.6.20 2012-07-10 osx-x64-pkg,src,win-x64-exe,win-x86-exe 1.1.37 3.6.6.25 0.6 1.2.3 0.9.8r 1 -
v0.6.19 2012-06-06 osx-x64-pkg,src,win-x64-exe,win-x86-exe 1.1.24 3.6.6.25 0.6 1.2.3 0.9.8r 1 -
v0.6.18 2012-05-14 osx-x64-pkg,src,win-x64-exe,win-x86-exe 1.1.21 3.6.6.25 0.6 1.2.3 0.9.8r 1 -
v0.6.17 2012-05-04 osx-x64-pkg,src,win-x64-exe,win-x86-exe 1.1.21 3.6.6.25 0.6 1.2.3 0.9.8r 1 -
v0.6.16 2012-04-27 osx-x64-pkg,src,win-x64-exe,win-x86-exe 1.1.19 3.6.6.25 0.6 1.2.3 0.9.8r 1 -
v0.6.15 2012-04-08 osx-x64-pkg,src,win-x64-exe,win-x86-exe 1.1.16 3.6.6.24 0.6 1.2.3 0.9.8r 1 -
v0.6.14 2012-03-23 osx-x64-pkg,src,win-x64-exe,win-x86-exe 1.1.12 3.6.6.24 0.6 1.2.3 0.9.8r 1 -
v0.6.13 2012-03-15 osx-x64-pkg,src,win-x64-exe,win-x86-exe 1.1.9 3.6.6.24 0.6 1.2.3 0.9.8r 1 -
v0.6.12 2012-03-02 osx-x64-pkg,src,win-x86-exe 1.1.4 3.6.6.24 0.6 1.2.3 0.9.8r 1 -
v0.6.11 2012-02-08 osx-x64-pkg,src,win-x86-exe 1.1.1 3.6.6.20 0.6 1.2.3 0.9.8r 1 -
v0.6.10 2012-02-03 osx-x64-pkg,src,win-x86-exe 1.1.0-3 3.6.6.20 0.6 1.2.3 0.9.8r 1 -
v0.6.9 2012-01-27 osx-x64-pkg,src,win-x86-exe 1.1.0-3 3.6.6.19 0.6 1.2.3 0.9.8r 1 -
v0.6.8 2012-01-20 osx-x64-pkg,src,win-x86-exe 1.1.0-2 3.6.6.19 0.6 1.2.3 0.9.8r 1 -
v0.6.7 2012-01-07 osx-x64-pkg,src,win-x86-exe 1.1.0-beta-10 3.6.6.15 0.6 1.2.3 0.9.8r 1 -
v0.6.6 2011-12-15 osx-x64-pkg,src,win-x86-exe 1.1.0-beta-4 3.6.6.14 0.6 1.2.3 0.9.8r 1 -
v0.6.5 2011-12-04 osx-x64-pkg,src,win-x86-exe 1.1.0-alpha-6 3.6.6.11 0.6 1.2.3 0.9.8r 1 -
v0.6.4 2011-12-02 osx-x64-pkg,src,win-x86-exe 1.1.0-alpha-6 3.6.6.8 0.6 1.2.3 0.9.8r 1 -
v0.6.3 2011-11-25 osx-x64-pkg,src,win-x86-exe 1.1.0-alpha-2 3.6.6.8 0.6 1.2.3 0.9.8r 1 -
v0.6.2 2011-11-18 osx-x64-pkg,src,win-x86-exe - 3.6.6.8 0.6 1.2.3 0.9.8r 1 -
v0.6.1 2011-11-11 osx-x64-pkg,src,win-x86-exe - 3.6.6.7 0.1 1.2.3 0.9.8r 1 -
v0.6.0 2011-11-04 src,win-x86-exe - 3.6.6.6 0.1 1.2.3 0.9.8r 1 -
v0.5.10 2011-10-22 src,win-x86-exe - 3.7.0.0 0.1 1.2.3 0.9.8r 1 -
v0.5.9 2011-10-11 src,win-x86-exe - 3.6.4.0 0.1 1.2.3 0.9.8r 1 -
v0.5.8 2011-09-30 src,win-x86-exe - 3.6.4.0 0.1 1.2.3 0.9.8r 1 -
v0.5.7 2011-09-16 src,win-x86-exe - 3.6.4.0 0.1 - 0.9.8r 1 -
v0.5.6 2011-08-26 src,win-x86-exe - 3.6.2.0 0.1 - 0.9.8r 1 -
v0.5.5 2011-08-26 src,win-x86-exe - 3.5.8.0 0.1 - 0.9.8r 1 -
v0.5.4 2011-08-26 src,win-x86-exe - 3.5.4.3 0.1 - - 1 -
v0.5.3 2011-08-26 src,win-x86-exe - 3.4.14.0 0.1 - - 1 -
v0.5.2 2011-08-26 src,win-x86-exe - 3.4.14.0 0.1 - - 1 -
v0.5.1 2011-08-26 src,win-x86-exe - 3.4.10.0 0.1 - - 1 -
v0.5.0 2011-08-26 src - 3.1.8.25 - - - 1 -
v0.4.12 2011-09-15 src - 3.1.8.26 - - - 1 -
v0.4.11 2011-08-26 src - 3.1.8.26 - - - 1 -
v0.4.10 2011-08-26 src - 3.1.8.26 - - - 1 -
v0.4.9 2011-08-26 src - 3.1.8.25 - - - 1 -
v0.4.8 2011-08-26 src - 3.1.8.16 - - - 1 -
v0.4.7 2011-08-26 src - 3.1.8.10 - - - 1 -
v0.4.6 2011-08-26 src - 3.1.8.10 - - - 1 -
v0.4.5 2011-08-26 src - 3.1.8.8 - - - 1 -
v0.4.4 2011-08-26 src - 3.1.8.5 - - - 1 -
v0.4.3 2011-08-26 src - 3.1.8.3 - - - 1 -
v0.4.2 2011-08-26 src - 3.1.8.0 - - - 1 -
v0.4.1 2011-08-26 src - 3.1.5.0 - - - 1 -
v0.4.0 2011-08-26 src - 3.1.2.0 - - - 1 -
v0.3.8 2011-08-26 src - 3.1.1.0 - - - 1 -
v0.3.7 2011-08-26 src - 3.0.10.0 - - - 1 -
v0.3.6 2011-08-26 src - 3.0.9.0 - - - 1 -
v0.3.5 2011-08-26 src - 3.0.4.1 - - - 1 -
v0.3.4 2011-08-26 src - 3.0.4.1 - - - 1 -
v0.3.3 2011-08-26 src - 3.0.4.1 - - - 1 -
v0.3.2 2011-08-26 src - 3.0.3.0 - - - 1 -
v0.3.1 2011-08-26 src - 2.5.3.0 - - - 1 -
v0.3.0 2011-08-26 src - 2.5.1.0 - - - 1 -
v0.2.6 2011-08-26 src - 2.3.8.0 - - - 1 -
v0.2.5 2011-08-26 src - 2.3.8.0 - - - 1 -
v0.2.4 2011-08-26 src - 2.3.8.0 - - - 1 -
v0.2.3 2011-08-26 src - 2.3.8.0 - - - 1 -
v0.2.2 2011-08-26 src - 2.3.8.0 - - - 1 -
v0.2.1 2011-08-26 src - 2.3.8.0 - - - 1 -
v0.2.0 2011-08-26 src - 2.3.8.0 - - - 1 -
v0.1.104 2011-08-26 src - 2.3.6.1 - - - - -
v0.1.103 2011-08-26 src - 2.3.5.0 - - - - -
v0.1.102 2011-08-26 src - 2.3.2.0 - - - - -
v0.1.101 2011-08-26 src - 2.3.0.0 - - - - -
v0.1.100 2011-08-26 src - 2.2.21.0 - - - - -
v0.1.99 2011-08-26 src - 2.2.18.0 - - - - -
v0.1.98 2011-08-26 src - 2.2.16.0 - - - - -
v0.1.97 2011-08-26 src - 2.2.12.0 - - - - -
v0.1.96 2011-08-26 src - 2.2.0 - - - - -
v0.1.95 2011-08-26 src - 2.2.0 - - - - -
v0.1.94 2011-08-26 src - 2.2.8.0 - - - - -
v0.1.93 2011-08-26 src - 2.2.6.0 - - - - -
v0.1.92 2011-08-26 src - 2.2.4.2 - - - - -
v0.1.91 2011-08-26 src - 2.2.3.1 - - - - -
v0.1.90 2011-08-26 src - 2.2.0.3 - - - - -
v0.1.33 2011-08-26 src - 2.1.6.0 - - - - -
v0.1.32 2011-08-26 src - 2.1.3.0 - - - - -
v0.1.31 2011-08-26 src - 2.1.2.0 - - - - -
v0.1.30 2011-08-26 src - 2.1.1.1 - - - - -
v0.1.29 2011-08-26 src - 2.1.0.0 - - - - -
v0.1.28 2011-08-26 src - 2.1.0.0 - - - - -
v0.1.27 2011-08-26 src - 2.1.0.0 - - - - -
v0.1.26 2011-08-26 src - 2.0.6.1 - - - - -
v0.1.25 2011-08-26 src - 2.0.5.4 - - - - -
v0.1.24 2011-08-26 src - 2.0.5.4 - - - - -
v0.1.23 2011-08-26 src - 2.0.0 - - - - -
v0.1.22 2011-08-26 src - 2.0.0 - - - - -
v0.1.21 2011-08-26 src - 2.0.0 - - - - -
v0.1.20 2011-08-26 src - 2.0.2.0 - - - - -
v0.1.19 2011-08-26 src - 2.0.2.0 - - - - -
v0.1.18 2011-08-26 src - 1.3.18.0 - - - - -
v0.1.17 2011-08-26 src - 1.3.18.0 - - - - -
v0.1.16 2011-08-26 src - 1.3.18.0 - - - - -
v0.1.15 2011-08-26 src - 1.3.16.0 - - - - -
v0.1.14 2011-08-26 src - 1.3.15.0 - - - - -

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,18 @@
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  (Latest LTS: Argon)

View File

@@ -0,0 +1,278 @@
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.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
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  (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

View File

@@ -0,0 +1,319 @@
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.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
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  (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

View File

@@ -0,0 +1,18 @@
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

View File

@@ -0,0 +1,18 @@
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

View File

@@ -0,0 +1,278 @@
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.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
v4.0.0
v4.1.0
v4.1.1
v4.1.2
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
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

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,2 @@
lts/argon|v4.4.7
lts/*|lts/argon

View File

@@ -0,0 +1,33 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
. ../../common.sh
# Invalid version numbers fail
assert_not_ok node_version_has_solaris_binary ""
assert_not_ok node_version_has_solaris_binary "foo"
# "Invalid" node version numbers fail
assert_not_ok node_version_has_solaris_binary "v1.0.0"
assert_not_ok node_version_has_solaris_binary "v3.3.1"
# Valid io.js version numbers that have a Solaris binary fail
assert_not_ok node_version_has_solaris_binary "iojs-v3.3.1"
# Invvalid io.js version numbers fail
assert_not_ok node_version_has_solaris_binary "iojs-v0.12.7"
# Valid node version numbers that don't have a Solaris binary fail
assert_not_ok node_version_has_solaris_binary "v0.8.5"
# Valid node version numbers that have a Solaris binary succeed
assert_ok node_version_has_solaris_binary "v0.8.6"
assert_ok node_version_has_solaris_binary "v0.10.0"
assert_ok node_version_has_solaris_binary "v0.12.7"
# Valid "merged" version numbers fail, because they're not
# considered node version numbers
assert_not_ok node_version_has_solaris_binary "v4.0.0"
assert_not_ok node_version_has_solaris_binary "v4.1.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,43 @@
#!/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}<"
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,74 @@
#!/bin/sh
cleanup () {
alias nvm_has='\nvm_has'
alias npm='\npm'
unset -f nvm_has npm
}
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
OUTPUT="$(nvm_die_on_prefix 2>&1)"
EXPECTED_OUTPUT="First argument \"delete the prefix\" must be zero or one"
EXIT_CODE="$(nvm_die_on_prefix >/dev/null 2>&1; echo $?)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "'nvm_die_on_prefix' did not error with '$EXPECTED_OUTPUT'; got '$OUTPUT'"
[ "_$EXIT_CODE" = "_1" ] || die "'nvm_die_on_prefix' did not exit with 1; got "$EXIT_CODE""
OUTPUT="$(nvm_die_on_prefix 2 2>&1)"
EXPECTED_OUTPUT="First argument \"delete the prefix\" must be zero or one"
EXIT_CODE="$(nvm_die_on_prefix 2 >/dev/null 2>&1; echo $?)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "'nvm_die_on_prefix 2' did not error with '$EXPECTED_OUTPUT'; got '$OUTPUT'"
[ "_$EXIT_CODE" = "_1" ] || die "'nvm_die_on_prefix' did not exit with 1; got "$EXIT_CODE""
OUTPUT="$(nvm_die_on_prefix 0 2>&1)"
EXPECTED_OUTPUT="Second argument \"nvm command\" must be nonempty"
EXIT_CODE="$(nvm_die_on_prefix 0 >/dev/null 2>&1; echo $?)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "'nvm_die_on_prefix 0' did not error with '$EXPECTED_OUTPUT'; got '$OUTPUT'"
[ "_$EXIT_CODE" = "_2" ] || die "'nvm_die_on_prefix 0' did not exit with 2; got '$EXIT_CODE'"
nvm_has() { return 1; } # ie, npm is not installed
OUTPUT="$(nvm_die_on_prefix 0 foo 2>&1)"
[ -z "$OUTPUT" ] || die "nvm_die_on_prefix was not a noop when nvm_has returns 1, got '$OUTPUT'"
nvm_has() { return 0; }
npm() {
local args
args="$@"
if [ "_$args" = "_config get prefix" ]; then
echo "$(nvm_version_dir new)/good prefix"
fi
}
OUTPUT="$(nvm_die_on_prefix 0 foo 2>&1)"
[ -z "$OUTPUT" ] || die "'nvm_die_on_prefix' was not a noop when prefix is good; got '$OUTPUT'"
OUTPUT="$(PREFIX=bar nvm_die_on_prefix 0 foo 2>&1)"
EXPECTED_OUTPUT='nvm is not compatible with the "PREFIX" environment variable: currently set to "bar"
Run `unset PREFIX` to unset it.'
EXIT_CODE="$(PREFIX=bar nvm_die_on_prefix 0 foo >/dev/null 2>&1; echo $?)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "'PREFIX=bar nvm_die_on_prefix 0 foo' did not error with '$EXPECTED_OUTPUT'; got '$OUTPUT'"
[ "_$EXIT_CODE" = "_3" ] || die "'PREFIX=bar nvm_die_on_prefix 0 foo' did not exit with 3; got '$EXIT_CODE'"
OUTPUT="$(NPM_CONFIG_PREFIX=bar nvm_die_on_prefix 0 foo 2>&1)"
EXPECTED_OUTPUT='nvm is not compatible with the "NPM_CONFIG_PREFIX" environment variable: currently set to "bar"
Run `unset NPM_CONFIG_PREFIX` to unset it.'
EXIT_CODE="$(NPM_CONFIG_PREFIX=bar nvm_die_on_prefix 0 foo >/dev/null 2>&1; echo $?)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "'NPM_CONFIG_PREFIX=bar nvm_die_on_prefix 0 foo' did not error with '$EXPECTED_OUTPUT'; got '$OUTPUT'"
[ "_$EXIT_CODE" = "_4" ] || die "'NPM_CONFIG_PREFIX=bar nvm_die_on_prefix 0 foo' did not exit with 4; got '$EXIT_CODE'"
npm() {
local args
args="$@"
if [ "_$args" = "_config get prefix" ]; then
echo "./bad prefix"
fi
}
OUTPUT="$(nvm_die_on_prefix 0 foo 2>&1)"
EXPECTED_OUTPUT="nvm is not compatible with the npm config \"prefix\" option: currently set to \"./bad prefix\"
Run \`npm config delete prefix\` or \`foo\` to unset it."
EXIT_CODE="$(nvm_die_on_prefix 0 foo >/dev/null 2>&1; echo $?)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "'nvm_die_on_prefix 0 foo' did not error with '$EXPECTED_OUTPUT' with bad prefix set; got '$OUTPUT'"
[ "_$EXIT_CODE" = "_10" ] || die "'nvm_die_on_prefix 0 foo' did not exit with 10 with bad prefix set; got '$EXIT_CODE'"
cleanup

View File

@@ -0,0 +1,15 @@
#!/bin/sh
. ../../common.sh
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
EXPECTED_OUTPUT="nvm_ensure_default_set: a version is required"
OUTPUT="$(nvm_ensure_default_set 2>&1 >/dev/null)"
EXIT_CODE="$?"
[ "_$(echo "$OUTPUT" | strip_colors)" = "_$EXPECTED_OUTPUT" ] || die "'nvm_ensure_default_set' did not output "$EXPECTED_OUTPUT", got "$OUTPUT""
[ "_$EXIT_CODE" = "_1" ] || die "'nvm_ensure_default_set' did not exit with 1, got "$EXIT_CODE""
# see test/fast/Aliases for remaining nvm_ensure_default_set tests

View File

@@ -0,0 +1,34 @@
#!/bin/sh
die () { echo $@ ; cleanup ; exit 1; }
cleanup () {
rm -rf "$(nvm_version_path v0.1.2)"
}
. ../../../nvm.sh
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.
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"
OUTPUT="$(nvm_ensure_version_installed 0.1)"
EXIT_CODE=$?
[ "_$OUTPUT" = "_" ] || die "expected 'nvm_ensure_version_installed 0.1' to have no output, got $OUTPUT"
[ "_$EXIT_CODE" = "_0" ] || die "expected 'nvm_ensure_version_installed 0.1' to exit with 0, got $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.
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"
cleanup

View File

@@ -4,11 +4,18 @@ die () { echo $@ ; exit 1; }
. ../../../nvm.sh . ../../../nvm.sh
OUTPUT="$(nvm_format_version 0.1.2)" INPUT="0.1.2"
OUTPUT="$(nvm_format_version "$INPUT")"
EXPECTED_OUTPUT="v0.1.2" EXPECTED_OUTPUT="v0.1.2"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_format_version 0.1.2 did not return $EXPECTED_OUTPUT; got $OUTPUT" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_format_version $INPUT did not return $EXPECTED_OUTPUT; got $OUTPUT"
OUTPUT="$(nvm_format_version 0.1)" INPUT="0.1"
OUTPUT="$(nvm_format_version "$INPUT")"
EXPECTED_OUTPUT="v0.1.0" EXPECTED_OUTPUT="v0.1.0"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_format_version 0.1.0 did not return $EXPECTED_OUTPUT; got $OUTPUT" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_format_version $INPUT did not return $EXPECTED_OUTPUT; got $OUTPUT"
INPUT="1.2.3.4.5"
OUTPUT="$(nvm_format_version "$INPUT")"
EXPECTED_OUTPUT="v1.2.3"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_format_version $INPUT did not return $EXPECTED_OUTPUT; got $OUTPUT"

View File

@@ -0,0 +1,80 @@
#!/bin/sh
# Save the PATH as it was when the test started to restore it when it
# finishes
ORIG_PATH=$PATH
cleanup() {
# Restore the PATH as it was when the test started
export PATH=ORIG_PATH
}
die () { cleanup; echo $@ ; exit 1; }
. ../../../nvm.sh
# Directory where mocked binaries used by nvm_get_arch for each OS/arch are
# located
MOCKS_DIR=`pwd`/../../mocks
# Sets the PATH for these tests to include the symlinks to the mocked
# binaries
export PATH=.:${PATH}
# Setups mock binaries for a given OS and arch that mimic
# the output of the real binaries used by nvm_get_arch to guess
# the architecture of a given system.
setup_mock_arch() {
local OS=$1
local ARCH=$2
local OPT=$3
if [ "_$OS" = "_solaris" ] || [ "_$OS" = "_smartos" ]; then
ln -sf "${MOCKS_DIR}/isainfo_${ARCH}" ./isainfo
if [ "_$OPT" != "_no_pkg_info" ]; then
ln -sf "${MOCKS_DIR}/pkg_info_${ARCH}" ./pkg_info
fi
fi
ln -sf "${MOCKS_DIR}/uname_${OS}_${ARCH}" ./uname
}
# Cleans up the setup done by setup_mock_arch.
cleanup_mock_arch() {
local OS=$1
local ARCH=$2
if [ "_$OS" = "_solaris" ] || [ "_$OS" = "_smartos" ]; then
rm -f ./isainfo
rm -f ./pkg_info
fi
rm -f ./uname
}
# Runs nvm_get_arch for architecture $ARCH and OS $OS, and compares the
# expected output $EXPECTED_OUTPUT with the actual output. Does nothing
# and exits cleanly if they match, dies otherwise.
run_test() {
local ARCH=$1
local OS=$2
local EXPECTED_OUTPUT=$3
local OPT=$4
setup_mock_arch $OS $ARCH $OPT
local OUTPUT="$(nvm_get_arch)"
cleanup_mock_arch $OS $ARCH
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] ||
die "nvm_get_arch for OS \"$OS\" and arch \"$ARCH\" with OPT \"$OPT\" did
not return \"$EXPECTED_OUTPUT\"; got \"$OUTPUT\""
}
run_test x86 smartos x86
run_test x86 smartos x86 no_pkg_info
run_test amd64 smartos x64
run_test amd64 smartos x64 no_pkg_info
run_test x86 osx x86
run_test amd64 osx x64
cleanup

View File

@@ -0,0 +1,45 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
expect () {
INPUT="$1"
EXPECTED_OUTPUT="$2"
OUTPUT="$(nvm_get_minor_version "$INPUT")"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_get_minor_version $INPUT did not return $EXPECTED_OUTPUT; got $OUTPUT"
V_OUTPUT="$(nvm_get_minor_version "v$INPUT")"
[ "_$V_OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_get_minor_version v$INPUT did not return $EXPECTED_OUTPUT; got $V_OUTPUT"
}
fail_with () {
INPUT="$1"
EXPECTED_CODE="$2"
EXIT_CODE="$(nvm_get_minor_version "$INPUT" >/dev/null 2>&1; echo $?)"
[ "_$EXIT_CODE" = "_$EXPECTED_CODE" ] || die "nvm_get_minor_version "$INPUT" did not fail with code "$EXPECTED_CODE"; got $EXIT_CODE"
}
expect 1 1.0
expect 1. 1.0
expect 1.2 1.2
expect 1.2. 1.2
expect 1.2.3 1.2
expect 1.2.3. 1.2
expect 1.2.3.4 1.2
fail_with '' 1
fail_with '.' 2
fail_with '..' 2
fail_with v 2
fail_with .a 2
fail_with .1 2
fail_with v.1 2
fail_with a.b 2
fail_with 1.a 2
fail_with a.1 2
fail_with v1.a 2
fail_with va.1 2

View File

@@ -0,0 +1,32 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
. ../../common.sh
# Invalid version numbers fail
assert_not_ok nvm_has_solaris_binary ""
assert_not_ok nvm_has_solaris_binary "foo"
# "Invalid" node version numbers fail
assert_not_ok nvm_has_solaris_binary "v1.0.0"
assert_not_ok nvm_has_solaris_binary "v3.3.1"
# Valid io.js version numbers that have a Solaris binary succeed
assert_ok nvm_has_solaris_binary "iojs-v3.3.1"
# Invvalid io.js version numbers fail
assert_not_ok nvm_has_solaris_binary "iojs-v0.12.7"
# Valid node version numbers that don't have a Solaris binary fail
assert_not_ok nvm_has_solaris_binary "v0.8.5"
# Valid node version numbers that have a Solaris binary succeed
assert_ok nvm_has_solaris_binary "v0.8.6"
assert_ok nvm_has_solaris_binary "v0.10.0"
assert_ok nvm_has_solaris_binary "v0.12.7"
# Valid "merged" version numbers succeed
assert_ok nvm_has_solaris_binary "v4.0.0"
assert_ok nvm_has_solaris_binary "v4.1.1"

View File

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

View File

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

View File

@@ -0,0 +1,20 @@
#!/bin/sh
cleanup () { unalias foo; unalias grep; }
die () { echo $@ ; cleanup ; exit 1; }
. ../../../nvm.sh
alias foo='bar'
nvm_is_alias foo || die '"nvm_is_alias foo" was not true'
! nvm_is_alias nvm_is_alias || die '"nvm_is_alias nvm_is_alias was not false'
alias grep='grep'
unalias grep || die '"unalias grep" failed'
! nvm_is_alias grep || die '"nvm_is_alias grep" with unaliased grep was not false'
alias grep='grep'
nvm_is_alias grep || die '"nvm_is_alias grep" with aliased grep was not true'
cleanup

View File

@@ -0,0 +1,10 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
nvm_is_merged_node_version '4.0' || die '"nvm_is_merged_node_version 4.0 was not true'
nvm_is_merged_node_version '5.1' || die '"nvm_is_merged_node_version 5.1 was not true'
! nvm_is_merged_node_version '3.99' || die '"nvm_is_merged_node_version 3.99 was not false'
! nvm_is_merged_node_version 'v1.0.0' || die '"nvm_is_merged_node_version v1.0.0" was not false'

View File

@@ -0,0 +1,17 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
! nvm_is_natural_num || die 'no args is not false'
! nvm_is_natural_num '' || die 'empty string is not false'
! nvm_is_natural_num a || die 'a is not false'
! nvm_is_natural_num -1 || 'negative number is not false'
! nvm_is_natural_num --1 || 'double negative number is not false'
! nvm_is_natural_num 1.2 || 'decimal number is not false'
! nvm_is_natural_num 0 || die 'zero is not false'
nvm_is_natural_num 1 || die '1 is not true'
nvm_is_natural_num 2 || die '2 is not true'
nvm_is_natural_num 1234 || die '1234 is not true'

View File

@@ -3,14 +3,19 @@
TEST_PWD=$(pwd) TEST_PWD=$(pwd)
TEST_DIR="$TEST_PWD/nvm_ls_current_tmp" TEST_DIR="$TEST_PWD/nvm_ls_current_tmp"
cleanup() { rm -rf "$TEST_DIR"; unset -f return_zero; unalias node; } cleanup() { rm -rf "$TEST_DIR"; unset -f return_zero; alias node='node' ; unalias node; }
die () { echo $@ ; cleanup ; exit 1; } die () { echo $@ ; cleanup ; exit 1; }
. ../../../nvm.sh . ../../../nvm.sh
return_zero () { return 0; } return_zero () { return 0; }
[ "$(nvm deactivate > /dev/null 2>&1 ; nvm_ls_current)" = "system" ] || die 'when deactivated, did not return "system"' if nvm_has_system_node || nvm_has_system_iojs; then
EXPECTED_SYSTEM_NODE="system"
else
EXPECTED_SYSTEM_NODE="none"
fi
[ "_$(nvm deactivate > /dev/null 2>&1 ; nvm_ls_current)" = "_$EXPECTED_SYSTEM_NODE" ] || die "when deactivated, did not return $EXPECTED_SYSTEM_NODE"
rm -rf "$TEST_DIR" rm -rf "$TEST_DIR"
mkdir "$TEST_DIR" mkdir "$TEST_DIR"

View File

@@ -8,448 +8,24 @@ cleanup() {
. ../../../nvm.sh . ../../../nvm.sh
MOCKS_DIR="$PWD/mocks"
# sample output at the time the test was written # sample output at the time the test was written
TAB_PATH="$MOCKS_DIR/nodejs.org-dist-index.tab"
nvm_download() { nvm_download() {
echo 'foo "v0.10.0' cat "$TAB_PATH"
echo 'foo "v0.10.0'
echo 'foo "v0.10.1'
echo 'foo "v0.10.1'
echo 'foo "v0.10.10'
echo 'foo "v0.10.10'
echo 'foo "v0.10.11'
echo 'foo "v0.10.11'
echo 'foo "v0.10.12'
echo 'foo "v0.10.12'
echo 'foo "v0.10.13'
echo 'foo "v0.10.13'
echo 'foo "v0.10.14'
echo 'foo "v0.10.14'
echo 'foo "v0.10.15'
echo 'foo "v0.10.15'
echo 'foo "v0.10.16'
echo 'foo "v0.10.16'
echo 'foo "v0.10.16'
echo 'foo "v0.10.16'
echo 'foo "v0.10.17'
echo 'foo "v0.10.17'
echo 'foo "v0.10.18'
echo 'foo "v0.10.18'
echo 'foo "v0.10.19'
echo 'foo "v0.10.19'
echo 'foo "v0.10.2'
echo 'foo "v0.10.2'
echo 'foo "v0.10.20'
echo 'foo "v0.10.20'
echo 'foo "v0.10.21'
echo 'foo "v0.10.21'
echo 'foo "v0.10.22'
echo 'foo "v0.10.22'
echo 'foo "v0.10.23'
echo 'foo "v0.10.23'
echo 'foo "v0.10.24'
echo 'foo "v0.10.24'
echo 'foo "v0.10.25'
echo 'foo "v0.10.25'
echo 'foo "v0.10.26'
echo 'foo "v0.10.26'
echo 'foo "v0.10.27'
echo 'foo "v0.10.27'
echo 'foo "v0.10.28'
echo 'foo "v0.10.28'
echo 'foo "v0.10.29'
echo 'foo "v0.10.29'
echo 'foo "v0.10.3'
echo 'foo "v0.10.3'
echo 'foo "v0.10.30'
echo 'foo "v0.10.30'
echo 'foo "v0.10.31'
echo 'foo "v0.10.31'
echo 'foo "v0.10.32'
echo 'foo "v0.10.32'
echo 'foo "v0.10.4'
echo 'foo "v0.10.4'
echo 'foo "v0.10.5'
echo 'foo "v0.10.5'
echo 'foo "v0.10.6'
echo 'foo "v0.10.6'
echo 'foo "v0.10.7'
echo 'foo "v0.10.7'
echo 'foo "v0.10.8'
echo 'foo "v0.10.8'
echo 'foo "v0.10.9'
echo 'foo "v0.10.9'
echo 'foo "v0.11.0'
echo 'foo "v0.11.0'
echo 'foo "v0.11.1'
echo 'foo "v0.11.1'
echo 'foo "v0.11.10'
echo 'foo "v0.11.10'
echo 'foo "v0.11.11'
echo 'foo "v0.11.11'
echo 'foo "v0.11.12'
echo 'foo "v0.11.12'
echo 'foo "v0.11.13'
echo 'foo "v0.11.13'
echo 'foo "v0.11.14'
echo 'foo "v0.11.14'
echo 'foo "v0.11.2'
echo 'foo "v0.11.2'
echo 'foo "v0.11.3'
echo 'foo "v0.11.3'
echo 'foo "v0.11.4'
echo 'foo "v0.11.4'
echo 'foo "v0.11.5'
echo 'foo "v0.11.5'
echo 'foo "v0.11.6'
echo 'foo "v0.11.6'
echo 'foo "v0.11.7'
echo 'foo "v0.11.7'
echo 'foo "v0.11.8'
echo 'foo "v0.11.8'
echo 'foo "v0.11.9'
echo 'foo "v0.11.9'
echo 'foo "v0.5.1'
echo 'foo "v0.5.1'
echo 'foo "v0.5.10'
echo 'foo "v0.5.10'
echo 'foo "v0.5.2'
echo 'foo "v0.5.2'
echo 'foo "v0.5.3'
echo 'foo "v0.5.3'
echo 'foo "v0.5.4'
echo 'foo "v0.5.4'
echo 'foo "v0.5.5'
echo 'foo "v0.5.5'
echo 'foo "v0.5.6'
echo 'foo "v0.5.6'
echo 'foo "v0.5.7'
echo 'foo "v0.5.7'
echo 'foo "v0.5.8'
echo 'foo "v0.5.8'
echo 'foo "v0.5.9'
echo 'foo "v0.5.9'
echo 'foo "v0.6.0'
echo 'foo "v0.6.0'
echo 'foo "v0.6.1'
echo 'foo "v0.6.1'
echo 'foo "v0.6.10'
echo 'foo "v0.6.10'
echo 'foo "v0.6.11'
echo 'foo "v0.6.11'
echo 'foo "v0.6.12'
echo 'foo "v0.6.12'
echo 'foo "v0.6.13'
echo 'foo "v0.6.13'
echo 'foo "v0.6.14'
echo 'foo "v0.6.14'
echo 'foo "v0.6.15'
echo 'foo "v0.6.15'
echo 'foo "v0.6.16'
echo 'foo "v0.6.16'
echo 'foo "v0.6.17'
echo 'foo "v0.6.17'
echo 'foo "v0.6.18'
echo 'foo "v0.6.18'
echo 'foo "v0.6.19'
echo 'foo "v0.6.19'
echo 'foo "v0.6.2'
echo 'foo "v0.6.2'
echo 'foo "v0.6.20'
echo 'foo "v0.6.20'
echo 'foo "v0.6.21'
echo 'foo "v0.6.21'
echo 'foo "v0.6.3'
echo 'foo "v0.6.3'
echo 'foo "v0.6.4'
echo 'foo "v0.6.4'
echo 'foo "v0.6.5'
echo 'foo "v0.6.5'
echo 'foo "v0.6.6'
echo 'foo "v0.6.6'
echo 'foo "v0.6.7'
echo 'foo "v0.6.7'
echo 'foo "v0.6.8'
echo 'foo "v0.6.8'
echo 'foo "v0.6.9'
echo 'foo "v0.6.9'
echo 'foo "v0.7.0'
echo 'foo "v0.7.0'
echo 'foo "v0.7.1'
echo 'foo "v0.7.1'
echo 'foo "v0.7.10'
echo 'foo "v0.7.10'
echo 'foo "v0.7.11'
echo 'foo "v0.7.11'
echo 'foo "v0.7.12'
echo 'foo "v0.7.12'
echo 'foo "v0.7.2'
echo 'foo "v0.7.2'
echo 'foo "v0.7.3'
echo 'foo "v0.7.3'
echo 'foo "v0.7.4'
echo 'foo "v0.7.4'
echo 'foo "v0.7.5'
echo 'foo "v0.7.5'
echo 'foo "v0.7.6'
echo 'foo "v0.7.6'
echo 'foo "v0.7.7'
echo 'foo "v0.7.7'
echo 'foo "v0.7.8'
echo 'foo "v0.7.8'
echo 'foo "v0.7.9'
echo 'foo "v0.7.9'
echo 'foo "v0.8.0'
echo 'foo "v0.8.0'
echo 'foo "v0.8.1'
echo 'foo "v0.8.1'
echo 'foo "v0.8.10'
echo 'foo "v0.8.10'
echo 'foo "v0.8.11'
echo 'foo "v0.8.11'
echo 'foo "v0.8.12'
echo 'foo "v0.8.12'
echo 'foo "v0.8.13'
echo 'foo "v0.8.13'
echo 'foo "v0.8.14'
echo 'foo "v0.8.14'
echo 'foo "v0.8.15'
echo 'foo "v0.8.15'
echo 'foo "v0.8.16'
echo 'foo "v0.8.16'
echo 'foo "v0.8.17'
echo 'foo "v0.8.17'
echo 'foo "v0.8.18'
echo 'foo "v0.8.18'
echo 'foo "v0.8.19'
echo 'foo "v0.8.19'
echo 'foo "v0.8.2'
echo 'foo "v0.8.2'
echo 'foo "v0.8.20'
echo 'foo "v0.8.20'
echo 'foo "v0.8.21'
echo 'foo "v0.8.21'
echo 'foo "v0.8.22'
echo 'foo "v0.8.22'
echo 'foo "v0.8.23'
echo 'foo "v0.8.23'
echo 'foo "v0.8.24'
echo 'foo "v0.8.24'
echo 'foo "v0.8.25'
echo 'foo "v0.8.25'
echo 'foo "v0.8.26'
echo 'foo "v0.8.26'
echo 'foo "v0.8.27'
echo 'foo "v0.8.27'
echo 'foo "v0.8.28'
echo 'foo "v0.8.28'
echo 'foo "v0.8.3'
echo 'foo "v0.8.3'
echo 'foo "v0.8.4'
echo 'foo "v0.8.4'
echo 'foo "v0.8.5'
echo 'foo "v0.8.5'
echo 'foo "v0.8.6'
echo 'foo "v0.8.6'
echo 'foo "v0.8.7'
echo 'foo "v0.8.7'
echo 'foo "v0.8.8'
echo 'foo "v0.8.8'
echo 'foo "v0.8.9'
echo 'foo "v0.8.9'
echo 'foo "v0.9.0'
echo 'foo "v0.9.0'
echo 'foo "v0.9.1'
echo 'foo "v0.9.1'
echo 'foo "v0.9.10'
echo 'foo "v0.9.10'
echo 'foo "v0.9.11'
echo 'foo "v0.9.11'
echo 'foo "v0.9.12'
echo 'foo "v0.9.12'
echo 'foo "v0.9.2'
echo 'foo "v0.9.2'
echo 'foo "v0.9.3'
echo 'foo "v0.9.3'
echo 'foo "v0.9.4'
echo 'foo "v0.9.4'
echo 'foo "v0.9.5'
echo 'foo "v0.9.5'
echo 'foo "v0.9.6'
echo 'foo "v0.9.6'
echo 'foo "v0.9.7'
echo 'foo "v0.9.7'
echo 'foo "v0.9.8'
echo 'foo "v0.9.8'
echo 'foo "v0.9.9'
echo 'foo "v0.9.9'
echo 'foo "v0.1.100'
echo 'foo "v0.1.100'
echo 'foo "v0.1.101'
echo 'foo "v0.1.101'
echo 'foo "v0.1.102'
echo 'foo "v0.1.102'
echo 'foo "v0.1.103'
echo 'foo "v0.1.103'
echo 'foo "v0.1.104'
echo 'foo "v0.1.104'
echo 'foo "v0.1.14'
echo 'foo "v0.1.14'
echo 'foo "v0.1.15'
echo 'foo "v0.1.15'
echo 'foo "v0.1.16'
echo 'foo "v0.1.16'
echo 'foo "v0.1.17'
echo 'foo "v0.1.17'
echo 'foo "v0.1.18'
echo 'foo "v0.1.18'
echo 'foo "v0.1.19'
echo 'foo "v0.1.19'
echo 'foo "v0.1.20'
echo 'foo "v0.1.20'
echo 'foo "v0.1.21'
echo 'foo "v0.1.21'
echo 'foo "v0.1.22'
echo 'foo "v0.1.22'
echo 'foo "v0.1.23'
echo 'foo "v0.1.23'
echo 'foo "v0.1.24'
echo 'foo "v0.1.24'
echo 'foo "v0.1.25'
echo 'foo "v0.1.25'
echo 'foo "v0.1.26'
echo 'foo "v0.1.26'
echo 'foo "v0.1.27'
echo 'foo "v0.1.27'
echo 'foo "v0.1.28'
echo 'foo "v0.1.28'
echo 'foo "v0.1.29'
echo 'foo "v0.1.29'
echo 'foo "v0.1.30'
echo 'foo "v0.1.30'
echo 'foo "v0.1.31'
echo 'foo "v0.1.31'
echo 'foo "v0.1.32'
echo 'foo "v0.1.32'
echo 'foo "v0.1.33'
echo 'foo "v0.1.33'
echo 'foo "v0.1.90'
echo 'foo "v0.1.90'
echo 'foo "v0.1.91'
echo 'foo "v0.1.91'
echo 'foo "v0.1.92'
echo 'foo "v0.1.92'
echo 'foo "v0.1.93'
echo 'foo "v0.1.93'
echo 'foo "v0.1.94'
echo 'foo "v0.1.94'
echo 'foo "v0.1.95'
echo 'foo "v0.1.95'
echo 'foo "v0.1.96'
echo 'foo "v0.1.96'
echo 'foo "v0.1.97'
echo 'foo "v0.1.97'
echo 'foo "v0.1.98'
echo 'foo "v0.1.98'
echo 'foo "v0.1.99'
echo 'foo "v0.1.99'
echo 'foo "v0.10.14'
echo 'foo "v0.10.14'
echo 'foo "v0.2.0'
echo 'foo "v0.2.0'
echo 'foo "v0.2.1'
echo 'foo "v0.2.1'
echo 'foo "v0.2.2'
echo 'foo "v0.2.2'
echo 'foo "v0.2.3'
echo 'foo "v0.2.3'
echo 'foo "v0.2.4'
echo 'foo "v0.2.4'
echo 'foo "v0.2.5'
echo 'foo "v0.2.5'
echo 'foo "v0.2.6'
echo 'foo "v0.2.6'
echo 'foo "v0.3.0'
echo 'foo "v0.3.0'
echo 'foo "v0.3.1'
echo 'foo "v0.3.1'
echo 'foo "v0.3.2'
echo 'foo "v0.3.2'
echo 'foo "v0.3.3'
echo 'foo "v0.3.3'
echo 'foo "v0.3.4'
echo 'foo "v0.3.4'
echo 'foo "v0.3.5'
echo 'foo "v0.3.5'
echo 'foo "v0.3.6'
echo 'foo "v0.3.6'
echo 'foo "v0.3.7'
echo 'foo "v0.3.7'
echo 'foo "v0.3.8'
echo 'foo "v0.3.8'
echo 'foo "v0.4.0'
echo 'foo "v0.4.0'
echo 'foo "v0.4.1'
echo 'foo "v0.4.1'
echo 'foo "v0.4.10'
echo 'foo "v0.4.10'
echo 'foo "v0.4.11'
echo 'foo "v0.4.11'
echo 'foo "v0.4.12'
echo 'foo "v0.4.12'
echo 'foo "v0.4.2'
echo 'foo "v0.4.2'
echo 'foo "v0.4.3'
echo 'foo "v0.4.3'
echo 'foo "v0.4.4'
echo 'foo "v0.4.4'
echo 'foo "v0.4.5'
echo 'foo "v0.4.5'
echo 'foo "v0.4.6'
echo 'foo "v0.4.6'
echo 'foo "v0.4.7'
echo 'foo "v0.4.7'
echo 'foo "v0.4.8'
echo 'foo "v0.4.8'
echo 'foo "v0.4.9'
echo 'foo "v0.4.9'
echo 'foo "v0.5.0'
echo 'foo "v0.5.0'
echo 'foo "v0.6.1'
echo 'foo "v0.6.1'
echo 'foo "v0.6.10'
echo 'foo "v0.6.10'
echo 'foo "v0.6.11'
echo 'foo "v0.6.11'
echo 'foo "v0.6.12'
echo 'foo "v0.6.12'
echo 'foo "v0.6.13'
echo 'foo "v0.6.13'
echo 'foo "v0.6.2'
echo 'foo "v0.6.2'
echo 'foo "v0.6.3'
echo 'foo "v0.6.3'
echo 'foo "v0.6.4'
echo 'foo "v0.6.4'
echo 'foo "v0.6.5'
echo 'foo "v0.6.5'
echo 'foo "v0.6.6'
echo 'foo "v0.6.6'
echo 'foo "v0.6.7'
echo 'foo "v0.6.7'
echo 'foo "v0.6.8'
echo 'foo "v0.6.8'
echo 'foo "v0.6.9'
echo 'foo "v0.6.9'
} }
EXPECTED_OUTPUT_PATH="$MOCKS_DIR/nvm_ls_remote.txt"
OUTPUT="$(nvm_ls_remote foo)" OUTPUT="$(nvm_ls_remote foo)"
EXIT_CODE="$(nvm_ls_remote foo >/dev/null 2>&1 ; echo $?)" EXIT_CODE="$(nvm_ls_remote foo >/dev/null 2>&1 ; echo $?)"
[ "_$OUTPUT" = "_N/A" ] || die "nonexistent version did not report N/A" [ "_$OUTPUT" = "_N/A" ] || die "nonexistent version did not report N/A"
[ "_$EXIT_CODE" = "_3" ] || die "nonexistent version did not exit with code 3, got $EXIT_CODE" [ "_$EXIT_CODE" = "_3" ] || die "nonexistent version did not exit with code 3, got $EXIT_CODE"
OUTPUT="$(nvm_ls_remote)" OUTPUT="$(nvm_ls_remote)"
EXPECTED_OUTPUT="$(nvm_download | \egrep -o 'v[0-9]+\.[0-9]+\.[0-9]+' | sort -t. -u -k 1.2,1n -k 2,2n -k 3,3n)" EXPECTED_OUTPUT="$(cat "$EXPECTED_OUTPUT_PATH")"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "bare nvm_ls_remote did not output expected sorted versions; got $(echo "$OUTPUT") expected $(echo "$EXPECTED_OUTPUT")" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "bare nvm_ls_remote did not output expected sorted versions; got $(echo ">$OUTPUT<") expected $(echo ">$EXPECTED_OUTPUT<")"
OUTPUT="$(nvm_ls_remote 0.3)" OUTPUT="$(nvm_ls_remote 0.3)"
EXPECTED_OUTPUT="v0.3.0 EXPECTED_OUTPUT="v0.3.0
@@ -466,7 +42,7 @@ v0.3.8"
# Sanity checks # Sanity checks
OUTPUT="$(nvm_print_implicit_alias remote stable)" OUTPUT="$(nvm_print_implicit_alias remote stable)"
EXPECTED_OUTPUT="0.10" EXPECTED_OUTPUT="6.2"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_print_implicit_alias remote stable did not output $EXPECTED_OUTPUT; got $OUTPUT" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_print_implicit_alias remote stable did not output $EXPECTED_OUTPUT; got $OUTPUT"
OUTPUT="$(nvm_print_implicit_alias remote unstable)" OUTPUT="$(nvm_print_implicit_alias remote unstable)"
@@ -474,12 +50,22 @@ EXPECTED_OUTPUT="0.11"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_print_implicit_alias remote unstable did not output $EXPECTED_OUTPUT; got $OUTPUT" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_print_implicit_alias remote unstable did not output $EXPECTED_OUTPUT; got $OUTPUT"
OUTPUT="$(nvm_ls_remote stable)" OUTPUT="$(nvm_ls_remote stable)"
EXPECTED_OUTPUT="v0.10.32" EXPECTED_OUTPUT="v6.2.2"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_ls_remote stable did not output $EXPECTED_OUTPUT; got $OUTPUT" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_ls_remote stable did not output $EXPECTED_OUTPUT; got $OUTPUT"
OUTPUT="$(nvm_ls_remote unstable)" OUTPUT="$(nvm_ls_remote unstable)"
EXPECTED_OUTPUT="v0.11.14" EXPECTED_OUTPUT="v0.11.16"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_ls_remote unstable did not output $EXPECTED_OUTPUT; got $OUTPUT" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_ls_remote unstable did not output $EXPECTED_OUTPUT; got $OUTPUT"
cleanup 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,50 @@
#!/bin/sh
set -ex
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=2
[ "$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

@@ -9,24 +9,28 @@ cleanup() {
. ../../../nvm.sh . ../../../nvm.sh
# sample output at the time the test was written # sample output at the time the test was written
TAB_PATH="$PWD/mocks/iojs.org-dist-index.tab"
nvm_download() { nvm_download() {
echo 'version date files npm v8 uv zlib openssl modules' cat "$TAB_PATH"
echo 'v1.0.1 2015-01-14 linux-armv7l,linux-x64,linux-x86,osx-x64-tar,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi'
echo 'v1.0.0 2015-01-14 linux-armv7l,linux-x64,linux-x86,osx-x64-tar,win-x64-exe,win-x64-msi,win-x86-exe,win-x86-msi'
} }
EXPECTED_OUTPUT_PATH="$PWD/mocks/nvm_ls_remote_iojs.txt"
OUTPUT="$(nvm_ls_remote_iojs foo)" OUTPUT="$(nvm_ls_remote_iojs foo)"
EXIT_CODE="$(nvm_ls_remote_iojs foo >/dev/null 2>&1 ; echo $?)" EXIT_CODE="$(nvm_ls_remote_iojs foo >/dev/null 2>&1 ; echo $?)"
[ "_$OUTPUT" = "_N/A" ] || die "nonexistent version did not report N/A" [ "_$OUTPUT" = "_N/A" ] || die "nonexistent version did not report N/A"
[ "_$EXIT_CODE" = "_3" ] || die "nonexistent version did not exit with code 3, got $EXIT_CODE" [ "_$EXIT_CODE" = "_3" ] || die "nonexistent version did not exit with code 3, got $EXIT_CODE"
OUTPUT="$(nvm_ls_remote_iojs)" OUTPUT="$(nvm_ls_remote_iojs)"
EXPECTED_OUTPUT="$(nvm_download | \egrep -o 'v[0-9]+\.[0-9]+\.[0-9]+' | sort -t. -u -k 1.2,1n -k 2,2n -k 3,3n | sed -e 's/^/iojs-/')" EXPECTED_OUTPUT="$(cat "$EXPECTED_OUTPUT_PATH")"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "bare nvm_ls_remote_iojs did not output expected sorted versions; got $(echo "$OUTPUT") expected $(echo "$EXPECTED_OUTPUT")" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "bare nvm_ls_remote_iojs did not output expected sorted versions; got $(echo ">$OUTPUT<") expected $(echo ">$EXPECTED_OUTPUT<")"
OUTPUT="$(nvm_ls_remote_iojs 1.0)" OUTPUT="$(nvm_ls_remote_iojs 1.0)"
EXPECTED_OUTPUT="iojs-v1.0.0 EXPECTED_OUTPUT="iojs-v1.0.0
iojs-v1.0.1" iojs-v1.0.1
iojs-v1.0.2
iojs-v1.0.3
iojs-v1.0.4"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_ls_remote_iojs 1.0 did not output 1.0.x versions; got $OUTPUT" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_ls_remote_iojs 1.0 did not output 1.0.x versions; got $OUTPUT"

View File

@@ -0,0 +1,19 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
OUTPUT="$(nvm_make_alias 2>&1)"
EXIT_CODE="$(nvm_make_alias >/dev/null 2>&1 ; echo $?)"
EXPECTED_OUTPUT='an alias name is required'
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "\`nvm_make_alias\` did not error with '$EXPECTED_OUTPUT'; got '$OUTPUT'"
[ "$EXIT_CODE" -eq 1 ] || die "\`nvm_make_alias\` did not exit with 1, got '$EXIT_CODE'"
OUTPUT="$(nvm_make_alias foo 2>&1)"
EXIT_CODE="$(nvm_make_alias foo >/dev/null 2>&1 ; echo $?)"
EXPECTED_OUTPUT='an alias target version is required'
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "\`nvm_make_alias foo\` did not error with '$EXPECTED_OUTPUT'; got '$OUTPUT'"
[ "$EXIT_CODE" -eq 2 ] || die "\`nvm_make_alias foo\` did not exit with 2, got '$EXIT_CODE'"

View File

@@ -5,13 +5,17 @@ die () { echo $@ ; exit 1; }
. ../../../nvm.sh . ../../../nvm.sh
[ "~$(nvm_num_version_groups)" = "~0" ] || die "no args should give 0" [ "~$(nvm_num_version_groups)" = "~0" ] || die "no args should give 0"
[ "~$(nvm_num_version_groups v)" = "~0" ] || die "just "v" should give 0"
[ "~$(nvm_num_version_groups .)" = "~0" ] || die "just "." should give 0"
[ "~$(nvm_num_version_groups a)" = "~1" ] || die "one letter should give 1" [ "~$(nvm_num_version_groups a)" = "~1" ] || die "one letter should give 1"
[ "~$(nvm_num_version_groups 1)" = "~1" ] || die "1 should give 1" [ "~$(nvm_num_version_groups 1)" = "~1" ] || die "1 should give 1"
[ "~$(nvm_num_version_groups 1.)" = "~1" ] || die "1. should give 1"
[ "~$(nvm_num_version_groups v1)" = "~1" ] || die "v1 should give 1" [ "~$(nvm_num_version_groups v1)" = "~1" ] || die "v1 should give 1"
[ "~$(nvm_num_version_groups v1.)" = "~1" ] || die "v1. should give 1" [ "~$(nvm_num_version_groups v1.)" = "~1" ] || die "v1. should give 1"
[ "~$(nvm_num_version_groups 1.2)" = "~2" ] || die "1.2 should give 2" [ "~$(nvm_num_version_groups 1.2)" = "~2" ] || die "1.2 should give 2"
[ "~$(nvm_num_version_groups 1.2.)" = "~2" ] || die "1.2. should give 2"
[ "~$(nvm_num_version_groups v1.2)" = "~2" ] || die "v1.2 should give 2" [ "~$(nvm_num_version_groups v1.2)" = "~2" ] || die "v1.2 should give 2"
[ "~$(nvm_num_version_groups v1.2.)" = "~2" ] || die "v1.2. should give 2" [ "~$(nvm_num_version_groups v1.2.)" = "~2" ] || die "v1.2. should give 2"

View File

@@ -0,0 +1,44 @@
#!/bin/sh
. ../../common.sh
die () { echo $@ ; cleanup ; exit 1; }
cleanup () {
unset -f nvm_alias nvm_version
}
. ../../../nvm.sh
NVM_ALIAS_DIR='path/to/the alias/dir'
OUTPUT="$(nvm_print_alias_path 2>&1)"
EXPECTED_OUTPUT='An alias dir is required.'
[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "'nvm_print_alias_path' produced wrong output; got '$OUTPUT', expected '$EXPECTED_OUTPUT'"
OUTPUT="$(nvm_print_alias_path "$NVM_ALIAS_DIR" 2>&1)"
EXPECTED_OUTPUT='An alias path is required.'
[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "'nvm_print_alias_path \"\$NVM_ALIAS_DIR\"' produced wrong output; got '$OUTPUT', expected '$EXPECTED_OUTPUT'"
nvm_alias() {
echo ''
}
OUTPUT="$(nvm_print_alias_path "$NVM_ALIAS_DIR" foo | strip_colors)"
EXPECTED_OUTPUT=''
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "'nvm_print_alias_path \"\$NVM_ALIAS_DIR\" foo' should produce no output when nvm_alias does not; got '$OUTPUT'"
EXIT_CODE="$(nvm_print_alias_path "$NVM_ALIAS_DIR" foo >/dev/null 2>&1 ; echo $?)"
[ "$EXIT_CODE" = '0' ] || die "'nvm_print_alias_path \"\$NVM_ALIAS_DIR\" foo' should exit zero when nvm_alias produces no output; got $EXIT_CODE"
nvm_alias() {
echo "\"$1\""
}
nvm_version() {
echo "v$1"
}
OUTPUT="$(nvm_print_alias_path "$NVM_ALIAS_DIR" "$NVM_ALIAS_DIR/blah" | strip_colors)"
EXPECTED_OUTPUT='blah -> "blah" (-> v"blah")'
[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "'nvm_print_alias_path \"\$NVM_ALIAS_DIR\" \"\$NVM_ALIAS_DIR/blah\"' should strip alias dir and print nvm_alias output; got '$OUTPUT', expected '$EXPECTED_OUTPUT'"
cleanup

View File

@@ -0,0 +1,38 @@
#!/bin/sh
. ../../common.sh
die () { echo $@ ; cleanup ; exit 1; }
cleanup () {
unset -f nvm_print_implicit_alias nvm_version
}
. ../../../nvm.sh
nvm_print_implicit_alias() {
echo ''
}
OUTPUT="$(nvm_print_default_alias 2>&1)"
EXPECTED_OUTPUT='A default alias is required.'
[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "'nvm_print_default_alias' produced wrong output; got '$OUTPUT', expected '$EXPECTED_OUTPUT'"
OUTPUT="$(nvm_print_default_alias foo | strip_colors)"
EXPECTED_OUTPUT=''
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "'nvm_print_default_alias foo' should produce no output when nvm_print_implicit_alias does not; got '$OUTPUT'"
EXIT_CODE="$(nvm_print_default_alias foo >/dev/null 2>&1 ; echo $?)"
[ "$EXIT_CODE" = '0' ] || die "'nvm_print_default_alias foo' should exit zero when nvm_print_implicit_alias produces no output; got $EXIT_CODE"
nvm_print_implicit_alias() {
echo "\"$1-$2\""
}
nvm_version() {
echo "v$1"
}
OUTPUT="$(nvm_print_default_alias blah | strip_colors)"
EXPECTED_OUTPUT='blah -> "local-blah" (-> v"local-blah") (default)'
[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "'nvm_print_default_alias blah' should strip alias dir and print nvm_print_implicit_alias output; got '$OUTPUT', expected '$EXPECTED_OUTPUT'"
cleanup

View File

@@ -14,13 +14,13 @@ FIRST_EXIT_CODE="$(nvm_print_implicit_alias > /dev/null 2>&1 ; echo $?)"
[ "_$FIRST_EXIT_CODE" = "_1" ] \ [ "_$FIRST_EXIT_CODE" = "_1" ] \
|| die "nvm_print_implicit_alias without local|remote had wrong exit code: expected 1, got $FIRST_EXIT_CODE" || die "nvm_print_implicit_alias without local|remote had wrong exit code: expected 1, got $FIRST_EXIT_CODE"
EXPECTED_SECOND_MSG="Only implicit aliases 'stable' and 'unstable' are supported." EXPECTED_SECOND_MSG="Only implicit aliases 'stable', 'unstable', 'iojs', and 'node' are supported."
[ "_$(nvm_print_implicit_alias local 2>&1)" = "_$EXPECTED_SECOND_MSG" ] \ [ "_$(nvm_print_implicit_alias local 2>&1)" = "_$EXPECTED_SECOND_MSG" ] \
|| die "nvm_print_implicit_alias did not require stable|unstable as second argument" || die "nvm_print_implicit_alias did not require stable|unstable|iojs|node as second argument"
[ "_$(nvm_print_implicit_alias local foo 2>&1)" = "_$EXPECTED_SECOND_MSG" ] \ [ "_$(nvm_print_implicit_alias local foo 2>&1)" = "_$EXPECTED_SECOND_MSG" ] \
|| die "nvm_print_implicit_alias did not require stable|unstable as second argument" || die "nvm_print_implicit_alias did not require stable|unstable|iojs|node as second argument"
SECOND_EXIT_CODE="$(nvm_print_implicit_alias local > /dev/null 2>&1 ; echo $?)" SECOND_EXIT_CODE="$(nvm_print_implicit_alias local > /dev/null 2>&1 ; echo $?)"
[ "_$SECOND_EXIT_CODE" = "_2" ] \ [ "_$SECOND_EXIT_CODE" = "_2" ] \
|| die "nvm_print_implicit_alias without stable|unstable had wrong exit code: expected 2, got $SECOND_EXIT_CODE" || die "nvm_print_implicit_alias without stable|unstable|iojs|node had wrong exit code: expected 2, got $SECOND_EXIT_CODE"

View File

@@ -2,28 +2,49 @@
die () { echo $@ ; cleanup ; exit 1; } die () { echo $@ ; cleanup ; exit 1; }
cleanup() { cleanup() {
rm -rf ../../../v0.2.3 rm -rf "${NVM_DIR}/v0.2.3"
rm -rf ../../../v0.3.4 rm -rf "${NVM_DIR}/v0.3.4"
rm -rf ../../../v0.4.6 rm -rf "${NVM_DIR}/v0.4.6"
rm -rf ../../../v0.5.7 rm -rf "${NVM_DIR}/v0.5.7"
rm -rf ../../../v0.7.7 rm -rf "${NVM_DIR}/v0.7.7"
unset -f nvm_ls_remote 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 . ../../../nvm.sh
mkdir ../../../v0.2.3 mkdir "${NVM_DIR}/v0.2.3"
mkdir ../../../v0.3.4 mkdir "${NVM_DIR}/v0.3.4"
mkdir ../../../v0.4.6 mkdir "${NVM_DIR}/v0.4.6"
mkdir ../../../v0.5.7 mkdir "${NVM_DIR}/v0.5.7"
mkdir ../../../v0.7.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="$(nvm_print_implicit_alias local stable)"
[ "_$LATEST_STABLE" = "_0.4" ] || die "local stable is not latest even minor: expected 0.4, got $LATEST_STABLE" [ "_$LATEST_STABLE" = "_0.4" ] || die "local stable is not latest even minor: expected 0.4, got $LATEST_STABLE"
LATEST_NODE="$(nvm_print_implicit_alias local node)"
[ "_$LATEST_NODE" = "_stable" ] || die "local node is not stable: expected stable, got $LATEST_NODE"
LATEST_UNSTABLE="$(nvm_print_implicit_alias local unstable)" LATEST_UNSTABLE="$(nvm_print_implicit_alias local unstable)"
[ "_$LATEST_UNSTABLE" = "_0.7" ] || die "local unstable is not latest odd minor: expected 0.7, got $LATEST_UNSTABLE" [ "_$LATEST_UNSTABLE" = "_0.7" ] || die "local unstable is not latest odd minor: expected 0.7, got $LATEST_UNSTABLE"
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 "${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"
LATEST_UNSTABLE="$(nvm_print_implicit_alias local unstable)"
[ "_$LATEST_UNSTABLE" = "_0.7" ] || die "local unstable is not latest pre-v1.0 odd minor: expected 0.7, got $LATEST_UNSTABLE"
## ** ##
nvm_ls_remote() { nvm_ls_remote() {
echo "v0.4.3" echo "v0.4.3"
echo "v0.5.4" echo "v0.5.4"
@@ -37,11 +58,47 @@ nvm_ls_remote() {
echo "v0.9.7" echo "v0.9.7"
} }
nvm_ls_remote_iojs() {
echo "iojs-v0.1.0"
echo "iojs-v0.1.1"
echo "iojs-v0.7.8"
echo "iojs-v0.98.5"
echo "iojs-v0.99.0"
}
LATEST_STABLE="$(nvm_print_implicit_alias remote stable)" LATEST_STABLE="$(nvm_print_implicit_alias remote stable)"
[ "_$LATEST_STABLE" = "_0.6" ] || die "remote stable is not latest even minor: expected 0.6, got $LATEST_STABLE" [ "_$LATEST_STABLE" = "_0.6" ] || die "remote stable is not latest even minor: expected 0.6, got $LATEST_STABLE"
LATEST_NODE="$(nvm_print_implicit_alias remote node)"
[ "_$LATEST_NODE" = "_stable" ] || die "remote node is not stable: expected stable, got $LATEST_NODE"
LATEST_UNSTABLE="$(nvm_print_implicit_alias remote unstable)" LATEST_UNSTABLE="$(nvm_print_implicit_alias remote unstable)"
[ "_$LATEST_UNSTABLE" = "_0.9" ] || die "remote unstable is not latest odd minor: expected 0.9, got $LATEST_UNSTABLE" [ "_$LATEST_UNSTABLE" = "_0.9" ] || die "remote unstable is not latest odd minor: expected 0.9, got $LATEST_UNSTABLE"
cleanup LATEST_IOJS="$(nvm_print_implicit_alias remote iojs)"
[ "_$LATEST_IOJS" = "_iojs-v0.99" ] || die "remote iojs is not latest: expected iojs-v0.99, got $LATEST_IOJS"
## node post v1.0/io.js merger ##
nvm_ls_remote() {
echo "v0.4.3"
echo "v0.5.4"
echo "v0.6.6"
echo "v0.7.7"
echo "v0.9.7"
echo "v0.4.3"
echo "v0.5.4"
echo "v0.6.6"
echo "v0.7.7"
echo "v0.9.7"
echo "v1.0.0"
echo "v1.1.0"
}
LATEST_STABLE="$(nvm_print_implicit_alias remote stable)"
[ "_$LATEST_STABLE" = "_1.1" ] || die "remote stable when post-v1.0 exists is not latest: expected 1.1, got $LATEST_STABLE"
LATEST_UNSTABLE="$(nvm_print_implicit_alias remote unstable)"
[ "_$LATEST_UNSTABLE" = "_0.9" ] || die "remote unstable is not latest odd pre-v1.0 minor: expected 0.9, got $LATEST_UNSTABLE"
## ** ##
cleanup

View File

@@ -0,0 +1,28 @@
#!/bin/sh
cleanup () {
alias nvm_has='\nvm_has'
alias npm='\npm'
unset -f nvm_has npm
}
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
nvm_has() { return 1; }
OUTPUT="$(nvm_print_npm_version)"
[ -z "$OUTPUT" ] || die "nvm_print_npm_version did not return empty when nvm_has returns 1, got '$OUTPUT'"
nvm_has() { return 0; }
npm() {
if [ "_$@" = "_--version" ]; then
echo "1.2.3"
else
echo "error"
fi
}
OUTPUT="$(nvm_print_npm_version)"
EXPECTED_OUTPUT=" (npm v1.2.3)"
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_print_npm_version did not provided '$EXPECTED_OUTPUT', got '$OUTPUT'"
cleanup

View File

@@ -26,36 +26,53 @@ EXIT_CODE="$(nvm_remote_version iojs-foo >/dev/null 2>&1 ; echo $?)"
nvm_ls_remote() { nvm_ls_remote() {
if ! nvm_is_iojs_version "$1"; then if [ -z "$1" ] || ! nvm_is_iojs_version "$1"; then
echo "test output" echo "test_output"
echo "more test output" echo "more_test_output"
echo "pattern received: _$1_" echo "pattern_received:_$1_"
fi fi
} }
nvm_ls_remote_iojs() { nvm_ls_remote_iojs() {
if nvm_is_iojs_version "$1"; then if [ -z "$1" ] || nvm_is_iojs_version "$1"; then
echo "test iojs output" echo "test_iojs_output"
echo "more iojs test output" echo "more_iojs_test_output"
echo "iojs pattern received: _$1_" echo "iojs_pattern_received:_$1_"
fi fi
} }
OUTPUT="$(nvm_remote_version foo)" OUTPUT="$(nvm_remote_version foo)"
EXIT_CODE="$(nvm_remote_version foo >/dev/null 2>&1 ; echo $?)" 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" || 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" [ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_version foo did not exit with 0, got $EXIT_CODE"
OUTPUT="$(nvm_remote_version iojs-foo)" OUTPUT="$(nvm_remote_version iojs-foo)"
EXIT_CODE="$(nvm_remote_version iojs-foo >/dev/null 2>&1 ; echo $?)" 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" || 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" [ "_$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:__" ] \
|| 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"
OUTPUT="$(nvm_remote_version stable)" OUTPUT="$(nvm_remote_version stable)"
EXIT_CODE="$(nvm_remote_version stable >/dev/null 2>&1 ; echo $?)" EXIT_CODE="$(nvm_remote_version stable >/dev/null 2>&1 ; echo $?)"
[ "_$OUTPUT" = "_$(nvm_ls_remote stable)" ] \ [ "_$OUTPUT" = "_$(nvm_ls_remote stable)" ] \
|| die "nvm_remote_version stable did not return contents of nvm_ls_remote stable; got $OUTPUT" || die "nvm_remote_version stable did not return contents of nvm_ls_remote stable; got $OUTPUT"
[ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_version stable did not exit with 0, got $EXIT_CODE" [ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_version stable did not exit with 0, got $EXIT_CODE"
cleanup OUTPUT="$(nvm_remote_version unstable)"
EXIT_CODE="$(nvm_remote_version unstable >/dev/null 2>&1 ; echo $?)"
[ "_$OUTPUT" = "_$(nvm_ls_remote unstable)" ] \
|| die "nvm_remote_version unstable did not return contents of nvm_ls_remote unstable; got $OUTPUT"
[ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_version unstable did not exit with 0, got $EXIT_CODE"
OUTPUT="$(nvm_remote_version node)"
EXIT_CODE="$(nvm_remote_version node >/dev/null 2>&1 ; echo $?)"
[ "_$OUTPUT" = "_$(nvm_ls_remote node)" ] \
|| die "nvm_remote_version node did not return contents of nvm_ls_remote node; got $OUTPUT"
[ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_version node did not exit with 0, got $EXIT_CODE"
cleanup

View File

@@ -0,0 +1,42 @@
#!/bin/sh
OLDPATH=$PATH
TEST_PATH=../../xz-test
cleanup() {
rm -rf $TEST_PATH/{xz,which,awk,rm,command}
export PATH=$OLDPATH
}
die () { echo $@ ; cleanup ; exit 1; }
. ../../../nvm.sh
OLDPATH=$PATH
mkdir -p $TEST_PATH
touch ../../xz-test/xz
chmod +x ../../xz-test/xz
export PATH=$TEST_PATH:$PATH
$(nvm_supports_xz "v2.3.2") || \
die "expected 'nvm_supports_xz v2.3.2' to exit with 0"
$(nvm_supports_xz "v0.12.7") && \
die "expected 'nvm_supports_xz v0.12.7' to exit with 1"
# set up for a failure by having a minimal toolset available
# but remove xz
ln -s /usr/bin/which $TEST_PATH/which
ln -s /usr/bin/command $TEST_PATH/command
ln -s /usr/bin/awk $TEST_PATH/awk
ln -s $(which rm) $TEST_PATH/rm
export PATH=$TEST_PATH
rm $TEST_PATH/xz
$(nvm_supports_xz "v2.3.2") && \
die "expected 'nvm_supports_xz v2.3.2' with a missing xz binary to exit with 1"
cleanup

View File

@@ -4,16 +4,18 @@ die () { echo $@ ; exit 1; }
. ../../../nvm.sh . ../../../nvm.sh
EXPECTED_MSG="Only implicit aliases 'stable' and 'unstable' are supported." EXPECTED_MSG="Only implicit aliases 'stable', 'unstable', 'iojs', and 'node' are supported."
[ "_$(nvm_validate_implicit_alias 2>&1)" = "_$EXPECTED_MSG" ] \ [ "_$(nvm_validate_implicit_alias 2>&1)" = "_$EXPECTED_MSG" ] \
|| die "nvm_validate_implicit_alias did not require stable|unstable" || die "nvm_validate_implicit_alias did not require stable|unstable|iojs|node"
[ "_$(nvm_validate_implicit_alias foo 2>&1)" = "_$EXPECTED_MSG" ] \ [ "_$(nvm_validate_implicit_alias foo 2>&1)" = "_$EXPECTED_MSG" ] \
|| die "nvm_validate_implicit_alias did not require stable|unstable" || die "nvm_validate_implicit_alias did not require stable|unstable|iojs|node"
EXIT_CODE="$(nvm_validate_implicit_alias >/dev/null 2>&1 ; echo $?)" EXIT_CODE="$(nvm_validate_implicit_alias >/dev/null 2>&1 ; echo $?)"
[ "_$EXIT_CODE" = "_1" ] \ [ "_$EXIT_CODE" = "_1" ] \
|| die "nvm_validate_implicit_alias without stable|unstable had wrong exit code: expected 1, got $EXIT_CODE" || die "nvm_validate_implicit_alias without stable|unstable|iojs|node had wrong exit code: expected 1, got $EXIT_CODE"
nvm_validate_implicit_alias stable || die "nvm_validate_implicit_alias stable did not exit 0" nvm_validate_implicit_alias stable || die "nvm_validate_implicit_alias stable did not exit 0"
nvm_validate_implicit_alias unstable || die "nvm_validate_implicit_alias unstable did not exit 0" nvm_validate_implicit_alias unstable || die "nvm_validate_implicit_alias unstable did not exit 0"
nvm_validate_implicit_alias node || die "nvm_validate_implicit_alias node did not exit 0"
nvm_validate_implicit_alias iojs || die "nvm_validate_implicit_alias iojs did not exit 0"

View File

@@ -4,7 +4,10 @@ die () { echo $@ ; exit 1; }
. ../../../nvm.sh . ../../../nvm.sh
[ "$(nvm_version_path foo)" = "$NVM_DIR/foo" ] || die '"nvm_version_path foo" did not return correct location' OUTPUT="$(nvm_version_path foo)"
EXPECTED_OUTPUT="$NVM_DIR/foo"
[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "'nvm_version_path foo' did not return correct location; expected '$EXPECTED_OUTPUT', got '$OUTPUT'"
[ "$(nvm_version_path 2>&1)" = "version is required" ] || die '"nvm_version_path" did not error out' [ "$(nvm_version_path 2>&1)" = "version is required" ] || die '"nvm_version_path" did not error out'
[ "$(nvm_version_path v0.11.0)" = "$NVM_DIR/v0.11.0" ] || die 'old version has the wrong path' [ "$(nvm_version_path v0.11.0)" = "$NVM_DIR/v0.11.0" ] || die 'old version has the wrong path'
[ "$(nvm_version_path v0.12.0)" = "$NVM_DIR/versions/node/v0.12.0" ] || die 'new version has the wrong path' [ "$(nvm_version_path v0.12.0)" = "$NVM_DIR/versions/node/v0.12.0" ] || die 'new version has the wrong path'

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