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

🚀 Feature: watch-ignore **/node_modules, **/.git by default #5203

Open
3 tasks done
jedwards1211 opened this issue Aug 28, 2024 · 3 comments · May be fixed by #5204
Open
3 tasks done

🚀 Feature: watch-ignore **/node_modules, **/.git by default #5203

jedwards1211 opened this issue Aug 28, 2024 · 3 comments · May be fixed by #5204
Labels
status: in triage a maintainer should (re-)triage (review) this issue type: feature enhancement proposal

Comments

@jedwards1211
Copy link

jedwards1211 commented Aug 28, 2024

Feature Request Checklist

Overview

In monorepos and other projects that have node_modules and/or .git directories deeper than the root, mocha --watch watches the contents of these directories by default.

(You may say, but in a monorepo you're just running tests in the directory for each individual package, where its node_modules lives, right? But sometimes you want to run integration tests that combine multiple packages in the monorepo.)

This generally causes mocha --watch to take a long time to start up, with no clear indication why.

Suggested Solution

If we changed the default watch-ignore to ["**/node_modules", "**/.git"] it would automatically ignore all such directories

Alternatives

Of course we can override this in userland, but I think it would benefit everyone to just ignore all node_modules and .git directories by default.

Additional Info

No response

@jedwards1211 jedwards1211 added status: in triage a maintainer should (re-)triage (review) this issue type: feature enhancement proposal labels Aug 28, 2024
@JoshuaKGoldberg
Copy link
Member

This sounds very reasonable to me, you have my 👍 vote!

For reference, the documented default right now is [array] [default: ["node_modules",".git"]].

@jedwards1211 jedwards1211 linked a pull request Aug 29, 2024 that will close this issue
3 tasks
@jedwards1211
Copy link
Author

@JoshuaKGoldberg okay thanks! I made a PR: #5204

@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commented Aug 29, 2024

Oh, sorry, I was unclear - that's just one vote from me. We'll still need consensus from @mochajs/maintenance-crew. This is still in triage.

It also could be considered a breaking change, so it might be a while before we can land it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: in triage a maintainer should (re-)triage (review) this issue type: feature enhancement proposal
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants