Skip to content

Conversation

georgewrmarshall
Copy link
Contributor

@georgewrmarshall georgewrmarshall commented Sep 15, 2025

Description

Removes unnecessary peer dependencies (@solana/addresses and bitcoin-address-validation) from the design system packages and storybook applications. These dependencies were removed in #816 not being used and were adding unnecessary weight to the dependency tree. Also cleaned up associated type definition files and unused utility types.

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-181

Manual testing steps

  1. Install dependencies with yarn install
  2. Build both React and React Native packages with yarn build
  3. Run Storybook applications to ensure no missing dependencies
  4. Verify that all tests pass with yarn test

Screenshots/Recordings

Not applicable - dependency cleanup with no visual changes.

Before

bitcoin-address-validation and @solana/addresses weren't used outside of unnecessary peer dependencies and unused types

Screenshot 2025-09-15 at 3 57 14 PMScreenshot 2025-09-15 at 3 57 05 PM

After

No instances of bitcoin-address-validation and @solana/addresses remain in codebase

Screenshot 2025-09-15 at 3 56 51 PMScreenshot 2025-09-15 at 3 56 40 PM

Pre-merge author checklist

  • I've followed MetaMask Contributor Docs
  • I've completed the PR template to the best of my ability
  • I've included tests if applicable
  • I've documented my code using JSDoc format if applicable
  • I've applied the right labels on the PR (see labeling guidelines). Not required for external contributors.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Copy link
Contributor

📖 Storybook Preview

Comment on lines -20 to -21
"@solana/addresses": "^2.0.0",
"bitcoin-address-validation": ">=2.0.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were removed in #816 but dependencies weren't updated

@georgewrmarshall georgewrmarshall self-assigned this Sep 15, 2025
@georgewrmarshall georgewrmarshall marked this pull request as ready for review September 15, 2025 23:02
@georgewrmarshall georgewrmarshall requested a review from a team as a code owner September 15, 2025 23:02
cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Removes unnecessary peer dependencies (@solana/addresses and bitcoin-address-validation) from the MetaMask design system packages and storybook applications to reduce dependency tree weight and clean up unused code.

  • Removed unused peer dependencies from all package.json files
  • Cleaned up associated utility type definitions that are no longer needed
  • Streamlined dependency management across the monorepo

Reviewed Changes

Copilot reviewed 5 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/design-system-react/src/types/make-props-optional.ts Removed unused utility type definition file
packages/design-system-react/package.json Removed @solana/addresses and bitcoin-address-validation dependencies
packages/design-system-react-native/package.json Removed @solana/addresses and bitcoin-address-validation dependencies
apps/storybook-react/package.json Removed @solana/addresses and bitcoin-address-validation dependencies
apps/storybook-react-native/package.json Removed @solana/addresses and bitcoin-address-validation dependencies

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

"@vitest/coverage-v8": "^3.2.4",
"autoprefixer": "^10.0.0",
"axe-playwright": "^2.1.0",
"bitcoin-address-validation": ">=2.0.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were removed in #816 but dependencies weren't updated

"@metamask/design-tokens": "^8.1.0",
"@metamask/utils": "^11.8.0",
"@solana/addresses": "^2.0.0",
"bitcoin-address-validation": ">=2.0.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These were removed in #816 but dependencies weren't updated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer needed as we've removed bitcoin-address-validation

Copy link
Contributor

📖 Storybook Preview

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer needed as we've removed bitcoin-address-validation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MakePropsOptional is not used anywhere and can be replaced by Partial

Screenshot 2025-09-15 at 4 12 41 PM

@georgewrmarshall georgewrmarshall merged commit 70b60fe into main Sep 16, 2025
42 checks passed
@georgewrmarshall georgewrmarshall deleted the fix/peer-dependencies branch September 16, 2025 16:12
@georgewrmarshall georgewrmarshall mentioned this pull request Sep 16, 2025
7 tasks
georgewrmarshall added a commit that referenced this pull request Sep 16, 2025
## **Description**

This PR releases version 15.0.0 of the MetaMask Design System, featuring
patch releases across some packages with important dependency updates
and cleanup. Also fixes flex layout issue with `AvatarBase` which is
used by all avatar components.

## **Included PRs**

#825, #827, #828, 

## **Manual testing steps**

1. Pull and build the branch locally
2. Verify package versions are correctly updated (15.0.0 main, 0.4.1 for
react/react-native, 0.1.1 for shared)
3. Run `yarn install` to ensure dependency resolution works correctly
4. Run `yarn build` to verify all packages build successfully
5. Check that peer dependency warnings are reduced after the cleanup

## **Screenshots/Recordings**

Not applicable - this is a dependency and versioning update release.

### **Before**

<!-- Not applicable -->

### **After**

<!-- Not applicable -->

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs)
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants