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
unwatched file still trigger "all" event when modified #258
Comments
Thanks for reporting. Can you please provide a script or procedure to reproduce using only chokidar? The example.js script in the repo is usually a good starting point. |
For reference, here are the passing tests for Perhaps modifying one of them to act on individual files like in your scenario will expose the issue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is my scenario:
I watch 2 files A & B, I add them & execute a function on "all" event. If I unwatch B & modify this B file, I still have the watcher triggering "all" event, is this on purpose ? Looks like a bug.
To reproduce here is a branch: https://github.com/cssnext/cssnext/tree/watch-imported
Here is the part that add/unwtach appropriate files
https://github.com/cssnext/cssnext/blob/fbfaff5053180192e146cdde8d1986a39e0d3980/bin/cssnext.js#L107-L113
Here is the broken test https://github.com/cssnext/cssnext/blob/fbfaff5053180192e146cdde8d1986a39e0d3980/test/cli.js#L177-L189
I have also tried by hand. To reproduce:
watch-imported
, thennpm install
bin/cssnext.js --watch test/fixtures/cli.watch-import.css test/fixtures/cli.watch-import.actual.css
test/fixtures/cli.watch-import.css
with/**/ @import "cli.watch-import-import.css";
: you will see that the imported file has been addedtest/fixtures/cli.watch-import-import.css
(this is working as expected)test/fixtures/cli.watch-import.css
with/**/
: you will see that the file is _unwatch_edtest/fixtures/cli.watch-import-import.css
: you got a change triggered by the watcher (this is not what I expect)The text was updated successfully, but these errors were encountered: