Title: build!: require Angular 22 and compile with TypeScript 6 by armando-navarro · Pull Request #3801 · angular/angularfire · GitHub
Open Graph Title: build!: require Angular 22 and compile with TypeScript 6 by armando-navarro · Pull Request #3801 · angular/angularfire
X Title: build!: require Angular 22 and compile with TypeScript 6 by armando-navarro · Pull Request #3801 · angular/angularfire
Description: Checklist Issue number for this PR: #3696 Docs included?: no. The AngularFire 22 upgrade guide and the docs' version strings follow in their own pull requests once the remaining v22 decisions are made. Test units included?: yes. A browser spec for screen tracking, ported from #3741. Breaking change?: yes. BREAKING CHANGE: footer in the commit, ! in the subject. In a clean directory, yarn install, yarn test run successfully? yes, with npm: npm ci, npm run build, npm run lint, npm run test:node (381 specs) and npm run test:chrome-headless (112 specs) all pass. Description Moves AngularFire to Angular 22 and TypeScript 6. This is the first 22 commit on main, so it also moves the package version to 22.0.0, which makes the canaries publish as 22.0.0-canary.*. Reimplements #3741 by @EthanSK, who is co-author on the commit. His replacement for the removed ComponentFactoryResolver and his screen-tracking spec are kept as written. The rest changed under him: main moved to Angular 21.2 and "type": "commonjs", and ng-packagr 22.2 switched its typings bundler, so the branch was rebuilt on today's main instead of rebased. Changes Peers: @angular/common, @angular/core and @angular/platform-browser at ^22.0.0 typescript at >=6.0 <6.1 the @angular-devkit and @schematics/angular dependencies at 22. The built package needs nothing newer than 22.0.0 (its linker minVersion values are 12.0.0 and 14.0.0), so the peer is the major, not the minor the repo compiles with. ComponentFactoryResolver is gone from Angular 22. Both screen-tracking services read the routed component's selector with reflectComponentType(component)?.selector, and ɵscreenViewEvent loses its third parameter. Every compiled component has a selector, so nothing changes for apps. TypeScript 6: tsconfig.build.json, which compiles the build script tools/build.ts, gets an explicit rootDir and keeps TypeScript 6's strict default. tsconfig.base.json sets strict: false to keep TypeScript 5 behavior for the library and specs, drops downlevelIteration, and drops the deprecated baseUrl. src/schematics/tsconfig.json moves from the deprecated moduleResolution: node to bundler. src/test.ts is deleted. The Karma builder injects its own entry file and never ran it, and TypeScript 6 started reporting its three zone.js/dist/* imports, paths zone.js no longer ships. Lint: eslint.config.js loads the angular-eslint umbrella package, since @angular-eslint/eslint-plugin 22 no longer exports its preset rule sets. @angular/animations, deprecated in 22 and imported nowhere, leaves the devDependencies. CI runs on Node >=22.22.3 <23, >=24.15.0 <25 and 26, Angular 22's engines. Node 20 reached end of life on 2026-04-30. Behavior to know Going forward, AngularFire 21 fixes will be carried on the 21.0.x branch. ng update @angular/core@22 @angular/cli@22 alone refuses on an app with AngularFire 21 installed (incompatible peer dependency to "@angular/common"). Using @angular/fire@22 in the same command works, and that is what the upgrade guide will document. Apps coming from 21.0.0-rc.x see the v21 migration run once more and report no changes, because 21.0.0 lies between their version and 22.0.0. Not in this PR: moving angular.json off the deprecated @angular-devkit/build-angular builders the sample app a migration-v22 the firebase range compiling the library under strict the docs. Verification Build, lint, test:node (381 specs) and test:chrome-headless (112 specs, one more than main: the ported screen-tracking spec) pass on Angular 22.2.3, TypeScript 6.0.3, ng-packagr 22.2.4, zone.js 0.16.3. A fresh Angular 22 app (ng new with CLI 22) takes the packed tarball through ng add, including the interactive setup against a real Firebase project, and builds. Served in Chrome, it reads auth state and a Firestore collection with a clean console. An SSR app on Angular 21.2 with 21.0.0-rc.2 installed moves to Angular 22 with one ng update @angular/core@22 @angular/cli@22 @angular/fire@22 (the 22.0.0 package served from a local registry). It builds, and the served page hydrates with no errors from AngularFire. Refs #3737
Open Graph Description: Checklist Issue number for this PR: #3696 Docs included?: no. The AngularFire 22 upgrade guide and the docs' version strings follow in their own pull requests once the remaining v22 decisions ...
X Description: Checklist Issue number for this PR: #3696 Docs included?: no. The AngularFire 22 upgrade guide and the docs' version strings follow in their own pull requests once the remaining v22 decisi...
Opengraph URL: https://github.com/angular/angularfire/pull/3801
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:5d181dbf-47dd-5eb8-dbdb-5a6634588ee7 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E0CA:B4652:8A8986:B02AAE:6B036079 |
| html-safe-nonce | 0762d0270f3139e8bab3ae0d21f36d36399e23b37f162b5b5acbf22f329599f0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMENBOkI0NjUyOjhBODk4NjpCMDJBQUU6NkIwMzYwNzkiLCJ2aXNpdG9yX2lkIjoiODg1NjkzMDI2NDA2NzE5NjA5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | cd286ed5e5818fb0d5bbca3d346b042ddb8930c60d45dab79f3baf7de1e2e105 |
| hovercard-subject-tag | pull_request:4978229194 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/angular/angularfire/pull/3801/files |
| twitter:image | https://avatars.githubusercontent.com/u/13904589?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/13904589?s=400&v=4 |
| og:image:alt | Checklist Issue number for this PR: #3696 Docs included?: no. The AngularFire 22 upgrade guide and the docs' version strings follow in their own pull requests once the remaining v22 decisions ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/angular/angularfire git https://github.com/angular/angularfire.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 49453413 |
| octolytics-dimension-repository_nwo | angular/angularfire |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49453413 |
| octolytics-dimension-repository_network_root_nwo | angular/angularfire |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width