Skip to content

Commit

Permalink
add .cjs suport
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrevda committed Sep 2, 2020
1 parent e5531f1 commit 2973b74
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 32 deletions.
48 changes: 19 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -52,7 +52,7 @@
"chalk": "^4.0.0",
"ci-info": "^2.0.0",
"compare-versions": "^3.6.0",
"cosmiconfig": "^6.0.0",
"cosmiconfig": "^7.0.0",
"find-versions": "^3.2.0",
"opencollective-postinstall": "^2.0.2",
"pkg-dir": "^4.2.0",
Expand Down
2 changes: 1 addition & 1 deletion sh/husky.sh
Expand Up @@ -58,7 +58,7 @@ debug "Current working directory is $(pwd)"
# Don't skip if .huskyrc.js or .huskyrc.config.js are used as the heuristic could
# fail due to the dynamic aspect of JS. For example:
# `"pre-" + "commit"` or `require('./config/hooks')`)
if [ ! -f .huskyrc.js ] && [ ! -f husky.config.js ] && ! hookIsDefined; then
if [ ! -f .huskyrc.js ] && [ ! -f huskyrc.cjs ] && [ ! -f husky.config.js ] && [ ! -f husky.config.cjs ] && ! hookIsDefined; then
debug "$hookName config not found, skipping hook"
exit 0
fi
Expand Down
2 changes: 1 addition & 1 deletion src/installer/__tests__/__snapshots__/scripts.ts.snap
Expand Up @@ -87,7 +87,7 @@ debug \\"Current working directory is $(pwd)\\"
# Don't skip if .huskyrc.js or .huskyrc.config.js are used as the heuristic could
# fail due to the dynamic aspect of JS. For example:
# \`\\"pre-\\" + \\"commit\\"\` or \`require('./config/hooks')\`)
if [ ! -f .huskyrc.js ] && [ ! -f husky.config.js ] && ! hookIsDefined; then
if [ ! -f .huskyrc.js ] && [ ! -f huskyrc.cjs ] && [ ! -f husky.config.js ] && [ ! -f husky.config.cjs ] && ! hookIsDefined; then
debug \\"$hookName config not found, skipping hook\\"
exit 0
fi
Expand Down

0 comments on commit 2973b74

Please sign in to comment.