Skip to content
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5d938e9
feat: implement hybrid changesets workflow (mirror rnx-kit)
Saadnajmi Feb 10, 2026
fda6d2b
lock
Saadnajmi Feb 10, 2026
f2e5d87
feat: add PR validation for changesets
Saadnajmi Feb 10, 2026
acddb3b
Apply suggestion from @tido64
Saadnajmi Feb 10, 2026
a373b59
fix config
Saadnajmi Feb 10, 2026
496f6ab
docs(changeset): Switch to changesets
Saadnajmi Feb 10, 2026
b258a5e
Dont use github app yet, more updates
github-actions[bot] Feb 11, 2026
ca20bde
Add a bunch of validation
github-actions[bot] Feb 11, 2026
d444021
don't export token
github-actions[bot] Feb 11, 2026
47d4ce0
Remove beachball references
github-actions[bot] Feb 11, 2026
46ad0eb
Remove AI generated markdown, rename yaml
github-actions[bot] Feb 11, 2026
0839381
remove check-changes
github-actions[bot] Feb 11, 2026
6d00718
use zx
github-actions[bot] Feb 11, 2026
c43952b
Update pr.yml
Saadnajmi Feb 12, 2026
034b203
remove check-changes, use yarn scripts
github-actions[bot] Feb 12, 2026
0b2c320
Merge branch 'changesets-hybrid-mirrornx-kit' of github.com:Saadnajmi…
github-actions[bot] Feb 12, 2026
381cb97
Update changesets-version.yml
Saadnajmi Feb 12, 2026
369db4b
Update .github/workflows/pr.yml
Saadnajmi Feb 12, 2026
c124629
Apply suggestions from code review
Saadnajmi Feb 12, 2026
918fdcf
update validate to use changeset:status
github-actions[bot] Feb 12, 2026
ef50eec
print changeset stdout
github-actions[bot] Feb 12, 2026
5b9c89c
typo
github-actions[bot] Feb 12, 2026
8a03d23
one version command
github-actions[bot] Feb 12, 2026
6ac3c07
Merge branch 'changesets-hybrid-mirrornx-kit' of github.com:Saadnajmi…
github-actions[bot] Feb 12, 2026
5a5aabd
use default title and commit
github-actions[bot] Feb 12, 2026
c23ad55
Rename 'changeset' script to 'change'
Saadnajmi Feb 13, 2026
34ffd6a
yarn workspaces foreach to publish
github-actions[bot] Feb 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 5 additions & 18 deletions .ado/azure-pipelines.publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,11 @@ extends:
displayName: 'yarn buildci [test]'

- script: |
echo ##vso[task.setvariable variable=SkipNpmPublishArgs]--no-publish
displayName: Enable No-Publish (npm)
condition: ${{ parameters.skipNpmPublish }}

- script: |
echo ##vso[task.setvariable variable=SkipGitPushPublishArgs]--no-push
displayName: Enable No-Publish (git)
condition: ${{ parameters.skipGitPush }}

- script: |
yarn publish:beachball $(SkipNpmPublishArgs) $(SkipGitPushPublishArgs) --access public --token $(npmAuth) -b origin/main -y
displayName: 'Publish NPM Packages (for main branch)'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))

- script: |
yarn publish:beachball $(SkipNpmPublishArgs) $(SkipGitPushPublishArgs) --access public --token $(npmAuth) -y -t v${{ replace(variables['Build.SourceBranch'],'refs/heads/releases/','') }} -b origin/${{ replace(variables['Build.SourceBranch'],'refs/heads/','') }} --prerelease-prefix ${{ replace(variables['Build.SourceBranch'],'refs/heads/releases/','') }}
displayName: 'Publish NPM Packages (for other release branches)'
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/main'))
yarn changeset:publish
Comment thread
Saadnajmi marked this conversation as resolved.
Outdated
displayName: 'Publish NPM Packages with Changesets'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'), not(${{ parameters.skipNpmPublish }}))
env:
NPM_TOKEN: $(npmAuth)

- template: .ado/templates/win32-nuget-publish.yml@self
parameters:
Expand Down
102 changes: 102 additions & 0 deletions .changeset/beachball-migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
"@fluentui-react-native/adapters": patch
"@fluentui-react-native/android-theme": patch
"@fluentui-react-native/apple-theme": patch
"@fluentui-react-native/avatar": patch
"@fluentui-react-native/badge": patch
"@fluentui-react-native/button": patch
"@fluentui-react-native/callout": patch
"@fluentui-react-native/checkbox": patch
"@fluentui-react-native/chip": patch
"@fluentui-react-native/codemods": patch
"@fluentui-react-native/composition": patch
"@fluentui-react-native/contextual-menu": patch
"@fluentui-react-native/default-theme": patch
"@fluentui-react-native/divider": patch
"@fluentui-react-native/drawer": patch
"@fluentui-react-native/dropdown": patch
"@fluentui-react-native/experimental-activity-indicator": patch
"@fluentui-react-native/experimental-appearance-additions": patch
"@fluentui-react-native/experimental-avatar": patch
"@fluentui-react-native/experimental-checkbox": patch
"@fluentui-react-native/experimental-expander": patch
"@fluentui-react-native/experimental-menu-button": patch
"@fluentui-react-native/experimental-native-date-picker": patch
"@fluentui-react-native/experimental-native-font-metrics": patch
"@fluentui-react-native/experimental-shadow": patch
"@fluentui-react-native/experimental-shimmer": patch
"@fluentui-react-native/focus-trap-zone": patch
"@fluentui-react-native/focus-zone": patch
"@fluentui-react-native/framework": patch
"@fluentui-react-native/framework-base": patch
"@fluentui-react-native/icon": patch
"@fluentui-react-native/immutable-merge": patch
"@fluentui-react-native/input": patch
"@fluentui-react-native/interactive-hooks": patch
"@fluentui-react-native/link": patch
"@fluentui-react-native/memo-cache": patch
"@fluentui-react-native/menu": patch
"@fluentui-react-native/menu-button": patch
"@fluentui-react-native/merge-props": patch
"@fluentui-react-native/notification": patch
"@fluentui-react-native/overflow": patch
"@fluentui-react-native/persona": patch
"@fluentui-react-native/persona-coin": patch
"@fluentui-react-native/popover": patch
"@fluentui-react-native/pressable": patch
"@fluentui-react-native/radio-group": patch
"@fluentui-react-native/separator": patch
"@fluentui-react-native/spinner": patch
"@fluentui-react-native/stack": patch
"@fluentui-react-native/styling-utils": patch
"@fluentui-react-native/switch": patch
"@fluentui-react-native/tablist": patch
"@fluentui-react-native/text": patch
"@fluentui-react-native/theme": patch
"@fluentui-react-native/theme-tokens": patch
"@fluentui-react-native/theme-types": patch
"@fluentui-react-native/themed-stylesheet": patch
"@fluentui-react-native/theming-utils": patch
"@fluentui-react-native/tokens": patch
"@fluentui-react-native/tooltip": patch
"@fluentui-react-native/use-slot": patch
"@fluentui-react-native/use-slots": patch
"@fluentui-react-native/use-styling": patch
"@fluentui-react-native/use-tokens": patch
"@fluentui-react-native/vibrancy-view": patch
"@fluentui-react-native/win32-theme": patch
"@fluentui/react-native": patch
"@uifabricshared/foundation-composable": patch
"@uifabricshared/foundation-compose": patch
"@uifabricshared/foundation-settings": patch
"@uifabricshared/foundation-tokens": patch
"@uifabricshared/theme-registry": patch
"@uifabricshared/themed-settings": patch
"@uifabricshared/theming-ramp": patch
"@uifabricshared/theming-react-native": patch
---

# Migration from Beachball to Changesets

This changeset represents the migration from Beachball to Changesets for version management and consolidates all changes from 440+ beachball change files that were in the `change/` directory.

All 75 affected packages receive a patch version bump to acknowledge the accumulated changes from the beachball era.

## What Changed

Going forward, all version management uses Changesets via `yarn changeset`. The following beachball infrastructure has been removed:

- ❌ 440+ beachball change files from `change/` directory
- ❌ `beachball` package dependency
- ❌ Beachball scripts from `package.json`
- ❌ `beachball.config.js` configuration file
- ❌ Beachball publish steps from Azure Pipelines

## New Workflow

✅ **Create changes**: Run `yarn changeset` to document changes
✅ **Version bump PRs**: Automatically created by GitHub Actions
✅ **Publishing**: Handled by Azure Pipelines using `changeset publish`
✅ **Validation**: CI validates changesets and blocks major version bumps

For details, see `CHANGESETS_SETUP.md` and `CONTRIBUTING.md`.
17 changes: 17 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": ["@changesets/cli/commit", { "skipCI": false }],
"linked": [],
"access": "public",
"baseBranch": "origin/main",
"ignore": [
"@fluentui-react-native/dependency-profiles",
"@fluentui-react-native/e2e-testing",
"@fluentui-react-native/tester",
"@fluentui-react-native/tester-core",
"@fluentui-react-native/tester-win32",
"@fluentui-react-native/tester-win32-81",
"@fluentui-react-native/test-*"
]
}
38 changes: 38 additions & 0 deletions .github/scripts/changeset-version-with-postbump.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env zx
import 'zx/globals';

/**
* Changeset version bump with post-bump hook
*
* This script orchestrates the version bump process:
* 1. Runs changeset version to bump package versions
* 2. Updates dependency-profiles with new versions
* 3. Updates yarn.lock to reflect all changes
*
* The changesets action will automatically commit these changes.
*/

const DEPENDENCY_PROFILES_DIR = 'packages/dependency-profiles';

echo('📦 Running changeset version...');
await $`yarn changeset version`;
Comment thread
Saadnajmi marked this conversation as resolved.

// Undo the commit that changeset version made, but keep the changes
// This allows the changesets action to create a single commit with all changes
echo('🔙 Undoing changeset commit (keeping changes)...');
await $`git reset --soft HEAD~1`;

echo('\n🔄 Updating dependency-profiles...');
if (fs.existsSync(DEPENDENCY_PROFILES_DIR)) {
cd(DEPENDENCY_PROFILES_DIR);
await $`yarn update-profile`;
cd('../..');
echo('✅ dependency-profiles updated');
} else {
echo('⚠️ dependency-profiles not found, skipping');
}

echo('\n🔒 Updating yarn.lock...');
await $`yarn install --mode update-lockfile`;

echo('\n✅ Version bump complete!');
117 changes: 117 additions & 0 deletions .github/scripts/validate-changesets.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
#!/usr/bin/env zx
import 'zx/globals';

/**
* Validate changesets in CI
*
* Checks:
* 1. Changesets are present (PRs require changesets)
* 2. No major version bumps (breaking changes disallowed)
*/

// ANSI color codes
const colors = {
red: (msg: string) => `\x1b[31m${msg}\x1b[0m`,
green: (msg: string) => `\x1b[32m${msg}\x1b[0m`,
yellow: (msg: string) => `\x1b[33m${msg}\x1b[0m`,
};

// Logging helpers
const log = {
error: (msg: string) => echo(colors.red(msg)),
success: (msg: string) => echo(colors.green(msg)),
warn: (msg: string) => echo(colors.yellow(msg)),
info: (msg: string) => echo(msg),
};

interface ChangesetStatusOutput {
releases: Array<{
name: string;
type: 'major' | 'minor' | 'patch' | 'none';
oldVersion: string;
newVersion: string;
changesets: string[];
}>;
changesets: string[];
}

async function checkChangesetPresence() {
log.info('\n🔍 Checking for changeset presence...\n');

const result = await $`yarn changeset status --since=origin/main 2>&1`.nothrow();

if (result.exitCode !== 0) {
log.error('❌ Changeset validation failed\n');
echo(result.stdout);
return false;
}

log.success('✅ Changesets found');
return true;
}

async function checkForMajorBumps() {
log.info('\n🔍 Checking for major version bumps...\n');

const result = await $`yarn changeset status --output bumps.json`.nothrow();

// If no changesets, skip major bump check
if (result.exitCode !== 0 && result.stdout.includes('no changesets were found')) {
log.warn('No changesets found (skipping major check)');
return true;
}

// Other errors
if (result.exitCode !== 0 || !fs.existsSync('bumps.json')) {
log.error('❌ Failed to check for major bumps\n');
if (result.stderr) log.info(result.stderr);
return false;
}

const bumpsData: ChangesetStatusOutput = JSON.parse(fs.readFileSync('bumps.json', 'utf-8'));
fs.unlinkSync('bumps.json');

const majorBumps = bumpsData.releases.filter(release => release.type === 'major');

if (majorBumps.length > 0) {
log.error('❌ Major version bumps detected!\n');
for (const release of majorBumps) {
log.error(` ${release.name}: major`);
if (release.changesets.length > 0) {
log.error(` (from changesets: ${release.changesets.join(', ')})`);
}
}
log.error('\nMajor version bumps are not allowed.');
log.warn('If you need to make a breaking change, please discuss with the team first.\n');
return false;
}

log.success('✅ No major version bumps found');
return true;
}

// Main execution
log.info(`\n${'='.repeat(60)}`);
log.info('Changesets Validation');
log.info(`${'='.repeat(60)}`);

const results = {
presence: await checkChangesetPresence(),
majorBumps: await checkForMajorBumps(),
};

log.info(`\n${'='.repeat(60)}`);
log.info('Validation Results:');
log.info(`${'='.repeat(60)}\n`);

log.info(`Changeset presence: ${results.presence ? '✅ PASS' : '❌ FAIL'}`);
log.info(`Major version check: ${results.majorBumps ? '✅ PASS' : '❌ FAIL'}\n`);

const allPassed = results.presence && results.majorBumps;

if (!allPassed) {
log.error('Validation failed!\n');
throw new Error('Validation failed');
}

log.success('All validations passed! ✅\n');
54 changes: 54 additions & 0 deletions .github/workflows/changesets-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Changesets Version Bump

on:
push:
branches: [main]
workflow_dispatch:


jobs:
version:
name: Create Version Bump PR
runs-on: ubuntu-latest

# Remove this once we setup react-native-sdk[bot] with this repo
permissions:
contents: write # for GH releases and Git tags (Changesets)
pull-requests: write # version PRs (Changesets)

if: ${{ github.repository == 'microsoft/fluentui-react-native' }}
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Set up toolchain
uses: microsoft/react-native-test-app/.github/actions/setup-toolchain@5.0.14

- name: Install dependencies
run: |
yarn install --immutable

- name: Build packages
run: yarn buildci

# Bring this back once we setup react-native-sdk[bot] with this repo
# - name: Generate token for version PR
# uses: actions/create-github-app-token@v2
# id: app-token
# with:
# app-id: ${{ vars.APP_ID }}
# private-key: ${{ secrets.PRIVATE_KEY }}
# permissions: |
# contents: write
# pull-requests: write

- name: Create Version Bump PR
id: changesets
uses: changesets/action@v1
with:
version: yarn changeset:version
createGithubReleases: false
env:
# Switch token once we setup react-native-sdk[bot] with this repo
# GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading
Loading