jprichardson / node-fs-extra

Node.js: extra methods for the fs object like copy(), remove(), mkdirs()
MIT License
9.43k stars 775 forks source link

Refactor `copy` API in async/await #1021

Closed SukkaW closed 10 months ago

SukkaW commented 10 months ago

The PR is the first part of proposal #1020:

SukkaW commented 10 months ago

@RyanZim The PR is ready to be reviewed now. npm run lint passes, and all test cases pass as well, check CI run here: https://github.com/SukkaW/node-fs-extra/actions/runs/6582803108

SukkaW commented 10 months ago

@RyanZim I've addressed all the code review suggestions. I've also universalized the related internal utility functions to reduce the duplicated implementations. The CI still passes after the latest changes: https://github.com/SukkaW/node-fs-extra/actions/runs/6598480115

Note that the coprDir has been heavily refactored (no more items array mutation!).