Merge commit '02f77ff8011bc56d67b477f208998f5efa29c9f8' as 'nvm'
commit
7822ffe5c8
@ -0,0 +1 @@
|
|||||||
|
*.sh eol=lf
|
@ -0,0 +1,15 @@
|
|||||||
|
HEAD
|
||||||
|
src
|
||||||
|
v*
|
||||||
|
alias
|
||||||
|
|
||||||
|
# For testing
|
||||||
|
test/bak
|
||||||
|
.urchin.log
|
||||||
|
.urchin_stdout
|
||||||
|
|
||||||
|
node_modules/
|
||||||
|
npm-debug.log
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
current
|
@ -0,0 +1,4 @@
|
|||||||
|
src
|
||||||
|
v*
|
||||||
|
alias
|
||||||
|
|
@ -0,0 +1,42 @@
|
|||||||
|
language: c # defaults to ruby
|
||||||
|
addons:
|
||||||
|
apt_packages:
|
||||||
|
- zsh
|
||||||
|
- ksh
|
||||||
|
before_install:
|
||||||
|
- curl --version
|
||||||
|
- wget --version
|
||||||
|
install:
|
||||||
|
- (mkdir /tmp/urchin && cd /tmp/urchin && curl -s "$(curl -s https://registry.npmjs.com/urchin | grep -Eo '"tarball":\s*"[^"]+"' | tail -n 1 | awk -F\" '{ print $4 }')" -O && tar -x -f urchin*)
|
||||||
|
- chmod +x /tmp/urchin/package/urchin
|
||||||
|
- '[ -z "$WITHOUT_CURL" ] || sudo apt-get remove curl -y'
|
||||||
|
script:
|
||||||
|
- export PATH=$(echo $PATH | sed 's/::/:/')
|
||||||
|
- NVM_DIR=$TRAVIS_BUILD_DIR make TEST_SUITE=$TEST_SUITE URCHIN=/tmp/urchin/package/urchin test-$SHELL
|
||||||
|
env:
|
||||||
|
- SHELL=bash TEST_SUITE=install_script
|
||||||
|
- SHELL=sh TEST_SUITE=fast
|
||||||
|
- SHELL=dash TEST_SUITE=fast
|
||||||
|
- SHELL=bash TEST_SUITE=fast
|
||||||
|
- SHELL=zsh TEST_SUITE=fast
|
||||||
|
# - SHELL=ksh TEST_SUITE=fast
|
||||||
|
- SHELL=sh TEST_SUITE=slow
|
||||||
|
- SHELL=dash TEST_SUITE=slow
|
||||||
|
- SHELL=bash TEST_SUITE=slow
|
||||||
|
- SHELL=zsh TEST_SUITE=slow
|
||||||
|
# - SHELL=ksh TEST_SUITE=slow
|
||||||
|
- SHELL=sh TEST_SUITE=sourcing
|
||||||
|
- SHELL=dash TEST_SUITE=sourcing
|
||||||
|
- SHELL=bash TEST_SUITE=sourcing
|
||||||
|
- SHELL=zsh TEST_SUITE=sourcing
|
||||||
|
# - SHELL=ksh TEST_SUITE=sourcing
|
||||||
|
- SHELL=sh TEST_SUITE=installation
|
||||||
|
# - SHELL=sh TEST_SUITE=installation WITHOUT_CURL=1
|
||||||
|
- SHELL=dash TEST_SUITE=installation
|
||||||
|
# - SHELL=dash TEST_SUITE=installation WITHOUT_CURL=1
|
||||||
|
- SHELL=bash TEST_SUITE=installation
|
||||||
|
# - SHELL=bash TEST_SUITE=installation WITHOUT_CURL=1
|
||||||
|
- SHELL=zsh TEST_SUITE=installation
|
||||||
|
# - SHELL=zsh TEST_SUITE=installation WITHOUT_CURL=1
|
||||||
|
# - SHELL=ksh TEST_SUITE=installation
|
||||||
|
# - SHELL=ksh TEST_SUITE=installation WITHOUT_CURL=1
|
@ -0,0 +1,15 @@
|
|||||||
|
Thanks for contributing to `nvm`!
|
||||||
|
|
||||||
|
We love pull requests, they're our favorite.
|
||||||
|
|
||||||
|
However, before submitting, please review the following:
|
||||||
|
|
||||||
|
- Please include tests. Changes with tests will be merged very quickly.
|
||||||
|
- Please manually confirm that your changes work in `bash`, `sh`/`dash`, `ksh`, and `zsh`. Fast tests do run in these shells, but it's nice to manually verify also.
|
||||||
|
- Please maintain consistent whitespace - 2-space indentation, trailing newlines in all files, etc.
|
||||||
|
- Any time you make a change to your PR, please rebase freshly on top of master. Nobody likes merge commits.
|
||||||
|
|
||||||
|
Even if you don't have all of these items covered, please still feel free to submit a PR! Someone else may be inspired and volunteer to complete it for you.
|
||||||
|
|
||||||
|
Thanks again!
|
||||||
|
|
@ -0,0 +1,21 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2010-2016 Tim Caswell
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||||
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
@ -0,0 +1,77 @@
|
|||||||
|
# Since we rely on paths relative to the makefile location, abort if make isn't being run from there.
|
||||||
|
$(if $(findstring /,$(MAKEFILE_LIST)),$(error Please only invoke this makefile from the directory it resides in))
|
||||||
|
# Note: With Travis CI:
|
||||||
|
# - the path to urchin is passed via the command line.
|
||||||
|
# - the other utilities are NOT needed, so we skip the test for their existence.
|
||||||
|
URCHIN := urchin
|
||||||
|
ifeq ($(findstring /,$(URCHIN)),) # urchin path was NOT passed in.
|
||||||
|
# Add the local npm packages' bin folder to the PATH, so that `make` can find them, when invoked directly.
|
||||||
|
# Note that rather than using `$(npm bin)` the 'node_modules/.bin' path component is hard-coded, so that invocation works even from an environment
|
||||||
|
# where npm is (temporarily) unavailable due to having deactivated an nvm instance loaded into the calling shell in order to avoid interference with tests.
|
||||||
|
export PATH := $(shell printf '%s' "$$PWD/node_modules/.bin:$$PATH")
|
||||||
|
# The list of all supporting utilities, installed with `npm install`.
|
||||||
|
UTILS := $(URCHIN) replace semver
|
||||||
|
# Make sure that all required utilities can be located.
|
||||||
|
UTIL_CHECK := $(or $(shell PATH="$(PATH)" which $(UTILS) >/dev/null && echo 'ok'),$(error Did you forget to run `npm install` after cloning the repo? At least one of the required supporting utilities not found: $(UTILS)))
|
||||||
|
endif
|
||||||
|
# The files that need updating when incrementing the version number.
|
||||||
|
VERSIONED_FILES := nvm.sh install.sh README.markdown package.json
|
||||||
|
# Define all shells to test with. Can be overridden with `make SHELLS=... <target>`.
|
||||||
|
SHELLS := sh bash dash zsh # ksh (#574)
|
||||||
|
# Generate 'test-<shell>' target names from specified shells.
|
||||||
|
# The embedded shell names are extracted on demand inside the recipes.
|
||||||
|
SHELL_TARGETS := $(addprefix test-,$(SHELLS))
|
||||||
|
# Define the default test suite(s). This can be overridden with `make TEST_SUITE=<...> <target>`.
|
||||||
|
# Test suites are the names of subfolders of './test'.
|
||||||
|
TEST_SUITE := $(shell find ./test/* -type d -prune -exec basename {} \;)
|
||||||
|
|
||||||
|
|
||||||
|
# Default target (by virtue of being the first non '.'-prefixed in the file).
|
||||||
|
.PHONY: _no-target-specified
|
||||||
|
_no-target-specified:
|
||||||
|
$(error Please specify the target to make - `make list` shows targets. Alternatively, use `npm test` to run the default tests; `npm run` shows all tests)
|
||||||
|
|
||||||
|
# Lists all targets defined in this makefile.
|
||||||
|
.PHONY: list
|
||||||
|
list:
|
||||||
|
@$(MAKE) -pRrn : -f $(MAKEFILE_LIST) 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | sort
|
||||||
|
|
||||||
|
# Set of test-<shell> targets; each runs the specified test suites for a single shell.
|
||||||
|
# Note that preexisting NVM_* variables are unset to avoid interfering with tests, except when running the Travis tests (where NVM_DIR must be passed in and the env. is assumed to be pristine).
|
||||||
|
.PHONY: $(SHELL_TARGETS)
|
||||||
|
$(SHELL_TARGETS):
|
||||||
|
@shell='$@'; shell=$${shell##*-}; which "$$shell" >/dev/null || { printf '\033[0;31m%s\033[0m\n' "WARNING: Cannot test with shell '$$shell': not found." >&2; exit 0; } && \
|
||||||
|
printf '\n\033[0;34m%s\033[0m\n' "Running tests in $$shell"; \
|
||||||
|
[ -z "$$TRAVIS_BUILD_DIR" ] && for v in $$(set | awk -F'=' '$$1 ~ "^NVM_" { print $$1 }'); do unset $$v; done && unset v; \
|
||||||
|
for suite in $(TEST_SUITE); do $(URCHIN) -f -s $$shell test/$$suite || exit; done
|
||||||
|
|
||||||
|
# All-tests target: invokes the specified test suites for ALL shells defined in $(SHELLS).
|
||||||
|
.PHONY: test
|
||||||
|
test: $(SHELL_TARGETS)
|
||||||
|
|
||||||
|
.PHONY: _ensure-tag
|
||||||
|
_ensure-tag:
|
||||||
|
ifndef TAG
|
||||||
|
$(error Please invoke with `make TAG=<new-version> release`, where <new-version> is either an increment specifier (patch, minor, major, prepatch, preminor, premajor, prerelease), or an explicit major.minor.patch version number)
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Ensures that the git workspace is clean.
|
||||||
|
.PHONY: _ensure-clean
|
||||||
|
_ensure-clean:
|
||||||
|
@[ -z "$$(git status --porcelain --untracked-files=no || echo err)" ] || { echo "Workspace is not clean; please commit changes first." >&2; exit 2; }
|
||||||
|
|
||||||
|
# Makes a release; invoke with `make TAG=<versionOrIncrementSpec> release`.
|
||||||
|
.PHONY: release
|
||||||
|
release: _ensure-tag _ensure-clean
|
||||||
|
@old_ver=`git describe --abbrev=0 --tags --match 'v[0-9]*.[0-9]*.[0-9]*'` || { echo "Failed to determine current version." >&2; exit 1; }; old_ver=$${old_ver#v}; \
|
||||||
|
new_ver=`echo "$(TAG)" | sed 's/^v//'`; new_ver=$${new_ver:-patch}; \
|
||||||
|
if printf "$$new_ver" | grep -q '^[0-9]'; then \
|
||||||
|
semver "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be major.minor.patch' >&2; exit 2; }; \
|
||||||
|
semver -r "> $$old_ver" "$$new_ver" >/dev/null || { echo 'Invalid version number specified: $(TAG) - must be HIGHER than current one.' >&2; exit 2; } \
|
||||||
|
else \
|
||||||
|
new_ver=`semver -i "$$new_ver" "$$old_ver"` || { echo 'Invalid version-increment specifier: $(TAG)' >&2; exit 2; } \
|
||||||
|
fi; \
|
||||||
|
printf "=== Bumping version **$$old_ver** to **$$new_ver** before committing and tagging:\n=== TYPE 'proceed' TO PROCEED, anything else to abort: " && read response && [ "$$response" = 'proceed' ] || { echo 'Aborted.' >&2; exit 2; }; \
|
||||||
|
replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \
|
||||||
|
git commit -m "v$$new_ver" $(VERSIONED_FILES) && \
|
||||||
|
git tag -a -m "v$$new_ver" "v$$new_ver"
|
@ -0,0 +1,266 @@
|
|||||||
|
# Node Version Manager [![Build Status](https://travis-ci.org/creationix/nvm.svg?branch=master)][3]
|
||||||
|
|
||||||
|
## 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.
|
||||||
|
|
||||||
|
Note: `nvm` does not support Windows (see [#284](https://github.com/creationix/nvm/issues/284)). Three alternatives exist, which are neither supported nor developed by us:
|
||||||
|
- [nvm-windows](https://github.com/coreybutler/nvm-windows)
|
||||||
|
- [nodist](https://github.com/marcelklehr/nodist)
|
||||||
|
|
||||||
|
Note: `nvm` does not support [Fish] either (see [#303](https://github.com/creationix/nvm/issues/303)). Alternatives exist, which are neither supported nor developed by us:
|
||||||
|
- [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
|
||||||
|
- [bass](https://github.com/edc/bass) allows to use utilities written for Bash 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 OSX, if you do not have XCode installed and you do not wish to download the ~4.3GB file, you can install the `Command Line Tools`. You can check out this blog post on how to just that:
|
||||||
|
- [How to Install Command Line Tools in OS X Mavericks & Yosemite (Without Xcode)](http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/)
|
||||||
|
|
||||||
|
Homebrew installation is not supported.
|
||||||
|
|
||||||
|
### Install script
|
||||||
|
|
||||||
|
To install or update nvm, you can use the [install script][2] using cURL:
|
||||||
|
|
||||||
|
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash
|
||||||
|
|
||||||
|
or Wget:
|
||||||
|
|
||||||
|
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/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>
|
||||||
|
|
||||||
|
You can customize the install source, directory and profile using the `NVM_SOURCE`, `NVM_DIR`, and `PROFILE` variables.
|
||||||
|
Eg: `curl ... | NVM_DIR="path/to/nvm" bash`
|
||||||
|
|
||||||
|
<sub>*NB. The installer can use `git`, `curl`, or `wget` to download `nvm`, whatever is available.*</sub>
|
||||||
|
|
||||||
|
### Manual install
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
. ~/.nvm/nvm.sh
|
||||||
|
|
||||||
|
Add these lines to your `~/.bashrc`, `~/.profile`, or `~/.zshrc` file to have it automatically sourced upon login:
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
cd "$NVM_DIR" && git pull origin master && git checkout `git describe --abbrev=0 --tags`
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
You can create an `.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.
|
||||||
|
|
||||||
|
To download, compile, and install the latest v5.0.x release of node, do this:
|
||||||
|
|
||||||
|
nvm install 5.0
|
||||||
|
|
||||||
|
And then in any new shell just use the installed version:
|
||||||
|
|
||||||
|
nvm use 5.0
|
||||||
|
|
||||||
|
Or you can just run it:
|
||||||
|
|
||||||
|
nvm run 5.0 --version
|
||||||
|
|
||||||
|
Or, you can run any arbitrary command in a subshell with the desired version of node:
|
||||||
|
|
||||||
|
nvm exec 4.2 node --version
|
||||||
|
|
||||||
|
You can also get the path to the executable to where it was installed:
|
||||||
|
|
||||||
|
nvm which 5.0
|
||||||
|
|
||||||
|
In place of a version pointer like "0.10" or "5.0" or "4.2.1", you can use the following special default aliases with `nvm install`, `nvm use`, `nvm run`, `nvm exec`, `nvm which`, etc:
|
||||||
|
|
||||||
|
- `node`: this installs the latest version of [`node`](https://nodejs.org/en/)
|
||||||
|
- `iojs`: this installs the latest version of [`io.js`](https://iojs.org/en/)
|
||||||
|
- `stable`: this alias is deprecated, and only truly applies to `node` `v0.12` and earlier. Currently, this is an alias for `node`.
|
||||||
|
- `unstable`: this alias points to `node` `v0.11` - the last "unstable" node release, since post-1.0, all node versions are stable. (in semver, versions communicate breakage, not stability).
|
||||||
|
|
||||||
|
If you want to install a new version of Node.js and migrate npm packages from a previous version:
|
||||||
|
|
||||||
|
nvm install node --reinstall-packages-from=node
|
||||||
|
|
||||||
|
This will first use "nvm version node" to identify the current version you're migrating packages from. Then it resolves the new version to install from the remote server and installs it. Lastly, it runs "nvm reinstall-packages" to reinstall the npm packages from your prior version of Node to the new one.
|
||||||
|
|
||||||
|
You can also install and migrate npm packages from specific versions of Node like this:
|
||||||
|
|
||||||
|
nvm install v5.0 --reinstall-packages-from=4.2
|
||||||
|
nvm install v4.2 --reinstall-packages-from=iojs
|
||||||
|
|
||||||
|
If you want to install [io.js](https://github.com/iojs/io.js/):
|
||||||
|
|
||||||
|
nvm install iojs
|
||||||
|
|
||||||
|
If you want to install a new version of io.js and migrate npm packages from a previous version:
|
||||||
|
|
||||||
|
nvm install iojs --reinstall-packages-from=iojs
|
||||||
|
|
||||||
|
The same guidelines mentioned for migrating npm packages in Node.js are applicable to io.js.
|
||||||
|
|
||||||
|
If you want to use the system-installed version of node, you can use the special default alias "system":
|
||||||
|
|
||||||
|
nvm use system
|
||||||
|
nvm run system --version
|
||||||
|
|
||||||
|
If you want to see what versions are installed:
|
||||||
|
|
||||||
|
nvm ls
|
||||||
|
|
||||||
|
If you want to see what versions are available to install:
|
||||||
|
|
||||||
|
nvm ls-remote
|
||||||
|
|
||||||
|
To restore your PATH, you can deactivate it.
|
||||||
|
|
||||||
|
nvm deactivate
|
||||||
|
|
||||||
|
To set a default Node version to be used in any new shell, use the alias 'default':
|
||||||
|
|
||||||
|
nvm alias default node
|
||||||
|
|
||||||
|
To use a mirror of the node binaries, set `$NVM_NODEJS_ORG_MIRROR`:
|
||||||
|
|
||||||
|
export NVM_NODEJS_ORG_MIRROR=https://nodejs.org/dist
|
||||||
|
nvm install node
|
||||||
|
|
||||||
|
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`:
|
||||||
|
|
||||||
|
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 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.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
nvm is released under the MIT license.
|
||||||
|
|
||||||
|
|
||||||
|
Copyright (C) 2010-2016 Tim Caswell
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
## Running tests
|
||||||
|
Tests are written in [Urchin]. Install Urchin (and other dependencies) like so:
|
||||||
|
|
||||||
|
npm install
|
||||||
|
|
||||||
|
There are slow tests and fast tests. The slow tests do things like install node
|
||||||
|
and check that the right versions are used. The fast tests fake this to test
|
||||||
|
things like aliases and uninstalling. From the root of the nvm git repository,
|
||||||
|
run the fast tests like this.
|
||||||
|
|
||||||
|
npm run test/fast
|
||||||
|
|
||||||
|
Run the slow tests like this.
|
||||||
|
|
||||||
|
npm run test/slow
|
||||||
|
|
||||||
|
Run all of the tests like this
|
||||||
|
|
||||||
|
npm test
|
||||||
|
|
||||||
|
Nota bene: Avoid running nvm while the tests are running.
|
||||||
|
|
||||||
|
## Bash completion
|
||||||
|
|
||||||
|
To activate, you need to source `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`).
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
nvm
|
||||||
|
|
||||||
|
$ nvm [tab][tab]
|
||||||
|
alias deactivate install ls run unload
|
||||||
|
clear-cache exec list ls-remote unalias use
|
||||||
|
current help list-remote reinstall-packages uninstall version
|
||||||
|
|
||||||
|
nvm alias
|
||||||
|
|
||||||
|
$ nvm alias [tab][tab]
|
||||||
|
default
|
||||||
|
|
||||||
|
$ nvm alias my_alias [tab][tab]
|
||||||
|
v0.6.21 v0.8.26 v0.10.28
|
||||||
|
|
||||||
|
nvm use
|
||||||
|
|
||||||
|
$ nvm use [tab][tab]
|
||||||
|
my_alias default v0.6.21 v0.8.26 v0.10.28
|
||||||
|
|
||||||
|
nvm uninstall
|
||||||
|
|
||||||
|
$ nvm uninstall [tab][tab]
|
||||||
|
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`
|
||||||
|
```
|
||||||
|
prefix='some/path'
|
||||||
|
```
|
||||||
|
Environment Variables:
|
||||||
|
```
|
||||||
|
$NPM_CONFIG_PREFIX
|
||||||
|
$PREFIX
|
||||||
|
```
|
||||||
|
Shell settings:
|
||||||
|
```
|
||||||
|
set -e
|
||||||
|
```
|
||||||
|
|
||||||
|
## 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:
|
||||||
|
|
||||||
|
curl: (33) HTTP server doesn't seem to support byte ranges. Cannot resume.
|
||||||
|
|
||||||
|
Where's my 'sudo node'? Check out this link:
|
||||||
|
|
||||||
|
https://github.com/creationix/nvm/issues/43
|
||||||
|
|
||||||
|
On Arch Linux and other systems using python3 by default, before running *install* you need to
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
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
|
||||||
|
[2]: https://github.com/creationix/nvm/blob/v0.30.2/install.sh
|
||||||
|
[3]: https://travis-ci.org/creationix/nvm
|
||||||
|
[Urchin]: https://github.com/scraperwiki/urchin
|
||||||
|
[Fish]: http://fishshell.com
|
@ -0,0 +1,92 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# bash completion for Node Version Manager (NVM)
|
||||||
|
|
||||||
|
__nvm_generate_completion()
|
||||||
|
{
|
||||||
|
declare current_word
|
||||||
|
current_word="${COMP_WORDS[COMP_CWORD]}"
|
||||||
|
COMPREPLY=($(compgen -W "$1" -- "$current_word"))
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
__nvm_commands ()
|
||||||
|
{
|
||||||
|
declare current_word
|
||||||
|
declare command
|
||||||
|
|
||||||
|
current_word="${COMP_WORDS[COMP_CWORD]}"
|
||||||
|
|
||||||
|
COMMANDS='\
|
||||||
|
help install uninstall use run exec \
|
||||||
|
alias unalias reinstall-packages \
|
||||||
|
current list ls list-remote ls-remote \
|
||||||
|
clear-cache deactivate unload \
|
||||||
|
version which'
|
||||||
|
|
||||||
|
if [ ${#COMP_WORDS[@]} == 4 ]; then
|
||||||
|
|
||||||
|
command="${COMP_WORDS[COMP_CWORD-2]}"
|
||||||
|
case "${command}" in
|
||||||
|
alias) __nvm_installed_nodes ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
case "${current_word}" in
|
||||||
|
-*) __nvm_options ;;
|
||||||
|
*) __nvm_generate_completion "$COMMANDS" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
__nvm_options ()
|
||||||
|
{
|
||||||
|
OPTIONS=''
|
||||||
|
__nvm_generate_completion "$OPTIONS"
|
||||||
|
}
|
||||||
|
|
||||||
|
__nvm_installed_nodes ()
|
||||||
|
{
|
||||||
|
__nvm_generate_completion "$(nvm_ls) $(__nvm_aliases)"
|
||||||
|
}
|
||||||
|
|
||||||
|
__nvm_aliases ()
|
||||||
|
{
|
||||||
|
declare aliases
|
||||||
|
aliases=""
|
||||||
|
if [ -d $NVM_DIR/alias ]; then
|
||||||
|
aliases="`cd $NVM_DIR/alias && command ls`"
|
||||||
|
fi
|
||||||
|
echo "${aliases}"
|
||||||
|
}
|
||||||
|
|
||||||
|
__nvm_alias ()
|
||||||
|
{
|
||||||
|
__nvm_generate_completion "$(__nvm_aliases)"
|
||||||
|
}
|
||||||
|
|
||||||
|
__nvm ()
|
||||||
|
{
|
||||||
|
declare previous_word
|
||||||
|
previous_word="${COMP_WORDS[COMP_CWORD-1]}"
|
||||||
|
|
||||||
|
case "$previous_word" in
|
||||||
|
use|run|exec|ls|list|uninstall) __nvm_installed_nodes ;;
|
||||||
|
alias|unalias) __nvm_alias ;;
|
||||||
|
*) __nvm_commands ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# complete is a bash builtin, but recent versions of ZSH come with a function
|
||||||
|
# called bashcompinit that will create a complete in ZSH. If the user is in
|
||||||
|
# ZSH, load and run bashcompinit before calling the complete function.
|
||||||
|
if [[ -n ${ZSH_VERSION-} ]]; then
|
||||||
|
autoload -U +X bashcompinit && bashcompinit
|
||||||
|
fi
|
||||||
|
|
||||||
|
complete -o default -o nospace -F __nvm nvm
|
||||||
|
|
@ -0,0 +1,269 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
{ # this ensures the entire script is downloaded #
|
||||||
|
|
||||||
|
nvm_has() {
|
||||||
|
type "$1" > /dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -z "$NVM_DIR" ]; then
|
||||||
|
NVM_DIR="$HOME/.nvm"
|
||||||
|
fi
|
||||||
|
|
||||||
|
nvm_latest_version() {
|
||||||
|
echo "v0.30.2"
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Outputs the location to NVM depending on:
|
||||||
|
# * The availability of $NVM_SOURCE
|
||||||
|
# * The method used ("script" or "git" in the script, defaults to "git")
|
||||||
|
# NVM_SOURCE always takes precedence unless the method is "script-nvm-exec"
|
||||||
|
#
|
||||||
|
nvm_source() {
|
||||||
|
local NVM_METHOD
|
||||||
|
NVM_METHOD="$1"
|
||||||
|
local NVM_SOURCE_URL
|
||||||
|
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
|
||||||
|
NVM_SOURCE_URL="https://raw.githubusercontent.com/creationix/nvm/$(nvm_latest_version)/nvm.sh"
|
||||||
|
elif [ "_$NVM_METHOD" = "_git" ] || [ -z "$NVM_METHOD" ]; then
|
||||||
|
NVM_SOURCE_URL="https://github.com/creationix/nvm.git"
|
||||||
|
else
|
||||||
|
echo >&2 "Unexpected value \"$NVM_METHOD\" for \$NVM_METHOD"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "$NVM_SOURCE_URL"
|
||||||
|
}
|
||||||
|
|
||||||
|
nvm_download() {
|
||||||
|
if nvm_has "curl"; then
|
||||||
|
curl -q $*
|
||||||
|
elif nvm_has "wget"; then
|
||||||
|
# Emulate curl with wget
|
||||||
|
ARGS=$(echo "$*" | command sed -e 's/--progress-bar /--progress=bar /' \
|
||||||
|
-e 's/-L //' \
|
||||||
|
-e 's/-I /--server-response /' \
|
||||||
|
-e 's/-s /-q /' \
|
||||||
|
-e 's/-o /-O /' \
|
||||||
|
-e 's/-C - /-c /')
|
||||||
|
wget $ARGS
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
install_nvm_from_git() {
|
||||||
|
if [ -d "$NVM_DIR/.git" ]; then
|
||||||
|
echo "=> nvm is already installed in $NVM_DIR, trying to update using git"
|
||||||
|
printf "\r=> "
|
||||||
|
cd "$NVM_DIR" && (command git fetch 2> /dev/null || {
|
||||||
|
echo >&2 "Failed to update nvm, run 'git fetch' in $NVM_DIR yourself." && exit 1
|
||||||
|
})
|
||||||
|
else
|
||||||
|
# Cloning to $NVM_DIR
|
||||||
|
echo "=> Downloading nvm from git to '$NVM_DIR'"
|
||||||
|
printf "\r=> "
|
||||||
|
mkdir -p "$NVM_DIR"
|
||||||
|
command git clone "$(nvm_source git)" "$NVM_DIR"
|
||||||
|
fi
|
||||||
|
cd "$NVM_DIR" && command git checkout --quiet $(nvm_latest_version)
|
||||||
|
if [ ! -z "$(cd "$NVM_DIR" && git show-ref refs/heads/master)" ]; then
|
||||||
|
if git branch --quiet 2>/dev/null; then
|
||||||
|
cd "$NVM_DIR" && command git branch --quiet -D master >/dev/null 2>&1
|
||||||
|
else
|
||||||
|
echo >&2 "Your version of git is out of date. Please update it!"
|
||||||
|
cd "$NVM_DIR" && command git branch -D master >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
install_nvm_as_script() {
|
||||||
|
local NVM_SOURCE_LOCAL
|
||||||
|
NVM_SOURCE_LOCAL=$(nvm_source script)
|
||||||
|
local NVM_EXEC_SOURCE
|
||||||
|
NVM_EXEC_SOURCE=$(nvm_source script-nvm-exec)
|
||||||
|
|
||||||
|
# Downloading to $NVM_DIR
|
||||||
|
mkdir -p "$NVM_DIR"
|
||||||
|
if [ -f "$NVM_DIR/nvm.sh" ]; then
|
||||||
|
echo "=> nvm is already installed in $NVM_DIR, trying to update the script"
|
||||||
|
else
|
||||||
|
echo "=> Downloading nvm as script to '$NVM_DIR'"
|
||||||
|
fi
|
||||||
|
nvm_download -s "$NVM_SOURCE_LOCAL" -o "$NVM_DIR/nvm.sh" || {
|
||||||
|
echo >&2 "Failed to download '$NVM_SOURCE_LOCAL'"
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
nvm_download -s "$NVM_EXEC_SOURCE" -o "$NVM_DIR/nvm-exec" || {
|
||||||
|
echo >&2 "Failed to download '$NVM_EXEC_SOURCE'"
|
||||||
|
return 2
|
||||||
|
}
|
||||||
|
chmod a+x "$NVM_DIR/nvm-exec" || {
|
||||||
|
echo >&2 "Failed to mark '$NVM_DIR/nvm-exec' as executable"
|
||||||
|
return 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Detect profile file if not specified as environment variable
|
||||||
|
# (eg: PROFILE=~/.myprofile)
|
||||||
|
# The echo'ed path is guaranteed to be an existing file
|
||||||
|
# Otherwise, an empty string is returned
|
||||||
|
#
|
||||||
|
nvm_detect_profile() {
|
||||||
|
if [ -n "$PROFILE" -a -f "$PROFILE" ]; then
|
||||||
|
echo "$PROFILE"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
local DETECTED_PROFILE
|
||||||
|
DETECTED_PROFILE=''
|
||||||
|
local SHELLTYPE
|
||||||
|
SHELLTYPE="$(basename /$SHELL)"
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
nvm_do_install() {
|
||||||
|
if [ -z "$METHOD" ]; then
|
||||||
|
# Autodetect install method
|
||||||
|
if nvm_has "git"; then
|
||||||
|
install_nvm_from_git
|
||||||
|
elif nvm_has "nvm_download"; then
|
||||||
|
install_nvm_as_script
|
||||||
|
else
|
||||||
|
echo >&2 "You need git, curl, or wget to install nvm"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
elif [ "~$METHOD" = "~git" ]; then
|
||||||
|
if ! nvm_has "git"; then
|
||||||
|
echo >&2 "You need git to install nvm"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
install_nvm_from_git
|
||||||
|
elif [ "~$METHOD" = "~script" ]; then
|
||||||
|
if ! nvm_has "nvm_download"; then
|
||||||
|
echo >&2 "You need curl or wget to install nvm"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
install_nvm_as_script
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
|
||||||
|
local NVM_PROFILE
|
||||||
|
NVM_PROFILE=$(nvm_detect_profile)
|
||||||
|
|
||||||
|
SOURCE_STR="\nexport NVM_DIR=\"$NVM_DIR\"\n[ -s \"\$NVM_DIR/nvm.sh\" ] && . \"\$NVM_DIR/nvm.sh\" # This loads nvm"
|
||||||
|
|
||||||
|
if [ -z "$NVM_PROFILE" ] ; then
|
||||||
|
echo "=> Profile not found. Tried $NVM_PROFILE (as defined in \$PROFILE), ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile."
|
||||||
|
echo "=> Create one of them and run this script again"
|
||||||
|
echo "=> Create it (touch $NVM_PROFILE) and run this script again"
|
||||||
|
echo " OR"
|
||||||
|
echo "=> Append the following lines to the correct file yourself:"
|
||||||
|
printf "$SOURCE_STR"
|
||||||
|
echo
|
||||||
|
else
|
||||||
|
if ! command grep -qc '/nvm.sh' "$NVM_PROFILE"; then
|
||||||
|
echo "=> Appending source string to $NVM_PROFILE"
|
||||||
|
printf "$SOURCE_STR\n" >> "$NVM_PROFILE"
|
||||||
|
else
|
||||||
|
echo "=> Source string already in $NVM_PROFILE"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
nvm_check_global_modules
|
||||||
|
|
||||||
|
echo "=> Close and reopen your terminal to start using nvm"
|
||||||
|
nvm_reset
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Unsets the various functions defined
|
||||||
|
# during the execution of the install script
|
||||||
|
#
|
||||||
|
nvm_reset() {
|
||||||
|
unset -f nvm_reset nvm_has nvm_latest_version \
|
||||||
|
nvm_source nvm_download install_nvm_as_script install_nvm_from_git \
|
||||||
|
nvm_detect_profile nvm_check_global_modules nvm_do_install
|
||||||
|
}
|
||||||
|
|
||||||
|
[ "_$NVM_ENV" = "_testing" ] || nvm_do_install
|
||||||
|
|
||||||
|
} # this ensures the entire script is downloaded #
|
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DIR="$(command cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
. "$DIR/nvm.sh" --no-use
|
||||||
|
|
||||||
|
if [ -n "$NODE_VERSION" ]; then
|
||||||
|
nvm use $NODE_VERSION > /dev/null || (echo "NODE_VERSION not set" >&2 && exit 127)
|
||||||
|
else
|
||||||
|
nvm use > /dev/null || (echo "No .nvmrc file found" >&2 && exit 127)
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$@"
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"name": "nvm",
|
||||||
|
"version": "0.30.2",
|
||||||
|
"description": "Node Version Manager - Simple bash script to manage multiple active node.js versions",
|
||||||
|
"directories": {
|
||||||
|
"test": "test"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make 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/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/sourcing": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=sourcing test-$shell"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git://github.com/creationix/nvm.git"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"nvm",
|
||||||
|
"node",
|
||||||
|
"iojs",
|
||||||
|
"version",
|
||||||
|
"manager"
|
||||||
|
],
|
||||||
|
"author": "Tim Caswell <tim@creationix.com>",
|
||||||
|
"license": "MIT",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/creationix/nvm/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/creationix/nvm",
|
||||||
|
"devDependencies": {
|
||||||
|
"replace": "^0.3.0",
|
||||||
|
"semver": "^5.0.1",
|
||||||
|
"urchin": "^0.0.5"
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
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'
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
if [ -n "$ZSH_VERSION" ]; then
|
||||||
|
# set clobber option in order to test that this does not produce any
|
||||||
|
# incompatibilities
|
||||||
|
setopt noclobber
|
||||||
|
fi
|
||||||
|
|
||||||
|
nvm alias test-stable-1 0.0.2
|
||||||
|
|
||||||
|
nvm alias test-stable-1 | \grep -e "test-stable-1 -> 0.0.2 (-> v0.0.2)" \
|
||||||
|
|| die "nvm alias test-stable-1 0.0.2 did not set test-stable-1 to 0.0.2"
|
||||||
|
|
||||||
|
nvm alias test-stable-1 0.0.1
|
||||||
|
|
||||||
|
nvm alias test-stable-1 | \grep -e "test-stable-1 -> 0.0.1 (-> v0.0.1)" \
|
||||||
|
|| die "nvm alias test-stable-1 0.0.1 did not set test-stable-1 to 0.0.1"
|
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
[ $(nvm alias test-stable-1 | wc -l) = '2' ]
|
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
NVM_ALIAS_OUTPUT=$(nvm alias)
|
||||||
|
|
||||||
|
EXPECTED_STABLE="$(nvm_print_implicit_alias local stable)"
|
||||||
|
STABLE_VERSION="$(nvm_version "$EXPECTED_STABLE")"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e "^stable -> $EXPECTED_STABLE (-> $STABLE_VERSION) (default)$" \
|
||||||
|
|| die "nvm alias did not contain the default local stable node version"
|
||||||
|
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e "^node -> stable (-> $STABLE_VERSION) (default)$" \
|
||||||
|
|| die "nvm alias did not contain the default local stable node version under 'node'"
|
||||||
|
|
||||||
|
EXPECTED_UNSTABLE="$(nvm_print_implicit_alias local unstable)"
|
||||||
|
UNSTABLE_VERSION="$(nvm_version "$EXPECTED_UNSTABLE")"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e "^unstable -> $EXPECTED_UNSTABLE (-> $UNSTABLE_VERSION) (default)$" \
|
||||||
|
|| die "nvm alias did not contain the default local unstable node version"
|
||||||
|
|
||||||
|
EXPECTED_IOJS="$(nvm_print_implicit_alias local iojs)"
|
||||||
|
IOJS_VERSION="$(nvm_version "$EXPECTED_IOJS")"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e "^iojs -> $EXPECTED_IOJS (-> $IOJS_VERSION) (default)$" \
|
||||||
|
|| die "nvm alias did not contain the default local iojs version"
|
||||||
|
|
@ -0,0 +1,49 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
die () { echo $@ ; cleanup ; exit 1; }
|
||||||
|
cleanup () {
|
||||||
|
rm -rf ../../../alias/stable
|
||||||
|
rm -rf ../../../alias/unstable
|
||||||
|
rm -rf ../../../alias/node
|
||||||
|
rm -rf ../../../alias/iojs
|
||||||
|
rm -rf ../../../v0.8.1
|
||||||
|
rm -rf ../../../v0.9.1
|
||||||
|
rm -rf ../../../versions/io.js/v0.2.1
|
||||||
|
}
|
||||||
|
|
||||||
|
mkdir ../../../v0.8.1
|
||||||
|
mkdir ../../../v0.9.1
|
||||||
|
mkdir -p ../../../versions/io.js/v0.2.1
|
||||||
|
|
||||||
|
EXPECTED_STABLE="$(nvm_print_implicit_alias local stable)"
|
||||||
|
STABLE_VERSION="$(nvm_version "$EXPECTED_STABLE")"
|
||||||
|
|
||||||
|
EXPECTED_UNSTABLE="$(nvm_print_implicit_alias local unstable)"
|
||||||
|
UNSTABLE_VERSION="$(nvm_version "$EXPECTED_UNSTABLE")"
|
||||||
|
|
||||||
|
[ "_$STABLE_VERSION" != "_$UNSTABLE_VERSION" ] \
|
||||||
|
|| die "stable and unstable versions are the same!"
|
||||||
|
|
||||||
|
nvm alias stable "$EXPECTED_UNSTABLE"
|
||||||
|
nvm alias unstable "$EXPECTED_STABLE"
|
||||||
|
nvm alias node stable
|
||||||
|
nvm alias iojs unstable
|
||||||
|
|
||||||
|
NVM_ALIAS_OUTPUT=$(nvm alias)
|
||||||
|
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | command grep -e "^stable -> $EXPECTED_UNSTABLE (-> $UNSTABLE_VERSION)$" \
|
||||||
|
|| die "nvm alias did not contain the overridden 'stable' alias"
|
||||||
|
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | command grep -e "^unstable -> $EXPECTED_STABLE (-> $STABLE_VERSION)$" \
|
||||||
|
|| die "nvm alias did not contain the overridden 'unstable' alias"
|
||||||
|
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | command grep -e "^node -> stable (-> $UNSTABLE_VERSION)$" \
|
||||||
|
|| die "nvm alias did not contain the overridden 'node' alias"
|
||||||
|
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | command grep -e "^iojs -> unstable (-> $STABLE_VERSION)$" \
|
||||||
|
|| die "nvm alias did not contain the overridden 'iojs' alias"
|
||||||
|
|
||||||
|
cleanup
|
||||||
|
|
@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
NVM_ALIAS_OUTPUT=$(nvm alias)
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-stable-1 -> 0.0.1 (-> v0.0.1)$' \
|
||||||
|
|| die "did not find test-stable-1 alias"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-stable-2 -> 0.0.2 (-> v0.0.2)$' \
|
||||||
|
|| die "did not find test-stable-2 alias"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-stable-3 -> 0.0.3 (-> v0.0.3)$' \
|
||||||
|
|| die "did not find test-stable-3 alias"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-stable-4 -> 0.0.4 (-> v0.0.4)$' \
|
||||||
|
|| die "did not find test-stable-4 alias"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-stable-5 -> 0.0.5 (-> v0.0.5)$' \
|
||||||
|
|| die "did not find test-stable-5 alias"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-stable-6 -> 0.0.6 (-> v0.0.6)$' \
|
||||||
|
|| die "did not find test-stable-6 alias"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-stable-7 -> 0.0.7 (-> v0.0.7)$' \
|
||||||
|
|| die "did not find test-stable-7 alias"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-stable-8 -> 0.0.8 (-> v0.0.8)$' \
|
||||||
|
|| die "did not find test-stable-8 alias"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-stable-9 -> 0.0.9 (-> v0.0.9)$' \
|
||||||
|
|| die "did not find test-stable-9 alias"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-stable-10 -> 0.0.10 (-> v0.0.10)$' \
|
||||||
|
|| die "did not find test-stable-10 alias"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-unstable-1 -> 0.1.1 (-> v0.1.1)$' \
|
||||||
|
|| die "did not find test-unstable-1 alias"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-unstable-2 -> 0.1.2 (-> v0.1.2)$' \
|
||||||
|
|| die "did not find test-unstable-2 alias"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-unstable-3 -> 0.1.3 (-> v0.1.3)$' \
|
||||||
|
|| die "did not find test-unstable-3 alias"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-unstable-4 -> 0.1.4 (-> v0.1.4)$' \
|
||||||
|
|| die "did not find test-unstable-4 alias"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-unstable-5 -> 0.1.5 (-> v0.1.5)$' \
|
||||||
|
|| die "did not find test-unstable-5 alias"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-unstable-6 -> 0.1.6 (-> v0.1.6)$' \
|
||||||
|
|| die "did not find test-unstable-6 alias"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-unstable-7 -> 0.1.7 (-> v0.1.7)$' \
|
||||||
|
|| die "did not find test-unstable-7 alias"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-unstable-8 -> 0.1.8 (-> v0.1.8)$' \
|
||||||
|
|| die "did not find test-unstable-8 alias"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-unstable-9 -> 0.1.9 (-> v0.1.9)$' \
|
||||||
|
|| die "did not find test-unstable-9 alias"
|
||||||
|
echo "$NVM_ALIAS_OUTPUT" | \grep -e '^test-unstable-10 -> 0.1.10 (-> v0.1.10)$' \
|
||||||
|
|| die "did not find test-unstable-10 alias"
|
||||||
|
|
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../../nvm.sh
|
||||||
|
|
||||||
|
ALIAS="$(nvm_resolve_alias loopback)"
|
||||||
|
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_alias loopback was not ∞; got $ALIAS"
|
||||||
|
OUTPUT="$(nvm alias loopback)"
|
||||||
|
EXPECTED_OUTPUT="loopback -> loopback (-> ∞)"
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias loopback was not $EXPECTED_OUTPUT; got $OUTPUT"
|
||||||
|
|
||||||
|
ALIAS="$(nvm_resolve_alias one)"
|
||||||
|
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_alias one was not ∞; got $ALIAS"
|
||||||
|
OUTPUT="$(nvm alias one)"
|
||||||
|
EXPECTED_OUTPUT="one -> two (-> ∞)"
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias one was not $EXPECTED_OUTPUT; got $OUTPUT"
|
||||||
|
|
||||||
|
ALIAS="$(nvm_resolve_alias two)"
|
||||||
|
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_alias two was not ∞; got $ALIAS"
|
||||||
|
OUTPUT="$(nvm alias two)"
|
||||||
|
EXPECTED_OUTPUT="two -> three (-> ∞)"
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias two was not $EXPECTED_OUTPUT; got $OUTPUT"
|
||||||
|
|
||||||
|
ALIAS="$(nvm_resolve_alias three)"
|
||||||
|
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_alias three was not ∞; got $ALIAS"
|
||||||
|
OUTPUT="$(nvm alias three)"
|
||||||
|
EXPECTED_OUTPUT="three -> one (-> ∞)"
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias three was not $EXPECTED_OUTPUT; got $OUTPUT"
|
||||||
|
|
||||||
|
ALIAS="$(nvm_resolve_alias four)"
|
||||||
|
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_alias four was not ∞; got $ALIAS"
|
||||||
|
OUTPUT="$(nvm alias four)"
|
||||||
|
EXPECTED_OUTPUT="four -> two (-> ∞)"
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias four was not $EXPECTED_OUTPUT; got $OUTPUT"
|
||||||
|
|
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../../nvm.sh
|
||||||
|
|
||||||
|
ALIAS="$(nvm_resolve_local_alias loopback)"
|
||||||
|
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_local_alias loopback was not ∞; got $ALIAS"
|
||||||
|
OUTPUT="$(nvm alias loopback)"
|
||||||
|
EXPECTED_OUTPUT="loopback -> loopback (-> ∞)"
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias loopback was not $EXPECTED_OUTPUT; got $OUTPUT"
|
||||||
|
|
||||||
|
ALIAS="$(nvm_resolve_local_alias one)"
|
||||||
|
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_local_alias one was not ∞; got $ALIAS"
|
||||||
|
OUTPUT="$(nvm alias one)"
|
||||||
|
EXPECTED_OUTPUT="one -> two (-> ∞)"
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias one was not $EXPECTED_OUTPUT; got $OUTPUT"
|
||||||
|
|
||||||
|
ALIAS="$(nvm_resolve_local_alias two)"
|
||||||
|
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_local_alias two was not ∞; got $ALIAS"
|
||||||
|
OUTPUT="$(nvm alias two)"
|
||||||
|
EXPECTED_OUTPUT="two -> three (-> ∞)"
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias two was not $EXPECTED_OUTPUT; got $OUTPUT"
|
||||||
|
|
||||||
|
ALIAS="$(nvm_resolve_local_alias three)"
|
||||||
|
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_local_alias three was not ∞; got $ALIAS"
|
||||||
|
OUTPUT="$(nvm alias three)"
|
||||||
|
EXPECTED_OUTPUT="three -> one (-> ∞)"
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias three was not $EXPECTED_OUTPUT; got $OUTPUT"
|
||||||
|
|
||||||
|
ALIAS="$(nvm_resolve_local_alias four)"
|
||||||
|
[ "_$ALIAS" = "_∞" ] || die "nvm_resolve_local_alias four was not ∞; got $ALIAS"
|
||||||
|
OUTPUT="$(nvm alias four)"
|
||||||
|
EXPECTED_OUTPUT="four -> two (-> ∞)"
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm alias four was not $EXPECTED_OUTPUT; got $OUTPUT"
|
||||||
|
|
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo loopback > ../../../../alias/loopback
|
||||||
|
|
||||||
|
echo two > ../../../../alias/one
|
||||||
|
echo three > ../../../../alias/two
|
||||||
|
echo one > ../../../../alias/three
|
||||||
|
|
||||||
|
echo two > ../../../../alias/four
|
||||||
|
|
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
rm -f ../../../../alias/loopback
|
||||||
|
|
||||||
|
rm -f ../../../../alias/one
|
||||||
|
rm -f ../../../../alias/two
|
||||||
|
rm -f ../../../../alias/three
|
||||||
|
|
||||||
|
rm -f ../../../../alias/four
|
||||||
|
|
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/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="$?"
|
||||||
|
|
||||||
|
[ "_$OUTPUT" = "_$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"
|
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
EXIT_CODE=$(nvm_resolve_alias ; echo $?)
|
||||||
|
[ $EXIT_CODE = "1" ] || die "nvm_resolve_alias without an argument did not return 1; got $EXIT_CODE"
|
||||||
|
|
||||||
|
for i in $(seq 1 10)
|
||||||
|
do
|
||||||
|
STABLE_ALIAS="$(nvm_resolve_alias test-stable-$i)"
|
||||||
|
[ "_$STABLE_ALIAS" = "_v0.0.$i" ] \
|
||||||
|
|| die "'nvm_resolve_alias test-stable-$i' was not v0.0.$i; got $STABLE_ALIAS"
|
||||||
|
UNSTABLE_ALIAS="$(nvm_resolve_alias test-unstable-$i)"
|
||||||
|
[ "_$UNSTABLE_ALIAS" = "_v0.1.$i" ] \
|
||||||
|
|| die "'nvm_resolve_alias test-unstable-$i' was not v0.1.$i; got $UNSTABLE_ALIAS"
|
||||||
|
done
|
||||||
|
|
||||||
|
EXIT_CODE=$(nvm_resolve_alias nonexistent ; echo $?)
|
||||||
|
[ $EXIT_CODE = "2" ] || die "'nvm_resolve_alias nonexistent' did not return 2; got $EXIT_CODE"
|
||||||
|
|
||||||
|
STABLE="$(nvm_resolve_alias 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" = "_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"
|
@ -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"
|
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
for i in $(seq 1 10)
|
||||||
|
do
|
||||||
|
echo 0.0.$i > ../../../alias/test-stable-$i
|
||||||
|
mkdir -p ../../../v0.0.$i
|
||||||
|
echo 0.1.$i > ../../../alias/test-unstable-$i
|
||||||
|
mkdir -p ../../../v0.1.$i
|
||||||
|
echo 0.2.$i > ../../../alias/test-iojs-$i
|
||||||
|
mkdir -p ../../../versions/io.js/v0.2.$i
|
||||||
|
done
|
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
for i in $(seq 1 10)
|
||||||
|
do
|
||||||
|
rm -f "../../../alias/test-stable-$i"
|
||||||
|
rm -rf "../../../v0.0.$i"
|
||||||
|
rm -f "../../../alias/test-unstable-$i"
|
||||||
|
rm -rf "../../../v0.1.$i"
|
||||||
|
rm -rf "../../../alias/test-iojs-$i"
|
||||||
|
rm -rf "../../../versions/io.js/v0.2.$i"
|
||||||
|
done
|
||||||
|
|
||||||
|
rm -f "../../../alias/stable"
|
||||||
|
rm -f "../../../alias/unstable"
|
||||||
|
rm -f "../../../alias/node"
|
||||||
|
rm -f "../../../alias/iojs"
|
||||||
|
rm -f "../../../alias/default"
|
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
mkdir -p ../../../v0.0.2
|
||||||
|
mkdir -p ../../../v0.0.20
|
||||||
|
mkdir -p ../../../versions/node/v0.12.0
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
# The result should contain only the appropriate version numbers.
|
||||||
|
|
||||||
|
nvm which 0.0.2 || die "v0.0.2 not found"
|
||||||
|
NVM_BIN="$(nvm which 0.0.2)"
|
||||||
|
[ "_$NVM_BIN" = "_$(nvm_version_path v0.0.2)/bin/node" ] \
|
||||||
|
|| die "'nvm which 0.0.2' did not contain the correct path: got '$NVM_BIN'"
|
||||||
|
|
||||||
|
nvm which 0.0.20 || die "v0.0.20 not found"
|
||||||
|
NVM_BIN="$(nvm which 0.0.20)"
|
||||||
|
[ "_$NVM_BIN" = "_$(nvm_version_path v0.0.20)/bin/node" ] \
|
||||||
|
|| die "'nvm which 0.20.0' did not contain the correct path: got '$NVM_BIN'"
|
||||||
|
|
||||||
|
nvm which 0.12.0 || die "v0.0.20 not found"
|
||||||
|
NVM_BIN="$(nvm which 0.12.0)"
|
||||||
|
[ "_$NVM_BIN" = "_$(nvm_version_path v0.12.0)/bin/node" ] \
|
||||||
|
|| die "'nvm which 0.12.0' did not contain the correct path: got '$NVM_BIN'"
|
||||||
|
|
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
nvm which nonexistent_version
|
||||||
|
[ "_$?" = "_1" ]
|
@ -0,0 +1,3 @@
|
|||||||
|
rmdir ../../../v0.0.2 >/dev/null 2>&1
|
||||||
|
rmdir ../../../v0.0.20 >/dev/null 2>&1
|
||||||
|
rmdir ../../../v0.12.0 >/dev/null 2>&1
|
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
mkdir ../../../v0.0.2
|
||||||
|
mkdir ../../../v0.0.20
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
# The result should contain only the appropriate version numbers.
|
||||||
|
|
||||||
|
nvm ls 0.0.2 | grep 'v0.0.2' > /dev/null
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo '"nvm ls 0.0.2" contained v0.0.2'
|
||||||
|
fi
|
||||||
|
|
||||||
|
nvm ls 0.0.2 | grep 'v0.0.20' > /dev/null
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
die '"nvm ls 0.0.2" contained v0.0.20'
|
||||||
|
fi
|
||||||
|
|
@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
mkdir ../../../v0.1.3
|
||||||
|
mkdir ../../../v0.2.3
|
||||||
|
mkdir ../../../v0.20.3
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
# The result should contain only the appropriate version numbers.
|
||||||
|
|
||||||
|
nvm ls 0.1 | grep 'v0.2.3' > /dev/null
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo '"nvm ls 0.1" contained v0.2.3'
|
||||||
|
fi
|
||||||
|
|
||||||
|
nvm ls 0.1 | grep 'v0.20.3' > /dev/null
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
die '"nvm ls 0.1" contained v0.20.3'
|
||||||
|
fi
|
||||||
|
|
||||||
|
nvm ls 0.1 | grep 'v0.1.3' > /dev/null
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
die '"nvm ls 0.1" did not contain v0.1.3'
|
||||||
|
fi
|
||||||
|
|
||||||
|
nvm ls 0.2 | grep 'v0.2.3' > /dev/null
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
die '"nvm ls 0.2" did not contain v0.2.3'
|
||||||
|
fi
|
||||||
|
|
||||||
|
nvm ls 0.2 | grep 'v0.20.3' > /dev/null
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
die '"nvm ls 0.2" contained v0.20.3'
|
||||||
|
fi
|
||||||
|
|
||||||
|
nvm ls 0.2 | grep 'v0.2.3' > /dev/null
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
die '"nvm ls 0.2" did not contain v0.2.3'
|
||||||
|
fi
|
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
nvm ls nonexistent_version
|
||||||
|
[ "$?" = "3" ]
|
||||||
|
|
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
nvm ls io
|
||||||
|
[ "$?" = "3" ]
|
||||||
|
|
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
nvm ls node_
|
||||||
|
[ "$?" = "3" ]
|
||||||
|
|
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
mkdir ../../../v0.2.3
|
||||||
|
mkdir ../../../v0.3.3
|
||||||
|
|
||||||
|
EXPECTED_STABLE="$(nvm_print_implicit_alias local stable)"
|
||||||
|
STABLE_VERSION="$(nvm_version "$EXPECTED_STABLE")"
|
||||||
|
|
||||||
|
EXPECTED_UNSTABLE="$(nvm_print_implicit_alias local unstable)"
|
||||||
|
UNSTABLE_VERSION="$(nvm_version "$EXPECTED_UNSTABLE")"
|
||||||
|
|
||||||
|
nvm ls stable | \grep "$STABLE_VERSION" >/dev/null \
|
||||||
|
|| die "expected 'nvm ls stable' to give $STABLE_VERSION, got $(nvm ls stable)"
|
||||||
|
|
||||||
|
nvm ls unstable | \grep "$UNSTABLE_VERSION" >/dev/null \
|
||||||
|
|| die "expected 'nvm ls unstable' to give $UNSTABLE_VERSION, got $(nvm ls unstable)"
|
||||||
|
|
||||||
|
mkdir ../../../v0.1.2
|
||||||
|
nvm alias stable 0.1
|
||||||
|
|
||||||
|
nvm ls stable | \grep -v "$STABLE_VERSION" >/dev/null \
|
||||||
|
|| die "'nvm ls stable' contained $STABLE_VERSION instead of v0.1.2"
|
||||||
|
nvm ls stable | \grep v0.1.2 >/dev/null \
|
||||||
|
|| die "'nvm ls stable' did not contain v0.1.2"
|
||||||
|
|
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
mkdir -p ../../../v0.0.1
|
||||||
|
mkdir -p ../../../v0.0.3
|
||||||
|
mkdir -p ../../../v0.0.9
|
||||||
|
mkdir -p ../../../v0.3.1
|
||||||
|
mkdir -p ../../../v0.3.3
|
||||||
|
mkdir -p ../../../v0.3.9
|
||||||
|
|
||||||
|
nvm_has_system_node() { return 0; }
|
||||||
|
nvm ls system | grep system 2>&1 > /dev/null
|
||||||
|
[ $? -eq 0 ] || die '"nvm ls system" did not contain "system" when system node is present'
|
||||||
|
|
||||||
|
nvm_has_system_node() { return 1; }
|
||||||
|
nvm ls system | grep system 2>&1 > /dev/null
|
||||||
|
[ $? -ne 0 ] || die '"nvm ls system" contained "system" when system node is not present'
|
||||||
|
|
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
mkdir ../../../v0.0.1
|
||||||
|
mkdir ../../../v0.0.3
|
||||||
|
mkdir ../../../v0.0.9
|
||||||
|
mkdir ../../../v0.3.1
|
||||||
|
mkdir ../../../v0.3.3
|
||||||
|
mkdir ../../../v0.3.9
|
||||||
|
mkdir -p ../../../versions/node/v0.12.87
|
||||||
|
mkdir -p ../../../versions/node/v0.12.9
|
||||||
|
mkdir -p ../../../versions/io.js/v0.1.2
|
||||||
|
mkdir -p ../../../versions/io.js/v0.10.2
|
||||||
|
|
||||||
|
# The result should contain the version numbers.
|
||||||
|
nvm ls | grep v0.0.1 >/dev/null &&
|
||||||
|
nvm ls | grep v0.0.3 >/dev/null &&
|
||||||
|
nvm ls | grep v0.0.9 >/dev/null &&
|
||||||
|
nvm ls | grep v0.3.1 >/dev/null &&
|
||||||
|
nvm ls | grep v0.3.3 >/dev/null &&
|
||||||
|
nvm ls | grep v0.3.9 >/dev/null &&
|
||||||
|
nvm ls | grep v0.12.87 >/dev/null &&
|
||||||
|
nvm ls | grep iojs-v0.1.2 >/dev/null
|
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
mkdir ../../../v0.1.3
|
||||||
|
mkdir ../../../v0.2.3
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
[ -z `nvm ls | grep '^ *\.'` ]
|
||||||
|
# The result should contain only the appropriate version numbers.
|
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
mkdir ../../../v0.1.3
|
||||||
|
mkdir ../../../v0.2.3
|
||||||
|
mkdir -p ../../../versions/node
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
[ -z "$(nvm ls | \grep 'versions')" ]
|
||||||
|
# The result should contain only the appropriate version numbers.
|
||||||
|
|
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
mkdir -p ../../../v0.0.1
|
||||||
|
mkdir -p ../../../v0.0.3
|
||||||
|
mkdir -p ../../../v0.0.9
|
||||||
|
mkdir -p ../../../v0.3.1
|
||||||
|
mkdir -p ../../../v0.3.3
|
||||||
|
mkdir -p ../../../v0.3.9
|
||||||
|
|
||||||
|
nvm_has_system_node() { return 0; }
|
||||||
|
nvm ls | grep system 2>&1 > /dev/null
|
||||||
|
[ $? -eq 0 ] || die '"nvm ls" did not contain "system" when system node is present'
|
||||||
|
|
||||||
|
nvm_has_system_node() { return 1; }
|
||||||
|
nvm ls | grep system 2>&1 > /dev/null
|
||||||
|
[ $? -ne 0 ] || die '"nvm ls" contained "system" when system node is not present'
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
mkdir -p ../../../versions/node/v0.12.1
|
||||||
|
mkdir ../../../v0.1.3
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
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'
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
mkdir ../../../v0.1.2
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
nvm ls v0.1 | grep v0.1.2 &&
|
||||||
|
nvm ls v0.1.2 | grep v0.1.2 &&
|
||||||
|
nvm ls v0.1. | grep v0.1.2 &&
|
||||||
|
nvm ls v0.1.1 | grep N/A
|
||||||
|
|
@ -0,0 +1,17 @@
|
|||||||
|
rmdir ../../../v0.0.1 >/dev/null 2>&1
|
||||||
|
rmdir ../../../v0.0.2 >/dev/null 2>&1
|
||||||
|
rmdir ../../../v0.0.3 >/dev/null 2>&1
|
||||||
|
rmdir ../../../v0.0.9 >/dev/null 2>&1
|
||||||
|
rmdir ../../../v0.0.20 >/dev/null 2>&1
|
||||||
|
rmdir ../../../v0.1.2 >/dev/null 2>&1
|
||||||
|
rmdir ../../../v0.1.3 >/dev/null 2>&1
|
||||||
|
rmdir ../../../v0.2.3 >/dev/null 2>&1
|
||||||
|
rmdir ../../../v0.3.1 >/dev/null 2>&1
|
||||||
|
rmdir ../../../v0.3.3 >/dev/null 2>&1
|
||||||
|
rmdir ../../../v0.3.9 >/dev/null 2>&1
|
||||||
|
rmdir ../../../v0.20.3 >/dev/null 2>&1
|
||||||
|
rmdir ../../../versions >/dev/null 2>&1
|
||||||
|
unalias nvm_has_system_node >/dev/null 2>&1
|
||||||
|
rm -f ../../../alias/stable >/dev/null 2>&1
|
||||||
|
rm -f ../../../alias/unstable >/dev/null 2>&1
|
||||||
|
|
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. ../../nvm.sh
|
||||||
|
nvm alias test v0.1.2
|
||||||
|
[ "$(cat ../../alias/test)" = "v0.1.2" ]
|
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../nvm.sh
|
||||||
|
|
||||||
|
nvm deactivate 2>&1
|
||||||
|
|
||||||
|
[ "$(nvm current)" = "system" ] || [ "$(nvm current)" = "none" ] || die '"nvm current" did not report "system" or "none" when deactivated'
|
||||||
|
|
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
mkdir -p ../../v0.2.3
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
[ `expr $PATH : ".*v0.2.3/.*/bin"` = 0 ] || echo "WARNING: Unexpectedly found v0.2.3 already active" >&2
|
||||||
|
|
||||||
|
. ../../nvm.sh
|
||||||
|
nvm use --delete-prefix v0.2.3 || die "Failed to activate v0.2.3"
|
||||||
|
[ `expr "$PATH" : ".*v0.2.3/.*/bin"` != 0 ] || die "PATH not set up properly"
|
||||||
|
[ `expr "$NODE_PATH" : ".*v0.2.3/.*/lib/node_modules"` = 0 ] || die "NODE_PATH should not contain (npm root -g)"
|
||||||
|
# ^ note: NODE_PATH should not contain `npm root -g` since globals should not be requireable
|
||||||
|
|
||||||
|
nvm deactivate || die "Failed to deactivate v0.2.3"
|
||||||
|
[ `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"
|
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; cleanup ; exit 1; }
|
||||||
|
cleanup () {
|
||||||
|
rm -rf ../../v0.10.4
|
||||||
|
}
|
||||||
|
|
||||||
|
mkdir ../../v0.10.4
|
||||||
|
|
||||||
|
. ../../nvm.sh
|
||||||
|
|
||||||
|
nvm deactivate >/dev/null 2>&1
|
||||||
|
|
||||||
|
INSTALL_ERROR_MSG="$(nvm install v0.10.5 --reinstall-packages-from=0.11 2>&1)"
|
||||||
|
EXPECTED_ERROR_MSG="If --reinstall-packages-from is provided, it must point to an installed version of node."
|
||||||
|
[ "~$INSTALL_ERROR_MSG" = "~$EXPECTED_ERROR_MSG" ] \
|
||||||
|
|| die ""nvm install --reinstall-packages-from" should fail when given an uninstalled version: expected '$EXPECTED_ERROR_MSG', got '$INSTALL_ERROR_MSG'"
|
||||||
|
|
||||||
|
INSTALL_EXIT_CODE="$(nvm install v0.10.5 --reinstall-packages-from=0.11 >/dev/null 2>&1; echo $?)"
|
||||||
|
[ "~$INSTALL_EXIT_CODE" = "~5" ] \
|
||||||
|
|| die ""nvm install --reinstall-packages-from" should exit with code 5 when given an uninstalled version, got $INSTALL_EXIT_CODE"
|
||||||
|
|
||||||
|
INSTALL_ERROR_MSG="$(nvm install v0.10.5 --reinstall-packages-from=0.10.5 2>&1)"
|
||||||
|
EXPECTED_ERROR_MSG="You can't reinstall global packages from the same version of node you're installing."
|
||||||
|
[ "~$INSTALL_ERROR_MSG" = "~$EXPECTED_ERROR_MSG" ] \
|
||||||
|
|| die ""nvm install --reinstall-packages-from" should fail when given the same version: expected '$EXPECTED_ERROR_MSG', got '$INSTALL_ERROR_MSG'"
|
||||||
|
|
||||||
|
INSTALL_EXIT_CODE="$(nvm install v0.10.5 --reinstall-packages-from=0.10.5 >/dev/null 2>&1; echo $?)"
|
||||||
|
[ "~$INSTALL_EXIT_CODE" = "~4" ] \
|
||||||
|
|| die ""nvm install --reinstall-packages-from" should exit with code 4 when given the same version, got $INSTALL_EXIT_CODE"
|
||||||
|
|
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../nvm.sh
|
||||||
|
[ "$(nvm install invalid.invalid 2>&1)" = "Version 'invalid.invalid' not found - try \`nvm ls-remote\` to browse available versions." ] || die "nvm installing an invalid version did not print a nice error message"
|
||||||
|
|
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
echo v0.1.2 > ../../alias/test
|
||||||
|
. ../../nvm.sh
|
||||||
|
nvm unalias test
|
||||||
|
! [ -e ../../alias/test ]
|
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cd ../..
|
||||||
|
mkdir v0.0.1
|
||||||
|
mkdir src/node-v0.0.1
|
||||||
|
|
||||||
|
. ./nvm.sh
|
||||||
|
nvm uninstall v0.0.1
|
||||||
|
|
||||||
|
[ ! -d 'v0.0.1' ] && [ ! -d 'src/node-v0.0.1' ]
|
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
fail () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../nvm.sh
|
||||||
|
|
||||||
|
type nvm > /dev/null 2>&1 || fail "NVM not loaded"
|
||||||
|
|
||||||
|
nvm unload
|
||||||
|
|
||||||
|
type nvm > /dev/null 2>&1 && fail "NVM not unloaded" || exit 0
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; cleanup ; exit 1; }
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
rm -rf ../../alias/foo
|
||||||
|
}
|
||||||
|
|
||||||
|
. ../../nvm.sh
|
||||||
|
|
||||||
|
echo 'foo' > ../../alias/foo
|
||||||
|
|
||||||
|
OUTPUT="$(nvm use foo 2>&1)"
|
||||||
|
EXPECTED_OUTPUT='The alias "foo" leads to an infinite loop. Aborting.'
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] \
|
||||||
|
|| die "'nvm use foo' did not output '$EXPECTED_OUTPUT'; got '$OUTPUT'"
|
||||||
|
|
||||||
|
EXIT_CODE="$(nvm use foo 2>/dev/null ; echo $?)"
|
||||||
|
[ "_$EXIT_CODE" = "_8" ] || die "Expected exit code 8; got $EXIT_CODE"
|
||||||
|
|
||||||
|
OUTPUT="$(nvm use --silent foo 2>&1)"
|
||||||
|
EXPECTED_OUTPUT=''
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] \
|
||||||
|
|| die "'nvm use --silent foo' did not output '$EXPECTED_OUTPUT'; got '$OUTPUT'"
|
||||||
|
|
||||||
|
EXIT_CODE="$(nvm use --silent foo 2>/dev/null ; echo $?)"
|
||||||
|
[ "_$EXIT_CODE" = "_8" ] || die "Expected exit code 8 from 'nvm use --silent foo'; got $EXIT_CODE"
|
||||||
|
|
||||||
|
cleanup;
|
||||||
|
|
@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; cleanup ; exit 1; }
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
rm -rf ../../alias/foo
|
||||||
|
}
|
||||||
|
|
||||||
|
. ../../nvm.sh
|
||||||
|
|
||||||
|
echo 'foo' > ../../alias/foo
|
||||||
|
|
||||||
|
OUTPUT="$(nvm use foo 2>&1)"
|
||||||
|
EXPECTED_OUTPUT='The alias "foo" leads to an infinite loop. Aborting.'
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] \
|
||||||
|
|| die "'nvm use foo' did not output '$EXPECTED_OUTPUT'; got '$OUTPUT'"
|
||||||
|
|
||||||
|
EXIT_CODE="$(nvm use foo 2>/dev/null ; echo $?)"
|
||||||
|
[ "_$EXIT_CODE" = "_8" ] || die "Expected exit code 8; got $EXIT_CODE"
|
||||||
|
|
||||||
|
OUTPUT="$(nvm use --silent foo 2>&1)"
|
||||||
|
EXPECTED_OUTPUT=''
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] \
|
||||||
|
|| die "'nvm use --silent foo' did not output '$EXPECTED_OUTPUT'; got '$OUTPUT'"
|
||||||
|
|
||||||
|
OUTPUT="$(nvm use foo --silent 2>&1)"
|
||||||
|
EXPECTED_OUTPUT=''
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] \
|
||||||
|
|| die "'nvm use foo --silent' did not output '$EXPECTED_OUTPUT'; got '$OUTPUT'"
|
||||||
|
|
||||||
|
EXIT_CODE="$(nvm use --silent foo 2>/dev/null ; echo $?)"
|
||||||
|
[ "_$EXIT_CODE" = "_8" ] || die "Expected exit code 8 from 'nvm use --silent foo'; got $EXIT_CODE"
|
||||||
|
|
||||||
|
EXIT_CODE="$(nvm use foo --silent 2>/dev/null ; echo $?)"
|
||||||
|
[ "_$EXIT_CODE" = "_8" ] || die "Expected exit code 8 from 'nvm use foo --silent'; got $EXIT_CODE"
|
||||||
|
|
||||||
|
cleanup;
|
||||||
|
|
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../nvm.sh
|
||||||
|
|
||||||
|
nvm_has_system_node() { return 0; }
|
||||||
|
nvm_print_npm_version() { return ' (npm v1.2.3)'; }
|
||||||
|
EXPECTED_OUTPUT="Now using system version of node: $(node -v)$(nvm_print_npm_version)"
|
||||||
|
[ "$(nvm use system 2>&1 | tail -n1)" = "$EXPECTED_OUTPUT" ] || die "Could not use system version of node"
|
||||||
|
EXPECTED_OUTPUT=""
|
||||||
|
[ "$(nvm use --silent system 2>&1 | tail -n1)" = "$EXPECTED_OUTPUT" ] || die "Could not use system version of node or --silent was not silent"
|
||||||
|
|
||||||
|
nvm_has_system_node() { return 1; }
|
||||||
|
nvm_print_npm_version() { return ''; }
|
||||||
|
EXPECTED_OUTPUT="System version of node not found."
|
||||||
|
[ "$(nvm use system 2>&1 | tail -n1)" = "$EXPECTED_OUTPUT" ] || die "Did not report error, system node not found"
|
||||||
|
nvm use system 2>&1 > /dev/null || [ $? -eq 127 ] || die "Did not return error code, system node not found"
|
||||||
|
EXPECTED_OUTPUT=""
|
||||||
|
[ "$(nvm use --silent system 2>&1 | tail -n1)" = "$EXPECTED_OUTPUT" ] || die "Did not report error, system node not found or --silent was not silent"
|
||||||
|
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"
|
||||||
|
|
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export NVM_SYMLINK_CURRENT=true
|
||||||
|
. ../../nvm.sh
|
||||||
|
|
||||||
|
rm -rf ../../v0.10.29
|
||||||
|
mkdir ../../v0.10.29
|
||||||
|
nvm use 0.10.29
|
||||||
|
rmdir ../../v0.10.29
|
||||||
|
|
||||||
|
if [ ! -L ../../current ];then
|
||||||
|
echo "Expected 'current' symlink to be created!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
oldLink="$(readlink ../../current)"
|
||||||
|
|
||||||
|
if [ "$(basename $oldLink)" != 'v0.10.29' ];then
|
||||||
|
echo "Expected 'current' to point to v0.10.29 but was $oldLink"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf ../../v0.11.13
|
||||||
|
mkdir ../../v0.11.13
|
||||||
|
nvm use 0.11.13
|
||||||
|
rmdir ../../v0.11.13
|
||||||
|
|
||||||
|
newLink="$(readlink ../../current)"
|
||||||
|
|
||||||
|
if [ "$(basename $newLink)" != 'v0.11.13' ];then
|
||||||
|
echo "Expected 'current' to point to v0.11.13 but was $newLink"
|
||||||
|
exit 1
|
||||||
|
fi
|
@ -0,0 +1,84 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
. ../../nvm.sh
|
||||||
|
|
||||||
|
TEST_NODE_VERSION="v0.10.29"
|
||||||
|
|
||||||
|
TEST_COUNT=0
|
||||||
|
TEST_PASSED=0
|
||||||
|
TEST_FAILED=0
|
||||||
|
|
||||||
|
function registerExpectedSymlink() {
|
||||||
|
registerResult ${1}
|
||||||
|
}
|
||||||
|
|
||||||
|
function registerExpectedNoSymlink() {
|
||||||
|
[ ${1} -ne 0 ]
|
||||||
|
registerResult $?
|
||||||
|
}
|
||||||
|
|
||||||
|
function registerResult() {
|
||||||
|
result=${1}
|
||||||
|
|
||||||
|
TEST_COUNT=$(($TEST_COUNT + 1))
|
||||||
|
|
||||||
|
[ ${result} -eq 0 ] \
|
||||||
|
&& TEST_PASSED=$(($TEST_PASSED + 1)) \
|
||||||
|
|| TEST_FAILED=$(($TEST_FAILED + 1))
|
||||||
|
}
|
||||||
|
|
||||||
|
function cleanup() {
|
||||||
|
rm -rf ../../${TEST_NODE_VERSION}
|
||||||
|
rm -f ../../current
|
||||||
|
}
|
||||||
|
|
||||||
|
function runNvmUse() {
|
||||||
|
mkdir ../../${TEST_NODE_VERSION}
|
||||||
|
nvm use ${TEST_NODE_VERSION} > /dev/null 2>&1
|
||||||
|
rmdir ../../${TEST_NODE_VERSION}
|
||||||
|
}
|
||||||
|
|
||||||
|
function isCurrentSymlinkPresent() {
|
||||||
|
[ -L ../../current ]
|
||||||
|
}
|
||||||
|
|
||||||
|
NVM_SYMLINK_CURRENT=false
|
||||||
|
cleanup
|
||||||
|
runNvmUse
|
||||||
|
isCurrentSymlinkPresent && echo >&2 "Expected 'current' symlink not to be created when NVM_SYMLINK_CURRENT=false!"
|
||||||
|
registerExpectedNoSymlink $?
|
||||||
|
|
||||||
|
NVM_SYMLINK_CURRENT=true
|
||||||
|
cleanup
|
||||||
|
runNvmUse
|
||||||
|
isCurrentSymlinkPresent || echo >&2 "Expected 'current' symlink to be created when NVM_SYMLINK_CURRENT=true!"
|
||||||
|
registerExpectedSymlink $?
|
||||||
|
|
||||||
|
NVM_SYMLINK_CURRENT=garbagevalue
|
||||||
|
cleanup
|
||||||
|
runNvmUse
|
||||||
|
isCurrentSymlinkPresent && echo >&2 "Expected 'current' symlink not to be created when NVM_SYMLINK_CURRENT contains a string!"
|
||||||
|
registerExpectedNoSymlink $?
|
||||||
|
|
||||||
|
NVM_SYMLINK_CURRENT=0
|
||||||
|
cleanup
|
||||||
|
runNvmUse
|
||||||
|
isCurrentSymlinkPresent && echo >&2 "Expected 'current' symlink not to be created when NVM_SYMLINK_CURRENT=0!"
|
||||||
|
registerExpectedNoSymlink $?
|
||||||
|
|
||||||
|
NVM_SYMLINK_CURRENT=1
|
||||||
|
cleanup
|
||||||
|
runNvmUse
|
||||||
|
isCurrentSymlinkPresent && echo >&2 "Expected 'current' symlink not to be created when NVM_SYMLINK_CURRENT=1!"
|
||||||
|
registerExpectedNoSymlink $?
|
||||||
|
|
||||||
|
unset NVM_SYMLINK_CURRENT
|
||||||
|
cleanup
|
||||||
|
runNvmUse
|
||||||
|
isCurrentSymlinkPresent && echo >&2 "Expected 'current' symlink not to be created when NVM_SYMLINK_CURRENT has been unset (default behaviour)!"
|
||||||
|
registerExpectedNoSymlink $?
|
||||||
|
|
||||||
|
cleanup
|
||||||
|
|
||||||
|
[ ${TEST_FAILED} -ne 0 ] && echo "${TEST_COUNT} tested, ${TEST_PASSED} passed, ${TEST_FAILED} failed" && exit 1 || true
|
||||||
|
|
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. ../../nvm.sh
|
||||||
|
nvm
|
@ -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
|
@ -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"
|
@ -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"
|
@ -0,0 +1,235 @@
|
|||||||
|
version date files npm v8 uv zlib openssl modules lts
|
||||||
|
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.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-18 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.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.1p 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 2015-01-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 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-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.4.3 3.22.24.19 0.11.22 1.2.3 1.0.1f 14 -
|
||||||
|
v0.11.11 2014-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.3.25 3.22.24.19 0.11.18 1.2.3 1.0.1f 14 -
|
||||||
|
v0.11.10 2014-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.3.22 3.22.24.10 0.11.17 1.2.3 1.0.1e 13 -
|
||||||
|
v0.11.9 2013-12-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.3.15 3.22.24.5 0.11.15 1.2.3 1.0.1e 13 -
|
||||||
|
v0.11.8 2013-12-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.3.13 3.21.18.3 0.11.14 1.2.3 1.0.1e 13 -
|
||||||
|
v0.11.7 2013-10-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.8 3.20.17.0 0.11.13 1.2.3 1.0.1e 0x000C -
|
||||||
|
v0.11.6 2013-08-22 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-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.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-04-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.15 3.17.13.0 0.10.3 1.2.3 1.0.1e 0x000C -
|
||||||
|
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.1p 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-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.4.28 3.14.5.9 0.10.36 1.2.8 1.0.1l 11 -
|
||||||
|
v0.10.36 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 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-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.4.9 3.14.5.9 0.10.27 1.2.3 1.0.1g 11 -
|
||||||
|
v0.10.27 2014-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.4.8 3.14.5.9 0.10.27 1.2.3 1.0.1g 11 -
|
||||||
|
v0.10.26 2014-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.4.3 3.14.5.9 0.10.25 1.2.3 1.0.1e 11 -
|
||||||
|
v0.10.25 2014-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.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-12-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.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-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.3.11 3.14.5.9 0.10.17 1.2.3 1.0.1e 11 -
|
||||||
|
v0.10.18 2013-10-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.8 3.14.5.9 0.10.15 1.2.3 1.0.1e 11 -
|
||||||
|
v0.10.17 2013-08-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.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-08-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.5 3.14.5.9 0.10.13 1.2.3 1.0.1e 11 -
|
||||||
|
v0.10.14 2013-08-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.5 3.14.5.9 0.10.13 1.2.3 1.0.1e 11 -
|
||||||
|
v0.10.13 2013-07-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.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-06-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.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-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.18 3.14.5.8 0.10.5 1.2.3 1.0.1e 11 -
|
||||||
|
v0.10.4 2013-04-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.18 3.14.5.8 0.10.4 1.2.3 1.0.1e 11 -
|
||||||
|
v0.10.3 2013-04-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.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-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.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-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.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-02-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.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 2015-10-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.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-09-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.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 2015-09-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 2015-09-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-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.0 3.11.10.25 0.8 1.2.3 1.0.0f 1 -
|
||||||
|
v0.8.16 2015-09-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.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 2015-09-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.65 3.11.10.25 0.8 1.2.3 1.0.0f 1 -
|
||||||
|
v0.8.13 2015-09-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.65 3.11.10.25 0.8 1.2.3 1.0.0f 1 -
|
||||||
|
v0.8.12 2015-09-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.63 3.11.10.22 0.8 1.2.3 1.0.0f 1 -
|
||||||
|
v0.8.11 2015-09-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.62 3.11.10.22 0.8 1.2.3 1.0.0f 1 -
|
||||||
|
v0.8.10 2015-09-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.62 3.11.10.22 0.8 1.2.3 1.0.0f 1 -
|
||||||
|
v0.8.9 2015-09-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.61 3.11.10.22 0.8 1.2.3 1.0.0f 1 -
|
||||||
|
v0.8.8 2015-09-06 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 2015-09-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.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 2015-09-06 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 2015-09-06 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 2015-09-06 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-31 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-03-31 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-03-31 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-03-31 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-03-31 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-08 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-09 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-31 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-17 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-04 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-23 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 2012-03-31 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 2012-03-31 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-03 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 2015-10-17 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 - - - 1 -
|
||||||
|
v0.1.103 2011-08-26 src - 2.3.5.0 - - - 1 -
|
||||||
|
v0.1.102 2011-08-26 src - 2.3.2.0 - - - 1 -
|
||||||
|
v0.1.101 2011-08-26 src - 2.3.0.0 - - - 1 -
|
||||||
|
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 - - - - -
|
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
[ "_$(nvm_add_iojs_prefix 1)" = "_iojs-v1" ] || die '"nvm_add_iojs_prefix 1" did not return "iojs-v1"'
|
||||||
|
[ "_$(nvm_add_iojs_prefix iojs-1)" = "_iojs-v1" ] || die '"nvm_add_iojs_prefix iojs-1" did not return "iojs-v1"'
|
||||||
|
[ "_$(nvm_add_iojs_prefix iojs-1.2.3)" = "_iojs-v1.2.3" ] || die '"nvm_add_iojs_prefix iojs-1.2.3" did not return "iojs-v1.2.3"'
|
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; cleanup ; exit 1; }
|
||||||
|
|
||||||
|
cleanup () {
|
||||||
|
rm -rf ../../../alias/test
|
||||||
|
}
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
OUTPUT="$(nvm_alias 2>&1)"
|
||||||
|
EXPECTED_OUTPUT='An alias is required.'
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "'nvm_alias' produced wrong output; got $OUTPUT"
|
||||||
|
|
||||||
|
EXIT_CODE="$(nvm_alias >/dev/null 2>&1 ; echo $?)"
|
||||||
|
[ "_$EXIT_CODE" = "_1" ] || die "'nvm_alias' exited with $EXIT_CODE, expected 1"
|
||||||
|
|
||||||
|
rm -rf ../../../alias/nonexistent
|
||||||
|
|
||||||
|
OUTPUT="$(nvm_alias nonexistent 2>&1)"
|
||||||
|
EXPECTED_OUTPUT='Alias does not exist.'
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "'nvm_alias nonexistent' produced wrong output; got $OUTPUT"
|
||||||
|
|
||||||
|
EXIT_CODE="$(nvm_alias nonexistent >/dev/null 2>&1 ; echo $?)"
|
||||||
|
[ "_$EXIT_CODE" = "_2" ] || die "'nvm_alias nonexistent' exited with $EXIT_CODE, expected 2"
|
||||||
|
|
||||||
|
EXPECTED_OUTPUT="0.10"
|
||||||
|
nvm alias test "$EXPECTED_OUTPUT" || die "'nvm alias test $EXPECTED_OUTPUT' failed"
|
||||||
|
OUTPUT="$(nvm_alias test)"
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "'nvm_alias test' produced wrong output; got $OUTPUT"
|
||||||
|
|
||||||
|
cleanup
|
||||||
|
|
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
[ "_$(nvm_alias_path)" = "_$NVM_DIR/alias" ] || die "nvm_alias_path did not requrn correct location"
|
||||||
|
|
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cleanup () {
|
||||||
|
rm tmp/emptyfile tmp/testfile
|
||||||
|
rmdir tmp
|
||||||
|
}
|
||||||
|
die () { echo $@ ; cleanup; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
mkdir -p tmp
|
||||||
|
touch tmp/emptyfile
|
||||||
|
echo -n "test" > tmp/testfile
|
||||||
|
|
||||||
|
nvm_checksum tmp/emptyfile "da39a3ee5e6b4b0d3255bfef95601890afd80709" || die "nvm_checksum on an empty file did not match the SHA1 digest of the empty string"
|
||||||
|
nvm_checksum tmp/testfile "da39a3ee5e6b4b0d3255bfef95601890afd80709" && die "nvm_checksum allowed a bad checksum"
|
||||||
|
|
||||||
|
cleanup
|
@ -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
|
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/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="$?"
|
||||||
|
[ "_$OUTPUT" = "_$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
|
@ -0,0 +1,30 @@
|
|||||||
|
#!/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'
|
||||||
|
[ "_$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'
|
||||||
|
[ "_$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
|
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
[ "_$(nvm_ensure_version_prefix 1)" = "_v1" ] || die '"nvm_ensure_version_prefix 1" did not return "v1"'
|
||||||
|
[ "_$(nvm_ensure_version_prefix v1)" = "_v1" ] || die '"nvm_ensure_version_prefix v1" did not return "v1"'
|
||||||
|
[ "_$(nvm_ensure_version_prefix foo)" = "_foo" ] || die '"nvm_ensure_version_prefix foo" did not return "foo"'
|
||||||
|
|
||||||
|
[ "_$(nvm_ensure_version_prefix iojs-1)" = "_iojs-v1" ] || die '"nvm_ensure_version_prefix iojs-1" did not return "iojs-v1"'
|
||||||
|
[ "_$(nvm_ensure_version_prefix iojs-v1)" = "_iojs-v1" ] || die '"nvm_ensure_version_prefix iojs-v1" did not return "iojs-v1"'
|
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; cleanup ; exit 1; }
|
||||||
|
setup() {
|
||||||
|
cleanup
|
||||||
|
mkdir -p tmp_nvm_find_up/a/b/c/d
|
||||||
|
touch tmp_nvm_find_up/test
|
||||||
|
touch tmp_nvm_find_up/a/b/c/test
|
||||||
|
}
|
||||||
|
cleanup () {
|
||||||
|
rm -rf tmp_nvm_find_up
|
||||||
|
}
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
setup
|
||||||
|
|
||||||
|
TEST_DIR="$PWD"
|
||||||
|
|
||||||
|
[ "~$(PWD=$TEST_DIR/tmp_nvm_find_up/a nvm_find_up 'test')" = "~$TEST_DIR/tmp_nvm_find_up" ] || die "failed to find 1 dir up"
|
||||||
|
[ "~$(PWD=$TEST_DIR/tmp_nvm_find_up/a/b nvm_find_up 'test')" = "~$TEST_DIR/tmp_nvm_find_up" ] || die "failed to find 2 dirs up"
|
||||||
|
[ "~$(PWD=$TEST_DIR/tmp_nvm_find_up/a/b/c nvm_find_up 'test')" = "~$TEST_DIR/tmp_nvm_find_up/a/b/c" ] || die "failed to find in current dir"
|
||||||
|
[ "~$(PWD=$TEST_DIR/tmp_nvm_find_up/a/b/c/d nvm_find_up 'test')" = "~$TEST_DIR/tmp_nvm_find_up/a/b/c" ] || die "failed to find 1 level up from current dir"
|
||||||
|
|
||||||
|
cleanup
|
||||||
|
|
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
OUTPUT="$(nvm_format_version 0.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="$(nvm_format_version 0.1)"
|
||||||
|
EXPECTED_OUTPUT="v0.1.0"
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_format_version 0.1.0 did not return $EXPECTED_OUTPUT; got $OUTPUT"
|
||||||
|
|
@ -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
|
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; cleanup ; exit 1; }
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
unset -f nvm_has
|
||||||
|
}
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
nvm_has() { return 1 ; }
|
||||||
|
|
||||||
|
OUTPUT="$(nvm_get_latest 2>&1)"
|
||||||
|
EXIT_CODE="$(nvm_get_latest >/dev/null 2>&1 ; echo $?)"
|
||||||
|
[ "_$OUTPUT" = "_nvm needs curl or wget to proceed." ] \
|
||||||
|
|| die "no curl/wget did not report correct error message, got '$OUTPUT'"
|
||||||
|
[ "_$EXIT_CODE" = "_1" ] \
|
||||||
|
|| die "no curl/wget did not exit with code 1, got $EXIT_CODE"
|
||||||
|
|
||||||
|
cleanup
|
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
nvm_has cat && type cat > /dev/null || die 'nvm_has locates "cat" properly'
|
||||||
|
|
||||||
|
[ "~$(nvm_has foobarbaz 2>&1)" = "~" ] || die "nvm_has does not suppress error output"
|
||||||
|
|
||||||
|
! nvm_has foobarbaz && ! type foobarbaz >/dev/null 2>&1 || die "nvm_has does not return a nonzero exit code when not found"
|
||||||
|
|
@ -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"
|
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cleanup () {
|
||||||
|
rm ../../../versions/io.js/v0.1.2/node
|
||||||
|
rm ../../../versions/io.js/v0.1.2/iojs
|
||||||
|
rmdir ../../../versions/io.js/v0.1.2
|
||||||
|
}
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
mkdir ../../../versions/io.js/v0.1.2
|
||||||
|
touch ../../../versions/io.js/v0.1.2/node
|
||||||
|
touch ../../../versions/io.js/v0.1.2/iojs
|
||||||
|
|
||||||
|
nvm use iojs-v0.1.2
|
||||||
|
|
||||||
|
if command -v iojs; then
|
||||||
|
nvm_has_system_iojs
|
||||||
|
else
|
||||||
|
! nvm_has_system_iojs
|
||||||
|
fi
|
||||||
|
|
||||||
|
nvm deactivate /dev/null 2>&1
|
||||||
|
|
||||||
|
if command -v iojs; then
|
||||||
|
nvm_has_system_iojs
|
||||||
|
else
|
||||||
|
! nvm_has_system_iojs
|
||||||
|
fi
|
||||||
|
|
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cleanup () {
|
||||||
|
rm ../../../v0.1.2/node
|
||||||
|
rmdir ../../../v0.1.2
|
||||||
|
}
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
mkdir ../../../v0.1.2
|
||||||
|
touch ../../../v0.1.2/node
|
||||||
|
|
||||||
|
nvm use 0.1.2
|
||||||
|
|
||||||
|
if command -v node; then
|
||||||
|
nvm_has_system_node
|
||||||
|
else
|
||||||
|
! nvm_has_system_node
|
||||||
|
fi
|
||||||
|
|
||||||
|
nvm deactivate /dev/null 2>&1
|
||||||
|
|
||||||
|
if command -v node; then
|
||||||
|
nvm_has_system_node
|
||||||
|
else
|
||||||
|
! nvm_has_system_node
|
||||||
|
fi
|
||||||
|
|
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
[ "$(nvm_iojs_prefix)" = "iojs" ] || die '"nvm_iojs_prefix" did not return the string "iojs". why did this fail?!'
|
@ -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
|
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
nvm_is_iojs_version 'iojs-' || die '"nvm_is_iojs_version iojs- was not true'
|
||||||
|
nvm_is_iojs_version 'iojs-foo' || die '"nvm_is_iojs_version iojs- was not true'
|
||||||
|
! nvm_is_iojs_version 'iojs' || die '"nvm_is_iojs_version iojs was not false'
|
||||||
|
! nvm_is_iojs_version 'v1.0.0' || die '"nvm_is_iojs_version v1.0.0" was not false'
|
@ -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'
|
@ -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'
|
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
nvm_is_valid_version 0.1.2 || die "nvm_is_valid_version 0.1.2 did not return 0"
|
||||||
|
nvm_is_valid_version foo && die "nvm_is_valid_version foo did not return 1"
|
||||||
|
nvm_is_valid_version iojs-1 || die "nvm_is_valid_version iojs-1 did not return 0"
|
||||||
|
nvm_is_valid_version iojs || die "nvm_is_valid_version iojs did not return 0"
|
||||||
|
nvm_is_valid_version node || die "nvm_is_valid_version node did not return 0"
|
||||||
|
nvm_is_valid_version stable || die "nvm_is_valid_version stable did not return 0"
|
||||||
|
nvm_is_valid_version unstable || die "nvm_is_valid_version unstable did not return 0"
|
@ -0,0 +1,37 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
TEST_PWD=$(pwd)
|
||||||
|
TEST_DIR="$TEST_PWD/nvm_ls_current_tmp"
|
||||||
|
|
||||||
|
cleanup() { rm -rf "$TEST_DIR"; unset -f return_zero; alias node='node' ; unalias node; }
|
||||||
|
die () { echo $@ ; cleanup ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
return_zero () { return 0; }
|
||||||
|
|
||||||
|
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"
|
||||||
|
mkdir "$TEST_DIR"
|
||||||
|
ln -s "$(command which which)" "$TEST_DIR/which"
|
||||||
|
ln -s "$(command which dirname)" "$TEST_DIR/dirname"
|
||||||
|
|
||||||
|
[ "$(PATH="$TEST_DIR" nvm_ls_current)" = "none" ] || die 'when node not installed, nvm_ls_current did not return "none"'
|
||||||
|
[ "@$(PATH="$TEST_DIR" nvm_ls_current 2> /dev/stdout 1> /dev/null)@" = "@@" ] || die 'when node not installed, nvm_ls_current returned error output'
|
||||||
|
|
||||||
|
echo "#!/bin/bash" > "$TEST_DIR/node"
|
||||||
|
echo "echo 'VERSION FOO!'" > "$TEST_DIR/node"
|
||||||
|
chmod a+x "$TEST_DIR/node"
|
||||||
|
|
||||||
|
[ "$(alias nvm_tree_contains_path='return_zero' && PATH="$TEST_DIR" nvm_ls_current)" = "VERSION FOO!" ] || die 'when activated, did not return nvm node version'
|
||||||
|
|
||||||
|
alias node='node --harmony'
|
||||||
|
[ "$(alias nvm_tree_contains_path='return_zero' && PATH="$TEST_DIR" nvm_ls_current)" = "VERSION FOO!" ] || die 'when activated and node aliased, did not return nvm node version'
|
||||||
|
|
||||||
|
cleanup
|
@ -0,0 +1,57 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; cleanup ; exit 1; }
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
unset -f nvm_download
|
||||||
|
}
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
# sample output at the time the test was written
|
||||||
|
TAB_PATH="$PWD/nodejs.org-dist-index.tab"
|
||||||
|
nvm_download() {
|
||||||
|
cat "$TAB_PATH"
|
||||||
|
}
|
||||||
|
|
||||||
|
OUTPUT="$(nvm_ls_remote foo)"
|
||||||
|
EXIT_CODE="$(nvm_ls_remote foo >/dev/null 2>&1 ; echo $?)"
|
||||||
|
[ "_$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"
|
||||||
|
|
||||||
|
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)"
|
||||||
|
[ "_$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)"
|
||||||
|
EXPECTED_OUTPUT="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"
|
||||||
|
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_ls_remote 0.3 did not output 0.3.x versions; got $OUTPUT"
|
||||||
|
|
||||||
|
# Sanity checks
|
||||||
|
OUTPUT="$(nvm_print_implicit_alias remote stable)"
|
||||||
|
EXPECTED_OUTPUT="5.3"
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_print_implicit_alias remote stable did not output $EXPECTED_OUTPUT; got $OUTPUT"
|
||||||
|
|
||||||
|
OUTPUT="$(nvm_print_implicit_alias remote unstable)"
|
||||||
|
EXPECTED_OUTPUT="0.11"
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_print_implicit_alias remote unstable did not output $EXPECTED_OUTPUT; got $OUTPUT"
|
||||||
|
|
||||||
|
OUTPUT="$(nvm_ls_remote stable)"
|
||||||
|
EXPECTED_OUTPUT="v5.3.0"
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_ls_remote stable did not output $EXPECTED_OUTPUT; got $OUTPUT"
|
||||||
|
|
||||||
|
OUTPUT="$(nvm_ls_remote unstable)"
|
||||||
|
EXPECTED_OUTPUT="v0.11.16"
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm_ls_remote unstable did not output $EXPECTED_OUTPUT; got $OUTPUT"
|
||||||
|
|
||||||
|
cleanup
|
||||||
|
|
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; cleanup ; exit 1; }
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
unset -f nvm_download
|
||||||
|
}
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
# sample output at the time the test was written
|
||||||
|
TAB_PATH="$PWD/iojs.org-dist-index.tab"
|
||||||
|
nvm_download() {
|
||||||
|
cat "$TAB_PATH"
|
||||||
|
}
|
||||||
|
|
||||||
|
OUTPUT="$(nvm_ls_remote_iojs foo)"
|
||||||
|
EXIT_CODE="$(nvm_ls_remote_iojs foo >/dev/null 2>&1 ; echo $?)"
|
||||||
|
[ "_$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"
|
||||||
|
|
||||||
|
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-/')"
|
||||||
|
[ "_$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)"
|
||||||
|
EXPECTED_OUTPUT="iojs-v1.0.0
|
||||||
|
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"
|
||||||
|
|
||||||
|
cleanup
|
||||||
|
|
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
[ "$(nvm_node_prefix)" = "node" ] || die '"nvm_node_prefix" did not return the string "node". why did this fail?!'
|
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
[ "~$(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 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 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 1.2.3)" = "~3" ] || die "1.2.3 should give 3"
|
||||||
|
[ "~$(nvm_num_version_groups v1.2.3)" = "~3" ] || die "v1.2.3 should give 3"
|
||||||
|
[ "~$(nvm_num_version_groups v1.2.3.)" = "~3" ] || die "v1.2.3. should give 3"
|
||||||
|
|
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
TEST_PATH=/usr/bin:/usr/local/bin
|
||||||
|
|
||||||
|
NEW_PATH=`nvm_prepend_path "$TEST_PATH" "$NVM_DIR/v0.2.5/bin"`
|
||||||
|
|
||||||
|
[ "$NEW_PATH" = "$NVM_DIR/v0.2.5/bin:/usr/bin:/usr/local/bin" ] || die "Not correctly prepended: $NEW_PATH "
|
||||||
|
|
||||||
|
|
||||||
|
EMPTY_PATH=
|
||||||
|
|
||||||
|
NEW_PATH=`nvm_prepend_path "$EMPTY_PATH" "$NVM_DIR/v0.2.5/bin"`
|
||||||
|
|
||||||
|
[ "$NEW_PATH" = "$NVM_DIR/v0.2.5/bin" ] || die "Not correctly prepended: $NEW_PATH "
|
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
EXPECTED_FIRST_MSG="nvm_print_implicit_alias must be specified with local or remote as the first argument."
|
||||||
|
[ "_$(nvm_print_implicit_alias 2>&1)" = "_$EXPECTED_FIRST_MSG" ] \
|
||||||
|
|| die "nvm_print_implicit_alias did not require local|remote as first argument"
|
||||||
|
[ "_$(nvm_print_implicit_alias foo 2>&1)" = "_$EXPECTED_FIRST_MSG" ] \
|
||||||
|
|| die "nvm_print_implicit_alias did not require local|remote as first argument"
|
||||||
|
|
||||||
|
FIRST_EXIT_CODE="$(nvm_print_implicit_alias > /dev/null 2>&1 ; echo $?)"
|
||||||
|
[ "_$FIRST_EXIT_CODE" = "_1" ] \
|
||||||
|
|| 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', 'unstable', 'iojs', and 'node' are supported."
|
||||||
|
[ "_$(nvm_print_implicit_alias local 2>&1)" = "_$EXPECTED_SECOND_MSG" ] \
|
||||||
|
|| 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" ] \
|
||||||
|
|| 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" = "_2" ] \
|
||||||
|
|| die "nvm_print_implicit_alias without stable|unstable|iojs|node had wrong exit code: expected 2, got $SECOND_EXIT_CODE"
|
||||||
|
|
@ -0,0 +1,105 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; cleanup ; exit 1; }
|
||||||
|
cleanup() {
|
||||||
|
rm -rf ../../../v0.2.3
|
||||||
|
rm -rf ../../../v0.3.4
|
||||||
|
rm -rf ../../../v0.4.6
|
||||||
|
rm -rf ../../../v0.5.7
|
||||||
|
rm -rf ../../../v0.7.7
|
||||||
|
rm -rf ../../../versions/io.js/v0.98.0
|
||||||
|
rm -rf ../../../versions/node/v1.0.0
|
||||||
|
rm -rf ../../../versions/node/v1.1.0
|
||||||
|
unset -f nvm_ls_remote nvm_ls_remote_iojs
|
||||||
|
}
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
mkdir ../../../v0.2.3
|
||||||
|
mkdir ../../../v0.3.4
|
||||||
|
mkdir ../../../v0.4.6
|
||||||
|
mkdir ../../../v0.5.7
|
||||||
|
mkdir ../../../v0.7.7
|
||||||
|
mkdir -p ../../../versions/io.js/v0.98.0
|
||||||
|
|
||||||
|
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_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" = "_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 ../../../versions/node/v1.0.0
|
||||||
|
mkdir -p ../../../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() {
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
|
||||||
|
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" = "_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" = "_0.9" ] || die "remote unstable is not latest odd minor: expected 0.9, got $LATEST_UNSTABLE"
|
||||||
|
|
||||||
|
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
|
||||||
|
|
@ -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
|
@ -0,0 +1,78 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; cleanup ; exit 1; }
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
unset -f nvm_ls_remote nvm_ls_remote_iojs
|
||||||
|
}
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
nvm_ls_remote() {
|
||||||
|
echo "N/A"
|
||||||
|
}
|
||||||
|
OUTPUT="$(nvm_remote_version foo)"
|
||||||
|
EXIT_CODE="$(nvm_remote_version foo >/dev/null 2>&1 ; echo $?)"
|
||||||
|
[ "_$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"
|
||||||
|
|
||||||
|
nvm_ls_remote_iojs() {
|
||||||
|
echo "N/A"
|
||||||
|
}
|
||||||
|
OUTPUT="$(nvm_remote_version iojs-foo)"
|
||||||
|
EXIT_CODE="$(nvm_remote_version iojs-foo >/dev/null 2>&1 ; echo $?)"
|
||||||
|
[ "_$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"
|
||||||
|
|
||||||
|
|
||||||
|
nvm_ls_remote() {
|
||||||
|
if ! nvm_is_iojs_version "$1"; then
|
||||||
|
echo "test output"
|
||||||
|
echo "more test output"
|
||||||
|
echo "pattern received: _$1_"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
nvm_ls_remote_iojs() {
|
||||||
|
if [ -z "$1" ] || nvm_is_iojs_version "$1"; then
|
||||||
|
echo "test iojs output"
|
||||||
|
echo "more iojs test output"
|
||||||
|
echo "iojs pattern received: _$1_"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
OUTPUT="$(nvm_remote_version foo)"
|
||||||
|
EXIT_CODE="$(nvm_remote_version foo >/dev/null 2>&1 ; echo $?)"
|
||||||
|
[ "_$OUTPUT" = "_pattern received: _foo_" ] \
|
||||||
|
|| die "nvm_remote_version foo did not return last line only of nvm_ls_remote foo; got $OUTPUT"
|
||||||
|
[ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_version foo did not exit with 0, got $EXIT_CODE"
|
||||||
|
|
||||||
|
OUTPUT="$(nvm_remote_version iojs-foo)"
|
||||||
|
EXIT_CODE="$(nvm_remote_version iojs-foo >/dev/null 2>&1 ; echo $?)"
|
||||||
|
[ "_$OUTPUT" = "_iojs pattern received: _iojs-foo_" ] \
|
||||||
|
|| die "nvm_remote_version iojs-foo did not return last line only of nvm_ls_remote_iojs foo; got $OUTPUT"
|
||||||
|
[ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_version iojs-foo did not exit with 0, got $EXIT_CODE"
|
||||||
|
|
||||||
|
OUTPUT="$(nvm_remote_version iojs)"
|
||||||
|
EXIT_CODE="$(nvm_remote_version iojs >/dev/null 2>&1 ; echo $?)"
|
||||||
|
[ "_$OUTPUT" = "_iojs pattern received: __" ] \
|
||||||
|
|| 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)"
|
||||||
|
EXIT_CODE="$(nvm_remote_version stable >/dev/null 2>&1 ; echo $?)"
|
||||||
|
[ "_$OUTPUT" = "_$(nvm_ls_remote stable)" ] \
|
||||||
|
|| 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"
|
||||||
|
|
||||||
|
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
|
@ -0,0 +1,78 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; cleanup ; exit 1; }
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
unset -f nvm_ls_remote nvm_ls_remote_iojs
|
||||||
|
}
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
OUTPUT="$(nvm_remote_versions stable 2>&1)"
|
||||||
|
EXPECTED_OUTPUT="Implicit aliases are not supported in nvm_remote_versions."
|
||||||
|
EXIT_CODE="$(nvm_remote_versions stable >/dev/null 2>&1; echo $?)"
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "implicit alias 'stable' did not error out with correct message, got $OUTPUT"
|
||||||
|
[ "_$EXIT_CODE" = "_1" ] || die "implicit alias 'stable' did not exit with code 1, got $EXIT_CODE"
|
||||||
|
|
||||||
|
OUTPUT="$(nvm_remote_versions unstable 2>&1)"
|
||||||
|
EXPECTED_OUTPUT="Implicit aliases are not supported in nvm_remote_versions."
|
||||||
|
EXIT_CODE="$(nvm_remote_versions unstable >/dev/null 2>&1; echo $?)"
|
||||||
|
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "implicit alias 'unstable' did not error out with correct message, got $OUTPUT"
|
||||||
|
[ "_$EXIT_CODE" = "_1" ] || die "implicit alias 'unstable' did not exit with code 1, got $EXIT_CODE"
|
||||||
|
|
||||||
|
nvm_ls_remote() {
|
||||||
|
echo "N/A"
|
||||||
|
}
|
||||||
|
OUTPUT="$(nvm_remote_versions foo)"
|
||||||
|
EXIT_CODE="$(nvm_remote_versions foo >/dev/null 2>&1 ; echo $?)"
|
||||||
|
[ "_$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"
|
||||||
|
|
||||||
|
nvm_ls_remote_iojs() {
|
||||||
|
echo "N/A"
|
||||||
|
}
|
||||||
|
OUTPUT="$(nvm_remote_versions iojs-foo)"
|
||||||
|
EXIT_CODE="$(nvm_remote_versions iojs-foo >/dev/null 2>&1 ; echo $?)"
|
||||||
|
[ "_$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"
|
||||||
|
|
||||||
|
|
||||||
|
nvm_ls_remote() {
|
||||||
|
echo "test output"
|
||||||
|
echo "more test output"
|
||||||
|
echo "pattern received: _$1_"
|
||||||
|
}
|
||||||
|
nvm_ls_remote_iojs() {
|
||||||
|
echo "test iojs output"
|
||||||
|
echo "more iojs test output"
|
||||||
|
echo "iojs pattern received: _$1_"
|
||||||
|
}
|
||||||
|
|
||||||
|
OUTPUT="$(nvm_remote_versions foo)"
|
||||||
|
EXIT_CODE="$(nvm_remote_versions foo >/dev/null 2>&1 ; echo $?)"
|
||||||
|
[ "_$OUTPUT" = "_$(nvm_ls_remote foo)
|
||||||
|
$(nvm_ls_remote_iojs foo)" ] \
|
||||||
|
|| die "nvm_remote_versions foo did not return contents of nvm_ls_remote foo combined with nvm_ls_remote_iojs foo; got $OUTPUT"
|
||||||
|
[ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_versions foo did not exit with 0, got $EXIT_CODE"
|
||||||
|
|
||||||
|
OUTPUT="$(nvm_remote_versions node)"
|
||||||
|
EXIT_CODE="$(nvm_remote_versions node >/dev/null 2>&1 ; echo $?)"
|
||||||
|
[ "_$OUTPUT" = "_$(nvm_ls_remote)" ] \
|
||||||
|
|| die "nvm_remote_versions node did not return contents of nvm_ls_remote; got $OUTPUT"
|
||||||
|
[ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_versions node did not exit with 0, got $EXIT_CODE"
|
||||||
|
|
||||||
|
OUTPUT="$(nvm_remote_versions iojs-foo)"
|
||||||
|
EXIT_CODE="$(nvm_remote_versions iojs-foo >/dev/null 2>&1 ; echo $?)"
|
||||||
|
[ "_$OUTPUT" = "_$(nvm_ls_remote iojs-foo)
|
||||||
|
$(nvm_ls_remote_iojs iojs-foo)" ] \
|
||||||
|
|| die "nvm_remote_versions iojs-foo did not return contents of nvm_ls_remote iojs-foo combined with nvm_ls_remote_iojs iojs-foo; got $OUTPUT"
|
||||||
|
[ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_versions iojs-foo did not exit with 0, got $EXIT_CODE"
|
||||||
|
|
||||||
|
OUTPUT="$(nvm_remote_versions iojs)"
|
||||||
|
EXIT_CODE="$(nvm_remote_versions iojs >/dev/null 2>&1 ; echo $?)"
|
||||||
|
[ "_$OUTPUT" = "_$(nvm_ls_remote_iojs)" ] \
|
||||||
|
|| die "nvm_remote_versions iojs did not return contents of nvm_ls_remote_iojs; got $OUTPUT"
|
||||||
|
[ "_$EXIT_CODE" = "_0" ] || die "nvm_remote_versions iojs did not exit with 0, got $EXIT_CODE"
|
||||||
|
|
||||||
|
cleanup
|
||||||
|
|
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
[ "_$(nvm_strip_iojs_prefix iojs)" = "_" ] || die '"nvm_strip_iojs_prefix iojs" did not return an empty string'
|
||||||
|
[ "_$(nvm_strip_iojs_prefix iojs-)" = "_" ] || die '"nvm_strip_iojs_prefix iojs-" did not return an empty string'
|
||||||
|
[ "_$(nvm_strip_iojs_prefix iojs-foo)" = "_foo" ] || die '"nvm_strip_iojs_prefix iojs-foo" did not return "foo"'
|
||||||
|
[ "_$(nvm_strip_iojs_prefix iojsfoo)" = "_iojsfoo" ] || die '"nvm_strip_iojs_prefix iojsfoo" did not return "iojsfoo"'
|
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
die () { echo $@ ; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
TEST_PATH=$NVM_DIR/v0.10.5/bin:/usr/bin:$NVM_DIR/v0.11.5/bin:$NVM_DIR/v0.9.5/bin:/usr/local/bin:$NVM_DIR/v0.2.5/bin:$NVM_DIR/versions/node/v0.12.0/bin:$NVM_DIR/versions/io.js/v1.0.0/bin
|
||||||
|
|
||||||
|
STRIPPED_PATH=`nvm_strip_path "$TEST_PATH" "/bin"`
|
||||||
|
|
||||||
|
[ "$STRIPPED_PATH" = "/usr/bin:/usr/local/bin" ] || die "Not correctly stripped: $STRIPPED_PATH "
|
@ -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
|
@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cleanup () {
|
||||||
|
rm tmp/node
|
||||||
|
rmdir tmp
|
||||||
|
rm tmp2/node
|
||||||
|
rmdir tmp2
|
||||||
|
}
|
||||||
|
die () { echo $@ ; cleanup; exit 1; }
|
||||||
|
|
||||||
|
. ../../../nvm.sh
|
||||||
|
|
||||||
|
mkdir -p tmp
|
||||||
|
touch tmp/node
|
||||||
|
mkdir -p tmp2
|
||||||
|
touch tmp2/node
|
||||||
|
|
||||||
|
[ "$(nvm_tree_contains_path 2>&1)" = "both the tree and the node path are required" ] || die 'incorrect error message with no args'
|
||||||
|
[ "$(nvm_tree_contains_path > /dev/null 2>&1 ; echo $?)" = "2" ] || die 'incorrect error code with no args'
|
||||||
|
[ "$(nvm_tree_contains_path tmp 2>&1)" = "both the tree and the node path are required" ] || die 'incorrect error message with one arg'
|
||||||
|
[ "$(nvm_tree_contains_path > /dev/null 2>&1 ; echo $?)" = "2" ] || die 'incorrect error code with one arg'
|
||||||
|
|
||||||
|
nvm_tree_contains_path tmp tmp/node || die '"tmp" should contain "tmp/node"'
|
||||||
|
|
||||||
|
nvm_tree_contains_path tmp tmp2/node && die '"tmp" should not contain "tmp2/node"'
|
||||||
|
|
||||||
|
nvm_tree_contains_path tmp2 tmp2/node || die '"tmp2" should contain "tmp2/node"'
|
||||||
|
|
||||||
|
nvm_tree_contains_path tmp2 tmp/node && die '"tmp2" should not contain "tmp/node"'
|
||||||
|
|
||||||
|
cleanup
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue