husky
Advanced tools
Comparing version 9.0.7 to 9.0.8
28
bin.js
@@ -5,19 +5,23 @@ #!/usr/bin/env node | ||
let a = process.argv[2] | ||
let p, a, n, s, o, d | ||
p = process | ||
a = p.argv[2] | ||
if (a == 'init') { | ||
let p = 'package.json' | ||
let d = JSON.parse(f.readFileSync(p)) | ||
; (d.scripts ||= {}).prepare = 'husky' | ||
w('package.json', JSON.stringify(d, null, /\t/.test() ? '\t' : 2) + '\n') | ||
process.stdout.write(i()) | ||
try { f.mkdirSync('.husky') } catch { } | ||
w('.husky/pre-commit', process.env.npm_config_user_agent.split('/')[0] + ' test\n') | ||
process.exit() | ||
n = 'package.json' | ||
s = f.readFileSync(n) | ||
o = JSON.parse(s) | ||
;(o.scripts ||= {}).prepare = 'husky' | ||
w(n, JSON.stringify(o, 0, /\t/.test(s) ? '\t' : 2) + '\n') | ||
p.stdout.write(i()) | ||
try { f.mkdirSync('.husky') } catch {} | ||
w('.husky/pre-commit', p.env.npm_config_user_agent.split('/')[0] + ' test\n') | ||
p.exit() | ||
} | ||
let d = c => console.error(`${c} command is deprecated`) | ||
if (['add', 'set', 'uninstall'].includes(a)) { d(a); process.exit(1) } | ||
d = c => console.error(`${c} command is deprecated`) | ||
if (['add', 'set', 'uninstall'].includes(a)) { d(a); p.exit(1) } | ||
if (a == 'install') d(a) | ||
process.stdout.write(i(a == 'install' ? undefined : a)) | ||
p.stdout.write(i(a == 'install' ? undefined : a)) |
{ | ||
"name": "husky", | ||
"version": "9.0.7", | ||
"version": "9.0.8", | ||
"description": "Modern native Git hooks", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
38
3
3628