Closed MajorLift closed 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 93.99%. Comparing base (
0a265dc
) to head (efe17f3
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎
This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
Package | New capabilities | Transitives | Size | Publisher |
---|---|---|---|---|
npm/@metamask/base-controller@6.0.1 | None | 0 |
290 kB | metamaskbot |
npm/@metamask/controller-utils@11.0.1 | network Transitive: filesystem | +16 |
3.25 MB | metamaskbot |
npm/@metamask/key-tree@9.1.2 | None | +2 |
2.33 MB | metamaskbot |
npm/@metamask/permission-controller@10.0.1 | None | +2 |
801 kB | metamaskbot |
npm/@metamask/snaps-registry@3.2.1 | None | 0 |
54.1 kB | metamaskbot |
npm/nanoid@3.3.7 | None | 0 |
24.4 kB | ai |
🚮 Removed packages: npm/@metamask/base-controller@6.0.0, npm/@metamask/controller-utils@11.0.0, npm/@metamask/key-tree@9.1.1, npm/@metamask/permission-controller@10.0.0, npm/@metamask/rpc-errors@6.2.1, npm/@metamask/snaps-registry@3.1.0, npm/@metamask/utils@8.4.0, npm/nanoid@3.3.6
Explanation
As part of the Wallet Framework Team's OKR (Q2 2024 O3KR4, Q3 2024 O2KR4) for upgrading TypeScript to v5.0+ in the core monorepo, we are updating dependencies of the core repo so that they can be used with projects that use
Node16
orNodeNext
as theirmoduleResolution
tsconfig option.To achieve this, all dependencies that are ESM packages need to be updated so that they generate separate builds and type declarations that are explicitly designated for CJS and ESM.
This requirement applies to nested dependencies as well, so we are also replacing
superstruct
with the ESM-compatible fork@metamask/superstruct
in all dependencies of core that havesuperstruct
as a dependency.Description
superstruct
dependency with@metamask/superstruct
^3.0.0
.^3.1.0
superstruct
import statements with@metamask/superstruct
@metamask/utils
to^8.5.0
.^9.1.0
@metamask/superstruct@npm:3.1.0
typescript
to~5.0.4
~Further context on why the
superstruct
andutils
changes are necessary:yarn resolutions
@metamask/utils
is pinned to^9.1.0
via yarn resolutions, as there are a large number of dependencies that are set to^8.5.0
(see below), and some of them (especially the core packages) are blocked by the merge and release of this PR:approval-controller
,base-controller
,controller-utils
,eth-json-rpc-provider
,json-rpc-engine
,json-rpc-middleware-stream
,permission-controller
browser-passworder
,create-release-branch
,eth-block-tracker
,eth-json-rpc-middleware
,eth-sig-util
,key-tree
,post-message-stream
,providers
,snaps-registry
Mixed usage of
utils
v8 and v9 anywhere in the monorepo's dependency tree causes the following type errors:Release order roadmap
Due to interdependencies between the packages involved in this PR, we will need to update and release them in a specific order:
@metamask/utils
in dependencies ofsnaps-{sdk,utils,rpc-methods}
:rpc-errors
:key-tree
snaps-registry
base-controller
,permission-controller
snaps-sdk
keyring-api
: https://github.com/MetaMask/keyring-api/pull/328snaps-utils
snaps-rpc-methods
snaps-sdk
,snaps-utils
,keyring-api
snaps-controllers
and consumers ofutils
)snaps-controllers
as dependency:{accounts,chain,profile-sync}-controller
@metamask/utils@8.x.x
usage in thesnaps-controllers
dependency tree (https://github.com/MetaMask/snaps/pull/2593)browser-passworder
post-message-stream
snaps-controllers
(https://github.com/MetaMask/snaps/pull/2595){accounts,chain,profile-sync}-controller
,eth-snap-keyring
(https://github.com/MetaMask/eth-snap-keyring/pull/311)@metamask/utils@8.x.x
usage in the snaps monorepo dependency treecreate-release-branch
eth-block-tracker
eth-json-rpc-provider
~eth-json-rpc-middleware
eth-block-tracker
~, ~eth-json-rpc-provider
,~ ~eth-sig-util
~, ~json-rpc-engine
~abi-utils
eth-sig-util
abi-utils
~providers
json-rpc-engine
,json-rpc-middleware-stream
,rpc-errors
~@metamask/utils
References
@metamask/utils
9.0.0
and8.5.0
in dependency tree.@metamask/utils
fixed to9.0.0
in yarn resolutions: https://github.com/MetaMask/snaps/actions/runs/9745954683/job/26895208572?pr=2445snaps-sdk
,snaps-utils
and their dependencies that use@metamask/utils@8.5.0
are blocking:snaps-controllers
type errorssnaps-rpc-methods
type errors{accounts,chain,profile-sync}-controller
as dependencies@metamask/providers
update to^17.1.0
is being blocked by https://github.com/MetaMask/providers/pull/340, https://github.com/ts-bridge/ts-bridge/issues/22Changelog
@metamask/snaps-cli
@metamask/snaps-controllers
@metamask/snaps-execution-environments
@metamask/snaps-jest
@metamask/snaps-rpc-methods
@metamask/snaps-sdk
@metamask/snaps-simulator
(major)@metamask/snaps-utils
@metamask/snaps-webpack-plugin
@metamask/test-snaps