-
-
Notifications
You must be signed in to change notification settings - Fork 160
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
feat(watch): --include
CLI flag to watch additional files
#625
feat(watch): --include
CLI flag to watch additional files
#625
Conversation
Co-authored-by: hiroki osame <hiroki.osame@gmail.com>
- Incorporate review feedback into 'watch: include' test - Fix final stdout check for 'watch: include' test - Add new 'watch: exclude' test to ensure a file can be excluded from watch
- There is no need to alias --ignore with --exclude, remove the new flag - Handle --include flag inside options object like the --ignore flag - Improve include test to also ensure glob pattern works
- Before checking for substrings in stdout, strip ANSI escape codes
- On Windows, mixed path separators are output by the watch utility. Normalize on / before searching for expected output. - Remove wait on debounce and separate file writes based on stdout output.
Fix error seen on Windows CI: String.prototype.replaceAll called with a non-global RegExp argument
Thanks for all the CI reruns @privatenumber (and also sorry you had to keep rerunning). I had some trouble installing node-gyp on Windows so my testing was limited to Debian. |
@privatenumber - is there anything else you need from me for this PR? |
Sorry, hard to prioritize tsx these days. But eventually I'll have to figure out funding first so it makes sense for me to invest more time on tsx, and then I plan to work on a bunch of watch improvements including this. |
I was debating between naming it |
--include
CLI flag--include
CLI flag to watch additional files
This issue is now resolved in v4.18.0. If you're able to, your sponsorship would be very much appreciated. |
This PR picks up from where #561 left off (it appears to have been abandoned), but there is actually very little of that PR remaining here. Notably, I didn't see it necessary to add
--exclude
which would only alias the--ignore
flag. Nonetheless, the chain of commits here reflects the original contribution.--include
that can be used to include additional file paths and glob patterns (same syntax as the--ignore
flag).--include
flag.Fixes #181