Closed kevinbeaty closed 8 years ago
FWIW, I would be fine with this library evolving into an extension for fs-extra. I almost always include both.
This issue may actually be overstated since the libraries are API compatible in the order of require
, i.e. if fs-extra
is loaded but the user is only expecting fs
, all expected functions will still work as they are passed through.
I may leave this alone until someone actually experiences an issue with the current behavior.
Reopened because @jonathantneal mentioned in #6 that he did indeed run into issues with the optional loading of fs-extra
.
Closed by #8
The strategy of loading optional dependencies is non-deterministic as a
fs-extra
orgraceful-fs
library loaded in a subtree of the dependency tree may be loaded instead of the desired implementation. This could be caused by the non-deterministic loading ofnpm3
, but there may have been cases innpm2
where this occurred as well. Thisiswas also an issue inany-promise
with a resolution discussed in kevinbeaty/any-promise#1Options:
fs-extra
as an explicit dependency.graceful-fs
as an explicit dependencyfs
and remove loading of optional dependencies.Proposal: Add
fs-extra
as an explicit dependency (Option 1).