Skip to content

vfs: dispatch fs/promises to mounted VFS instances - #63537

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
mcollina:vfs-mount-integration
May 29, 2026
Merged

nodejs-github-bot merged 1 commit into
nodejs:mainfrom
mcollina:vfs-mount-integration

Conversation

@mcollina

@mcollina mcollina commented May 24, 2026 •

Copy link
Copy Markdown
Member
  • Add mount/unmount on VirtualFileSystem plus a handler registry consulted by lib/fs.js, lib/internal/fs/promises.js, and lib/internal/fs/dir.js via vfsState.handlers.
  • Route absolute paths to the VFS that owns them, so the public fs.* and fs/promises APIs (sync, callback, promise, streams, fs.watch, opendir) dispatch to the mounted provider and fall through to the real filesystem otherwise.

Ref: #63115

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels May 24, 2026
@codecov

codecov Bot commented May 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.70440% with 116 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.33%. Comparing base (74ccf38) to head (1a72c52).
⚠️ Report is 71 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/vfs/setup.js 86.68% 87 Missing and 1 partial ⚠️
lib/internal/fs/promises.js 93.29% 10 Missing and 1 partial ⚠️
lib/internal/vfs/file_system.js 93.93% 8 Missing ⚠️
lib/fs.js 99.26% 4 Missing ⚠️
lib/internal/fs/dir.js 80.95% 4 Missing ⚠️
lib/internal/vfs/router.js 97.82% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             main   #63537     +/-   ##
=========================================
  Coverage   90.32%   90.33%             
=========================================
  Files         730      732      +2     
  Lines      234209   236357   +2148     
  Branches    43934    44496    +562     
=========================================
+ Hits       211558   213505   +1947     
- Misses      14372    14562    +190     
- Partials     8279     8290     +11     
Files with missing lines Coverage Δ
lib/internal/fs/utils.js 98.44% <100.00%> (+<0.01%) ⬆️
lib/internal/vfs/errors.js 100.00% <100.00%> (ø)
lib/internal/vfs/router.js 97.82% <97.82%> (ø)
lib/fs.js 98.33% <99.26%> (+0.13%) ⬆️
lib/internal/fs/dir.js 93.84% <80.95%> (-0.74%) ⬇️
lib/internal/vfs/file_system.js 99.21% <93.93%> (+2.52%) ⬆️
lib/internal/fs/promises.js 92.94% <93.29%> (+0.06%) ⬆️
lib/internal/vfs/setup.js 86.68% <86.68%> (ø)

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

@mcollina mcollina added request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. semver-minor PRs that contain new features and should be released in the next minor version. labels May 24, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label May 24, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label May 25, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label May 25, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@mcollina
mcollina force-pushed the vfs-mount-integration branch from fe4a688 to 708a5fa Compare May 25, 2026 17:38
@mcollina mcollina added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label May 29, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label May 29, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator