Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Canary builds are named after the release candidate, so npm ranks them above it

未关闭 适合新手
#3,766 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
74/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
shell

调研方向

从根目录的 package.json 和 tools/build.sh 开始,然后跟踪 Canary 构建和带标签的发布构建如何选择版本。根据 npm semver 排序确认最终的包版本,确保 Canary 的排名低于 release candidate,同时带标签的发布保留其标签版本。

由索引模型根据 Issue 内容生成。

描述

comp: build/pipeline type: bug version: current (v17+)

ng add @angular/fire@next and ng update @angular/fire@next install a canary, not the release candidate.

When #3674 was merged, 21.0.0-rc.0 was put in package.json, breaking with this repo's previous patterns. #3751 continued this break with 21.0.0-rc.1.

#3709 mitigated the symptom for ng add by writing the exact installed version into the user's package.json. But going back to the old pattern would simplify things further.

Details
  • The root package.json version field holds 21.0.0-rc.1, and tools/build.sh specifies each canary by appending -canary.<short sha> to that field.
    • Every merge to main therefore publishes 21.0.0-rc.1-canary.<sha>, which semver ranks above 21.0.0-rc.1, because the middle identifier parses as the text 1-canary and text outranks a number.
  • ng add @angular/fire@next installs a canary, not the release candidate. The Angular CLI resolves the tag, then writes the range ^21.0.0-rc.1, and npm resolves that to 21.0.0-rc.1-canary.95b3de1.
  • ng update @angular/fire@next does the same, and unlike ng add it leaves a range in package.json rather than an exact version, so the app can drift again on any later install.
  • The version field is not what a tagged release publishes. tools/build.sh takes a tagged release's version from the tag name.
    • At the 19.0.0-rc.5 tag the version field in package.json read 19.0.0, yet the release published to npm from that tag is 19.0.0-rc.5.
    • At the 20.0.1 tag the field read 20.0.0 and the release published to npm is 20.0.1.
  • Releases through v20 named canaries after the release itself, for example 19.0.0-canary.<sha>, which ranks below every 19.0.0-rc.N.
    • The release-candidate string first entered the version field in the v21 preparation commit (#3674).
Scope

Build and packaging. It does not remove the 25 canary builds already published on the 21 line, which keep outranking 21.0.0-rc.1 until 21.0.0 ships.

主要语言
TypeScript
星标
7.8k
派生
2.2k
平均合并
3 天 6 小时
30 天内合并 PR
5

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

angular/angularfire 的其他 Issue

查看 angular/angularfire 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。