chore: use ESM exports where appropriate#151
chore: use ESM exports where appropriate#151thymikee merged 9 commits intoreact-native-community:masterfrom
Conversation
| } | ||
|
|
||
| module.exports = { | ||
| export default { |
There was a problem hiding this comment.
I wonder whether this shouldn't be export run and export init
| }; | ||
|
|
||
| module.exports = { flat, nested, withExamples, withPods }; | ||
| export default { flat, nested, withExamples, withPods }; |
There was a problem hiding this comment.
Shouldn't this be a series of named exports instead of an object?
|
|
||
| module.exports = { | ||
| export default { | ||
| parseDevicesResult, |
There was a problem hiding this comment.
Shouldn't this be a set of named exports?
| }; | ||
|
|
||
| module.exports = { | ||
| export default { |
| } | ||
|
|
||
| module.exports = { | ||
| export default { |
| } | ||
|
|
||
| module.exports = { | ||
| export default { |
grabbou
left a comment
There was a problem hiding this comment.
Final round, it looks good to me. I just wanted to suggest we refine some export default's when there's an object exported.
It makes sense to have export default {} in case of a command where properties of an object are not meant to be consumed directly.
CC: @thymikee
|
@grabbou Ok, now I got it. Will add. |
|
Awesome @sidferreira! Thank you |
packages/cli/src/index.js
Outdated
| } | ||
|
|
||
| module.exports = cli; | ||
| export default cli; |
There was a problem hiding this comment.
please revert that, this is public API
|
@grabbou the changes you requested ended being larger than expected. I reverted until we decide if we do the extra work now or wait for later. |
|
@sidferreira sounds good. Did you update the public API? |
|
@thymikee please update your review so we can land it! |
|
Thanks @sidferreira 👍 |
This is an extra for #150
Fixes exports and tweaks some tests.
The
link,linkAssets, andlinkDependencywhere trickier as hell, but we have all tests working.I suggest take it easy in this review as I'm worried in a "false positive" in tests as there was a LOT of changes.
We need to improve the code coverage for changes like this have smaller chances of failing...