jslicense / licensee.js

check dependency licenses against rules
https://www.npmjs.com/package/licensee
Apache License 2.0
185 stars 23 forks source link

fs-access deprecated (but also unnecessary) #66

Closed ronkorving closed 1 year ago

ronkorving commented 4 years ago

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 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.