Skip to content

fs: extend signal option to lstat, fstat and promises API - #63143

Open
mertcanaltin wants to merge 10 commits into
nodejs:mainfrom
mertcanaltin:mert/fs-stat-parity
Open

fs: extend signal option to lstat, fstat and promises API#63143
mertcanaltin wants to merge 10 commits into
nodejs:mainfrom
mertcanaltin:mert/fs-stat-parity

Conversation

@mertcanaltin

Copy link
Copy Markdown
Member

Stacked on top of #63142. Adds AbortSignal support to fs.lstat, fs.fstat, fsPromises.stat, fsPromises.lstat, fsPromises.fstat and filehandle.stat to match fs.stat. Addresses @LiviaMedeiros's parity request from #57775.

Will rebase once #63142 lands.

Refs: #57775

@nodejs-github-botnodejs-github-bot added fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. labels May 6, 2026
Signed-off-by: Mert Can Altin <mertgold60@gmail.com>
Signed-off-by: Mert Can Altin <mertgold60@gmail.com>
@codecov

codecovBot commented May 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.50562% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.34%. Comparing base (1fd4949) to head (b5c6e56).
⚠️ Report is 200 commits behind head on main.

Files with missing linesPatch %Lines
lib/internal/fs/promises.js92.00%4 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #63143 +/- ##
==========================================
+ Coverage 90.03% 90.34% +0.30% 
==========================================
Files 713 730 +17 Lines 224699 234433 +9734 Branches 42473 43960 +1487 ==========================================
+ Hits 202310 211798 +9488 - Misses 14179 14387 +208 - Partials 8210 8248 +38 
Files with missing linesCoverage Δ
lib/fs.js98.21% <100.00%> (+0.01%)⬆️
lib/internal/fs/promises.js93.00% <92.00%> (+0.05%)⬆️

... and 167 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.

Comment threaddoc/api/fs.md Outdated
Comment threaddoc/api/fs.md Outdated
Comment threaddoc/api/fs.md Outdated
Comment threaddoc/api/fs.md Outdated
Comment threadlib/internal/fs/promises.js
Comment threadlib/internal/fs/promises.js
Comment threadlib/internal/fs/promises.js
Comment threadlib/internal/fs/promises.js
mertcanaltinand others added 6 commits May 24, 2026 11:28
Co-authored-by: Chemi Atlow <chemi@atlow.co.il>
Co-authored-by: Chemi Atlow <chemi@atlow.co.il>
Co-authored-by: Chemi Atlow <chemi@atlow.co.il>
Co-authored-by: Chemi Atlow <chemi@atlow.co.il>
Co-authored-by: Chemi Atlow <chemi@atlow.co.il>
Add validateObject before reading options.signal in the promises
stat, lstat and fstat, matching the rest of the module. Import the
PromiseWithResolvers primordial and drop the now-unused
kResistStopPropagation left over from the raceWithSignal rewrite.
Comment threadlib/internal/fs/promises.js Outdated
mertcanaltinand others added 2 commits May 25, 2026 18:19
@mertcanaltin
mertcanaltin requested a review from jasnellMay 25, 2026 15:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fsIssues and PRs related to the fs subsystem / file system.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@mertcanaltin@jasnell@atlowChemi@nodejs-github-bot