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.0 to 5.1.1

2

lib/commands/add.js

@@ -20,3 +20,3 @@ "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 +23,0 @@ console.log(`husky - created ${dir}${path_1.default.sep}${path_1.default.basename(file)}`);

@@ -10,7 +10,11 @@ "use strict";

const install_1 = require("./install");
const regex = /^[ ]+|\t+/m;
function init() {
const pkg = JSON.parse(fs_1.default.readFileSync('package.json', 'utf-8'));
if (pkg.scripts !== undefined) {
pkg.scripts.postinstall = 'husky install';
}
var _a;
const str = fs_1.default.readFileSync('package.json', 'utf-8');
const pkg = JSON.parse(str);
pkg.scripts || (pkg.scripts = {});
pkg.scripts.postinstall = '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));
install_1.install();

@@ -17,0 +21,0 @@ add_1.add('.husky/pre-commit', 'npm test');

@@ -24,3 +24,3 @@ "use strict";

fs_1.default.mkdirSync(path_1.default.join(dir, '_'), { recursive: true });
fs_1.default.writeFileSync(path_1.default.join(dir, '.gitignore'), '_', 'utf-8');
fs_1.default.writeFileSync(path_1.default.join(dir, '.gitignore'), '_\n', 'utf-8');
fs_1.default.copyFileSync(path_1.default.join(__dirname, '../../scripts/husky.sh'), path_1.default.join(dir, '_/husky.sh'));

@@ -27,0 +27,0 @@ const { error } = child_process_1.default.spawnSync('git', ['config', 'core.hooksPath', dir]);

{
"name": "husky",
"version": "5.1.0",
"version": "5.1.1",
"description": "Git hooks made easy",

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

"preversion": "npm run build",
"postversion": "git push && git push --tags && npm publish --tag next",
"postversion": "git push && git push --tags && npm publish",
"prepublishOnly": "pinst --disable",

@@ -47,0 +47,0 @@ "postpublish": "pinst --enable",

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