Skip to content

Commit 6eb57f0

Browse files
authored
add .cjs suport (#754)
1 parent e5531f1 commit 6eb57f0

File tree

4 files changed

+22
-32
lines changed

4 files changed

+22
-32
lines changed

package-lock.json

Lines changed: 19 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"chalk": "^4.0.0",
5353
"ci-info": "^2.0.0",
5454
"compare-versions": "^3.6.0",
55-
"cosmiconfig": "^6.0.0",
55+
"cosmiconfig": "^7.0.0",
5656
"find-versions": "^3.2.0",
5757
"opencollective-postinstall": "^2.0.2",
5858
"pkg-dir": "^4.2.0",

sh/husky.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ debug "Current working directory is $(pwd)"
5858
# Don't skip if .huskyrc.js or .huskyrc.config.js are used as the heuristic could
5959
# fail due to the dynamic aspect of JS. For example:
6060
# `"pre-" + "commit"` or `require('./config/hooks')`)
61-
if [ ! -f .huskyrc.js ] && [ ! -f husky.config.js ] && ! hookIsDefined; then
61+
if [ ! -f .huskyrc.js ] && [ ! -f huskyrc.cjs ] && [ ! -f husky.config.js ] && [ ! -f husky.config.cjs ] && ! hookIsDefined; then
6262
debug "$hookName config not found, skipping hook"
6363
exit 0
6464
fi

src/installer/__tests__/__snapshots__/scripts.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ debug \\"Current working directory is $(pwd)\\"
8787
# Don't skip if .huskyrc.js or .huskyrc.config.js are used as the heuristic could
8888
# fail due to the dynamic aspect of JS. For example:
8989
# \`\\"pre-\\" + \\"commit\\"\` or \`require('./config/hooks')\`)
90-
if [ ! -f .huskyrc.js ] && [ ! -f husky.config.js ] && ! hookIsDefined; then
90+
if [ ! -f .huskyrc.js ] && [ ! -f huskyrc.cjs ] && [ ! -f husky.config.js ] && [ ! -f husky.config.cjs ] && ! hookIsDefined; then
9191
debug \\"$hookName config not found, skipping hook\\"
9292
exit 0
9393
fi

0 commit comments

Comments
 (0)