feat!: support ignored path filtering - #122
Merged
Merged
Conversation
This was referenced Sep 27, 2026
shulaoda
marked this pull request as ready for review
September 28, 2026 04:25
h-a-n-a
approved these changes
Sep 29, 2026
Member
|
I just checked the test cases. |
Merged
shulaoda
pushed a commit
that referenced
this pull request
Sep 29, 2026
## 🤖 New release * `rolldown-notify-types`: 2.0.2 -> 2.0.3 (✓ API compatible changes) * `rolldown-notify`: 10.5.1 -> 11.0.0 (✓ API compatible changes) * `rolldown-notify-debouncer-mini`: 0.8.10 -> 0.9.0 (✓ API compatible changes) * `rolldown-file-id`: 0.2.10 -> 0.2.11 (✓ API compatible changes) * `rolldown-notify-debouncer-full`: 0.7.11 -> 0.8.0 (✓ API compatible changes) <details><summary><i><b>Changelog</b></i></summary><p> ## `rolldown-notify-types` <blockquote> ## [2.0.3](rolldown-notify-types-v2.0.2...rolldown-notify-types-v2.0.3) - 2026-09-29 ### Other - update Cargo.toml dependencies </blockquote> ## `rolldown-notify` <blockquote> ## [11.0.0](rolldown-notify-v10.5.1...rolldown-notify-v11.0.0) - 2026-09-29 ### Added - [**breaking**] support ignored path filtering ([#122](#122)) </blockquote> ## `rolldown-notify-debouncer-mini` <blockquote> ## [0.9.0](rolldown-notify-debouncer-mini-v0.8.10...rolldown-notify-debouncer-mini-v0.9.0) - 2026-09-29 ### Added - [**breaking**] support ignored path filtering ([#122](#122)) </blockquote> ## `rolldown-file-id` <blockquote> ## [0.2.11](rolldown-file-id-v0.2.10...rolldown-file-id-v0.2.11) - 2026-09-29 ### Other - update Cargo.lock dependencies </blockquote> ## `rolldown-notify-debouncer-full` <blockquote> ## [0.8.0](rolldown-notify-debouncer-full-v0.7.11...rolldown-notify-debouncer-full-v0.8.0) - 2026-09-29 ### Added - [**breaking**] support ignored path filtering ([#122](#122)) </blockquote> </p></details> --- This PR was generated with [release-plz](https://github.com/release-plz/release-plz/). Co-authored-by: rolldown-guard[bot] <278280044+rolldown-guard[bot]@users.noreply.github.com>
Member
|
Can we have the following tests for each backends?
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a reworked version of #114.
Why
A watcher cannot skip paths. Watching a project also watches
node_modulesand.git, which costs many watch resources and reports events nobody needs. chokidar solves this withignored.Changes
Adds
Config::with_ignored(|path, kind| ...). An ignored path is treated as if it did not exist:watch()andunwatch()of it returnOk(())and do nothing.truefor every path below it.kindisDir,File, orUnknownwhen the watcher cannot tell (a missing path, every event on Windows).notify-debouncer-fullgives the filter to itsFileIdCacheand does not add an ignored path as a root.Breaking change
Config(and debouncer-mini'sConfig) no longer deriveCopy,PartialEq,EqandHash, because the filter is anArc<dyn Fn>.