Closed JounQin closed 3 years ago
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch simple-git-hooks@2.5.1 for the project I'm working on.
simple-git-hooks@2.5.1
Here is the diff that solved my problem:
diff --git a/node_modules/simple-git-hooks/simple-git-hooks.js b/node_modules/simple-git-hooks/simple-git-hooks.js index 772b9a0..44cccbc 100644 --- a/node_modules/simple-git-hooks/simple-git-hooks.js +++ b/node_modules/simple-git-hooks/simple-git-hooks.js @@ -131,7 +131,9 @@ function _getConfig(projectRootPath) { throw TypeError("Check project root path! Expected a string, but got " + typeof projectRootPath) } const sources = [ + () => _getConfigFromFile(projectRootPath, '.simple-git-hooks.cjs'), () => _getConfigFromFile(projectRootPath, '.simple-git-hooks.js'), + () => _getConfigFromFile(projectRootPath, 'simple-git-hooks.cjs'), () => _getConfigFromFile(projectRootPath, 'simple-git-hooks.js'), () => _getConfigFromFile(projectRootPath, '.simple-git-hooks.json'), () => _getConfigFromFile(projectRootPath, 'simple-git-hooks.json'),
This issue body was partially generated by patch-package.
Hi, thank you!
So, to add the support to .cjs I just need to add two lines in sources? Cool!
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
simple-git-hooks@2.5.1
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.