licenseguard-cli 2.3.0 → 2.3.1

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.
@@ -0,0 +1,7 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(git remote:*)"
5
+ ]
6
+ }
7
+ }
@@ -117,24 +117,10 @@ function setupGlobalHooks() {
117
117
  return
118
118
  }
119
119
 
120
- // Check if current project is ESM
121
- let isEsm = false
122
- try {
123
- if (fs.existsSync('package.json')) {
124
- const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'))
125
- isEsm = pkg.type === 'module'
126
- }
127
- } catch (e) {
128
- // ignore
129
- }
130
-
131
- const postCheckoutHook = isEsm
132
- ? generatePostCheckoutHookEsm()
133
- : generatePostCheckoutHookCjs()
134
-
135
- const preCommitHook = isEsm
136
- ? generatePreCommitHookEsm()
137
- : generatePreCommitHookCjs()
120
+ // Always use ESM for global hooks - ESM works in both ESM and CJS projects
121
+ // CJS hooks fail in ESM projects, but ESM hooks work everywhere
122
+ const postCheckoutHook = generatePostCheckoutHookEsm()
123
+ const preCommitHook = generatePreCommitHookEsm()
138
124
 
139
125
  // Create template directories
140
126
  if (!fs.existsSync(hooksDir)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "licenseguard-cli",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "License setup & compliance guard for developers",
5
5
  "bin": {
6
6
  "licenseguard": "bin/licenseguard.js"