Skip to content

Commit b9cab90

Browse files
J12934JohannesZahn
authored andcommitted
Add small script to run npm audit fix on all npm subprojects
Closes #456 Closes #457 Closes #458 Closes #459 Signed-off-by: JohannesZahn <johannes_zahn@nc-online.de>
1 parent ab20373 commit b9cab90

File tree

6 files changed

+95
-67
lines changed

6 files changed

+95
-67
lines changed

bin/npm-audit-fix-all.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
3+
# SPDX-FileCopyrightText: 2020 iteratec GmbH
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
echo "Running 'npm audit fix' in all directories containing a package-lock.json"
8+
9+
find . -type f -name package-lock.json -print0 | while IFS= read -r -d '' chart; do
10+
(
11+
dir="$(dirname "${chart}")"
12+
cd "${dir}" || exit
13+
echo "Running 'npm audit fix' in $dir"
14+
npm audit fix
15+
)
16+
done

hooks/declarative-subsequent-scans/package-lock.json

Lines changed: 19 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hooks/finding-post-processing/package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hooks/notification-hook/package-lock.json

Lines changed: 28 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hooks/teams-webhook/package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/integration/package-lock.json

Lines changed: 20 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)