Skip to content

fix(deprecated): keep deprecated packages on their named prerelease line - #36627

Merged
Martin Hochel (Hotell) merged 3 commits into
microsoft:masterfrom
Hotell:fix/deprecated-pkgs-prerelease-line
Aug 25, 2026
Merged

fix(deprecated): keep deprecated packages on their named prerelease line#36627
Martin Hochel (Hotell) merged 3 commits into
microsoft:masterfrom
Hotell:fix/deprecated-pkgs-prerelease-line

Conversation

@Hotell

@Hotell Martin Hochel (Hotell) commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Problem

Deprecated v9 packages are supposed to live on a named prerelease line (-beta.x / -alpha.x) forever. Two of them silently fell off it:

Package Was Published
@fluentui/react-alert 9.0.0-beta.143 9.0.1-0 (2026-08-11), 9.0.2-0 (2026-08-24)
@fluentui/react-infobutton 9.0.0-beta.119 9.0.1-0 (2026-08-24)

Root cause

These packages carry "disallowedChangeTypes": ["major", "minor", "patch"] and have no change files of their own — they are bumped as dependents of react-popover etc., where the default dependentChangeType is patch.

Beachball resolves a disallowed change type by stepping exactly one notch down its ordered list:

SortedChangeTypes = ['none','prerelease','prepatch','patch','preminor','minor','premajor','major']

So patchprepatch, and:

semver.inc('9.0.0-beta.119', 'prepatch')   -> 9.0.1-0          <- what happened
semver.inc('9.0.0-beta.119', 'prerelease') -> 9.0.0-beta.120   <- what we wanted

prepatch starts a new prerelease line and drops the beta identifier. Beachball's downgrade is prerelease-unaware, but our config is what exposed it — prepatch was left allowed.

It's intermittent: it only fires when some upstream change file carries dependentChangeType: patch. When everything upstream was prerelease, the packages stayed on beta.x. That's why it went unnoticed for two releases.

Knock-on: the release pipeline goes red

tag-react-components.ts derives the dist-tag from prerelease[0]. For 9.0.1-0 that is 0:

npm dist-tag add @fluentui/react-alert@9.0.2-0 0
npm error Tag name must not be a valid SemVer range: 0
failed to tag @fluentui/react-alert@9.0.2-0

That is the succeededWithIssues on "Tag prelease packages with prerelease tag" in build 383600. Net effect — the beta tags are stale:

Package beta latest
@fluentui/react-infobutton 9.0.0-beta.119 (stale) 9.0.1-0
@fluentui/react-alert 9.0.0-beta.143 (stale) 9.0.2-0

Fix (three parts)

1. Stop the bug recurring — disallow premajor/preminor/prepatch on all three deprecated packages, so a dependent patch degrades all the way to prerelease:

current  config | patch -> prepatch   | 9.0.1-0
this PR         | patch -> prerelease | 9.0.0-beta.120

@fluentui/react-virtualizer (9.0.0-alpha.115) was the next domino — same config, still intact. Without this it would have gone to 9.0.1-0 on the next dependent bump.

2. Repair the two damaged packages. The old line is unreachable (9.0.0-beta.120 > 9.0.1-0 is false), so they move forward onto a named line that outranks what's published:

Package npm this PR next publish
@fluentui/react-infobutton 9.0.1-0 9.0.1-beta.0 9.0.1-beta.1
@fluentui/react-alert 9.0.2-0 9.0.2-beta.0 9.0.2-beta.1

Both are > the published version, so this is forward progress, and the derived dist-tag becomes beta again. react-components pins these exactly, so its pins are updated to match.

3. Stop a version-shape problem from failing the release. tag-react-components.ts now skips prerelease identifiers that npm would reject, with a warning naming the package, instead of erroring out.

Verification

Simulated a real release against this branch:

react-infobutton   npm:9.0.1-0          -> 9.0.1-beta.1    | tag: beta  OK | >npm: true
react-alert        npm:9.0.2-0          -> 9.0.2-beta.1    | tag: beta  OK | >npm: true
react-virtualizer  npm:9.0.0-alpha.115  -> 9.0.0-alpha.115 | tag: alpha OK
suite: 9.74.8      pins: 9.0.2-beta.1 / 9.0.1-beta.1

The new tagging guard checked against every version shape we publish:

9.0.1-0                        -> tag: 0        SKIP (warn)
9.0.1-1                        -> tag: 1        SKIP (warn)
9.0.1-beta.0                   -> tag: beta     tag it
9.0.0-alpha.115                -> tag: alpha    tag it
0.0.0-nightly-20260825-0407.1  -> tag: nightly… tag it
9.74.5-experimental.…          -> tag: experimental  tag it
9.74.7                         -> stable, skip

No behaviour change for beta, alpha, nightly or experimental tagging.

Not addressed

The already-published 9.0.1-0 / 9.0.2-0 can't be withdrawn. Consumers of @fluentui/react-components are unaffected (exact pins); only someone installing these deprecated packages directly via @beta was seeing a stale version, and the next release fixes that.

@Hotell
Martin Hochel (Hotell) force-pushed the fix/deprecated-pkgs-prerelease-line branch from e881bc5 to dbf134a Compare August 25, 2026 11:09
@github-actions

Copy link
Copy Markdown

📊 Bundle size report

✅ No changes found

@github-actions

Copy link
Copy Markdown

Pull request demo site: URL

@Hotell
Martin Hochel (Hotell) merged commit b64fd7d into microsoft:master Aug 25, 2026
15 checks passed
@Hotell
Martin Hochel (Hotell) deleted the fix/deprecated-pkgs-prerelease-line branch August 25, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants