Skip to content

Commit

Permalink
fix(ci): update npm installation method and improve package dependenc…
Browse files Browse the repository at this point in the history
…y versions
  • Loading branch information
bjohansebas committed Jan 16, 2025
1 parent 82c9cb5 commit a889a79
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 29 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 != ''
Expand All @@ -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: |
Expand Down
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit a889a79

Please sign in to comment.