Skip to content

build: remove api-extractor-related forked libraries - #10233

Draft
hsubox76 wants to merge 15 commits into
mainfrom
ch-api-extractor-upgrade
Draft

build: remove api-extractor-related forked libraries#10233
hsubox76 wants to merge 15 commits into
mainfrom
ch-api-extractor-upgrade

Conversation

@hsubox76

@hsubox76 hsubox76 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Remove api-extractor forked libraries

Background

A while back we forked @microsoft/api-extractor in order to handle multiple entry points, as the official library didn't. The official library still doesn't and the fork has become very out of date. We also had to fork a number of its dependencies. We also forked api-documenter, but that was to address a need we still can't work around - special formatting for our devsite. We can work around the multiple entry points by making multiple api-extractor config files.

Change overview

We are switching all our forks to use the official Microsoft Rushstack versions except for api-documenter, but we are updating our forked api-documenter's dependencies (api-extractor-model for example) to no longer be based on other unmaintained forks of those deps.

Note that keeping api-documenter forked is maintainable since we keep that fork in our repo in repo-scripts/ and version and publish it. The other forks lived in personal github repos of a team member who has since left.

Since @firebase/api-documenter is an actual npm package we publish and is used by firebase-admin-node and firebase-functions, I have bumped the version with these changes and it will get published with the next release. The changes involve adding an optional flag and should not break the other two libraries.

Jetski summaries

Code changes

  • Upgraded API Extractor & Documenter Tooling:
    • Migrated from legacy custom forks to official, modern Microsoft Rushstack packages:
      • api-extractor-me 0.1.2 $\rightarrow$ @microsoft/api-extractor 7.58.10
      • api-extractor-model-me 0.1.1 $\rightarrow$ @microsoft/api-extractor-model 7.33.9
      • @microsoft/tsdoc 0.12.24 $\rightarrow$ 0.16.0
      • @rushstack/ts-command-line 4.23.3 $\rightarrow$ 5.3.11
      • @rushstack/node-core-library 5.19.1 $\rightarrow$ 5.23.2
    • Bumped @firebase/api-documenter from 0.5.0 to 0.6.0 and updated it to retain package name formatting, preserve TOC navigation titles, and improve cross-package link resolution.
  • Fixed Broken Doc Links: Updated doc comments in Firestore and Analytics source code to resolve broken @link references.
  • Cleaned Up Auth updateProfile Signature: Updated updateProfile parameter handling in Auth to produce a clean signature and eliminate phantom entries in the generated documentation table.
  • Added Devsite Redirects: Added _redirects.yaml generation to smoothly redirect legacy URLs (e.g., firestore_ and messaging_) to canonical paths.
  • Regenerated Reference Documentation: Rebuilt the docs-devsite markdown files and table of contents with 100% active, resolved links.

Changes in generated doc md files

Here is a brief summary of the differences in docs-devsite compared to main:

  • Anchor Hash Updates: Anchor and link target hashes have been updated to the deterministic 7-character hex suffixes emitted by modern API Extractor.
  • Canonical Filenames (Removed Trailing Underscores): Replaced legacy firestore_.md and messaging_.md (along with their member pages like firestore_.*) with canonical firestore.md, messaging.md, and firestore.* filenames.
  • Repaired Doc Links: Previously broken cross-package links and doc comments are now live, clickable hyperlinks (e.g., logEvent in Analytics, pipeline stage methods in Firestore, getToken/register in Messaging SW).
  • Cleaned Up Auth updateProfile: Replaced the phantom duplicate (not declared) parameter table entry with a clean updateProfile(user, profile) signature.
  • TOC Cleanup (_toc.yaml): Updated navigation links to canonical file paths and trimmed duplicate re-exports of core Firestore types from pipeline TOC sections.
  • Added _redirects.yaml: Added redirect rules so any legacy incoming links to firestore_ or messaging_ routes redirect seamlessly to canonical paths.

@changeset-bot

changeset-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 525d4bd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@firebase/analytics Patch
@firebase/firestore Patch
@firebase/messaging Patch
@firebase/auth Patch
@firebase/analytics-compat Patch
firebase Patch
@firebase/firestore-compat Patch
@firebase/messaging-compat Patch
@firebase/auth-compat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@wiz-9635d3485b

wiz-9635d3485b Bot commented Jul 29, 2026

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities 2 High
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 2 Medium 2 Low
Software Management Finding Software Management Findings -
Total 2 High 2 Medium 2 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request migrates the project from a custom api-extractor-me package to the official @microsoft/api-extractor package, updating configuration files and build scripts for the messaging package accordingly. It also updates the documentation generator script to support copying multiple API JSON files. Feedback on these changes includes correcting an invalid and temporarily hardcoded package path in the docgen script, as well as renaming a loop variable to avoid shadowing the imported path module.

Comment thread scripts/docgen/docgen.ts Outdated
Comment thread scripts/docgen/docgen.ts Outdated
@hsubox76
hsubox76 force-pushed the ch-api-extractor-upgrade branch from 8eab1fc to a5d8dc4 Compare August 18, 2026 17:23
@hsubox76 hsubox76 changed the title api-extractor replacement test docs: remove api-extractor-related forked libraries Aug 18, 2026
@hsubox76 hsubox76 changed the title docs: remove api-extractor-related forked libraries build: remove api-extractor-related forked libraries Aug 19, 2026
@hsubox76

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates the API extractor and documentation pipeline across several Firebase packages, upgrading @microsoft/api-extractor and @microsoft/api-extractor-model and introducing filename mapping support to clean up generated documentation. Feedback on these changes includes addressing potential runtime TypeError crashes in MarkdownDocumenterHelpers.ts when contextApiItem is undefined, and in account_info.ts if the profile parameter is null or undefined. Additionally, it is recommended to fail fast and throw an error for invalid filename mapping formats in BaseAction.ts rather than silently ignoring them.

Comment thread repo-scripts/api-documenter/src/documenters/MarkdownDocumenterHelpers.ts Outdated
Comment thread repo-scripts/api-documenter/src/documenters/MarkdownDocumenterHelpers.ts Outdated
Comment thread packages/auth/src/core/user/account_info.ts
Comment thread repo-scripts/api-documenter/src/cli/BaseAction.ts Outdated
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