Repository navigation
build: update cross-repo angular dependencies - #4067
angular-robot wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates @angular/fire from 21.0.0-rc.2 to 21.0.0 in apps/code-of-conduct/package.json along with the corresponding lockfile updates. A review comment points out a potential peer dependency conflict, as @angular/fire@21.0.0 expects Angular ^21.2.0 and TypeScript ^5.8.0, whereas the project currently uses Angular 22.3.0-next.2 and TypeScript 6.0.3 which could lead to compilation or runtime issues.
| "@angular/compiler": "22.3.0-next.2", | ||
| "@angular/core": "22.3.0-next.2", | ||
| "@angular/fire": "21.0.0-rc.2", | ||
| "@angular/fire": "21.0.0", |
There was a problem hiding this comment.
Updating @angular/fire to 21.0.0 introduces a peer dependency conflict with the other Angular dependencies in this project. According to the release notes, @angular/fire@21.0.0 requires @angular/core and @angular/common version ^21.2.0 and TypeScript ^5.8.0 (below 6.0.0). However, this project is currently using @angular/core@22.3.0-next.2 and typescript@6.0.3. Using @angular/fire v21 with Angular v22 can lead to runtime errors or compilation failures due to breaking changes in the major version of Angular. To resolve this, align the Angular version to ^21.2.0 or use a compatible pre-release version of @angular/fire that supports Angular v22.
ab95482 to
d8563b2
Compare
d8563b2 to
08a630b
Compare
See associated pull request for more information.
08a630b to
39c87ab
Compare
This PR contains the following updates:
22.3.0-next.3→22.3.0-next.422.3.0-next.3→22.3.0-next.422.3.0-next.3→22.3.0-next.421.0.0-rc.2→22.0.0-rc.022.3.0-next.3→22.3.0-next.4Release Notes
angular/angular-cli (@angular/build)
v22.3.0-next.4Compare Source
@angular/cli
@schematics/angular
module --routecomponent@angular-devkit/build-angular
sslKeyandsslCertrelative to the workspace root (#34399)@angular-devkit/core
@angular-devkit/schematics
partition(#34539)filterrule (#34539)@angular/build
sslKeyandsslCertrelative to the workspace root (#34399)@angular/ssr
angular/components (@angular/cdk)
v22.3.0-next.4Compare Source
aria
material
multiple
angular/angularfire (@angular/fire)
v22.0.0-rc.0Compare Source
Upgrading from AngularFire 21
This is the first release candidate of AngularFire 22, which supports Angular 22. It is published under npm's
nexttag. It requires Angular 22, TypeScript 6.0 andfirebase12.18.0 or newer.ng addandng deploywork with firebase-tools 14 or 15.From an app on Angular 21 and AngularFire 21, run one command:
Include
@angular/fire@nextin the same command as Angular. On its own,ng update @angular/core@22 @angular/cli@22refuses 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)
stricton by default, dropsdownlevelIteration, and deprecatesbaseUrlandmoduleResolution: "node". Check yourtsconfig.jsonfor those settings.firebaseis now a peer dependency (#3805)Through AngularFire 21,
@angular/fireinstalled its own copy offirebase. If yourpackage.jsonlisted a differentfirebaseversion, npm could install both, and the two copies reject each other's objects at runtime (#3684, #3681, #3682). In AngularFire 22, thefirebaseversion in yourpackage.jsonis the only copy installed.ng updatehandles it. The migration adds"firebase": "^12.18.0"to yourpackage.jsonif it is missing, or moves an existing entry into that range.npm install @angular/fire@next firebase@^12.18.0, then check thatnpm ls firebaseshows one copy.firebasenow fails at install time on npm, withERESOLVE. Do not use--forceor--legacy-peer-depsto 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.
ssr: trueorssr: 'cloud-functions'.ng deploynow prints a deprecation warning before the build, and theCF3v2andfunctionsRuntimeOptionsoptions are marked deprecated.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:What's Changed
Angular 22
reflectComponentType, sinceComponentFactoryResolveris gone from Angular 22. No change is visible to apps. by @armando-navarro, with @EthanSK as co-author, in #3801Installing and upgrading
firebaseis a peer dependency, andng update @angular/fire@nextruns a v22 migration that adds or aligns yourfirebaseentry. See "Breaking changes" above. by @armando-navarro in #3805@angular/fireno longer installs@angular-devkit/schematics,@angular-devkit/coreor@schematics/angular, which the Angular CLI supplies when it runsng addandng update. A production install of a CLI app lists 112 packages instead of 136. If you run the schematics with the standaloneschematicscommand on pnpm withhoist=false, declare those three packages yourself. by @armando-navarro in #3808docs/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 #3811Firestore
@angular/fire/firestore/pipelinesand@angular/fire/firestore/lite/pipelinesentry points. Pipelines require a Firestore Enterprise edition database. by @KingDarBoja in #3799Deploy
Documentation
docs/version-22-upgrade.md, is new. by @armando-navarro in #3805beforeAuthStateChangedfrom@angular/fire/auth, and the v21 upgrade guide names every AI symbol the Imagen removal took, not onlygetImagenModel. by @armando-navarro in #3817docs/compat.mdstates 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 #3810Repository
@angular/buildbuilders instead of the deprecated@angular-devkit/build-angularones. The published package is byte-identical. by @armando-navarro in #3807Full Changelog: angular/angularfire@21.0.0...22.0.0-rc.0
v22.0.0-canary.20261027184955.sha-1b1a8b6Compare Source
v22.0.0-canary.20261027163619.sha-0c924daCompare Source
v22.0.0-canary.20261027153626.sha-503ce83Compare Source
v22.0.0-canary.20261027150920.sha-20409f8Compare Source
v22.0.0-canary.20261027143928.sha-5f17245Compare Source
v22.0.0-canary.20261027141056.sha-80ed66bCompare Source
v22.0.0-canary.20261026122357.sha-7146c2dCompare Source
v22.0.0-canary.20261023210158.sha-29ca012Compare Source
v22.0.0-canary.20261023183021.sha-f95d598Compare Source
v22.0.0-canary.20261023181032.sha-7f13f64Compare Source
v21.0.0Upgrading from AngularFire 20
AngularFire 21 requires Angular 21.2 or newer,
firebase12.18.0 or newer,rxfire6.2.0 or newer, and TypeScript 5.8 or newer (below 6).ng addandng deploywork with firebase-tools 14 or 15.The AngularFire 21 upgrade guide covers the rest, including the Vertex AI to Firebase AI Logic move.
Update
firebasetogether with@angular/fire. If yourpackage.jsonstill requestsfirebase11, npm does not report a conflict. It installs both SDK versions side by side, and the two copies reject each other's objects at runtime.ng update @angular/fire@21moves yourfirebasedependency to^12.18.0for you. If you upgrade by hand, runnpm install firebase@^12with it, then check thatnpm ls firebaseshows one version.Breaking changes
Angular 21.2 or newer is required (#3763). Angular 21 is in long-term support, so 21.2 is its final minor line. Run
ng update @angular/core @angular/clifirst if your app is on 21.0 or 21.1.firebase12.18.0 or newer andrxfire6.2.0 or newer are required (#3761, #3723). Olderrxfireversions ask forfirebase11, which installs a second SDK copy next to yourfirebase12.The
@angular/fire/vertexaientry point is gone. Its replacement is@angular/fire/ai, Firebase AI Logic (#3674).ng update @angular/fire@21rewrites the imports and renamed symbols, emitsAgentPlatformBackendin place of the deprecatedVertexAIBackend, and changes the default location fromus-central1toglobal, warning for every file whose region changed (#3725, #3762). The Imagen API, removed infirebase12.18, is no longer wrapped, and the migration warns remaining Imagen users (#3750).App Check no longer runs during server rendering by default (#3773). AngularFire no longer calls the function passed to
provideAppCheckon the server, andinject(AppCheck)returnsnullthere. Browser-side behavior is unchanged. This fixes theReferenceError: document is not definedbuild failure in server-rendered apps, because the reCAPTCHA providers need a browser. To keep App Check running during server rendering, provideAPP_CHECK_ON_SERVERastruein your server config:Details, including how server-side Firebase requests can still carry an App Check token: App Check during server rendering.
Updating from a 21 release candidate or canary build
Installing a release candidate saves its exact version, so it does not move on its own (#3709). Run:
If you installed a canary build, run
npm install @angular/fire@latestinstead.ng updatedoes not offer 21.0.0 to a21.0.1-canaryinstall, because the canary's version number is higher.What's Changed
Fixes that also shipped to Angular 20 apps in 20.0.3, 20.1.0 and 20.1.1 are not repeated here.
Upgrading to v21
ng update @angular/fireupdates your project'sfirebasedependency to the supported^12.18.0, andng addaligns it during setup, preventing duplicated-SDK installs. by @armando-navarro in #3722ng add @angular/firewarns whenfirebaseis installed at more than one version, and shows the dependency chain. Prevents various hard-to-diagnose bugs. by @armando-navarro in #3760ng update @angular/fireno longer stops before the v21 migration when it runs under Angular CLI 22.3, whose schematics package refuses the file path AngularFire's schematics loaded. by @armando-navarro in #3793firebase12.18:onRegistered,onUnregistered,registerandunregister. by @armando-navarro in #3761Setting up (
ng add)ng addgenerates working@angular/fire/aiimports when the AI feature is selected, instead of imports from a removed module path. by @coturiv in #3685provideDataConnect(...)call thatng addgenerates escapes the values it takes from yourdataconnect.yamlandconnector.yaml. A value containing a quote character could previously place arbitrary code in the generated file. by @herdiyana256 in #3727dataconnect.yamlparsing fails, instead of discarding it. by @armando-navarro in #3711Deploying (
ng deploy)ng deployno longer crashes on launch withERR_INVALID_ARG_TYPE. The schematics ship as a CommonJS bundle, which turned the code'simport.metalookup intoundefinedbefore it reached any real work. by @armando-navarro in #3729jsonc-parser,@angular-devkit/core,@angular-devkit/architect). The publishedpackage.jsonnever listed them, song deployfailed to resolve modules under pnpm's default layout and Yarn Plug'n'Play. by @armando-navarro in #3747Server-side rendering
Documentation
ng updatestopping withThe Angular CLI requires a minimum Node.js version of .... by @armando-navarro in #3725, #3788 and #3795APP_CHECK_ON_SERVER, and how to keep App Check out of the server on older releases. by @armando-navarro in #3775ng adddoes today, with current scaffold names, the Firebase Hosting and App Hosting deploy paths, and the prerequisites up front, including npm 11.6 or later, since older npm cannot install a new Angular 21 project (Cannot read properties of null (reading 'edgesOut')). by @armando-navarro in #3736, #3765 and #3787idTokenexample. by @armando-navarro in #3728user$example references the injectedthis.auth. by @arolleaguekeng in #3640@forexample. by @IdanCo in #3606Sample app
New Contributors
Thanks to everyone who tested the release candidates and reported issues. The reports on #3684, #3681 and #3682 are what identified the duplicated-SDK cause, and they are why
ng updatecorrects it for you.Full Changelog: angular/angularfire@20.1.1...21.0.0