Skip to content

Commit

Permalink
npm is no longer in devDependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinvanrijn committed Feb 2, 2024
1 parent cf3c8e4 commit 408ce32
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/tools/actions-audit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ rm -rf .npm/
git checkout -- '.npmrc'
export better_npm_audit_version=$(cat package.json | python -c "import sys, json; print(json.load(sys.stdin)['dependencies']['better-npm-audit'])")
export electron_version=$(cat package.json | python -c "import sys, json; print(json.load(sys.stdin)['devDependencies']['electron'])")
export npm_version=$(cat package.json | python -c "import sys, json; print(json.load(sys.stdin)['devDependencies']['npm'])")
export lodash_isarray_version=$(cat package.json | python -c "import sys, json; print(json.load(sys.stdin)['optionalDependencies']['lodash.isarray'])")
# devDependencies and optionalDependencies
rm -r node_modules/
Expand All @@ -26,7 +25,7 @@ sed -i '/"optionalDependencies": {/,/}/d' -- 'package.json'
sed -i '/"peerDependencies": {/,/}/d' -- 'package.json'
sed -i -z 's| "bundleDependencies": \[\n ".*"\n \]| "bundleDependencies": \[\]|' -- 'package.json'
# Install
bin/linux/x64/node/node-v$node_version-linux-x64/bin/node bin/windows/x64/node/node-v$node_version-win-x64/node_modules/npm/bin/npm-cli.js install --no-offline "electron@$electron_version" "npm@$npm_version" "lodash.isarray@$lodash_isarray_version" "better-npm-audit@$better_npm_audit_version"
bin/linux/x64/node/node-v$node_version-linux-x64/bin/node bin/windows/x64/node/node-v$node_version-win-x64/node_modules/npm/bin/npm-cli.js install --no-offline "electron@$electron_version" "lodash.isarray@$lodash_isarray_version" "better-npm-audit@$better_npm_audit_version"
rm -rf .npm/
# Dedupe
bin/linux/x64/node/node-v$node_version-linux-x64/bin/node bin/windows/x64/node/node-v$node_version-win-x64/node_modules/npm/bin/npm-cli.js dedupe
Expand Down

0 comments on commit 408ce32

Please sign in to comment.