build: remove api-extractor-related forked libraries - #10233
Conversation
🦋 Changeset detectedLatest commit: 525d4bd The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
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 Scan Summary
To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio. |
There was a problem hiding this comment.
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.
8eab1fc to
a5d8dc4
Compare
|
/gemini review |
There was a problem hiding this comment.
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.
Remove api-extractor forked libraries
Background
A while back we forked
@microsoft/api-extractorin 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 forkedapi-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-documenterforked is maintainable since we keep that fork in our repo inrepo-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-documenteris an actual npm package we publish and is used byfirebase-admin-nodeandfirebase-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
api-extractor-me0.1.2@microsoft/api-extractor7.58.10api-extractor-model-me0.1.1@microsoft/api-extractor-model7.33.9@microsoft/tsdoc0.12.240.16.0@rushstack/ts-command-line4.23.35.3.11@rushstack/node-core-library5.19.15.23.2@firebase/api-documenterfrom0.5.0to0.6.0and updated it to retain package name formatting, preserve TOC navigation titles, and improve cross-package link resolution.@linkreferences.updateProfileSignature: UpdatedupdateProfileparameter handling in Auth to produce a clean signature and eliminate phantom entries in the generated documentation table._redirects.yamlgeneration to smoothly redirect legacy URLs (e.g.,firestore_andmessaging_) to canonical paths.docs-devsitemarkdown 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-devsitecompared tomain:firestore_.mdandmessaging_.md(along with their member pages likefirestore_.*) with canonicalfirestore.md,messaging.md, andfirestore.*filenames.logEventin Analytics, pipeline stage methods in Firestore,getToken/registerin Messaging SW).updateProfile: Replaced the phantom duplicate(not declared)parameter table entry with a cleanupdateProfile(user, profile)signature._toc.yaml): Updated navigation links to canonical file paths and trimmed duplicate re-exports of core Firestore types from pipeline TOC sections._redirects.yaml: Added redirect rules so any legacy incoming links tofirestore_ormessaging_routes redirect seamlessly to canonical paths.