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

Require project to provide @ember/test-helpers and qunit. #738

Merged
merged 1 commit into from
Aug 17, 2020

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Aug 17, 2020

This moves @ember/test-helpers and qunit from dependencies to peerDependencies, and ensures those peer dependencies are satisfied by the host application.

This allows the host application to control the precise @ember/test-helpers and qunit versions, and better positions our users to leverage Embroider/ember-auto-import style "automatic" imports.

Also to note, npm@7 will aid us here and ensure that peer dependencies are installed.


For applications migrating, run the following (choose the version that applies to your app):

# npm users
npm install --dev "qunit" "@ember/test-helpers@^2.0.0-beta.4"

# yarn users
yarn add --dev "qunit" "@ember/test-helpers@^2.0.0-beta.4"

This moves `@ember/test-helpers` and `qunit` from `dependencies` to
`peerDependencies`, and ensures those peer dependencies are satisfied by
the host application.

This allows the host application to control the precise
`@ember/test-helpers` and `qunit` versions, and better positions our
users to leverage Embroider/ember-auto-import style "automatic" imports.

Also to note, `npm@7` will aid us here and ensure that peer dependencies
are installed.
);
}

// TODO: remove these `this.import` statements when the app is using using Embroider or ember-auto-import
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ef4 - I'm not 100% sure how to do this, curious if you have thoughts...

(note: I still plan to land this change since it doesn't require automatic Embroider/ember-auto-import interop initially)

@scalvert
Copy link
Contributor

Big 👍 from me. This is a big pain point right now, as you have to either upgrade ember-qunit's version of @ember/test-helpers, or force it with something like resolutions. Decoupling these seems like the correct approach.

@rwjblue rwjblue merged commit 3989fdc into master Aug 17, 2020
@rwjblue rwjblue deleted the move-to-peer-deps branch August 17, 2020 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants