[Tests] `nvm install-latest-npm`: node < 0.10 breaks with npm with dropped support for TLS < 1.2

Jordan Harband 2021-09-29 10:47:34 -07:00
parent 59b0b3942c
commit 07c02d43fe
No known key found for this signature in database
GPG Key ID: 9F6A681E35EF8B56
1 changed files with 8 additions and 6 deletions

View File

@ -26,13 +26,15 @@ nvm install-latest-npm || die 'nvm install-latest-npm failed: 3'
NPM_VERSION="$(npm --version)"
[ "${NPM_VERSION}" = '4.6.1' ] || die "io.js v1.x updates to ${NPM_VERSION}; expected v4.6.1"
export NPM_CONFIG_STRICT_SSL=false # the npm registry tightened up their SSL certs
# export NPM_CONFIG_STRICT_SSL=false # the npm registry tightened up their SSL certs
nvm deactivate >/dev/null 2>&1 || die 'unable to deactivate: 4'
nvm install 0.8.27 >/dev/null 2>&1 || die 'install v0.8 failed'
nvm install-latest-npm || die 'nvm install-latest-npm failed: 4'
NPM_VERSION="$(npm --version)"
[ "${NPM_VERSION}" = '4.5.0' ] || die "node 0.8.27 updates to ${NPM_VERSION}; expected v4.5.0"
## Commented because TLS < 1.2 is dropped, and this breaks npm in node < 0.10
## https://github.blog/2021-08-23-npm-registry-deprecating-tls-1-0-tls-1-1/#detailed-timeline
# nvm deactivate >/dev/null 2>&1 || die 'unable to deactivate: 4'
# nvm install 0.8.27 >/dev/null 2>&1 || die 'install v0.8 failed'
# nvm install-latest-npm || die 'nvm install-latest-npm failed: 4'
# NPM_VERSION="$(npm --version)"
# [ "${NPM_VERSION}" = '4.5.0' ] || die "node 0.8.27 updates to ${NPM_VERSION}; expected v4.5.0"
## Commented to work around travis-ci breaking 0,6 installs
# nvm deactivate >/dev/null 2>&1 || die 'unable to deactivate: 5'