feat: update the metamask sdk package to version "0.15.0"
Description
This PR updates the MetaMask SDK package to version "0.15.0", addressing bundle size problems and enhancing the MetaMask connector's logic. It resolves certain bugs and ensures functionality without the extensionOnly=true option.
Additional Information
Before submitting this issue, please make sure you do the following.
- [x] Read the contributing guide
- [x] Added documentation related to the changes made.
- [x] Added or updated tests (and snapshots) related to the changes made.
🦋 Changeset detected
Latest commit: 4733017efd1ee0a628d068cb337b69560f81bf2b
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 3 packages
| Name | Type |
|---|---|
| @wagmi/connectors | Minor |
| create-wagmi | Minor |
| wagmi | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| wagmi | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 11, 2024 3:09pm |
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
| Package | New capabilities | Transitives | Size | Publisher |
|---|---|---|---|---|
| npm/@metamask/[email protected] | Transitive: environment, eval, filesystem, network, shell | +91 |
55.8 MB | metamaskbot |
Will review this in-depth later in the week and happy to merge after that.
I was also wondering – has there been any efforts so far to mitigate bundle size? Saw that in the SDK changelog, but I am seeing no difference between 0.14.3 and 0.15.0 (looks like it increased very slightly?):
0.15.0
import { MetaMaskSDK } from '@metamask/sdk'
// ^?
Size: 324.98 kB with all dependencies, minified and brotlied
Loading time: 6.4 s on slow 3G
Running time: 7.1 s on Snapdragon 410
Total time: 13.5 s
0.14.3
import { MetaMaskSDK } from '@metamask/sdk'
// ^?
Size: 324.61 kB with all dependencies, minified and brotlied
Loading time: 6.4 s on slow 3G
Running time: 1.8 s on Snapdragon 410
Total time: 8.2 s
Reproduced with size-limit
Will review this in-depth later in the week and happy to merge after that.
I was also wondering – has there been any efforts so far to mitigate bundle size? Saw that in the SDK changelog, but I am seeing no difference between
0.14.3and0.15.0(looks like it increased very slightly?):0.15.0
import { MetaMaskSDK } from '@metamask/sdk' // ^? Size: 324.98 kB with all dependencies, minified and brotlied Loading time: 6.4 s on slow 3G Running time: 7.1 s on Snapdragon 410 Total time: 13.5 s0.14.3
import { MetaMaskSDK } from '@metamask/sdk' // ^? Size: 324.61 kB with all dependencies, minified and brotlied Loading time: 6.4 s on slow 3G Running time: 1.8 s on Snapdragon 410 Total time: 8.2 sReproduced with
size-limit
Not on the source itself, we are tackling that next. Currently we removed the sourcemaps that were creating high package size on npm and was potentially scaring people away (even though it is unrelated). We will have another update on the PR today to address your comments.
Could be worth shipping sourcemaps – they are particularly useful for folks who want to debug things in the SDK (we ship them with wagmi & viem).
Currently we removed the sourcemaps that were creating high package size on npm
Source maps don't necessarily affect the bundle size, devs can choose if they'd like to ship them or not. IMO the focus should be on the source code itself.
For example I noticed the SDK installs react and react-native regardless of the environment used. Although this might be tree shaken I'm not sure why it would be needed.
When installing Wagmi the console also shows some peer dependency issues that are from the SDK too. It would be nice to address that to have a clean install as well.