Title: fix(core): drop the unused optional @angular/platform-server peer by armando-navarro · Pull Request #3792 · angular/angularfire · GitHub
Open Graph Title: fix(core): drop the unused optional @angular/platform-server peer by armando-navarro · Pull Request #3792 · angular/angularfire
X Title: fix(core): drop the unused optional @angular/platform-server peer by armando-navarro · Pull Request #3792 · angular/angularfire
Description: Refs #3667 Removes the optional @angular/platform-server peer from the published package, which no file in the package imports. On npm 10, and on npm 11 before 11.20, that peer alone makes installing AngularFire fail on an app whose Angular is one patch behind the newest. Cause npm 10 resolves a missing optional peer while it plans an install, instead of skipping it. It picks the newest @angular/platform-server matching AngularFire's range, which is 21.2.25 today. Every @angular/platform-server release requires its own exact @angular/core version, so 21.2.25 asks for @angular/core 21.2.25. In an app whose package.json says ^21.2.0 and which has 21.2.24 installed, @angular/common and the other Angular packages require @angular/core 21.2.24 exactly, so npm stops with Conflicting peer dependency: @angular/core@21.2.25. An app on the newest patch, or one that already installs @angular/platform-server, is not affected. npm changed this in npm/cli#9877, released in npm 12.1.0, and in its backport npm/cli#9903, released in 11.20.0. The npm each current Node line bundles is still affected: 10.8.2 (Node 20), 10.9.9 (Node 22), 11.19.0 (Node 24) and 11.19.1 (Node 26). Changes src/package.json: drops @angular/platform-server from peerDependencies and peerDependenciesMeta. The root package.json keeps it as a dev dependency for the test runner. Behavior to know 21.0.0-rc.1 and 20.1.0 still declare this peer, so the fix reaches @next and @latest installs only with the next release on each line. A cherry-pick to 20.1.x follows this PR. npm no longer warns when an app pairs AngularFire with a @angular/platform-server from another major. That pairing still fails, because @angular/platform-server requires the app's exact @angular/core. Verification In a copy of an Angular 21.2.24 app with ^21.2.0 ranges, npm install --package-lock-only of the current canary fails with Conflicting peer dependency: @angular/core@21.2.25 on npm 10.8.2, 10.9.8, 10.9.9, 11.0.0, 11.19.0, 11.19.1 and 12.0.2, and installs on 11.20.0, 11.21.0, 12.1.0 and 12.2.0. The same install of the package built from this branch succeeds on npm 10.8.2, 10.9.8, 10.9.9 and 11.19.1, with @angular/core left at 21.2.24. @angular/fire@20.1.0 fails the same way on an Angular 20.3.32 app on npm 10.9.9, and installs once the peer is removed. An app that already installs @angular/platform-server 21.2.24 installs before and after this change. No file in 21.0.0-rc.1, 20.1.0 or the package built from this branch imports @angular/platform-server. Only a docs page mentions it.
Open Graph Description: Refs #3667 Removes the optional @angular/platform-server peer from the published package, which no file in the package imports. On npm 10, and on npm 11 before 11.20, that peer alone makes installi...
X Description: Refs #3667 Removes the optional @angular/platform-server peer from the published package, which no file in the package imports. On npm 10, and on npm 11 before 11.20, that peer alone makes installi...
Opengraph URL: https://github.com/angular/angularfire/pull/3792
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
| 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:bc44ec45-4b16-58c9-263d-bf788c950314 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D5A4:1FAE:AA009A:D90B41:6B037CC7 |
| html-safe-nonce | 1e81d52457af8a74d39329d3cb49fd3eba37e7801505632450a541199a972553 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENUE0OjFGQUU6QUEwMDlBOkQ5MEI0MTo2QjAzN0NDNyIsInZpc2l0b3JfaWQiOiI3Nzk4ODY2MDU4NTQwMTQ2NjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 090e006f440cb461a29c50d596277485f209150d9ac680fcd952090123ed4178 |
| hovercard-subject-tag | pull_request:4780000096 |
| 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/3792/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 | Refs #3667 Removes the optional @angular/platform-server peer from the published package, which no file in the package imports. On npm 10, and on npm 11 before 11.20, that peer alone makes installi... |
| 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 |
| 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