-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Set wagmi v1.4.13 and viem v1.21.4 as dependencies #237
Set wagmi v1.4.13 and viem v1.21.4 as dependencies #237
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@MidnightLightning is attempting to deploy a commit to the Superfluid Finance Team on Vercel. A member of the Team first needs to authorize it. |
I appreciate the effort.
Sorry but this is not correct. A peer dependency not marked as optional is as much of an essential dependency as a regular dependency. Because the types of wagmi/viem are exposed in the widget's API then it's correct to make them peer dependencies. So I don't think this is the correct solution... but I see what you're going for though... and understand the frustration. I can do a special release for this. It's also probably possible to fix it with NPM overrides, NPM aliases or monkeypatching somehow, but it's a pain... Did you try automatic installation of peer dependencies? |
Ah, you're right; I believe my statement would be more accurate as "indicate to the package manager that THIS SPECIFIC VERSION OF the other library is good to have", as it seems if another version of a peer dependency is installed, it generates a warning rather than a failure. Past v7 of Aside from the nuances of whether something should be a peer dependency or standard dependency, for the Superfluid widget, I don't think "automatic installation of (missing) peer dependencies" would help in its current form, because the peer dependency is defined as
Can you explain further how the types are "exposed"? If
I did attempt to use |
Oh, I forgot about the So, the basic change here I think is the peer dependency needs to note that |
Oh indeed, this is wrong in the widget package.json:
|
Thanks for updating the v0 version of the Superfluid widget to properly self-identify as needing a wagmi v1 environment. I'll close this request and attempt to get my own development environment working to be able to contribute the code changes needed to run within a wagmi v2 environment, as a potential new major version for the Superfluid widget. |
The Superfluid Widget currently marks
wagmi
andviem
as "peer dependencies" rather than "dependencies". The intent of a "peer dependency" is to indicate to the package manager that the other library is "good to have", but not essential for the running of the component. The Superfluid Widget pulls in thewagmi
andviem
functionality directly, so these should be marked as actual dependencies of the component.Additionally, harmonized on one version of those third-party libraries (the
docs
folder had a separate version of them).This change should fix #236 as it will allow the Superfluid Widget to continue to use
wagmi
v1 as long as it wants (package managers will present to the widget its own copy of the v1 version of the library), while projects that implement it can move on to other versions ofwagmi
if they so choose.