Skip to content

fs: fix recursive watch error handling - #65635

Open
panva wants to merge 1 commit into
nodejs:mainfrom
panva:fs-recursive-watch-errors
Open

fs: fix recursive watch error handling#65635
panva wants to merge 1 commit into
nodejs:mainfrom
panva:fs-recursive-watch-errors

Conversation

@panva

@panva panva commented Aug 29, 2026

Copy link
Copy Markdown
Member

Recursive watch inverted the throwIfNoEntry check during setup, causing the default behavior to suppress ENOENT while the opt-out threw it. Other setup errors were also silently ignored.

Suppress only ENOENT when throwIfNoEntry is false. Propagate all other setup failures and close watchers created before a partial failure.

@nodejs-github-bot nodejs-github-bot added fs Issues and PRs related to file-system APIs and the fs module. needs-ci PRs that need a full CI run. labels Aug 29, 2026
@panva

panva commented Aug 29, 2026

Copy link
Copy Markdown
Member Author

cc @nodejs/fs

Recursive watch inverted the throwIfNoEntry check during setup, causing
the default behavior to suppress ENOENT while the opt-out threw it.
Other setup errors were also silently ignored.

Suppress only ENOENT when throwIfNoEntry is false. Propagate all
other setup failures and close watchers created before a partial
failure.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
@panva
panva force-pushed the fs-recursive-watch-errors branch from 7047f05 to e998475 Compare August 29, 2026 07:55
@codecov

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.06%. Comparing base (2f469df) to head (e998475).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65635      +/-   ##
==========================================
+ Coverage   90.04%   90.06%   +0.01%     
==========================================
  Files         754      754              
  Lines      255722   255723       +1     
  Branches    48312    48314       +2     
==========================================
+ Hits       230274   230315      +41     
+ Misses      16553    16548       -5     
+ Partials     8895     8860      -35     
Files with missing lines Coverage Δ
lib/internal/fs/recursive_watch.js 91.27% <100.00%> (+4.06%) ⬆️

... and 30 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@panva panva added author ready PRs with CI started, the required approvals, and no outstanding review comments. request-ci Add this label to start a Jenkins CI on a PR. labels Aug 29, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 29, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. fs Issues and PRs related to file-system APIs and the fs module. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants