-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
feat: list "graphql" as an optional peer dependency #2187
Conversation
nice! this is safe since we removed the line that parsed graphql to make suggested handlers, right? (I think we did, but can't recall exactly) |
@mattcosta7, thanks for getting your eyes on this. Yes, this should be safe! There's an effort to improve the unhandled requests logging but I advocated not to rely on GraphQl there, only to parse the body (#2227). I would love to include this pull request in the next minor release. For now, will see if there are any issues we should fix first... |
Released: v2.4.0 🎉This has been released in v2.4.0! Make sure to always update to the latest version ( Predictable release automation by @ossjs/release. |
I am not sure this was a safe change. In my project, vitest is erroring out because it can no longer import
I do not know why Installing |
It fails for us as well:
We also don't use graphql at all. |
Same here, imported in the node process, maybe via bundler and tree-shaking this might not be an issue. But imports via node crash due to missing modules. |
Thanks for reporting this! For now, you can revert to the previous minor version to not deal with this error. I believe import { http } from 'msw' This imports One way to fix this is to use granular imports, which we've shipped some time back: import { http } from 'msw/core/http' Let me know if this helps! |
@kettanaito thanks for looking into it. |
My comment above mentions you should downgrade if this affects you. Please do. That's handling open source issues 101 ;) The fix is already open at #2250. I will release it once the build is complete. |
Changes
graphql
as a regular dependency.graphql
as a peer dependency of MSW.graphql
to thepeerDependenciesMeta
as an optional peer dependency (similar totypescript
).