Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix exports.js exporting unnamed functions #24
My PR is an attempt to fix this issue. I'm a total JSCodeShift/Recast beginner, but my PR pass the fixture test I created so it looks safe.
Also note that I upgraded to latest JSCodeShift and fixed non-passing unit-tests due to code-style preferences (expected
I've noticed another case I can handle:
Edit: commited a fix for that case: we always use the exports.propertyName even if it overrides an already defined function name
Another case that can be harder to fix would be to remplace usages of exports.propertyName in code, like I had in my codebase: