change: Remove Deprecated Legacy Namespace Support#3164
Open
lahirumaramba wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request removes the legacy namespaced API (firebase-admin namespace, default-namespace.d.ts, firebase-namespace.ts, etc.) and transitions the codebase entirely to the modular API. This includes removing the copyTypings gulp task, updating entrypoints, deleting legacy namespace declaration files, removing legacy integration and unit tests, and updating the main entrypoint src/index.ts to export only modular APIs.
jonathanedey
approved these changes
May 28, 2026
Collaborator
jonathanedey
left a comment
There was a problem hiding this comment.
LGTM with one comment, Thanks!
Comment on lines
20
to
36
| @@ -35,4 +35,14 @@ https://firebase.google.com/docs/web/setup | |||
| console.error(message); | |||
| } | |||
Collaborator
There was a problem hiding this comment.
src/index.ts is now a mirror copy of src/app/index.ts except for this extra environment check.
- Should we also have this warning in
src/app/index.ts? - Is there a way we can de-duplicate this while keeping the same functionalty?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes the legacy, deprecated namespaces support from the SDK. Namespaces have been replaced by modular imports (since v10), and this completes the transition of the Firebase Admin Node.js SDK into a purely modular SDK for
v14.All legacy files have been deleted, the main entry points and build systems have been modernized, and the test suites have been fully cleaned up and verified.
This is a breaking change
Key Changes
1. Deleted Legacy Namespace Implementation & Test Files
Removed all
*namespace.ts,*namespace.d.ts, and obsolete test files:src/):src/default-namespace.ts/src/default-namespace.d.tssrc/index.d.tssrc/firebase-namespace-api.tssrc/app/firebase-namespace.tssrc/app-check/app-check-namespace.tssrc/auth/auth-namespace.tssrc/database/database-namespace.tssrc/firestore/firestore-namespace.tssrc/instance-id/instance-id-namespace.tssrc/installations/installations-namespace.tssrc/machine-learning/machine-learning-namespace.tssrc/messaging/messaging-namespace.tssrc/project-management/project-management-namespace.tssrc/remote-config/remote-config-namespace.tssrc/security-rules/security-rules-namespace.tssrc/storage/storage-namespace.tstest/unit/app/firebase-namespace.spec.tstest/unit/firebase.spec.tstest/integration/postcheck/typescript/example.test.tstest/integration/postcheck/typescript/example.ts2. Modernized Root Entry Point & Build Configuration
src/index.ts: Rewritten to directly export the core modularAppAPIs (such asinitializeApp,getApp,getApps,deleteApp,cert,refreshToken,SDK_VERSION, etc.) while retaining the environment compatibility check.entrypoints.json: Removed the"legacy": trueflag for"firebase-admin"and redirected the root"typings"to./lib/index.d.ts.gulpfile.js: Removed the obsoletecopyTypingsgulp task and updatedbuildandcompile_alltask dependency pipelines.tsconfig.json: Addedts-nodeconfiguration block definingmoduleTypesto enforce CommonJS compilation for all.tsfiles during execution. This prevents Node's native TypeScript loader (--experimental-strip-types) in Node 23.6.0+ from resolving extension-less imports as ES modules, ensuring a robust and compatible test runner setup.3. Refactored and Cleaned Up Test Suites
test/integration/): Removed legacy namespace assertions fromapp.spec.ts,firestore.spec.ts, anddatabase.spec.ts. Updated assertions to verify modular APIs and modular service bindings.test/unit/):app/firebase-app.spec.ts(preserving core state and token verification logic).test/unit/index.spec.tsto remove deleted legacy spec imports.test/resources/mocks.tsandtest/unit/utils.tsto importAppOptionsfrom modular locations.