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

Fix issues with peerDependencies when ember-auto-import present. #752

Merged
merged 4 commits into from
Sep 16, 2020

Commits on Sep 11, 2020

  1. Fix issues with peerDependencies when ember-auto-import present.

    When `ember-auto-import` is present, avoid `app.import` of `QUnit`
    itself. Without this change, users (when they have `peerDependencies`
    setup) would get an error like:
    
    ```
    Uncaught Error: QUnit has already been defined.
    ```
    
    This is because we were previously always `app.import`ing `QUnit`
    itself, but then `ember-auto-import` sees:
    `import { test, module } from 'qunit';` in a test file alongside the
    `package.json` having an entry for `qunit` so it attempts to bundle it
    **again**.
    
    This is the path _away_ from custom build/app.import shenanigans and
    helps us down the path of avoiding specialness in an Embroider focused
    world.
    rwjblue committed Sep 11, 2020
    Configuration menu
    Copy the full SHA
    9c416df View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2020

  1. Ensure lazily defined QUnit global does not error during ember test

    The `vendor/ember-cli/test-support-suffix.js` file overrides a file
    built into ember-cli's build pipeline and prevents this built-in
    `Testem.hookIntoTestFramework` invocation:
    
    https://github.com/ember-cli/ember-cli/blob/v3.20.0/lib/broccoli/test-support-suffix.js#L3-L5
    
    The reason this override is needed, is because the built-in ember-cli
    invocation of `Testem.hookIntoTestFramework()` happens _during_
    `test-support.js` evaluation, which (when we are leveraging Embroider or
    ember-auto-import) QUnit is not present (since its not eagerly
    evaluated, we only are guaranteed it is present when we import it). As
    such the `Testem.hookIntoTestFramework` invocation has been moved into
    our `addon-test-support/index.js` which is only ran once QUnit is
    actually defined/available.
    rwjblue committed Sep 15, 2020
    Configuration menu
    Copy the full SHA
    223e0cf View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2020

  1. Configuration menu
    Copy the full SHA
    257556d View commit details
    Browse the repository at this point in the history
  2. Remove ember-auto-import ember-try scenario.

    Now that the addon itself depends on ember-auto-import, it no longer
    makes sense to test as an ember-try scenario.
    rwjblue committed Sep 16, 2020
    Configuration menu
    Copy the full SHA
    d752a34 View commit details
    Browse the repository at this point in the history