Skip to content
Myr

[Fix] `install-latest-npm`: `io.js` `v1.0.x` has weird behavior with npm v4.6.x.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

- comment out node 0.6 test due to travis-ci breakage

authored by Jordan Harband · committed by Jordan Harband · parent d91b619 · Browse files · 2 files+16 added−9 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+16 added−9 removed

  • tests:+14 added−7 removed
  • other:+2 added−2 removed

2 files+16 added−9 removed

modified:test/installation_node/install latest npm+14 added-7 removed
13 unmodified lines
14NPM_VERSION="$(npm --version)"15nvm_version_greater_than_or_equal_to "${NPM_VERSION}" 5.0.0 || die "node v4.x updates to ${NPM_VERSION}; expected >= v5"1617nvm deactivate >/dev/null 2>&1 || die 'unable to deactivate: 2'18nvm install 1 >/dev/null 2>&1 || die 'install v1 failed'18nvm install 1.0 >/dev/null 2>&1 || die 'install v1.0 failed'19nvm install-latest-npm || die 'nvm install-latest-npm failed: 2'20NPM_VERSION="$(npm --version)"21[ "${NPM_VERSION}" = '4.6.1' ] || die "io.js v1.x updates to ${NPM_VERSION}; expected v4.6.1"21[ "${NPM_VERSION}" = '4.5.0' ] || die "io.js v1.0.x updates to ${NPM_VERSION}; expected v4.5.0"2223nvm deactivate >/dev/null 2>&1 || die 'unable to deactivate: 3'24nvm install 0.8.27 >/dev/null 2>&1 || die 'install v0.8 failed'24nvm install 1 >/dev/null 2>&1 || die 'install v1 failed'25nvm install-latest-npm || die 'nvm install-latest-npm failed: 3'26NPM_VERSION="$(npm --version)"27[ "${NPM_VERSION}" = '4.5.0' ] || die "node 0.8.27 updates to ${NPM_VERSION}; expected v4.5.0"27[ "${NPM_VERSION}" = '4.6.1' ] || die "io.js v1.x updates to ${NPM_VERSION}; expected v4.6.1"2829nvm deactivate >/dev/null 2>&1 || die 'unable to deactivate: 4'30nvm install 0.6.21 >/dev/null 2>&1 || die 'install v0.6 failed'31export NPM_CONFIG_STRICT_SSL=false # npm 1 on travis can't handle SSL to npm30nvm install 0.8.27 >/dev/null 2>&1 || die 'install v0.8 failed'31nvm install-latest-npm || die 'nvm install-latest-npm failed: 4'32NPM_VERSION="$(npm --version)"33[ "${NPM_VERSION}" = '4.5.0' ] || die "node 0.8.27 updates to ${NPM_VERSION}; expected v4.5.0"3435## Commented to work around travis-ci breaking 0,6 installs36# nvm deactivate >/dev/null 2>&1 || die 'unable to deactivate: 5'37# nvm install 0.6.21 >/dev/null 2>&1 || die 'install v0.6 failed'38# export NPM_CONFIG_STRICT_SSL=false # npm 1 on travis can't handle SSL to npm39# nvm install-latest-npm || die 'nvm install-latest-npm failed: 5'40# NPM_VERSION="$(npm --version)"34[ "${NPM_VERSION}" = '1.3.26' ] || die "node 0.6.21 updates to ${NPM_VERSION}; expected v1.3.26"41# [ "${NPM_VERSION}" = '1.3.26' ] || die "node 0.6.21 updates to ${NPM_VERSION}; expected v1.3.26"
modified:nvm.sh+2 added-2 removed
197 unmodified lines
198 fi199200 if [ $NVM_IS_0_9 -eq 1 ] || [ $NVM_IS_0_6 -eq 1 ]; then201 nvm_echo '* node v0.6 and v0.9 are unable to upgrade further'202 elif nvm_version_greater_than_or_equal_to 1.0.0 "${NODE_VERSION}"; then203 nvm_echo '* `npm` v4.5.x is the last version that works on `node` versions <= v1.0.0'202 elif nvm_version_greater 1.1.0 "${NODE_VERSION}"; then203 nvm_echo '* `npm` v4.5.x is the last version that works on `node` versions < v1.1.0'204 $NVM_NPM_CMD install -g npm@4.5205 elif nvm_version_greater 4.0.0 "${NODE_VERSION}"; then206 nvm_echo '* `npm` v5 and higher do not work on `node` versions below v4.0.0'207 $NVM_NPM_CMD install -g npm@4
3307 unmodified lines