sindresorhus / trash

Move files and directories to the trash
MIT License
2.58k stars 79 forks source link

Use async fs methods #111

Closed fregante closed 3 years ago

fregante commented 3 years ago

Based on #110 since that introduces the required async function

fregante commented 3 years ago

Regarding the linting issue:

❯ n 10.0.0
❯ node -e 'console.log("promises" in require("fs"))'
false
❯ n 10.1
❯ node -e 'console.log("promises" in require("fs"))'
true

Would you expect Node to be at least 10.1 for engines.node = '>=10'?

sindresorhus commented 3 years ago

Would you expect Node to be at least 10.1 for engines.node = '>=10'?

Yeah, what you did is fine.