The `ANGULARFIRE2_VERSION` build placeholder ships unreplaced in the library, and `versions.json` never reaches the compiled schematics
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- angular, firebase, typescript
- Lĩnh vực
- build-system, release, tooling
Hướng nghiên cứu
Bắt đầu với src/core.ts và tools/build.ts, sau đó kiểm tra src/schematics/versions.json và addDependencies() trong src/schematics/common.ts. So sánh cách xử lý placeholder trong thời gian build ở các PR #3709 và #3711, đồng thời theo dõi thời điểm JSON được đóng gói. Hoàn thành có nghĩa là VERSION được phát hành báo cáo phiên bản đã cài đặt và các schematics được phân phối chứa dữ liệu phiên bản dependency có thể sử dụng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 7.8k
- Fork
- 2.2k
- Merge trung bình
- 22 giờ 34 phút
- Pull request đã merge (30 ngày)
- 4
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của angular/angularfire
-
comp: firestore comp: ssr priority: P0 (critical) type: feature version: current (v17+)
angular/angularfire#3757 · 1 người được giao ·
-
Six `firebase` entry points have no `@angular/fire` equivalent, so their exports are unreachable Đang mởcomp: core type: feature
angular/angularfire#3755 · 1 người được giao ·
-
comp: auth comp: ssr comp: zones type: bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
angular/angularfire#3748 ·
-
Angular 22 release please Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
angular/angularfire#3737 · 1 bình luận · 22 reaction ·
-
comp: build/pipeline type: RFC / discussion / question
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
angular/angularfire#3699 · 13 bình luận · 4 reaction ·
Tất cả issue của angular/angularfire
Issue tương tự
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
dennys-bd/agent-hive#184 ·
-
Add: hunch Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
AbdelStark/awesome-typesafe#104 ·
-
ai-observability bug team/ai-observability
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
vicharanashala/fln#563 ·