Skip to content
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

fix: Only traverse directories that can match the glob base #131

Merged
merged 5 commits into from
Apr 7, 2024

Conversation

phated
Copy link
Member

@phated phated commented Apr 7, 2024

This PR changes the walking logic to take into account the base of each glob instead of walking only the cwd. This allows globs that use an absolute path outside of the cwd or move gulpfiles into different directories (which causes the process.cwd() to be changed). We also need to only check the existence of a file against a singular glob. Both of these changes drastically speed up many cases of globbing.

Fixes #127
Fixes #129
Fixes #130

I still need to look into #128 because the issue isn't clear on what paths don't work, as the only error seems to indicate an absolute path outside of the cwd.

@phated phated requested a review from yocontra April 7, 2024 22:53
@phated phated merged commit 8e74e21 into master Apr 7, 2024
15 checks passed
@phated phated deleted the phated/traverse-glob-parents branch April 7, 2024 23:11
fluffynuts added a commit to fluffynuts/gulp-streamify that referenced this pull request Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant