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 4.0.7 to 4.0.8

9

lib/installer/getScript.js

@@ -81,5 +81,6 @@ "use strict";

if command_exists winpty && test -t 1; then
exec < /dev/tty
fi
case $hookName in
"pre-push"|"pre-receive"|"post-receive"|"post-rewrite")
export HUSKY_GIT_STDIN=\`cat\`;;
esac

@@ -90,3 +91,3 @@ case $packageManager in

"yarn") run_command yarn run --silent;;
"*") echo "Unknow package manager: $packageManager"; exit 0;;
"*") echo "Unknown package manager: $packageManager"; exit 0;;
esac

@@ -93,0 +94,0 @@ `;

@@ -8,3 +8,2 @@ "use strict";

const child_process_1 = require("child_process");
const get_stdin_1 = __importDefault(require("get-stdin"));
const getConf_1 = __importDefault(require("../getConf"));

@@ -58,3 +57,3 @@ const read_pkg_1 = require("../read-pkg");

*/
async function run([, , hookName = '', HUSKY_GIT_PARAMS], { cwd = process.cwd(), getStdinFn = get_stdin_1.default } = {}) {
async function run([, , hookName = '', HUSKY_GIT_PARAMS], { cwd = process.cwd() } = {}) {
const oldCommand = getOldCommand(cwd, hookName);

@@ -67,12 +66,2 @@ const command = getCommand(cwd, hookName);

}
// Read stdin and add HUSKY_GIT_STDIN
const hooksWithStdin = [
'pre-push',
'pre-receive',
'post-receive',
'post-rewrite'
];
if (hooksWithStdin.includes(hookName)) {
env.HUSKY_GIT_STDIN = await getStdinFn();
}
if (command) {

@@ -79,0 +68,0 @@ return runCommand(cwd, hookName, command, env);

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

@@ -55,3 +55,2 @@ "bin": {

"cosmiconfig": "^6.0.0",
"get-stdin": "^7.0.0",
"opencollective-postinstall": "^2.0.2",

@@ -58,0 +57,0 @@ "pkg-dir": "^4.2.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