chore: remove unused deps in core-platform packages - #9064
Merged
Conversation
cryptodev-2s
temporarily deployed
to
default-branch
June 9, 2026 14:42 — with
GitHub Actions
Inactive
cryptodev-2s
force-pushed
the
chore/core-platform-knip-cleanup
branch
3 times, most recently
from
June 9, 2026 15:02
b018f42 to
5952e08
Compare
Triages the knip cleanup follow-up entries owned by @MetaMask/core-platform in `knip.config.ts`. Removed: - `base-controller`: drop `@metamask/json-rpc-engine` devDep — no longer referenced from source. - `eth-json-rpc-middleware`: drop `pify` runtime dep, `@metamask/network-controller` devDep, and `tsd` devDep. Also delete `src/types.test-d.ts`, the only consumer of those deps — no script invoked `tsd` against it so the type-compatibility check was never running. - `messenger-cli`: drop `eslint` devDep — only used via the root-level `lint:eslint` script. - `polling-controller`: drop `@metamask/controller-utils` runtime dep — no longer imported. - `network-controller`: drop `async-mutex` runtime dep — no longer imported. `wallet-framework-docs`: configure knip with `entry`/`project` patterns for `site/docusaurus.config.ts` and `site/sidebars.ts` so its docusaurus deps stop being flagged. Drops the corresponding ignore entries from `knip.config.ts`. Adds changelog entries for the three runtime-dep removals.
cryptodev-2s
force-pushed
the
chore/core-platform-knip-cleanup
branch
from
June 9, 2026 15:05
5952e08 to
785b528
Compare
Gudahtt
reviewed
Jun 9, 2026
cryptodev-2s
enabled auto-merge
June 9, 2026 15:14
cryptodev-2s
disabled auto-merge
June 9, 2026 15:18
cryptodev-2s
commented
Jun 9, 2026
cryptodev-2s
enabled auto-merge
June 9, 2026 15:20
| // with the type of the `request` method from `AbstractRpcService` in | ||
| // `@metamask/network-controller` (from where it was copied). | ||
| declare const networkControllerRpcService: AbstractRpcService; | ||
| expectAssignable<AbstractRpcServiceLike>(networkControllerRpcService); |
Member
There was a problem hiding this comment.
Why are we removing this test?
Contributor
Author
There was a problem hiding this comment.
This is a tsd test, and we currently don’t have anything in place to run tsd tests.
I can add it back and include a dedicated script for it, for example:
"test:types": "tsd"| ignoreDependencies: ['immer'], | ||
| }, | ||
| 'packages/wallet-framework-docs': { | ||
| // Docusaurus loads these files at runtime; they're outside knip's |
Contributor
Author
There was a problem hiding this comment.
Yeah that wording was misleading, sorry. The real reason isn't docusaurus runtime loading, it's that this package's source lives under site/ instead of src/, so knip's default project glob misses it. Updated the comment in the latest push.
Earlier comment misattributed the entry/project patterns to docusaurus runtime loading; the real reason is that source lives under `site/` instead of `src/`.
FrederikBolding
approved these changes
Jun 10, 2026
pull Bot
pushed a commit
to Reality2byte/core
that referenced
this pull request
Aug 3, 2026
## Explanation Release `1169.0.0` with version bumps for: - **`@metamask/eth-json-rpc-middleware`** `23.1.3` → `24.0.0` (major) - **`@metamask/network-controller`** `35.0.0` → `35.0.1` (patch) ### `@metamask/eth-json-rpc-middleware@24.0.0` **Breaking:** Add strict validation for `eth_sendTransaction` and `eth_signTransaction` params ([MetaMask#9482](MetaMask#9482)) - Reject requests whose params do not match the transaction schema (extraneous top-level keys, ill-typed fields such as non-hex `to`/`data`, malformed `accessList` / `authorizationList` entries) or exceed `MAX_TRANSACTION_PARAMS_SIZE_BYTES` when serialized - Prevents downstream normalization / PPOM WASM from crashing on deeply-nested junk fields or padded payloads and silently bypassing security scans Other changes: - Bump `@metamask/utils` from `^11.9.0` to `^11.11.0` ([MetaMask#9074](MetaMask#9074)) - Bump `@metamask/json-rpc-engine` from `^10.2.4` to `^10.5.0` ([MetaMask#8661](MetaMask#8661), [MetaMask#8746](MetaMask#8746), [MetaMask#8753](MetaMask#8753)) - Bump `@metamask/message-manager` from `^14.1.1` to `^14.1.2` ([MetaMask#8755](MetaMask#8755)) - Drop `pify` dependency, which was no longer used in source ([MetaMask#9064](MetaMask#9064)) ### `@metamask/network-controller@35.0.1` - Bump `@metamask/eth-json-rpc-middleware` from `^23.1.3` to `^24.0.0` ([MetaMask#9758](MetaMask#9758)) ## References - [MetaMask#9482](MetaMask#9482) — feat: validate `eth_sendTransaction` / `eth_signTransaction` params ## Checklist - [ ] I've updated the test suite for new or updated code as appropriate - [ ] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md) - [ ] I've introduced [breaking changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md) in this PR and have prepared draft pull requests for clients and consumer packages to resolve them <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > The release propagates a major middleware bump that rejects previously accepted malformed transaction RPC params; integrators on strict validation paths should expect possible breakage for non-conformant dapps, though this PR itself only changes versions and docs. > > **Overview** > This PR cuts **monorepo release `1169.0.0`** by versioning packages and aligning dependents—no application source changes beyond manifests and changelogs. > > **`@metamask/eth-json-rpc-middleware@24.0.0`** is published with changelog release notes for the existing **breaking** strict validation on `eth_sendTransaction` / `eth_signTransaction` (schema, size limits, rejection of malformed or oversized params). > > **`@metamask/network-controller@35.0.1`** bumps its dependency on that middleware from `^23.1.3` to `^24.0.0`. Root and many workspace packages update `@metamask/network-controller` to `^35.0.1`, with matching **Unreleased** changelog lines and **`yarn.lock`** resolution updates. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 455c03b. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: cryptodev-2s <109512101+cryptodev-2s@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
Triages the knip cleanup follow-up entries owned by `@MetaMask/core-platform` in `knip.config.ts` (the per-workspace `ignoreDependencies` block).
Per-package changes
References
Follow-up to #9049, narrows the deferred per-workspace ignore list.
Checklist
Note
Low Risk
Dependency and tooling cleanup only; no runtime logic changes beyond removing packages that were already unused in source.
Overview
Removes unused dependencies across several
@MetaMask/core-platformpackages and tightens knip so fewer issues are silenced withignoreDependencies.Runtime/dev deps dropped where source no longer references them:
@metamask/json-rpc-enginefrom base-controller,pifyplus@metamask/network-controller/tsdfrom eth-json-rpc-middleware (andsrc/types.test-d.tsdeleted—thetsdcompatibility test was never run),eslintfrom messenger-cli,@metamask/controller-utilsfrom polling-controller, andasync-mutexfrom network-controller. Package changelogs and README dependency diagrams are updated to match.knip.config.ts drops per-workspace ignore entries for those packages. wallet-framework-docs now uses
entry/projectundersite/so Docusaurus config imports resolve, with a smaller targetedignoreDependencieslist for plugin-string and loader edge cases. yarn.lock shrinks accordingly (including transitive cleanup from removingtsd).Reviewed by Cursor Bugbot for commit 7a02d48. Bugbot is set up for automated code reviews on this repo. Configure here.