Title: build: require Angular 21.2 and compile with its toolchain by armando-navarro · Pull Request #3763 · angular/angularfire · GitHub
Open Graph Title: build: require Angular 21.2 and compile with its toolchain by armando-navarro · Pull Request #3763 · angular/angularfire
X Title: build: require Angular 21.2 and compile with its toolchain by armando-navarro · Pull Request #3763 · angular/angularfire
Description: Checklist Issue number for this PR: none, release coordination for the 21.0.0-rc.1 cut Docs included?: one line in the v21 upgrade guide, which stated the old peer range Test units included?: no new specs. The build's own schematics-load check covers the new build step, and it now also fails an entry point that loads while exporting nothing. In a clean directory, install and test run successfully?: yes, with npm ci and npm test. The repo has no yarn.lock and CI installs with npm ci. Description Raises the minimum supported Angular to 21.2. Angular 21 entered long-term support on 2026-06-03, and long-term support ships only critical fixes and security patches, so 21.2 is the last 21.x minor there will be. Requiring it therefore costs 21.x users nothing in future, and ^21.2.0 still admits every 21.x patch to come. The raise is release coordination for the TransferState work (#3757), whose signal-based reading functions build on resourceFromSnapshots, absent from @angular/core 21.0 and 21.1 and present in 21.2. Changes The four Angular peer entries in src/package.json move to ^21.2.0. The repo's own Angular build packages move to ^21.2.0, and @angular-devkit/architect moves to ~0.2102.0 so the repo's own copy stays consistent with the rest of the toolchain (lockfile regenerated). The old ~0.2100.0 range still resolves and still builds. @schematics/angular moves with them. It already resolved to the same 21.2.x as its devkit siblings, so no resolved version changes. The two @angular-eslint entries stay at ^21.0.0, since that project's 21.x minors do not track Angular's. The devkit and schematics entries in src/package.json deliberately stay at ^21.0.0 rather than moving with the repo's own. Only the @angular/* peers there carry a real 21.2 requirement, so the published package keeps asking for the least it needs. Declares "type": "commonjs" in src/package.json. ng-packagr 21.2 defaults the built manifest to "type": "module" (introduced in ng-packagr#3263), which makes Node read the CommonJS schematics bundles as ES modules and breaks ng add and ng deploy. It sets the field with packageJson.type ??= 'module', so an explicit value in the source manifest is left alone and nothing has to be undone afterwards. The schematics-load check still covers it: removing this line fails the build with ReferenceError: module is not defined in ES module scope. The published manifest gains a "type" field that earlier releases did not carry. For Node it is equivalent to the field's absence, and the library's own entry points are .mjs, which is unambiguous either way. Two hardening changes in tools/build.ts, from review: replacePackageCoreVersion() now fails the build when its placeholder is not found, matching what writeVersionOverPlaceholder already does for the compiled schematics. Without it, a package whose version never got substituted ships as ANGULARFIRE2_VERSION with a green build. The schematics-load check now fails an entry point that loads with no exports, not only one that throws. docs/version-21-upgrade.md said AngularFire 21 peers @angular/* ^21.0.0. That file is copied into the published package, so it now matches the manifest beside it. Verification Full build passes, the built package.json reads "type": "commonjs", and all six compiled schematic entry points load with their real exports. The regenerated entry points differ from the 21.0 build only in the version string Angular's partial compiler writes into them, and in .d.ts import ordering, so nothing the package exposes changes. Of 176 files, 67 differ: 27 .mjs on that version string alone, their 27 source maps on the shifted mappings alone, 12 .d.ts on import order alone, and package.json on the peer ranges this PR changes. 331 specs, 0 failures, lint clean. @angular/core 21.2.22 declares engines of ^20.19.0 || ^22.12.0 || >=24.0.0. AngularFire declares none of its own. The two CI jobs that build run on Node 20, and the test matrix still covers Node 20, 22 and 24. The sample app already installs @angular/core 21.2.18, so it needs no change to satisfy the new peer range.
Open Graph Description: Checklist Issue number for this PR: none, release coordination for the 21.0.0-rc.1 cut Docs included?: one line in the v21 upgrade guide, which stated the old peer range Test units included?: no n...
X Description: Checklist Issue number for this PR: none, release coordination for the 21.0.0-rc.1 cut Docs included?: one line in the v21 upgrade guide, which stated the old peer range Test units included?: no n...
Opengraph URL: https://github.com/angular/angularfire/pull/3763
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:e36d186b-4a73-177d-312b-a4f10e8165ce |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CDD8:2526B:9FDCBD:C9DDF8:6B0364AB |
| html-safe-nonce | 0bfae9c2bbb7529e339f69d466f69af016dba30f1efbad9fa59983d9f67543d4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDREQ4OjI1MjZCOjlGRENCRDpDOURERjg6NkIwMzY0QUIiLCJ2aXNpdG9yX2lkIjoiNDQyOTk5NjE2MDQzNDAwNTE2MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | dc37024bc345f806cdc1af8d2ee6f4b8cb30b4e126961361aa998d0709f18785 |
| hovercard-subject-tag | pull_request:4482996219 |
| 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/3763/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: none, release coordination for the 21.0.0-rc.1 cut Docs included?: one line in the v21 upgrade guide, which stated the old peer range Test units included?: no n... |
| 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