File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ export default class EOCallExpressionProp extends AbstractEOProp<EOPropertyWithC
6464 }
6565 }
6666
67- private get calleeName ( ) : string {
67+ get calleeName ( ) : string {
6868 return this . calleeObject . callee . name ;
6969 }
7070
Original file line number Diff line number Diff line change @@ -30,13 +30,13 @@ export default function maybeTransformEmberObjects(
3030 userOptions : UserOptions
3131) : boolean | undefined {
3232 if ( isTestFile ( filePath ) ) {
33- logger . warn ( `[${ filePath } ]: Skipping test file` ) ;
33+ logger . warn ( `[${ filePath } ]: SKIPPED: test file` ) ;
3434 return ;
3535 }
3636
3737 if ( userOptions . type && ! isFileOfType ( filePath , userOptions . type ) ) {
3838 logger . warn (
39- `[${ filePath } ]: FAILURE Type mismatch, expected type '${ userOptions . type } ' did not match type of file`
39+ `[${ filePath } ]: SKIPPED: Type mismatch, expected type '${ userOptions . type } ' did not match type of file`
4040 ) ;
4141 return ;
4242 }
@@ -46,7 +46,7 @@ export default function maybeTransformEmberObjects(
4646 : getTelemetryFor ( path . resolve ( filePath ) ) ;
4747 if ( ! runtimeData || ! isRuntimeData ( runtimeData ) ) {
4848 logger . warn (
49- `[${ filePath } ]: SKIPPED Could not find runtime data NO_RUNTIME_DATA`
49+ `[${ filePath } ]: SKIPPED: Could not find runtime data NO_RUNTIME_DATA`
5050 ) ;
5151 return ;
5252 }
@@ -123,7 +123,7 @@ function _maybeTransformEmberObjects(
123123 }
124124
125125 if ( errors . length > 0 ) {
126- logger . warn (
126+ logger . error (
127127 `[${ filePath } ]: FAILURE \nValidation errors: \n\t${ errors . join (
128128 '\n\t'
129129 ) } `
Original file line number Diff line number Diff line change @@ -80,19 +80,29 @@ export function hasValidProps(
8080 }
8181
8282 if (
83- ( ! decorators &&
84- ( instanceProp . hasDecorators ||
85- instanceProp instanceof EOClassDecoratorProp ) ) ||
86- unsupportedPropNames . includes ( instanceProp . name ) ||
87- ( instanceProp instanceof EOCallExpressionProp &&
88- ! instanceProp . hasDecorators )
83+ ! decorators &&
84+ ( instanceProp . hasDecorators ||
85+ instanceProp instanceof EOClassDecoratorProp ||
86+ instanceProp instanceof EOCallExpressionProp )
8987 ) {
9088 errors . push (
91- `[${ instanceProp . name } ]: Transform not supported - need option '--decorators=true' or the property type ${ instanceProp . type } can not be transformed`
89+ `[${ instanceProp . name } ]: Transform not supported - need option '--decorators=true'`
90+ ) ;
91+ }
92+
93+ if ( unsupportedPropNames . includes ( instanceProp . name ) ) {
94+ errors . push (
95+ `[${ instanceProp . name } ]: Transform not supported - property with name '${ instanceProp . name } ' and type ${ instanceProp . type } can not be transformed`
9296 ) ;
9397 }
9498
9599 if ( instanceProp instanceof EOCallExpressionProp ) {
100+ if ( ! instanceProp . hasDecorators ) {
101+ errors . push (
102+ `[${ instanceProp . name } ]: Transform not supported - call to '${ instanceProp . calleeName } ' can not be transformed`
103+ ) ;
104+ }
105+
96106 if ( instanceProp . hasModifierWithArgs ) {
97107 errors . push (
98108 `[${ instanceProp . name } ]: Transform not supported - value has modifiers like 'property' or 'meta'`
You can’t perform that action at this time.
0 commit comments