-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
bugSomething isn't workingSomething isn't workingreproducibleThis issue can be successfully reproducedThis issue can be successfully reproduced
Description
Describe the bug
Our FS layer doesn't support file descriptors at the moment, which causes issues in some cases (particularly ESLint).
To fix that, we need to:
- Create a new type in path.ts,
FSPath<T>, which isT | number - Use
FSPath<NativePath>in thefsfunctions that accepts file descriptors - Update ProxiedFS to accept/return a
FSPath<T>instead ofPath - Update ProxiedFS to not call
mapFromBase/mapToBaseon fds
To Reproduce
const {openSync, readFileSync, writeFileSync} = require(`fs`);
writeFileSync(`foo`, `hello world`);
const fd = openSync(`foo`, `r`);
expect(() => readFileSync(fd)).not.toThrow();Additional context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingreproducibleThis issue can be successfully reproducedThis issue can be successfully reproduced