Skip to content

ci: add API Extractor configuration and automated public API surface …#147

Open
Oluwasuyi-Oluwatimilehin-Daniel wants to merge 2 commits into
Adamantine-guild:mainfrom
Oluwasuyi-Oluwatimilehin-Daniel:test/add-public-api-report
Open

ci: add API Extractor configuration and automated public API surface …#147
Oluwasuyi-Oluwatimilehin-Daniel wants to merge 2 commits into
Adamantine-guild:mainfrom
Oluwasuyi-Oluwatimilehin-Daniel:test/add-public-api-report

Conversation

@Oluwasuyi-Oluwatimilehin-Daniel

Copy link
Copy Markdown

#closes #91

📝 Description

Resolves #91

This PR implements an automated Public API Report system using @microsoft/api-extractor. It establishes a monitored baseline for our exported classes, configurations, types, and interfaces, ensuring accidental breaking changes or unintended surface exposure are caught before they hit production.

⚙️ Changes Introduced

  • Dependency Management: Added @microsoft/api-extractor to devDependencies.
  • Configuration: Created api-extractor.json targeting dist/index.d.ts as the primary API surface entry point.
  • Automation Scripts: Added pnpm api-report (local updating) and pnpm api-report:ci (strict verification) to package.json.
  • CI/CD Guardrail: Set up .github/workflows/ci.yml from scratch to enforce API snapshot matching on all incoming PRs.
  • Documentation: Updated CONTRIBUTING.md with operational guidance for contributors who modify public type signatures.
  • Baseline Report: Generated the initial public API snapshot in api-report/guildpass-sdk.api.md.

🧪 Verification Results

Successfully generated the baseline report locally via Power温shell:

Analysis will use the bundled TypeScript version 5.9.3
Generating complete API report: .../api-report/guildpass-sdk.api.md
Warning: The API report file was missing, so a new file was created.
API Extractor completed successfully
#closes 

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.

Add a public API report for exported types

1 participant