Skip to content

[bug] - typescript blueprints do not respect addon ordering #322

@mike-north

Description

@mike-north

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-decorators
Repro

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugbuildIdeas for or bugs with the build process

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions