feat(watchers): Improve Node watcher robustness: file-level inode tracking, abortable restarts, restart race guards, and untracked-file handling

This commit is contained in:
2025-12-10 14:18:40 +00:00
parent 8677f61da1
commit 5dda689b4c
4 changed files with 168 additions and 44 deletions

View File

@@ -1,5 +1,15 @@
# Changelog
## 2025-12-10 - 6.2.0 - feat(watchers)
Improve Node watcher robustness: file-level inode tracking, abortable restarts, restart race guards, and untracked-file handling
- Add file-level inode tracking to detect delete+recreate (editor atomic saves) and emit correct 'change'/'add' events
- Make restart delays abortable via AbortController so stop() cancels pending restarts and prevents orphan watchers
- Guard against concurrent/dual restarts with restartingPaths to avoid race conditions between health checks and error handlers
- Emit 'unlink' for deletions of previously untracked files (files created after initial scan) and clean up inode state
- Track file inodes during initial scan and update/cleanup inode state on events
- Improve logging for restart/inode/delete+recreate scenarios and update documentation/readme hints to v6.2.0+
## 2025-12-08 - 6.1.1 - fix(watchers/watcher.node)
Improve Node watcher robustness: inode tracking, ENOSPC detection, enhanced health checks and temp-file handling