Skip to content

0.7.1 - Limit wait time for file operations#18

Merged
shawnrushefsky merged 3 commits into
mainfrom
limit-debounce-loops
Nov 7, 2025
Merged

0.7.1 - Limit wait time for file operations#18
shawnrushefsky merged 3 commits into
mainfrom
limit-debounce-loops

Conversation

@shawnrushefsky
Copy link
Copy Markdown
Contributor

  • It was previously possible to get stuck in infinite debounce loops. It still is, but only if you explicitly set FILE_WATCHER_MAX_WAIT_MS to 0, or a negative number. Positive values set the maximum amount of time between releasing events.
  • This number also applies when waiting for writes to complete, which happens by polling every FILE_WATCHER_STABILITY_CHECK_MS ms.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a configurable maximum wait time for file watcher operations and bumps the version from 0.7.0 to 0.7.1. The new FILE_WATCHER_MAX_WAIT_MS environment variable (default: 5000ms) ensures that file stability checks and debounced operations will eventually execute even when continuously triggered, preventing indefinite delays.

Key changes:

  • Added FILE_WATCHER_MAX_WAIT_MS environment variable to control maximum wait time for file operations
  • Enhanced debounceByArg function to track first call times and enforce a maximum wait period
  • Updated waitForFileStability to respect the maximum wait timeout

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/files.ts Implements maxWait logic in both the debouncing mechanism and file stability checking
readme.md Documents the new FILE_WATCHER_MAX_WAIT_MS environment variable
package.json Version bump to 0.7.1
package-lock.json Lockfile version update to 0.7.1

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/files.ts Outdated
Comment thread src/files.ts Outdated
thanks copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 7, 2025

🚀 Download the latest release candidate 🚀

@SaladTechnologies SaladTechnologies deleted a comment from github-actions Bot Nov 7, 2025
@shawnrushefsky shawnrushefsky merged commit b9570c4 into main Nov 7, 2025
1 check passed
@shawnrushefsky shawnrushefsky deleted the limit-debounce-loops branch November 7, 2025 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants