File tree Expand file tree Collapse file tree 3 files changed +22
-12
lines changed Expand file tree Collapse file tree 3 files changed +22
-12
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ export default class EOCallExpressionProp extends AbstractEOProp<EOPropertyWithC
64
64
}
65
65
}
66
66
67
- private get calleeName ( ) : string {
67
+ get calleeName ( ) : string {
68
68
return this . calleeObject . callee . name ;
69
69
}
70
70
Original file line number Diff line number Diff line change @@ -30,13 +30,13 @@ export default function maybeTransformEmberObjects(
30
30
userOptions : UserOptions
31
31
) : boolean | undefined {
32
32
if ( isTestFile ( filePath ) ) {
33
- logger . warn ( `[${ filePath } ]: Skipping test file` ) ;
33
+ logger . warn ( `[${ filePath } ]: SKIPPED: test file` ) ;
34
34
return ;
35
35
}
36
36
37
37
if ( userOptions . type && ! isFileOfType ( filePath , userOptions . type ) ) {
38
38
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`
40
40
) ;
41
41
return ;
42
42
}
@@ -46,7 +46,7 @@ export default function maybeTransformEmberObjects(
46
46
: getTelemetryFor ( path . resolve ( filePath ) ) ;
47
47
if ( ! runtimeData || ! isRuntimeData ( runtimeData ) ) {
48
48
logger . warn (
49
- `[${ filePath } ]: SKIPPED Could not find runtime data NO_RUNTIME_DATA`
49
+ `[${ filePath } ]: SKIPPED: Could not find runtime data NO_RUNTIME_DATA`
50
50
) ;
51
51
return ;
52
52
}
@@ -123,7 +123,7 @@ function _maybeTransformEmberObjects(
123
123
}
124
124
125
125
if ( errors . length > 0 ) {
126
- logger . warn (
126
+ logger . error (
127
127
`[${ filePath } ]: FAILURE \nValidation errors: \n\t${ errors . join (
128
128
'\n\t'
129
129
) } `
Original file line number Diff line number Diff line change @@ -80,19 +80,29 @@ export function hasValidProps(
80
80
}
81
81
82
82
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 )
89
87
) {
90
88
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`
92
96
) ;
93
97
}
94
98
95
99
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
+
96
106
if ( instanceProp . hasModifierWithArgs ) {
97
107
errors . push (
98
108
`[${ instanceProp . name } ]: Transform not supported - value has modifiers like 'property' or 'meta'`
You can’t perform that action at this time.
0 commit comments