Skip to content

feat: migrate to @metamask/messenger-cli for action types codegen#3943

Open
cryptodev-2s wants to merge 5 commits intomainfrom
feat/messenger-cli-action-types
Open

feat: migrate to @metamask/messenger-cli for action types codegen#3943
cryptodev-2s wants to merge 5 commits intomainfrom
feat/messenger-cli-action-types

Conversation

@cryptodev-2s
Copy link
Copy Markdown
Contributor

@cryptodev-2s cryptodev-2s commented Apr 3, 2026

Explanation

Migrates from the deprecated messenger-generate-action-types binary in @metamask/messenger to the new standalone @metamask/messenger-cli package.

Changes

  • Add @metamask/messenger-cli@^0.1.0 as devDependency to snaps-controllers
  • Add per-package scripts following topic:action pattern:
    • messenger-action-types:check — checks if generated files are up to date
    • messenger-action-types:generate — generates/updates action type files
  • Add root scripts delegating to snaps-controllers
  • Integrate --check into lint and --generate into lint:fix
  • Remove old generate-method-action-types script

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 highlighted breaking changes using the "BREAKING" keyword

Note

Low Risk
Low risk: changes are limited to developer tooling (scripts, lint integration, and devDependencies) and should not affect runtime behavior, though CI/lint may fail if the new action-type generation checks differ from the old ones.

Overview
Migrates action-type code generation in snaps-controllers from the deprecated messenger-generate-action-types binary to the standalone @metamask/messenger-cli (messenger-action-types).

Updates root and package scripts to use messenger-action-types:check during lint and messenger-action-types:generate during lint:fix, removes the old generate-method-action-types script, and adds @metamask/messenger-cli as a devDependency (with associated yarn.lock updates).

Reviewed by Cursor Bugbot for commit 8f8175f. Bugbot is set up for automated code reviews on this repo. Configure here.

- Add @metamask-previews/messenger-cli as devDependency to snaps-controllers
- Add messenger-action-types-codegen root script targeting snaps-controllers
- Add --check to lint and --fix to lint:fix
- Remove per-package generate-method-action-types script
- Binary: messenger-action-types-codegen --fix / --check
@socket-security
Copy link
Copy Markdown

socket-security bot commented Apr 3, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​metamask/​messenger-cli@​0.1.0761007589100
Updatedeslint@​9.20.1 ⏵ 9.39.489 +110010096 -1100

View full report

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.56%. Comparing base (26ff2aa) to head (8f8175f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3943   +/-   ##
=======================================
  Coverage   98.56%   98.56%           
=======================================
  Files         426      426           
  Lines       12316    12316           
  Branches     1935     1935           
=======================================
  Hits        12139    12139           
  Misses        177      177           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cryptodev-2s cryptodev-2s marked this pull request as ready for review April 4, 2026 07:34
@cryptodev-2s cryptodev-2s requested a review from a team as a code owner April 4, 2026 07:34
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.

1 participant