One of the tests from https://github.com/ember-codemods/ember-angle-brackets-codemod/
Before ember-template-recast (correct)
input:
{{some-component
people=(array
(hash
name="Alex"
age=5
nested=(hash oldest=true amount=(format-currency 350 sign="£"))
disabled=(eq foo "bar")
)
(hash name="Ben" age=4)
(hash name="Sophie" age=1)
)
}}
output:
<SomeComponent
@people={{array
(hash
name="Alex"
age=5
nested=(hash oldest=true amount=(format-currency 350 sign="£"))
disabled=(eq foo "bar")
)
(hash name="Ben" age=4)
(hash name="Sophie" age=1)
}}
/>
After ember-template-recast refactor (incorrect)
input:
{{some-component
people=(array
(hash
name="Alex"
age=5
nested=(hash oldest=true amount=(format-currency 350 sign="£"))
disabled=(eq foo "bar")
)
(hash name="Ben" age=4)
(hash name="Sophie" age=1)
)
}}
output:
<SomeComponent @people={{array (hash name="Alex" age=5 nested=(hash oldest=true amount=(format-currency 350 sign="£")) disabled=(eq foo "bar")) (hash name="Ben" age=4) (hash name="Sophie" age=1)}}></SomeComponent>
One of the tests from https://github.com/ember-codemods/ember-angle-brackets-codemod/
Before
ember-template-recast(correct)After
ember-template-recastrefactor (incorrect)