fix(watcher.node): Improve handling of temporary files from atomic editor writes in Node watcher

This commit is contained in:
2025-12-11 09:07:57 +00:00
parent ef2388b16f
commit 90275a0f1c
3 changed files with 57 additions and 8 deletions

View File

@@ -1,5 +1,13 @@
# Changelog
## 2025-12-11 - 6.2.3 - fix(watcher.node)
Improve handling of temporary files from atomic editor writes in Node watcher
- Detect temporary files produced by atomic editor saves and attempt to map them to the real target file instead of silently skipping the event
- Add getTempFileTarget() to extract the real file path from temp filenames (supports patterns like file.ts.tmp.PID.TIMESTAMP and generic .tmp.*)
- When a temp-file event is seen, queue a corresponding event for the resolved real file after a short delay (50ms) to allow rename/replace to complete
- Add logging around temp file detection and real-file checks to aid debugging
## 2025-12-11 - 6.2.2 - fix(watcher.node)
Defer events during initial scan, track full event sequences, and harden watcher shutdown