Skip to content

refactor: rename connect-monorepo to metamask-connect#267

Open
ffmcgee725 wants to merge 7 commits into
mainfrom
jc/WAPI-1255
Open

refactor: rename connect-monorepo to metamask-connect#267
ffmcgee725 wants to merge 7 commits into
mainfrom
jc/WAPI-1255

Conversation

@ffmcgee725

@ffmcgee725 ffmcgee725 commented Apr 16, 2026

Copy link
Copy Markdown
Member

Explanation

The GitHub repo is being renamed from MetaMask/connect-monorepo to MetaMask/metamask-connect to align the repo name with the external product name. This PR updates all in-repo references to the old name.

Changes by category:

Category Files Occurrences
Root package name package.json @metamask/connect-monorepo@metamask/metamask-connect
GitHub URLs in package.json 12 files repository, bugs, homepage fields across all packages, playgrounds, and the package template
READMEs 8 files Markdown links to repo
Docs docs/contributing.md 2 prose/example references (directory path + resolutions example)
Scripts scripts/bump-dependent-playgrounds.ts Regex pattern + URL construction for changelog links
Scripts scripts/generate-preview-build-message.ts Preview build instructions URL

Not changed:

  • CHANGELOGs — historical PR links; GitHub auto-redirects handle these
  • yarn.lock — auto-regenerates after yarn install
  • Sub-package names@metamask/connect, @metamask/connect-evm, etc. are unchanged
  • CI workflows — already use github.repository context
  • Published npm package names — unchanged

References

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
  • I've communicated my changes to consumers by updating changelogs for packages I've changed, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

// Update the links at the bottom
const unreleasedLinkPattern = new RegExp(
`\\[Unreleased\\]: (https://github\\.com/MetaMask/connect-monorepo/compare/${packageName.replace(/\//gu, '\\/')}@)[\\d.]+\\.\\.\\.HEAD`,
`\\[Unreleased\\]: (https://github\\.com/MetaMask/metamask-connect/compare/${packageName.replace(/\//gu, '\\/')}@)[\\d.]+\\.\\.\\.HEAD`,
@ffmcgee725 ffmcgee725 marked this pull request as ready for review April 16, 2026 10:03
@ffmcgee725 ffmcgee725 requested a review from a team as a code owner April 16, 2026 10:03
Comment thread packages/analytics/CHANGELOG.md Outdated
[0.2.0]: https://github.com/MetaMask/connect-monorepo/compare/@metamask/analytics@0.1.1...@metamask/analytics@0.2.0
[0.1.1]: https://github.com/MetaMask/connect-monorepo/compare/@metamask/analytics@0.1.0...@metamask/analytics@0.1.1
[0.1.0]: https://github.com/MetaMask/connect-monorepo/releases/tag/@metamask/analytics@0.1.0
[Unreleased]: https://github.com/MetaMask/metamask-connect/compare/@metamask/analytics@0.4.0...HEAD

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@MetaMask/wallet-integrations

Adding this comment here, but it's valid for every changelog in each package:

Even though ticket spec says we can skip changelog updates, I decided to follow through with this change for the reason that CI was failing when we ran changelog:validate

Root cause

The changelog:validate CI step uses @metamask/auto-changelog, which works as follows:

  1. Each package runs validate-changelog.shauto-changelog validate --prettier --tag-prefix "<package>@"
  2. The --repo flag defaults to reading repository.url from package.json — which now points to https://github.com/MetaMask/metamask-connect
  3. The validator parses the CHANGELOG.md, then reconstructs it from scratch using that repoUrl. Specifically, the link reference definitions at the bottom ([Unreleased]: https://github.com/..., [0.4.0]: https://github.com/...) are regenerated using the repo URL from package.json
  4. It does a string comparison between the reconstructed changelog and the original. Since the original still had connect-monorepo URLs in the link definitions but the reconstructed version uses metamask-connect, it throws ChangelogFormattingError

The PR links in the body text (e.g., ([#223](https://github.com/MetaMask/connect-monorepo/pull/223))) are treated as opaque description strings — they're stored as-is and reproduced as-is. The mismatch comes only from the link reference definitions at the bottom of each CHANGELOG.

Options considered

Option Description Pros Cons
1. Update only link reference definitions Replace connect-monorepometamask-connect in the [Unreleased]: and [x.y.z]: lines at the bottom of each CHANGELOG.md Minimal, targeted fix; body PR links untouched; satisfies validator Touches CHANGELOGs (ticket said to skip)
2. Blanket-replace all CHANGELOG occurrences Replace connect-monorepometamask-connect everywhere in all CHANGELOGs (link defs + body PR links) Simplest to execute Unnecessarily changes historical entries; GitHub redirects handle old PR links fine
3. Pass --repo with the old URL Modify validate-changelog.sh to hardcode --repo https://github.com/MetaMask/connect-monorepo Zero CHANGELOG changes Hack that needs to be reverted later; easy to forget
4. Use --fix flag in CI Let the validator auto-correct formatting Automatic CI workflow has a "require clean working directory" check afterwards, so this still fails
5. Skip validation for this PR Temporarily skip the changelog:validate step No file changes Doesn't solve the problem for subsequent PRs

Decision

Option 1 — update only the link reference definitions. This is the minimal change that satisfies the validator without altering historical PR link text.

  • 11 CHANGELOG.md files, 89 link definitions updated
  • 214 body PR links left untouched (GitHub auto-redirects handle these)
  • yarn changelog:validate passes cleanly across all 10 packages

Sharing this as a comment so we can discuss as a team if anyone has any opinion on the chosen approach, and if we should follow through with another one (and why)

ffmcgee725 and others added 2 commits April 20, 2026 16:20
…encoding'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Comment thread scripts/bump-dependent-playgrounds.ts Outdated
Comment on lines 241 to 245
`\\[Unreleased\\]: (https://github\\.com/MetaMask/metamask-connect/compare/${packageName.replace(
/[.*+?^${}()|[\]\\]/gu,
'\\$&',
)}@)[\\d.]+\\.\\.\\.HEAD`,
'u',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Change necessary because #267 (comment)

ffmcgee725 and others added 2 commits April 29, 2026 16:14
Bring the connect-monorepo -> metamask-connect rename up to date with main:

- All in-repo GitHub URLs and prose/path references renamed
  connect-monorepo -> metamask-connect (incl. content main added after
  the PR: skills/, docs/architecture.md, README CSP sections)
- Root workspace package renamed @metamask/connect-monorepo ->
  @metamask/metamask-connect; yarn.lock regenerated accordingly
- Historical /pull/ links in CHANGELOGs left intact (GitHub redirects)
- Debug logger namespaces (metamask-connect:evm/:solana), the wagmi
  metamask-connector files, and the metamask-connect agent skill name
  are untouched

Net diff vs main is a pure rename (+257/-257). yarn constraints pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants