Skip to content

Commit 21b44f2

Browse files
committed
fixup! VFS path manipulation as strings and URL objects
Signed-off-by: Darshan Sen <[email protected]>
1 parent 33bfd88 commit 21b44f2

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

docs/virtual-file-system-requirements.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,15 @@ real file system and the VFS.
101101

102102
## VFS path manipulation as strings and URL objects
103103

104-
Should support both.
104+
If someone proposes that the VFS exist at a `vfs-file://` prefix, then this
105+
might become an issue. `fs` APIs accept `URL` objects, but this means code in
106+
(transitive) dependencies which assumes all native paths are strings may fail
107+
when passed `URL` objects. Perhaps a (transitive) dependency uses
108+
`require.resolve()`.
109+
110+
Using something like `vfs-file://` might be a potential solution for placing the
111+
VFS contents somewhere that has no interference with valid paths in the file
112+
system.
105113

106114
## Interaction with Native Addons
107115

0 commit comments

Comments
 (0)