facebookarchive / flow-remove-types

🚿 Removes Flow type annotations from JavaScript files with speed and simplicity.
MIT License
467 stars 52 forks source link

Use pirates for interoperability with other require hooks #62

Closed anandthakker closed 5 years ago

anandthakker commented 6 years ago

Per https://github.com/standard-things/esm/issues/119, this PR uses pirates to register the require hook instead of patching it in directly.

Advantage: better interoperability with other require hooks Disadvantage: adds a (small) dependency

anandthakker commented 6 years ago

Ah, looks like pirates uses some es2015 features that aren't supported in node 0.10/0.12 🤷‍♂️

jdalton commented 6 years ago

Node 0.10 and 0.12 are no longer supported by Node and haven't been since 2016.

motiz88 commented 5 years ago

We should definitely have this. Seems like it would be pretty safe to drop Node 0.10 and 0.12 support as part of the v2 release I'm planning. Thanks @anandthakker! Apologies for how long it's taken us to look at this PR.