Skip to content

feat(extensions): add extensions replacement registry and automated g… - #10913

Open
shettyvarun268 wants to merge 8 commits into
mainfrom
extension-replacements-registry
Open

feat(extensions): add extensions replacement registry and automated g…#10913
shettyvarun268 wants to merge 8 commits into
mainfrom
extension-replacements-registry

Conversation

@shettyvarun268

@shettyvarun268 shettyvarun268 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

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:

npx mocha -r ts-node/register src/extensions/replacementRegistry.spec.ts scripts/extensions-scraper/index.spec.ts

Expect: 11 tests passing in ~20ms.

Run Live GitHub Scraper:

npm run scrape:extensions

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.

Comment thread scripts/extensions-scraper/index.ts Fixed

@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 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.

Comment thread scripts/extensions-scraper/run-live-scan.ts Outdated
Comment thread scripts/extensions-scraper/index.ts Outdated
@shettyvarun268

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 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'.

Comment thread scripts/extensions-scraper/run-live-scan.ts Outdated
Comment thread src/extensions/replacementRegistry.ts Outdated
Comment thread src/extensions/replacementRegistry.ts
@shettyvarun268
shettyvarun268 force-pushed the extension-replacements-registry branch from 35ccc45 to 6b3c5c2 Compare August 10, 2026 17:21
@shettyvarun268
shettyvarun268 marked this pull request as ready for review August 10, 2026 17:47
Comment thread scripts/extensions-scraper/index.ts Outdated
Comment thread scripts/extensions-scraper/index.ts
Comment thread src/extensions/replacementRegistry.ts Outdated
Comment thread scripts/extensions-scraper/run-live-scan.ts Outdated
Comment thread scripts/extensions-scraper/run-live-scan.ts

@ajperel ajperel 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.

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?

Comment thread scripts/extensions-scraper/index.spec.ts
Comment thread scripts/extensions-scraper/index.ts Outdated
Comment thread scripts/extensions-scraper/index.ts Outdated
Comment thread scripts/extensions-scraper/index.ts
Comment thread src/extensions/replacements.json Outdated
Comment thread src/extensions/replacements.json Outdated
Comment thread src/extensions/replacementRegistry.ts
Comment thread src/extensions/replacements.json Outdated
Comment thread scripts/extensions-scraper/index.ts Outdated
Comment thread scripts/extensions-scraper/index.ts Outdated
Comment thread scripts/extensions-scraper/run-live-scan.ts Outdated
Comment thread src/extensions/replacements.json Outdated
Comment thread src/extensions/replacements.json Outdated
Comment thread scripts/extensions-scraper/index.ts
Comment thread scripts/extensions-scraper/run-live-scan.ts Outdated
Comment thread scripts/extensions-scraper/run-live-scan.ts Outdated
Comment thread scripts/extensions-scraper/run-live-scan.ts Outdated
@shettyvarun268
shettyvarun268 requested a review from inlined August 12, 2026 18:43

@ajperel ajperel 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.

Thanks for all the iterating.

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.

5 participants