Comparing version 9.1.1 to 9.1.2
12
index.js
@@ -6,3 +6,3 @@ import c from 'child_process' | ||
let l = [ 'pre-commit', 'prepare-commit-msg', 'commit-msg', 'post-commit', 'applypatch-msg', 'pre-applypatch', 'post-applypatch', 'pre-rebase', 'post-rewrite', 'post-checkout', 'post-merge', 'pre-push', 'pre-auto-gc' ], | ||
re = /^(#!\/usr\/bin\/env sh|\. "\$\(dirname -- "\$0"\)\/_\/husky\.sh")\r?\n/gm | ||
msg = `echo "husky - DEPRECATED\n\nPlease remove the following lines from your hook scripts:\n\n#!/usr/bin/env sh\n. \\"\\$(dirname -- \\"\\$0\\")/_/husky.sh\\"\n\nThey WILL FAIL in v10.0.0\n"` | ||
@@ -20,11 +20,2 @@ export default (d = '.husky') => { | ||
f.rmSync(_('husky.sh'), { force: true }) | ||
l.forEach(h => { | ||
let hp = p.join(d, h) | ||
if (!f.existsSync(hp)) return | ||
let prev = f.readFileSync(hp, 'utf8') | ||
let next = prev.replace(re, '') | ||
if (prev !== next) console.log(`husky - removed deprecated code from ${hp}`) | ||
f.writeFileSync(hp, next) | ||
}) | ||
f.mkdirSync(_(), { recursive: true }) | ||
@@ -34,3 +25,4 @@ w(_('.gitignore'), '*') | ||
l.forEach(h => w(_(h), `#!/usr/bin/env sh\n. "\$(dirname "\$0")/h"`, { mode: 0o755 })) | ||
w(_('husky.sh'), msg) | ||
return '' | ||
} |
{ | ||
"name": "husky", | ||
"version": "9.1.1", | ||
"version": "9.1.2", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "Modern native Git hooks", |
Sorry, the diff of this file is not supported yet
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
4017
40