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

@ember/jquery detection seems off #263

Closed
rwjblue opened this issue Jan 28, 2019 · 0 comments
Closed

@ember/jquery detection seems off #263

rwjblue opened this issue Jan 28, 2019 · 0 comments
Labels

Comments

@rwjblue
Copy link
Member

rwjblue commented Jan 28, 2019

After digging into emberjs/ember-test-helpers#545 a bit, I believe that the code we use to detect if ember-cli-babel's direct parent includes @ember/jquery as a dependency is a bit off (note this may also apply to @ember/string, tbd).

Specifically, we use ember-cli-version-checker to check the version of the @ember/jquery instance available from this.parent.root. Internally ember-cli-version-checker is using standard node resolution algorithm to determine the version that would be required from that root path. Since both yarn and npm@3+ use as flat of a heirarchy as possible, this means that if anyone depends on @ember/jquery throughout the system or if that module happened to be present (from a prior ember-try scenario perhaps 😸) there will be a node_modules/@ember/jquery/package.json found. I believe this is ultimately causing the bug reported in emberjs/ember-test-helpers#545...

Path forward time, I think that we should:

Check '@ember/jquery' in this.parent.dependencies() (present on both addon and project base classes) before checking for the version. If @ember/jquery is not in the parents dependencies, we would not be blacklisting.

@simonihmig - Thoughts?
@locks - Can you poke at the @ember/string side to see if this is also an issue there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant