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
Drop support for checking object with path
property in function returns by isGitIgnored
#208
Conversation
I found other bugs... |
@@ -34,7 +34,7 @@ const checkCwdOption = options => { | |||
} | |||
}; | |||
|
|||
const getPathString = p => p.stats instanceof fs.Stats ? p.path : p; | |||
const getPathString = fastGlobResult => fastGlobResult.path || fastGlobResult; |
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.
This function mean to handle fastGlobResult, but p.stats
is not always true, see objectMode
option in fast-glob
@@ -152,7 +152,7 @@ export const globby = async (patterns, options = {}) => { | |||
const [filter, tasks] = await Promise.all([getFilter(options), getTasks()]); | |||
const paths = await Promise.all(tasks.map(task => fastGlob(task.pattern, task.options))); | |||
|
|||
return arrayUnion(...paths).filter(path_ => !filter(getPathString(path_))); |
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.
filter
already handles objectMode
result, not needed here, globbySync
and globbyStream
also not doing this.
This one is ready, but I saw another bug here, the |
Thanks for catching these bugs. I really appreciate it. |
Ref: #207 (comment)
This behavior is never documented.