2022-10-20 14:00:35 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# This script checks to ensure that all our NPM packages have an appropriate scope.
|
|
|
|
#
|
2023-05-03 06:52:52 -07:00
|
|
|
git ls-files -z | grep -z "package.json" | xargs -n1 -r -0 /bin/bash -c 'printf "[$@]"; jq ".name" "$@";' '' | egrep -v "^\[.*\]null$" | egrep -v '^\[.*\]"(@certusone/|@wormhole-foundation/)'
|
2022-10-20 14:00:35 -07:00
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
echo "[!] Unscoped npm packages" >&2
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
echo "[+] No unscoped npm packages"
|
|
|
|
fi
|