feat: migrate to @metamask/messenger-cli for action types codegen#3943
Open
cryptodev-2s wants to merge 5 commits intomainfrom
Open
feat: migrate to @metamask/messenger-cli for action types codegen#3943cryptodev-2s wants to merge 5 commits intomainfrom
cryptodev-2s wants to merge 5 commits intomainfrom
Conversation
- 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
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
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
Migrates from the deprecated
messenger-generate-action-typesbinary in@metamask/messengerto the new standalone@metamask/messenger-clipackage.Changes
@metamask/messenger-cli@^0.1.0as devDependency tosnaps-controllerstopic:actionpattern:messenger-action-types:check— checks if generated files are up to datemessenger-action-types:generate— generates/updates action type filessnaps-controllers--checkintolintand--generateintolint:fixgenerate-method-action-typesscriptReferences
Checklist
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-controllersfrom the deprecatedmessenger-generate-action-typesbinary to the standalone@metamask/messenger-cli(messenger-action-types).Updates root and package scripts to use
messenger-action-types:checkduringlintandmessenger-action-types:generateduringlint:fix, removes the oldgenerate-method-action-typesscript, and adds@metamask/messenger-clias a devDependency (with associatedyarn.lockupdates).Reviewed by Cursor Bugbot for commit 8f8175f. Bugbot is set up for automated code reviews on this repo. Configure here.