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 5.0.8 to 5.0.9

9

lib/commands/install.js

@@ -11,2 +11,6 @@ "use strict";

function install(dir = '.husky') {
if (child_process_1.default.spawnSync('git', ['rev-parse']).status !== 0) {
console.log('husky - not a Git repository, skipping hooks installation');
return;
}
const absoluteHooksDir = path_1.default.resolve(process.cwd(), dir);

@@ -23,3 +27,6 @@ if (!absoluteHooksDir.startsWith(process.cwd())) {

fs_1.default.copyFileSync(path_1.default.join(__dirname, '../../scripts/husky.sh'), path_1.default.join(dir, '_/husky.sh'));
child_process_1.default.spawnSync('git', ['config', 'core.hooksPath', dir]);
const { error } = child_process_1.default.spawnSync('git', ['config', 'core.hooksPath', dir]);
if (error) {
throw error;
}
}

@@ -26,0 +33,0 @@ catch (e) {

4

package.json
{
"name": "husky",
"version": "5.0.8",
"version": "5.0.9",
"description": "Git hooks made easy",

@@ -47,3 +47,3 @@ "bin": "lib/bin.js",

"pretest": "npm run build --silent && npm pack --silent",
"test": "sh ./test/default.sh && sh ./test/sub-dir.sh && sh ./test/config-dir.sh",
"test": "sh ./test/default.sh && sh ./test/sub-dir.sh && sh ./test/config-dir.sh && sh ./test/not-git-dir.sh",
"posttest": "rm husky-*.tgz",

@@ -50,0 +50,0 @@ "commit": "commit"

@@ -7,10 +7,10 @@ # husky

Husky improves your commits and more 🐶*woof!*
Husky improves your commits and more 🐶 *woof!*
- [**Documentation v5 (recommended for Open Source and Sponsors)**](https://typicode.github.io/husky)
- [Documentation v4 (current latest)](https://github.com/typicode/husky/tree/master)
- [Documentation v4](https://github.com/typicode/husky/tree/master)
**Jan 23, 2021** - 👋 Read husky 5 announcement and see what's new:
__👋 Read husky 5 announcement and see what's new:__
https://blog.typicode.com/husky-5
https://dev.to/typicode/what-s-new-in-husky-5-32g5

@@ -17,0 +17,0 @@ ---

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