diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d03534f..a524667 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -170,10 +170,11 @@ jobs: run: | nvm install --default ${{ matrix.node-version }} if [[ "${{ matrix.node-version }}" == 0.* && "$(cut -d. -f2 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then - nvm install --alias=npm 0.10 + nvm install --alias=npm 0.12 nvm use ${{ matrix.node-version }} sed -i '1s;^.*$;'"$(printf '#!%q' "$(nvm which npm)")"';' "$(readlink -f "$(which npm)")" - npm config set strict-ssl false + npm install --global --prefix "$(which node)/../.." npm@2 + sed -i '1s;^.*$;'"$(printf '#!%q' "$(nvm which npm)")"';' "$(readlink -f "$(which npm)")" fi dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH" @@ -185,6 +186,15 @@ jobs: npm config set shrinkwrap false fi + - name: List environment + id: list_env + shell: bash + run: | + echo "node@$(node -v)" + echo "npm@$(npm -v)" + npm -s ls ||: + (npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print "::set-output name=" $2 "::" $3 }' + - name: Remove npm module(s) ${{ matrix.npm-rm }} run: npm rm --silent --save-dev ${{ matrix.npm-rm }} if: matrix.npm-rm != '' @@ -208,15 +218,6 @@ jobs: - name: Install Node.js dependencies run: npm install - - name: List environment - id: list_env - shell: bash - run: | - echo "node@$(node -v)" - echo "npm@$(npm -v)" - npm -s ls ||: - (npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print "::set-output name=" $2 "::" $3 }' - - name: Run tests shell: bash run: | diff --git a/package.json b/package.json index eb432a0..a666a56 100644 --- a/package.json +++ b/package.json @@ -10,26 +10,26 @@ "repository": "expressjs/compression", "keywords": ["compression", "gzip", "deflate", "middleware", "express", "brotli", "http", "stream"], "dependencies": { - "bytes": "3.1.2", - "compressible": "~2.0.18", - "debug": "2.6.9", - "negotiator": "~0.6.4", - "on-headers": "~1.0.2", - "safe-buffer": "5.2.1", - "vary": "~1.1.2" + "bytes": "^3.1.2", + "compressible": "^2.0.18", + "debug": "^2.6.9", + "negotiator": "^0.6.4", + "on-headers": "^1.0.2", + "safe-buffer": "^5.2.1", + "vary": "^1.1.2" }, "devDependencies": { - "after": "0.8.2", - "eslint": "7.32.0", - "eslint-config-standard": "14.1.1", - "eslint-plugin-import": "2.26.0", - "eslint-plugin-markdown": "2.2.1", - "eslint-plugin-node": "11.1.0", - "eslint-plugin-promise": "5.2.0", - "eslint-plugin-standard": "4.1.0", - "mocha": "9.2.2", - "nyc": "15.1.0", - "supertest": "6.2.3" + "after": "^0.8.2", + "eslint": "^7.32.0", + "eslint-config-standard": "^14.1.1", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-markdown": "^2.2.1", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^5.2.0", + "eslint-plugin-standard": "^4.1.0", + "mocha": "^9.2.2", + "nyc": "^15.1.0", + "supertest": "^6.2.3" }, "files": [ "LICENSE",