Socket
Socket
Sign inDemoInstall

husky

Package Overview
Dependencies
0
Maintainers
1
Versions
207
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

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": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc