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(fs): glob will traverse node_modules if asked to #2164

Merged
merged 1 commit into from
Feb 10, 2023

Conversation

boneskull
Copy link
Contributor

If the pattern passed to glob() contains node_modules, then node_modules will be traversed.

This is naive in that it does not care about the context of node_modules in the pattern; it could be a negation, or whatever (e.g., some passes !**/node_modules/**). However, minimatch should still do its thing, so hopefully this won't be too bad.

Closes #2151

If the `pattern` passed to `glob()` contains `node_modules`, then `node_modules` will be traversed.

This is _naive_ in that it does not care about the _context_ of `node_modules` in the pattern; it could be a negation, or whatever (e.g., some passes `!**/node_modules/**`).  However, `minimatch` should still do its thing, so hopefully this won't be too bad.
Copy link

@Dayday10 Dayday10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's take another look?

@boneskull
Copy link
Contributor Author

@Dayday10 I don't see any suggested changes..? weird.

Copy link
Collaborator

@Gerrit0 Gerrit0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it, thanks for adding tests! I'll look at getting this merged & released this weekend.

@Gerrit0 Gerrit0 merged commit 2953f9c into TypeStrong:master Feb 10, 2023
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Feb 10, 2023

Thanks! Should get released today.

@boneskull boneskull deleted the boneskull/issue2151 branch February 10, 2023 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

glob implementation should not ignore node_modules
3 participants