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
Defer events during initial scan, track full event sequences, and harden watcher shutdown
- Defer fs.watch events that arrive during the initial directory scan and process them after the scan completes to avoid race conditions where watchedFiles isn't populated.
- Debounce now tracks the full sequence of events per file (rename/change) instead of collapsing to the last event, preventing intermediate events from being lost.
- Detect delete+recreate via inode changes and emit unlink then add when appropriate; handle rapid create+delete sequences by emitting both events.
- During stop(), cancel pending debounced emits before flipping _isWatching and make handleFsEvent return early when watcher is stopped to prevent orphaned timeouts and post-stop emits.
- Add verbose logging of event sequences to aid debugging of complex fs event scenarios.
- Update tests to expect unlink + add for inode replacement scenarios.
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.
Improve Node watcher robustness: inode tracking, ENOSPC detection, enhanced health checks and temp-file handling
- Track directory inodes (watchedInodes) and restart watchers if inode changes are detected (addresses stale watchers when directories are replaced).
- Health check now validates inode stability and explicitly detects ENOSPC (inotify max_user_watches) errors, emitting errors and logging a recommended fix command.
- Detect ENOSPC in FSWatcher error events and log guidance to increase inotify limits.
- Clear inode tracking state on watcher stop to avoid stale state across restarts.
- Improve temporary file handling and logging to avoid dropping events for atomic writes (only skip pure temp files and log skipped temp events).
- Documentation (readme.hints.md) updated with robustness notes, known fs.watch limitations, and example logs.
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.
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.
- Package name changed from @push.rocks/smartchok to @push.rocks/smartwatch in package.json
- Repository, homepage and issue URLs updated to point to the new smartwatch repository
- Author changed to Task Venture Capital GmbH in package metadata
- README updated: install commands, import examples and references now use @push.rocks/smartwatch
- Documentation text and branding updated throughout README (project name, internal references)
Update README: refine description and clarify trademark/legal information
- Refined project description and tagline for clarity and brevity (adds lightweight wording and an emoji).
- Updated Trademark section to explicitly mention third-party trademarks, add guidance about usage and approval, and clarify that trademarks are not covered by the MIT license.
- Minor legal/company wording and formatting fixes (e.g. 'District Court' capitalization and contact sentence tweaks).
- General README wording and formatting improvements for clearer instructions and feature descriptions.
Replace chokidar with native platform watchers and add cross-runtime support (Node.js, Deno, Bun); introduce write stabilization and internal glob matching
Migrate to chokidar 5.x, add picomatch filtering and update test/dev dependencies
- Upgrade runtime dependencies: chokidar -> ^5.0.0 and picomatch -> ^4.0.3; bumped related @push.rocks packages versions.
- Upgrade devDependencies: @git.zone/tsbuild, @git.zone/tsrun and @git.zone/tstest to newer v2/v3 releases; updated @types/node.
- Updated README and readme.hints to document migration to chokidar 5.x and dev dependency changes.
- Tests updated to use @git.zone/tstest/tapbundle (import change) and test runner start changed to export default tap.start().
- Smartchok implementation updated to extract glob base paths, watch base directories and filter events via picomatch matchers (shouldWatchPath + event filtering).
- Note: ts/00_commitinfo_data.ts still references chokidar 4.x in the description and should be updated to reflect the migration.