Skip to content

Add api-extractor for public API surface tracking#723

Merged
rickvdl merged 3 commits into
mainfrom
rickvdl/add-api-extractor
Mar 16, 2026
Merged

Add api-extractor for public API surface tracking#723
rickvdl merged 3 commits into
mainfrom
rickvdl/add-api-extractor

Conversation

@rickvdl

@rickvdl rickvdl commented Mar 12, 2026

Copy link
Copy Markdown
Member

Summary

  • Add @microsoft/api-extractor to both purchases-capacitor and purchases-capacitor-ui to automatically track public API surface changes
  • Generated "golden" .api.md report files that act as a snapshot of the current public API
  • Any PR that changes the public API will show a diff in the golden file, making breaking changes easy to spot in review
  • Add check-api-changes and check-api-changes-ui CI jobs that fail if the API report is out of date

How it works

  • After building, api-extractor analyzes the TypeScript declarations and generates a markdown report of all public exports
  • CI runs api-extractor and checks git diff --exit-code api-report/ — if the report changed, the developer needs to regenerate and commit the updated golden file
  • Follows the same pattern already used in purchases-hybrid-common, react-native-purchases, and purchases-js

@rickvdl rickvdl force-pushed the rickvdl/add-api-extractor branch from fe83e65 to 32fb504 Compare March 12, 2026 16:09
@rickvdl rickvdl marked this pull request as ready for review March 12, 2026 16:11
@rickvdl rickvdl requested a review from a team as a code owner March 12, 2026 16:11
@rickvdl rickvdl force-pushed the rickvdl/add-api-extractor branch from 32fb504 to e481a96 Compare March 12, 2026 16:13

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for adding this! One thing is, we should add these 2 as required jobs to merge to main after this is merged.

Comment thread .circleci/config.yml

@ajpallares ajpallares left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition!

Comment thread .circleci/config.yml
rickvdl added 2 commits March 16, 2026 16:17
…pacitor-ui

Set up API surface tracking using api-extractor for both packages:
- Add api-extractor.json config and extract-api script to both packages
- Generate initial golden .api.md files in api-report/ directories
- Add check-api-changes and check-api-changes-ui CI jobs to detect
  unintentional API changes on every build
- Add api-report to .eslintignore for both packages
- Add temp/ to .gitignore (api-extractor working directory)
@rickvdl rickvdl force-pushed the rickvdl/add-api-extractor branch from e481a96 to ef9e0b1 Compare March 16, 2026 15:17
@rickvdl rickvdl enabled auto-merge (squash) March 16, 2026 15:26
@rickvdl rickvdl merged commit e5143cf into main Mar 16, 2026
9 checks passed
@rickvdl rickvdl deleted the rickvdl/add-api-extractor branch March 16, 2026 15:27
@rickvdl

rickvdl commented Mar 16, 2026

Copy link
Copy Markdown
Member Author

Looks great! Thanks for adding this! One thing is, we should add these 2 as required jobs to merge to main after this is merged.

Done, this is now a required job :)

This was referenced Mar 18, 2026
facumenzella pushed a commit that referenced this pull request Mar 19, 2026
**This is an automatic release.**

## RevenueCat SDK
### ✨ New Features
* Add platform-specific PaywallPresentationConfiguration to
purchases-capacitor-ui (#730) via Jeffrey Bunn (@Jethro87)
* Add trackCustomPaywallImpression API with offeringId override (#725)
via Rick (@rickvdl)
### 📦 Dependency Updates
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 17.52.0 (#732) via
RevenueCat Git Bot (@RCGitBot)
* [Android
9.26.1](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.1)
* [Android
9.26.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.0)
* [iOS
5.65.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.65.0)
* [iOS
5.64.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.64.0)
* Updates purchases-hybrid-common to 17.51.1 (#729) via RevenueCat Git
Bot (@RCGitBot)
* [Android
9.26.1](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.1)
* [Android
9.26.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.0)
* [iOS
5.65.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.65.0)
* [iOS
5.64.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.64.0)
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 17.49.0 (#724) via
RevenueCat Git Bot (@RCGitBot)
* [Android
9.26.1](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.1)
* [Android
9.26.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.0)
* [iOS
5.65.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.65.0)
* [iOS
5.64.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.64.0)
* [AUTOMATIC BUMP] Updates purchases-hybrid-common to 17.48.0 (#722) via
RevenueCat Git Bot (@RCGitBot)
* [Android
9.26.1](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.1)
* [Android
9.26.0](https://github.com/RevenueCat/purchases-android/releases/tag/9.26.0)
* [iOS
5.65.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.65.0)
* [iOS
5.64.0](https://github.com/RevenueCat/purchases-ios/releases/tag/5.64.0)

## RevenueCatUI SDK
### Paywallv2
#### ✨ New Features
* Add customVariables support to purchases-capacitor-ui (#734) via
Facundo Menzella (@facumenzella)

### 🔄 Other Changes
* Add docs for new Paywall presentation APIs (#733) via Toni Rico
(@tonidero)
* Bump fastlane-plugin-revenuecat_internal from `3e8c384` to `9a6911b`
(#731) via dependabot[bot] (@dependabot[bot])
* Add api-extractor for public API surface tracking (#723) via Rick
(@rickvdl)
* Bump fastlane-plugin-revenuecat_internal from `e146447` to `3e8c384`
(#726) via dependabot[bot] (@dependabot[bot])
* Add Galaxy to the README (#721) via Will Taylor (@fire-at-will)
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.

3 participants