Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

The `ANGULARFIRE2_VERSION` build placeholder ships unreplaced in the library, and `versions.json` never reaches the compiled schematics

Aperta
#3,715 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
angular, firebase, typescript

Direzione di ricerca

Inizia da src/core.ts e tools/build.ts, poi esamina src/schematics/versions.json e addDependencies() in src/schematics/common.ts. Confronta la gestione dei segnaposto durante la build nelle PR #3709 e #3711 e traccia quando il JSON viene incluso nel bundle. Il lavoro è concluso quando la VERSION pubblicata riporta la versione installata e gli schematics distribuiti contengono dati utilizzabili sulle versioni delle dipendenze.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Version info

Angular: 21.2.x Firebase: 12.x AngularFire: 21.0.0-rc.0

How to reproduce these conditions
  1. npm pack @angular/fire@next and inspect fesm2022/angular-fire.mjs — search for ANGULARFIRE2_VERSION.
  2. Or in an app: import { VERSION } from '@angular/fire'; console.log(VERSION.full);
Expected behavior

VERSION.full (and the underlying Version object in src/core.ts) should report the real installed version, e.g. 21.0.0-rc.0.

Actual behavior

VERSION is constructed as new Version('ANGULARFIRE2_VERSION') - the build-time placeholder that's supposed to be replaced with the real version before publishing, but isn't for this occurrence. The published package ships the literal string.

A related mechanism is also broken: src/schematics/versions.json's peerDependencies/firebaseFunctionsDependencies data is filled in by tools/build.ts after the schematics are bundled with esbuild, which has already inlined the JSON import from the unfilled source file at compile time.

  • The post-build edit to versions.json on disk is never read by the shipped schematic code.
  • One concrete effect: addDependencies() in src/schematics/common.ts never has real version data to check against, so it can't detect or warn about conflicting dependency versions the way it appears designed to.

Will need a decision on one of these approaches:

  • string-replace with a build-time guard, matching what PR #3709/#3711 just did for the schematics' own version placeholder, or
  • reworking the versions.json inlining - the fix touches tools/build.ts and possibly src/core.ts, so I wanted to flag it and get a read before picking a direction.
Lingua principale
TypeScript
Stelle
7.8k
Fork
2.2k
Merge medio
3g 6h
PR unite (30g)
5

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di angular/angularfire

Tutte le issue di angular/angularfire

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.