fs.stat() with options doesn't work
Closed this issue · 5 comments
fs.stat()
and its relatives accept an additional options object fs.stat(path[, options], callback)
since node v10.5.0.
https://nodejs.org/api/fs.html#fs_fs_stat_path_options_callback
seems like graceful-fs
hasn't been updated yet! This will cause issues for projects that depend on graceful-fs
. I am one of the maintainers of fs-extra and this prevents us from using fs.stat()
with bigint
option!
I think this would need minor code fixes in the following places:
I suspect the harder part would be to update the tests test/stats.js
, which seems to only test statSync
.
same for readdir btw…
I opened the above issue (jprichardson/node-fs-extra#703) in fs-extra but the issue might lie in this project, I'm not sure.
Even after upgrading both packages I'm inconsistently getting the cb.apply is not a function
error.
@JustinLivi It's likely a result of having two different versions of graceful-fs
in play at the same time. What do you see when you run npm ls graceful-fs
?
@isaacs thanks - you were right. I was having a collision between jest and fs-extra. Installing graceful-fs as a direct dependency resolved the issue 👍