Socket
Socket
Sign inDemoInstall

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.6.2 to 0.7.0

2

package.json
{
"name": "husky",
"version": "0.6.2",
"version": "0.7.0",
"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",

@@ -1,2 +0,2 @@

# husky [![Build Status](https://travis-ci.org/typicode/husky.svg?branch=master)](https://travis-ci.org/typicode/husky) [![](http://img.shields.io/npm/dm/husky.svg)](https://www.npmjs.org/package/husky)
# husky [![Build Status](https://travis-ci.org/typicode/husky.svg?branch=master)](https://travis-ci.org/typicode/husky) [![](http://img.shields.io/npm/dm/husky.svg?style=flat)](https://www.npmjs.org/package/husky)

@@ -3,0 +3,0 @@ > husky prevents bad commit or push using Git hooks.

@@ -1,2 +0,3 @@

var fs = require('fs')
var fs = require('fs')
var path = require('path')
var exec = require('child_process').exec

@@ -35,5 +36,16 @@

}
// Assuming that this file is in node_modules/husky/src
var packageDir = path.join(__dirname, '..', '..', '..')
// dir being .git/hooks
var projectDir = path.join(dir, '..', '..')
// In order to support projects with package.json in a different directory
// than .git, find relative path from project directory to package.json
var relativePath = path.join('.', path.relative(projectDir, packageDir))
data +=
'npm run --json | grep -q \'"' + cmd + '":\'\n' // fix for issue #16
'cd ' + relativePath + '\n'
+ 'npm run --json | grep -q \'"' + cmd + '":\'\n' // fix for issue #16
+ 'if [ $? -ne 0 ]; then\n'

@@ -40,0 +52,0 @@ + ' exit 0\n' // package.scripts[name] can't be found exit

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