-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exports fixtures #6
base: master
Are you sure you want to change the base?
Conversation
(package.json was missing lodash)
I _think_ that the expected conversion is `exports = thing` -> `exports.default = thing`, which means that we will need to attach extra properties to the default, instead of exporting multiple named vars. Need to check with @fairfieldt first
@yofreke can I ask why? |
@yofreke @fairfieldt I'm not sure I understand why we should revert the part of the codemod for named exports.
|
ok, having read through the other pr more thoroughly I can see your reasoning... However, it's expected that once we run the codemods that we'll discover more issues and iterate. I'm not entirely convinced it's worth blowing it off just yet, here's what I'd do to fix the issues:
I'm sure we run into more issues but this seems like a reasonable approach, what do you think? |
Before we would do thing like export a class, and then add "static" methods to the class with It might be a rather lengthy process finding every reference to a named export and updating it by hand. We thought in this one instance we would go with mod compatibility over (by hand) completeness. We did not actually look in to the validity of our feeling, so it may be the case that everything can easily be updated by hand. It is okay if you want to hold off on this one until we have more info about how difficult by hand will be. |
Can you provide me with an example for that? Julian Krispel-Samsel
|
This was the first file I tried d:
|
Chatted with @fairfieldt about this, for these exports we want to keep old functionality (even though it does not look like nice es6 code). It will probably be easier to fix the way things are exported once we are further along with this project (or even by hand on a per case basis).