Skip to content

Commit

Permalink
Update npm ci command to include optional dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
nukeop committed Jun 15, 2024
1 parent c6973b1 commit 0c2ddc4
Show file tree
Hide file tree
Showing 3 changed files with 218 additions and 21 deletions.
17 changes: 1 addition & 16 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ jobs:
run: |
sudo -H pip install setuptools
- name: npm ci
if: runner.os != 'Windows'
run: npm ci --cache .npm --prefer-offline
run: npm ci --cache .npm --prefer-offline --include=optional
- run: npm run lint
- run: npm test

Expand All @@ -71,25 +70,11 @@ jobs:
- name: get-npm-version
id: package-version
uses: pchynoweth/action-get-npm-version@1.1.1
- name: Cache npm packages
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- name: Cache Node modules
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: add git binaries to PATH
if: runner.os == 'Windows'
run: |
Expand Down
214 changes: 211 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@
"typescript": "^4.2.4"
},
"optionalDependencies": {
"7zip-bin-mac": "^1.0.1"
"7zip-bin-mac": "^1.0.1",
"@nx/nx-darwin-arm64": "19.2.3",
"@nx/nx-darwin-x64": "19.2.3",
"@nx/nx-linux-x64-gnu": "19.2.3",
"@nx/nx-win32-x64-msvc": "19.2.3"
},
"engines": {
"node": ">=18.0.0",
Expand Down Expand Up @@ -207,4 +211,4 @@
"dependencies": {
"sqlite3": "^5.1.6"
}
}
}

0 comments on commit 0c2ddc4

Please sign in to comment.