-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix: Updating spec watcher to detect directory events #20962
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
9f9d51d
fix: Updating specWatcher to listen to directory events
tbiethman e065d97
Adding e2e tests for spec file system changes
tbiethman e15c813
Adding some comments
tbiethman 3355ef8
This guy isn't necessary anymore
tbiethman 720814f
Merge branch '10.0-release' into tbiethman/UNIFY-1221-spec-watcher
tbiethman 8ea202a
Checking for spec differences before emitting events. Updating deboun…
tbiethman a807cb2
Adding a few new unit tests to cover config/handler permutations
tbiethman 58685c9
Merge branch '10.0-release' into tbiethman/UNIFY-1221-spec-watcher
tbiethman 22a813d
Merge branch '10.0-release' into tbiethman/UNIFY-1221-spec-watcher
emilyrohrbough 105a644
Merge branch '10.0-release' into tbiethman/UNIFY-1221-spec-watcher
tbiethman b6d8983
Merge branch '10.0-release' into tbiethman/UNIFY-1221-spec-watcher
tgriesser f28308e
Merge branch '10.0-release' into tbiethman/UNIFY-1221-spec-watcher
tgriesser File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In 9.x we had integration/component folders defined in config to better scope what we're watching, but no longer. I still worry that this may be too broad/expensive, but debouncing the handler will limit the amount of thrash that can result. We could add more explicit ignored dirs (node_modules)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So are we saying that providing the
specPattern
here definitely does not work properly?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my testing, yes, it does not work correctly when files are introduced with or removed alongside parent directories. No 'add'/'unlink' events for those files get emitted in that case. This could very well be a bug within chokidar, I need to dig into its implementation more fully to figure out why it's behaving this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, it looks like chokidar v4 is dropping globbing entirely: paulmillr/chokidar#1195, so this might be the best approach, to watch the directory and handle matching on our side.