The `ANGULARFIRE2_VERSION` build placeholder ships unreplaced in the library, and `versions.json` never reaches the compiled schematics
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 52/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Pouca atividade
- Stack de tecnologia
- angular, firebase, typescript
- Domínio
- build-system, release, tooling
Direção de pesquisa
Comece por src/core.ts e tools/build.ts, depois inspecione src/schematics/versions.json e addDependencies() em src/schematics/common.ts. Compare o tratamento de placeholders durante o build nos PRs #3709 e #3711 e rastreie quando o JSON é incluído no bundle. Considera-se concluído quando a VERSION publicada informa a versão instalada e os schematics distribuídos contêm dados utilizáveis de versão das dependências.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Version info
Angular: 21.2.x Firebase: 12.x AngularFire: 21.0.0-rc.0
How to reproduce these conditions
npm pack @angular/fire@nextand inspectfesm2022/angular-fire.mjs— search forANGULARFIRE2_VERSION.- 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.jsonon disk is never read by the shipped schematic code. - One concrete effect:
addDependencies()insrc/schematics/common.tsnever 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.jsoninlining - the fix touchestools/build.tsand possiblysrc/core.ts, so I wanted to flag it and get a read before picking a direction.
- Linguagem predominante
- TypeScript
- Estrelas
- 7.8k
- Forks
- 2.2k
- Merge médio
- 3d 6h
- PRs com merge (30d)
- 5
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de angular/angularfire
-
comp: build/pipeline type: bug version: current (v17+)
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
angular/angularfire#3766 ·
-
comp: schematics type: bug version: current (v17+)
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 76/100
angular/angularfire#3768 ·
-
comp: docs type: chore version: current (v17+)
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 58/100
angular/angularfire#3764 ·
-
comp: firestore comp: ssr priority: P0 (critical) type: feature version: current (v17+)
angular/angularfire#3757 · 1 responsável ·
-
Six `firebase` entry points have no `@angular/fire` equivalent, so their exports are unreachable Abertacomp: core type: feature
angular/angularfire#3755 · 1 responsável ·
Todas as issues de angular/angularfire
Issues semelhantes
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
-
Crush Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
ElementsProject/cln-application#167 · 1 comentário · 1 reação ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Quantco/pnpm-licenses#17 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100