-
Notifications
You must be signed in to change notification settings - Fork 295
Remove wrench, fs-plus in favor of fs-extra #836
Conversation
Down to 27 failures from 67! That was a pretty big chunk of failures caused by a isDirectory/isFile typo...
Checked over all the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting rid of some deprecated packages, @50Wliu! ✨
@nathansobo and I reviewed this, and we think it might make sense to keep the wrapper fs.coffee
file, so that we can put try/catch
blocks around functions that now throw an exception in a single place and reduce the risk of missing some of them.
Other than that, this seems like a great change and we should merge this once conflicts are resolved. ⚡️
Is this PR still active? I would be interested in taking a shot at updating this against |
Here is an updated version of this PR (with CI passes: https://travis-ci.com/github/DeeDeeG/apm/builds/179155533 Please consider reviewing. IMO it would be great to start updating For your reference, these were the significant commits to |
Uhh...not really, sorry 😬. If you have a branch that is updated, I'd encourage you to open it as a PR! |
@50Wliu thanks for the reply! I opened #894 with the updated branch. |
Requirements
Description of the Change
wrench
has been deprecated for a few years in favor offs-extra
. However, since bothfs-plus
andfs-extra
happen to extendfs
, it would be illogical to use both of them in the same codebase. Therefore, this PR removes bothwrench
andfs-plus
and usesfs-extra
instead.Alternate Designs
None.
Benefits
Possible Drawbacks
There were two troublesome functions with this swap:
fs.is(Directory|File)Sync
fs-extra
doesn't have any way to easily determine if a path is a directory or file without the possibility of throwing exceptions. I've tried to emulate that as best as I could usingtry
s everywhere, but it's not that good-looking and the behavior might be subtly different in a few places (we may now throw where we didn't before).fs.writeFileSync
fs-plus
creates any necessary directories first if the path doesn't exist;fs-extra
doesn't. I tried to addfs.mkdirp
calls wherever necessary but I may have missed a few.Verification Process
For now, just the specs. This will clearly need some extra real-world stress testing as I do not trust these specs.
Applicable Issues
N/A