Skip to content

Commit 70a2b6c

Browse files
authored
Merge pull request #312 from ChinYing-Li/bug_1681484
Bug 1681484: Add the consistency check between package.json and package-lock.json
2 parents 7938a51 + 8dc0b64 commit 70a2b6c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.circleci/config.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@ jobs:
1212
- image: cimg/node:16.1.0
1313
steps:
1414
- checkout
15+
- run:
16+
name: Check that package-lock.json is updated as needed
17+
command: |
18+
npm install --prefix ./glean --package-lock-only
19+
if ! git diff --exit-code HEAD -- glean/package-lock.json; then
20+
echo "=================================================="
21+
echo "The committed package-lock.json is out-dated."
22+
echo "Please regenerate package-lock.json using"
23+
echo " npm i --package-lock-only"
24+
echo "Commit the modified file and push."
25+
echo "=================================================="
26+
exit 1
27+
fi
1528
- run:
1629
name: Install Javascript dependencies
1730
command: npm --prefix ./glean install

0 commit comments

Comments
 (0)