Skip to content

refactor: replace ts-parser with TypeDoc-based normalizer#39

Open
grdsdev wants to merge 9 commits into
mainfrom
claude/zealous-wright-bb6326
Open

refactor: replace ts-parser with TypeDoc-based normalizer#39
grdsdev wants to merge 9 commits into
mainfrom
claude/zealous-wright-bb6326

Conversation

@grdsdev

@grdsdev grdsdev commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replaces ts-parser.ts (TypeScript compiler API, syntactic-only) and parse-ts.ts with a thin normalizer (normalize-typedoc.ts) over TypeDoc 0.27 JSON output
  • TypeDoc runs the full TypeScript compiler internally, correctly handling interface, enum, type aliases, re-exports, and namespace merging that the old parser missed
  • Follows the same "external tool → thin normalizer → ParseResult" architecture established by PR feat(parsers): add Dart/Flutter public API surface parser via dartdoc_json #35 (dartdoc_json for Dart)
  • Adds entrypoint input to validate-sdk-compliance.yml (default: src/index.ts); SDK repos using the standard layout need no changes

Changes

Added:

  • scripts/capability-matrix/src/normalize-typedoc.ts — TypeDoc JSON → ParseResult normalizer
  • scripts/capability-matrix/src/normalize-typedoc-cli.ts — CLI entry point (normalize-typedoc npm script)
  • scripts/capability-matrix/test/normalize-typedoc.test.ts — 29 unit + fixture tests
  • scripts/capability-matrix/test/fixtures/typedoc-sample.json — real TypeDoc 0.27 output (hermetic, no build at test time)

Deleted:

  • scripts/capability-matrix/src/ts-parser.ts
  • scripts/capability-matrix/src/parse-ts.ts
  • scripts/capability-matrix/test/ts-parser.test.ts
  • scripts/capability-matrix/test/fixtures/ts-sample/

Modified:

  • .github/workflows/validate-sdk-compliance.yml — TypeDoc steps for javascript language; entrypoint input
  • scripts/capability-matrix/package.jsonnormalize-typedoc script replaces parse-ts
  • CLAUDE.md — updated source file table

Test plan

  • npm test — 116 tests pass (11 test files, including 29 new normalizer tests)
  • npm run typecheck — clean
  • npm run validate — schema + structural checks pass
  • CI on this PR runs green

@grdsdev grdsdev requested review from a team as code owners June 19, 2026 14:37
grdsdev added 9 commits June 19, 2026 11:39
- CLAUDE.md: remove stale ts-parser/parse-ts rows; add normalize-typedoc.ts
  and normalize-typedoc-cli.ts; clarify parse-ignore.ts is Swift-only
- docs/specs: add Behavioral Notes section explaining .sdk-parse-ignore no
  longer applies to TypeScript (TypeDoc uses entrypoint resolution instead)
- validate-sdk-compliance.yml: quote \${{ inputs.entrypoint }} in both
  TypeDoc run steps to handle paths with spaces
- normalize-typedoc.test.ts: replace vacuous _cache test with meaningful
  accessor fixture test; add Namespace (kind 4) traversal test
@grdsdev grdsdev force-pushed the claude/zealous-wright-bb6326 branch from d3c9dab to c147046 Compare June 19, 2026 14:42
@grdsdev grdsdev requested a review from mandarini June 19, 2026 14:42
grdsdev added a commit that referenced this pull request Jun 23, 2026
…icts

Merge origin/main (PRs #37#40) into this branch:
- #37: sdk-parse-ignore → .sdk-parse-ignore (already synced)
- #38: Dart symbol extractor
- #39: Swift symbolgraph parser (replaces regex parser, deletes swift-parser.test.ts)
- #40: CODEOWNERS, README, CLAUDE.md updates

Conflict resolutions:
- package.json: keep both normalize-griffe (ours) and normalize-symbolgraph (main)
- validate-sdk-compliance.yml: add Python steps alongside Dart/Swift symbolgraph steps;
  conditions on Resolve/Parse steps now exclude python, swift, and dart
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