Compare commits

..

4 Commits

Author SHA1 Message Date
Jordan Harband
aa71b65b94 fixup 2019-10-29 12:52:05 -07:00
Jordan Harband
25365b3225 [readme] add OpenJSF logo 2019-10-29 12:33:13 -07:00
Jordan Harband
c0fe20f544 [meta] add OpenJSF CoC reference 2019-10-29 12:34:18 -07:00
Jordan Harband
7d67b26f76 [meta] add CODE_OF_CONDUCT.md 2019-10-29 11:46:36 -07:00
175 changed files with 2301 additions and 7777 deletions

View File

@@ -12,17 +12,11 @@ trim_trailing_whitespace = true
[*.txt]
indent_size = false
[test/fast/Listing versions/Running 'nvm ls' calls into nvm_alias]
[test/fast/Listing versions/Running "nvm ls" calls into nvm_alias]
indent_size = false
[test/fast/Listing versions/Running 'nvm ls --no-alias' does not call into nvm_alias]
[test/fast/Listing versions/Running "nvm ls --no-alias" does not call into nvm_alias]
indent_size = false
[test/fast/Unit tests/mocks/**]
insert_final_newline = off
[test/**/.urchin*]
insert_final_newline = off
[Makefile]
indent_style = tab

12
.github/FUNDING.yml vendored
View File

@@ -1,12 +0,0 @@
# These are supported funding model platforms
github: [ljharb]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/nvm
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

3
.github/SECURITY.md vendored
View File

@@ -1,3 +0,0 @@
# Security
Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.

View File

@@ -1,76 +0,0 @@
name: 'Tests: `nvm install-latest-npm`'
on: [pull_request, push]
jobs:
matrix:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.set-matrix.outputs.requireds }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@v1
with:
allowed-endpoints:
iojs.org:443
nodejs.org:443
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
versionsAsRoot: true
type: majors
preset: '>=1'
nodes:
needs: [matrix]
permissions:
contents: read
name: 'nvm install-latest-npm'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
include:
- node-version: "9.2"
- node-version: "9.1"
- node-version: "9.0"
- node-version: "6.1"
- node-version: "5.9"
- node-version: "4.6"
- node-version: "4.5"
- node-version: "4.4"
- node-version: "0.12"
- node-version: "0.10"
steps:
- name: Harden Runner
uses: step-security/harden-runner@v1
with:
allowed-endpoints:
github.com:443
iojs.org:443
nodejs.org:443
registry.npmjs.org:443
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install-latest-npm'
with:
node-version: ${{ matrix.node-version }}
skip-ls-check: true
skip-install: true
- run: npm --version
node:
permissions:
contents: none
name: 'nvm install-latest-npm'
needs: [nodes]
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@v1
with:
egress-policy: block
- run: 'echo tests completed'

View File

@@ -1,73 +0,0 @@
name: 'Tests: linting'
on: [pull_request, push]
jobs:
eclint:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@v1
with:
allowed-endpoints:
github.com:443
nodejs.org:443
registry.npmjs.org:443
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: 'lts/*'
- run: npm run eclint
dockerfile_lint:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@v1
with:
allowed-endpoints:
ghcr.io:443
github.com:443
pkg-containers.githubusercontent.com:443
nodejs.org:443
registry.npmjs.org:443
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: 'lts/*'
- run: npm run dockerfile_lint
doctoc:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@v1
with:
allowed-endpoints:
github.com:443
nodejs.org:443
registry.npmjs.org:443
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: 'lts/*'
- run: npm run doctoc:check
test_naming:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@v1
with:
allowed-endpoints:
github.com:443
- uses: actions/checkout@v2
- name: check tests filenames
run: ./rename_test.sh --check

View File

@@ -1,23 +0,0 @@
name: Automatic Rebase
on: [pull_request_target]
jobs:
_:
permissions:
contents: write
name: "Automatic Rebase"
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@v1
with:
allowed-endpoints:
api.github.com:443
github.com:443
- uses: actions/checkout@v2
- uses: ljharb/rebase@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,32 +0,0 @@
name: 'Tests: release process'
on: [pull_request, push]
jobs:
release:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@v1
with:
allowed-endpoints:
github.com:443
registry.npmjs.org:443
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14"
- run: npm install
- name: Configure git
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git fetch --unshallow --tags -f || git fetch --tags -f
- name: Attempt `make release` process
run: echo proceed | make TAG=99.99.99 release
env:
GIT_EDITOR: "sed -i '1 s/^/99.99.99 make release test/'"
- name: Ensure tag is created
run: git tag | grep v99.99.99

View File

@@ -1,21 +0,0 @@
name: Require “Allow Edits”
on: [pull_request_target]
jobs:
_:
permissions:
pull-requests: read
name: "Require “Allow Edits”"
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@v1
with:
allowed-endpoints:
api.github.com:443
- uses: ljharb/require-allow-edits@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,55 +0,0 @@
name: 'Tests: shellcheck'
on: [pull_request, push]
jobs:
shellcheck_matrix:
permissions:
contents: read
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shell:
- bash
- sh
- dash
- ksh
file:
- nvm.sh
include:
- shell: bash
file: install.sh # only supported on bash
- shell: bash
file: bash_completion # only needed in bash/zsh
- shell: bash
file: nvm-exec # only runs in bash
steps:
- name: Harden Runner
uses: step-security/harden-runner@v1
with:
allowed-endpoints:
ghcr.io:443
github.com:443
pkg-containers.githubusercontent.com:443
- uses: actions/checkout@v2
- name: Install shellcheck
run: brew install shellcheck
env:
HOMEBREW_NO_ANALYTICS: 1
- run: "shellcheck --version"
- name: Run shellcheck on ${{ matrix.file }}
run: shellcheck -s ${{ matrix.shell }} ${{ matrix.file }}
shellcheck:
permissions:
contents: none
needs: [shellcheck_matrix]
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@v1
with:
egress-policy: block
- run: 'echo tests completed'

View File

@@ -1,37 +0,0 @@
name: update readme TOC
on: [push]
jobs:
_:
permissions:
contents: write
name: "update readme TOC"
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@v1
with:
allowed-endpoints:
github.com:443
registry.npmjs.org:443
- uses: actions/checkout@v2
with:
# https://github.com/actions/checkout/issues/217#issue-599945005
# pulls all commits (needed for lerna / semantic release to correctly version)
fetch-depth: "0"
# pulls all tags (needed for lerna / semantic release to correctly version)
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- uses: actions/setup-node@v2
with:
node-version: '12.x'
- run: npm install
- run: npm run doctoc
- name: commit changes
uses: ljharb/actions-js-build/commit@v3+amendpush
with:
amend: true
force: true

View File

@@ -1,133 +0,0 @@
name: 'Tests on Windows: `nvm install`'
on: [pull_request, push]
env:
NVM_INSTALL_GITHUB_REPO: ${{ github.repository }}
NVM_INSTALL_VERSION: ${{ github.sha }}
jobs:
msys_fail_install:
# Default installation does not work due to npm_config_prefix set to C:\npm\prefix
permissions:
contents: none
name: 'MSYS fail prefix nvm install'
runs-on: windows-latest
steps:
- name: Retrieve nvm
shell: bash
run: |
curl -fsSLo- "https://raw.githubusercontent.com/${NVM_INSTALL_GITHUB_REPO}/${NVM_INSTALL_VERSION}/install.sh" | METHOD=script bash
. "$HOME/.nvm/nvm.sh"
! nvm install --lts
msys_matrix:
permissions:
contents: none
name: 'MSYS nvm install'
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
npm-node-version:
- '--lts'
- '--default 12'
- '--no-progress 10'
steps:
- name: Retrieve nvm
shell: bash
run: |
unset npm_config_prefix
if [ "${{ matrix.npm-node-version }}" = "--lts" ]; then
curl -fsSLo- "https://raw.githubusercontent.com/${NVM_INSTALL_GITHUB_REPO}/${NVM_INSTALL_VERSION}/install.sh" | bash
else
curl -fsSLo- "https://raw.githubusercontent.com/${NVM_INSTALL_GITHUB_REPO}/${NVM_INSTALL_VERSION}/install.sh" | METHOD=script bash
fi
. "$HOME/.nvm/nvm.sh"
nvm install ${{ matrix.npm-node-version }}
cygwin_matrix:
permissions:
contents: none
name: 'Cygwin nvm install'
runs-on: windows-latest
steps:
- name: Install Cygwin
shell: bash
run: |
export SITE='https://mirror.clarkson.edu/cygwin/'
export LOCALDIR="$(pwd)"
export ROOTDIR="$USERPROFILE\\cygwin"
export PACKAGES='bash,git,curl'
curl -fsSLo setup-x86_64.exe 'https://cygwin.com/setup-x86_64.exe'
./setup-x86_64.exe --disable-buggy-antivirus -q -s "$SITE" -l "$LOCALDIR" -R "$ROOTDIR" -P "$PACKAGES"
cat >~/setup.sh <<EOM
unset npm_config_prefix
export NVM_INSTALL_GITHUB_REPO="$NVM_INSTALL_GITHUB_REPO"
export NVM_INSTALL_VERSION="$NVM_INSTALL_VERSION"
curl -fsSLo- "https://raw.githubusercontent.com/${NVM_INSTALL_GITHUB_REPO}/${NVM_INSTALL_VERSION}/install.sh" | bash
. "$HOME/.nvm/nvm.sh"
nvm install --lts
nvm deactivate
rm -rf "$HOME/.nvm/nvm.sh"
curl -fsSLo- "https://raw.githubusercontent.com/${NVM_INSTALL_GITHUB_REPO}/${NVM_INSTALL_VERSION}/install.sh" | METHOD=script bash
. "$HOME/.nvm/nvm.sh"
nvm install 9
EOM
- name: Retrieve nvm
shell: cmd
run: |
cd %USERPROFILE%\cygwin\bin
bash.exe "%USERPROFILE%\setup.sh"
wsl_matrix:
name: 'WSL nvm install'
defaults:
run:
shell: wsl-bash {0}
runs-on: windows-latest
env:
WSLENV: NVM_INSTALL_GITHUB_REPO:NVM_INSTALL_VERSION:/p
strategy:
fail-fast: false
matrix:
wsl-distrib:
- Debian
- Alpine
- Ubuntu-18.04
npm-node-version:
- '--lts'
- '14'
- '12'
- '11'
- '10'
method:
- ''
- 'script'
steps:
- uses: Vampire/setup-wsl@v1
with:
distribution: ${{ matrix.wsl-distrib }}
additional-packages: bash git curl ca-certificates wget
- name: Retrieve nvm on WSL
run: |
if [ -z "${{ matrix.method }}" ]; then
curl -fsSLo- "https://raw.githubusercontent.com/${NVM_INSTALL_GITHUB_REPO}/${NVM_INSTALL_VERSION}/install.sh" | bash
else
curl -fsSLo- "https://raw.githubusercontent.com/${NVM_INSTALL_GITHUB_REPO}/${NVM_INSTALL_VERSION}/install.sh" | METHOD="${{matrix.method}}" bash
fi
. "$HOME/.nvm/nvm.sh"
nvm install ${{ matrix.npm-node-version }}
nvm_windows:
permissions:
contents: none
needs: [wsl_matrix, cygwin_matrix, msys_matrix, msys_fail_install]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'

View File

@@ -1,5 +1,6 @@
language: generic
dist: xenial
sudo: required
addons:
apt:
packages:
@@ -11,24 +12,28 @@ addons:
cache:
ccache: true
directories:
- $HOME/.npm
- $TRAVIS_BUILD_DIR/.cache
- $TRAVIS_BUILD_DIR/node_modules
before_install:
- sudo sed -i 's/mozilla\/DST_Root_CA_X3.crt/!mozilla\/DST_Root_CA_X3.crt/g' /etc/ca-certificates.conf
- sudo update-ca-certificates -f
- $SHELL --version 2> /dev/null || dpkg -s $SHELL 2> /dev/null || which $SHELL
- curl --version
- wget --version
- bash --version | head
- zsh --version
- dpkg -s dash | grep ^Version | awk '{print $2}'
- shellcheck --version
install:
- if [ -z "${SHELLCHECK-}" ]; then nvm install node && npm install && npm prune && npm ls urchin doctoc eclint dockerfile_lint; fi
- '[ -z "$WITHOUT_CURL" ] || sudo apt-get remove curl -y'
script:
- if [ -n "${MAKE_RELEASE-}" ]; then export GIT_EDITOR="sed -i '1 s/^/99.99.99 make release test/'" && git fetch --unshallow --tags && echo proceed | make TAG=99.99.99 release ; fi
- if [ -n "${DOCTOCCHECK-}" ]; then cp README.md README.md.orig && npm run doctoc && diff -q README.md README.md.orig ; fi
- if [ -n "${ECLINT-}" ]; then npm run eclint ; fi
- if [ -n "${DOCKERFILE_LINT-}" ]; then npm run dockerfile_lint ; fi
- if [ -n "${SHELLCHECK-}" ]; then shellcheck -s bash nvm.sh && shellcheck -s sh nvm.sh && shellcheck -s dash nvm.sh && shellcheck -s ksh nvm.sh ; fi
- if [ -n "${SHELLCHECK-}" ]; then shellcheck -s bash install.sh bash_completion nvm-exec ; fi
- if [ -n "${SHELL-}" ] && [ -n "${TEST_SUITE}" ]; then if [ "${TEST_SUITE}" = 'installation_iojs' ]; then travis_retry make TEST_SUITE=$TEST_SUITE URCHIN="$(npm bin)/urchin" test-$SHELL ; else make TEST_SUITE=$TEST_SUITE URCHIN="$(npm bin)/urchin" test-$SHELL; fi; fi
before_cache:
- if [ -n "$WITHOUT_CURL" ]; then sudo apt-get install curl -y ; fi
- if [ -n "${NODE-}" ]; then . nvm.sh && set -ex && nvm install --latest-npm "${NODE}" && npm --version; fi
env:
global:
- CXX=g++
@@ -37,22 +42,27 @@ env:
- PATH="/usr/lib/ccache/:$PATH"
- NVM_DIR="${TRAVIS_BUILD_DIR}"
matrix:
- MAKE_RELEASE=true
- DOCTOCCHECK=true
- SHELLCHECK=true
- ECLINT=true
- DOCKERFILE_LINT=true
- SHELL=bash TEST_SUITE=install_script
- SHELL=sh TEST_SUITE=fast
- SHELL=dash TEST_SUITE=fast
- SHELL=bash TEST_SUITE=fast
- SHELL=zsh TEST_SUITE=fast
# - SHELL=ksh TEST_SUITE=fast
# - SHELL=ksh TEST_SUITE=fast
- SHELL=sh TEST_SUITE=sourcing
- SHELL=dash TEST_SUITE=sourcing
- SHELL=bash TEST_SUITE=sourcing
- SHELL=zsh TEST_SUITE=sourcing
# - SHELL=ksh TEST_SUITE=sourcing
# - SHELL=ksh TEST_SUITE=sourcing
- SHELL=sh TEST_SUITE=slow
- SHELL=dash TEST_SUITE=slow
- SHELL=bash TEST_SUITE=slow
- SHELL=zsh TEST_SUITE=slow
# - SHELL=ksh TEST_SUITE=slow
# - SHELL=ksh TEST_SUITE=slow
- SHELL=sh TEST_SUITE=installation_node
- SHELL=sh TEST_SUITE=installation_node WITHOUT_CURL=1
- SHELL=dash TEST_SUITE=installation_node
@@ -61,8 +71,8 @@ env:
- SHELL=bash TEST_SUITE=installation_node WITHOUT_CURL=1
- SHELL=zsh TEST_SUITE=installation_node
- SHELL=zsh TEST_SUITE=installation_node WITHOUT_CURL=1
# - SHELL=ksh TEST_SUITE=installation_node
# - SHELL=ksh TEST_SUITE=installation_node WITHOUT_CURL=1
# - SHELL=ksh TEST_SUITE=installation_node
# - SHELL=ksh TEST_SUITE=installation_node WITHOUT_CURL=1
- SHELL=sh TEST_SUITE=installation_iojs
- SHELL=sh TEST_SUITE=installation_iojs WITHOUT_CURL=1
- SHELL=dash TEST_SUITE=installation_iojs
@@ -71,5 +81,17 @@ env:
- SHELL=bash TEST_SUITE=installation_iojs WITHOUT_CURL=1
- SHELL=zsh TEST_SUITE=installation_iojs
- SHELL=zsh TEST_SUITE=installation_iojs WITHOUT_CURL=1
# - SHELL=ksh TEST_SUITE=installation_iojs
# - SHELL=ksh TEST_SUITE=installation_iojs WITHOUT_CURL=1
# - SHELL=ksh TEST_SUITE=installation_iojs
# - SHELL=ksh TEST_SUITE=installation_iojs WITHOUT_CURL=1
- NODE=10 TEST="nvm install-latest-npm"
- NODE=9 TEST="nvm install-latest-npm"
- NODE=8 TEST="nvm install-latest-npm"
- NODE=7 TEST="nvm install-latest-npm"
- NODE=6 TEST="nvm install-latest-npm"
- NODE=5 TEST="nvm install-latest-npm"
- NODE=5.9 TEST="nvm install-latest-npm"
- NODE=4 TEST="nvm install-latest-npm"
- NODE=4.6 TEST="nvm install-latest-npm"
- NODE=4.5 TEST="nvm install-latest-npm"
- NODE=4.4 TEST="nvm install-latest-npm"
- NODE=2 TEST="nvm install-latest-npm"

View File

@@ -1,52 +1,18 @@
# Code of Conduct
# Contributor Covenant Code of Conduct
`nvm`, as a member project of the OpenJS Foundation, uses [Contributor Covenant v1.4](https://www.contributor-covenant.org/version/1/4/code-of-conduct) as their code of conduct. The full text is included [below](#contributor-covenant-code-of-conduct) in English, and translations are available from the Contributor Covenant organisation:
- [contributor-covenant.org/translations](https://www.contributor-covenant.org/translations)
- [github.com/ContributorCovenant](https://github.com/ContributorCovenant/contributor_covenant/tree/release/content/version/1/4)
Refer to the sections on reporting and escalation in this document for the specific emails that can be used to report and escalate issues.
## Reporting
### Project Spaces
For reporting issues in spaces related to `nvm` please use the email `ljharb@gmail.com`. `nvm` handles CoC issues related to the spaces that it maintains. Projects maintainers commit to:
- maintain the confidentiality with regard to the reporter of an incident
- to participate in the path for escalation as outlined in
the section on Escalation when required.
### Foundation Spaces
For reporting issues in spaces managed by the OpenJS Foundation, for example, repositories within the OpenJS organization, use the email `report@lists.openjsf.org`. The Cross Project Council (CPC) is responsible for managing these reports and commits to:
- maintain the confidentiality with regard to the reporter of an incident
- to participate in the path for escalation as outlined in
the section on Escalation when required.
## Escalation
The OpenJS Foundation maintains a Code of Conduct Panel (CoCP). This is a foundation-wide team established to manage escalation when a reporter believes that a report to a member project or the CPC has not been properly handled. In order to escalate to the CoCP send an email to `coc-escalation@lists.openjsf.org`.
For more information, refer to the full [Code of Conduct governance document](https://github.com/openjs-foundation/cross-project-council/blob/master/CODE_OF_CONDUCT.md).
---
## Contributor Covenant Code of Conduct
### Our Pledge
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
### Our Standards
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
@@ -56,13 +22,16 @@ Examples of behavior that contributes to creating a positive environment include
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
### Our Responsibilities
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
@@ -74,7 +43,7 @@ that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
### Scope
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
@@ -83,16 +52,14 @@ address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
### Enforcement
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at the email addresses listed above in
the [Reporting](#reporting) and [Escalation](#escalation) sections. All
reported by contacting the project team at ljharb@gmail.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an
incident. Further details of specific enforcement policies may be posted
separately.
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
@@ -101,6 +68,14 @@ members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [https://www.contributor-covenant.org/version/1/4/code-of-conduct/](https://www.contributor-covenant.org/version/1/4/code-of-conduct/)
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
## OpenJS Foundation
As a member of the OpenJS Foundation, this project also follows the Foundations overarching
[Code of Conduct](https://github.com/openjs-foundation/cross-project-council/blob/master/CODE_OF_CONDUCT.md).

View File

@@ -6,7 +6,9 @@
# Please note that it'll use about 1.2 GB disk space and about 15 minutes to
# build this image, it depends on your hardware.
FROM ubuntu:18.04
# Use Ubuntu Trusty Tahr as base image as we're using on Travis CI
# I also tested with Ubuntu 16.04, should be good with it!
FROM ubuntu:14.04
LABEL maintainer="Peter Dave Hello <hsu@peterdavehello.org>"
LABEL name="nvm-dev-env"
LABEL version="latest"
@@ -18,7 +20,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV DEBIAN_FRONTEND noninteractive
# ShellCheck version
ENV SHELLCHECK_VERSION=0.7.0
ENV SHELLCHECK_VERSION=0.6.0
# Pick a Ubuntu apt mirror site for better speed
# ref: https://launchpad.net/ubuntu/+archivemirrors
@@ -41,7 +43,6 @@ RUN apt update && \
file \
openssl \
libssl-dev \
locales \
ca-certificates \
ssh \
wget \
@@ -54,6 +55,7 @@ RUN apt update && \
curl \
git \
jq \
realpath \
zsh \
ksh \
gcc-4.8 \
@@ -63,11 +65,14 @@ RUN apt update && \
bash-completion && \
apt-get clean
RUN wget https://github.com/koalaman/shellcheck/releases/download/v$SHELLCHECK_VERSION/shellcheck-v$SHELLCHECK_VERSION.linux.x86_64.tar.xz -O- | \
# ShellCheck with Ubuntu 14.04 container workaround
RUN wget https://storage.googleapis.com/shellcheck/shellcheck-v$SHELLCHECK_VERSION.linux.x86_64.tar.xz -O- | \
tar xJvf - shellcheck-v$SHELLCHECK_VERSION/shellcheck && \
mv shellcheck-v$SHELLCHECK_VERSION/shellcheck /bin && \
rmdir shellcheck-v$SHELLCHECK_VERSION
RUN shellcheck -V
rmdir shellcheck-v$SHELLCHECK_VERSION && \
touch /tmp/libc.so.6 && \
echo "alias shellcheck='LD_LIBRARY_PATH=/tmp /bin/shellcheck'" >> /etc/bash.bashrc
RUN LD_LIBRARY_PATH=/tmp shellcheck -V
# Set locale
RUN locale-gen en_US.UTF-8

View File

@@ -1,10 +0,0 @@
# `nvm` Project Governance
## Maintainers
- [@ljharb](https://github.com/ljharb)
Maintainers are responsible for issue/PR triage, feature additions, maintenance, bugfixes, security fixes, releases, promoting existing contributors to maintainers, managing repo and CI configuration, etc.
## Contributors
Anyone who contributes code or content or time, via issues or pull requests or otherwise. Contributors do not have any additional permissions on the project.

View File

@@ -80,6 +80,6 @@ release: _ensure-tag _ensure-clean _ensure-current-version
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) && \
replace "$$old_ver" "$$new_ver" -- $(VERSIONED_FILES) && \
git commit -m "v$$new_ver" $(VERSIONED_FILES) && \
git tag -a "v$$new_ver"

View File

@@ -1,49 +0,0 @@
# `nvm` Charter
nvm is a version manager for Node.js, designed to be installed per-user, and invoked per-shell. nvm works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: unix, macOS, and Windows WSL.
## Section 0: Guiding Principles
The `nvm` project is part of the [OpenJS Foundation][openjs foundation], which operates transparently, openly, collaboratively, and ethically. Project proposals, timelines, and status must not merely be open, but also easily visible to outsiders.
## Section 1: Scope
`nvm` is a node version manager, focused on making it easy to install and manage multiple Node.js versions. Any features related to managing the installation and removal of Node.js on any node-supported platform are potentially in scope.
## Section 2: Relationship with OpenJS Foundation CPC.
Technical leadership for the projects within the [OpenJS Foundation][openjs foundation] is delegated to the projects through their project charters by the [OpenJS Foundation Cross-Project Council](https://openjsf.org/about/governance/) (CPC). In the case of the `nvm` project, it is delegated to the [`nvm` Maintainers](README.md#maintainers) (the “Maintainers”). The OpenJS Foundation's business leadership is the Board of Directors (the “Board”).
This `nvm` Charter reflects a carefully constructed balanced role for the Maintainers and the CPC in the governance of the OpenJS Foundation. The charter amendment process is for the Maintainers to propose changes using simple majority of the full Maintainers, the proposed changes being subject to review and approval by the CPC. The CPC may additionally make amendments to the project charter at any time, though the CPC will not interfere with day-to-day discussions, votes or meetings of the Maintainers.
### 2.1 Other Formal Project Relationships
Section Intentionally Left Blank
## Section 3: `nvm`'s Maintainers Governing Body
`nvm` is governed by its [maintainers](README.md#maintainers).
## Section 4: Roles & Responsibilities
The roles and responsibilities of `nvm`'s Maintainers are described in [GOVERNANCE.md](./GOVERNANCE.md).
### Section 4.1 Project Operations & Management
Section Intentionally Left Blank
### Section 4.2: Decision-making, Voting, and/or Elections
Section Intentionally Left Blank
### Section 4.3: Other Project Roles
Section Intentionally Left Blank
## Section 5: Definitions
- *Contributors*: contribute code or other artifacts, but do not have the right to commit to the codebase. Contributors work with the projects maintainers to have code committed to the code base. A Contributor may be promoted to a Maintainer by the Maintainers. Contributors should rarely be encumbered by the Maintainers and never by the CPC or OpenJS Foundation Board.
- *Maintainers*: Contributors with any kind of decision-making authority in the project.
[openjs foundation]: https://openjsf.org

431
README.md
View File

@@ -1,102 +1,62 @@
# Node Version Manager [![Build Status](https://travis-ci.org/nvm-sh/nvm.svg?branch=master)][3] [![nvm version](https://img.shields.io/badge/version-v0.39.1-yellow.svg)][4] [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/684/badge)](https://bestpractices.coreinfrastructure.org/projects/684)
# Node Version Manager [![Build Status](https://travis-ci.org/nvm-sh/nvm.svg?branch=master)][3] [![nvm version](https://img.shields.io/badge/version-v0.35.0-yellow.svg)][4] [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/684/badge)](https://bestpractices.coreinfrastructure.org/projects/684)
<br />
`nvm` is an <img alt="OpenJS Foundation" src="https://raw.githubusercontent.com/openjs-foundation/cross-project-council/master/logos/openjsf-color.png" width="150" align="left" /> project, and we follow our <a href="https://github.com/nvm-sh/nvm/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a>.
<br /><br />
<!-- To update this table of contents, ensure you have run `npm install` then `npm run doctoc` -->
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
## Table of Contents
- [Intro](#intro)
- [About](#about)
- [Installing and Updating](#installing-and-updating)
- [Install & Update Script](#install--update-script)
- [Additional Notes](#additional-notes)
- [Troubleshooting on Linux](#troubleshooting-on-linux)
- [Troubleshooting on macOS](#troubleshooting-on-macos)
- [Installation and Update](#installation-and-update)
- [Install & Update script](#install--update-script)
- [Ansible](#ansible)
- [Verify Installation](#verify-installation)
- [Verify installation](#verify-installation)
- [Important Notes](#important-notes)
- [Git Install](#git-install)
- [Git install](#git-install)
- [Manual Install](#manual-install)
- [Manual Upgrade](#manual-upgrade)
- [Manual upgrade](#manual-upgrade)
- [Usage](#usage)
- [Long-term Support](#long-term-support)
- [Migrating Global Packages While Installing](#migrating-global-packages-while-installing)
- [Default Global Packages From File While Installing](#default-global-packages-from-file-while-installing)
- [Long-term support](#long-term-support)
- [Migrating global packages while installing](#migrating-global-packages-while-installing)
- [Default global packages from file while installing](#default-global-packages-from-file-while-installing)
- [io.js](#iojs)
- [System Version of Node](#system-version-of-node)
- [Listing Versions](#listing-versions)
- [Setting Custom Colors](#setting-custom-colors)
- [Persisting custom colors](#persisting-custom-colors)
- [System version of node](#system-version-of-node)
- [Listing versions](#listing-versions)
- [Suppressing colorized output](#suppressing-colorized-output)
- [Restoring PATH](#restoring-path)
- [Set default node version](#set-default-node-version)
- [Use a mirror of node binaries](#use-a-mirror-of-node-binaries)
- [.nvmrc](#nvmrc)
- [Deeper Shell Integration](#deeper-shell-integration)
- [bash](#bash)
- [Automatically call `nvm use`](#automatically-call-nvm-use)
- [zsh](#zsh)
- [Calling `nvm use` automatically in a directory with a `.nvmrc` file](#calling-nvm-use-automatically-in-a-directory-with-a-nvmrc-file)
- [fish](#fish)
- [Calling `nvm use` automatically in a directory with a `.nvmrc` file](#calling-nvm-use-automatically-in-a-directory-with-a-nvmrc-file-1)
- [Running Tests](#running-tests)
- [Environment variables](#environment-variables)
- [Bash Completion](#bash-completion)
- [License](#license)
- [Running tests](#running-tests)
- [Bash completion](#bash-completion)
- [Usage](#usage-1)
- [Compatibility Issues](#compatibility-issues)
- [Installing nvm on Alpine Linux](#installing-nvm-on-alpine-linux)
- [Uninstalling / Removal](#uninstalling--removal)
- [Removal](#removal)
- [Manual Uninstall](#manual-uninstall)
- [Docker For Development Environment](#docker-for-development-environment)
- [Docker for development environment](#docker-for-development-environment)
- [Problems](#problems)
- [macOS Troubleshooting](#macos-troubleshooting)
- [Maintainers](#maintainers)
- [License](#license)
- [Copyright notice](#copyright-notice)
- [Mac OS "troubleshooting"](#mac-os-troubleshooting)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
## Intro
## Installation and Update
`nvm` allows you to quickly install and use different versions of node via the command line.
**Example:**
```sh
$ nvm use 16
Now using node v16.9.1 (npm v7.21.1)
$ node -v
v16.9.1
$ nvm use 14
Now using node v14.18.0 (npm v6.14.15)
$ node -v
v14.18.0
$ nvm install 12
Now using node v12.22.6 (npm v6.14.5)
$ node -v
v12.22.6
```
Simple as that!
## About
nvm is a version manager for [node.js](https://nodejs.org/en/), designed to be installed per-user, and invoked per-shell. `nvm` works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: unix, macOS, and [windows WSL](https://github.com/nvm-sh/nvm#important-notes).
<a id="installation-and-update"></a>
<a id="install-script"></a>
## Installing and Updating
### Install & Update Script
### Install & Update script
To **install** or **update** nvm, you should run the [install script][2]. To do that, you may either download and run the script manually, or use the following cURL or Wget command:
```sh
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
```
```sh
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
```
Running either of the above commands downloads a script and runs it. The script clones the nvm repository to `~/.nvm`, and attempts to add the source lines from the snippet below to the correct profile file (`~/.bash_profile`, `~/.zshrc`, `~/.profile`, or `~/.bashrc`).
Running either of the above commands downloads a script and runs it. The script clones the nvm repository to `~/.nvm`, and adds the source lines from the snippet below to your profile (`~/.bash_profile`, `~/.zshrc`, `~/.profile`, or `~/.bashrc`).
<a id="profile_snippet"></a>
```sh
@@ -104,69 +64,42 @@ export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || pr
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
```
#### Additional Notes
<sub>**Note:** If the environment variable `$XDG_CONFIG_HOME` is present, it will place the `nvm` files there.</sub>
- If the environment variable `$XDG_CONFIG_HOME` is present, it will place the `nvm` files there.</sub>
**Note:** You can add `--no-use` to the end of the above script (...`nvm.sh --no-use`) to postpone using `nvm` until you manually [`use`](#usage) it.
- You can add `--no-use` to the end of the above script (...`nvm.sh --no-use`) to postpone using `nvm` until you manually [`use`](#usage) it.
- You can customize the install source, directory, profile, and version using the `NVM_SOURCE`, `NVM_DIR`, `PROFILE`, and `NODE_VERSION` variables.
You can customize the install source, directory, profile, and version using the `NVM_SOURCE`, `NVM_DIR`, `PROFILE`, and `NODE_VERSION` variables.
Eg: `curl ... | NVM_DIR="path/to/nvm"`. Ensure that the `NVM_DIR` does not contain a trailing slash.
- The installer can use `git`, `curl`, or `wget` to download `nvm`, whichever is available.
<sub>*NB. The installer can use `git`, `curl`, or `wget` to download `nvm`, whatever is available.*</sub>
#### Troubleshooting on Linux
**Note:** On Linux, after running the install script, if you get `nvm: command not found` or see no feedback from your terminal after you type `command -v nvm`, simply close your current terminal, open a new terminal, and try verifying again.
On Linux, after running the install script, if you get `nvm: command not found` or see no feedback from your terminal after you type `command -v nvm`, simply close your current terminal, open a new terminal, and try verifying again.
Alternatively, you can run the following commands for the different shells on the command line:
**Note:** Since OS X 10.9, `/usr/bin/git` has been preset by Xcode command line tools, which means we can't properly detect if Git is installed or not. You need to manually install the Xcode command line tools before running the install script, otherwise, it'll fail. (see [#1782](https://github.com/nvm-sh/nvm/issues/1782))
*bash*: `source ~/.bashrc`
**Note:** On OS X, if you get `nvm: command not found` after running the install script, one of the following might be the reason:
*zsh*: `source ~/.zshrc`
*ksh*: `. ~/.profile`
These should pick up the `nvm` command.
#### Troubleshooting on macOS
Since OS X 10.9, `/usr/bin/git` has been preset by Xcode command line tools, which means we can't properly detect if Git is installed or not. You need to manually install the Xcode command line tools before running the install script, otherwise, it'll fail. (see [#1782](https://github.com/nvm-sh/nvm/issues/1782))
If you get `nvm: command not found` after running the install script, one of the following might be the reason:
- Since macOS 10.15, the default shell is `zsh` and nvm will look for `.zshrc` to update, none is installed by default. Create one with `touch ~/.zshrc` and run the install script again.
- If you use bash, the previous default shell, your system may not have a `.bash_profile` file where the command is set up. Create one with `touch ~/.bash_profile` and run the install script again. Then, run `source ~/.bash_profile` to pick up the `nvm` command.
- You have previously used `bash`, but you have `zsh` installed. You need to manually add [these lines](#manual-install) to `~/.zshrc` and run `. ~/.zshrc`.
- You might need to restart your terminal instance or run `. ~/.nvm/nvm.sh`. Restarting your terminal/opening a new tab/window, or running the source command will load the command and the new configuration.
- If the above didn't help, you might need to restart your terminal instance. Try opening a new tab/window in your terminal and retry.
- Your system may not have a `.bash_profile` file where the command is set up. Create one with `touch ~/.bash_profile` and run the install script again
- You might need to restart your terminal instance. Try opening a new tab/window in your terminal and retry.
If the above doesn't fix the problem, you may try the following:
- Open your `.bash_profile` (or `~/.zshrc`, `~/.profile`, or `~/.bashrc`) and add the following line of code: `source ~/<your_profile_file>`. E.g. `source ~/.bashrc` or `source ~/.zshrc`.
- If the above don't work, try adding the [snippet from the install section](#profile_snippet) that finds the correct nvm directory and loads nvm, to your profile (`~/.bash_profile`, `~/.zshrc`, `~/.profile`, or `~/.bashrc`).
- If you use bash, it may be that your `.bash_profile` (or `~/.profile`) does not source your `~/.bashrc` properly. You could fix this by adding `source ~/<your_profile_file>` to it or follow the next step below.
- Try adding [the snippet from the install section](#profile_snippet), that finds the correct nvm directory and loads nvm, to your usual profile (`~/.bash_profile`, `~/.zshrc`, `~/.profile`, or `~/.bashrc`).
- For more information about this issue and possible workarounds, please [refer here](https://github.com/nvm-sh/nvm/issues/576)
**Note** For Macs with the M1 chip, node started providing **arm64** arch darwin packages since v16.0.0. For earlier versions, there were only **darwin_x64** packages available but no **darwin_arm64**. If you are facing issues installing node using `nvm`, you may want to update to v16 or later.
- For more information about this issue and possible workarounds, please [refer here](https://github.com/nvm-sh/nvm/issues/576)
#### Ansible
You can use a task:
You can use a task:
```yaml
```
- name: nvm
shell: >
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
args:
creates: "{{ ansible_env.HOME }}/.nvm/nvm.sh"
```
### Verify Installation
### Verify installation
To verify that nvm has been installed, do:
@@ -176,17 +109,14 @@ command -v nvm
which should output `nvm` if the installation was successful. Please note that `which nvm` will not work, since `nvm` is a sourced shell function, not an executable binary.
**Note:** On Linux, after running the install script, if you get `nvm: command not found` or see no feedback from your terminal after you type `command -v nvm`, simply close your current terminal, open a new terminal, and try verifying again.
### Important Notes
If you're running a system without prepackaged binary available, which means you're going to install nodejs or io.js from its source code, you need to make sure your system has a C++ compiler. For OS X, Xcode will work, for Debian/Ubuntu based GNU/Linux, the `build-essential` and `libssl-dev` packages work.
**Note:** `nvm` also support Windows in some cases. It should work through WSL (Windows Subsystem for Linux) depending on the version of WSL. It should also work with [GitBash](https://gitforwindows.org/) (MSYS) or [Cygwin](https://cygwin.com). Otherwise, for Windows, a few alternatives exist, which are neither supported nor developed by us:
**Note:** `nvm` does not support Windows (see [#284](https://github.com/nvm-sh/nvm/issues/284)), but may work in WSL (Windows Subsystem for Linux) depending on the version of WSL. For Windows, two alternatives exist, which are neither supported nor developed by us:
- [nvm-windows](https://github.com/coreybutler/nvm-windows)
- [nodist](https://github.com/marcelklehr/nodist)
- [nvs](https://github.com/jasongin/nvs)
**Note:** `nvm` does not support [Fish] either (see [#303](https://github.com/nvm-sh/nvm/issues/303)). Alternatives exist, which are neither supported nor developed by us:
@@ -217,14 +147,14 @@ Homebrew installation is not supported. If you have issues with homebrew-install
**Note:** Git versions before v1.7 may face a problem of cloning `nvm` source from GitHub via https protocol, and there is also different behavior of git before v1.6, and git prior to [v1.17.10](https://github.com/git/git/commit/5a7d5b683f869d3e3884a89775241afa515da9e7) can not clone tags, so the minimum required git version is v1.7.10. If you are interested in the problem we mentioned here, please refer to GitHub's [HTTPS cloning errors](https://help.github.com/articles/https-cloning-errors/) article.
### Git Install
### Git install
If you have `git` installed (requires git v1.7.10+):
1. clone this repo in the root of your user profile
- `cd ~/` from anywhere then `git clone https://github.com/nvm-sh/nvm.git .nvm`
1. `cd ~/.nvm` and check out the latest version with `git checkout v0.39.1`
1. activate `nvm` by sourcing it from your shell: `. ./nvm.sh`
1. `cd ~/.nvm` and check out the latest version with `git checkout v0.35.0`
1. activate `nvm` by sourcing it from your shell: `. nvm.sh`
Now add these lines to your `~/.bashrc`, `~/.profile`, or `~/.zshrc` file to have it automatically sourced upon login:
(you may have to add to more than one of the above files)
@@ -253,10 +183,9 @@ Now add these lines to your `~/.bashrc`, `~/.profile`, or `~/.zshrc` file to hav
```sh
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
```
### Manual Upgrade
### Manual upgrade
For manual upgrade with `git` (requires git v1.7.10+):
@@ -284,7 +213,7 @@ nvm install node # "node" is an alias for the latest version
To install a specific version of node:
```sh
nvm install 14.7.0 # or 16.3.0, 12.22.1, etc
nvm install 6.14.4 # or 10.10.0, 8.9.1, etc
```
The first version installed becomes the default. New shells will start with the default version of node (e.g., `nvm alias default`).
@@ -316,17 +245,17 @@ nvm exec 4.2 node --version
You can also get the path to the executable to where it was installed:
```sh
nvm which 12.22
nvm which 5.0
```
In place of a version pointer like "14.7" or "16.3" or "12.22.1", you can use the following special default aliases with `nvm install`, `nvm use`, `nvm run`, `nvm exec`, `nvm which`, etc:
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).
### Long-term Support
### Long-term support
Node has a [schedule](https://github.com/nodejs/Release#release-schedule) for long-term support (LTS) You can reference LTS versions in aliases and `.nvmrc` files with the notation `lts/*` for the latest LTS, and `lts/argon` for LTS releases from the "argon" line, for example. In addition, the following commands support LTS arguments:
@@ -340,13 +269,7 @@ Node has a [schedule](https://github.com/nodejs/Release#release-schedule) for lo
Any time your local copy of `nvm` connects to https://nodejs.org, it will re-create the appropriate local aliases for all available LTS lines. These aliases (stored under `$NVM_DIR/alias/lts`), are managed by `nvm`, and you should not modify, remove, or create these files - expect your changes to be undone, and expect meddling with these files to cause bugs that will likely not be supported.
To get the latest LTS version of node and migrate your existing installed packages, use
```sh
nvm install 'lts/*' --reinstall-packages-from=current
```
### Migrating Global Packages While Installing
### Migrating global packages while installing
If you want to install a new version of Node.js and migrate npm packages from a previous version:
@@ -368,7 +291,7 @@ Note that reinstalling packages _explicitly does not update the npm version_ —
To update npm at the same time add the `--latest-npm` flag, like this:
```sh
nvm install 'lts/*' --reinstall-packages-from=default --latest-npm
nvm install lts/* --reinstall-packages-from=default --latest-npm
```
or, you can at any time run the following command to get the latest supported npm version on the current node version:
@@ -379,7 +302,7 @@ nvm install-latest-npm
If you've already gotten an error to the effect of "npm does not support Node.js", you'll need to (1) revert to a previous node version (`nvm ls` & `nvm use <your latest _working_ version from the ls>`, (2) delete the newly created node version (`nvm uninstall <your _broken_ version of node from the ls>`), then (3) rerun your `nvm install` with the `--latest-npm` flag.
### Default Global Packages From File While Installing
### Default global packages from file while installing
If you have a list of default packages you want installed every time you install a new version, we support that too -- just add the package names, one per line, to the file `$NVM_DIR/default-packages`. You can add anything npm would accept as a package argument on the command line.
@@ -407,7 +330,7 @@ nvm install iojs --reinstall-packages-from=iojs
The same guidelines mentioned for migrating npm packages in node are applicable to io.js.
### System Version of Node
### System version of node
If you want to use the system-installed version of node, you can use the special default alias "system":
@@ -416,7 +339,7 @@ nvm use system
nvm run system --version
```
### Listing Versions
### Listing versions
If you want to see what versions are installed:
@@ -430,66 +353,27 @@ If you want to see what versions are available to install:
nvm ls-remote
```
### Setting Custom Colors
You can set five colors that will be used to display version and alias information. These colors replace the default colors.
Initial colors are: g b y r e
Color codes:
r/R = red / bold red
g/G = green / bold green
b/B = blue / bold blue
c/C = cyan / bold cyan
m/M = magenta / bold magenta
y/Y = yellow / bold yellow
k/K = black / bold black
e/W = light grey / white
```sh
nvm set-colors rgBcm
```
#### Persisting custom colors
If you want the custom colors to persist after terminating the shell, export the NVM_COLORS variable in your shell profile. For example, if you want to use cyan, magenta, green, bold red and bold yellow, add the following line:
```sh
export NVM_COLORS='cmgRY'
```
#### Suppressing colorized output
`nvm help (or -h or --help)`, `nvm ls`, `nvm ls-remote` and `nvm alias` usually produce colorized output. You can disable colors with the `--no-colors` option (or by setting the environment variable `TERM=dumb`):
`nvm ls`, `nvm ls-remote` and `nvm alias` usually produce colorized output. You can disable colors with the `--no-colors` option (or by setting the environment variable `TERM=dumb`):
```sh
nvm ls --no-colors
nvm help --no-colors
TERM=dumb nvm ls
```
#### Restoring PATH
To restore your PATH, you can deactivate it:
```sh
nvm deactivate
```
#### Set default node version
To set a default Node version to be used in any new shell, use the alias 'default':
```sh
nvm alias default node
```
#### Use a mirror of node binaries
To use a mirror of the node binaries, set `$NVM_NODEJS_ORG_MIRROR`:
```sh
@@ -525,8 +409,6 @@ $ echo "lts/*" > .nvmrc # to default to the latest LTS version
$ echo "node" > .nvmrc # to default to the latest version
```
[NB these examples assume a POSIX-compliant shell version of `echo`. If you use a Windows `cmd` development environment, eg the `.nvmrc` file is used to configure a remote Linux deployment, then keep in mind the `"`s will be copied leading to an invalid file. Remove them.]
Then when you run nvm:
```sh
@@ -541,9 +423,9 @@ The contents of a `.nvmrc` file **must** be the `<version>` (as described by `nv
### Deeper Shell Integration
You can use [`avn`](https://github.com/wbyoung/avn) to deeply integrate into your shell and automatically invoke `nvm` when changing directories. `avn` is **not** supported by the `nvm` maintainers. Please [report issues to the `avn` team](https://github.com/wbyoung/avn/issues/new).
You can use [`avn`](https://github.com/wbyoung/avn) to deeply integrate into your shell and automatically invoke `nvm` when changing directories. `avn` is **not** supported by the `nvm` development team. Please [report issues to the `avn` team](https://github.com/wbyoung/avn/issues/new).
If you prefer a lighter-weight solution, the recipes below have been contributed by `nvm` users. They are **not** supported by the `nvm` maintainers. We are, however, accepting pull requests for more examples.
If you prefer a lighter-weight solution, the recipes below have been contributed by `nvm` users. They are **not** supported by the `nvm` development team. We are, however, accepting pull requests for more examples.
#### bash
@@ -552,9 +434,17 @@ If you prefer a lighter-weight solution, the recipes below have been contributed
Put the following at the end of your `$HOME/.bashrc`:
```bash
cdnvm() {
command cd "$@";
nvm_path=$(nvm_find_up .nvmrc | tr -d '\n')
find-up () {
path=$(pwd)
while [[ "$path" != "" && ! -e "$path/$1" ]]; do
path=${path%/*}
done
echo "$path"
}
cdnvm(){
cd "$@";
nvm_path=$(find-up .nvmrc | tr -d '[:space:]')
# If there are no .nvmrc file, use the default nvm version
if [[ ! $nvm_path = *[^[:space:]]* ]]; then
@@ -574,7 +464,7 @@ cdnvm() {
nvm use default;
fi
elif [[ -s $nvm_path/.nvmrc && -r $nvm_path/.nvmrc ]]; then
elif [[ -s $nvm_path/.nvmrc && -r $nvm_path/.nvmrc ]]; then
declare nvm_version
nvm_version=$(<"$nvm_path"/.nvmrc)
@@ -595,7 +485,6 @@ cdnvm() {
fi
}
alias cd='cdnvm'
cd "$PWD"
```
This alias would search 'up' from your current directory in order to detect a `.nvmrc` file. If it finds it, it will switch to that version; if not, it will use the default version.
@@ -631,45 +520,20 @@ add-zsh-hook chpwd load-nvmrc
load-nvmrc
```
#### fish
## License
##### Calling `nvm use` automatically in a directory with a `.nvmrc` file
This requires that you have [bass](https://github.com/edc/bass) installed.
```fish
# ~/.config/fish/functions/nvm.fish
function nvm
bass source ~/.nvm/nvm.sh --no-use ';' nvm $argv
end
nvm is released under the MIT license.
# ~/.config/fish/functions/nvm_find_nvmrc.fish
function nvm_find_nvmrc
bass source ~/.nvm/nvm.sh --no-use ';' nvm_find_nvmrc
end
# ~/.config/fish/functions/load_nvm.fish
function load_nvm --on-variable="PWD"
set -l default_node_version (nvm version default)
set -l node_version (nvm version)
set -l nvmrc_path (nvm_find_nvmrc)
if test -n "$nvmrc_path"
set -l nvmrc_node_version (nvm version (cat $nvmrc_path))
if test "$nvmrc_node_version" = "N/A"
nvm install (cat $nvmrc_path)
else if test nvmrc_node_version != node_version
nvm use $nvmrc_node_version
end
else if test "$node_version" != "$default_node_version"
echo "Reverting to default Node version"
nvm use default
end
end
Copyright (C) 2010 Tim Caswell and Jordan Harband
# ~/.config/fish/config.fish
# You must call it on initialization or listening to directory switching won't work
load_nvm
```
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:
## Running Tests
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:
@@ -692,20 +556,7 @@ Run all of the tests like this:
Nota bene: Avoid running nvm while the tests are running.
## Environment variables
nvm exposes the following environment variables:
- `NVM_DIR` - nvm's installation directory.
- `NVM_BIN` - where node, npm, and global packages for the active version of node are installed.
- `NVM_INC` - node's include file directory (useful for building C/C++ addons for node).
- `NVM_CD_FLAGS` - used to maintain compatibility with zsh.
- `NVM_RC_VERSION` - version from .nvmrc file if being used.
Additionally, nvm modifies `PATH`, and, if present, `MANPATH` and `NODE_PATH` when changing versions.
## Bash Completion
## Bash completion
To activate, you need to source `bash_completion`:
@@ -721,41 +572,41 @@ nvm:
> $ nvm <kbd>Tab</kbd>
```
alias deactivate install list-remote reinstall-packages uninstall version
cache exec install-latest-npm ls run unload version-remote
current help list ls-remote unalias use which
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 <kbd>Tab</kbd>
```
default iojs lts/* lts/argon lts/boron lts/carbon lts/dubnium lts/erbium node stable unstable
default
```
> $ nvm alias my_alias <kbd>Tab</kbd>
```
v10.22.0 v12.18.3 v14.8.0
v0.6.21 v0.8.26 v0.10.28
```
nvm use:
> $ nvm use <kbd>Tab</kbd>
```
my_alias default v10.22.0 v12.18.3 v14.8.0
my_alias default v0.6.21 v0.8.26 v0.10.28
```
nvm uninstall:
> $ nvm uninstall <kbd>Tab</kbd>
```
my_alias default v10.22.0 v12.18.3 v14.8.0
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](https://github.com/creationix/nvm/issues/606))
`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`:
@@ -779,7 +630,7 @@ set -e
## Installing nvm on Alpine Linux
In order to provide the best performance (and other optimisations), nvm will download and install pre-compiled binaries for Node (and npm) when you run `nvm install X`. The Node project compiles, tests and hosts/provides these pre-compiled binaries which are built for mainstream/traditional Linux distributions (such as Debian, Ubuntu, CentOS, RedHat et al).
In order to provide the best performance (and other optimisations), nvm will download and install pre-compiled binaries for Node (and npm) when you run `nvm install X`. The Node project compiles, tests and hosts/provides pre-these compiled binaries which are built for mainstream/traditional Linux distributions (such as Debian, Ubuntu, CentOS, RedHat et al).
Alpine Linux, unlike mainstream/traditional Linux distributions, is based on [BusyBox](https://www.busybox.net/), a very compact (~5MB) Linux distribution. BusyBox (and thus Alpine Linux) uses a different C/C++ stack to most mainstream/traditional Linux distributions - [musl](https://www.musl-libc.org/). This makes binary programs built for such mainstream/traditional incompatible with Alpine Linux, thus we cannot simply `nvm install X` on Alpine Linux and expect the downloaded binary to run correctly - you'll likely see "...does not exist" errors if you try that.
@@ -789,15 +640,14 @@ If installing nvm on Alpine Linux *is* still what you want or need to do, you sh
```sh
apk add -U curl bash ca-certificates openssl ncurses coreutils python2 make gcc g++ libgcc linux-headers grep util-linux binutils findutils
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
```
The Node project has some desire but no concrete plans (due to the overheads of building, testing and support) to offer Alpine-compatible binaries.
As a potential alternative, @mhart (a Node contributor) has some [Docker images for Alpine Linux with Node and optionally, npm, pre-installed](https://github.com/mhart/alpine-node).
<a id="removal"></a>
## Uninstalling / Removal
## Removal
### Manual Uninstall
@@ -815,9 +665,9 @@ export NVM_DIR="$HOME/.nvm"
[[ -r $NVM_DIR/bash_completion ]] && \. $NVM_DIR/bash_completion
```
## Docker For Development Environment
## Docker for development environment
To make the development and testing work easier, we have a Dockerfile for development usage, which is based on Ubuntu 18.04 base image, prepared with essential and useful tools for `nvm` development, to build the docker image of the environment, run the docker command at the root of `nvm` repository:
To make the development and testing work easier, we have a Dockerfile for development usage, which is based on Ubuntu 14.04 base image, prepared with essential and useful tools for `nvm` development, to build the docker image of the environment, run the docker command at the root of `nvm` repository:
```sh
$ docker build -t nvm-dev .
@@ -863,7 +713,7 @@ 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/nvm-sh/nvm/issues/658))
## macOS Troubleshooting
## Mac OS "troubleshooting"
**nvm node version not found in vim shell**
@@ -875,96 +725,9 @@ sudo chmod ugo-x /usr/libexec/path_helper
More on this issue in [dotphiles/dotzsh](https://github.com/dotphiles/dotzsh#mac-os-x).
**nvm is not compatible with the npm config "prefix" option**
Some solutions for this issue can be found [here](https://github.com/nvm-sh/nvm/issues/1245)
There is one more edge case causing this issue, and that's a **mismatch between the `$HOME` path and the user's home directory's actual name**.
You have to make sure that the user directory name in `$HOME` and the user directory name you'd see from running `ls /Users/` **are capitalized the same way** ([See this issue](https://github.com/nvm-sh/nvm/issues/2261)).
To change the user directory and/or account name follow the instructions [here](https://support.apple.com/en-us/HT201548)
[1]: https://github.com/nvm-sh/nvm.git
[2]: https://github.com/nvm-sh/nvm/blob/v0.39.1/install.sh
[2]: https://github.com/nvm-sh/nvm/blob/v0.35.0/install.sh
[3]: https://travis-ci.org/nvm-sh/nvm
[4]: https://github.com/nvm-sh/nvm/releases/tag/v0.39.1
[4]: https://github.com/nvm-sh/nvm/releases/tag/v0.35.0
[Urchin]: https://github.com/scraperwiki/urchin
[Fish]: http://fishshell.com
**Homebrew makes zsh directories unsecure**
```shell
zsh compinit: insecure directories, run compaudit for list.
Ignore insecure directories and continue [y] or abort compinit [n]? y
```
Homebrew causes insecure directories like `/usr/local/share/zsh/site-functions` and `/usr/local/share/zsh`. This is **not** an `nvm` problem - it is a homebrew problem. Refer [here](https://github.com/zsh-users/zsh-completions/issues/680) for some solutions related to the issue.
**Macs with M1 chip**
_January 2021:_ there are no pre-compiled NodeJS binaries for versions prior to 15.x for Apple's new M1 chip (arm64 architecture).
Some issues you may encounter:
- using `nvm` to install, say, `v14.15.4`:
- the C code compiles successfully
- but crashes with an out of memory error when used
- increasing the memory available to node still produces the out of memory errors:
```sh
$ NODE_OPTIONS="--max-old-space-size=4096" ./node_modules/.bin/your_node_package
```
- when using `nvm` to install some versions, the compilation fails
- after `nvm` successfully compiles some versions, `yarn` or `npm` may later fail to install packages with an `incorrect data check` error.
One solution to this issue is to change the architecture of your shell from arm64 to x86.
Let's assume that:
- you already have versions `12.20.1` and `14.15.4` installed using `nvm`
- the current version in use is `14.15.4`
- you are using the `zsh` shell
- you have Rosetta 2 installed (macOS prompts you to install Rosetta 2 the first time you open a Intel-only non-command-line application, or you may install Rosetta 2 from the command line with `softwareupdate --install-rosetta`)
```sh
# Check what version you're running:
$ node --version
v14.15.4
# Check architecture of the `node` binary:
$ node -p process.arch
arm64
# This confirms that the arch is for the M1 chip, which is causing the problems.
# So we need to uninstall it.
# We can't uninstall the version we are currently using, so switch to another version:
$ nvm install v12.20.1
# Now uninstall the version we want to replace:
$ nvm uninstall v14.15.4
# Launch a new zsh process under the 64-bit X86 architecture:
$ arch -x86_64 zsh
# Install node using nvm. This should download the precompiled x64 binary:
$ nvm install v14.15.4
# Now check that the architecture is correct:
$ node -p process.arch
x64
# It is now safe to return to the arm64 zsh process:
$ exit
# We're back to a native shell:
$ arch
arm64
# And the new version is now available to use:
$ nvm use v14.15.4
Now using node v14.15.4 (npm v6.14.10)
```
## Maintainers
Currently, the sole maintainer is [@ljharb](https://github.com/ljharb) - more maintainers are quite welcome, and we hope to add folks to the team over time. [Governance](./GOVERNANCE.md) will be re-evaluated as the project evolves.
## License
See [LICENSE.md](./LICENSE.md).
## Copyright notice
Copyright [OpenJS Foundation](https://openjsf.org) and `nvm` contributors. All rights reserved. The [OpenJS Foundation](https://openjsf.org) has registered trademarks and uses trademarks. For a list of trademarks of the [OpenJS Foundation](https://openjsf.org), please see our [Trademark Policy](https://trademark-policy.openjsf.org/) and [Trademark List](https://trademark-list.openjsf.org/). Node.js is a trademark of Joyent, Inc. and is used with its permission. Trademarks and logos not indicated on the [list of OpenJS Foundation trademarks](https://trademark-list.openjsf.org) are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
[The OpenJS Foundation](https://openjsf.org/) | [Terms of Use](https://terms-of-use.openjsf.org/) | [Privacy Policy](https://privacy-policy.openjsf.org/) | [OpenJS Foundation Bylaws](https://bylaws.openjsf.org/) | [Trademark Policy](https://trademark-policy.openjsf.org/) | [Trademark List](https://trademark-list.openjsf.org/) | [Cookie Policy](https://www.linuxfoundation.org/cookies/)

View File

@@ -58,7 +58,7 @@ __nvm_aliases() {
declare aliases
aliases=""
if [ -d "${NVM_DIR}/alias" ]; then
aliases="$(command cd "${NVM_DIR}/alias" && command find "${PWD}" -type f | command sed "s:${PWD}/::")"
aliases="$(cd "${NVM_DIR}/alias" && command find "${PWD}" -type f | command sed "s:${PWD}/::")"
fi
echo "${aliases} node stable unstable iojs"
}
@@ -84,16 +84,12 @@ __nvm() {
# 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
# First calling compinit (only if not called yet!)
# and then bashcompinit as mentioned by zsh man page.
if ! command -v compinit > /dev/null; then
autoload -U +X compinit && if [[ ${ZSH_DISABLE_COMPFIX-} = true ]]; then
compinit -u
else
compinit
fi
fi
autoload -U +X bashcompinit && bashcompinit
autoload -U +X compinit && if [[ ${ZSH_DISABLE_COMPFIX-} = true ]]; then
compinit -u
else
compinit
fi
fi
complete -o default -F __nvm nvm

View File

@@ -6,14 +6,6 @@ nvm_has() {
type "$1" > /dev/null 2>&1
}
nvm_echo() {
command printf %s\\n "$*" 2>/dev/null
}
nvm_grep() {
GREP_OPTIONS='' command grep "$@"
}
nvm_default_install_dir() {
[ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm"
}
@@ -27,7 +19,7 @@ nvm_install_dir() {
}
nvm_latest_version() {
nvm_echo "v0.39.1"
echo "v0.35.0"
}
nvm_profile_is_bash_or_zsh() {
@@ -50,50 +42,44 @@ nvm_profile_is_bash_or_zsh() {
# NVM_SOURCE always takes precedence unless the method is "script-nvm-exec"
#
nvm_source() {
local NVM_GITHUB_REPO
NVM_GITHUB_REPO="${NVM_INSTALL_GITHUB_REPO:-nvm-sh/nvm}"
local NVM_VERSION
NVM_VERSION="${NVM_INSTALL_VERSION:-$(nvm_latest_version)}"
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/${NVM_GITHUB_REPO}/${NVM_VERSION}/nvm-exec"
NVM_SOURCE_URL="https://raw.githubusercontent.com/nvm-sh/nvm/$(nvm_latest_version)/nvm-exec"
elif [ "_$NVM_METHOD" = "_script-nvm-bash-completion" ]; then
NVM_SOURCE_URL="https://raw.githubusercontent.com/${NVM_GITHUB_REPO}/${NVM_VERSION}/bash_completion"
NVM_SOURCE_URL="https://raw.githubusercontent.com/nvm-sh/nvm/$(nvm_latest_version)/bash_completion"
elif [ -z "$NVM_SOURCE_URL" ]; then
if [ "_$NVM_METHOD" = "_script" ]; then
NVM_SOURCE_URL="https://raw.githubusercontent.com/${NVM_GITHUB_REPO}/${NVM_VERSION}/nvm.sh"
NVM_SOURCE_URL="https://raw.githubusercontent.com/nvm-sh/nvm/$(nvm_latest_version)/nvm.sh"
elif [ "_$NVM_METHOD" = "_git" ] || [ -z "$NVM_METHOD" ]; then
NVM_SOURCE_URL="https://github.com/${NVM_GITHUB_REPO}.git"
NVM_SOURCE_URL="https://github.com/nvm-sh/nvm.git"
else
nvm_echo >&2 "Unexpected value \"$NVM_METHOD\" for \$NVM_METHOD"
echo >&2 "Unexpected value \"$NVM_METHOD\" for \$NVM_METHOD"
return 1
fi
fi
nvm_echo "$NVM_SOURCE_URL"
echo "$NVM_SOURCE_URL"
}
#
# Node.js version to install
#
nvm_node_version() {
nvm_echo "$NODE_VERSION"
echo "$NODE_VERSION"
}
nvm_download() {
if nvm_has "curl"; then
curl --fail --compressed -q "$@"
curl --compressed -q "$@"
elif nvm_has "wget"; then
# Emulate curl with wget
ARGS=$(nvm_echo "$@" | command sed -e 's/--progress-bar /--progress=bar /' \
-e 's/--compressed //' \
-e 's/--fail //' \
ARGS=$(echo "$*" | command sed -e 's/--progress-bar /--progress=bar /' \
-e 's/-L //' \
-e 's/--compressed //' \
-e 's/-I /--server-response /' \
-e 's/-s /-q /' \
-e 's/-sS /-nv /' \
-e 's/-o /-O /' \
-e 's/-C - /-c /')
# shellcheck disable=SC2086
@@ -104,76 +90,56 @@ nvm_download() {
install_nvm_from_git() {
local INSTALL_DIR
INSTALL_DIR="$(nvm_install_dir)"
local NVM_VERSION
NVM_VERSION="${NVM_INSTALL_VERSION:-$(nvm_latest_version)}"
if [ -n "${NVM_INSTALL_VERSION:-}" ]; then
# Check if version is an existing ref
if command git ls-remote "$(nvm_source "git")" "$NVM_VERSION" | nvm_grep -q "$NVM_VERSION" ; then
:
# Check if version is an existing changeset
elif ! nvm_download -o /dev/null "$(nvm_source "script-nvm-exec")"; then
nvm_echo >&2 "Failed to find '$NVM_VERSION' version."
exit 1
fi
fi
local fetch_error
if [ -d "$INSTALL_DIR/.git" ]; then
# Updating repo
nvm_echo "=> nvm is already installed in $INSTALL_DIR, trying to update using git"
echo "=> nvm is already installed in $INSTALL_DIR, trying to update using git"
command printf '\r=> '
fetch_error="Failed to update nvm with $NVM_VERSION, run 'git fetch' in $INSTALL_DIR yourself."
command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" fetch origin tag "$(nvm_latest_version)" --depth=1 2> /dev/null || {
echo >&2 "Failed to update nvm, run 'git fetch' in $INSTALL_DIR yourself."
exit 1
}
else
fetch_error="Failed to fetch origin with $NVM_VERSION. Please report this!"
nvm_echo "=> Downloading nvm from git to '$INSTALL_DIR'"
# Cloning to $INSTALL_DIR
echo "=> Downloading nvm from git to '$INSTALL_DIR'"
command printf '\r=> '
mkdir -p "${INSTALL_DIR}"
if [ "$(ls -A "${INSTALL_DIR}")" ]; then
# Initializing repo
command git init "${INSTALL_DIR}" || {
nvm_echo >&2 'Failed to initialize nvm repo. Please report this!'
echo >&2 'Failed to initialize nvm repo. Please report this!'
exit 2
}
command git --git-dir="${INSTALL_DIR}/.git" remote add origin "$(nvm_source)" 2> /dev/null \
|| command git --git-dir="${INSTALL_DIR}/.git" remote set-url origin "$(nvm_source)" || {
nvm_echo >&2 'Failed to add remote "origin" (or set the URL). Please report this!'
echo >&2 'Failed to add remote "origin" (or set the URL). Please report this!'
exit 2
}
command git --git-dir="${INSTALL_DIR}/.git" fetch origin tag "$(nvm_latest_version)" --depth=1 || {
echo >&2 'Failed to fetch origin with tags. Please report this!'
exit 2
}
else
# Cloning repo
command git clone "$(nvm_source)" --depth=1 "${INSTALL_DIR}" || {
nvm_echo >&2 'Failed to clone nvm repo. Please report this!'
command git -c advice.detachedHead=false clone "$(nvm_source)" -b "$(nvm_latest_version)" --depth=1 "${INSTALL_DIR}" || {
echo >&2 'Failed to clone nvm repo. Please report this!'
exit 2
}
fi
fi
# Try to fetch tag
if command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" fetch origin tag "$NVM_VERSION" --depth=1 2>/dev/null; then
:
# Fetch given version
elif ! command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" fetch origin "$NVM_VERSION" --depth=1; then
nvm_echo >&2 "$fetch_error"
exit 1
fi
command git -c advice.detachedHead=false --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" checkout -f --quiet FETCH_HEAD || {
nvm_echo >&2 "Failed to checkout the given version $NVM_VERSION. Please report this!"
exit 2
}
command git -c advice.detachedHead=false --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" checkout -f --quiet "$(nvm_latest_version)"
if [ -n "$(command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" show-ref refs/heads/master)" ]; then
if command git --no-pager --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" branch --quiet 2>/dev/null; then
command git --no-pager --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" branch --quiet -D master >/dev/null 2>&1
if command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" branch --quiet 2>/dev/null; then
command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" branch --quiet -D master >/dev/null 2>&1
else
nvm_echo >&2 "Your version of git is out of date. Please update it!"
command git --no-pager --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" branch -D master >/dev/null 2>&1
echo >&2 "Your version of git is out of date. Please update it!"
command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" branch -D master >/dev/null 2>&1
fi
fi
nvm_echo "=> Compressing and cleaning up git repository"
echo "=> Compressing and cleaning up git repository"
if ! command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" reflog expire --expire=now --all; then
nvm_echo >&2 "Your version of git is out of date. Please update it!"
echo >&2 "Your version of git is out of date. Please update it!"
fi
if ! command git --git-dir="$INSTALL_DIR"/.git --work-tree="$INSTALL_DIR" gc --auto --aggressive --prune=now ; then
nvm_echo >&2 "Your version of git is out of date. Please update it!"
echo >&2 "Your version of git is out of date. Please update it!"
fi
return
}
@@ -189,15 +155,15 @@ nvm_install_node() {
return 0
fi
nvm_echo "=> Installing Node.js version $NODE_VERSION_LOCAL"
echo "=> Installing Node.js version $NODE_VERSION_LOCAL"
nvm install "$NODE_VERSION_LOCAL"
local CURRENT_NVM_NODE
CURRENT_NVM_NODE="$(nvm_version current)"
if [ "$(nvm_version "$NODE_VERSION_LOCAL")" == "$CURRENT_NVM_NODE" ]; then
nvm_echo "=> Node.js version $NODE_VERSION_LOCAL has been successfully installed"
echo "=> Node.js version $NODE_VERSION_LOCAL has been successfully installed"
else
nvm_echo >&2 "Failed to install Node.js $NODE_VERSION_LOCAL"
echo >&2 "Failed to install Node.js $NODE_VERSION_LOCAL"
fi
}
@@ -214,20 +180,20 @@ install_nvm_as_script() {
# Downloading to $INSTALL_DIR
mkdir -p "$INSTALL_DIR"
if [ -f "$INSTALL_DIR/nvm.sh" ]; then
nvm_echo "=> nvm is already installed in $INSTALL_DIR, trying to update the script"
echo "=> nvm is already installed in $INSTALL_DIR, trying to update the script"
else
nvm_echo "=> Downloading nvm as script to '$INSTALL_DIR'"
echo "=> Downloading nvm as script to '$INSTALL_DIR'"
fi
nvm_download -s "$NVM_SOURCE_LOCAL" -o "$INSTALL_DIR/nvm.sh" || {
nvm_echo >&2 "Failed to download '$NVM_SOURCE_LOCAL'"
echo >&2 "Failed to download '$NVM_SOURCE_LOCAL'"
return 1
} &
nvm_download -s "$NVM_EXEC_SOURCE" -o "$INSTALL_DIR/nvm-exec" || {
nvm_echo >&2 "Failed to download '$NVM_EXEC_SOURCE'"
echo >&2 "Failed to download '$NVM_EXEC_SOURCE'"
return 2
} &
nvm_download -s "$NVM_BASH_COMPLETION_SOURCE" -o "$INSTALL_DIR/bash_completion" || {
nvm_echo >&2 "Failed to download '$NVM_BASH_COMPLETION_SOURCE'"
echo >&2 "Failed to download '$NVM_BASH_COMPLETION_SOURCE'"
return 2
} &
for job in $(jobs -p | command sort)
@@ -235,7 +201,7 @@ install_nvm_as_script() {
wait "$job" || return $?
done
chmod a+x "$INSTALL_DIR/nvm-exec" || {
nvm_echo >&2 "Failed to mark '$INSTALL_DIR/nvm-exec' as executable"
echo >&2 "Failed to mark '$INSTALL_DIR/nvm-exec' as executable"
return 3
}
}
@@ -244,7 +210,7 @@ nvm_try_profile() {
if [ -z "${1-}" ] || [ ! -f "${1}" ]; then
return 1
fi
nvm_echo "${1}"
echo "${1}"
}
#
@@ -260,23 +226,21 @@ nvm_detect_profile() {
fi
if [ -n "${PROFILE}" ] && [ -f "${PROFILE}" ]; then
nvm_echo "${PROFILE}"
echo "${PROFILE}"
return
fi
local DETECTED_PROFILE
DETECTED_PROFILE=''
if [ "${SHELL#*bash}" != "$SHELL" ]; then
if [ -n "${BASH_VERSION-}" ]; then
if [ -f "$HOME/.bashrc" ]; then
DETECTED_PROFILE="$HOME/.bashrc"
elif [ -f "$HOME/.bash_profile" ]; then
DETECTED_PROFILE="$HOME/.bash_profile"
fi
elif [ "${SHELL#*zsh}" != "$SHELL" ]; then
if [ -f "$HOME/.zshrc" ]; then
DETECTED_PROFILE="$HOME/.zshrc"
fi
elif [ -n "${ZSH_VERSION-}" ]; then
DETECTED_PROFILE="$HOME/.zshrc"
fi
if [ -z "$DETECTED_PROFILE" ]; then
@@ -289,7 +253,7 @@ nvm_detect_profile() {
fi
if [ -n "$DETECTED_PROFILE" ]; then
nvm_echo "$DETECTED_PROFILE"
echo "$DETECTED_PROFILE"
fi
}
@@ -298,9 +262,7 @@ nvm_detect_profile() {
# Node, and warn them if so.
#
nvm_check_global_modules() {
local NPM_COMMAND
NPM_COMMAND="$(command -v npm 2>/dev/null)" || return 0
[ -n "${NVM_DIR}" ] && [ -z "${NPM_COMMAND%%"$NVM_DIR"/*}" ] && return 0
command -v npm >/dev/null 2>&1 || return 0
local NPM_VERSION
NPM_VERSION="$(npm --version)"
@@ -322,37 +284,37 @@ nvm_check_global_modules() {
if [ "${MODULE_COUNT}" != '0' ]; then
# shellcheck disable=SC2016
nvm_echo '=> You currently have modules installed globally with `npm`. These will no'
echo '=> You currently have modules installed globally with `npm`. These will no'
# shellcheck disable=SC2016
nvm_echo '=> longer be linked to the active version of Node when you install a new node'
echo '=> longer be linked to the active version of Node when you install a new node'
# shellcheck disable=SC2016
nvm_echo '=> with `nvm`; and they may (depending on how you construct your `$PATH`)'
echo '=> with `nvm`; and they may (depending on how you construct your `$PATH`)'
# shellcheck disable=SC2016
nvm_echo '=> override the binaries of modules installed with `nvm`:'
nvm_echo
echo '=> override the binaries of modules installed with `nvm`:'
echo
command printf %s\\n "$NPM_GLOBAL_MODULES"
nvm_echo '=> If you wish to uninstall them at a later point (or re-install them under your'
echo '=> If you wish to uninstall them at a later point (or re-install them under your'
# shellcheck disable=SC2016
nvm_echo '=> `nvm` Nodes), you can remove them from the system Node as follows:'
nvm_echo
nvm_echo ' $ nvm use system'
nvm_echo ' $ npm uninstall -g a_module'
nvm_echo
echo '=> `nvm` Nodes), you can remove them from the system Node as follows:'
echo
echo ' $ nvm use system'
echo ' $ npm uninstall -g a_module'
echo
fi
}
nvm_do_install() {
if [ -n "${NVM_DIR-}" ] && ! [ -d "${NVM_DIR}" ]; then
if [ -e "${NVM_DIR}" ]; then
nvm_echo >&2 "File \"${NVM_DIR}\" has the same name as installation directory."
echo >&2 "File \"${NVM_DIR}\" has the same name as installation directory."
exit 1
fi
if [ "${NVM_DIR}" = "$(nvm_default_install_dir)" ]; then
mkdir "${NVM_DIR}"
else
nvm_echo >&2 "You have \$NVM_DIR set to \"${NVM_DIR}\", but that directory does not exist. Check your profile files and environment."
echo >&2 "You have \$NVM_DIR set to \"${NVM_DIR}\", but that directory does not exist. Check your profile files and environment."
exit 1
fi
fi
@@ -360,30 +322,30 @@ nvm_do_install() {
# Autodetect install method
if nvm_has git; then
install_nvm_from_git
elif nvm_has curl || nvm_has wget; then
elif nvm_has nvm_download; then
install_nvm_as_script
else
nvm_echo >&2 'You need git, curl, or wget to install nvm'
echo >&2 'You need git, curl, or wget to install nvm'
exit 1
fi
elif [ "${METHOD}" = 'git' ]; then
if ! nvm_has git; then
nvm_echo >&2 "You need git to install nvm"
echo >&2 "You need git to install nvm"
exit 1
fi
install_nvm_from_git
elif [ "${METHOD}" = 'script' ]; then
if ! nvm_has curl && ! nvm_has wget; then
nvm_echo >&2 "You need curl or wget to install nvm"
if ! nvm_has nvm_download; then
echo >&2 "You need curl or wget to install nvm"
exit 1
fi
install_nvm_as_script
else
nvm_echo >&2 "The environment variable \$METHOD is set to \"${METHOD}\", which is not recognized as a valid installation method."
echo >&2 "The environment variable \$METHOD is set to \"${METHOD}\", which is not recognized as a valid installation method."
exit 1
fi
nvm_echo
echo
local NVM_PROFILE
NVM_PROFILE="$(nvm_detect_profile)"
@@ -401,32 +363,32 @@ nvm_do_install() {
if [ -n "${PROFILE}" ]; then
TRIED_PROFILE="${NVM_PROFILE} (as defined in \$PROFILE), "
fi
nvm_echo "=> Profile not found. Tried ${TRIED_PROFILE-}~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile."
nvm_echo "=> Create one of them and run this script again"
nvm_echo " OR"
nvm_echo "=> Append the following lines to the correct file yourself:"
echo "=> Profile not found. Tried ${TRIED_PROFILE-}~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.profile."
echo "=> Create one of them and run this script again"
echo " OR"
echo "=> Append the following lines to the correct file yourself:"
command printf "${SOURCE_STR}"
nvm_echo
echo
else
if nvm_profile_is_bash_or_zsh "${NVM_PROFILE-}"; then
BASH_OR_ZSH=true
fi
if ! command grep -qc '/nvm.sh' "$NVM_PROFILE"; then
nvm_echo "=> Appending nvm source string to $NVM_PROFILE"
echo "=> Appending nvm source string to $NVM_PROFILE"
command printf "${SOURCE_STR}" >> "$NVM_PROFILE"
else
nvm_echo "=> nvm source string already in ${NVM_PROFILE}"
echo "=> nvm source string already in ${NVM_PROFILE}"
fi
# shellcheck disable=SC2016
if ${BASH_OR_ZSH} && ! command grep -qc '$NVM_DIR/bash_completion' "$NVM_PROFILE"; then
nvm_echo "=> Appending bash_completion source string to $NVM_PROFILE"
echo "=> Appending bash_completion source string to $NVM_PROFILE"
command printf "$COMPLETION_STR" >> "$NVM_PROFILE"
else
nvm_echo "=> bash_completion source string already in ${NVM_PROFILE}"
echo "=> bash_completion source string already in ${NVM_PROFILE}"
fi
fi
if ${BASH_OR_ZSH} && [ -z "${NVM_PROFILE-}" ] ; then
nvm_echo "=> Please also append the following lines to the if you are using bash/zsh shell:"
echo "=> Please also append the following lines to the if you are using bash/zsh shell:"
command printf "${COMPLETION_STR}"
fi
@@ -440,7 +402,7 @@ nvm_do_install() {
nvm_reset
nvm_echo "=> Close and reopen your terminal to start using nvm or run the following to use it now:"
echo "=> Close and reopen your terminal to start using nvm or run the following to use it now:"
command printf "${SOURCE_STR}"
if ${BASH_OR_ZSH} ; then
command printf "${COMPLETION_STR}"
@@ -455,7 +417,7 @@ nvm_reset() {
unset -f nvm_has nvm_install_dir nvm_latest_version nvm_profile_is_bash_or_zsh \
nvm_source nvm_node_version nvm_download install_nvm_from_git nvm_install_node \
install_nvm_as_script nvm_try_profile nvm_detect_profile nvm_check_global_modules \
nvm_do_install nvm_reset nvm_default_install_dir nvm_grep
nvm_do_install nvm_reset nvm_default_install_dir
}
[ "_$NVM_ENV" = "_testing" ] || nvm_do_install

View File

@@ -2,7 +2,7 @@
DIR="$(command cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# shellcheck disable=SC1090,SC1091
# shellcheck disable=SC1090
\. "$DIR/nvm.sh" --no-use
if [ -n "$NODE_VERSION" ]; then

1404
nvm.sh

File diff suppressed because it is too large Load Diff

View File

@@ -1,13 +1,13 @@
{
"name": "nvm",
"version": "0.39.1",
"version": "0.35.0",
"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/^-//'); env -i TERM=\"$TERM\" bash -lc \"make TEST_SUITE=fast test-$shell\"",
"test/fast": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=fast test-$shell",
"test/slow": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=slow test-$shell",
"test/install_script": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=install_script test-$shell",
"test/installation": "npm run --silent test/installation/node && npm run --silent test/installation/iojs",
@@ -15,12 +15,8 @@
"test/installation/iojs": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=installation_iojs test-$shell",
"test/sourcing": "shell=$(basename -- $(ps -o comm= $(ps -o ppid= -p $PPID)) | sed 's/^-//'); make TEST_SUITE=sourcing test-$shell",
"doctoc": "doctoc --title='## Table of Contents' --github README.md",
"predoctoc:check": "cp README.md v-README.md.orig && npm run doctoc",
"doctoc:check": "diff -q README.md v-README.md.orig",
"postdoctoc:check": "mv v-README.md.orig README.md",
"eclint": "eclint check $(git ls-tree --name-only HEAD | xargs)",
"dockerfile_lint": "dockerfile_lint",
"markdown-link-check": "git ls-files | command grep -E '\\.md$' | xargs -n 1 markdown-link-check -p"
"dockerfile_lint": "dockerfile_lint"
},
"repository": {
"type": "git",
@@ -40,12 +36,11 @@
},
"homepage": "https://github.com/nvm-sh/nvm",
"devDependencies": {
"dockerfile_lint": "^0.3.4",
"doctoc": "^2.1.0",
"eclint": "^2.8.1",
"markdown-link-check": "^3.9.0",
"replace": "^1.2.1",
"semver": "^7.3.5",
"urchin": "^0.0.5"
"dockerfile_lint": "^0.3.2",
"eclint": "^2.6.0",
"replace": "^0.3.0",
"semver": "^5.0.1",
"urchin": "^0.0.5",
"doctoc": "^1.2.0"
}
}

View File

@@ -1,52 +0,0 @@
#! /usr/bin/env bash
find_name(){
find test -name "*[\\/:\*\?\"<>\|]*" -o -name "*."
}
check_name() {
if [ "$(find_name | wc -l)" != "0" ]; then
printf '%s\n\n' "The following filenames contain unwanted characters:"
find_name
printf '\n%s\n%s\n' "Please run ./rename_test.sh" "If the problem persist, please open an issue."
exit 1
else
echo "Ok"
fi
}
rename_test() {
local filename
local new_filename
while read -r filename; do
# Even though it looks < and > are replaced by the same < and >, the latters are not ASCII code
# If you check with 'cat -v rename_test.sh' you would see 's/</M-KM-^B/g' and 's/>/M-KM-^C/g'
# M-KM-^B -> U+02C2
# M-KM-^C -> U+02C3
new_filename=$(echo "$filename" | sed -r \
-e "s/\"/'/g" \
-e 's/</˂/g' \
-e 's/>/˃/g' \
-e 's/^(.*)\.$/\1/'
)
printf '%s\n%s\n\n' "$filename" "$new_filename"
[ "$filename" != "$new_filename" ] && git mv "$filename" "$new_filename"
done < <(find_name)
if [ "$(find_name | wc -l)" != "0" ]; then
echo "Still some files to treat:"
find_name
else
echo "Done"
fi
}
main() {
if [ "$1" = "--check" ]; then
check_name
else
rename_test
fi
}
main "$@"

View File

@@ -1,17 +0,0 @@
#!/bin/sh
\. ../../../nvm.sh
die () { echo "$@" ; exit 1; }
OUTPUT="$(nvm unalias node 2>&1)"
EXPECTED_OUTPUT="node is a default (built-in) alias and cannot be deleted."
[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "trying to remove a built-in alias should fail with '$EXPECTED_OUTPUT', got '$OUTPUT'"
nvm alias node stable || die '`nvm alias node stable` failed'
nvm unalias node || die '`nvm unalias node` failed'
OUTPUT="$(nvm unalias node 2>&1)"
EXPECTED_OUTPUT="node is a default (built-in) alias and cannot be deleted."
[ "$OUTPUT" = "$EXPECTED_OUTPUT" ] || die "trying to remove a built-in alias should fail with '$EXPECTED_OUTPUT', got '$OUTPUT'"

View File

@@ -1,22 +0,0 @@
#!/bin/sh
\. ../../../nvm.sh
die () { echo "$@" ; exit 1; }
set -e
nvm_get_colors(){
echo "0;95m"
}
nvm_alias_path() {
nvm_echo "../../../alias"
}
OUTPUT=$(command printf %b $(nvm_list_aliases test-stable-1) | awk '{ print substr($0, 1, 19); }')
EXPECTED_OUTPUT=$(command printf %b "\033[0;95mtest-stable-1" | awk '{ print substr($0, 1, 19); }')
echo "\033[0m"
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "nvm_list_aliases did not call nvm_get_colors. Expected >${EXPECTED_OUTPUT}<; got >${OUTPUT}<"

View File

@@ -1,25 +0,0 @@
#!/bin/sh
\. ../../../nvm.sh
die () {
echo "$@"
exit 1
}
set -e
nvm_alias_path() {
nvm_echo "../../../alias"
}
nvm ls-remote >/dev/null || die 'nvm ls-remote (to populate LTS aliases) failed'
MOCKS_DIR="../Unit tests/mocks"
EXPECTED_OUTPUT="$(cat "$MOCKS_DIR/lts-star.txt")"
STDOUT_OUTPUT="$(nvm_list_aliases "lts/*")"
STDERR_OUTPUT="$(nvm_list_aliases "lts/*" 2>&1 >/dev/null)"
[ -z "${STDERR_OUTPUT}" ] || die "expected no stderr output, got >${STDERR_OUTPUT}<"
[ "${STDOUT_OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die "expected ${EXPECTED_OUTPUT}, got >${STDOUT_OUTPUT}<"

View File

@@ -1,21 +0,0 @@
#!/bin/sh
\. ../../../nvm.sh
die () {
mv "$(nvm_alias_path)/_lts.bak" "$(nvm_alias_path)/lts"
echo "$@"
exit 1
}
set -e
nvm_alias_path() {
nvm_echo "../../../alias"
}
mv "$(nvm_alias_path)/lts" "$(nvm_alias_path)/_lts.bak"
STDERR_OUTPUT="$(nvm_list_aliases 2>&1 >/dev/null)"
[ -z "${STDERR_OUTPUT}" ] || die "expected no stderr output, got >${STDERR_OUTPUT}<"

View File

@@ -1,28 +0,0 @@
#!/bin/sh
\. ../../../nvm.sh
die () {
# echo "$@" ;
echo "Expected >${EXPECTED_OUTPUT}<; got >${OUTPUT}<"
exit 1
}
set -e
nvm_get_colors(){
echo "0;95m"
}
# nvm_print_alias_path call nvm_print_formatted_alias which calls nvm_get-colors
# the output of nvm_print_alias_path uses the color code returned by nvm_get_colors (redefined above)
NVM_ALIAS_DIR='../../../alias'
OUTPUT=$(command printf %b $(nvm_print_alias_path "$NVM_ALIAS_DIR" "$NVM_ALIAS_DIR"/test-stable-1) | awk '{ print substr($0, 1, 24); }')
EXPECTED_OUTPUT=$(command printf %b "\033[0;95mtest-stable-1\033[0m")
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die
set +e

View File

@@ -1,21 +0,0 @@
#!/bin/sh
\. ../../../nvm.sh
die () {
echo "Expected >${EXPECTED_OUTPUT}<; got >${OUTPUT}<"
exit 1
}
set -e
# # # expecting in red and two grays:
OUTPUT=$(echo $(nvm_print_formatted_alias fakealias fakedest) | awk '{ print substr($0, 1, 21); }')
EXPECTED_OUTPUT="$(command printf %b "\033[0;31mfakealias\033[0m ")"
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die
# expecting in bold yellow and two grays:
nvm set-colors bbbYb
OUTPUT=$(echo $(nvm_print_formatted_alias fakealias fakedest) | awk '{ print substr($0, 1, 21); }')
EXPECTED_OUTPUT="$(command printf %b "\033[1;33mfakealias\033[0m ")"
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die

View File

@@ -1,40 +0,0 @@
#!/bin/zsh
\. ../../../nvm.sh
\. ../../common.sh
if type setopt >/dev/null 2>&1; then setopt local_options markdirs; fi
die () {
if type unsetopt >/dev/null 2>&1; then unsetopt local_options markdirs; fi
echo "$@";
exit 1;
}
make_fake_node v0.0.1
make_fake_node v0.0.3
make_fake_node v0.0.9
make_fake_node v0.3.1
make_fake_node v0.3.3
make_fake_node v0.3.9
make_fake_node v0.12.87
make_fake_node v0.12.9
make_fake_iojs v0.1.2
make_fake_iojs v0.10.2
OUTPUT="$(nvm_ls)"
EXPECTED_OUTPUT="v0.0.1
v0.0.3
v0.0.9
iojs-v0.1.2
v0.3.1
v0.3.3
v0.3.9
iojs-v0.10.2
v0.12.9
v0.12.87"
if nvm_has_system_node || nvm_has_system_iojs; then
EXPECTED_OUTPUT="${EXPECTED_OUTPUT}
system"
fi
[ "${OUTPUT-}" = "${EXPECTED_OUTPUT-}" ] || die "expected >${EXPECTED_OUTPUT}<; got >${OUTPUT}<"

View File

@@ -9,7 +9,6 @@ cleanup () { rm -f "${BEFORE}" "${AFTER}"; }
die () { echo "$@" ; cleanup ; exit 1; }
typeset -f | awk '/ \(\) $/ && !/^main / {print $1}' > "${BEFORE}"
env | grep -v PATH= | grep -v IFS= | grep -v NVM_ | sort >> "${BEFORE}"
set +e # TODO: fix
\. ../../nvm.sh
@@ -20,7 +19,6 @@ type nvm > /dev/null 2>&1 || die "nvm not loaded"
nvm unload
typeset -f | awk '/ \(\) $/ && !/^main / {print $1}' > "${AFTER}"
env | grep -v PATH= | grep -v IFS= | sort >> "${AFTER}"
! type nvm > /dev/null 2>&1 || die "nvm not unloaded"

View File

@@ -27,9 +27,7 @@ EXPECTED_OUTPUT="$(nvm_add_iojs_prefix ${VERSION})"
nvm use --delete-prefix iojs || die '`nvm use iojs` failed'
# Remove node_modules/.bin from the path so that the system version `which` is
# used in nvm_ls_current
PATH=$(echo "$PATH" | tr ":" "\n" | grep -v "node_modules/.bin" | tr "\n" ":") CURRENT="$(nvm current)"
CURRENT="$(nvm current)"
echo "current: ${CURRENT}"
[ "${CURRENT}" = "${IOJS_VERSION}" ] || die "expected >${IOJS_VERSION}<; got >${CURRENT}<"

View File

@@ -1,21 +0,0 @@
#!/bin/sh
set -ex
die () {
echo "Expected >${EXPECTED_OUTPUT}<; got >${OUTPUT}<"
exit 1
}
cleanup() {
echo "Tested nvm_echo_with_colors"
}
\. ../../../nvm.sh
OUTPUT="$(nvm_echo_with_colors "\033[0;36mCyan-colored text")"
EXPECTED_OUTPUT=$(printf "\033[0;36mCyan-colored text")
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die
cleanup

View File

@@ -1,19 +0,0 @@
#!/bin/sh
set -ex
die () { echo "$@" ; cleanup ; exit 1; }
cleanup() {
echo "Tested nvm_err_with_colors"
}
\. ../../../nvm.sh
set +ex
OUTPUT="$(nvm_err_with_colors "\033[0;35mMagenta-colored text" 2>&1)"
set -ex
EXPECTED_OUTPUT=$(printf "\033[0;35mMagenta-colored text")
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die
cleanup

View File

@@ -1,24 +0,0 @@
#!/bin/sh
\. ../../../nvm.sh
die () {
# echo "$@" ;
echo "Expected >${EXPECTED_OUTPUT}<; got >${OUTPUT}<"
exit 1
}
set -e
nvm_get_colors(){
echo "0;95m"
}
# nvm_print_default_alias call nvm_print_formatted_alias which calls nvm_get-colors
# the output of nvm_print_default_alias uses the color code returned by nvm_get_colors (redefined above)
OUTPUT=$(command printf %b $(nvm_print_default_alias node ./alias v14.7.0) | awk '{ print substr($0, 1, 11); }')
EXPECTED_OUTPUT=$(command printf %b "\033[0;95mnode")
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die
set +e

View File

@@ -1,52 +0,0 @@
#!/bin/sh
\. ../../../nvm.sh
set -e
die () {
# echo "$@" ;
echo "Expected >${EXPECTED_OUTPUT}<; got >${OUTPUT}<"
exit 1
}
cleanup() {
if [ -n TEMP_NVM_COLORS ]; then
export NVM_COLORS=TEMP_NVM_COLORS
fi
unset TEMP_NVM_COLORS
}
if [ -n ${NVM_COLORS} ]; then
export TEMP_NVM_COLORS=NVM_COLORS
unset NVM_COLORS
fi
# default system color
nvm use system
OUTPUT=$(nvm_print_versions system)
FORMAT="\033[0;32m-> %12s\033[0m"
VERSION='system'
EXPECTED_OUTPUT=$(command printf -- "${FORMAT}\\n" "${VERSION}")
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die
nvm_ls_current() { echo "current";}
# default current color
OUTPUT=$(nvm_print_versions current)
FORMAT="\033[0;32m-> %12s\033[0m"
VERSION="current"
EXPECTED_OUTPUT=$(command printf -- "${FORMAT}\\n" "${VERSION}")
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die
# custom current color
nvm set-colors YCMGR
OUTPUT=$(nvm_print_versions current)
FORMAT="\033[1;35m-> %12s\033[0m"
VERSION="current"
EXPECTED_OUTPUT=$(command printf -- "${FORMAT}\\n" "${VERSION}")
[ "${OUTPUT}" = "${EXPECTED_OUTPUT}" ] || die
cleanup

View File

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

View File

@@ -1,7 +0,0 @@
gallium
fermium
erbium
dubnium
carbon
boron
argon

View File

@@ -1 +0,0 @@
lts/gallium

File diff suppressed because it is too large Load Diff

View File

@@ -58,14 +58,7 @@
v6.13.1  (LTS: Boron)
v6.14.0  (LTS: Boron)
v6.14.1  (LTS: Boron)
v6.14.2  (LTS: Boron)
v6.14.3  (LTS: Boron)
v6.14.4  (LTS: Boron)
v6.15.0  (LTS: Boron)
v6.15.1  (LTS: Boron)
v6.16.0  (LTS: Boron)
v6.17.0  (LTS: Boron)
v6.17.1  (Latest LTS: Boron)
v6.14.2  (Latest LTS: Boron)
v8.9.0  (LTS: Carbon)
v8.9.1  (LTS: Carbon)
v8.9.2  (LTS: Carbon)
@@ -74,93 +67,4 @@
v8.10.0  (LTS: Carbon)
v8.11.0  (LTS: Carbon)
v8.11.1  (LTS: Carbon)
v8.11.2  (LTS: Carbon)
v8.11.3  (LTS: Carbon)
v8.11.4  (LTS: Carbon)
v8.12.0  (LTS: Carbon)
v8.13.0  (LTS: Carbon)
v8.14.0  (LTS: Carbon)
v8.14.1  (LTS: Carbon)
v8.15.0  (LTS: Carbon)
v8.15.1  (LTS: Carbon)
v8.16.0  (LTS: Carbon)
v8.16.1  (LTS: Carbon)
v8.16.2  (LTS: Carbon)
v8.17.0  (Latest LTS: Carbon)
v10.13.0  (LTS: Dubnium)
v10.14.0  (LTS: Dubnium)
v10.14.1  (LTS: Dubnium)
v10.14.2  (LTS: Dubnium)
v10.15.0  (LTS: Dubnium)
v10.15.1  (LTS: Dubnium)
v10.15.2  (LTS: Dubnium)
v10.15.3  (LTS: Dubnium)
v10.16.0  (LTS: Dubnium)
v10.16.1  (LTS: Dubnium)
v10.16.2  (LTS: Dubnium)
v10.16.3  (LTS: Dubnium)
v10.17.0  (LTS: Dubnium)
v10.18.0  (LTS: Dubnium)
v10.18.1  (LTS: Dubnium)
v10.19.0  (LTS: Dubnium)
v10.20.0  (LTS: Dubnium)
v10.20.1  (LTS: Dubnium)
v10.21.0  (LTS: Dubnium)
v10.22.0  (LTS: Dubnium)
v10.22.1  (LTS: Dubnium)
v10.23.0  (LTS: Dubnium)
v10.23.1  (LTS: Dubnium)
v10.23.2  (LTS: Dubnium)
v10.23.3  (LTS: Dubnium)
v10.24.0  (LTS: Dubnium)
v10.24.1  (Latest LTS: Dubnium)
v12.13.0  (LTS: Erbium)
v12.13.1  (LTS: Erbium)
v12.14.0  (LTS: Erbium)
v12.14.1  (LTS: Erbium)
v12.15.0  (LTS: Erbium)
v12.16.0  (LTS: Erbium)
v12.16.1  (LTS: Erbium)
v12.16.2  (LTS: Erbium)
v12.16.3  (LTS: Erbium)
v12.17.0  (LTS: Erbium)
v12.18.0  (LTS: Erbium)
v12.18.1  (LTS: Erbium)
v12.18.2  (LTS: Erbium)
v12.18.3  (LTS: Erbium)
v12.18.4  (LTS: Erbium)
v12.19.0  (LTS: Erbium)
v12.19.1  (LTS: Erbium)
v12.20.0  (LTS: Erbium)
v12.20.1  (LTS: Erbium)
v12.20.2  (LTS: Erbium)
v12.21.0  (LTS: Erbium)
v12.22.0  (LTS: Erbium)
v12.22.1  (LTS: Erbium)
v12.22.2  (LTS: Erbium)
v12.22.3  (LTS: Erbium)
v12.22.4  (LTS: Erbium)
v12.22.5  (LTS: Erbium)
v12.22.6  (LTS: Erbium)
v12.22.7  (LTS: Erbium)
v12.22.8  (Latest LTS: Erbium)
v14.15.0  (LTS: Fermium)
v14.15.1  (LTS: Fermium)
v14.15.2  (LTS: Fermium)
v14.15.3  (LTS: Fermium)
v14.15.4  (LTS: Fermium)
v14.15.5  (LTS: Fermium)
v14.16.0  (LTS: Fermium)
v14.16.1  (LTS: Fermium)
v14.17.0  (LTS: Fermium)
v14.17.1  (LTS: Fermium)
v14.17.2  (LTS: Fermium)
v14.17.3  (LTS: Fermium)
v14.17.4  (LTS: Fermium)
v14.17.5  (LTS: Fermium)
v14.17.6  (LTS: Fermium)
v14.18.0  (LTS: Fermium)
v14.18.1  (LTS: Fermium)
v14.18.2  (Latest LTS: Fermium)
v16.13.0  (LTS: Gallium)
v16.13.1  (Latest LTS: Gallium)
v8.11.2  (Latest LTS: Carbon)

View File

@@ -331,14 +331,7 @@
v6.13.1  (LTS: Boron)
v6.14.0  (LTS: Boron)
v6.14.1  (LTS: Boron)
v6.14.2  (LTS: Boron)
v6.14.3  (LTS: Boron)
v6.14.4  (LTS: Boron)
v6.15.0  (LTS: Boron)
v6.15.1  (LTS: Boron)
v6.16.0  (LTS: Boron)
v6.17.0  (LTS: Boron)
v6.17.1  (Latest LTS: Boron)
v6.14.2  (Latest LTS: Boron)
v7.0.0
v7.1.0
v7.2.0
@@ -379,19 +372,7 @@
v8.10.0  (LTS: Carbon)
v8.11.0  (LTS: Carbon)
v8.11.1  (LTS: Carbon)
v8.11.2  (LTS: Carbon)
v8.11.3  (LTS: Carbon)
v8.11.4  (LTS: Carbon)
v8.12.0  (LTS: Carbon)
v8.13.0  (LTS: Carbon)
v8.14.0  (LTS: Carbon)
v8.14.1  (LTS: Carbon)
v8.15.0  (LTS: Carbon)
v8.15.1  (LTS: Carbon)
v8.16.0  (LTS: Carbon)
v8.16.1  (LTS: Carbon)
v8.16.2  (LTS: Carbon)
v8.17.0  (Latest LTS: Carbon)
v8.11.2  (Latest LTS: Carbon)
v9.0.0
v9.1.0
v9.2.0
@@ -409,205 +390,6 @@
v9.10.1
v9.11.0
v9.11.1
v9.11.2
v10.0.0
v10.1.0
v10.2.0
v10.2.1
v10.3.0
v10.4.0
v10.4.1
v10.5.0
v10.6.0
v10.7.0
v10.8.0
v10.9.0
v10.10.0
v10.11.0
v10.12.0
v10.13.0  (LTS: Dubnium)
v10.14.0  (LTS: Dubnium)
v10.14.1  (LTS: Dubnium)
v10.14.2  (LTS: Dubnium)
v10.15.0  (LTS: Dubnium)
v10.15.1  (LTS: Dubnium)
v10.15.2  (LTS: Dubnium)
v10.15.3  (LTS: Dubnium)
v10.16.0  (LTS: Dubnium)
v10.16.1  (LTS: Dubnium)
v10.16.2  (LTS: Dubnium)
v10.16.3  (LTS: Dubnium)
v10.17.0  (LTS: Dubnium)
v10.18.0  (LTS: Dubnium)
v10.18.1  (LTS: Dubnium)
v10.19.0  (LTS: Dubnium)
v10.20.0  (LTS: Dubnium)
v10.20.1  (LTS: Dubnium)
v10.21.0  (LTS: Dubnium)
v10.22.0  (LTS: Dubnium)
v10.22.1  (LTS: Dubnium)
v10.23.0  (LTS: Dubnium)
v10.23.1  (LTS: Dubnium)
v10.23.2  (LTS: Dubnium)
v10.23.3  (LTS: Dubnium)
v10.24.0  (LTS: Dubnium)
v10.24.1  (Latest LTS: Dubnium)
v11.0.0
v11.1.0
v11.2.0
v11.3.0
v11.4.0
v11.5.0
v11.6.0
v11.7.0
v11.8.0
v11.9.0
v11.10.0
v11.10.1
v11.11.0
v11.12.0
v11.13.0
v11.14.0
v11.15.0
v12.0.0
v12.1.0
v12.2.0
v12.3.0
v12.3.1
v12.4.0
v12.5.0
v12.6.0
v12.7.0
v12.8.0
v12.8.1
v12.9.0
v12.9.1
v12.10.0
v12.11.0
v12.11.1
v12.12.0
v12.13.0  (LTS: Erbium)
v12.13.1  (LTS: Erbium)
v12.14.0  (LTS: Erbium)
v12.14.1  (LTS: Erbium)
v12.15.0  (LTS: Erbium)
v12.16.0  (LTS: Erbium)
v12.16.1  (LTS: Erbium)
v12.16.2  (LTS: Erbium)
v12.16.3  (LTS: Erbium)
v12.17.0  (LTS: Erbium)
v12.18.0  (LTS: Erbium)
v12.18.1  (LTS: Erbium)
v12.18.2  (LTS: Erbium)
v12.18.3  (LTS: Erbium)
v12.18.4  (LTS: Erbium)
v12.19.0  (LTS: Erbium)
v12.19.1  (LTS: Erbium)
v12.20.0  (LTS: Erbium)
v12.20.1  (LTS: Erbium)
v12.20.2  (LTS: Erbium)
v12.21.0  (LTS: Erbium)
v12.22.0  (LTS: Erbium)
v12.22.1  (LTS: Erbium)
v12.22.2  (LTS: Erbium)
v12.22.3  (LTS: Erbium)
v12.22.4  (LTS: Erbium)
v12.22.5  (LTS: Erbium)
v12.22.6  (LTS: Erbium)
v12.22.7  (LTS: Erbium)
v12.22.8  (Latest LTS: Erbium)
v13.0.0
v13.0.1
v13.1.0
v13.2.0
v13.3.0
v13.4.0
v13.5.0
v13.6.0
v13.7.0
v13.8.0
v13.9.0
v13.10.0
v13.10.1
v13.11.0
v13.12.0
v13.13.0
v13.14.0
v14.0.0
v14.1.0
v14.2.0
v14.3.0
v14.4.0
v14.5.0
v14.6.0
v14.7.0
v14.8.0
v14.9.0
v14.10.0
v14.10.1
v14.11.0
v14.12.0
v14.13.0
v14.13.1
v14.14.0
v14.15.0  (LTS: Fermium)
v14.15.1  (LTS: Fermium)
v14.15.2  (LTS: Fermium)
v14.15.3  (LTS: Fermium)
v14.15.4  (LTS: Fermium)
v14.15.5  (LTS: Fermium)
v14.16.0  (LTS: Fermium)
v14.16.1  (LTS: Fermium)
v14.17.0  (LTS: Fermium)
v14.17.1  (LTS: Fermium)
v14.17.2  (LTS: Fermium)
v14.17.3  (LTS: Fermium)
v14.17.4  (LTS: Fermium)
v14.17.5  (LTS: Fermium)
v14.17.6  (LTS: Fermium)
v14.18.0  (LTS: Fermium)
v14.18.1  (LTS: Fermium)
v14.18.2  (Latest LTS: Fermium)
v15.0.0
v15.0.1
v15.1.0
v15.2.0
v15.2.1
v15.3.0
v15.4.0
v15.5.0
v15.5.1
v15.6.0
v15.7.0
v15.8.0
v15.9.0
v15.10.0
v15.11.0
v15.12.0
v15.13.0
v15.14.0
v16.0.0
v16.1.0
v16.2.0
v16.3.0
v16.4.0
v16.4.1
v16.4.2
v16.5.0
v16.6.0
v16.6.1
v16.6.2
v16.7.0
v16.8.0
v16.9.0
v16.9.1
v16.10.0
v16.11.0
v16.11.1
v16.12.0
v16.13.0  (LTS: Gallium)
v16.13.1  (Latest LTS: Gallium)
v17.0.0
v17.0.1
v17.1.0
v17.2.0

View File

@@ -372,14 +372,7 @@
v6.13.1  (LTS: Boron)
v6.14.0  (LTS: Boron)
v6.14.1  (LTS: Boron)
v6.14.2  (LTS: Boron)
v6.14.3  (LTS: Boron)
v6.14.4  (LTS: Boron)
v6.15.0  (LTS: Boron)
v6.15.1  (LTS: Boron)
v6.16.0  (LTS: Boron)
v6.17.0  (LTS: Boron)
v6.17.1  (Latest LTS: Boron)
v6.14.2  (Latest LTS: Boron)
v7.0.0
v7.1.0
v7.2.0
@@ -420,19 +413,7 @@
v8.10.0  (LTS: Carbon)
v8.11.0  (LTS: Carbon)
v8.11.1  (LTS: Carbon)
v8.11.2  (LTS: Carbon)
v8.11.3  (LTS: Carbon)
v8.11.4  (LTS: Carbon)
v8.12.0  (LTS: Carbon)
v8.13.0  (LTS: Carbon)
v8.14.0  (LTS: Carbon)
v8.14.1  (LTS: Carbon)
v8.15.0  (LTS: Carbon)
v8.15.1  (LTS: Carbon)
v8.16.0  (LTS: Carbon)
v8.16.1  (LTS: Carbon)
v8.16.2  (LTS: Carbon)
v8.17.0  (Latest LTS: Carbon)
v8.11.2  (Latest LTS: Carbon)
v9.0.0
v9.1.0
v9.2.0
@@ -450,205 +431,6 @@
v9.10.1
v9.11.0
v9.11.1
v9.11.2
v10.0.0
v10.1.0
v10.2.0
v10.2.1
v10.3.0
v10.4.0
v10.4.1
v10.5.0
v10.6.0
v10.7.0
v10.8.0
v10.9.0
v10.10.0
v10.11.0
v10.12.0
v10.13.0  (LTS: Dubnium)
v10.14.0  (LTS: Dubnium)
v10.14.1  (LTS: Dubnium)
v10.14.2  (LTS: Dubnium)
v10.15.0  (LTS: Dubnium)
v10.15.1  (LTS: Dubnium)
v10.15.2  (LTS: Dubnium)
v10.15.3  (LTS: Dubnium)
v10.16.0  (LTS: Dubnium)
v10.16.1  (LTS: Dubnium)
v10.16.2  (LTS: Dubnium)
v10.16.3  (LTS: Dubnium)
v10.17.0  (LTS: Dubnium)
v10.18.0  (LTS: Dubnium)
v10.18.1  (LTS: Dubnium)
v10.19.0  (LTS: Dubnium)
v10.20.0  (LTS: Dubnium)
v10.20.1  (LTS: Dubnium)
v10.21.0  (LTS: Dubnium)
v10.22.0  (LTS: Dubnium)
v10.22.1  (LTS: Dubnium)
v10.23.0  (LTS: Dubnium)
v10.23.1  (LTS: Dubnium)
v10.23.2  (LTS: Dubnium)
v10.23.3  (LTS: Dubnium)
v10.24.0  (LTS: Dubnium)
v10.24.1  (Latest LTS: Dubnium)
v11.0.0
v11.1.0
v11.2.0
v11.3.0
v11.4.0
v11.5.0
v11.6.0
v11.7.0
v11.8.0
v11.9.0
v11.10.0
v11.10.1
v11.11.0
v11.12.0
v11.13.0
v11.14.0
v11.15.0
v12.0.0
v12.1.0
v12.2.0
v12.3.0
v12.3.1
v12.4.0
v12.5.0
v12.6.0
v12.7.0
v12.8.0
v12.8.1
v12.9.0
v12.9.1
v12.10.0
v12.11.0
v12.11.1
v12.12.0
v12.13.0  (LTS: Erbium)
v12.13.1  (LTS: Erbium)
v12.14.0  (LTS: Erbium)
v12.14.1  (LTS: Erbium)
v12.15.0  (LTS: Erbium)
v12.16.0  (LTS: Erbium)
v12.16.1  (LTS: Erbium)
v12.16.2  (LTS: Erbium)
v12.16.3  (LTS: Erbium)
v12.17.0  (LTS: Erbium)
v12.18.0  (LTS: Erbium)
v12.18.1  (LTS: Erbium)
v12.18.2  (LTS: Erbium)
v12.18.3  (LTS: Erbium)
v12.18.4  (LTS: Erbium)
v12.19.0  (LTS: Erbium)
v12.19.1  (LTS: Erbium)
v12.20.0  (LTS: Erbium)
v12.20.1  (LTS: Erbium)
v12.20.2  (LTS: Erbium)
v12.21.0  (LTS: Erbium)
v12.22.0  (LTS: Erbium)
v12.22.1  (LTS: Erbium)
v12.22.2  (LTS: Erbium)
v12.22.3  (LTS: Erbium)
v12.22.4  (LTS: Erbium)
v12.22.5  (LTS: Erbium)
v12.22.6  (LTS: Erbium)
v12.22.7  (LTS: Erbium)
v12.22.8  (Latest LTS: Erbium)
v13.0.0
v13.0.1
v13.1.0
v13.2.0
v13.3.0
v13.4.0
v13.5.0
v13.6.0
v13.7.0
v13.8.0
v13.9.0
v13.10.0
v13.10.1
v13.11.0
v13.12.0
v13.13.0
v13.14.0
v14.0.0
v14.1.0
v14.2.0
v14.3.0
v14.4.0
v14.5.0
v14.6.0
v14.7.0
v14.8.0
v14.9.0
v14.10.0
v14.10.1
v14.11.0
v14.12.0
v14.13.0
v14.13.1
v14.14.0
v14.15.0  (LTS: Fermium)
v14.15.1  (LTS: Fermium)
v14.15.2  (LTS: Fermium)
v14.15.3  (LTS: Fermium)
v14.15.4  (LTS: Fermium)
v14.15.5  (LTS: Fermium)
v14.16.0  (LTS: Fermium)
v14.16.1  (LTS: Fermium)
v14.17.0  (LTS: Fermium)
v14.17.1  (LTS: Fermium)
v14.17.2  (LTS: Fermium)
v14.17.3  (LTS: Fermium)
v14.17.4  (LTS: Fermium)
v14.17.5  (LTS: Fermium)
v14.17.6  (LTS: Fermium)
v14.18.0  (LTS: Fermium)
v14.18.1  (LTS: Fermium)
v14.18.2  (Latest LTS: Fermium)
v15.0.0
v15.0.1
v15.1.0
v15.2.0
v15.2.1
v15.3.0
v15.4.0
v15.5.0
v15.5.1
v15.6.0
v15.7.0
v15.8.0
v15.9.0
v15.10.0
v15.11.0
v15.12.0
v15.13.0
v15.14.0
v16.0.0
v16.1.0
v16.2.0
v16.3.0
v16.4.0
v16.4.1
v16.4.2
v16.5.0
v16.6.0
v16.6.1
v16.6.2
v16.7.0
v16.8.0
v16.9.0
v16.9.1
v16.10.0
v16.11.0
v16.11.1
v16.12.0
v16.13.0  (LTS: Gallium)
v16.13.1  (Latest LTS: Gallium)
v17.0.0
v17.0.1
v17.1.0
v17.2.0

View File

@@ -33,4 +33,4 @@ v4.8.5 Argon
v4.8.6 Argon
v4.8.7 Argon
v4.9.0 Argon
v4.9.1 Argon *
v4.9.1 Argon

View File

@@ -8,18 +8,5 @@ v6.10.1-nightly20170222ee10f21f3b Boron
v6.10.2-nightly20170322426968ddd8 Boron
v6.10.3-nightly2017040479546c0b5a Boron
v6.10.4-nightly20170502312091a196 Boron
v6.11.1-nightly20170607f7ca483d68 Boron *
v8.9.1-nightly20171104a815e1b6a2 Carbon *
v10.13.1-nightly20181127a66d8774ac Dubnium
v10.14.1-nightly20181129bda1cc703a Dubnium
v10.14.2-nightly20181206fb99a4e9fa Dubnium
v10.14.3-nightly2018122617f4208a3b Dubnium
v10.15.1-nightly201901292d6e145340 Dubnium
v10.15.2-nightly201902215711238b4e Dubnium
v10.15.3-nightly20190301156e4c8e89 Dubnium
v10.15.4-nightly20190522cda0d16414 Dubnium
v10.16.1-nightly201907310339fba1bb Dubnium
v10.16.2-nightly20190801f025f8524b Dubnium
v10.16.3-nightly20190807b743000a96 Dubnium
v10.16.4-nightly20190923859d47593e9fd97e6a9eae6eeb8b6e910acfe434 Dubnium *
v12.13.1-nightly20191022d9174b4cc5 Erbium *
v6.11.1-nightly20170607f7ca483d68 Boron
v8.9.1-nightly20171104a815e1b6a2 Carbon

View File

@@ -33,7 +33,7 @@ v4.8.5 Argon
v4.8.6 Argon
v4.8.7 Argon
v4.9.0 Argon
v4.9.1 Argon *
v4.9.1 Argon
v6.9.0 Boron
v6.9.1 Boron
v6.9.2 Boron
@@ -59,13 +59,6 @@ v6.13.1 Boron
v6.14.0 Boron
v6.14.1 Boron
v6.14.2 Boron
v6.14.3 Boron
v6.14.4 Boron
v6.15.0 Boron
v6.15.1 Boron
v6.16.0 Boron
v6.17.0 Boron
v6.17.1 Boron *
v8.9.0 Carbon
v8.9.1 Carbon
v8.9.2 Carbon
@@ -75,92 +68,3 @@ v8.10.0 Carbon
v8.11.0 Carbon
v8.11.1 Carbon
v8.11.2 Carbon
v8.11.3 Carbon
v8.11.4 Carbon
v8.12.0 Carbon
v8.13.0 Carbon
v8.14.0 Carbon
v8.14.1 Carbon
v8.15.0 Carbon
v8.15.1 Carbon
v8.16.0 Carbon
v8.16.1 Carbon
v8.16.2 Carbon
v8.17.0 Carbon *
v10.13.0 Dubnium
v10.14.0 Dubnium
v10.14.1 Dubnium
v10.14.2 Dubnium
v10.15.0 Dubnium
v10.15.1 Dubnium
v10.15.2 Dubnium
v10.15.3 Dubnium
v10.16.0 Dubnium
v10.16.1 Dubnium
v10.16.2 Dubnium
v10.16.3 Dubnium
v10.17.0 Dubnium
v10.18.0 Dubnium
v10.18.1 Dubnium
v10.19.0 Dubnium
v10.20.0 Dubnium
v10.20.1 Dubnium
v10.21.0 Dubnium
v10.22.0 Dubnium
v10.22.1 Dubnium
v10.23.0 Dubnium
v10.23.1 Dubnium
v10.23.2 Dubnium
v10.23.3 Dubnium
v10.24.0 Dubnium
v10.24.1 Dubnium *
v12.13.0 Erbium
v12.13.1 Erbium
v12.14.0 Erbium
v12.14.1 Erbium
v12.15.0 Erbium
v12.16.0 Erbium
v12.16.1 Erbium
v12.16.2 Erbium
v12.16.3 Erbium
v12.17.0 Erbium
v12.18.0 Erbium
v12.18.1 Erbium
v12.18.2 Erbium
v12.18.3 Erbium
v12.18.4 Erbium
v12.19.0 Erbium
v12.19.1 Erbium
v12.20.0 Erbium
v12.20.1 Erbium
v12.20.2 Erbium
v12.21.0 Erbium
v12.22.0 Erbium
v12.22.1 Erbium
v12.22.2 Erbium
v12.22.3 Erbium
v12.22.4 Erbium
v12.22.5 Erbium
v12.22.6 Erbium
v12.22.7 Erbium
v12.22.8 Erbium *
v14.15.0 Fermium
v14.15.1 Fermium
v14.15.2 Fermium
v14.15.3 Fermium
v14.15.4 Fermium
v14.15.5 Fermium
v14.16.0 Fermium
v14.16.1 Fermium
v14.17.0 Fermium
v14.17.1 Fermium
v14.17.2 Fermium
v14.17.3 Fermium
v14.17.4 Fermium
v14.17.5 Fermium
v14.17.6 Fermium
v14.18.0 Fermium
v14.18.1 Fermium
v14.18.2 Fermium *
v16.13.0 Gallium
v16.13.1 Gallium *

View File

@@ -35,7 +35,7 @@ v6.10.1-nightly20170222ee10f21f3b Boron
v6.10.2-nightly20170322426968ddd8 Boron
v6.10.3-nightly2017040479546c0b5a Boron
v6.10.4-nightly20170502312091a196 Boron
v6.11.1-nightly20170607f7ca483d68 Boron *
v6.11.1-nightly20170607f7ca483d68 Boron
v7.0.0-nightly201610246bbdd668bd
v7.0.1-nightly2016102527e1749dcb
v7.1.1-nightly201611093daf11635d
@@ -69,7 +69,7 @@ v8.6.1-nightly201710116f42b680e3
v8.7.1-nightly2017102478a6ef46a9
v8.8.1-nightly201710256fbef7f350
v8.8.2-nightly20171030f00ba6b142
v8.9.1-nightly20171104a815e1b6a2 Carbon *
v8.9.1-nightly20171104a815e1b6a2 Carbon
v9.0.0-nightly2017103182790d84f2
v9.0.1-nightly20171105ed0fbd8d72
v9.1.1-nightly20171207c81e9682c4
@@ -92,55 +92,4 @@ v10.0.0-nightly20180424982adb5994
v10.0.1-nightly20180505ff148b987d
v10.1.1-nightly20180523235a272838
v10.2.1-nightly20180524be71c5dea9
v10.2.2-nightly20180526efc7f91354
v10.3.1-nightly201806067c0c61bde1
v10.4.1-nightly201806125752f520b1
v10.4.2-nightly20180619bc20ec0c0f
v10.5.1-nightly201807035d6d6fb121
v10.6.1-nightly20180718eef975ebae
v10.7.1-nightly2018080162fd84528e
v10.8.1-nightly2018081382830a809b
v10.9.0-nightly20180906707a37f74f
v10.10.1-nightly201809205da1f0ca2c
v10.11.1-nightly20181010d16486b215
v10.12.1-nightly201810283f63297fe8
v10.13.1-nightly20181127a66d8774ac Dubnium
v10.14.1-nightly20181129bda1cc703a Dubnium
v10.14.2-nightly20181206fb99a4e9fa Dubnium
v10.14.3-nightly2018122617f4208a3b Dubnium
v10.15.1-nightly201901292d6e145340 Dubnium
v10.15.2-nightly201902215711238b4e Dubnium
v10.15.3-nightly20190301156e4c8e89 Dubnium
v10.15.4-nightly20190522cda0d16414 Dubnium
v10.16.1-nightly201907310339fba1bb Dubnium
v10.16.2-nightly20190801f025f8524b Dubnium
v10.16.3-nightly20190807b743000a96 Dubnium
v10.16.4-nightly20190923859d47593e9fd97e6a9eae6eeb8b6e910acfe434 Dubnium *
v11.0.0-nightly20181023d901d16b39
v11.1.0-nightly20181101af6d26281f
v12.0.0-nightly20190423859421188b
v12.10.1-nightly20190925edd7c579e8
v12.11.1-nightly20190926acd08fdce5
v12.11.2-nightly201910115fdf4a474f
v12.12.1-nightly201910123f3c41cfb0
v12.13.1-nightly20191022d9174b4cc5 Erbium *
v13.0.0-nightly2019102271b342f937
v13.0.2-nightly20191028e4ab6fced1
v13.1.1-nightly201911219b71534d23
v13.2.1-nightly2019120319b31c1bc5
v13.3.1-nightly20191214b3ae532392
v13.4.1-nightly2019121896a65e85c5
v13.5.1-nightly2020010742d36dca90
v13.6.1-nightly20200121cbd84c5ee1
v13.7.1-nightly20200122340a1bd9a0
v13.8.1-nightly202002187c2d33f38f
v13.9.1-nightly202003041bca7b6c70
v13.10.2-nightly202003117eed9d6bcc
v13.11.1-nightly2020032628e298f219
v13.12.1-nightly202004140a8e07599b
v13.13.1-nightly20200415947ddec091
v14.0.0-nightly20200421c3554307c6
v15.0.0-nightly2020102011f1ad939f
v16.0.0-nightly20210420a0261d231c
v17.0.0-nightly202110193f11666dc7
v18.0.0-nightly20211217a182a21636
v11.0.0-nightly201805249a02de7084

View File

@@ -1 +1 @@
v18.0.0-nightly20211217a182a21636
v11.0.0-nightly201805249a02de7084

View File

@@ -1 +1 @@
v17.2.0
v10.2.0

View File

@@ -274,7 +274,7 @@ v4.8.5 Argon
v4.8.6 Argon
v4.8.7 Argon
v4.9.0 Argon
v4.9.1 Argon *
v4.9.1 Argon
v5.0.0
v5.1.0
v5.1.1
@@ -332,13 +332,6 @@ v6.13.1 Boron
v6.14.0 Boron
v6.14.1 Boron
v6.14.2 Boron
v6.14.3 Boron
v6.14.4 Boron
v6.15.0 Boron
v6.15.1 Boron
v6.16.0 Boron
v6.17.0 Boron
v6.17.1 Boron *
v7.0.0
v7.1.0
v7.2.0
@@ -380,18 +373,6 @@ v8.10.0 Carbon
v8.11.0 Carbon
v8.11.1 Carbon
v8.11.2 Carbon
v8.11.3 Carbon
v8.11.4 Carbon
v8.12.0 Carbon
v8.13.0 Carbon
v8.14.0 Carbon
v8.14.1 Carbon
v8.15.0 Carbon
v8.15.1 Carbon
v8.16.0 Carbon
v8.16.1 Carbon
v8.16.2 Carbon
v8.17.0 Carbon *
v9.0.0
v9.1.0
v9.2.0
@@ -409,205 +390,6 @@ v9.10.0
v9.10.1
v9.11.0
v9.11.1
v9.11.2
v10.0.0
v10.1.0
v10.2.0
v10.2.1
v10.3.0
v10.4.0
v10.4.1
v10.5.0
v10.6.0
v10.7.0
v10.8.0
v10.9.0
v10.10.0
v10.11.0
v10.12.0
v10.13.0 Dubnium
v10.14.0 Dubnium
v10.14.1 Dubnium
v10.14.2 Dubnium
v10.15.0 Dubnium
v10.15.1 Dubnium
v10.15.2 Dubnium
v10.15.3 Dubnium
v10.16.0 Dubnium
v10.16.1 Dubnium
v10.16.2 Dubnium
v10.16.3 Dubnium
v10.17.0 Dubnium
v10.18.0 Dubnium
v10.18.1 Dubnium
v10.19.0 Dubnium
v10.20.0 Dubnium
v10.20.1 Dubnium
v10.21.0 Dubnium
v10.22.0 Dubnium
v10.22.1 Dubnium
v10.23.0 Dubnium
v10.23.1 Dubnium
v10.23.2 Dubnium
v10.23.3 Dubnium
v10.24.0 Dubnium
v10.24.1 Dubnium *
v11.0.0
v11.1.0
v11.2.0
v11.3.0
v11.4.0
v11.5.0
v11.6.0
v11.7.0
v11.8.0
v11.9.0
v11.10.0
v11.10.1
v11.11.0
v11.12.0
v11.13.0
v11.14.0
v11.15.0
v12.0.0
v12.1.0
v12.2.0
v12.3.0
v12.3.1
v12.4.0
v12.5.0
v12.6.0
v12.7.0
v12.8.0
v12.8.1
v12.9.0
v12.9.1
v12.10.0
v12.11.0
v12.11.1
v12.12.0
v12.13.0 Erbium
v12.13.1 Erbium
v12.14.0 Erbium
v12.14.1 Erbium
v12.15.0 Erbium
v12.16.0 Erbium
v12.16.1 Erbium
v12.16.2 Erbium
v12.16.3 Erbium
v12.17.0 Erbium
v12.18.0 Erbium
v12.18.1 Erbium
v12.18.2 Erbium
v12.18.3 Erbium
v12.18.4 Erbium
v12.19.0 Erbium
v12.19.1 Erbium
v12.20.0 Erbium
v12.20.1 Erbium
v12.20.2 Erbium
v12.21.0 Erbium
v12.22.0 Erbium
v12.22.1 Erbium
v12.22.2 Erbium
v12.22.3 Erbium
v12.22.4 Erbium
v12.22.5 Erbium
v12.22.6 Erbium
v12.22.7 Erbium
v12.22.8 Erbium *
v13.0.0
v13.0.1
v13.1.0
v13.2.0
v13.3.0
v13.4.0
v13.5.0
v13.6.0
v13.7.0
v13.8.0
v13.9.0
v13.10.0
v13.10.1
v13.11.0
v13.12.0
v13.13.0
v13.14.0
v14.0.0
v14.1.0
v14.2.0
v14.3.0
v14.4.0
v14.5.0
v14.6.0
v14.7.0
v14.8.0
v14.9.0
v14.10.0
v14.10.1
v14.11.0
v14.12.0
v14.13.0
v14.13.1
v14.14.0
v14.15.0 Fermium
v14.15.1 Fermium
v14.15.2 Fermium
v14.15.3 Fermium
v14.15.4 Fermium
v14.15.5 Fermium
v14.16.0 Fermium
v14.16.1 Fermium
v14.17.0 Fermium
v14.17.1 Fermium
v14.17.2 Fermium
v14.17.3 Fermium
v14.17.4 Fermium
v14.17.5 Fermium
v14.17.6 Fermium
v14.18.0 Fermium
v14.18.1 Fermium
v14.18.2 Fermium *
v15.0.0
v15.0.1
v15.1.0
v15.2.0
v15.2.1
v15.3.0
v15.4.0
v15.5.0
v15.5.1
v15.6.0
v15.7.0
v15.8.0
v15.9.0
v15.10.0
v15.11.0
v15.12.0
v15.13.0
v15.14.0
v16.0.0
v16.1.0
v16.2.0
v16.3.0
v16.4.0
v16.4.1
v16.4.2
v16.5.0
v16.6.0
v16.6.1
v16.6.2
v16.7.0
v16.8.0
v16.9.0
v16.9.1
v16.10.0
v16.11.0
v16.11.1
v16.12.0
v16.13.0 Gallium
v16.13.1 Gallium *
v17.0.0
v17.0.1
v17.1.0
v17.2.0

View File

@@ -1,8 +1,4 @@
lts/*|lts/gallium
lts/gallium|v16.13.1
lts/fermium|v14.18.2
lts/erbium|v12.22.8
lts/dubnium|v10.24.1
lts/carbon|v8.17.0
lts/boron|v6.17.1
lts/*|lts/carbon
lts/carbon|v8.11.2
lts/boron|v6.14.2
lts/argon|v4.9.1

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