Version info
Angular: 21.2.x
Firebase: 12.x
AngularFire: 21.0.0-rc.0 (@next)
How to reproduce these conditions
ng add @angular/fire@next — package.json records "@angular/fire": "^21.0.0-rc.0" (npm's default caret).
- Any later fresh install (new clone without a reused lockfile,
npm update, CI without a lockfile) resolves that range again.
Expected behavior
Installing a specific prerelease keeps that prerelease until the developer deliberately upgrades.
Actual behavior
The caret range also matches the 21.0.0-rc.0-canary.<sha> builds auto-published for every merge to main, which sort higher than rc.0 — so the resolved version silently becomes an unreviewed canary snapshot. Nothing in the project changed, but the installed code did, and the resulting breakage doesn't look like a version problem. (Stable ranges like ^21.0.0 don't have this failure — they only drift to reviewed releases.)
Proposal: after install, the ng-add schematic pins the @angular/fire entry to the exact installed version when the recorded spec is a caret/tilde range around a prerelease. Stable ranges and hand-written range expressions stay untouched.
Version info
Angular: 21.2.x
Firebase: 12.x
AngularFire: 21.0.0-rc.0 (
@next)How to reproduce these conditions
ng add @angular/fire@next— package.json records"@angular/fire": "^21.0.0-rc.0"(npm's default caret).npm update, CI without a lockfile) resolves that range again.Expected behavior
Installing a specific prerelease keeps that prerelease until the developer deliberately upgrades.
Actual behavior
The caret range also matches the
21.0.0-rc.0-canary.<sha>builds auto-published for every merge to main, which sort higher thanrc.0— so the resolved version silently becomes an unreviewed canary snapshot. Nothing in the project changed, but the installed code did, and the resulting breakage doesn't look like a version problem. (Stable ranges like^21.0.0don't have this failure — they only drift to reviewed releases.)Proposal: after install, the ng-add schematic pins the
@angular/fireentry to the exact installed version when the recorded spec is a caret/tilde range around a prerelease. Stable ranges and hand-written range expressions stay untouched.