Skip to content

vfs: add ComposableProvider for layered mounts - #66235

Open
mcollina wants to merge 1 commit into
nodejs:mainfrom
mcollina:vfs-composable-provider
Open

mcollina wants to merge 1 commit into
nodejs:mainfrom
mcollina:vfs-composable-provider

Conversation

@mcollina

Copy link
Copy Markdown
Member

Allow providers to be layered at one mount point. Reads search layers in priority order, while writes copy lower-layer files to the first provider and deletions hide lower copies without changing them.


AI gen, reviewed by me.

Allow providers to be layered at one mount point. Reads search layers
in priority order, while writes copy lower-layer files to the first
provider and deletions hide lower copies without changing them.

Assisted-by: pi
Signed-off-by: Matteo Collina <hello@matteocollina.com>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. vfs Issues and PRs related to the virtual filesystem subsystem. labels Sep 23, 2026
@codecov

codecov Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.74757% with 137 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.26%. Comparing base (ebef774) to head (8a659db).
⚠️ Report is 75 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/vfs/providers/composable.js 66.58% 134 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66235      +/-   ##
==========================================
- Coverage   90.28%   90.26%   -0.03%     
==========================================
  Files         790      790              
  Lines      271642   273319    +1677     
  Branches    51846    52213     +367     
==========================================
+ Hits       245260   246700    +1440     
- Misses      16889    17062     +173     
- Partials     9493     9557      +64     
Files with missing lines Coverage Δ
lib/vfs.js 100.00% <100.00%> (ø)
lib/internal/vfs/providers/composable.js 66.58% <66.58%> (ø)

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

Q16solver added a commit to Esposter/Esposter that referenced this pull request Sep 24, 2026
…t model

vfs 0.5 ("align userland VFS mounts and fs hooks with Node.js") mounts the
way core node:vfs does: mount() takes no path and returns a mount point in a
reserved namespace under os.devNull, so a path is served by one VFS or by
the disk, never both. Core's docs give the reason — no mounted layer may
shadow a real directory — and say VFS is no security boundary.

- FsProvider.mount() returns the mount point; the overlay option goes (0.5
  calls it shim-only, core has none), so the node:vfs swap stays one file.
- runNodeInProcess no longer mounts: it mounted an empty overlay at the cwd
  and never wrote into it, so every read and write already went to disk.
- The provider tests address files under the returned mount point and pin
  that a mounted provider never shadows a real path.
- The vfs hold in renovate.json is dropped; docs describe the mount model and
  core's open layered-mount work (nodejs/node#66235) as the path to a RAM
  overlay of the cwd.
- staleNames: two identifiers the dependency skill cited that no longer exist.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019dwem6ZLsMCyc52v9UbhFV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. vfs Issues and PRs related to the virtual filesystem subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants