@wipcomputer/wip-branch-guard 1.9.30 → 1.9.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/guard.mjs +2 -2
  2. package/package.json +1 -1
package/guard.mjs CHANGED
@@ -49,8 +49,6 @@ const BLOCKED_BASH_PATTERNS = [
49
49
  /\brm\s+/,
50
50
  /\bmkdir\s+/,
51
51
  /\btouch\s+/,
52
- /\bnpm\s+link\b/,
53
- /\bnpm\s+install\s+-g\b/,
54
52
  />\s/, // redirects
55
53
  /\btee\s+/,
56
54
  /\bsed\s+-i/,
@@ -77,6 +75,8 @@ const ALLOWED_BASH_PATTERNS = [
77
75
  /--dry-run/,
78
76
  /--help/,
79
77
  /\bwip-release\b.*--dry-run/,
78
+ /\bnpm\s+install\s+-g\b/, // global installs modify /opt/homebrew/, not the repo
79
+ /\bnpm\s+link\b/, // global operation, not repo-local
80
80
  ];
81
81
 
82
82
  function deny(reason) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wipcomputer/wip-branch-guard",
3
- "version": "1.9.30",
3
+ "version": "1.9.31",
4
4
  "description": "PreToolUse hook that blocks all writes on main branch. Forces agents to work on branches or worktrees.",
5
5
  "type": "module",
6
6
  "main": "guard.mjs",