chore: Bump @metamask/providers to v18#28757
Conversation
|
@metamaskbot update-policies |
|
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@metamask/providers@18.1.1, npm/json-rpc-middleware-stream@5.0.1 |
|
Policy update failed. You can review the logs or retry the policy update here |
|
@metamaskbot update-policies |
|
No policy changes |
733faa0 to
beab613
Compare
The `@metamask/providers` package has been updated from v14 to v18. The breaking changes do not require any changes to the extension. They include: * Removal of certain provider features, which were later restored * Updates to JSON-RPC packages that used to impact error serialization in a breaking way, but no longer do (as of rpc-errors v7.0.1) * `webextension-polyfill` added as a peer dependency * Sub-path exports no longer work due to addition of exports and ESM build. Altogether this should result in no functional changes, aside from eliminating some redundant older copies of libraries (reducing bundle size). Changelog: https://github.com/MetaMask/providers/blob/main/CHANGELOG.md#1811
The subpath export keeps the inpage bundle small. The `.cjs` file extension is required for `browserify` to find the file.
9291171 to
eb7c2d5
Compare
Builds ready [eb7c2d5]
Page Load Metrics (1825 ± 48 ms)
Bundle size diffs
|
mcmire
left a comment
There was a problem hiding this comment.
The only thing that sticks out to me is the bump to a newer version of @metamask/rpc-errors, particularly 7.0.0. It seems that we could see another change to error messages in dapps. Granted, 7.0.0 restores some behavior that was changed in 5.0.0, so it's probably for the better if there is a material effect. I also see that the extension was already upgraded to 7.0.0 in #24496. So perhaps this is nothing, but I thought I'd call it out anyway.
LGTM.
Description
The
@metamask/providerspackage has been updated from v14 to v18. The breaking changes do not require any changes to the extension. They include:webextension-polyfilladded as a peer dependencyAltogether this should result in no functional changes, aside from eliminating some redundant older copies of libraries (reducing bundle size).
This update was difficult because of the need for a subpath export in
inpage.js. We want to import just theinitializeInpageProvidermodule without the rest of the package, which means we need to use a subpath export (because browserify doesn't support tree shaking). But this was challenging because the export maps added in v17 prevent the use of any subpath exports not defined in the export map. There was no entry that worked correctly across webpack and browserify. This was resolved by a new entry added in MetaMask/providers#391 (as part of v18.2.0)Changelog: https://github.com/MetaMask/providers/blob/main/CHANGELOG.md#1820
Related issues
N/A
Manual testing steps
N/A
Screenshots/Recordings
N/A
Pre-merge author checklist
Pre-merge reviewer checklist