From 2f40eeef2e201779b942c1c8bd241d058f5d2273 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 19 Nov 2021 08:53:43 -0800 Subject: [PATCH 01/37] [shellcheck] apply v0.8.0 updates --- install.sh | 2 +- nvm.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index c5bc50f..d6433ce 100755 --- a/install.sh +++ b/install.sh @@ -300,7 +300,7 @@ nvm_detect_profile() { 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 + [ -n "${NVM_DIR}" ] && [ -z "${NPM_COMMAND%%"$NVM_DIR"/*}" ] && return 0 local NPM_VERSION NPM_VERSION="$(npm --version)" diff --git a/nvm.sh b/nvm.sh index 72992c1..f65e991 100644 --- a/nvm.sh +++ b/nvm.sh @@ -634,7 +634,7 @@ nvm_remote_versions() { NVM_LS_REMOTE_EXIT_CODE=$? # split output into two NVM_LS_REMOTE_PRE_MERGED_OUTPUT="${NVM_LS_REMOTE_OUTPUT%%v4\.0\.0*}" - NVM_LS_REMOTE_POST_MERGED_OUTPUT="${NVM_LS_REMOTE_OUTPUT#$NVM_LS_REMOTE_PRE_MERGED_OUTPUT}" + NVM_LS_REMOTE_POST_MERGED_OUTPUT="${NVM_LS_REMOTE_OUTPUT#"$NVM_LS_REMOTE_PRE_MERGED_OUTPUT"}" fi local NVM_LS_REMOTE_IOJS_EXIT_CODE @@ -940,7 +940,7 @@ nvm_print_alias_path() { return 2 fi local ALIAS - ALIAS="${ALIAS_PATH##${NVM_ALIAS_DIR}\/}" + ALIAS="${ALIAS_PATH##"${NVM_ALIAS_DIR}"\/}" local DEST DEST="$(nvm_alias "${ALIAS}" 2>/dev/null)" ||: if [ -n "${DEST}" ]; then @@ -1186,7 +1186,7 @@ nvm_strip_iojs_prefix() { if [ "${1-}" = "${NVM_IOJS_PREFIX}" ]; then nvm_echo else - nvm_echo "${1#${NVM_IOJS_PREFIX}-}" + nvm_echo "${1#"${NVM_IOJS_PREFIX}"-}" fi } @@ -2614,7 +2614,7 @@ nvm_node_version_has_solaris_binary() { # Succeeds if $VERSION represents a version (node, io.js or merged) that has a # Solaris binary, fails otherwise. nvm_has_solaris_binary() { - local VERSION=$1 + local VERSION="${1-}" if nvm_is_merged_node_version "${VERSION}"; then return 0 # All merged node versions have a Solaris binary elif nvm_is_iojs_version "${VERSION}"; then From ccd98f7fcbae2a41ae4a00ab7ba50727732dd4b2 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 19 Nov 2021 08:59:37 -0800 Subject: [PATCH 02/37] [Dev Deps] update `doctoc` --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c0630c6..dc3efd5 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "homepage": "https://github.com/nvm-sh/nvm", "devDependencies": { "dockerfile_lint": "^0.3.4", - "doctoc": "^2.0.1", + "doctoc": "^2.1.0", "eclint": "^2.8.1", "markdown-link-check": "^3.8.7", "replace": "^1.2.1", From e9b26938b953278b0e6c0d1812e20267358f8f5e Mon Sep 17 00:00:00 2001 From: Ian Grayson Date: Mon, 15 Nov 2021 04:23:42 -0800 Subject: [PATCH 03/37] [readme] Describe another failure case for installing node versions from source on mac arm64 machines. It seems to be related to https://github.com/nodejs/node/issues/39313 (which describes a similar issue). --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8891021..658b704 100644 --- a/README.md +++ b/README.md @@ -913,6 +913,7 @@ Some issues you may encounter: $ 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. From 30486b9bd9b88c875b78f0ea9fd71801be6af46b Mon Sep 17 00:00:00 2001 From: Robert Elliot Date: Mon, 22 Nov 2021 14:34:43 +0000 Subject: [PATCH 04/37] [readme] Balance the if statement in bash example Nesting the `elif` at the same level as the `if` and `fi` makes it clear which code applies to which branch (no .nvmrc file / found .nvmrc file). I wasted a while looking at it trying to work out how it did anything if there was a .nvmrc file, because obviously the `if` didn't match and I couldn't see the `elif` branch. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 658b704..4f2b588 100644 --- a/README.md +++ b/README.md @@ -572,7 +572,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) From 89379176ac5f6604ca0bafa7f9d20951da620fdd Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 25 Nov 2021 14:26:35 -0800 Subject: [PATCH 05/37] [Fix] `install`: properly check for curl/wget --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index d6433ce..a4a12ba 100755 --- a/install.sh +++ b/install.sh @@ -360,7 +360,7 @@ nvm_do_install() { # Autodetect install method if nvm_has git; then install_nvm_from_git - elif nvm_has nvm_download; then + elif nvm_has curl || nvm_has wget; then install_nvm_as_script else nvm_echo >&2 'You need git, curl, or wget to install nvm' @@ -373,7 +373,7 @@ nvm_do_install() { fi install_nvm_from_git elif [ "${METHOD}" = 'script' ]; then - if ! nvm_has nvm_download; then + if ! nvm_has curl || nvm_has wget; then nvm_echo >&2 "You need curl or wget to install nvm" exit 1 fi From 275001b06642f9ee35776b06a37c16b67ccf2328 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 25 Nov 2021 19:35:39 -0800 Subject: [PATCH 06/37] [Tests] fix windows WSL tests --- .github/workflows/windows-npm.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/windows-npm.yml b/.github/workflows/windows-npm.yml index 90c5002..6281a42 100644 --- a/.github/workflows/windows-npm.yml +++ b/.github/workflows/windows-npm.yml @@ -87,6 +87,9 @@ jobs: 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 @@ -99,19 +102,24 @@ jobs: - Ubuntu-18.04 npm-node-version: - '--lts' + - '14' + - '12' - '11' + - '10' + method: + - '' + # - 'script' # TODO: uncomment this. steps: - uses: Vampire/setup-wsl@v1 with: distribution: ${{ matrix.wsl-distrib }} - additional-packages: bash git curl ca-certificates + additional-packages: bash git curl ca-certificates wget - name: Retrieve nvm on WSL - shell: wsl-bash {0} run: | - if [ "${{ matrix.wsl-distrib }}" = "Ubuntu-18.04" ] && [ "${{ matrix.npm-node-version }}" = "--lts" ]; then + 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=script bash + 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 }} From 4856407d2691d2135420f25d00acdb6d9b85ae3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Foray?= Date: Tue, 30 Nov 2021 16:07:22 +0100 Subject: [PATCH 07/37] [Fix] `install`: fix method=script install condition Fixes #2665; see 8937917 --- .github/workflows/windows-npm.yml | 2 +- install.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows-npm.yml b/.github/workflows/windows-npm.yml index 6281a42..29fef33 100644 --- a/.github/workflows/windows-npm.yml +++ b/.github/workflows/windows-npm.yml @@ -108,7 +108,7 @@ jobs: - '10' method: - '' - # - 'script' # TODO: uncomment this. + - 'script' steps: - uses: Vampire/setup-wsl@v1 with: diff --git a/install.sh b/install.sh index a4a12ba..eb37d04 100755 --- a/install.sh +++ b/install.sh @@ -373,7 +373,7 @@ nvm_do_install() { fi install_nvm_from_git elif [ "${METHOD}" = 'script' ]; then - if ! nvm_has curl || nvm_has wget; then + if ! nvm_has curl && ! nvm_has wget; then nvm_echo >&2 "You need curl or wget to install nvm" exit 1 fi From 328dd5004eaac5509d7e24359362df65c951478e Mon Sep 17 00:00:00 2001 From: Ankit Kumar Date: Sun, 21 Nov 2021 15:59:39 +0530 Subject: [PATCH 08/37] [Fix] `nvm_get_download_slug`: better architecture selection for M1 Macs If the node version is below 16.0.0 then nvm will select x86_64 architecture, else arm64 architecture. --- README.md | 2 ++ nvm.sh | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 4f2b588..94599b7 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,8 @@ If the above doesn't fix the problem, you may try the following: - 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. + #### Ansible You can use a task: diff --git a/nvm.sh b/nvm.sh index f65e991..a37e422 100644 --- a/nvm.sh +++ b/nvm.sh @@ -2093,6 +2093,14 @@ nvm_get_download_slug() { fi fi + # If node version in below 16.0.0 then there is no arm64 packages available in node repositories, so we have to install "x64" arch packages + # If running MAC M1 :: arm64 arch and Darwin OS then use "x64" Architecture because node doesn't provide darwin_arm64 package below v16.0.0 + if nvm_version_greater '16.0.0' "${VERSION}"; then + if [ "_${NVM_OS}" = '_darwin' ] && [ "${NVM_ARCH}" = 'arm64' ]; then + NVM_ARCH=x64 + fi + fi + if [ "${KIND}" = 'binary' ]; then nvm_echo "${FLAVOR}-${VERSION}-${NVM_OS}-${NVM_ARCH}" elif [ "${KIND}" = 'source' ]; then From 81fc05684de8b0b13aed401de64733e1d5d23a9a Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 2 Dec 2021 23:33:20 -0800 Subject: [PATCH 09/37] [Tests] `nvm_get_download_slug`: add unit tests --- test/fast/Unit tests/nvm_get_download_slug | 111 +++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100755 test/fast/Unit tests/nvm_get_download_slug diff --git a/test/fast/Unit tests/nvm_get_download_slug b/test/fast/Unit tests/nvm_get_download_slug new file mode 100755 index 0000000..a4a0bc4 --- /dev/null +++ b/test/fast/Unit tests/nvm_get_download_slug @@ -0,0 +1,111 @@ +#!/bin/sh + +cleanup() { + unset nvm_get_os + unset nvm_get_arch +} + +die () { cleanup; echo "$@" ; exit 1; } + +\. ../../../nvm.sh + +[ "$(nvm_get_download_slug 2>/dev/null ; echo $?)" = '1' ] || die 'invalid flavor did not fail with exit code 1' +[ "$(nvm_get_download_slug 2>&1)" = 'supported flavors: node, iojs' ] || die 'invalid flavor did not fail with expected message' + +[ "$(nvm_get_download_slug node 2>/dev/null ; echo $?)" = '2' ] || die 'invalid kind did not fail with exit code 2' +[ "$(nvm_get_download_slug node 2>&1)" = 'supported kinds: binary, source' ] || die 'invalid kind did not fail with expected message' +[ "$(nvm_get_download_slug iojs 2>/dev/null ; echo $?)" = '2' ] || die 'invalid kind did not fail with exit code 2' +[ "$(nvm_get_download_slug iojs 2>&1)" = 'supported kinds: binary, source' ] || die 'invalid kind did not fail with expected message' + +nvm_get_os() { + echo omgOS +} +nvm_get_arch() { + echo nemesis +} + +ACTUAL="$(nvm_get_download_slug node binary 1.2.3)" +EXPECTED='node-1.2.3-omgOS-nemesis' +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" +ACTUAL="$(nvm_get_download_slug iojs binary 1.2.3)" +EXPECTED='iojs-1.2.3-omgOS-nemesis' +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" + +ACTUAL="$(nvm_get_download_slug node source 1.2.3)" +EXPECTED="node-1.2.3" +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" +ACTUAL="$(nvm_get_download_slug iojs source 1.2.3)" +EXPECTED="iojs-1.2.3" +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" + +nvm_get_arch() { + echo armv6l +} +ACTUAL="$(nvm_get_download_slug node binary 1.2.3)" +EXPECTED='node-1.2.3-omgOS-arm-pi' +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" +ACTUAL="$(nvm_get_download_slug iojs binary 1.2.3)" +EXPECTED='iojs-1.2.3-omgOS-arm-pi' +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" + +ACTUAL="$(nvm_get_download_slug node source 1.2.3)" +EXPECTED="node-1.2.3" +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" +ACTUAL="$(nvm_get_download_slug iojs source 1.2.3)" +EXPECTED="iojs-1.2.3" +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" + +nvm_get_arch() { + echo armv7l +} +ACTUAL="$(nvm_get_download_slug node binary 1.2.3)" +EXPECTED='node-1.2.3-omgOS-arm-pi' +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" +ACTUAL="$(nvm_get_download_slug iojs binary 1.2.3)" +EXPECTED='iojs-1.2.3-omgOS-arm-pi' +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" + +ACTUAL="$(nvm_get_download_slug node source 1.2.3)" +EXPECTED="node-1.2.3" +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" +ACTUAL="$(nvm_get_download_slug iojs source 1.2.3)" +EXPECTED="iojs-1.2.3" +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" + +nvm_get_os() { + echo darwin +} +nvm_get_arch() { + echo nemesis +} +ACTUAL="$(nvm_get_download_slug node binary 15.99.99)" +EXPECTED='node-15.99.99-darwin-nemesis' +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" +ACTUAL="$(nvm_get_download_slug iojs binary 15.99.99)" +EXPECTED='iojs-15.99.99-darwin-nemesis' +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" + +ACTUAL="$(nvm_get_download_slug node source 15.99.99)" +EXPECTED="node-15.99.99" +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" +ACTUAL="$(nvm_get_download_slug iojs source 15.99.99)" +EXPECTED="iojs-15.99.99" +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" + +nvm_get_arch() { + echo arm64 +} +ACTUAL="$(nvm_get_download_slug node binary 15.99.99)" +EXPECTED='node-15.99.99-darwin-x64' +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" +ACTUAL="$(nvm_get_download_slug iojs binary 15.99.99)" +EXPECTED='iojs-15.99.99-darwin-x64' +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" + +ACTUAL="$(nvm_get_download_slug node source 15.99.99)" +EXPECTED="node-15.99.99" +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" +ACTUAL="$(nvm_get_download_slug iojs source 15.99.99)" +EXPECTED="iojs-15.99.99" +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" + From 6cc90a4b8daa44ad3050828c2bf98fa77a16bf90 Mon Sep 17 00:00:00 2001 From: Varun Sharma Date: Mon, 22 Nov 2021 07:20:50 -0800 Subject: [PATCH 10/37] [actions] add step security runner --- .github/workflows/latest-npm.yml | 18 +++++++++++++++++ .github/workflows/lint.yml | 24 +++++++++++++++++++++++ .github/workflows/rebase.yml | 6 ++++++ .github/workflows/release.yml | 6 ++++++ .github/workflows/require-allow-edits.yml | 5 +++++ .github/workflows/shellcheck.yml | 13 ++++++++++++ .github/workflows/toc.yml | 6 ++++++ 7 files changed, 78 insertions(+) diff --git a/.github/workflows/latest-npm.yml b/.github/workflows/latest-npm.yml index b616158..b66c605 100644 --- a/.github/workflows/latest-npm.yml +++ b/.github/workflows/latest-npm.yml @@ -8,6 +8,12 @@ jobs: 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: @@ -39,6 +45,14 @@ jobs: - 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' @@ -55,4 +69,8 @@ jobs: needs: [nodes] runs-on: ubuntu-latest steps: + - name: Harden Runner + uses: step-security/harden-runner@v1 + with: + egress-policy: block - run: 'echo tests completed' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 32f279d..62fc960 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,6 +8,12 @@ jobs: 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' @@ -20,6 +26,14 @@ jobs: 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' @@ -32,6 +46,12 @@ jobs: 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' @@ -44,6 +64,10 @@ jobs: 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 diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml index e97e6a9..9f48710 100644 --- a/.github/workflows/rebase.yml +++ b/.github/workflows/rebase.yml @@ -11,6 +11,12 @@ jobs: 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: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dfd9969..52c133d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,6 +8,12 @@ jobs: 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: diff --git a/.github/workflows/require-allow-edits.yml b/.github/workflows/require-allow-edits.yml index b92dcd5..427eecb 100644 --- a/.github/workflows/require-allow-edits.yml +++ b/.github/workflows/require-allow-edits.yml @@ -11,6 +11,11 @@ jobs: 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 }} diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 7b375a8..aafcb7f 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -26,9 +26,18 @@ jobs: 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 }} @@ -39,4 +48,8 @@ jobs: 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' diff --git a/.github/workflows/toc.yml b/.github/workflows/toc.yml index 60ed577..6a0fa6d 100644 --- a/.github/workflows/toc.yml +++ b/.github/workflows/toc.yml @@ -11,6 +11,12 @@ jobs: 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 From 2459d177415d39fce6f602a111c6069e91e22f04 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 16 Dec 2021 23:13:15 -0800 Subject: [PATCH 11/37] [Tests] update test mocks --- test/fast/Unit tests/mocks/LTS_names.txt | 1 + .../mocks/nodejs.org-dist-index.tab | 17 +++ .../nodejs.org-download-nightly-index.tab | 103 ++++++++++++++++++ .../Unit tests/mocks/nvm ls-remote lts.txt | 11 +- .../Unit tests/mocks/nvm ls-remote node.txt | 21 +++- test/fast/Unit tests/mocks/nvm ls-remote.txt | 21 +++- .../Unit tests/mocks/nvm_ls_remote LTS.txt | 11 +- .../mocks/nvm_ls_remote nightly.txt | 3 +- .../mocks/nvm_ls_remote stable nightly.txt | 2 +- .../Unit tests/mocks/nvm_ls_remote stable.txt | 2 +- test/fast/Unit tests/mocks/nvm_ls_remote.txt | 21 +++- .../mocks/nvm_make_alias LTS alias calls.txt | 7 +- ...t_implicit_alias remote stable nightly.txt | 2 +- ...nvm_print_implicit_alias remote stable.txt | 2 +- 14 files changed, 206 insertions(+), 18 deletions(-) diff --git a/test/fast/Unit tests/mocks/LTS_names.txt b/test/fast/Unit tests/mocks/LTS_names.txt index e0ce3c1..32fdb6e 100644 --- a/test/fast/Unit tests/mocks/LTS_names.txt +++ b/test/fast/Unit tests/mocks/LTS_names.txt @@ -1,3 +1,4 @@ +gallium fermium erbium dubnium diff --git a/test/fast/Unit tests/mocks/nodejs.org-dist-index.tab b/test/fast/Unit tests/mocks/nodejs.org-dist-index.tab index 9ad9279..ab075ba 100644 --- a/test/fast/Unit tests/mocks/nodejs.org-dist-index.tab +++ b/test/fast/Unit tests/mocks/nodejs.org-dist-index.tab @@ -1,4 +1,16 @@ version date files npm v8 uv zlib openssl modules lts security +v17.2.0 2021-11-30 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.4 9.6.180.14 1.42.0 1.2.11 3.0.0+quic 102 - - +v17.1.0 2021-11-09 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.2 9.5.172.25 1.42.0 1.2.11 3.0.0+quic 102 - - +v17.0.1 2021-10-20 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.0 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v17.0.0 2021-10-19 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.0 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v16.13.1 2021-12-01 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.2 9.4.146.24 1.42.0 1.2.11 1.1.1l+quic 93 Gallium - +v16.13.0 2021-10-26 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.0 9.4.146.19 1.42.0 1.2.11 1.1.1l+quic 93 Gallium - +v16.12.0 2021-10-20 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.0 9.4.146.19 1.42.0 1.2.11 1.1.1l+quic 93 - - +v16.11.1 2021-10-12 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.0.0 9.4.146.19 1.42.0 1.2.11 1.1.1l+quic 93 - true +v16.11.0 2021-10-08 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.0.0 9.4.146.19 1.42.0 1.2.11 1.1.1l+quic 93 - - +v16.10.0 2021-09-22 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.24.0 9.3.345.19 1.42.0 1.2.11 1.1.1l+quic 93 - - +v16.9.1 2021-09-10 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.21.1 9.3.345.16 1.42.0 1.2.11 1.1.1l+quic 93 - - +v16.9.0 2021-09-07 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.21.1 9.3.345.16 1.42.0 1.2.11 1.1.1l+quic 93 - - v16.8.0 2021-08-25 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.21.0 9.2.230.21 1.42.0 1.2.11 1.1.1k+quic 93 - - v16.7.0 2021-08-18 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.20.3 9.2.230.21 1.42.0 1.2.11 1.1.1k+quic 93 - - v16.6.2 2021-08-11 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.20.3 9.2.230.21 1.41.0 1.2.11 1.1.1k+quic 93 - true @@ -30,6 +42,9 @@ v15.2.0 2020-11-10 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linu v15.1.0 2020-11-04 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.0.8 8.6.395.17 1.40.0 1.2.11 1.1.1g 88 - - v15.0.1 2020-10-21 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.0.3 8.6.395.17 1.40.0 1.2.11 1.1.1g 88 - - v15.0.0 2020-10-20 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.0.2 8.6.395.16 1.40.0 1.2.11 1.1.1g 88 - - +v14.18.2 2021-11-30 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 6.14.15 8.4.371.23 1.42.0 1.2.11 1.1.1l 83 Fermium - +v14.18.1 2021-10-12 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 6.14.15 8.4.371.23 1.42.0 1.2.11 1.1.1l 83 Fermium true +v14.18.0 2021-09-28 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 6.14.15 8.4.371.23 1.42.0 1.2.11 1.1.1l 83 Fermium - v14.17.6 2021-08-30 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 6.14.15 8.4.371.23 1.41.0 1.2.11 1.1.1l 83 Fermium true v14.17.5 2021-08-11 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 6.14.14 8.4.371.23 1.41.0 1.2.11 1.1.1k 83 Fermium true v14.17.4 2021-07-29 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 6.14.14 8.4.371.23 1.41.0 1.2.11 1.1.1k 83 Fermium true @@ -79,6 +94,8 @@ v13.2.0 2019-11-21 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linu v13.1.0 2019-11-05 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,sunos-x64,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 6.12.1 7.8.279.17 1.33.1 1.2.11 1.1.1d 79 - - v13.0.1 2019-10-23 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,sunos-x64,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 6.12.0 7.8.279.17 1.33.1 1.2.11 1.1.1d 79 - - v13.0.0 2019-10-22 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,sunos-x64,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 6.12.0 7.8.279.17 1.32.0 1.2.11 1.1.1d 79 - - +v12.22.8 2021-12-16 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,sunos-x64,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 6.14.15 7.8.279.23 1.40.0 1.2.11 1.1.1m 72 Erbium - +v12.22.7 2021-10-12 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,sunos-x64,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 6.14.15 7.8.279.23 1.40.0 1.2.11 1.1.1l 72 Erbium true v12.22.6 2021-08-30 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,sunos-x64,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 6.14.15 7.8.279.23 1.40.0 1.2.11 1.1.1l 72 Erbium true v12.22.5 2021-08-11 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,sunos-x64,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 6.14.14 7.8.279.23 1.40.0 1.2.11 1.1.1k 72 Erbium true v12.22.4 2021-07-29 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,sunos-x64,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 6.14.14 7.8.279.23 1.40.0 1.2.11 1.1.1k 72 Erbium true diff --git a/test/fast/Unit tests/mocks/nodejs.org-download-nightly-index.tab b/test/fast/Unit tests/mocks/nodejs.org-download-nightly-index.tab index 62831c2..8cf5d0d 100644 --- a/test/fast/Unit tests/mocks/nodejs.org-download-nightly-index.tab +++ b/test/fast/Unit tests/mocks/nodejs.org-download-nightly-index.tab @@ -1,4 +1,107 @@ version date files npm v8 uv zlib openssl modules lts security +v18.0.0-nightly20211217a182a21636 2021-12-17 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.3.0 9.6.180.15 1.42.0 1.2.11 3.0.1+quic 102 - - +v18.0.0-nightly20211216e56bf500c7 2021-12-16 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.3.0 9.6.180.15 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly202112156267e55685 2021-12-15 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.3.0 9.6.180.15 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly2021121485d4cd3079 2021-12-14 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.3.0 9.6.180.15 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211213ad91abcbad 2021-12-13 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.3.0 9.6.180.15 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly2021121212e3c74e2e 2021-12-12 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.2.0 9.6.180.15 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly2021121142dd3ca869 2021-12-11 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.2.0 9.6.180.15 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211210ecf4114f94 2021-12-10 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.2.0 9.6.180.15 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly2021120918ff583250 2021-12-09 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.2.0 9.6.180.15 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211208c93a639788 2021-12-08 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.2.0 9.6.180.15 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly202112071fa507f098 2021-12-07 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.2.0 9.6.180.15 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211206b323cec78f 2021-12-06 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.2.0 9.6.180.15 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211205147d23b211 2021-12-05 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.4 9.6.180.15 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211204781408f377 2021-12-04 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.4 9.6.180.15 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly2021120397b8eb62fe 2021-12-03 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.4 9.6.180.15 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211202e601c0d678 2021-12-02 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.4 9.6.180.15 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211201bbed2a77d3 2021-12-01 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.4 9.6.180.15 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly202111306d8ab767e4 2021-11-30 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.4 9.6.180.15 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly202111294b65dec76d 2021-11-29 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.4 9.6.180.14 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211128265a47d680 2021-11-28 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.4 9.6.180.14 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211127a2572940cd 2021-11-27 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.4 9.6.180.14 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211126a5d3449f20 2021-11-26 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.4 9.6.180.14 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly2021112550f3428e21 2021-11-25 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.4 9.6.180.14 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly202111242a871df3df 2021-11-24 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.4 9.6.180.14 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211123d9de812cb8 2021-11-23 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.4 9.6.180.14 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211122bad6526a00 2021-11-22 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.3 9.6.180.14 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211121e31d1cb55d 2021-11-21 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.3 9.5.172.25 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211120a37b9c80ef 2021-11-20 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.3 9.5.172.25 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly202111198a09a1ec66 2021-11-19 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.3 9.5.172.25 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly202111180c2011c6c5 2021-11-18 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.3 9.5.172.25 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211117e6d8ae05b2 2021-11-17 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.3 9.5.172.25 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly2021111694fa781580 2021-11-16 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.3 9.5.172.25 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211115b323c63190 2021-11-15 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.3 9.5.172.25 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211114cf56abe6bb 2021-11-14 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.3 9.5.172.25 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly202111139cd30894f6 2021-11-13 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.3 9.5.172.25 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly202111122d005bb961 2021-11-12 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.3 9.5.172.25 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly202111116e1629786f 2021-11-11 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.3 9.5.172.25 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211110d8f1823d5f 2021-11-10 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.2 9.5.172.25 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly202111098d6a02583f 2021-11-09 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.2 9.5.172.25 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211108873119385f 2021-11-08 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.2 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211107549a4c9163 2021-11-07 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.2 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly202111050a62026f32 2021-11-05 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.2 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly202111042cc7a91a5d 2021-11-04 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.2 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly202111032e2a6fecd9 2021-11-03 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.2 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211102229a182823 2021-11-02 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.2 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly2021110186099a375a 2021-11-01 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.1 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211031b5aa08d2f9 2021-10-31 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.1 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211030babd73ce25 2021-10-30 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.1 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211029e937662dec 2021-10-29 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.1 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly202110283ff8c355c8 2021-10-28 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.1 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly202110279c405f2591 2021-10-27 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.1 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly202110269ebdba49c7 2021-10-26 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.1 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211025070b54a4ac 2021-10-25 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.1 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly2021102447fb8676ff 2021-10-24 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.1 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly2021102380e94dbb68 2021-10-23 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.0 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly202110220d59d0d1c3 2021-10-22 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.0 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly20211021f233cb2c29 2021-10-21 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.0 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v18.0.0-nightly202110204cb3e06ed8 2021-10-20 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.0 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v17.0.0-nightly202110193f11666dc7 2021-10-19 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.1.0 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v17.0.0-nightly20211018c0a70203de 2021-10-18 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.0.0 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v17.0.0-nightly20211017ed01811e71 2021-10-17 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.0.0 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v17.0.0-nightly202110167624917069 2021-10-16 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.0.0 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - - +v17.0.0-nightly20211015a278117f28 2021-10-15 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.0.0 9.5.172.21 1.42.0 1.2.11 3.0.0+quic 102 - true +v17.0.0-nightly20211014f9996d5b80 2021-10-14 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src 8.0.0 9.5.172.19 1.42.0 1.2.11 3.0.0+quic 102 - true +v17.0.0-nightly20211013f570109094 2021-10-13 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.0.0 9.5.172.19 1.42.0 1.2.11 3.0.0+quic 102 - true +v17.0.0-nightly20211012a784258444 2021-10-12 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.0.0 9.4.146.18 1.42.0 1.2.11 3.0.0+quic 100 - - +v17.0.0-nightly202110110cc37209fa 2021-10-11 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.0.0 9.4.146.18 1.42.0 1.2.11 3.0.0+quic 100 - - +v17.0.0-nightly202110108068f40313 2021-10-10 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.0.0 9.4.146.18 1.42.0 1.2.11 1.1.1l+quic 100 - - +v17.0.0-nightly20211009879ff775d0 2021-10-09 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.0.0 9.4.146.18 1.42.0 1.2.11 1.1.1l+quic 100 - - +v17.0.0-nightly20211008dbc91de011 2021-10-08 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 8.0.0 9.4.146.18 1.42.0 1.2.11 1.1.1l+quic 100 - - +v17.0.0-nightly2021100788e82b890b 2021-10-07 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.24.0 9.4.146.18 1.42.0 1.2.11 1.1.1l+quic 100 - - +v17.0.0-nightly2021100628f711b552 2021-10-06 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.24.0 9.4.146.18 1.42.0 1.2.11 1.1.1l+quic 100 - - +v17.0.0-nightly20211005dd3c4a5ded 2021-10-05 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.24.0 9.4.146.18 1.42.0 1.2.11 1.1.1l+quic 100 - - +v17.0.0-nightly202110044bd8e0efa0 2021-10-04 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.24.0 9.4.146.18 1.42.0 1.2.11 1.1.1l+quic 100 - - +v17.0.0-nightly20211003b5cfb264a1 2021-10-03 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.24.0 9.4.146.18 1.42.0 1.2.11 1.1.1l+quic 100 - - +v17.0.0-nightly20211002606bb52159 2021-10-02 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.24.0 9.3.345.19 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly2021100135dc3861cd 2021-10-01 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.24.0 9.3.345.19 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly20210930c44d683175 2021-09-30 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.24.0 9.3.345.19 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly20210929481c1609d8 2021-09-29 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.24.0 9.3.345.19 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly202109282caa308485 2021-09-28 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.24.0 9.3.345.19 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly2021092743291b98ed 2021-09-27 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.24.0 9.3.345.19 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly2021092685811d1ade 2021-09-26 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.24.0 9.3.345.19 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly202109258d83c47029 2021-09-25 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.24.0 9.3.345.19 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly202109243f619407fe 2021-09-24 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.24.0 9.3.345.19 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly20210923c7da13c7c4 2021-09-23 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.24.0 9.3.345.19 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly202109220991dfcece 2021-09-22 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.24.0 9.3.345.19 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly202109217153d25dd6 2021-09-21 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.24.0 9.3.345.19 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly202109204e8f11dee3 2021-09-20 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.23.0 9.3.345.19 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly2021091964287e4d45 2021-09-19 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip 7.23.0 9.3.345.19 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly202109186bfe5a6796 2021-09-18 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.23.0 9.3.345.19 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly202109178a920185cc 2021-09-17 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.23.0 9.3.345.19 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly20210916f182b9b29f 2021-09-16 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.23.0 9.3.345.16 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly20210915bbd4c6eee9 2021-09-15 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.21.1 9.3.345.16 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly20210914fa7c477704 2021-09-14 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.21.1 9.3.345.16 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly202109135c1adda0ae 2021-09-13 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.21.1 9.3.345.16 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly20210912df22736d80 2021-09-12 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.21.1 9.3.345.16 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly202109111b335d41a4 2021-09-11 aix-ppc64,headers,linux-arm64,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.21.1 9.3.345.16 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly20210910a42bd7e944 2021-09-10 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.21.1 9.3.345.16 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly202109098c905b81c1 2021-09-09 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.21.1 9.3.345.16 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly20210908861c3e0fba 2021-09-08 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.21.1 9.3.345.16 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly20210907c7222b3589 2021-09-07 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.21.1 9.3.345.16 1.42.0 1.2.11 1.1.1l+quic 96 - - +v17.0.0-nightly2021090680785f6ec9 2021-09-06 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.21.1 9.3.345.16 1.42.0 1.2.11 1.1.1l+quic 96 - true +v17.0.0-nightly20210905338ab0dfa0 2021-09-05 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.21.1 9.3.345.16 1.42.0 1.2.11 1.1.1l+quic 96 - true v17.0.0-nightly20210904f26c2ce0a1 2021-09-04 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.21.1 9.3.345.16 1.42.0 1.2.11 1.1.1l+quic 96 - true v17.0.0-nightly202109030c35fe02d3 2021-09-03 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.21.1 9.3.345.16 1.42.0 1.2.11 1.1.1l+quic 96 - true v17.0.0-nightly2021090213b569c679 2021-09-02 aix-ppc64,headers,linux-arm64,linux-armv7l,linux-ppc64le,linux-s390x,linux-x64,osx-arm64-tar,osx-x64-pkg,osx-x64-tar,src,win-x64-7z,win-x64-exe,win-x64-msi,win-x64-zip,win-x86-7z,win-x86-exe,win-x86-msi,win-x86-zip 7.21.1 9.3.345.16 1.42.0 1.2.11 1.1.1l+quic 96 - true diff --git a/test/fast/Unit tests/mocks/nvm ls-remote lts.txt b/test/fast/Unit tests/mocks/nvm ls-remote lts.txt index 93f5c3a..d0918fa 100644 --- a/test/fast/Unit tests/mocks/nvm ls-remote lts.txt +++ b/test/fast/Unit tests/mocks/nvm ls-remote lts.txt @@ -141,7 +141,9 @@ v12.22.3  (LTS: Erbium) v12.22.4  (LTS: Erbium) v12.22.5  (LTS: Erbium) - v12.22.6  (Latest 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) @@ -156,4 +158,9 @@ v14.17.3  (LTS: Fermium) v14.17.4  (LTS: Fermium) v14.17.5  (LTS: Fermium) - v14.17.6  (Latest 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) diff --git a/test/fast/Unit tests/mocks/nvm ls-remote node.txt b/test/fast/Unit tests/mocks/nvm ls-remote node.txt index 016fbc5..87801ea 100644 --- a/test/fast/Unit tests/mocks/nvm ls-remote node.txt +++ b/test/fast/Unit tests/mocks/nvm ls-remote node.txt @@ -513,7 +513,9 @@ v12.22.3  (LTS: Erbium) v12.22.4  (LTS: Erbium) v12.22.5  (LTS: Erbium) - v12.22.6  (Latest 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 @@ -562,7 +564,10 @@ v14.17.3  (LTS: Fermium) v14.17.4  (LTS: Fermium) v14.17.5  (LTS: Fermium) - v14.17.6  (Latest 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 @@ -594,3 +599,15 @@ 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 diff --git a/test/fast/Unit tests/mocks/nvm ls-remote.txt b/test/fast/Unit tests/mocks/nvm ls-remote.txt index d9277c8..31a2f2f 100644 --- a/test/fast/Unit tests/mocks/nvm ls-remote.txt +++ b/test/fast/Unit tests/mocks/nvm ls-remote.txt @@ -554,7 +554,9 @@ v12.22.3  (LTS: Erbium) v12.22.4  (LTS: Erbium) v12.22.5  (LTS: Erbium) - v12.22.6  (Latest 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 @@ -603,7 +605,10 @@ v14.17.3  (LTS: Fermium) v14.17.4  (LTS: Fermium) v14.17.5  (LTS: Fermium) - v14.17.6  (Latest 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 @@ -635,3 +640,15 @@ 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 diff --git a/test/fast/Unit tests/mocks/nvm_ls_remote LTS.txt b/test/fast/Unit tests/mocks/nvm_ls_remote LTS.txt index bfcef29..2fac41d 100644 --- a/test/fast/Unit tests/mocks/nvm_ls_remote LTS.txt +++ b/test/fast/Unit tests/mocks/nvm_ls_remote LTS.txt @@ -141,7 +141,9 @@ v12.22.2 Erbium v12.22.3 Erbium v12.22.4 Erbium v12.22.5 Erbium -v12.22.6 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 @@ -156,4 +158,9 @@ v14.17.2 Fermium v14.17.3 Fermium v14.17.4 Fermium v14.17.5 Fermium -v14.17.6 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 * diff --git a/test/fast/Unit tests/mocks/nvm_ls_remote nightly.txt b/test/fast/Unit tests/mocks/nvm_ls_remote nightly.txt index fd32cb7..30706f2 100644 --- a/test/fast/Unit tests/mocks/nvm_ls_remote nightly.txt +++ b/test/fast/Unit tests/mocks/nvm_ls_remote nightly.txt @@ -142,4 +142,5 @@ v13.13.1-nightly20200415947ddec091 v14.0.0-nightly20200421c3554307c6 v15.0.0-nightly2020102011f1ad939f v16.0.0-nightly20210420a0261d231c -v17.0.0-nightly20210904f26c2ce0a1 +v17.0.0-nightly202110193f11666dc7 +v18.0.0-nightly20211217a182a21636 diff --git a/test/fast/Unit tests/mocks/nvm_ls_remote stable nightly.txt b/test/fast/Unit tests/mocks/nvm_ls_remote stable nightly.txt index ae8cdf0..96a1ede 100644 --- a/test/fast/Unit tests/mocks/nvm_ls_remote stable nightly.txt +++ b/test/fast/Unit tests/mocks/nvm_ls_remote stable nightly.txt @@ -1 +1 @@ -v17.0.0-nightly20210904f26c2ce0a1 +v18.0.0-nightly20211217a182a21636 diff --git a/test/fast/Unit tests/mocks/nvm_ls_remote stable.txt b/test/fast/Unit tests/mocks/nvm_ls_remote stable.txt index 34326d6..f919416 100644 --- a/test/fast/Unit tests/mocks/nvm_ls_remote stable.txt +++ b/test/fast/Unit tests/mocks/nvm_ls_remote stable.txt @@ -1 +1 @@ -v16.8.0 +v17.2.0 diff --git a/test/fast/Unit tests/mocks/nvm_ls_remote.txt b/test/fast/Unit tests/mocks/nvm_ls_remote.txt index f3f66c8..0bd77b1 100644 --- a/test/fast/Unit tests/mocks/nvm_ls_remote.txt +++ b/test/fast/Unit tests/mocks/nvm_ls_remote.txt @@ -513,7 +513,9 @@ v12.22.2 Erbium v12.22.3 Erbium v12.22.4 Erbium v12.22.5 Erbium -v12.22.6 Erbium * +v12.22.6 Erbium +v12.22.7 Erbium +v12.22.8 Erbium * v13.0.0 v13.0.1 v13.1.0 @@ -562,7 +564,10 @@ v14.17.2 Fermium v14.17.3 Fermium v14.17.4 Fermium v14.17.5 Fermium -v14.17.6 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 @@ -594,3 +599,15 @@ 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 diff --git a/test/fast/Unit tests/mocks/nvm_make_alias LTS alias calls.txt b/test/fast/Unit tests/mocks/nvm_make_alias LTS alias calls.txt index f5cb8c1..6fd141f 100644 --- a/test/fast/Unit tests/mocks/nvm_make_alias LTS alias calls.txt +++ b/test/fast/Unit tests/mocks/nvm_make_alias LTS alias calls.txt @@ -1,6 +1,7 @@ -lts/*|lts/fermium -lts/fermium|v14.17.6 -lts/erbium|v12.22.6 +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 diff --git a/test/fast/Unit tests/mocks/nvm_print_implicit_alias remote stable nightly.txt b/test/fast/Unit tests/mocks/nvm_print_implicit_alias remote stable nightly.txt index 03b6389..0034b65 100644 --- a/test/fast/Unit tests/mocks/nvm_print_implicit_alias remote stable nightly.txt +++ b/test/fast/Unit tests/mocks/nvm_print_implicit_alias remote stable nightly.txt @@ -1 +1 @@ -17.0 +18.0 diff --git a/test/fast/Unit tests/mocks/nvm_print_implicit_alias remote stable.txt b/test/fast/Unit tests/mocks/nvm_print_implicit_alias remote stable.txt index bda3c37..8fad390 100644 --- a/test/fast/Unit tests/mocks/nvm_print_implicit_alias remote stable.txt +++ b/test/fast/Unit tests/mocks/nvm_print_implicit_alias remote stable.txt @@ -1 +1 @@ -16.8 +17.2 From 430860a8bec7a59837929db37374b1bc71262e9c Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 16 Dec 2021 15:54:38 -0800 Subject: [PATCH 12/37] [Fix] `nvm alias`/`nvm_list_aliases`: support `lts/` aliases See #2692 --- nvm.sh | 5 ++++ .../nvm_list_aliases works with LTS aliases | 23 +++++++++++++++++++ test/fast/Unit tests/mocks/lts-star.txt | 1 + update_test_mocks.sh | 1 + 4 files changed, 30 insertions(+) create mode 100755 test/fast/Aliases/nvm_list_aliases works with LTS aliases create mode 100644 test/fast/Unit tests/mocks/lts-star.txt diff --git a/nvm.sh b/nvm.sh index a37e422..239954d 100644 --- a/nvm.sh +++ b/nvm.sh @@ -988,6 +988,11 @@ nvm_list_aliases() { NVM_ALIAS_DIR="$(nvm_alias_path)" command mkdir -p "${NVM_ALIAS_DIR}/lts" + if [ "${ALIAS}" != "${ALIAS#lts/}" ]; then + nvm_alias "${ALIAS}" + return $? + fi + nvm_is_zsh && unsetopt local_options nomatch ( local ALIAS_PATH diff --git a/test/fast/Aliases/nvm_list_aliases works with LTS aliases b/test/fast/Aliases/nvm_list_aliases works with LTS aliases new file mode 100755 index 0000000..d398718 --- /dev/null +++ b/test/fast/Aliases/nvm_list_aliases works with LTS aliases @@ -0,0 +1,23 @@ +#!/bin/sh + +\. ../../../nvm.sh + +die () { + echo "$@" + exit 1 +} + +set -e + +nvm_alias_path() { + nvm_echo "../../../alias" +} + +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}<" diff --git a/test/fast/Unit tests/mocks/lts-star.txt b/test/fast/Unit tests/mocks/lts-star.txt new file mode 100644 index 0000000..53d838a --- /dev/null +++ b/test/fast/Unit tests/mocks/lts-star.txt @@ -0,0 +1 @@ +lts/gallium diff --git a/update_test_mocks.sh b/update_test_mocks.sh index 30a3782..cd63843 100755 --- a/update_test_mocks.sh +++ b/update_test_mocks.sh @@ -32,6 +32,7 @@ nvm ls-remote node > "$MOCKS_DIR/nvm ls-remote node.txt" nvm ls-remote iojs > "$MOCKS_DIR/nvm ls-remote iojs.txt" nvm_print_implicit_alias remote stable > "$MOCKS_DIR/nvm_print_implicit_alias remote stable.txt" nvm_ls_remote stable > "$MOCKS_DIR/nvm_ls_remote stable.txt" +nvm alias "lts/*" > "$MOCKS_DIR/lts-star.txt" set +e NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly/ nvm_ls_remote > "$MOCKS_DIR/nvm_ls_remote nightly.txt" From 0b4cd8df6c10cb572327b4a6e5017f3cbd8c5a98 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 16 Dec 2021 22:55:02 -0800 Subject: [PATCH 13/37] [Refactor] create `nvm_normalize_lts` helper --- nvm.sh | 44 ++++++++++++++++---------- test/fast/Unit tests/nvm_normalize_lts | 38 ++++++++++++++++++++++ 2 files changed, 65 insertions(+), 17 deletions(-) create mode 100755 test/fast/Unit tests/nvm_normalize_lts diff --git a/nvm.sh b/nvm.sh index 239954d..36b8fc4 100644 --- a/nvm.sh +++ b/nvm.sh @@ -687,6 +687,29 @@ nvm_normalize_version() { }' "${1#v}" } +nvm_normalize_lts() { + local LTS + LTS="${1-}" + + if [ "$(expr "${LTS}" : '^lts/-[1-9][0-9]*$')" -gt 0 ]; then + local N + N="$(echo "${LTS}" | cut -d '-' -f 2)" + N=$((N+1)) + local NVM_ALIAS_DIR + NVM_ALIAS_DIR="$(nvm_alias_path)" + local RESULT + RESULT="$(command ls "${NVM_ALIAS_DIR}/lts" | command tail -n "${N}" | command head -n 1)" + if [ "${RESULT}" != '*' ]; then + nvm_echo "lts/${RESULT}" + else + nvm_err 'That many LTS releases do not exist yet.' + return 2 + fi + else + nvm_echo "${LTS}" + fi +} + nvm_ensure_version_prefix() { local NVM_VERSION NVM_VERSION="$(nvm_strip_iojs_prefix "${1-}" | command sed -e 's/^\([0-9]\)/v\1/g')" @@ -1043,27 +1066,14 @@ nvm_alias() { nvm_err 'An alias is required.' return 1 fi + ALIAS="$(nvm_normalize_lts "${ALIAS}")" - local NVM_ALIAS_DIR - NVM_ALIAS_DIR="$(nvm_alias_path)" - - if [ "$(expr "${ALIAS}" : '^lts/-[1-9][0-9]*$')" -gt 0 ]; then - local N - N="$(echo "${ALIAS}" | cut -d '-' -f 2)" - N=$((N+1)) - local RESULT - RESULT="$(command ls "${NVM_ALIAS_DIR}/lts" | command tail -n "${N}" | command head -n 1)" - if [ "${RESULT}" != '*' ]; then - nvm_alias "lts/${RESULT}" - return $? - else - nvm_err 'That many LTS releases do not exist yet.' - return 2 - fi + if [ -z "${ALIAS}" ]; then + return 2 fi local NVM_ALIAS_PATH - NVM_ALIAS_PATH="${NVM_ALIAS_DIR}/${ALIAS}" + NVM_ALIAS_PATH="$(nvm_alias_path)/${ALIAS}" if [ ! -f "${NVM_ALIAS_PATH}" ]; then nvm_err 'Alias does not exist.' return 2 diff --git a/test/fast/Unit tests/nvm_normalize_lts b/test/fast/Unit tests/nvm_normalize_lts new file mode 100755 index 0000000..7ac8f4a --- /dev/null +++ b/test/fast/Unit tests/nvm_normalize_lts @@ -0,0 +1,38 @@ +#!/bin/sh + +cleanup() { + unset nvm_get_os +} + +die () { cleanup; echo "$@" ; exit 1; } + +\. ../../../nvm.sh + +ACTUAL="$(nvm_normalize_lts "foo")" +EXPECTED='foo' +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" + +ACTUAL="$(nvm_normalize_lts "lts/*")" +EXPECTED='lts/*' +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" + + +MOCKS_DIR="../Unit tests/mocks" +STAR="$(cat "$MOCKS_DIR/lts-star.txt")" + +ACTUAL="$(nvm_normalize_lts "${STAR}")" +EXPECTED="${STAR}" +[ "${ACTUAL}" = "${EXPECTED}" ] || die "expected >${EXPECTED}<, got >${ACTUAL}<" + +LTS_NAMES_PATH="${MOCKS_DIR}/LTS_names.txt" +LTS_LIST="$(cat "${LTS_NAMES_PATH}" | tail -n +2)" + +INDEX=1 +for LTS in $LTS_LIST; do + ACTUAL="$(nvm_normalize_lts "lts/-${INDEX}")" + MESSAGE="for lts/-${INDEX}" + EXPECTED="lts/$(echo "${LTS_LIST}" | tail -n +${INDEX} | head -n1)" + [ "${ACTUAL}" = "${EXPECTED}" ] || die "${MESSAGE}: expected >${EXPECTED}<, got >${ACTUAL}<" + + INDEX=$(($INDEX + 1)) +done From aed1d732d72bae422c8ee68156419c02af8680b1 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 16 Dec 2021 22:58:06 -0800 Subject: [PATCH 14/37] [Fix] `ls-remote`/`install`: properly handle `lts/x` patterns --- nvm.sh | 10 ++++++++-- test/fast/Unit tests/nvm ls-remote | 13 +++++++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/nvm.sh b/nvm.sh index 36b8fc4..b45f12f 100644 --- a/nvm.sh +++ b/nvm.sh @@ -3812,8 +3812,14 @@ nvm() { PATTERN="${1-}" if [ -z "${NVM_LTS-}" ]; then case "${PATTERN}" in - 'lts/*') NVM_LTS='*' ;; - lts/*) NVM_LTS="${PATTERN##lts/}" ;; + 'lts/*') + NVM_LTS='*' + PATTERN='' + ;; + lts/*) + NVM_LTS="${PATTERN##lts/}" + PATTERN='' + ;; esac fi fi diff --git a/test/fast/Unit tests/nvm ls-remote b/test/fast/Unit tests/nvm ls-remote index 7f54b4e..96675b2 100755 --- a/test/fast/Unit tests/nvm ls-remote +++ b/test/fast/Unit tests/nvm ls-remote @@ -1,6 +1,6 @@ #!/bin/sh -set -ex +set -e die () { echo "$@" ; cleanup ; exit 1; } @@ -32,9 +32,18 @@ nvm_ls_remote_iojs() { } EXPECTED_OUTPUT_PATH="$PWD/mocks/nvm ls-remote.txt" - OUTPUT="$(nvm ls-remote | sed 's/[ \t]*$//')" EXPECTED_OUTPUT="$(cat "$EXPECTED_OUTPUT_PATH" | sed 's/[ \t]*$//' )" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "bare nvm ls-remote did not output expected sorted versions; got $(echo ">$OUTPUT<") expected $(echo ">$EXPECTED_OUTPUT<")" +EXPECTED_OUTPUT_PATH="$PWD/mocks/nvm ls-remote lts.txt" +OUTPUT="$(nvm ls-remote --lts="*" | sed 's/[ \t]*$//')" +EXPECTED_OUTPUT="$(cat "$EXPECTED_OUTPUT_PATH" | sed 's/[ \t]*$//' )" +[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm ls-remote --lts=* did not output expected sorted versions; got $(echo ">$OUTPUT<") expected $(echo ">$EXPECTED_OUTPUT<")" + +EXPECTED_OUTPUT_PATH="$PWD/mocks/nvm ls-remote lts.txt" +OUTPUT="$(nvm ls-remote "lts/*" | sed 's/[ \t]*$//')" +EXPECTED_OUTPUT="$(cat "$EXPECTED_OUTPUT_PATH" | sed 's/[ \t]*$//' )" +[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm ls-remote lts/* did not output expected sorted versions; got $(echo ">$OUTPUT<") expected $(echo ">$EXPECTED_OUTPUT<")" + cleanup From c4c7690dec3e0c6b9ab03128218029c280cd209e Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 16 Dec 2021 23:01:05 -0800 Subject: [PATCH 15/37] [Fix] `ls-remote`/`install`: support `lts/-X` patterns in installs Fixes #2692 --- nvm.sh | 5 +++++ test/fast/Unit tests/nvm ls-remote | 26 +++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/nvm.sh b/nvm.sh index b45f12f..6c20f91 100644 --- a/nvm.sh +++ b/nvm.sh @@ -1465,6 +1465,11 @@ nvm_ls_remote_index_tab() { $VERSION_LIST EOF + if [ -n "${LTS-}" ]; then + LTS="$(nvm_normalize_lts "lts/${LTS}")" + LTS="${LTS#lts/}" + fi + VERSIONS="$({ command awk -v lts="${LTS-}" '{ if (!$1) { next } if (lts && $10 ~ /^\-?$/) { next } diff --git a/test/fast/Unit tests/nvm ls-remote b/test/fast/Unit tests/nvm ls-remote index 96675b2..933b36d 100755 --- a/test/fast/Unit tests/nvm ls-remote +++ b/test/fast/Unit tests/nvm ls-remote @@ -31,19 +31,39 @@ nvm_ls_remote_iojs() { cat "$REMOTE_IOJS" } -EXPECTED_OUTPUT_PATH="$PWD/mocks/nvm ls-remote.txt" +MOCKS_DIR="$PWD/mocks" + +EXPECTED_OUTPUT_PATH="${MOCKS_DIR}/nvm ls-remote.txt" OUTPUT="$(nvm ls-remote | sed 's/[ \t]*$//')" EXPECTED_OUTPUT="$(cat "$EXPECTED_OUTPUT_PATH" | sed 's/[ \t]*$//' )" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "bare nvm ls-remote did not output expected sorted versions; got $(echo ">$OUTPUT<") expected $(echo ">$EXPECTED_OUTPUT<")" -EXPECTED_OUTPUT_PATH="$PWD/mocks/nvm ls-remote lts.txt" +EXPECTED_OUTPUT_PATH="${MOCKS_DIR}/nvm ls-remote lts.txt" OUTPUT="$(nvm ls-remote --lts="*" | sed 's/[ \t]*$//')" EXPECTED_OUTPUT="$(cat "$EXPECTED_OUTPUT_PATH" | sed 's/[ \t]*$//' )" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm ls-remote --lts=* did not output expected sorted versions; got $(echo ">$OUTPUT<") expected $(echo ">$EXPECTED_OUTPUT<")" -EXPECTED_OUTPUT_PATH="$PWD/mocks/nvm ls-remote lts.txt" +EXPECTED_OUTPUT_PATH="${MOCKS_DIR}/nvm ls-remote lts.txt" OUTPUT="$(nvm ls-remote "lts/*" | sed 's/[ \t]*$//')" EXPECTED_OUTPUT="$(cat "$EXPECTED_OUTPUT_PATH" | sed 's/[ \t]*$//' )" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm ls-remote lts/* did not output expected sorted versions; got $(echo ">$OUTPUT<") expected $(echo ">$EXPECTED_OUTPUT<")" +EXPECTED_OUTPUT_PATH="${MOCKS_DIR}/nvm ls-remote lts.txt" +OUTPUT="$(nvm ls-remote "lts/-1" | sed 's/[ \t]*$//')" +EXPECTED_OUTPUT="$(cat "$EXPECTED_OUTPUT_PATH" | sed 's/[ \t]*$//' )" +[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm ls-remote lts/* did not output expected sorted versions; got $(echo ">$OUTPUT<") expected $(echo ">$EXPECTED_OUTPUT<")" + +LTS_NAMES_PATH="${MOCKS_DIR}/LTS_names.txt" +LTS_LIST="$(cat "${LTS_NAMES_PATH}" | tail -n +2)" + +INDEX=1 +for LTS in $LTS_LIST; do + ACTUAL="$(nvm ls-remote "lts/-${INDEX}" | sed 's/[ \t]*$//')" + MESSAGE="for lts/-${INDEX} / ${LTS}" + EXPECTED="$(nvm ls-remote "lts/${LTS}" | sed 's/[ \t]*$//')" + [ "${ACTUAL}" = "${EXPECTED}" ] || die "${MESSAGE}: expected >${EXPECTED}<, got >${ACTUAL}<" + + INDEX=$(($INDEX + 1)) +done + cleanup From 0f62be6fddd68966231ade1ccea09cdf8905a1ef Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 17 Dec 2021 12:37:15 -0800 Subject: [PATCH 16/37] [Dev Deps] update `markdown-link-check` --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dc3efd5..022a4e4 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "dockerfile_lint": "^0.3.4", "doctoc": "^2.1.0", "eclint": "^2.8.1", - "markdown-link-check": "^3.8.7", + "markdown-link-check": "^3.9.0", "replace": "^1.2.1", "semver": "^7.3.5", "urchin": "^0.0.5" From aa57406ede48f56ea8eb2eeca99f8d031bc1e6eb Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 17 Dec 2021 13:55:14 -0800 Subject: [PATCH 17/37] [Fix] ensure `unload` removes `nvm_normalize_lts` --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 6c20f91..260eea9 100644 --- a/nvm.sh +++ b/nvm.sh @@ -4129,7 +4129,7 @@ nvm() { nvm_resolve_alias nvm_ls_current nvm_alias \ nvm_binary_available nvm_change_path nvm_strip_path \ nvm_num_version_groups nvm_format_version nvm_ensure_version_prefix \ - nvm_normalize_version nvm_is_valid_version \ + nvm_normalize_version nvm_is_valid_version nvm_normalize_lts \ nvm_ensure_version_installed nvm_cache_dir \ nvm_version_path nvm_alias_path nvm_version_dir \ nvm_find_nvmrc nvm_find_up nvm_find_project_dir nvm_tree_contains_path \ From 5cc74a67363e77ff1714d2fb3f98ee5ed50b17da Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 17 Dec 2021 13:21:29 -0800 Subject: [PATCH 18/37] [Tests] fix failing test --- .../nvm_list_aliases works with LTS aliases | 2 + test/fast/Unit tests/nvm ls-remote | 64 ++++++++++--------- test/fast/Unit tests/nvm_normalize_lts | 4 +- 3 files changed, 38 insertions(+), 32 deletions(-) diff --git a/test/fast/Aliases/nvm_list_aliases works with LTS aliases b/test/fast/Aliases/nvm_list_aliases works with LTS aliases index d398718..058a915 100755 --- a/test/fast/Aliases/nvm_list_aliases works with LTS aliases +++ b/test/fast/Aliases/nvm_list_aliases works with LTS aliases @@ -13,6 +13,8 @@ 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")" diff --git a/test/fast/Unit tests/nvm ls-remote b/test/fast/Unit tests/nvm ls-remote index 933b36d..683fe92 100755 --- a/test/fast/Unit tests/nvm ls-remote +++ b/test/fast/Unit tests/nvm ls-remote @@ -22,6 +22,40 @@ nvm deactivate 2>/dev/null || die 'unable to deactivate' \. ../../common.sh +MOCKS_DIR="$PWD/mocks" + +nvm_download() { + if [ "$*" = "-L -s $(nvm_get_mirror node std)/index.tab -o -" ]; then + cat "$MOCKS_DIR/nodejs.org-dist-index.tab" + return + fi + return 42 +} + +EXPECTED_OUTPUT_PATH="${MOCKS_DIR}/nvm ls-remote lts.txt" +OUTPUT="$(nvm ls-remote --lts | sed 's/[ \t]*$//')" +EXPECTED_OUTPUT="$(cat "$EXPECTED_OUTPUT_PATH" | sed 's/[ \t]*$//' )" +[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm ls-remote --lts did not output expected sorted versions; got $(echo ">$OUTPUT<") expected $(echo ">$EXPECTED_OUTPUT<")" + +EXPECTED_OUTPUT_PATH="${MOCKS_DIR}/nvm ls-remote lts.txt" +OUTPUT="$(nvm ls-remote "lts/*" | sed 's/[ \t]*$//')" +EXPECTED_OUTPUT="$(cat "$EXPECTED_OUTPUT_PATH" | sed 's/[ \t]*$//' )" +[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm ls-remote lts/* did not output expected sorted versions; got $(echo ">$OUTPUT<") expected $(echo ">$EXPECTED_OUTPUT<")" + +MOCKS_DIR="$PWD/mocks" +LTS_NAMES_PATH="${MOCKS_DIR}/LTS_names.txt" +LTS_LIST="$(cat "${LTS_NAMES_PATH}" | tail -n +2)" + +INDEX=1 +printf '%s\n' "${LTS_LIST}" | while IFS= read -r LTS; do + ACTUAL="$(nvm ls-remote "lts/-${INDEX}" | sed 's/[ \t]*$//')" + MESSAGE="for lts/-${INDEX} (${LTS})" + EXPECTED="$(nvm ls-remote "lts/${LTS}" | sed 's/[ \t]*$//')" + [ "${ACTUAL}" = "${EXPECTED}" ] || die "${MESSAGE}: expected >${EXPECTED}<, got >${ACTUAL}<" + + INDEX=$(($INDEX + 1)) +done + REMOTE="$PWD/mocks/nvm_ls_remote.txt" nvm_ls_remote() { cat "$REMOTE" @@ -31,39 +65,9 @@ nvm_ls_remote_iojs() { cat "$REMOTE_IOJS" } -MOCKS_DIR="$PWD/mocks" - EXPECTED_OUTPUT_PATH="${MOCKS_DIR}/nvm ls-remote.txt" OUTPUT="$(nvm ls-remote | sed 's/[ \t]*$//')" EXPECTED_OUTPUT="$(cat "$EXPECTED_OUTPUT_PATH" | sed 's/[ \t]*$//' )" [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "bare nvm ls-remote did not output expected sorted versions; got $(echo ">$OUTPUT<") expected $(echo ">$EXPECTED_OUTPUT<")" -EXPECTED_OUTPUT_PATH="${MOCKS_DIR}/nvm ls-remote lts.txt" -OUTPUT="$(nvm ls-remote --lts="*" | sed 's/[ \t]*$//')" -EXPECTED_OUTPUT="$(cat "$EXPECTED_OUTPUT_PATH" | sed 's/[ \t]*$//' )" -[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm ls-remote --lts=* did not output expected sorted versions; got $(echo ">$OUTPUT<") expected $(echo ">$EXPECTED_OUTPUT<")" - -EXPECTED_OUTPUT_PATH="${MOCKS_DIR}/nvm ls-remote lts.txt" -OUTPUT="$(nvm ls-remote "lts/*" | sed 's/[ \t]*$//')" -EXPECTED_OUTPUT="$(cat "$EXPECTED_OUTPUT_PATH" | sed 's/[ \t]*$//' )" -[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm ls-remote lts/* did not output expected sorted versions; got $(echo ">$OUTPUT<") expected $(echo ">$EXPECTED_OUTPUT<")" - -EXPECTED_OUTPUT_PATH="${MOCKS_DIR}/nvm ls-remote lts.txt" -OUTPUT="$(nvm ls-remote "lts/-1" | sed 's/[ \t]*$//')" -EXPECTED_OUTPUT="$(cat "$EXPECTED_OUTPUT_PATH" | sed 's/[ \t]*$//' )" -[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "nvm ls-remote lts/* did not output expected sorted versions; got $(echo ">$OUTPUT<") expected $(echo ">$EXPECTED_OUTPUT<")" - -LTS_NAMES_PATH="${MOCKS_DIR}/LTS_names.txt" -LTS_LIST="$(cat "${LTS_NAMES_PATH}" | tail -n +2)" - -INDEX=1 -for LTS in $LTS_LIST; do - ACTUAL="$(nvm ls-remote "lts/-${INDEX}" | sed 's/[ \t]*$//')" - MESSAGE="for lts/-${INDEX} / ${LTS}" - EXPECTED="$(nvm ls-remote "lts/${LTS}" | sed 's/[ \t]*$//')" - [ "${ACTUAL}" = "${EXPECTED}" ] || die "${MESSAGE}: expected >${EXPECTED}<, got >${ACTUAL}<" - - INDEX=$(($INDEX + 1)) -done - cleanup diff --git a/test/fast/Unit tests/nvm_normalize_lts b/test/fast/Unit tests/nvm_normalize_lts index 7ac8f4a..0844f95 100755 --- a/test/fast/Unit tests/nvm_normalize_lts +++ b/test/fast/Unit tests/nvm_normalize_lts @@ -28,9 +28,9 @@ LTS_NAMES_PATH="${MOCKS_DIR}/LTS_names.txt" LTS_LIST="$(cat "${LTS_NAMES_PATH}" | tail -n +2)" INDEX=1 -for LTS in $LTS_LIST; do +printf '%s\n' "${LTS_LIST}" | while IFS= read -r LTS; do ACTUAL="$(nvm_normalize_lts "lts/-${INDEX}")" - MESSAGE="for lts/-${INDEX}" + MESSAGE="for lts/-${INDEX} (${LTS})" EXPECTED="lts/$(echo "${LTS_LIST}" | tail -n +${INDEX} | head -n1)" [ "${ACTUAL}" = "${EXPECTED}" ] || die "${MESSAGE}: expected >${EXPECTED}<, got >${ACTUAL}<" From 9600617c52d0d2e48493424c529ac6c945d2775b Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 17 Dec 2021 14:55:52 -0800 Subject: [PATCH 19/37] v0.39.1 --- README.md | 16 ++++++++-------- install.sh | 2 +- nvm.sh | 2 +- package.json | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 94599b7..be4561a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# 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.0-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.39.1-yellow.svg)][4] [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/684/badge)](https://bestpractices.coreinfrastructure.org/projects/684) @@ -90,10 +90,10 @@ nvm is a version manager for [node.js](https://nodejs.org/en/), designed to be i 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.0/install.sh | bash +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash ``` ```sh -wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash +wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/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`). @@ -161,7 +161,7 @@ You can use a task: ```yaml - name: nvm shell: > - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash args: creates: "{{ ansible_env.HOME }}/.nvm/nvm.sh" ``` @@ -223,7 +223,7 @@ 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.0` +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` Now add these lines to your `~/.bashrc`, `~/.profile`, or `~/.zshrc` file to have it automatically sourced upon login: @@ -789,7 +789,7 @@ 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.0/install.sh | bash +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/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. @@ -886,9 +886,9 @@ You have to make sure that the user directory name in `$HOME` and the user direc 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.0/install.sh +[2]: https://github.com/nvm-sh/nvm/blob/v0.39.1/install.sh [3]: https://travis-ci.org/nvm-sh/nvm -[4]: https://github.com/nvm-sh/nvm/releases/tag/v0.39.0 +[4]: https://github.com/nvm-sh/nvm/releases/tag/v0.39.1 [Urchin]: https://github.com/scraperwiki/urchin [Fish]: http://fishshell.com diff --git a/install.sh b/install.sh index eb37d04..c3dc782 100755 --- a/install.sh +++ b/install.sh @@ -27,7 +27,7 @@ nvm_install_dir() { } nvm_latest_version() { - nvm_echo "v0.39.0" + nvm_echo "v0.39.1" } nvm_profile_is_bash_or_zsh() { diff --git a/nvm.sh b/nvm.sh index 260eea9..62c5946 100644 --- a/nvm.sh +++ b/nvm.sh @@ -4107,7 +4107,7 @@ nvm() { NVM_VERSION_ONLY=true NVM_LTS="${NVM_LTS-}" nvm_remote_version "${PATTERN:-node}" ;; "--version" | "-v") - nvm_echo '0.39.0' + nvm_echo '0.39.1' ;; "unload") nvm deactivate >/dev/null 2>&1 diff --git a/package.json b/package.json index 022a4e4..a15a784 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nvm", - "version": "0.39.0", + "version": "0.39.1", "description": "Node Version Manager - Simple bash script to manage multiple active node.js versions", "directories": { "test": "test" From ccd442d833578bda782c9cf7d5f284b0c5ed703b Mon Sep 17 00:00:00 2001 From: Bob Bregant II Date: Sun, 19 Dec 2021 02:58:18 +0000 Subject: [PATCH 20/37] [Refactor] add `nvm_extract_tarball` to consolidate extraction logic --- nvm.sh | 64 ++++++++++++++---------- test/fast/Unit tests/nvm_extract_tarball | 12 +++++ 2 files changed, 49 insertions(+), 27 deletions(-) create mode 100755 test/fast/Unit tests/nvm_extract_tarball diff --git a/nvm.sh b/nvm.sh index 62c5946..01607ff 100644 --- a/nvm.sh +++ b/nvm.sh @@ -1971,19 +1971,7 @@ nvm_install_binary_extract() { command unzip -q "${TARBALL}" -d "${TMPDIR}" || return 1 # For non Windows system (including WSL running on Windows) else - local tar_compression_flag - tar_compression_flag='z' - if nvm_supports_xz "${VERSION}"; then - tar_compression_flag='J' - fi - - local tar - if [ "${NVM_OS}" = 'aix' ]; then - tar='gtar' - else - tar='tar' - fi - command "${tar}" -x${tar_compression_flag}f "${TARBALL}" -C "${TMPDIR}" --strip-components 1 || return 1 + nvm_extract_tarball "${NVM_OS}" "${VERSION}" "${TARBALL}" "${TMPDIR}" fi command mkdir -p "${VERSION_PATH}" || return 1 @@ -2251,6 +2239,40 @@ nvm_download_artifact() { nvm_echo "${TARBALL}" } +# args: nvm_os, version, tarball, tmpdir +nvm_extract_tarball() { + if [ "$#" -ne 4 ]; then + nvm_err 'nvm_extract_tarball requires exactly 4 arguments' + return 5 + fi + + local NVM_OS + NVM_OS="${1-}" + + local VERSION + VERSION="${2-}" + + local TARBALL + TARBALL="${3-}" + + local TMPDIR + TMPDIR="${4-}" + + local tar_compression_flag + tar_compression_flag='z' + if nvm_supports_xz "${VERSION}"; then + tar_compression_flag='J' + fi + + local tar + tar='tar' + if [ "${NVM_OS}" = 'aix' ]; then + tar='gtar' + fi + + command "${tar}" -x${tar_compression_flag}f "${TARBALL}" -C "${TMPDIR}" --strip-components 1 || return 1 +} + nvm_get_make_jobs() { if nvm_is_natural_num "${1-}"; then NVM_MAKE_JOBS="$1" @@ -2362,18 +2384,6 @@ nvm_install_source() { fi fi - local tar_compression_flag - tar_compression_flag='z' - if nvm_supports_xz "${VERSION}"; then - tar_compression_flag='J' - fi - - local tar - tar='tar' - if [ "${NVM_OS}" = 'aix' ]; then - tar='gtar' - fi - local TARBALL local TMPDIR local VERSION_PATH @@ -2393,7 +2403,7 @@ nvm_install_source() { if ! ( # shellcheck disable=SC2086 command mkdir -p "${TMPDIR}" && \ - command "${tar}" -x${tar_compression_flag}f "${TARBALL}" -C "${TMPDIR}" --strip-components 1 && \ + nvm_extract_tarball "${NVM_OS}" "${VERSION}" "${TARBALL}" "${TMPDIR}" && \ VERSION_PATH="$(nvm_version_path "${PREFIXED_VERSION}")" && \ nvm_cd "${TMPDIR}" && \ nvm_echo '$>'./configure --prefix="${VERSION_PATH}" $ADDITIONAL_PARAMETERS'<' && \ @@ -4151,7 +4161,7 @@ nvm() { nvm_npmrc_bad_news_bears \ nvm_get_colors nvm_set_colors nvm_print_color_code nvm_format_help_message_colors \ nvm_echo_with_colors nvm_err_with_colors \ - nvm_get_artifact_compression nvm_install_binary_extract \ + nvm_get_artifact_compression nvm_install_binary_extract nvm_extract_tarball \ >/dev/null 2>&1 unset NVM_RC_VERSION NVM_NODEJS_ORG_MIRROR NVM_IOJS_ORG_MIRROR NVM_DIR \ NVM_CD_FLAGS NVM_BIN NVM_INC NVM_MAKE_JOBS \ diff --git a/test/fast/Unit tests/nvm_extract_tarball b/test/fast/Unit tests/nvm_extract_tarball new file mode 100755 index 0000000..4cf7533 --- /dev/null +++ b/test/fast/Unit tests/nvm_extract_tarball @@ -0,0 +1,12 @@ +#!/bin/sh + +die () { echo "$@" ; exit 1; } + +\. ../../../nvm.sh + +[ "$(nvm_extract_tarball 2>&1)" = "nvm_extract_tarball requires exactly 4 arguments" ] || die 'incorrect error message with no args' +[ "$(nvm_extract_tarball > /dev/null 2>&1 ; echo $?)" = "5" ] || die 'incorrect error code with no args' +[ "$(nvm_extract_tarball one two three 2>&1)" = "nvm_extract_tarball requires exactly 4 arguments" ] || die 'incorrect error message with three args' +[ "$(nvm_extract_tarball one two three > /dev/null 2>&1 ; echo $?)" = "5" ] || die 'incorrect error code with three args' +[ "$(nvm_extract_tarball one two three four five 2>&1)" = "nvm_extract_tarball requires exactly 4 arguments" ] || die 'incorrect error message with five args' +[ "$(nvm_extract_tarball one two three four five > /dev/null 2>&1 ; echo $?)" = "5" ] || die 'incorrect error code with five args' From 79ad72d1160f83e4fa3778a0cb18ae0c1c693109 Mon Sep 17 00:00:00 2001 From: Bob Bregant II Date: Sun, 19 Dec 2021 02:58:18 +0000 Subject: [PATCH 21/37] [Fix] Update `nvm_extract_tarball` to support OpenBSD Fixes #2660. --- nvm.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 01607ff..1a811f7 100644 --- a/nvm.sh +++ b/nvm.sh @@ -2270,7 +2270,15 @@ nvm_extract_tarball() { tar='gtar' fi - command "${tar}" -x${tar_compression_flag}f "${TARBALL}" -C "${TMPDIR}" --strip-components 1 || return 1 + if [ "${NVM_OS}" = 'openbsd' ]; then + if [ "${tar_compression_flag}" = 'J' ]; then + command xzcat "${TARBALL}" | "${tar}" -xf - -C "${TMPDIR}" -s '/[^\/]*\///' || return 1 + else + command "${tar}" -x${tar_compression_flag}f "${TARBALL}" -C "${TMPDIR}" -s '/[^\/]*\///' || return 1 + fi + else + command "${tar}" -x${tar_compression_flag}f "${TARBALL}" -C "${TMPDIR}" --strip-components 1 || return 1 + fi } nvm_get_make_jobs() { From d004c6b064dcb008df342835193abb85a0299503 Mon Sep 17 00:00:00 2001 From: Luke LaFountaine Date: Fri, 3 Dec 2021 16:52:18 -0500 Subject: [PATCH 22/37] [readme] clarify instructions for running Node on M1 Mac --- README.md | 105 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 59 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index be4561a..8346f0b 100644 --- a/README.md +++ b/README.md @@ -903,57 +903,70 @@ Homebrew causes insecure directories like `/usr/local/share/zsh/site-functions` **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). +Experimental support for the M1 architecture was added in node.js v15.3 and full support was added in v16.0. +Because of this, if you try to install older versions of node as usual, you will probably experience either compilation errors when installing node or out-of-memory errors while running your code. -Some issues you may encounter: +So, if you want to run a version prior to v16.0 on an M1 Mac, it may be best to compile node targeting the x86_64 Intel architecture so that Rosetta 2 can translate the x86_64 processor instructions to ARM-based Apple Silicon instructions. +Here's what you will need to do: -- 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. +- Install Rosetta, if you haven't already done so -One solution to this issue is to change the architecture of your shell from arm64 to x86. + ```sh + $ softwareupdate --install-rosetta + ``` -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`) + You might wonder, "how will my M1 Mac know to use Rosetta for a version of node compiled for an Intel chip?". + If an executable contains only Intel instructions, macOS will automatically use Rosetta to translate the instructions. -```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) -``` +- Open a shell that's running using Rosetta + + ```sh + $ arch -x86_64 zsh + ``` + + Note: This same thing can also be accomplished by finding the Terminal or iTerm App in Finder, right clicking, selecting "Get Info", and then checking the box labeled "Open using Rosetta". + + Note: This terminal session is now running in `zsh`. + If `zsh` is not the shell you typically use, `nvm` may not be `source`'d automatically like it probably is for your usual shell through your dotfiles. + If that's the case, make sure to source `nvm`. + + ```sh + $ source "${NVM_DIR}/.nvm/nvm.sh" + ``` + +- Install whatever older version of node you are interested in. Let's use 12.22.1 as an example. + This will fetch the node source code and compile it, which will take several minutes. + + ```sh + $ nvm install v12.22.1 --shared-zlib + ``` + + Note: You're probably curious why `--shared-zlib` is included. + There's a bug in recent versions of Apple's system `clang` compiler. + If one of these broken versions is installed on your system, the above step will likely still succeed even if you didn't include the `--shared-zlib` flag. + However, later, when you attempt to `npm install` something using your old version of node.js, you will see `incorrect data check` errors. + If you want to avoid the possible hassle of dealing with this, include that flag. + For more details, see [this issue](https://github.com/nodejs/node/issues/39313) and [this comment](https://github.com/nodejs/node/issues/39313#issuecomment-902395576) + +- Exit back to your native shell. + + ```sh + $ exit + $ arch + arm64 + ``` + + Note: If you selected the box labeled "Open using Rosetta" rather than running the CLI command in the second step, you will see `i386` here. + Unless you have another reason to have that box selected, you can deselect it now. + +- Check to make sure the architecture is correct. `x64` is the abbreviation for x86_64, which is what you want to see. + + ```sh + $ node -p process.arch + x64 + ``` + +Now you should be able to use node as usual. ## Maintainers From fb4538b360a4ddd5d390442f3bfde9b3239b4413 Mon Sep 17 00:00:00 2001 From: lsfxz <1813007-ohfp@users.noreply.gitlab.com> Date: Wed, 17 Nov 2021 16:59:53 +0100 Subject: [PATCH 23/37] [Fix] add missing `local` (handle nonexisting /sbin/init a bit more cleanly) --- nvm.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/nvm.sh b/nvm.sh index 1a811f7..e3098b8 100644 --- a/nvm.sh +++ b/nvm.sh @@ -1871,6 +1871,7 @@ nvm_get_arch() { esac # If running a 64bit ARM kernel but a 32bit ARM userland, change ARCH to 32bit ARM (armv7l) + local L L=$(ls -dl /sbin/init 2>/dev/null) # if /sbin/init is 32bit executable if [ "$(uname)" = "Linux" ] && [ "${NVM_ARCH}" = arm64 ] && [ "$(od -An -t x1 -j 4 -N 1 "${L#*-> }")" = ' 01' ]; then NVM_ARCH=armv7l From 81f0f3ec19e08ca782f8a5bb29823a70b8f41177 Mon Sep 17 00:00:00 2001 From: Luke Arms Date: Mon, 27 Dec 2021 16:02:25 +1100 Subject: [PATCH 24/37] [Fix] `set -E`: Add test for `node install` on Bash with an ERR trap and `set -E` --- nvm.sh | 9 ++++ .../install on bash with ERR trap and set -E | 50 +++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100755 test/installation_node/install on bash with ERR trap and set -E diff --git a/nvm.sh b/nvm.sh index e3098b8..f40a9f3 100644 --- a/nvm.sh +++ b/nvm.sh @@ -2742,6 +2742,15 @@ nvm() { EXIT_CODE="$?" set -a return "$EXIT_CODE" + elif [ -n "${BASH-}" ] && [ "${-#*E}" != "$-" ]; then + # shellcheck disable=SC3041 + set +E + local EXIT_CODE + IFS="${DEFAULT_IFS}" nvm "$@" + EXIT_CODE="$?" + # shellcheck disable=SC3041 + set -E + return "$EXIT_CODE" elif [ "${IFS}" != "${DEFAULT_IFS}" ]; then IFS="${DEFAULT_IFS}" nvm "$@" return "$?" diff --git a/test/installation_node/install on bash with ERR trap and set -E b/test/installation_node/install on bash with ERR trap and set -E new file mode 100755 index 0000000..edfad0c --- /dev/null +++ b/test/installation_node/install on bash with ERR trap and set -E @@ -0,0 +1,50 @@ +#!/bin/sh + +set -e + +cleanup() { + nvm cache clear + nvm deactivate + rm -rf "${NVM_DIR}"/v* + nvm unalias default +} + +die() { + echo "$@" + cleanup || true + exit 1 +} + +\. ../../nvm.sh + +if [ -z "${BASH-}" ]; then + echo "This test only applies to Bash; skipping" + exit +fi + +cleanup || true +trap 'echo "==> EXIT signal received (status: $?)"; cleanup' EXIT + +# shellcheck disable=SC3047 +trap 'echo "==> ERR signal received"; exit 1' ERR +# shellcheck disable=SC3041 +set -E + +# shellcheck disable=SC3045,SC3047 +ERR_TRAP_EXPECTED="$(trap -p ERR)" + +# Adding ` || die 'install failed'` implicitly disables error handling and +# prevents ERR trap execution, so for the purposes of this test, `nvm install` +# can't be part of another command or statement +nvm install node + +case "$-" in +*E*) + # shellcheck disable=SC3045,SC3047 + [ "$(trap -p ERR)" = "$ERR_TRAP_EXPECTED" ] || + die "ERR trap not restored after \"nvm install $VERSION\"" + ;; +*) + die "errtrace not restored after \"nvm install $VERSION\"" + ;; +esac From 1875fe8b40dbe69e2c5f7e6175cdc82a167eb072 Mon Sep 17 00:00:00 2001 From: Luke Arms Date: Sun, 26 Dec 2021 15:31:53 +1100 Subject: [PATCH 25/37] [Fix] avoid OpenBSD `nvm install` error when /sbin/init doesn't exist `nvm install` fails with "Binary download failed, trying source" when - running on Bash; - errtrace (`set -E`) is enabled; - an ERR trap uses `exit` to return a non-zero status; and - /sbin/init doesn't exist. Resolved by moving `ls -dl /sbin/init` to the following `if` statement. In this context, returning non-zero isn't an error and the ERR trap isn't executed. --- nvm.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nvm.sh b/nvm.sh index f40a9f3..bb61a71 100644 --- a/nvm.sh +++ b/nvm.sh @@ -1870,10 +1870,12 @@ nvm_get_arch() { *) NVM_ARCH="${HOST_ARCH}" ;; esac - # If running a 64bit ARM kernel but a 32bit ARM userland, change ARCH to 32bit ARM (armv7l) + # If running a 64bit ARM kernel but a 32bit ARM userland, + # change ARCH to 32bit ARM (armv7l) if /sbin/init is 32bit executable local L - L=$(ls -dl /sbin/init 2>/dev/null) # if /sbin/init is 32bit executable - if [ "$(uname)" = "Linux" ] && [ "${NVM_ARCH}" = arm64 ] && [ "$(od -An -t x1 -j 4 -N 1 "${L#*-> }")" = ' 01' ]; then + if [ "$(uname)" = "Linux" ] && [ "${NVM_ARCH}" = arm64 ] && + L="$(ls -dl /sbin/init 2>/dev/null)" && + [ "$(od -An -t x1 -j 4 -N 1 "${L#*-> }")" = ' 01' ]; then NVM_ARCH=armv7l HOST_ARCH=armv7l fi From 6cfaede5a03cd4aa5d374d4c199bc1c18defa2e5 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sat, 27 Nov 2021 22:16:14 -0800 Subject: [PATCH 26/37] [Fix] `install`: better error message when xcode command line tools are needed Fixes #2697. Fixes #2663. --- install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install.sh b/install.sh index c3dc782..359d2de 100755 --- a/install.sh +++ b/install.sh @@ -356,6 +356,12 @@ nvm_do_install() { exit 1 fi fi + if nvm_has xcode-select && [ "$(xcode-select -p >/dev/null 2>/dev/null ; echo $?)" = '2' ] && [ "$(which git)" = '/usr/bin/git' ] && [ "$(which curl)" = '/usr/bin/curl' ]; then + nvm_echo >&2 'You may be on a Mac, and need to install the Xcode Command Line Developer Tools.' + # shellcheck disable=SC2016 + nvm_echo >&2 'If so, run `xcode-select --install` and try again. If not, please report this!' + exit 1 + fi if [ -z "${METHOD}" ]; then # Autodetect install method if nvm_has git; then From c2f740ab384a16f6ce8b50b2d545881beeedefe0 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Tue, 18 Jan 2022 12:49:57 -0800 Subject: [PATCH 27/37] [patch] HTTP -> HTTPS --- nvm.sh | 6 +++--- test/slow/nvm_get_latest/nvm_get_latest | 4 ++-- test/slow/nvm_get_latest/nvm_get_latest failed redirect | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nvm.sh b/nvm.sh index bb61a71..e769fa5 100644 --- a/nvm.sh +++ b/nvm.sh @@ -101,15 +101,15 @@ nvm_get_latest() { if nvm_curl_use_compression; then CURL_COMPRESSED_FLAG="--compressed" fi - NVM_LATEST_URL="$(curl ${CURL_COMPRESSED_FLAG:-} -q -w "%{url_effective}\\n" -L -s -S http://latest.nvm.sh -o /dev/null)" + NVM_LATEST_URL="$(curl ${CURL_COMPRESSED_FLAG:-} -q -w "%{url_effective}\\n" -L -s -S https://latest.nvm.sh -o /dev/null)" elif nvm_has "wget"; then - NVM_LATEST_URL="$(wget -q http://latest.nvm.sh --server-response -O /dev/null 2>&1 | command awk '/^ Location: /{DEST=$2} END{ print DEST }')" + NVM_LATEST_URL="$(wget -q https://latest.nvm.sh --server-response -O /dev/null 2>&1 | command awk '/^ Location: /{DEST=$2} END{ print DEST }')" else nvm_err 'nvm needs curl or wget to proceed.' return 1 fi if [ -z "${NVM_LATEST_URL}" ]; then - nvm_err "http://latest.nvm.sh did not redirect to the latest release on GitHub" + nvm_err "https://latest.nvm.sh did not redirect to the latest release on GitHub" return 2 fi nvm_echo "${NVM_LATEST_URL##*/}" diff --git a/test/slow/nvm_get_latest/nvm_get_latest b/test/slow/nvm_get_latest/nvm_get_latest index 5311360..32b85e7 100755 --- a/test/slow/nvm_get_latest/nvm_get_latest +++ b/test/slow/nvm_get_latest/nvm_get_latest @@ -10,8 +10,8 @@ cleanup() { EXPECTED_VERSION="v12.3.456" URL="https://github.com/nvm-sh/nvm/releases/tag/$EXPECTED_VERSION" -EXPECTED_CURL_ARGS="--compressed -q -w %{url_effective}\n -L -s -S http://latest.nvm.sh -o /dev/null" -EXPECTED_WGET_ARGS="-q http://latest.nvm.sh --server-response -O /dev/null" +EXPECTED_CURL_ARGS="--compressed -q -w %{url_effective}\n -L -s -S https://latest.nvm.sh -o /dev/null" +EXPECTED_WGET_ARGS="-q https://latest.nvm.sh --server-response -O /dev/null" curl() { if [ $# -eq 1 ] && [ "$1" = "-V" ]; then diff --git a/test/slow/nvm_get_latest/nvm_get_latest failed redirect b/test/slow/nvm_get_latest/nvm_get_latest failed redirect index 97534e9..2548b06 100755 --- a/test/slow/nvm_get_latest/nvm_get_latest failed redirect +++ b/test/slow/nvm_get_latest/nvm_get_latest failed redirect @@ -17,7 +17,7 @@ wget() { OUTPUT="$(nvm_get_latest 2>&1)" EXIT_CODE="$(nvm_get_latest >/dev/null 2>&1 ; echo $?)" -[ "_$OUTPUT" = "_http://latest.nvm.sh did not redirect to the latest release on GitHub" ] \ +[ "_$OUTPUT" = "_https://latest.nvm.sh did not redirect to the latest release on GitHub" ] \ || die "failed redirect did not report correct error message, got '$OUTPUT'" [ "_$EXIT_CODE" = "_2" ] \ || die "failed redirect did not exit with code 2, got $EXIT_CODE" From 2c0c34f10e6f415d1c6f60c54fcbf53a7670dec6 Mon Sep 17 00:00:00 2001 From: Kai Date: Sun, 16 Jan 2022 14:25:11 +0100 Subject: [PATCH 28/37] [Docs] HTTP => HTTPS --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8346f0b..386481b 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ If you're running a system without prepackaged binary available, which means you **Note:** On OS X, if you do not have Xcode installed and you do not wish to download the ~4.3GB file, you can install the `Command Line Tools`. You can check out this blog post on how to just that: - - [How to Install Command Line Tools in OS X Mavericks & Yosemite (Without Xcode)](http://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/) + - [How to Install Command Line Tools in OS X Mavericks & Yosemite (Without Xcode)](https://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/) **Note:** On OS X, if you have/had a "system" node installed and want to install modules globally, keep in mind that: @@ -890,7 +890,7 @@ To change the user directory and/or account name follow the instructions [here]( [3]: https://travis-ci.org/nvm-sh/nvm [4]: https://github.com/nvm-sh/nvm/releases/tag/v0.39.1 [Urchin]: https://github.com/scraperwiki/urchin -[Fish]: http://fishshell.com +[Fish]: https://fishshell.com **Homebrew makes zsh directories unsecure** From 39d9a42c359df5dbf37c5000af8192f14a280b94 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Tue, 8 Feb 2022 10:40:11 -0800 Subject: [PATCH 29/37] [Fix] `install.sh`: error out if the install instructions are not followed --- install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install.sh b/install.sh index 359d2de..2bf513a 100755 --- a/install.sh +++ b/install.sh @@ -10,6 +10,12 @@ nvm_echo() { command printf %s\\n "$*" 2>/dev/null } +if [ -z "${BASH_VERSION}" ] || [ -n "${ZSH_VERSION}" ]; then + # shellcheck disable=SC2016 + nvm_echo >&2 'Error: the install instructions explicitly say to pipe the install script to `bash`; please follow them' + exit 1 +fi + nvm_grep() { GREP_OPTIONS='' command grep "$@" } From d157cac6891372df8d23b4c1d49ca1028d9c418e Mon Sep 17 00:00:00 2001 From: Antony Tse Date: Wed, 9 Mar 2022 09:41:48 +0000 Subject: [PATCH 30/37] [readme] Correct typos in "Macs with M1 chip" section --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 386481b..d16abce 100644 --- a/README.md +++ b/README.md @@ -931,7 +931,7 @@ Here's what you will need to do: If that's the case, make sure to source `nvm`. ```sh - $ source "${NVM_DIR}/.nvm/nvm.sh" + $ source "${NVM_DIR}/nvm.sh" ``` - Install whatever older version of node you are interested in. Let's use 12.22.1 as an example. From c367d7daa04ff86137205b80dab4b66c271515fa Mon Sep 17 00:00:00 2001 From: legendecas Date: Mon, 28 Mar 2022 23:28:53 +0800 Subject: [PATCH 31/37] [Docs] fix fish load_nvm variable interpolations --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d16abce..462e524 100644 --- a/README.md +++ b/README.md @@ -655,7 +655,7 @@ function load_nvm --on-variable="PWD" 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 + else if test "$nvmrc_node_version" != "$node_version" nvm use $nvmrc_node_version end else if test "$node_version" != "$default_node_version" From 7d86701067319c6ce866caa87c29ecd84ee9c864 Mon Sep 17 00:00:00 2001 From: Ponder Date: Fri, 1 Apr 2022 13:00:58 -0400 Subject: [PATCH 32/37] [readme] `fish`: send output from `load_nvm` to `/dev/stderr` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 462e524..22afcd8 100644 --- a/README.md +++ b/README.md @@ -666,7 +666,7 @@ end # ~/.config/fish/config.fish # You must call it on initialization or listening to directory switching won't work -load_nvm +load_nvm > /dev/stderr ``` ## Running Tests From 9e884b8d7b41a9245ae6e42d5ea56db7576b2784 Mon Sep 17 00:00:00 2001 From: deepakchethan Date: Tue, 22 Mar 2022 18:58:18 +0530 Subject: [PATCH 33/37] [Fix] `nvm install`: show proper version in `.nvmrc` install instructions --- nvm.sh | 23 +++++++++++---- .../Unit tests/nvm_ensure_version_installed | 13 +++++++-- ...ror out sensibly when 0.x is not installed | 4 +-- ...ng 'nvm run' should pick up .nvmrc version | 13 +++++++++ ...with nvmrc containing not intalled version | 28 +++++++++++++++++++ 5 files changed, 71 insertions(+), 10 deletions(-) create mode 100644 test/slow/nvm use/Running 'nvm use' with nvmrc containing not intalled version diff --git a/nvm.sh b/nvm.sh index e769fa5..2d53d36 100644 --- a/nvm.sh +++ b/nvm.sh @@ -506,6 +506,8 @@ nvm_version_path() { nvm_ensure_version_installed() { local PROVIDED_VERSION PROVIDED_VERSION="${1-}" + local IS_VERSION_FROM_NVMRC + IS_VERSION_FROM_NVMRC="${2-}" if [ "${PROVIDED_VERSION}" = 'system' ]; then if nvm_has_system_iojs || nvm_has_system_node; then return 0 @@ -527,7 +529,11 @@ nvm_ensure_version_installed() { nvm_err "N/A: version \"${PREFIXED_VERSION:-$PROVIDED_VERSION}\" is not yet installed." fi nvm_err "" - nvm_err "You need to run \"nvm install ${PROVIDED_VERSION}\" to install it before using it." + if [ "${IS_VERSION_FROM_NVMRC}" != '1' ]; then + nvm_err "You need to run \`nvm install ${PROVIDED_VERSION}\` to install and use it." + else + nvm_err 'You need to run `nvm install` to install and use the node version specified in `.nvmrc`.' + fi return 1 fi } @@ -3522,6 +3528,8 @@ nvm() { local NVM_DELETE_PREFIX NVM_DELETE_PREFIX=0 local NVM_LTS + local IS_VERSION_FROM_NVMRC + IS_VERSION_FROM_NVMRC=0 while [ $# -ne 0 ]; do case "$1" in @@ -3549,6 +3557,7 @@ nvm() { NVM_SILENT="${NVM_SILENT:-0}" nvm_rc_version if [ -n "${NVM_RC_VERSION-}" ]; then PROVIDED_VERSION="${NVM_RC_VERSION}" + IS_VERSION_FROM_NVMRC=1 VERSION="$(nvm_version "${PROVIDED_VERSION}")" fi unset NVM_RC_VERSION @@ -3588,14 +3597,12 @@ nvm() { fi if [ "${VERSION}" = 'N/A' ]; then if [ "${NVM_SILENT:-0}" -ne 1 ]; then - nvm_err "N/A: version \"${PROVIDED_VERSION} -> ${VERSION}\" is not yet installed." - nvm_err "" - nvm_err "You need to run \"nvm install ${PROVIDED_VERSION}\" to install it before using it." + nvm_ensure_version_installed "${PROVIDED_VERSION}" "${IS_VERSION_FROM_NVMRC}" fi return 3 # This nvm_ensure_version_installed call can be a performance bottleneck # on shell startup. Perhaps we can optimize it away or make it faster. - elif ! nvm_ensure_version_installed "${VERSION}"; then + elif ! nvm_ensure_version_installed "${VERSION}" "${IS_VERSION_FROM_NVMRC}"; then return $? fi @@ -3650,6 +3657,8 @@ nvm() { local provided_version local has_checked_nvmrc has_checked_nvmrc=0 + local IS_VERSION_FROM_NVMRC + IS_VERSION_FROM_NVMRC=0 # run given version of node local NVM_SILENT @@ -3695,6 +3704,8 @@ nvm() { if [ $has_checked_nvmrc -ne 1 ]; then NVM_SILENT="${NVM_SILENT:-0}" nvm_rc_version && has_checked_nvmrc=1 fi + provided_version="${NVM_RC_VERSION}" + IS_VERSION_FROM_NVMRC=1 VERSION="$(nvm_version "${NVM_RC_VERSION}")" ||: unset NVM_RC_VERSION else @@ -3717,7 +3728,7 @@ nvm() { VERSION='' fi if [ "_${VERSION}" = "_N/A" ]; then - nvm_ensure_version_installed "${provided_version}" + nvm_ensure_version_installed "${provided_version}" "${IS_VERSION_FROM_NVMRC}" elif [ "${NVM_IOJS}" = true ]; then nvm exec "${NVM_SILENT_ARG-}" "${LTS_ARG-}" "${VERSION}" iojs "$@" else diff --git a/test/fast/Unit tests/nvm_ensure_version_installed b/test/fast/Unit tests/nvm_ensure_version_installed index e239e0e..4c51508 100755 --- a/test/fast/Unit tests/nvm_ensure_version_installed +++ b/test/fast/Unit tests/nvm_ensure_version_installed @@ -15,7 +15,16 @@ OUTPUT="$(nvm_ensure_version_installed foo 2>&1)" EXIT_CODE=$? EXPECTED_OUTPUT='N/A: version "foo" is not yet installed. -You need to run "nvm install foo" to install it before using it.' +You need to run `nvm install foo` to install and use it.' +[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "expected 'nvm_ensure_version_installed foo' to give $EXPECTED_OUTPUT, got $OUTPUT" +[ "_$EXIT_CODE" = "_1" ] || die "expected 'nvm_ensure_version_installed foo' to exit with 1, got $EXIT_CODE" + +# Case when .nvmrc file is opened, we should be skip showing the version +OUTPUT="$(nvm_ensure_version_installed foo 1 2>&1)" +EXIT_CODE=$? +EXPECTED_OUTPUT='N/A: version "foo" is not yet installed. + +You need to run `nvm install` to install and use the node version specified in `.nvmrc`.' [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "expected 'nvm_ensure_version_installed foo' to give $EXPECTED_OUTPUT, got $OUTPUT" [ "_$EXIT_CODE" = "_1" ] || die "expected 'nvm_ensure_version_installed foo' to exit with 1, got $EXIT_CODE" @@ -29,7 +38,7 @@ OUTPUT="$(nvm_ensure_version_installed iojs 2>&1)" EXIT_CODE=$? EXPECTED_OUTPUT='N/A: version "iojs" is not yet installed. -You need to run "nvm install iojs" to install it before using it.' +You need to run `nvm install iojs` to install and use it.' [ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "expected 'nvm_ensure_version_installed iojs' to give $EXPECTED_OUTPUT, got $OUTPUT" [ "_$EXIT_CODE" = "_1" ] || die "expected 'nvm_ensure_version_installed iojs' to exit with 1, got $EXIT_CODE" diff --git a/test/slow/nvm run/Running 'nvm run 0.x' should error out sensibly when 0.x is not installed b/test/slow/nvm run/Running 'nvm run 0.x' should error out sensibly when 0.x is not installed index b9a2c2c..c38b428 100755 --- a/test/slow/nvm run/Running 'nvm run 0.x' should error out sensibly when 0.x is not installed +++ b/test/slow/nvm run/Running 'nvm run 0.x' should error out sensibly when 0.x is not installed @@ -7,10 +7,10 @@ die () { echo "$@" ; exit 1; } EXPECTED_OUTPUT='N/A: version "v0.2" is not yet installed. -You need to run "nvm install 0.2" to install it before using it.' +You need to run `nvm install 0.2` to install and use it.' [ "_$(nvm run 0.2 --version 2>&1)" = "_$EXPECTED_OUTPUT" ] || die "\`nvm run\` with an uninstalled node version failed to error out correctly" EXPECTED_OUTPUT='N/A: version "iojs-v0.2" is not yet installed. -You need to run "nvm install iojs-0.2" to install it before using it.' +You need to run `nvm install iojs-0.2` to install and use it.' [ "_$(nvm run iojs-0.2 --version 2>&1)" = "_$EXPECTED_OUTPUT" ] || die "\`nvm run\` with an uninstalled iojs version failed to error out correctly" diff --git a/test/slow/nvm run/Running 'nvm run' should pick up .nvmrc version b/test/slow/nvm run/Running 'nvm run' should pick up .nvmrc version index 3273ea0..a349689 100755 --- a/test/slow/nvm run/Running 'nvm run' should pick up .nvmrc version +++ b/test/slow/nvm run/Running 'nvm run' should pick up .nvmrc version @@ -10,3 +10,16 @@ echo "0.10.7" > .nvmrc [ "$(nvm run --version | tail -1)" = "v0.10.7" ] || die "\`nvm run\` failed to run with the .nvmrc version" [ "$(nvm run --version | head -1)" = "Found '$PWD/.nvmrc' with version <0.10.7>" ] || die "\`nvm run\` failed to print out the \"found in .nvmrc\" message" + + +echo "foo" > .nvmrc + +# running nvm run with .nvmrc should not print the version information when not installed +OUTPUT="$(nvm run --version 2>&1)" +EXIT_CODE=$? +EXPECTED_OUTPUT="Found '$PWD/.nvmrc' with version +N/A: version \"foo\" is not yet installed. + +You need to run \`nvm install\` to install and use the node version specified in \`.nvmrc\`." +[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "expected 'nvm use' with nvmrc to give $EXPECTED_OUTPUT, got $OUTPUT" +[ "_$EXIT_CODE" = "_1" ] || die "expected 'nvm use' with nvmrc to exit with 1, got $EXIT_CODE" diff --git a/test/slow/nvm use/Running 'nvm use' with nvmrc containing not intalled version b/test/slow/nvm use/Running 'nvm use' with nvmrc containing not intalled version new file mode 100644 index 0000000..122aa96 --- /dev/null +++ b/test/slow/nvm use/Running 'nvm use' with nvmrc containing not intalled version @@ -0,0 +1,28 @@ +#!/bin/sh + +die () { echo "$@" ; exit 1; } + +\. ../../../nvm.sh + +nvm deactivate 2>&1 >/dev/null || die 'deactivate failed' + +echo "foo" > .nvmrc + +# running nvm use with .nvmrc should not print the version information +OUTPUT="$(nvm use 2>&1)" +EXIT_CODE=$? +EXPECTED_OUTPUT="Found '$PWD/.nvmrc' with version +N/A: version \"foo\" is not yet installed. + +You need to run \`nvm install\` to install and use the node version specified in \`.nvmrc\`." +[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "expected 'nvm use' with nvmrc to give $EXPECTED_OUTPUT, got $OUTPUT" +[ "_$EXIT_CODE" = "_3" ] || die "expected 'nvm use' with nvmrc to exit with 3, got $EXIT_CODE" + +# --silent should not print anything +OUTPUT=$(nvm use --silent) +EXPECTED_OUTPUT="" + +[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] \ + || die "'nvm use --silent' output was not silenced to '$EXPECTED_OUTPUT'; got '$OUTPUT'" + +rm .nvmrc From bd083ff367002bbfe526f434bc2698a1850c1d47 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 11 Apr 2022 14:09:37 -0700 Subject: [PATCH 34/37] [readme] minor cleanup --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 22afcd8..dd449ab 100644 --- a/README.md +++ b/README.md @@ -459,7 +459,7 @@ 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: +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' @@ -718,36 +718,36 @@ Put the above sourcing line just below the sourcing line for nvm in your profile ### Usage nvm: -> $ nvm Tab -``` +> `$ nvm` Tab +```sh 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 ``` nvm alias: -> $ nvm alias Tab -``` +> `$ nvm alias` Tab +```sh default iojs lts/* lts/argon lts/boron lts/carbon lts/dubnium lts/erbium node stable unstable ``` -> $ nvm alias my_alias Tab -``` +> `$ nvm alias my_alias` Tab +```sh v10.22.0 v12.18.3 v14.8.0 ``` nvm use: -> $ nvm use Tab +> `$ nvm use` Tab ``` my_alias default v10.22.0 v12.18.3 v14.8.0 ``` nvm uninstall: -> $ nvm uninstall Tab +> `$ nvm uninstall` Tab ``` my_alias default v10.22.0 v12.18.3 v14.8.0 @@ -779,7 +779,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 optimizations), 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). 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. @@ -906,7 +906,7 @@ Homebrew causes insecure directories like `/usr/local/share/zsh/site-functions` Experimental support for the M1 architecture was added in node.js v15.3 and full support was added in v16.0. Because of this, if you try to install older versions of node as usual, you will probably experience either compilation errors when installing node or out-of-memory errors while running your code. -So, if you want to run a version prior to v16.0 on an M1 Mac, it may be best to compile node targeting the x86_64 Intel architecture so that Rosetta 2 can translate the x86_64 processor instructions to ARM-based Apple Silicon instructions. +So, if you want to run a version prior to v16.0 on an M1 Mac, it may be best to compile node targeting the `x86_64` Intel architecture so that Rosetta 2 can translate the `x86_64` processor instructions to ARM-based Apple Silicon instructions. Here's what you will need to do: - Install Rosetta, if you haven't already done so @@ -959,7 +959,7 @@ Here's what you will need to do: Note: If you selected the box labeled "Open using Rosetta" rather than running the CLI command in the second step, you will see `i386` here. Unless you have another reason to have that box selected, you can deselect it now. -- Check to make sure the architecture is correct. `x64` is the abbreviation for x86_64, which is what you want to see. +- Check to make sure the architecture is correct. `x64` is the abbreviation for `x86_64`, which is what you want to see. ```sh $ node -p process.arch From 01886b4243531c78360cafd0e938888a58c570fa Mon Sep 17 00:00:00 2001 From: Dani Schuhman Date: Fri, 15 Apr 2022 10:56:26 -0400 Subject: [PATCH 35/37] [meta] Update CODE_OF_CONDUCT to current version --- CODE_OF_CONDUCT.md | 133 ++++++++++++++++++++++++++------------------- 1 file changed, 76 insertions(+), 57 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index cad8e65..e531bd4 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,9 +1,9 @@ # 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: +`nvm`, as a member project of the OpenJS Foundation, uses [Contributor Covenant v2.1](https://www.contributor-covenant.org/version/2/1/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) +- [github.com/ContributorCovenant](https://github.com/ContributorCovenant/contributor_covenant/tree/release/content/version/2/1) Refer to the sections on reporting and escalation in this document for the specific emails that can be used to report and escalate issues. @@ -14,93 +14,112 @@ Refer to the sections on reporting and escalation in this document for the speci 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. +- 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: +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. +- 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`. +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 +# 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. +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. -### Our Standards +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. -Examples of behavior that contributes to creating a positive environment include: +## Our Standards -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members +Examples of behavior that contributes to a positive environment for our community include: -Examples of unacceptable behavior by participants include: +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall community -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of any kind +* Trolling, insulting or 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 +* Publishing others' private information, such as a physical or email address, without their explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting -### Our Responsibilities +## Enforcement Responsibilities -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. +Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. -Project maintainers have the right and responsibility to remove, edit, or -reject comments, commits, code, wiki edits, issues, and other contributions -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. +Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. -### 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 -representing a project or community include using an official project e-mail -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. +This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. -### 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 -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. +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [@ljharb](ljharb@gmail.com). +All complaints will be reviewed and investigated promptly and fairly. -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 -members of the project's leadership. +All community leaders are obligated to respect the privacy and security of the reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of actions. + +**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the community. ## 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/) +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. [homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations From ef3b20c21ec6e88a3f979994d1ca16dcdb9efb0a Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 22 Apr 2022 16:53:49 -0700 Subject: [PATCH 36/37] [readme] add logo --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index dd449ab..c653c50 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +nvm project logo + # 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) From a82edf40ba72a15b1d40822735942141547f38e2 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 2 Jun 2022 12:25:55 -0700 Subject: [PATCH 37/37] [Robustness] avoid a clobbered `ls` Fixes #2824 --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 2d53d36..ede616e 100644 --- a/nvm.sh +++ b/nvm.sh @@ -1880,7 +1880,7 @@ nvm_get_arch() { # change ARCH to 32bit ARM (armv7l) if /sbin/init is 32bit executable local L if [ "$(uname)" = "Linux" ] && [ "${NVM_ARCH}" = arm64 ] && - L="$(ls -dl /sbin/init 2>/dev/null)" && + L="$(command ls -dl /sbin/init 2>/dev/null)" && [ "$(od -An -t x1 -j 4 -N 1 "${L#*-> }")" = ' 01' ]; then NVM_ARCH=armv7l HOST_ARCH=armv7l