Open pzuraq opened 5 years ago
What are the errors? Ideally it should skip the file because the codmods do not handle ember-data
https://github.com/ember-codemods/ember-es6-class-codemod#unsupported-types
Right, the codemod should handle Ember Data since we have decorators for model attributes and relationships.
Yes, but I think thats the decision we took before starting. I think a new codemod ember-data
should be created under ember-es6-class-codemod
to handle the model attributes and relationships
I think #72 may help give some context here, we can now wrap all non-standard macros so we can transform classes we previously could not. In the future, this won't even be necessary - once https://github.com/emberjs/ember.js/pull/17548 lands and decorators are supported in Ember itself, all current computed property macros will be decorators, so we can remove any wrapComputed
calls.
In the meantime though, it is probably not ideal to have ember-data macros be wrapped each time, so I think we should add them to the transform.
I see that Models are being converted in the current version but the attr
transforms and options are removed from the decorators.
Never mind, I was using ember-es6-class-codemod
. This works correctly in ember-native-class-codemod
.
I think It is confusing when there are two different codemods that do effectively the same thing. One should be marked as deprecated.
Thanks for the great work on this
The following file did not transform, and all of the properties seemed to trigger errors: