-
Notifications
You must be signed in to change notification settings - Fork 98
Closed
Labels
Description
Please paste the output of ember -v here
ember-cli: 3.5.0-beta.1
node: 8.11.4
os: darwin x64
What are instructions we can follow to reproduce the issue?
Setup
ember new sample; cd ./sample # Create a new ember app
ember install ember-cli-typescript # Set up typescript support
ember install ember-qunit-decoratorsRepro
Run ember g component-test x-foo
Now about that bug. What did you expect to see?
Because of the addon order, I'd expect to see the code generated by ember-qunit-decorators.
What happened instead?
I see the code generated by ember-cli-typescript-blueprints
This problem is due to the fact that we do not respect addon ordering when inserting ember-cli-typescript-blueprints into the discovered addons array
ember-cli-typescript/ts/addon.js
Lines 30 to 32 in c0bc3d7
| if (this.project.addons.includes(this)) { | |
| this.project.addons.push(this.addons.find(addon => addon.name === 'ember-cli-typescript-blueprints')); | |
| } |
The code as it currently stands, will result in the e-cli-ts-blueprints code generation winning out over all other addons.
We should probably find the index of ember-cli-typescript in the array, and splice the blueprints in immediately after it.