feat(extensions): add extensions replacement registry and automated g… - #10913
feat(extensions): add extensions replacement registry and automated g…#10913shettyvarun268 wants to merge 8 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces an extensions replacement registry and a live scraper tool to track migrations for deprecated Firebase extensions ahead of their March 2027 decommission date. It includes new scripts, registry helper functions, and co-located unit tests. The code review feedback highlights a logic bug in the live scanner's fallback mechanism where the fallback to the main branch is never reached because the URL already contains /kits/. Additionally, it is recommended to defensively initialize the replacements object in the registry to prevent potential runtime errors.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces an extensions replacement registry and a live scraper tool to track migrations for deprecated Firebase extensions before their decommission in March 2027. It includes new CLI scripts, registry data, and comprehensive unit tests. The code review feedback highlights several critical improvements: addressing potential socket leaks, infinite loops, and crash scenarios in the scraper's HTTP fetch utility; enhancing type safety by adding extensionRepositoryUrl to the ReplacementInfo interface; and explicitly handling potentially undefined package names in deprecation warning messages to prevent printing 'undefined'.
35ccc45 to
6b3c5c2
Compare
ajperel
left a comment
There was a problem hiding this comment.
Gemini ran your scrapper script for me and says you have some broken URLs to fix:
purchasely/purchasely-in-app-purchases
URL: https://github.com/purchasely/purchasely-firebase-extension/tree/main/README.md
Error: HTTP 404 (The branch name might be different or repository renamed).
moralis/moralis-streams
URL: https://github.com/MoralisWeb3/youtube-tutorials/tree/main/StreamsFrontend
Error: HTTP 404 (Points to a directory. The raw URL converter expects a file. It should likely be updated to point to StreamsFrontend/README.md).
Also it says:
"[Scraper] Scanning 68 extensions from GitHub..."
But aren't there ~100 extensions? What about the rest?
ajperel
left a comment
There was a problem hiding this comment.
Thanks for all the iterating.
Because Firebase Extensions is shutting down on March 31, 2027, developers need migration paths to official replacement packages. This PR builds the foundation to track those replacements by adding a central file (src/extensions/replacements.json) containing 113 verified extensions and their current replacement statuses. It also provides a helper (src/extensions/replacementRegistry.ts) so the CLI and Console can easily check whether an extension has a replacement and format a clear warning message.
To keep this list up to date without manual editing, this PR also introduces an automated scraper tool. When executed, the script reaches out to the GitHub repositories of all 68 extensions, reads their README files to check if the publisher has posted a replacement tag, and automatically updates replacements.json whenever new replacement packages are announced.
Runtime CLI warning banners will be hooked up in a follow-up PR.
Runbook:
Run Unit Tests:
Expect: 11 tests passing in ~20ms.
Run Live GitHub Scraper:
Expect: Scans all 113 repositories, detects merged README tags, and writes updates directly into src/extensions/replacements.json.
Check In Updates: Whenever partner publishers merge new replacement notice tags, running the scraper command above will update replacements.json, which can then be committed and pushed.