mirror of
https://github.com/status-im/metro.git
synced 2025-02-10 10:07:12 +00:00
Summary: allow-large-files By using async/await the code is (1) less nested, (2) more compact and (3) more robust (no exceptions running away, and much less risks of forgetting to call the callback/resolve, or mistakenly calling it twice). I now tend to think we could switch to it for all the callsites that are not in a perf-critical path. I switched from 'request' to 'node-fetch' because 'request' has an annoying callback with 2 arguments. So it's simpler to use an interface that's (1) already returning a Promise and (2) that is becoming standard. This changeset was a way for me to start experiment with introducing async/await in packager codebase, and it looks pretty good so far. Reviewed By: cpojer Differential Revision: D4559167 fbshipit-source-id: 89a328c5766c2ba890e9d0e67a81a38dac6cfc73