-
Notifications
You must be signed in to change notification settings - Fork 140
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
dependencySatisfies doesn't work properly with optional peer dependencies #1266
dependencySatisfies doesn't work properly with optional peer dependencies #1266
Comments
This is necessary since embroider doesn't handle optional dependencies properly as reported here: embroider-build/embroider#1266 This commit makes `@apollo/client` temporarly a non optional dependency to fix the current issue we have in apps without that dependency. However, we need to revert this as soon as the issue above is resolved since we don't want to enforce this dependency. Related to adfinis#597
This is necessary since embroider doesn't handle optional dependencies properly as reported here: embroider-build/embroider#1266 This commit makes `@apollo/client` temporarly a non optional dependency to fix the current issue we have in apps without that dependency. However, we need to revert this as soon as the issue above is resolved since we don't want to enforce this dependency. Related to #597
I believe this is an ember-auto-import issue. The error is thrown here. dependencySatisfies does return |
We just fixed a very similar case in embroider-build/ember-auto-import#530 by moving an error from build time to runtime. It would make sense to do the same for |
Hi
I'm having problems with the
dependencySatisfies
macro. I have an addon that defines a peer dependency as optional. The addon code then usesdependencySatisfies
to check whether I need to implement a function (including an import of that dependency).However, if I use that addon in an app that does not have that dependency, the macro still resolves to
true
which causes an error ofember-auto-import
:@apollo/client
is not present in the dependencies, I verfied that withyarn why @apollo/client
.Here are the relevant code snippets of the addon:
Could you take a look at that? Let me know if I can do something to help..
The text was updated successfully, but these errors were encountered: