Skip to content

Commit

Permalink
fix(node): add new statfs exports
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Apr 10, 2023
1 parent 2fc33a8 commit 080cf5b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/runtime/node/fs/_classes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ export const WriteStream: typeof fs.WriteStream =
export const FileReadStream = mock.__createMock__("fs.FileReadStream");

export const FileWriteStream = mock.__createMock__("fs.FileWriteStream");

export const StatsFs: typeof fs.StatsFs = mock.__createMock__("fs.StatsFs");
2 changes: 2 additions & 0 deletions src/runtime/node/fs/_fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export const truncate: typeof fs.truncate = callbackify(fsp.truncate);
export const unlink: typeof fs.unlink = callbackify(fsp.unlink);
export const utimes: typeof fs.utimes = callbackify(fsp.utimes);
export const writeFile: typeof fs.writeFile = callbackify(fsp.writeFile);
export const statfs: typeof fs.statfs = callbackify(fsp.statfs);

export const close: typeof fs.close = notImplementedAsync("fs.close");
export const createReadStream: typeof fs.createReadStream = notImplementedAsync(
Expand Down Expand Up @@ -142,3 +143,4 @@ export const writeFileSync: typeof fs.writeFileSync =
notImplemented("fs.writeFileSync");
export const writeSync: typeof fs.writeSync = notImplemented("fs.writeSync");
export const writevSync: typeof fs.writevSync = notImplemented("fs.writevSync");
export const statfsSync: typeof fs.statfsSync = notImplemented("fs.statfsSync");
1 change: 1 addition & 0 deletions src/runtime/node/fs/promises/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ export const appendFile: typeof fsp.appendFile =
notImplemented("fs.appendFile");
export const readFile: typeof fsp.readFile = notImplemented("fs.readFile");
export const watch: typeof fsp.watch = notImplemented("fs.watch");
export const statfs: typeof fsp.statfs = notImplemented("fs.statfs");

0 comments on commit 080cf5b

Please sign in to comment.