This was briefly discussed in #42, but since #55 dropped support for unmaintained versions of Node, we can progress with this issue now too.
I realized that this is not just an issue of replacing fs-access with fs.access (the Node built-in not present in older versions of Node), but actually, the only place where it's used, fs.access is not actually needed. The more robust way to check for file non-existence is to check for error.code === 'ENOENT' when reading fails.
For starters: I will make a PR for this later.
This was briefly discussed in #42, but since #55 dropped support for unmaintained versions of Node, we can progress with this issue now too.
I realized that this is not just an issue of replacing
fs-access
withfs.access
(the Node built-in not present in older versions of Node), but actually, the only place where it's used,fs.access
is not actually needed. The more robust way to check for file non-existence is to check forerror.code === 'ENOENT'
when reading fails.