Commit 54f9f536 authored by SBassett's avatar SBassett
Browse files

Add support for multiple, nested package.json and package-lock.json files (Bug: T296806)

parent 1b4ae4e0
Pipeline #1334 passed with stage
in 52 seconds
......@@ -9,10 +9,20 @@ npm_audit_dependency_check:
before_script:
- apt-get update -yqq
- npm install -g audit-ci
- npm install
script:
- audit-ci ${NPM_AUDIT_OPTIONS}
- |
root_dir=$(pwd)
file_list=$(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA -- \
{*package.json,*package-lock.json,*/package.json,*/package-lock.json})
for f in $file_list; do
npm_dir="$(dirname "$f")"
cd $root_dir/$npm_dir
npm install
audit-ci ${NPM_AUDIT_OPTIONS}
done
# only run on changes to package and package.lock .json
only:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment