Replace @microsoft/api-extractor with TypeDoc#11384
Conversation
api-extractor is aging, lightly maintained, and does not support modern ESM export maps. Replace its two uses in the core packages with TypeDoc: - tspd typekit reference doc generation now builds its model from TypeDoc instead of @microsoft/api-extractor-model (removes 4 @microsoft/* deps). - Public-API documentation enforcement (previously api-extractor's ae-undocumented check) is now a TypeDoc-based eng/tsp-core/scripts/ check-api-docs.ts script, wired into build for json-schema, openapi, xml. Removes api-extractor.base.json, the 8 per-package api-extractor.json configs, and the @microsoft/api-extractor* catalog/root dependencies.
|
@FionaBronwen @swatkatz @steverice — this PR modifies files in the |
@typespec/asset-emitter
@typespec/compiler
@typespec/graphql
@typespec/http
@typespec/json-schema
@typespec/openapi
@typespec/openapi3
@typespec/tspd
@typespec/xml
commit: |
|
All changed packages have been documented.
Show changes
|
|
You can try these changes here
|
Motivation
@microsoft/api-extractoris aging, lightly maintained, and — most importantly — does not support modern ESM export maps (multiple entry points). This PR replaces its two uses in the core TypeSpec packages +tspdwith TypeDoc.What changed
1.
tspdtypekit reference docs (@microsoft/api-extractor-model→ TypeDoc)packages/tspd/src/ref-doc/typekit-model.tsbuilds the typekit model from TypeDoc.api-extractor.ts+tsdoc.tsxand the 4@microsoft/{api-extractor,api-extractor-model,tsdoc,tsdoc-config}dependencies.typekits.mdxfor the standard library and http (output is equivalent; only intended diffs).2. Public-API documentation enforcement (
ae-undocumented→ TypeDoc)eng/tsp-core/scripts/check-api-docs.ts: a TypeDoc-based checker that validates every stable public entry point (unlike api-extractor's single entry point), supporting ESM export maps.api-extractorpackage script withcheck-api-docsin compiler, http, openapi, openapi3, json-schema, xml, asset-emitter.check-api-docsintobuildfor the three packages that enforced docs before (json-schema, openapi, xml) — all pass with parity (0 findings).3. Removal
api-extractor.base.jsonand the 8 per-packageapi-extractor.jsonconfigs.@microsoft/api-extractor*catalog entries and root devDependency.Notes
compiler/http/openapi3/asset-emitterhavecheck-api-docsavailable but not wired intobuildyet — they carry pre-existing doc debt. Enabling enforcement there is a future docs effort.Validation
check-api-docspasses for json-schema / openapi / xml (parity with the oldae-undocumented).tspdbuilds and lints clean; regenerated docs contain only intended diffs.