From 84a206dacb8a8740dc63b15b0b92275e1d777f7d Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Thu, 11 Nov 2021 23:51:48 -0500 Subject: [PATCH] build: update CI for npm TLS upgrade --- .github/workflows/ci.yml | 5 ++++- appveyor.yml | 5 ----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 11c332e..8dc8ac3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -110,7 +110,10 @@ jobs: shell: bash -eo pipefail -l {0} run: | nvm install --default ${{ matrix.node-version }} - if [[ "${{ matrix.node-version }}" == 0.* ]]; then + if [[ "${{ matrix.node-version }}" == 0.* && "$(cut -d. -f2 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then + nvm install --alias=npm 0.10 + nvm use ${{ matrix.node-version }} + sed -i '1s;^.*$;'"$(printf '#!%q' "$(nvm which npm)")"';' "$(readlink -f "$(which npm)")" npm config set strict-ssl false fi dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH" diff --git a/appveyor.yml b/appveyor.yml index 13a3127..3608b81 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,5 @@ environment: matrix: - - nodejs_version: "0.8" - nodejs_version: "0.10" - nodejs_version: "0.12" - nodejs_version: "1.8" @@ -29,10 +28,6 @@ install: - ps: | # Skip updating shrinkwrap / lock npm config set shrinkwrap false - # Skip SSL validation on Node.js < 0.10 - if ([int]$env:nodejs_version.split(".")[0] -eq 0 -and [int]$env:nodejs_version.split(".")[1] -lt 10) { - npm config set strict-ssl false - } # Remove all non-test dependencies - ps: | # Remove benchmark dependencies