Skip to content

Conversation

@jordikroon
Copy link

Resolve #2095

Add exclusion pattern support to allow users to exclude specific paths from triggering reloads. Patterns prefixed with '!' are now parsed as exclusions and stored separately. The globalWatcher checks if events match any exclusion patterns before processing them, preventing excluded paths from triggering reloads while still allowing them to be matched for filtering purposes.

  • Add isExclude field to track exclusion patterns
  • Parse '!' prefix during pattern initialization
  • Rename allowReload to matchesEvent for clarity on matching logic
  • Extract exclusion check into separate allowReload wrapper
  • Add isExcludedEvent method to globalWatcher for event filtering
  • Filter excluded events before debouncing in event listener

Add exclusion pattern support to allow users to exclude specific paths from
triggering reloads. Patterns prefixed with '!' are now parsed as exclusions and
stored separately. The globalWatcher checks if events match any exclusion
patterns before processing them, preventing excluded paths from triggering
reloads while still allowing them to be matched for filtering purposes.

- Add isExclude field to track exclusion patterns
- Parse '!' prefix during pattern initialization
- Rename allowReload to matchesEvent for clarity on matching logic
- Extract exclusion check into separate allowReload wrapper
- Add isExcludedEvent method to globalWatcher for event filtering
- Filter excluded events before debouncing in event listener
Add test case for worker watch configuration with exclude patterns.
Verifies that exclude patterns (prefixed with !) are correctly parsed
and stored alongside include patterns in the watch configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exclude directory from watching

1 participant