Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

husky

Package Overview
Dependencies
Maintainers
1
Versions
214
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

husky - npm Package Compare versions

Comparing version 0.9.1 to 0.9.2

2

package.json
{
"name": "husky",
"version": "0.9.1",
"version": "0.9.2",
"description": "Prevents bad commit or push (git hooks, pre-commit/precommit, pre-push/prepush, post-merge/postmerge and all that stuff...)",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -36,3 +36,3 @@ var fs = require('fs')

}
// Assuming that this file is in node_modules/husky/src

@@ -43,3 +43,3 @@ var packageDir = path.join(__dirname, '..', '..', '..')

var projectDir = path.join(dir, '..', '..')
// In order to support projects with package.json in a different directory

@@ -51,6 +51,7 @@ // than .git, find relative path from project directory to package.json

'cd ' + relativePath + '\n'
+ 'npm run --json | grep -q \'"' + cmd + '":\'\n' // fix for issue #16
+ 'if [ $? -ne 0 ]; then\n'
+ ' exit 0\n' // package.scripts[name] can't be found exit
+ 'fi\n'
// Fix for issue #16 #24
// Test if script is defined in package.json
+ '[ -f package.json ] && cat package.json | grep -q \'"' + cmd + '"\\s*:\'\n'
// package.json or script can't be found exit
+ '[ $? -ne 0 ] && exit 0\n'
+ 'npm run ' + cmd + ' --silent\n'

@@ -57,0 +58,0 @@ + 'if [ $? -ne 0 ]; then\n'

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc