New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove ignore
option for isGitIgnored
and isGitIgnoredSync
#225
Conversation
ignore
option for isGitIgnored
ignore
option for isGitIgnored
and isGitIgnoredSync
a5113f3
to
bad86bb
Compare
'**/flow-typed/**', | ||
'**/coverage/**', | ||
'**/.git', | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, you are right, misunderstood.
'**/node_modules', | ||
'**/flow-typed', | ||
'**/coverage', | ||
'**/.git', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Answering this question #224 (comment)
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)