Skip to content

Commit 46d0371

Browse files
committed
chore: add lockfile validation
see: #16 Signed-off-by: Rifa Achrinza <[email protected]>
1 parent 52a5d78 commit 46d0371

File tree

3 files changed

+152
-0
lines changed

3 files changed

+152
-0
lines changed

package-lock.json

+132
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"eslint-plugin-prettier": "^4.0.0",
5252
"glob": "^7.2.0",
5353
"husky": "^7.0.4",
54+
"lockfile-lint": "^4.7.3",
5455
"secvisogram": "file:./vendors/secvisogram/app",
5556
"semver": "^7.3.5",
5657
"ts-node": "^10.5.0"

scripts/meta/vaidate-lockfile.sh

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/sh
2+
# SPDX-FileCopyrightHeader: LoopBack Contributors
3+
# SPDX-License-Identifier: MIT
4+
5+
set -eu
6+
export POSIXLY_CORRECT=1
7+
8+
SCRIPT_PATH="$(dirname $0)"
9+
REPO_PATH="$SCRIPT_PATH/../../"
10+
11+
find "$REPO_PATH" \
12+
-name package-lock.json \
13+
-type f \
14+
-exec \
15+
npx --no-install \
16+
lockfile-lint \
17+
--allowed-hosts=npm \
18+
--allowed-schemes=https: file: \
19+
--path='{}' \;

0 commit comments

Comments
 (0)