github angular/angularfire 22.0.0-rc.0

pre-release4 hours ago

Upgrading from AngularFire 21

This is the first release candidate of AngularFire 22, which supports Angular 22. It is published under npm's next tag. It requires Angular 22, TypeScript 6.0 and firebase 12.18.0 or newer. ng add and ng deploy work with firebase-tools 14 or 15.

From an app on Angular 21 and AngularFire 21, run one command:

ng update @angular/core@22 @angular/cli@22 @angular/fire@next

Include @angular/fire@next in the same command as Angular. On its own, ng update @angular/core@22 @angular/cli@22 refuses to run while AngularFire 21 is installed. The AngularFire 22 upgrade guide covers the rest.

On a new Angular 22 app, run ng add @angular/fire@next.

Breaking changes

Angular 22 and TypeScript 6.0 are required (#3801)

  • Node.js 20 is no longer supported (end of life since 2026-04-30). Angular 22 requires Node.js 22.22.3, 24.15.0 or 26.
  • TypeScript 6 may report new compiler errors that Angular's own update does not fix. It turns strict on by default, drops downlevelIteration, and deprecates baseUrl and moduleResolution: "node". Check your tsconfig.json for those settings.

firebase is now a peer dependency (#3805)

Through AngularFire 21, @angular/fire installed its own copy of firebase. If your package.json listed a different firebase version, npm could install both, and the two copies reject each other's objects at runtime (#3684, #3681, #3682). In AngularFire 22, the firebase version in your package.json is the only copy installed.

  • ng update handles it. The migration adds "firebase": "^12.18.0" to your package.json if it is missing, or moves an existing entry into that range.
  • Installing by hand: run npm install @angular/fire@next firebase@^12.18.0, then check that npm ls firebase shows one copy.
  • An incompatible firebase now fails at install time on npm, with ERESOLVE. Do not use --force or --legacy-peer-deps to get past it, which brings the two-copy errors back.

Deprecated

Deploying server-side rendering to Cloud Functions with ng deploy (#3803)

Deprecated in AngularFire 22, removed in AngularFire 23. Server-rendered apps should move to Firebase App Hosting.

  • Affected: deploy targets with ssr: true or ssr: 'cloud-functions'. ng deploy now prints a deprecation warning before the build, and the CF3v2 and functionsRuntimeOptions options are marked deprecated.
  • Not affected: hosting-only and Cloud Run deploys. They also no longer print the old "Legacy ng-deploy Firebase is deprecated" message.

Updating from a canary build

A canary build of 22 was saved as an exact version in your package.json, so it does not move on its own. Run:

ng update @angular/fire@next

What's Changed

Angular 22

  • build!: require Angular 22 and compile with TypeScript 6. The screen-tracking service reads the routed component's selector through reflectComponentType, since ComponentFactoryResolver is gone from Angular 22. No change is visible to apps. by @armando-navarro, with @EthanSK as co-author, in #3801

Installing and upgrading

  • build!: firebase is a peer dependency, and ng update @angular/fire@next runs a v22 migration that adds or aligns your firebase entry. See "Breaking changes" above. by @armando-navarro in #3805
  • build(schematics): @angular/fire no longer installs @angular-devkit/schematics, @angular-devkit/core or @schematics/angular, which the Angular CLI supplies when it runs ng add and ng update. A production install of a CLI app lists 112 packages instead of 136. If you run the schematics with the standalone schematics command on pnpm with hoist=false, declare those three packages yourself. by @armando-navarro in #3808
  • build: the npm package no longer ships the docs/ folder, which no code read. The package is 122 files instead of 175, and 1.2 MB instead of 2.0 MB compressed. The docs live on GitHub. by @armando-navarro in #3811

Firestore

  • feat(firestore): Firestore pipeline operations are available from the new @angular/fire/firestore/pipelines and @angular/fire/firestore/lite/pipelines entry points. Pipelines require a Firestore Enterprise edition database. by @KingDarBoja in #3799

Deploy

  • feat(deploy): deprecate deploying server-side rendering to Cloud Functions. See "Deprecated" above. by @armando-navarro in #3803

Documentation

  • docs: the AngularFire 22 upgrade guide, docs/version-22-upgrade.md, is new. by @armando-navarro in #3805
  • docs: the auth guide and the sample import beforeAuthStateChanged from @angular/fire/auth, and the v21 upgrade guide names every AI symbol the Imagen removal took, not only getImagenModel. by @armando-navarro in #3817
  • docs: the README and the Quickstart describe AngularFire 21 as released, not as a release candidate. by @armando-navarro in #3814
  • docs(compat): docs/compat.md states the compatibility API's support status: supported and kept working, bug fixes yes, new features in the modular API only, no planned removal. by @armando-navarro in #3810

Repository

  • build: the repository's build and test targets use the @angular/build builders instead of the deprecated @angular-devkit/build-angular ones. The published package is byte-identical. by @armando-navarro in #3807

Full Changelog: 21.0.0...22.0.0-rc.0

Don't miss a new angularfire release

NewReleases is sending notifications on new releases.