You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI --fields silently ignored by custom jsonTransforms #1808
A command's output.jsonTransform replaces the default JSON path in renderCommandOutput (packages/cli/src/lib/formatters/output.ts), including --fields filtering. Transforms that never read their fields argument print the full object, with no error or warning, when you pass --fields.
Commands that did this on main:
alert issues create|edit|delete|view
alert metrics create|edit|delete
auth list
dashboard widget delete
issue merge, issue resolve
project delete
For example, sentry project delete my-org/my-app --json --fields project printed {"deleted":true,"org":"my-org","project":"my-app"}.
Nothing caught it: the transform's type, (data: T, fields?: string[]) => unknown, accepts a one-parameter function, and the tests only checked the unfiltered output.
Raised by BYK while reviewing #1783. That PR fixes the commands above and adds a sentry-cli/json-transform-uses-fields lint rule against new cases.
Activity
linear-code commentedon Nov 2, 2026
MCP-1144
fix(cli): Apply --fields in every custom jsonTransform
feat(cli): Complete --fields on org, project, release, dashboard, ale…
fix(cli): Apply --fields in every custom jsonTransform (getsentry#1816)