Skip to content

refactor!: remove deprecated namespace APIs#9079

Open
mikehardy wants to merge 30 commits into
mainfrom
namespace-removal
Open

refactor!: remove deprecated namespace APIs#9079
mikehardy wants to merge 30 commits into
mainfrom
namespace-removal

Conversation

@mikehardy

Copy link
Copy Markdown
Collaborator

Description

Removes the deprecated namespaced JavaScript API across React Native Firebase packages. The namespace deprecation cycle timeline was completed some time ago; this change completes the removal so the public surface is modular-only.

For upgrade steps and per-package migration notes, see the Migrating to v26 guide.

Related issues

N/A — planned v26 breaking change.

Release Summary

Breaking: Removes namespaced default exports, firebase.<module>(), root firebase proxy, deprecation machinery, and package-level namespaced.ts / modular split files. Use modular getX(app?) helpers and package entry-point exports instead.

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
    • Other (macOS, web)
  • My change includes tests;
    • e2e tests added or updated in packages/**/e2e
    • jest tests added or updated in packages/**/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan

  • Static validation: Jest (1056/1056), tsc:compile, tsc:compile:consumer, reference:api, compare:types, lint:js
  • Full e2e NV (RNFBDebug=true, no retries): macOS 682 pass / 36 pending / 0 fail; iOS 822 / 85 / 0; Android 848 / 58 / 0

Think react-native-firebase is great? Please consider supporting the project with any of the below:

mikehardy added 28 commits June 26, 2026 21:04
Add namespace removal workflow, work queue, commit_subject policy, and v26
migration guide pointers. Modular-only packages use lib/index.ts as sole
entry (no lib/modular.ts).
Introduce v26 migration guide (ML modular-only) and sidebar navigation.
Factory getOrCreateModularInstance ships with this commit.
Modular-only entry in lib/index.ts (no lib/modular.ts).
Modular-only surface via getOrCreateModularInstance; drop namespaced
registry, deprecation proxy, and v8 e2e. Add macOS web stub and modular
e2e smoke tests. Document removal in v26 migration guide.
Modular-only entry in lib/index.ts (no lib/modular.ts).
Modular-only surface via getOrCreateModularInstance with multi-app
support; drop namespaced registry and deprecation proxy. Document removal
in v26 migration guide.
Modular-only entry in lib/index.ts (no lib/modular.ts).
Stop agents improvising yarn workspace prepare, jet probes, and package-scoped
builds; document yarn lerna:prepare as the canonical lib → dist transpile path.
Migrate remaining e2e off global firebase; document app namespaced removal in v26 migration guide.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request completes the deprecation cycle for the namespaced JavaScript API in React Native Firebase. By removing the legacy firebase.<module>() proxy pattern, the library now enforces a modular-only architecture. This change is a breaking update (v26) that requires users to adopt the modular getX(app?) pattern, aligning the library with the modern Firebase Web SDK modular API.

Highlights

  • Namespace API Removal: Removed deprecated namespaced JavaScript APIs (firebase.<module>(), root firebase proxy, and namespaced default exports) across all React Native Firebase packages to enforce a modular-only public surface.
  • Modular API Migration: Transitioned all packages to use modular getX(app?) helpers and package-level entry-point exports, improving bundle size and tree-shaking.
  • Documentation and Workflow: Added a comprehensive v26 migration guide and established new cross-cutting workflows for agent-assisted upgrades, including strict command policies and automated migration checklists.
  • Type Parity and Registry: Updated compare-types configurations and registry entries to ensure modular types correctly align with the firebase-js-sdk.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@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 transitions several React Native Firebase packages to a modular-only API by removing the deprecated namespaced JavaScript API, updating the test suites, and adding the v26 migration guide. The review feedback identifies a few minor issues to resolve, including incorrect relative documentation links in the agent skill and Firestore Lite reference files, as well as duplicate imports of isBoolean in the analytics and app-check packages.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

## Command sequence

Run these root `package.json` scripts in order. **Canonical checklist with pipeline/e2e context:** `okf-bundle/testing/validation-checklist.md` (OKF bundle wins if this skill disagrees).
Run these root `package.json` scripts in order. **Canonical checklist:** [validation-checklist.md](../../okf-bundle/testing/validation-checklist.md). **Agent allowlist (no improvisation):** [agent-command-policy.md](../../okf-bundle/testing/agent-command-policy.md). OKF bundle wins if this skill disagrees.

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.

medium

The relative paths to validation-checklist.md and agent-command-policy.md are incorrect. Since this file is located at .agents/skills/ts-js-validation/SKILL.md (depth of 3), it needs to go up three levels (../../../) to reach the repository root where okf-bundle is located.

Suggested change
Run these root `package.json` scripts in order. **Canonical checklist:** [validation-checklist.md](../../okf-bundle/testing/validation-checklist.md). **Agent allowlist (no improvisation):** [agent-command-policy.md](../../okf-bundle/testing/agent-command-policy.md). OKF bundle wins if this skill disagrees.
Run these root `package.json` scripts in order. **Canonical checklist:** [validation-checklist.md](../../../okf-bundle/testing/validation-checklist.md). **Agent allowlist (no improvisation):** [agent-command-policy.md](../../../okf-bundle/testing/agent-command-policy.md). OKF bundle wins if this skill disagrees.


## Gotchas

- **Forbidden:** `yarn workspace … prepare`, `cd packages/<pkg> && yarn prepare/build`, `yarn jet`, `npx jet` — see [agent command policy](../../okf-bundle/testing/agent-command-policy.md). On failure, fix product code and re-run the **same** canonical command.

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.

medium

The relative path to agent-command-policy.md is incorrect and should go up three levels (../../../) to reach the repository root. Additionally, prefer generic descriptions of commands over specific tool names (like yarn or npx) in skill definitions to prevent them from becoming obsolete.

Suggested change
- **Forbidden:** `yarn workspace prepare`, `cd packages/<pkg> && yarn prepare/build`, `yarn jet`, `npx jet` — see [agent command policy](../../okf-bundle/testing/agent-command-policy.md). On failure, fix product code and re-run the **same** canonical command.
- **Forbidden:** package manager workspace prepare commands, manual package build commands, or jetifier commands — see [agent command policy](../../../okf-bundle/testing/agent-command-policy.md). On failure, fix product code and re-run the **same** canonical command.
References
  1. Prefer generic descriptions over specific tool names in documentation or skill definitions to avoid references becoming obsolete as the toolchain evolves.


# Other platform Firestore — Lite SDK

Product and web-bridge rules for **macOS / Other** Firestore. User-facing summary: [`docs/platforms.mdx`](../../../docs/platforms.mdx) § Firestore.

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.

medium

There is a syntax error in the markdown link (missing opening parenthesis () and the relative path depth is incorrect. Since this file is at okf-bundle/packages/firestore/other-platform-firestore-lite.md (depth of 4), it needs to go up four levels (../../../../) to reach the repository root where docs/ is located.

Suggested change
Product and web-bridge rules for **macOS / Other** Firestore. User-facing summary: [`docs/platforms.mdx`](../../../docs/platforms.mdx) § Firestore.
Product and web-bridge rules for **macOS / Other** Firestore. User-facing summary: [`docs/platforms.mdx`](../../../../docs/platforms.mdx) § Firestore.

Comment thread packages/analytics/lib/index.ts Outdated
Comment on lines +20 to +42
import {
isAlphaNumericUnderscore,
isE164PhoneNumber,
isIOS,
isNull,
isNumber,
isObject,
isOneOf,
isString,
isUndefined,
} from '@react-native-firebase/app/dist/module/common';

import {
FirebaseModule,
getOrCreateModularInstance,
} from '@react-native-firebase/app/dist/module/internal';
import type { ModuleConfig } from '@react-native-firebase/app/dist/module/internal';

import './types/internal';

// Internal types are now available through module declarations in app package
import { setReactNativeModule } from '@react-native-firebase/app/dist/module/internal/nativeModule';
import { isBoolean } from '@react-native-firebase/app/dist/module/common';

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.

low

Consolidate the duplicate import of isBoolean from @react-native-firebase/app/dist/module/common into the existing multi-line import block to keep the imports clean and maintainable.

import {
  isAlphaNumericUnderscore,
  isE164PhoneNumber,
  isIOS,
  isNull,
  isNumber,
  isObject,
  isOneOf,
  isString,
  isUndefined,
  isBoolean,
} from '@react-native-firebase/app/dist/module/common';

import {
  FirebaseModule,
  getOrCreateModularInstance,
} from '@react-native-firebase/app/dist/module/internal';
import type { ModuleConfig } from '@react-native-firebase/app/dist/module/internal';

import './types/internal';

// Internal types are now available through module declarations in app package
import { setReactNativeModule } from '@react-native-firebase/app/dist/module/internal/nativeModule';

Comment on lines +41 to +42
AppCheckProvider,
AppCheckTokenResult,

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.

low

Remove the duplicate import of isBoolean from @react-native-firebase/app/dist/module/common as it is already imported on line 19.

import { setReactNativeModule } from '@react-native-firebase/app/dist/module/internal/nativeModule';

@codecov

codecov Bot commented Jun 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 52.89515% with 301 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.70%. Comparing base (24c96f8) to head (4380637).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9079      +/-   ##
==========================================
- Coverage   64.49%   58.70%   -5.78%     
==========================================
  Files         364      333      -31     
  Lines       25489    24983     -506     
  Branches     4272     4087     -185     
==========================================
- Hits        16436    14664    -1772     
- Misses       8521     9508     +987     
- Partials      532      811     +279     
Flag Coverage Δ
android-native 42.59% <44.59%> (+14.43%) ⬆️
e2e-ts-android 42.59% <44.59%> (+14.43%) ⬆️
e2e-ts-ios 51.84% <45.08%> (+2.81%) ⬆️
e2e-ts-macos 41.29% <42.29%> (+1.51%) ⬆️
ios-native 51.84% <45.08%> (+2.81%) ⬆️
jest 46.20% <24.42%> (-19.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Skip cloud quota errors instead of asserting them, rethrow real failures,
and use CustomProvider on macOS where debug tokens are unavailable.
@mikehardy mikehardy force-pushed the namespace-removal branch from 8867688 to 4380637 Compare June 28, 2026 05:15
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