Skip to content

feat(cli): implement report command with info and usage subcommands#35842

Draft
Hotell wants to merge 12 commits intomicrosoft:experimental/fluent-clifrom
Hotell:exp/fluent-cli/cmd/report
Draft

feat(cli): implement report command with info and usage subcommands#35842
Hotell wants to merge 12 commits intomicrosoft:experimental/fluent-clifrom
Hotell:exp/fluent-cli/cmd/report

Conversation

@Hotell
Copy link
Contributor

@Hotell Hotell commented Mar 6, 2026

Description

Implements the report command for @fluentui/cli with two subcommands:

report info

Quick package & environment summary for end-users reporting issues. Outputs system info, installed Fluent UI package versions, and duplicate package warnings.

report usage

Deep codebase usage analysis for the core team. Parses .ts/.tsx files and classifies every imported symbol from tracked packages into five categories:

Category What it captures Tracked details
Components React components (JSX elements) Per-component prop usage with values
Hooks React hooks (use* naming) Call-site argument usage with values
Types TypeScript interfaces, type aliases, enums typeof reference count, generic type arguments
Others Value exports (constants, utilities, themes) Call-site argument usage when invoked
Unknowns Symbols whose .d.ts could not be resolved Naming-convention-based description

Supports --reporter json|markdown|html, --path, --include, and --exclude flags.

Output includes a legend describing each category, a fileMap of analyzed files, and per-package usage metadata.

Highlights

  • Symbol classification via ts-morph .d.ts resolution — not just naming heuristics
  • Rich type tracking — distinguishes typeof X from standard annotations, captures generic type args like ColumnDef<{name: string}>
  • Subcommand UX — clean separation of concerns (no conditional flag validation)
  • Three output formats — JSON (machine-readable), Markdown (concise), HTML (interactive with dark mode)
  • Comprehensive tests — 148 tests across 11 test suites

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

@Hotell Hotell requested a review from a team as a code owner March 6, 2026 12:06
@Hotell Hotell marked this pull request as draft March 6, 2026 12:06
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

Pull request demo site: URL

Hotell and others added 3 commits March 6, 2026 13:21
- Add public accessibility modifiers to TsMorphAstParser methods
- Rename private methods with leading underscore per naming convention
- Replace no-explicit-any with proper types in test mocks
- Fix dot-notation violations (auto-fixed)
- Remove unused eslint-disable directive
- Use type:'string'+array:true instead of string:true for yargs options

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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