Skip to content

feat(workspace-plugin): support export maps in generate-api executor#35997

Draft
Hotell wants to merge 5 commits intomicrosoft:masterfrom
Hotell:tools/support-export-maps-for-generate-api
Draft

feat(workspace-plugin): support export maps in generate-api executor#35997
Hotell wants to merge 5 commits intomicrosoft:masterfrom
Hotell:tools/support-export-maps-for-generate-api

Conversation

@Hotell
Copy link
Copy Markdown
Contributor

@Hotell Hotell commented Apr 16, 2026

Summary

Adds support for package.json exports map (sub-path and wildcard entries) in the generate-api executor, enabling packages like @fluentui/react-headless-components-preview to generate per-entry API reports and .d.ts rollups.

Changes

  • react-headless-components: Add sub-path imports support via package.json exports map
  • generate-api executor: Expand wildcard typed exports (e.g. ./*) into individual api-extractor runs, producing per-directory .d.ts rollups and API reports under /etc
  • generate-api executor: Make enableWildcardExpansion a configurable schema flag (defaults to true)
  • Refactor: Remove hard-coded src/components coupling — derive paths generically from declarationBase and the types pattern
  • Refactor: Extract small named functions (resolveDeclarationBase, parseWildcardTypesPattern, listSubDirectories, createWildcardEntryConfig, resolveConfigSource)
  • Refactor: Deduplicate isWildcardTypedEntry into shared utils.ts
  • Workspace plugin: Simplify buildGenerateApiTarget — use broad glob outputs (dist/**/*.d.ts, etc/*.api.md) when additional configs or wildcard exports exist
  • Tests: Add focused test cases for generate-api target input/output configuration

@github-actions
Copy link
Copy Markdown

Pull request demo site: URL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant