Skip to content

lib: support globs on --watch-path #59345

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

louiellan
Copy link

Closes #45182

Allows passing of globs in the --watch-path cli option

I have seen many things to consider here as well:

  • Could be better to have directory watcher (only on Windows and macOS) instead of individual file watchers if all files under a directory are watched like when we're passing --watch-path='**/*'
  • Might support Linux platform now as well, but have to clarify that in the documentation that it doesn't support directory watching (I tested this branch on Ubuntu)
  • With all these things, it might break the stability of the --watch-path (but I could be wrong)

Would be happy working on this (cause i need it as well), and if anyone also had been working with this already, I'll step aside or offer some help.

@nodejs-github-bot nodejs-github-bot added fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. labels Aug 4, 2025
Copy link

codecov bot commented Aug 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.37%. Comparing base (55b7d28) to head (46be19d).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #59345      +/-   ##
==========================================
- Coverage   89.97%   89.37%   -0.60%     
==========================================
  Files         649      654       +5     
  Lines      192189   192555     +366     
  Branches    37679    37432     -247     
==========================================
- Hits       172915   172101     -814     
- Misses      11864    12984    +1120     
- Partials     7410     7470      +60     
Files with missing lines Coverage Δ
lib/internal/fs/glob.js 90.72% <100.00%> (-1.27%) ⬇️

... and 99 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@louiellan louiellan force-pushed the glob-on-watch-path branch from 0c53c42 to 46be19d Compare August 5, 2025 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support file globs with --watch-path
3 participants