Skip to content

Commit 3049866

Browse files
committed
pre-push: also verify the version in package-lock.json
We already verify it in `package.json`. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent d9691ac commit 3049866

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pre-push.hook

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,18 @@ do
2828
git grep -q "$regex" refs/tags/$tag -- package.json || {
2929
sed "$substitute" <package.json >package.json.new &&
3030
mv -f package.json.new package.json
31+
sed "$substitute" <package-lock.json >package-lock.json.new &&
32+
mv -f package-lock.json.new package-lock.json
3133
die "package.json did not reflect $tag; It was adjusted."
3234
exit 1
3335
}
36+
37+
git grep -q "$regex" refs/tags/$tag -- package-lock.json || {
38+
sed "$substitute" <package-lock.json >package-lock.json.new &&
39+
mv -f package-lock.json.new package-lock.json
40+
die "package-lock.json did not reflect $tag; It was adjusted."
41+
exit 1
42+
}
3443
done
3544

3645
git diff --quiet dist/ ||

0 commit comments

Comments
 (0)