Comparing version 5.1.1 to 5.1.2
@@ -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)}`); |
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
177
25540