Skip to content

Conversation

@grypez
Copy link
Contributor

@grypez grypez commented Feb 9, 2026

Replace the logError import from @metamask/snaps-utils with the standard internal logger, removing an unnecessary dependency on the snaps-utils package. This simplifies the error handling in app.ts and serve.ts by using the same logging infrastructure as the rest of the CLI.


Note

Low Risk
Small refactor limited to CLI logging and dev server error reporting, with no changes to core functionality or security-sensitive logic.

Overview
Standardizes CLI logging by switching app.ts to a configured @metamask/logger instance with a custom console transport (no tag output) and by passing that logger through to the serve/start commands.

Updates getServer in commands/serve.ts to accept an optional Logger and use it for request-handler error reporting, replacing @metamask/snaps-utils’s logError; the @metamask/snaps-utils dependency is removed from package.json/yarn.lock.

Written by Cursor Bugbot for commit 88f0f43. This will update automatically on new commits. Configure here.

@grypez grypez force-pushed the grypez/cli-logger-refactor branch from 8f763b1 to f89bf1c Compare February 9, 2026 15:48
Replace the `logError` import from `@metamask/snaps-utils` with the
standard internal logger, removing an unnecessary dependency on the
snaps-utils package. Use a custom console transport that omits tags
from terminal output, so users see clean messages without the `[cli]`
prefix while the tag is still available for programmatic consumers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 78.21%
⬇️ -0.03%
6152 / 7865
🔵 Statements 78.19%
⬇️ -0.03%
6251 / 7994
🔵 Functions 76.52%
⬇️ -0.04%
1568 / 2049
🔵 Branches 78.21%
⬇️ -0.11%
2240 / 2864
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/cli/src/app.ts 0%
🟰 ±0%
0%
🟰 ±0%
0%
🟰 ±0%
0%
🟰 ±0%
22-178
packages/cli/src/commands/serve.ts 100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
100%
🟰 ±0%
Generated in workflow #3610 for commit 88f0f43 by the Vitest Coverage Report Action

@grypez grypez force-pushed the grypez/cli-logger-refactor branch from f89bf1c to 88f0f43 Compare February 9, 2026 16:08
@grypez grypez mentioned this pull request Feb 9, 2026
5 tasks
@grypez grypez marked this pull request as ready for review February 9, 2026 21:42
@grypez grypez requested a review from a team as a code owner February 9, 2026 21:42
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@grypez grypez added this pull request to the merge queue Feb 9, 2026
Merged via the queue into main with commit 203e063 Feb 9, 2026
52 of 56 checks passed
@grypez grypez deleted the grypez/cli-logger-refactor branch February 9, 2026 21:53
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.

2 participants