paulmillr / readdirp

Recursive version of fs.readdir with streaming api.
https://paulmillr.com
MIT License
381 stars 52 forks source link

Update Node.js minimum required version. #159

Closed shisama closed 4 years ago

shisama commented 4 years ago

According to package.json, this package seems to support Node.js v8. https://github.com/paulmillr/readdirp/blob/d9c72137579b439fe0f8bb8d668f6b6846c75c45/package.json#L21

However, Node.js v8 has already been end-of-life on Dec 31, 2019.

https://github.com/nodejs/Release

If it is Node.js v10.13, fs.promises can be used. It is available to use fs.Dirent too, which is faster than fs.stat to check whether an entry is a file or a directory.

Another idea is that the minimum required version will be Node.js v12 for #105 . Node.js v12 has already been LTS.

If minimum required Node.js version is updated, it will be a breaking change.

Are you planning to update Node.js minimum required version?

paulmillr commented 4 years ago

Have you checked the actual readdirp code? We are using Dirent already. And we are using bigint inodes for win32, which are only available on node 10+.

We fallback to old methods for v8. Readdirp 3 was released one year ago, and so far we haven’t even switched half of users to it. The reason being: the packages support even older nodes, like v6. It’s a very lengthy task, and bumping min req to node10 won’t help much here.

shisama commented 4 years ago

Thank you for your reply. I did not know this has already used Dirent. I should have read code more carefully. I understood what you wrote. So I will close this issue. Thank you for your great works.

paulmillr commented 4 years ago

Cheers.