Skip to content

Bugfix: Issue #97 - Ignore add/change messages from Chokidar on files that don't match the pattern. #301

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

samuelneff
Copy link

tl;dr

  • Works around a bug in a dependency
  • No change in behavior other than fixing the bug
  • No change in API or documentation or examples

Chokidar has a bug where it does not filter paths by the provided pattern if they are inside a symlink. The bug is two years old.

This PR rechecks the file path against the pattern if we're watching to work around the Chokidar bug.

It adds a dependency on minimatch but that dependency already existed via a transient dependency (actually several versions are referenced currently due to already existing incorrect transient dependencies on glob in some reporters).

Chokidar issue:

paulmillr/chokidar#967

When that's fixed this PR can be reverted, but the issue is 2 years old already (reported 2020).

@samuelneff
Copy link
Author

samuelneff commented Feb 14, 2024

Update: I am submitting a PR to Chokidar for the underlying issue. If that gets merged then this PR can be replaced with a dependency update instead. That'd be better.

paulmillr/chokidar#1307

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant