Skip to content

fix(cli): default missing props to {} in split-concerns output (#84)#85

Merged
nathanacurtis merged 1 commit into
mainfrom
fix/cli-props-default-object
May 8, 2026
Merged

fix(cli): default missing props to {} in split-concerns output (#84)#85
nathanacurtis merged 1 commit into
mainfrom
fix/cli-props-default-object

Conversation

@nathanacurtis
Copy link
Copy Markdown
Member

Summary

  • splitComponentByConcern and extractApiFromSubcomponents were filling missing props with [] instead of {}, producing output that violated the schema (Props is an object). Components with no Figma properties (e.g. egdsDivider, egdsSearchBarExperimental) now emit props: {}.
  • Corrects ComponentApiData / SubcomponentApiData to type props as Record<string, any>.
  • Bumps CLI to 0.13.1; adds regression tests for both helpers.

Test plan

  • npm test in packages/cli — 176 passed (3 new)
  • npm run build succeeds
  • Verify against a real --split-concerns run on a propless component

Closes #84

🤖 Generated with Claude Code

splitComponentByConcern and extractApiFromSubcomponents were filling
missing props with [] instead of {}, violating the schema where Props
is an object. Corrects ComponentApiData/SubcomponentApiData typings to
Record<string, any> and adds regression tests.

Closes #84

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@nathanacurtis nathanacurtis merged commit fac64bb into main May 8, 2026
@nathanacurtis nathanacurtis deleted the fix/cli-props-default-object branch May 8, 2026 11:18
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.

splitComponentByConcern defaults props to [] instead of {}

1 participant