Remove ignore option for isGitIgnored and isGitIgnoredSync#225
Remove ignore option for isGitIgnored and isGitIgnoredSync#225sindresorhus merged 2 commits intosindresorhus:mainfrom
ignore option for isGitIgnored and isGitIgnoredSync#225Conversation
ignore option for isGitIgnoredignore option for isGitIgnored and isGitIgnoredSync
a5113f3 to
bad86bb
Compare
| '**/flow-typed/**', | ||
| '**/coverage/**', | ||
| '**/.git', | ||
| ]; |
There was a problem hiding this comment.
While we're removing the ignore option for isGitIgnored, I think globby should still ignore these paths by default in the main globby methods.
There was a problem hiding this comment.
These were ONLY used when glob .gitignore file, changing globby() to ignore files in these directories is a new breaking change to the globby() function, it out scope of this PR.
And if we decide to ignore them by default, but how to unignore them?
There was a problem hiding this comment.
These were ONLY used when glob .gitignore file
Yes, that's what I'm talking about. Only for .gitignore files. It doesn't make sense to look for .gitignore files inside node_modules and doing so would create a big slowdown.
For reference, here's the original commit that added the ignores: ba08350
There was a problem hiding this comment.
Ah, you are right, misunderstood.
| '**/node_modules', | ||
| '**/flow-typed', | ||
| '**/coverage', | ||
| '**/.git', |
There was a problem hiding this comment.
As I tested, when use **/node_modules/ and **/node_modules/**/*, fast-glob will read those directories, but when use **/node_modules , fast-glob won't read them.
|
I still have one thing want to do before you can release, the |
|
I'm going to give up for this #225 (comment). I have tried, the logic became more complex, but didn't see much performance improvement, maybe because the file access is fast enough. Adding this logic also only benefit cases with multiple discontinuous negative patterns, it's not very common. |
|
Thanks for all the work you have been doing. I did a new release: https://github.com/sindresorhus/globby/releases/tag/v13.0.0 |
Ref #223 (comment)