Skip to content
Merged
Show file tree
Hide file tree
Changes from 19 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-*"
]
}
41 changes: 41 additions & 0 deletions .github/scripts/update-dependency-profiles-postbump.mts
Comment thread
Saadnajmi marked this conversation as resolved.
Outdated
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env zx
import 'zx/globals';

/**
* Post-version hook for dependency-profiles package
*
* This script runs after changesets version bump to update dependency-profiles
* with the latest package versions and commit the changes.
*/

const DEPENDENCY_PROFILES_DIR = 'packages/dependency-profiles';

echo('🔍 Checking for dependency-profiles package...');

if (!fs.existsSync(DEPENDENCY_PROFILES_DIR)) {
echo('⚠️ dependency-profiles directory not found, skipping');
} else {
echo('📦 Updating dependency-profiles');
cd(DEPENDENCY_PROFILES_DIR);
await $`yarn update-profile`;

echo('🔄 Updating yarn.lock');
cd('../..');
await $`yarn install --mode update-lockfile`;

// Check if there are changes to commit
const status = await $`git status --porcelain`;
if (!status.stdout.trim()) {
echo('✅ No changes to commit');
} else {
echo('💾 Committing dependency-profiles updates');

await $`git config user.name "github-actions[bot]"`;
await $`git config user.email "github-actions[bot]@users.noreply.github.com"`;
await $`git add .`;
await $`git commit -m "chore: update dependency-profiles and lockfile"`;
await $`git push`;

echo('✅ Committed dependency-profiles updates');
}
}
176 changes: 176 additions & 0 deletions .github/scripts/validate-changesets.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
#!/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)
* 3. Changeset status passes (validates format, config, dependencies)
*/

const CHANGESETS_DIR = '.changeset';

// 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 ChangesetFrontmatter {
[packageName: string]: 'major' | 'minor' | 'patch';
}

function parseChangesetForMajorCheck(filePath: string): ChangesetFrontmatter | null {
try {
const content = fs.readFileSync(filePath, 'utf-8');
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
if (!frontmatterMatch) return null;

const frontmatter = frontmatterMatch[1];
const result = {};

const lines = frontmatter.split('\n').filter(line => line.trim());
for (const line of lines) {
const match = line.match(/^["']?([^"':]+)["']?\s*:\s*(major|minor|patch)/);
if (match) {
const [, packageName, bumpType] = match;
result[packageName.trim()] = bumpType;
}
}

return Object.keys(result).length > 0 ? result : null;
} catch {
return null;
}
}

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

try {
const { stdout } = await $`yarn changeset status --since=origin/main 2>&1`;

if (stdout.includes('No changesets present')) {
log.error('❌ No changesets found\n');
log.warn('This PR requires a changeset to document the changes.');
log.warn('To create a changeset, run: yarn changeset\n');
return false;
}

log.success('✅ Changesets found');
return true;
} catch (error: any) {
log.error('❌ Failed to check changeset status\n');
log.info(error.message);
return false;
}
}

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

const files = fs.readdirSync(CHANGESETS_DIR);
const changesetFiles = files
.filter(file => file.endsWith('.md') && file !== 'README.md')
.map(file => path.join(CHANGESETS_DIR, file));
Comment thread
Saadnajmi marked this conversation as resolved.
Outdated

if (changesetFiles.length === 0) {
log.warn('No changesets found (skipping major check)');
return true;
}

let hasMajor = false;
const majorBumps = [];

for (const file of changesetFiles) {
const frontmatter = parseChangesetForMajorCheck(file);
if (!frontmatter) continue;

const majorPackages = Object.entries(frontmatter)
.filter(([, bumpType]) => bumpType === 'major')
.map(([pkg]) => pkg);

if (majorPackages.length > 0) {
hasMajor = true;
majorBumps.push({ file, packages: majorPackages });
}
}

if (hasMajor) {
log.error('❌ Major version bumps detected!\n');
for (const { file, packages } of majorBumps) {
log.error(` ${file}:`);
for (const pkg of packages) {
log.error(` - ${pkg}: major`);
}
}
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;
}

async function validateChangesetStatus() {
log.info('\n🔍 Validating changesets with changeset status...\n');

try {
const { stdout } = await $`yarn changeset status --since=origin/main 2>&1`;

if (stdout.toLowerCase().includes('error') && !stdout.includes('No changesets present')) {
log.error('❌ Changeset validation failed!\n');
log.info(stdout);
return false;
}

log.success('✅ Changeset validation passed');
return true;
} catch (error: any) {
log.error('❌ Changeset validation failed!\n');
log.error(`Error: ${error.message}`);
if (error.stdout) log.info(error.stdout);
if (error.stderr) log.info(error.stderr);
return false;
}
}

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

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

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'}`);
log.info(`Changeset validation: ${results.validation ? '✅ PASS' : '❌ FAIL'}\n`);

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

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

log.success('All validations passed! ✅\n');
Loading
Loading