fix(watcher.node): Handle fs.watch close without spurious restarts; add tests and improve test runner

This commit is contained in:
2025-12-10 16:52:06 +00:00
parent 2f55f628f5
commit 4894253e48
9 changed files with 442 additions and 54 deletions

View File

@@ -1,5 +1,13 @@
# Changelog
## 2025-12-10 - 6.2.1 - fix(watcher.node)
Handle fs.watch close without spurious restarts; add tests and improve test runner
- Prevent spurious restarts and noisy warnings on fs.watch 'close' by checking the internal isWatching flag before logging and restarting (ts/watchers/watcher.node.ts).
- Add comprehensive test suites covering basic operations, inode-change detection, atomic writes and stress scenarios (test/test.basic.ts, test/test.inode.ts, test/test.stress.ts).
- Remove outdated test (test/test.ts) and delete the test asset test/assets/hi.txt.
- Update test script in package.json to enable verbose logging, write a logfile and increase timeout to 120s to reduce flakiness in test runs.
## 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