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 after the release, not after a prerelease by armando-navarro · Pull Request #3767 · angular/angularfire

Conversation

@armando-navarro

@armando-navarro armando-navarro commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Fixes #3766

These changes take us back to the release candidate pattern this repo used up until #3674, after which @angular/fire@next started resolving to a canary build instead of the release candidate.

Details

  • The root package.json version field returns to 21.0.0, so a canary published from main is named 21.0.0-canary.<sha>, which ranks below every 21.0.0-rc.N.
    • Release candidates are published from their own git tag, which is where tools/build.sh takes a tagged release's version from.
    • This is how releases through v20 were cut.
  • tools/build.sh also drops any prerelease part when naming a canary, and says so in the build log, so a prerelease written into that field again cannot produce a canary that outranks it.
  • The comment and log line in src/schematics/common.ts no longer say a prerelease range matches canary builds, since it stops being true with this PR.
  • The sample's tarball path follows the version field, becoming angular-fire-21.0.0.tgz.
  • A second commit regenerates sample/package-lock.json, which still named the 21.0.0-rc.0 tarball, two releases behind its own package.json.

Verification

Every naming path was run against the real script.

  • With the field at 21.0.0, a merge to main and a pull request build:
    • both produce 21.0.0-canary.95b3de1 on the canary tag
    • the tag 21.0.0-rc.2 publishes 21.0.0-rc.2 on next
    • the tag 21.0.0 publishes 21.0.0 on latest.
  • With a prerelease left in the field, the build still succeeds and names the canary 21.0.0-canary.95b3de1, logging why.
  • 21.0.0-canary.95b3de1 is selected by none of ^21.0.0-rc.1, ~21.0.0-rc.1, ^21.0.0-rc.2, ^21.0.0 or 21.x, and ranks below 21.0.0-rc.1.
  • npm run test:node after a full build: 331 specs, 0 failures.
  • The build produces angular-fire-21.0.0.tgz, and npm ci in sample/ succeeds against the regenerated lockfile, where it previously failed on the mismatch.

Sorry, something went wrong.

Uh oh!

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

All reactions
armando-navarro added 2 commits September 22, 2026 17:02
@armando-navarro
fix(build): name canaries after the release, not after a prerelease
c1d9c1e
The root version field held `21.0.0-rc.1`, so every merge to main published
`21.0.0-rc.1-canary.<sha>`. Semver ranks that above `21.0.0-rc.1`, and the
caret range `ng add` writes into a user's package.json then resolves to the
canary instead of the release candidate they asked for.

Releases through v20 avoided this by keeping the plain release number in the
version field and publishing prereleases from their own git tag, which is
what the publish job reads. This restores that: the field returns to
`21.0.0`, and build.sh drops any prerelease part when naming a canary, so a
prerelease written there again cannot produce a canary that outranks it.

The schematics comment and its log line no longer say a prerelease range
matches canary builds, which stops being true here.
@armando-navarro
chore(sample): regenerate the lockfile against the 21.0.0 tarball
433fe9f
The sample's lockfile still named `angular-fire-21.0.0-rc.0.tgz`, two
releases behind its own package.json, so `npm ci` there failed on the
mismatch. Regenerated by building the library and running `npm install
../angular-fire-21.0.0.tgz` in sample/. It also picks up the `^21.2.0`
peer ranges the Angular 21.2 raise introduced.
@armando-navarro
armando-navarro requested a review from tyler-reitz September 23, 2026 01:02
@armando-navarro armando-navarro added bump: patch Size of the change: a fix or docs change that reaches users comp: build/pipeline Build, bundling, packaging, release pipeline. type: bug Defect: expected behavior doesn't happen. labels Sep 23, 2026
tyler-reitz
tyler-reitz approved these changes Sep 23, 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.

Approving. Every naming path reproduces: I ran this branch's build.sh with npm version/npm run build stubbed, and a merge to main gives 21.0.0-canary.95b3de1 on canary, tag 21.0.0-rc.2 gives next, tag 21.0.0 gives latest, and a prerelease left in the version field still yields 21.0.0-canary.95b3de1 with the new log line.

One thing for the release notes rather than for this PR. The 25 canaries already on npm outrank every future rc of 21.0.0, not just rc.1. Their prerelease parses as ["rc", "1-canary", "95b3de1"], and the alphanumeric 1-canary ranks above the numeric 2, so ^21.0.0-rc.2 and ~21.0.0-rc.2 both still resolve to 21.0.0-rc.1-canary.95b3de1. #3766's scope note is accurate, but it reads as though rc.2 clears this. It will not; deprecating the 25 would.

Sorry, something went wrong.

Uh oh!

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

All reactions
@armando-navarro
Merge branch 'main' into a33-canary-version-base
e4ad346
@armando-navarro
armando-navarro merged commit a2662fe into angular:main Sep 24, 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 milestone Sep 28, 2026
@armando-navarro armando-navarro added target: patch bump: patch Size of the change: a fix or docs change that reaches users and removed bump: patch Size of the change: a fix or docs change that reaches users labels Oct 1, 2026
@armando-navarro armando-navarro modified the milestones: 21.0.0, 21.0.0-rc.2 Oct 1, 2026
@armando-navarro armando-navarro mentioned this pull request Oct 1, 2026
ng add @angular/fire@canary installs the release candidate instead of the canary build #3779
Closed
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

bump: patch Size of the change: a fix or docs change that reaches users 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.

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

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 01402503 — 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.