-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Add fs-extra
#173
Feat: Add fs-extra
#173
Conversation
docs/modules/fs-extra.md
Outdated
|
||
### Equivalent Methods | ||
|
||
- `ensureFile` -> `fs.exists` - deprecated since v1 |
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.
Since fs.exists
is deprecated, I think we should suggest either using the synchronous version (fs.existsSync
) or inlining what fs-extra
does (and Node docs recommend): fs.access().then(() => true).catch(() => false)
.
Co-authored-by: pralkarz <[email protected]>
Hey @ziebam thanks a lot for the comments! My intent for this PR was mostly to get |
I'll have a full read through in the next day or so. But from a quick scan through it, I think we should do a few of the PR comments at least since they're about which method to prefer. I don't think we need a migration guide, but we should at least mention the basic mappings (old to new/replacement) |
Closes (#126)
Snippets to add:
emptyDir
emptyDirSync
ensureFile
ensureFileSync
ensureLink
ensureLinkSync
ensureSymlink
ensureSymlinkSync
outputFile
outputFileSync
outputJson
outputJsonSync
pathExists
readJson
readJsonSync
writeJson
writeJsonSync