refactor: rename connect-monorepo to metamask-connect#267
Conversation
| // 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`, |
| [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 |
There was a problem hiding this comment.
@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:
- Each package runs
validate-changelog.sh→auto-changelog validate --prettier --tag-prefix "<package>@" - The
--repoflag defaults to readingrepository.urlfrompackage.json— which now points tohttps://github.com/MetaMask/metamask-connect - 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 frompackage.json - It does a string comparison between the reconstructed changelog and the original. Since the original still had
connect-monorepoURLs in the link definitions but the reconstructed version usesmetamask-connect, it throwsChangelogFormattingError
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-monorepo → metamask-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-monorepo → metamask-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:validatepasses 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)
…encoding' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
| `\\[Unreleased\\]: (https://github\\.com/MetaMask/metamask-connect/compare/${packageName.replace( | ||
| /[.*+?^${}()|[\]\\]/gu, | ||
| '\\$&', | ||
| )}@)[\\d.]+\\.\\.\\.HEAD`, | ||
| 'u', |
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.
Explanation
The GitHub repo is being renamed from
MetaMask/connect-monorepotoMetaMask/metamask-connectto align the repo name with the external product name. This PR updates all in-repo references to the old name.Changes by category:
package.json@metamask/connect-monorepo→@metamask/metamask-connectpackage.jsonrepository,bugs,homepagefields across all packages, playgrounds, and the package templatedocs/contributing.mdresolutionsexample)scripts/bump-dependent-playgrounds.tsscripts/generate-preview-build-message.tsNot changed:
yarn install@metamask/connect,@metamask/connect-evm, etc. are unchangedgithub.repositorycontextReferences
Checklist