You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
We want to be able to figure out the id of a haste module by using it's filename instead of having to read the file to extract the `providesModule` annotations. The plan is to completely kill the usage of `providesModule` at Facebook (internally and open source projects). I'm adding this as a configurable opt-in option (and preserving support for `providesModule`) for the sake of (a) non-fb consumers of our open source tools that rely on `providesModule` and (b) seamlessly rolling this out throughout Facebook projects (the plan is to add support for using the filename to all tools and then make the switch and remove the `providesModule` annotations over the next 3-4 weeks).
`name_reducers` are basically a series of replacements that are applied in order to reduce a filename to a module id. These rules only apply to file paths that match the whitelist and do not match the blacklist. I had to use this instead of just using the basename (minus .js.flow) because react native has a bunch of platform specific extensions (`.ios`/`.android`/`.web`) that shouldn't be part of the module id.
I've hardly written any OCaml in my life, so please do pardon (and point out) atrocities that I may have committed.
Reviewed By: avikchaudhuri
Differential Revision: D4488705
fbshipit-source-id: f16bb1a034fb86bf6e6461f9e5f1cf2564f57d1f
0 commit comments