You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vfs: add overlay mode for selective file interception
Add overlay mode to VirtualFileSystem that only intercepts paths
that exist in the VFS, allowing real filesystem access to fall
through for non-mocked files. This enables use cases like the
test runner mock fs where specific files are mocked while allowing
access to real files.
Changes:
- Add `overlay` option to VirtualFileSystem constructor
- Modify shouldHandle() to check file existence in overlay mode
- Add `overlay` property getter
- Update test runner mock to use VFS with overlay mode
- Use path.dirname() instead of string manipulation in mock.js
- Rename isMounted to mounted for consistency
- Add security documentation for overlay mode risks
- Add comprehensive tests for overlay mode including worker threads
0 commit comments