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.1.1 to 5.1.2

8

lib/commands/add.js

@@ -20,3 +20,9 @@ "use strict";

}
const data = ['#!/bin/sh', '. "$(dirname "$0")/_/husky.sh"', '', cmd, ''].join('\n');
const data = [
'#!/bin/sh',
'. "$(dirname "$0")/_/husky.sh"',
'',
cmd,
'',
].join('\n');
fs_1.default.writeFileSync(file, data, 'utf-8');

@@ -23,0 +29,0 @@ console.log(`husky - created ${dir}${path_1.default.sep}${path_1.default.basename(file)}`);

9

lib/commands/init.js

@@ -16,13 +16,8 @@ "use strict";

pkg.scripts || (pkg.scripts = {});
pkg.scripts.postinstall = 'husky install';
pkg.scripts.prepare = 'husky install';
const indent = (_a = regex.exec(str)) === null || _a === void 0 ? void 0 : _a[0];
fs_1.default.writeFileSync('package.json', JSON.stringify(pkg, null, indent));
fs_1.default.writeFileSync('package.json', `${JSON.stringify(pkg, null, indent)}\n`);
install_1.install();
add_1.add('.husky/pre-commit', 'npm test');
if (pkg.private !== true) {
console.log(`⚠ if you're publishing your package to npm, you need to disable postinstall script using pinst.
see https://typicode.github.io/husky/#/?id=install
`);
}
}
exports.init = init;
{
"name": "husky",
"version": "5.1.1",
"version": "5.1.2",
"description": "Git hooks made easy",

@@ -39,3 +39,3 @@ "bin": {

"lint": "eslint . --ext .js,.ts --ignore-path .gitignore",
"_postinstall": "npm run build && node lib/bin install",
"prepare": "npm run build && node lib/bin install",
"preuninstall": "node lib/bin uninstall",

@@ -42,0 +42,0 @@ "prepack": "pinst --disable",

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