Skip to content

feat(extensions): update deprecation warnings for Phase 2 Function Kits launch - #11155

Open
shettyvarun268 wants to merge 6 commits into
mainfrom
shettyvarun268/update-cli-deprecation-warnings
Open

shettyvarun268 wants to merge 6 commits into
mainfrom
shettyvarun268/update-cli-deprecation-warnings

Conversation

@shettyvarun268

@shettyvarun268 shettyvarun268 commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

feat(extensions): update deprecation warnings for Phase 2 Function Kits launch

Description

Updates CLI deprecation warnings for ext:* commands in preparation for the September 30, 2026 Phase 2 milestone, reflecting that Firebase Extensions is deprecated and scheduled for decommission on March 31, 2027.

Key changes:

  • Category 1 (ext:install, ext:configure, ext:update, ext:sdk:install):
    • Upgrades from the Phase 1 concise one-liner to the DevRel-approved 80-character prominent boxed banner (====).
    • Resolves the target extension reference (handling @version tags, shorthand refs without firebase/, instance IDs in extensions.yaml, and bypassing local directory paths via isLocalPath()).
    • Dynamically inspects the replacement catalog via getReplacementsRegistry():
      • Replacement Available: Displays Recommended replacement: @firebase-function-kits/<name>.
      • Everything Else (no replacement, 3P publishers, unmapped, local paths, or no ref): Displays We recommend migrating active instances to function kits..
  • Category 2 (ext:list, ext:info, ext:export):
    • Updates the post-execution footer warning copy to direct users to migration steps in the official FAQ (https://firebase.google.com/docs/extensions/faq-and-troubleshooting).
  • Category 3 (ext:uninstall, ext:dev:deprecate):
    • Continues to display no warning, as users are already removing or deprecating instances and do not need extra noise.
  • Suppression & CI:
    • Fully silenced under --json, --non-interactive, quiet mode, piped outputs (!process.stdout.isTTY), and automated CI environments (CI=true, GITHUB_ACTIONS).

Scenarios Tested

  1. Unit Tests:
    • npx mocha src/extensions/warnings.spec.ts (15/15 passing)
    • npx mocha src/extensions/replacementRegistry.spec.ts (15/15 passing)
    • Tested prominent boxed banners, dynamic kit replacement injection, shorthand publisher resolution, local path bypass, footer notices, hard error on ext:dev:register, and suppression under --json/CI.
  2. Linting & Compilation:
    • npx eslint src/extensions/warnings.ts src/extensions/warnings.spec.ts src/command.ts (0 errors)
    • npm run test:compile (0 errors, code 0)
  3. Manual Verification:
    • Verified ext:install firebase/firestore-bigquery-export outputs boxed banner with @firebase-function-kits/firestore-bigquery-export.
    • Verified ext:install firestore-bigquery-export (shorthand) resolves correctly.
    • Verified ext:install ./my-local-extension correctly falls back to generic banner without misleading replacement statements.
    • Verified ext:install moralis/moralis-streams (no replacement planned) outputs We recommend migrating active instances to function kits..
    • Verified ext:install firebase/firestore-bundle-builder (unannounced kit) outputs We recommend migrating active instances to function kits..
    • Verified ext:install (no args) outputs generic fallback We recommend migrating active instances to function kits..
    • Verified ext:list and ext:export show updated single-line footer.
    • Verified ext:uninstall outputs no deprecation warning.
    • Verified --json completely silences warnings.
    • Verified ext:dev:register fails fast with exit code 1.

Sample Output

Category 1 (Replacement Available):

================================================================================
⚠ Firebase Extensions will shut down on March 31, 2027.
Recommended replacement: @firebase-function-kits/firestore-bigquery-export
Learn more & view migration steps: https://firebase.google.com/docs/extensions/faq-and-troubleshooting
================================================================================

Category 1 (Everything Else / General Fallback):

================================================================================
⚠ Firebase Extensions will shut down on March 31, 2027.
We recommend migrating active instances to function kits.
Learn more & view migration steps: https://firebase.google.com/docs/extensions/faq-and-troubleshooting
================================================================================

Category 2 (List / Info / Export Footer):

⚠ Notice: Firebase Extensions will shut down on March 31, 2027. Learn more & view migration steps: https://firebase.google.com/docs/extensions/faq-and-troubleshooting

…ts launch

- Upgrade Category 1 commands (install, configure, update, sdk:install) to prominent boxed banner
- Dynamically inject recommended Function Kit replacement when available in registry
- Update Category 2 footer with migration guidance link (list, info, export)
- Align all messaging and borders with DevRel-approved Phase 2 copy
- Add unit tests verifying dynamic replacement warnings, shorthands, and footers

@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 Firebase Extensions deprecation warnings by making showDeprecationWarningBefore asynchronous and enhancing it to display tailored replacement recommendations or status messages based on the resolved extension reference. It also adds ext:export to the post-execution warnings and updates the test suite accordingly. The review feedback suggests utilizing the existing isLocalPath utility within resolveExtensionRef to prevent displaying misleading replacement warnings when installing or configuring local extensions.

Comment thread src/extensions/warnings.ts Outdated
Comment thread src/extensions/warnings.ts
@shettyvarun268
shettyvarun268 marked this pull request as ready for review September 23, 2026 18:18
Comment thread src/extensions/warnings.ts
Comment thread src/extensions/warnings.ts Outdated
Comment thread src/extensions/warnings.ts
Comment thread src/extensions/warnings.ts
Comment thread src/extensions/warnings.spec.ts

This branch has not been deployed

No deployments
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.

3 participants