Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move ember-cli-typescript to dependencies #604

Closed
wants to merge 1 commit into from

Conversation

davewasmer
Copy link
Contributor

Right now, ember-cli-typescript is listed as a devDependency.

However, index.js references it directly.

Because it is currently listed in devDependencies and not dependencies, npm/yarn won't ensure that ember-test-helpers gets it's own copy, leading to the above linked line failing in certain cases.

I seems rather difficult to expose this - I suspect it had something to do with multiple versions of ember-cli-typescript being present in a monorepo I was working on.

@rwjblue
Copy link
Member

rwjblue commented Mar 23, 2019

We should not be directly depending on ember-cli-typescript (devDep is correct). Instead we should fix the conditional to be something like:

    if (this.isDevelopingAddon()) {
      // eslint-disable-next-line node/no-unpublished-require
      let TypescriptOutput = require('ember-cli-typescript/js/lib/incremental-typescript-compiler/typescript-output-plugin');
      // eslint-disable-next-line node/no-unpublished-require
      let MergeTrees = require('broccoli-merge-trees');

      let tsTree = debugTree(
        new TypescriptOutput(compiler, {
          'addon-test-support/@ember/test-helpers': '@ember/test-helpers',
        }),
        'addon-test-support:ts'
      );

      input = debugTree(new MergeTrees([input, tsTree]), 'addon-test-support:merged');
    }

@davewasmer
Copy link
Contributor Author

Closing in favor of #610

@davewasmer davewasmer closed this Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants