feat(watchers): Improve write stabilization and ignore temporary editor files

This commit is contained in:
2025-12-08 15:09:16 +00:00
parent 0dc4eaba52
commit 7a7ee041a3
8 changed files with 94 additions and 36 deletions

View File

@@ -1,5 +1,14 @@
# Changelog
## 2025-12-08 - 5.1.0 - feat(watchers)
Improve write stabilization and ignore temporary editor files
- Add maxWaitTime option (ms) to IWatcherOptions and WriteStabilizer to cap how long stabilization will wait (default: 1000ms).
- WriteStabilizer: reduce default stabilityThreshold from 300ms to 100ms and track write start time to enforce maxWaitTime and avoid indefinite polling.
- Node and Deno watchers: detect and ignore common temporary/editor files (e.g. *.tmp.*, *.swp, *.swx, trailing ~, .#*) to prevent spurious events from atomic saves.
- Node watcher: treat rename (atomic-save) events as already-complete files and emit add/change immediately without stabilization.
- Deno watcher: use the configured maxWaitTime and polling-based stabilization for modify events to ensure consistent behavior across runtimes.
## 2025-11-30 - 5.0.0 - BREAKING CHANGE(@push.rocks/smartwatch)
Rename package and update branding/docs: switch from @push.rocks/smartchok to @push.rocks/smartwatch, update repository/homepage/bugs URLs and author, and refresh README examples and install instructions.