Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@
"gem:bundle:install": "bundle install --gemfile=ios/Gemfile",
"clean:android": "rm -rf android/app/build",
"clean": "yarn clean:ios && yarn clean:android && yarn install --immutable",
"generate-method-action-types": "messenger-generate-action-types --fix app && prettier --write 'app/**/*-method-action-types.ts'",
"generate-method-action-types:check": "yarn generate-method-action-types && git diff --exit-code 'app/**/*-method-action-types.ts'",
"lint": "NODE_OPTIONS='--max-old-space-size=8192' eslint '**/*.{js,ts,tsx}' --cache && yarn generate-method-action-types:check",
"lint:fix": "NODE_OPTIONS='--max-old-space-size=8192' eslint '**/*.{js,ts,tsx}' --fix --cache && yarn generate-method-action-types",
"lint": "NODE_OPTIONS='--max-old-space-size=8192' eslint '**/*.{js,ts,tsx}' --cache && yarn messenger-action-types:check",
"lint:fix": "NODE_OPTIONS='--max-old-space-size=8192' eslint '**/*.{js,ts,tsx}' --fix --cache && yarn messenger-action-types:generate",
"lint:clean": "rm -f .eslintcache",
"lint:tsc": "NODE_OPTIONS='--max-old-space-size=8192' tsc --project ./tsconfig.json",
"format": "prettier '**/*.{js,ts,tsx,json}' --write",
Expand Down Expand Up @@ -152,7 +150,9 @@
"a:ios": "scripts/perps/agentic/preflight.sh --platform ios --wallet-setup",
"a:android": "scripts/perps/agentic/preflight.sh --platform android --wallet-setup",
"a:setup:ios": "scripts/perps/agentic/preflight.sh --platform ios --clean --wallet-setup",
"a:setup:android": "scripts/perps/agentic/preflight.sh --platform android --clean --wallet-setup"
"a:setup:android": "scripts/perps/agentic/preflight.sh --platform android --clean --wallet-setup",
"messenger-action-types:generate": "messenger-action-types --generate app && prettier --write \"app/**/*-method-action-types.ts\"",
"messenger-action-types:check": "messenger-action-types --generate app; prettier --write \"app/**/*-method-action-types.ts\" && git diff --exit-code \"app/**/*-method-action-types.ts\""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Semicolon silently ignores generation failure in check script

High Severity

The messenger-action-types:check script uses a semicolon (;) instead of && after the messenger-action-types --generate app command. This means if the generation step fails (non-zero exit), the error is silently ignored, and the script continues to run prettier and git diff --exit-code. Since no files changed (generation failed), git diff --exit-code passes, making the overall lint command succeed even though codegen is broken. The :generate script correctly uses &&, so this inconsistency appears unintentional.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 046008cd18e515493e34ce3ed2dcf65f09cf4b5c. Configure here.

},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
Expand Down Expand Up @@ -542,6 +542,7 @@
"@metamask/eslint-config-typescript": "^13.0.0",
"@metamask/eslint-plugin-design-tokens": "^1.0.0",
"@metamask/foundryup": "1.0.0",
"@metamask/messenger-cli": "^0.1.0",
"@metamask/mobile-provider": "^3.0.0",
"@metamask/object-multiplex": "^1.1.0",
"@metamask/providers": "^18.3.1",
Expand Down
19 changes: 19 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8904,6 +8904,24 @@ __metadata:
languageName: node
linkType: hard

"@metamask/messenger-cli@npm:^0.1.0":
version: 0.1.0
resolution: "@metamask/messenger-cli@npm:0.1.0"
dependencies:
"@metamask/utils": "npm:^11.9.0"
yargs: "npm:^17.7.2"
peerDependencies:
eslint: ">=8"
typescript: ">=5.0.0"
peerDependenciesMeta:
eslint:
optional: true
bin:
messenger-action-types: ./dist/cli.mjs
checksum: 10/dd359df00f2eba98dcfe5f3d8352d859f2e814220e709efe989ecb68c611ba32ea515fd6099a770a706066f1820abd07a134a2acf5fc6b883518c5d19991a8e2
languageName: node
linkType: hard

"@metamask/messenger@npm:^1.0.0, @metamask/messenger@npm:^1.1.0, @metamask/messenger@npm:^1.1.1":
version: 1.1.1
resolution: "@metamask/messenger@npm:1.1.1"
Expand Down Expand Up @@ -35490,6 +35508,7 @@ __metadata:
"@metamask/logging-controller": "npm:^8.0.0"
"@metamask/message-signing-snap": "npm:^1.1.2"
"@metamask/messenger": "npm:^1.1.0"
"@metamask/messenger-cli": "npm:^0.1.0"
"@metamask/metamask-eth-abis": "npm:3.1.1"
"@metamask/mobile-provider": "npm:^3.0.0"
"@metamask/mobile-wallet-protocol-core": "npm:^0.4.0"
Expand Down
Loading