Skip to content

Commit 0e89132

Browse files
committed
chore: add workflow for updating the public api surface
1 parent 0a1d94a commit 0e89132

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
description: How to make changes to the public API surface
3+
---
4+
5+
# Updating the Public API Surface
6+
7+
This codebase (Firebase Admin Node.js SDK) uses `api-extractor` to automatically track and document the public-facing API surface. Any time you modify exported interfaces, signatures, JSDoc comments, or anything else belonging to the public surface of the SDK, you **must** update the API reports.
8+
9+
## Steps
10+
11+
1. Make your code changes (e.g., adding a property to an interface, modifying JSDoc, adding a new exported class).
12+
2. Write appropriate unit and integration tests.
13+
3. Run the complete test suite.
14+
4. Run the API Extractor report generator command from the root of the project:
15+
```bash
16+
npm run api-extractor:local
17+
```
18+
5. Running `api-extractor:local` first runs the `build` script (`npm run build`), which takes a moment. It then updates any outdated `.md` files located in the `etc/` folder (such as `etc/firebase-admin.app-check.api.md`).
19+
6. You will see modified `.md` report files inside `etc/` in `git status`. Stage these changes alongside your code changes when doing `git commit`.
20+
21+
**Remember**: Failure to run this script will result in the CI rejecting the PR because the generated API surface reports commit will be out-of-sync with the codebase!

0 commit comments

Comments
 (0)