Skip to content

ng add @angular/fire@next records a caret range that silently drifts to canary builds #3708

Description

@armando-navarro

Version info

Angular: 21.2.x

Firebase: 12.x

AngularFire: 21.0.0-rc.0 (@next)

How to reproduce these conditions

  1. ng add @angular/fire@next — package.json records "@angular/fire": "^21.0.0-rc.0" (npm's default caret).
  2. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fixed!Resolved in a current release.comp: schematicsng add / deploy schematics (src/schematics).type: bugDefect: expected behavior doesn't happen.version: current (v17+)Targets the current modular API (v17+).

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions