Skip to content

Commit da89aa9

Browse files
ochafikclaude
andcommitted
Add pre-commit check for private registry URLs in package-lock.json
Same check as in CI to catch issues before push. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent e6e6e7a commit da89aa9

File tree

2 files changed

+3238
-2171
lines changed

2 files changed

+3238
-2171
lines changed

.husky/pre-commit

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# Verify no private registry URLs in package-lock.json
2+
if grep -E '"resolved": "https?://' package-lock.json | grep -v registry.npmjs.org > /dev/null; then
3+
echo "ERROR: package-lock.json contains non-npmjs.org URLs"
4+
echo "Run: docker run --rm -i -v \$PWD:/src -w /src node:latest npm i --registry=https://registry.npmjs.org/"
5+
exit 1
6+
fi
7+
18
npm run build:all
29
npm run prettier:fix
310

0 commit comments

Comments
 (0)