Skip to content

Publish API doc model as pipeline artifact; extract shared api-extractor.json config into rigs#5663

Merged
iclanton merged 8 commits intomainfrom
publish-api-artifact
Feb 22, 2026
Merged

Publish API doc model as pipeline artifact; extract shared api-extractor.json config into rigs#5663
iclanton merged 8 commits intomainfrom
publish-api-artifact

Conversation

@iclanton
Copy link
Member

@iclanton iclanton commented Feb 22, 2026

Summary

This PR makes API Extractor .api.json doc model files available as pipeline artifacts and reduces config duplication across 55 projects.

Changes

1. Publish API artifact from pipelines

Add a post-publish step to the AzDO npm-publish and npm-publish-rush pipelines that collects .api.json files and publishes them as a build artifact.

2. Extract shared api-extractor.json into rig configs

Create api-extractor-base.json in local-node-rig, decoupled-local-node-rig, and local-web-rig containing the common settings (mainEntryPointFilePath, apiReport, docModel, dtsRollup). Each project's api-extractor.json now uses extends to inherit from its rig, keeping only project-specific overrides. This eliminates ~950 lines of duplicated config.

The file is named api-extractor-base.json (not api-extractor.json) to avoid unintentional auto-discovery by Heft's rig resolution for projects that don't use API Extractor.

3. Move docModel output to per-project temp/api/

Change apiJsonFilePath from the shared common/temp/api/ directory to per-project <projectFolder>/temp/api/ folders. This is already covered by the upstream rig's outputFolderNames (which includes temp), so the files participate in the Rush build cache automatically.

4. Refactor collect-json-schemas into generic collect-project-files

Rename CollectJsonSchemasAction to CollectProjectFilesAction and add a --subfolder parameter so it can collect files from any per-project subfolder. Update post-publish.yaml and ci.yml to use the new action for both JSON schemas and API doc model files.

Stats

  • 62 files changed, +180 / -1,122 lines

@iclanton iclanton force-pushed the publish-api-artifact branch from 08cf9ec to 45a3a95 Compare February 22, 2026 21:36
Move the shared api-extractor.json configuration (mainEntryPointFilePath,
apiReport, docModel, dtsRollup) into base configs in local-node-rig,
decoupled-local-node-rig, and local-web-rig. Each project's config now
uses 'extends' to inherit from its rig, with only project-specific
overrides remaining.
@iclanton iclanton requested a review from TheLarkInn as a code owner February 22, 2026 22:09
Change apiJsonFilePath from the shared common/temp/api/ directory to
per-project <projectFolder>/temp/api/ folders. Add temp/api to the
build phase outputFolderNames in all three rig rush-project.json configs
so the API JSON files are included in the Rush build cache.
Rename CollectJsonSchemasAction to CollectProjectFilesAction and add a
--subfolder parameter so the same action can collect files from any
per-project subfolder. Update post-publish.yaml and ci.yml to use
'collect-project-files --subfolder temp/json-schemas' for JSON schemas
and 'collect-project-files --subfolder temp/api' for API review files,
replacing the previous bash cp command.
@iclanton iclanton force-pushed the publish-api-artifact branch from d59fb25 to 89990ba Compare February 22, 2026 22:12
@iclanton iclanton changed the title Publish *.api.json files as a pipeline artifact from npm publish pipelines Publish API doc model as pipeline artifact; extract shared api-extractor.json config into rigs Feb 22, 2026
@iclanton iclanton merged commit f98df0d into main Feb 22, 2026
9 checks passed
@iclanton iclanton deleted the publish-api-artifact branch February 22, 2026 22:53
@github-project-automation github-project-automation bot moved this from Needs triage to Closed in Bug Triage Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Closed

Development

Successfully merging this pull request may close these issues.

2 participants