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 ember-test-selectors custom adapter for 6.x #904

Merged
merged 1 commit into from
Jul 28, 2021

Conversation

mydea
Copy link
Contributor

@mydea mydea commented Jul 23, 2021

The 6.x release of ember-test-selectors dropped the attribute binding for classic components. This leads to a build error due to the current compat-adapter of embroider:

module not found: Error: 
Can't resolve '../node_modules/ember-test-selectors/utils/bind-data-test-attributes' 
in '$TMPDIR/embroider/d7920e/assets/my-app.js'

This PR makes the compat adapter only run for ember-test-selector versions below 6. Not sure if there is a "nicer" way to check this than to take the version of the addon pkg info, but I guess it works well enough for this case!

@thoov
Copy link
Collaborator

thoov commented Jul 23, 2021

We can leverage shouldApplyAdapter (#772) which will completely ignore the adapter altogether. An example of this is: https://github.com/embroider-build/embroider/pull/900/files

@mydea
Copy link
Contributor Author

mydea commented Jul 26, 2021

Ah, nice! I rewrote it to leverage that.

@rwjblue rwjblue added the bug Something isn't working label Jul 28, 2021
@rwjblue rwjblue merged commit 30580a9 into embroider-build:master Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants