The `ANGULARFIRE2_VERSION` build placeholder ships unreplaced in the library, and `versions.json` never reaches the compiled schematics
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 52/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- angular, firebase, typescript
- 领域
- build-system, release, tooling
调研方向
从 src/core.ts 和 tools/build.ts 开始,然后检查 src/schematics/versions.json 以及 src/schematics/common.ts 中的 addDependencies()。比较 PR #3709 和 #3711 中的构建时占位符处理,并追踪 JSON 何时被打包。完成的标准是:发布的 VERSION 报告已安装的版本,并且随附的 schematics 包含可用的依赖版本数据。
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- TypeScript
- 星标
- 7.8k
- 派生
- 2.2k
- 平均合并
- 3 天 6 小时
- 30 天内合并 PR
- 5
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
angular/angularfire 的其他 Issue
-
comp: build/pipeline type: bug version: current (v17+)
难度 2/5 1-3 小时 新手友好度 74/100
angular/angularfire#3766 ·
-
comp: schematics type: bug version: current (v17+)
难度 3/5 1-2 天 新手友好度 76/100
angular/angularfire#3768 ·
-
comp: docs type: chore version: current (v17+)
难度 4/5 3-5 天 新手友好度 58/100
angular/angularfire#3764 ·
-
comp: firestore comp: ssr priority: P0 (critical) type: feature version: current (v17+)
angular/angularfire#3757 · 已指派 1 人 ·
-
Six `firebase` entry points have no `@angular/fire` equivalent, so their exports are unreachable 未关闭comp: core type: feature
angular/angularfire#3755 · 已指派 1 人 ·
查看 angular/angularfire 的全部 Issue
相似的 Issue
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
难度 2/5 1-3 小时 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
supermomonga/zcode-acp#24 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
growthbook/growthbook#7100 ·
-
triage
难度 1/5 1-3 小时 新手友好度 88/100