-
-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Have you checked for existing feature requests?
- Completed
Summary
ppm uses wrench in a number of places to handle filesystem tasks. But wrench is deprecated and the author recommends moving to fs-extra.
In fact, this could be done in concert with other optimization tasks around fs. There are needless usages of synchronous fs methods scattered around the codebase; my guess is that this is a relic from a time when it was more of a headache to use the asynchronous fs methods because of the callback pattern.
I mention klaw because we have one instance of a call to wrench.readDirSyncRecursive, and fs-extra no longer implements the equivalent of that function, having delegated it to the klaw package.
What benefits does this feature provide?
It is good not to rely on deprecated packages. fs-extra is ridiculously popular and heavily used in the Node ecosystem.
Any alternatives?
We could attempt to use fs/promises in the Node stdlib directly. I know that the fs library has evolved quite a bit toward solving the problems that necessitated the “enhancer” libraries like fs-extra and Atom’s own fs-plus. But I don't know whether fs/promises would check all our boxes on its own.
Other examples:
No response