GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(build): name canaries above every published release of their major by armando-navarro · Pull Request #3780 · angular/angularfire

Conversation

@armando-navarro

@armando-navarro armando-navarro commented Oct 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Fixes #3779

ng add @angular/fire@canary now installs the newest canary build instead of the release candidate, and keeps doing so after 21.0.0 ships.

Changes

  • tools/canary-version.js picks the version a canary is named after: one patch above the highest published version of the same major that is not a canary, or package.json's version without its prerelease part if that is higher.
    • Today that gives 21.0.1-canary.<UTC commit time>.sha-<short sha>.
    • After 21.0.0 ships it gives 21.0.1-canary.*, and after 21.0.1 ships, 21.0.2-canary.*.
    • With package.json at 22.0.0-rc.0 and nothing in 22 published yet, it gives 22.0.0-canary.*.
  • tools/build.sh reads the published versions with npm view @angular/fire versions --json and stops the build if npm can't be read. Tagged releases are named exactly as before.
  • tools/canary-version.jasmine.ts covers the cases above, and tsconfig.jasmine.json now includes tools/**/*.jasmine.ts so test:node runs it.
  • The warning about a prerelease in package.json is removed, since a prerelease there no longer changes the name.

Behavior to know

  • Someone on a 21.0.1-canary build isn't offered 21.0.0 by ng update once it ships, because 21.0.0 ranks below what they have. To go back to a release they install it directly, for example npm install @angular/fire@21.
  • A canary built while a release is publishing can be named at that release's version and rank below it until the next canary build.
  • Anyone with ^<canary> saved, which npm install @angular/fire@canary writes, moves to the next patch release when it ships and stays there, because a prerelease only matches a range on its own patch number. ng add @angular/fire@canary saves the exact canary version instead, so those installs never move on their own.

Verification

  • npm run test:node: 342 specs, 0 failures. Counting published canaries again fails 1 spec, and using semver.inc on the release candidate (which turns 21.0.0-rc.1 into 21.0.0) fails 5.
  • Ran tools/build.sh in a scratch repository with npm view answering from version lists and the build step stubbed:
    • Today's npm versions give 21.0.1-canary.*.
    • Adding 21.0.0 gives 21.0.1-canary.*, adding 21.0.1 gives 21.0.2-canary.*.
    • Adding 21.1.0-rc.0 gives 21.1.1-canary.*, adding 21.0.1-rc.0 gives 21.0.2-canary.*.
    • Adding earlier 21.0.1-canary.* builds still gives 21.0.1-canary.*.
    • Adding 20.0.4 or 22.0.0-rc.0 doesn't change the 21 canary.
    • With npm unreachable the build stops with an error.
  • With npm's version picker (npm 10.9.8) in each of those states, ^<canary> selects the canary, and ^21.0.0, ~21.0.0, ^21.0.0-rc.1 and ^20.0.0 never select a canary.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@armando-navarro
fix(build): name canaries above every published release of their major
6deb73a
`ng add @angular/fire@canary` installs `^<canary>`, and npm picks the
highest version in that range. Canaries were named after package.json's
version, 21.0.0, so they ranked below 21.0.0-rc.1 and would rank below
21.0.0 once it ships, and the command installed those instead.

A canary is now named one patch above the highest published version of
its major that is not a canary, or after package.json's version if that
is higher. Published canaries don't count, so the name doesn't climb
with every build, and a release of another major doesn't rename them.
Release candidate and release ranges like `^21.0.0-rc.1` and `^21.0.0`
still never match a canary.

The rule lives in tools/canary-version.js, with a spec run by test:node.

Fixes angular#3779
@armando-navarro
armando-navarro requested a review from tyler-reitz October 1, 2026 04:16
@armando-navarro armando-navarro added comp: build/pipeline Build, bundling, packaging, release pipeline. type: bug Defect: expected behavior doesn't happen. labels Oct 1, 2026
tyler-reitz
tyler-reitz approved these changes Oct 1, 2026
View reviewed changes

@tyler-reitz tyler-reitz left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Ran test:node at 6deb73a (342 specs, 0 failures) and checked the new spec can fail: restoring the old naming rule turns 7 of its 8 specs red, so it guards the bug rather than the implementation. Also ran build.sh with npm view stubbed, and the base version tracks the published list as described, including exit 1 when npm is unreachable.

One non-blocking note for "Behavior to know": canary followers drop off the canary channel at every patch release, not just at 21.0.0. With ^21.0.1-canary.X saved, once 21.0.1 ships the range resolves to 21.0.1 even if a 21.0.2-canary.* exists (checked with node-semver 7.7.3), since a prerelease only satisfies a range on its own major.minor.patch tuple. Worth a line, since that is the ongoing effect for anyone tracking canary.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@armando-navarro armando-navarro mentioned this pull request Oct 2, 2026
fix(ci): keep the canary dist-tag from moving back to an older build #3784
Merged
@armando-navarro

armando-navarro commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator Author

I've added a line to "Behavior to know": npm install @angular/fire@canary saves ^<canary>, so those installs move to the next patch release when it ships and stay there. ng add @angular/fire@canary saves the exact version, so those never move on their own.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@armando-navarro
armando-navarro merged commit 7cc64e6 into angular:main Oct 5, 2026
24 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@armando-navarro armando-navarro added this to the 21.0.0-rc.2 milestone Oct 5, 2026
@armando-navarro armando-navarro mentioned this pull request Oct 9, 2026
Backport ten fixes to 20.1.x for 20.1.1 #3798
Merged
armando-navarro added a commit that referenced this pull request Oct 10, 2026
@armando-navarro
build: compile the tools specs in the jasmine build
0def082
The publish job's specs (tools/publish-job.jasmine.ts and
tools/release-tag.jasmine.ts) live under tools/. On main, #3780 added
this include, and #3780 itself stays off 20.1.x, so without it
build:jasmine never compiles those 39 specs and test:node skips them
without failing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tyler-reitz tyler-reitz tyler-reitz approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

comp: build/pipeline Build, bundling, packaging, release pipeline. type: bug Defect: expected behavior doesn't happen.

Projects

None yet

Milestone

21.0.0-rc.2

Development

Successfully merging this pull request may close these issues.

ng add @angular/fire@canary installs the release candidate instead of the canary build

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@armando-navarro @tyler-reitz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.