Skip to content
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

Use fs.promises in svgr cli #459

Merged
merged 2 commits into from
Jul 27, 2020
Merged

Conversation

TrySound
Copy link
Contributor

Summary

Node v10 got fs.promises support with already promisified api. See here https://nodejs.org/docs/latest-v10.x/api/fs.html#fs_fs_promises_api

Also we get helpful mkdir recursive flag which replaces mkdirp and
make-dir packages.

In this diff I replaced util.promisify with fs.promises where possible
and output-file-sync with combination of promisified fs.mkdir and fs.writeFile.

Node v10 got fs.promises support with already promisified api. See here https://nodejs.org/docs/latest-v10.x/api/fs.html#fs_fs_promises_api

Also we get helpful mkdir recursive flag which replaces mkdirp and
make-dir packages.

In this diff I replaced util.promisify with fs.promises where possible
and output-file-sync with combination of promisified fs.mkdir and fs.writeFile.
@vercel
Copy link

vercel bot commented Jun 23, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/gregberge/svgr/1jpxxh4k9
✅ Preview: https://svgr-git-fork-trysound-fs-promises.gregberge.vercel.app

@TrySound
Copy link
Contributor Author

TrySound commented Jul 7, 2020

Friendly ping @gregberge

@gregberge
Copy link
Owner

Hello @TrySound, are you sure it does not warn about it on Node.js v10+ ?

@gregberge
Copy link
Owner

Looks like it is good on latest v10. Let's do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants