Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/workflows/check-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ jobs:
run: |
echo "yarn.lock changed! Verifying package deduplication ..."

yarn run dedupe --check --json

if [[ $? -ne 0 ]]; then
echo "Your changes introduced package duplication 🚨"
echo "Run 'yarn run dedupe' to fix those."
if ! yarn run dedupe --check; then
echo
echo "::error::Your changes introduced package duplication - run 'yarn run dedupe' to fix."
exit 1
else
echo "No duplicate packages introduced ✅"
fi
Expand Down
10 changes: 4 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,10 @@
"[handlebars]": {
"editor.formatOnSave": false
},
"javascript.preferences.importModuleSpecifier": "relative",
Comment thread
Hotell marked this conversation as resolved.
"javascript.preferences.importModuleSpecifierEnding": "index",
"typescript.preferences.importModuleSpecifier": "relative",
"typescript.preferences.importModuleSpecifierEnding": "index",
"typescript.tsdk": "./node_modules/typescript/lib",
"typescript.reportStyleChecksAsWarnings": false,
"js/ts.preferences.importModuleSpecifier": "relative",
"js/ts.preferences.importModuleSpecifierEnding": "index",
"js/ts.tsdk.path": "./node_modules/typescript/lib",
"js/ts.reportStyleChecksAsWarnings": false,
"cSpell.words": ["beachball", "borderless", "fluentui", "griffel", "spinbutton", "tabster"],
"nxConsole.generateAiAgentRules": true,
// Maximum number of requests for the chat agent - Prevents AI agents from stopping mid-session
Expand Down
4 changes: 3 additions & 1 deletion azure-pipelines.release-headless-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,12 @@ extends:
displayName: test

- script: |
yarn beachball publish -b origin/$(validation.branchPath) --access public -y -n $(npmToken) --no-push --tag experimental --config scripts/beachball/src/release-headless.config.js
yarn beachball publish -b origin/$(validation.branchPath) --no-push --tag experimental --config scripts/beachball/src/release-headless.config.js
git reset --hard origin/$(validation.branchPath)
displayName: Publish changes and bump versions
condition: and(succeeded(), not(${{ parameters.dryRun }}))
env:
NPM_TOKEN: $(npmToken)

- template: .devops/templates/cleanup.yml@self
parameters:
Expand Down
4 changes: 3 additions & 1 deletion azure-pipelines.release-vnext-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,12 @@ extends:
displayName: test

- script: |
yarn beachball publish -b origin/$(validation.branchPath) --access public -y -n $(npmToken) --no-push --tag experimental --config scripts/beachball/src/release-vNext.config.js
yarn beachball publish -b origin/$(validation.branchPath) --no-push --tag experimental --config scripts/beachball/src/release-vNext.config.js
git reset --hard origin/$(validation.branchPath)
displayName: Publish changes and bump versions
condition: and(succeeded(), not(${{ parameters.dryRun }}))
env:
NPM_TOKEN: $(npmToken)

- template: .devops/templates/cleanup.yml@self
parameters:
Expand Down
4 changes: 3 additions & 1 deletion azure-pipelines.release-vnext-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,12 @@ extends:
displayName: test

- script: |
yarn publish:beachball -b origin/$(Build.SourceBranchName) -n $(npmToken) --no-push --tag nightly --config scripts/beachball/src/release-vNext.config.js
yarn beachball publish -b origin/$(Build.SourceBranchName) --no-push --tag nightly --config scripts/beachball/src/release-vNext.config.js
git reset --hard origin/$(Build.SourceBranchName)
displayName: Publish changes and bump versions
condition: not(${{ parameters.dryRun }})
env:
NPM_TOKEN: $(npmToken)

- template: .devops/templates/cleanup.yml@self
parameters:
Expand Down
3 changes: 2 additions & 1 deletion azure-pipelines.release-vnext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,11 @@ extends:
condition: not(${{ parameters.dryRun }})

- script: |
yarn publish:beachball -n $(npmToken) --config scripts/beachball/src/release-vNext.config.js --message 'release: applying package updates - react-components'
yarn beachball publish --config scripts/beachball/src/release-vNext.config.js --message 'release: applying package updates - react-components'
git reset --hard origin/master
env:
GITHUB_PAT: $(githubPAT)
NPM_TOKEN: $(npmToken)
displayName: Publish changes and bump versions
condition: not(${{ parameters.dryRun }})

Expand Down
3 changes: 2 additions & 1 deletion azure-pipelines.release.headless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,11 @@ extends:
displayName: lint

- script: |
yarn publish:beachball -n $(npmToken) --config scripts/beachball/src/release-headless.config.js --message 'release: applying package updates - react-headless'
yarn beachball publish --config scripts/beachball/src/release-headless.config.js --message 'release: applying package updates - react-headless'
git reset --hard origin/master
env:
GITHUB_PAT: $(githubPAT)
NPM_TOKEN: $(npmToken)
displayName: Publish changes and bump versions
condition: not(${{ parameters.dryRun }})

Expand Down
4 changes: 3 additions & 1 deletion azure-pipelines.release.tools-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,12 @@ extends:
displayName: test

- script: |
yarn beachball publish -b origin/$(validation.branchPath) --access public -y -n $(npmToken) --no-push --tag experimental --config scripts/beachball/src/release-tools.config.js
yarn beachball publish -b origin/$(validation.branchPath) --no-push --tag experimental --config scripts/beachball/src/release-tools.config.js
git reset --hard origin/$(validation.branchPath)
displayName: Publish changes and bump versions
condition: and(succeeded(), not(${{ parameters.dryRun }}))
env:
NPM_TOKEN: $(npmToken)

- template: .devops/templates/cleanup.yml@self
parameters:
Expand Down
3 changes: 2 additions & 1 deletion azure-pipelines.release.tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,11 @@ extends:
displayName: lint

- script: |
yarn publish:beachball -n $(npmToken) --config scripts/beachball/src/release-tools.config.js --message 'release: applying package updates - tools'
yarn beachball publish --config scripts/beachball/src/release-tools.config.js --message 'release: applying package updates - tools'
git reset --hard origin/master
env:
GITHUB_PAT: $(githubPAT)
NPM_TOKEN: $(npmToken)
displayName: Publish changes and bump versions
condition: not(${{ parameters.dryRun }})

Expand Down
3 changes: 2 additions & 1 deletion azure-pipelines.release.web-components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,11 @@ extends:
displayName: Build, Test, Lint

- script: |
yarn publish:beachball -n $(npmToken) --config scripts/beachball/src/release-web-components.config.js --message 'release: applying package updates - web-components'
yarn beachball publish --config scripts/beachball/src/release-web-components.config.js --message 'release: applying package updates - web-components'
git reset --hard origin/master
env:
GITHUB_PAT: $(githubPAT)
NPM_TOKEN: $(npmToken)
displayName: Publish changes and bump versions
condition: not(${{ parameters.dryRun }})

Expand Down
3 changes: 2 additions & 1 deletion azure-pipelines.release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,12 @@ extends:
displayName: verify packaged assets

- script: |
yarn publish:beachball -n $(npmToken) --config scripts/beachball/src/release-v8.config.js --message 'release: applying package updates - react v8'
yarn beachball publish --config scripts/beachball/src/release-v8.config.js --message 'release: applying package updates - react v8'
git reset --hard origin/master
condition: and(succeeded(), not(${{ parameters.dryRun }}))
env:
GITHUB_PAT: $(githubPAT)
NPM_TOKEN: $(npmToken)
displayName: Publish changes and bump versions

- script: |
Expand Down
2 changes: 1 addition & 1 deletion beachball.config.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./scripts/beachball/base.config.json');
module.exports = require('./scripts/beachball/base.config');

This file was deleted.

This file was deleted.

11 changes: 3 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"scripts": {
"dedupe": "yarn dedupe --strategy highest",
"change": "beachball change --no-commit",
"change": "beachball change",
"check:change": "beachball check",
"check:modified-files": "node -r ./scripts/ts-node/src/register ./scripts/executors/src/check-for-modified-files",
"check:affected": "node ./scripts/executors/src/checkIfPackagesAffected.js",
Expand All @@ -23,7 +23,6 @@
"generate-version-files": "node -r ./scripts/ts-node/src/register ./scripts/generators/src/generate-version-files",
"postinstall": "husky && node ./scripts/package-manager/src/postinstall.js",
"preinstall": "node ./scripts/package-manager/src/preinstall.js",
"publish:beachball": "beachball publish -b origin/master --access public -y",
"start": "node -r ./scripts/ts-node/src/register ./scripts/executors/src/start",
"generate": "node -r ./scripts/ts-node/src/register ./scripts/executors/src/generate-ui",
"clean": "nx run-many -t clean --verbose",
Expand Down Expand Up @@ -165,7 +164,6 @@
"@types/webpack-env": "1.18.8",
"@types/webpack-hot-middleware": "2.25.9",
"@types/yargs": "13.0.11",
"@types/yargs-unparser": "2.0.1",
"@typescript-eslint/eslint-plugin": "8.46.2",
"@typescript-eslint/rule-tester": "^8.46.2",
"autoprefixer": "10.2.1",
Expand All @@ -178,7 +176,7 @@
"babel-plugin-module-resolver": "5.0.3",
"babel-plugin-react-compiler": "1.0.0",
"babel-plugin-tester": "10.1.0",
"beachball": "2.31.0",
"beachball": "3.0.0-alpha.7",
"chalk": "4.1.0",
"chrome-remote-interface": "0.28.2",
"ci-info": "3.9.0",
Expand Down Expand Up @@ -283,7 +281,6 @@
"react-shadow": "20.3.0",
"react-test-renderer": "19.2.0",
"react-window": "^1.8.6",
"read-pkg-up": "7.0.1",
"remark-gfm": "4.0.1",
"replace-in-file": "6.1.0",
"resolve": "1.22.8",
Expand Down Expand Up @@ -331,10 +328,8 @@
"webpack-dev-server": "4.15.2",
"webpack-hot-middleware": "2.26.1",
Comment thread
Hotell marked this conversation as resolved.
"webpack-merge": "5.10.0",
"workspace-tools": "0.29.1",
"yargs": "13.3.2",
Comment thread
Hotell marked this conversation as resolved.
"yargs-parser": "13.1.2",
"yargs-unparser": "2.0.0"
"yargs-parser": "13.1.2"
},
"dependencies": {
"@fluentui/react-icons-northstar": "0.66.5",
Expand Down
36 changes: 36 additions & 0 deletions scripts/beachball/base.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/** @satisfies {import('beachball').BeachballConfig} */
const config = {
access: 'public',
// Target branch WITHOUT remote, since people may have multiple remotes and choose different naming schemes.
// Specifying this helps beachball more quickly determine the target branch + remote at runtime.
branch: 'master',
commit: false,
disallowedChangeTypes: ['major'],
tag: 'latest',
generateChangelog: true,
ignorePatterns: [
'**/*.{shot,snap}',
'**/*.{test,spec,cy}.{ts,tsx}',
'**/*.stories.{ts,tsx}',
'**/.eslintrc.*',
'**/eslint.config.*',
'**/rit.config.js',
'**/__fixtures__/**',
'**/__mocks__/**',
'**/docs/**',
'**/stories/**',
'**/.storybook/**',
'**/bundle-size/**',
'**/common/isConformant.ts',
'**/src/testing/**',
'**/src/e2e/**',
'**/config/tests.js',
'**/jest.config.js',
'**/SPEC*.md',
'**/tests/**',
],
scope: ['!packages/fluentui/*'],
changehint: "Run 'yarn change' to generate a change file",
};

module.exports = config;
28 changes: 0 additions & 28 deletions scripts/beachball/base.config.json

This file was deleted.

6 changes: 5 additions & 1 deletion scripts/beachball/src/config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ describe(`beachball configs`, () => {

it(`should generate shared config`, () => {
expect(sharedConfig).toEqual({
access: 'public',
branch: 'origin/master',
changehint: "Run 'yarn change' to generate a change file",
commit: false,
disallowedChangeTypes: ['major'],
generateChangelog: true,
hooks: {
Expand All @@ -55,6 +58,7 @@ describe(`beachball configs`, () => {
'**/SPEC*.md',
'**/tests/**',
],
registry: 'https://registry.npmjs.org',
scope: ['!packages/fluentui/*'],
tag: 'latest',
changelog: {
Expand Down Expand Up @@ -135,7 +139,7 @@ describe(`beachball configs`, () => {
expect(vNextConfig.changelog.groups).toEqual([
{
changelogPath: 'packages/react-components/react-components',
masterPackageName: '@fluentui/react-components',
mainPackageName: '@fluentui/react-components',
include: includeScopes,
},
]);
Expand Down
3 changes: 3 additions & 0 deletions scripts/beachball/src/customRenderers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ export async function renderEntry(entry: ChangelogEntry): Promise<string> {
}

async function _getPrNumber(entry: ChangelogEntry): Promise<number | undefined> {
if (!entry.commit || entry.commit === 'not available') {
return undefined;
}
// Look for (presumably) the PR number at the end of the first line of the commit
try {
// Get the actual commit message which should contain the PR number
Expand Down
18 changes: 11 additions & 7 deletions scripts/beachball/src/shared.config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
import { execSync } from 'child_process';
import * as fs from 'fs';
import * as path from 'path';

import type { BeachballConfig } from 'beachball';

import { renderEntry, renderHeader } from './customRenderers';
import baseConfig from '../base.config';

const baseConfig: typeof import('../base.config.json') = JSON.parse(
fs.readFileSync(path.resolve(__dirname, '../base.config.json'), { encoding: 'utf8' }),
);

export const config: typeof baseConfig & Required<Pick<BeachballConfig, 'changelog' | 'hooks'>> = {
/**
* Shared Beachball release config.
*/
export const config: typeof baseConfig &
Required<Pick<BeachballConfig, 'branch' | 'changelog' | 'hooks' | 'registry'>> = {
...baseConfig,
// This can't be in the base config because people might use different names for remotes,
// but it should be safe in release pipelines.
branch: 'origin/master',
// In beachball v3 alpha, this is required if NPM_TOKEN is used.
registry: 'https://registry.npmjs.org',
changelog: {
customRenderers: {
renderHeader,
Expand Down
4 changes: 2 additions & 2 deletions scripts/beachball/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function getConfig({ version }: { version: 'headless' }): { scope: string
export function getConfig({ version }: { version: 'vNext' }): {
scope: string[];
groupConfig: {
masterPackageName: string;
mainPackageName: string;
changelogPath: string;
include: string[];
};
Expand All @@ -26,7 +26,7 @@ export function getConfig({ version }: { version: 'v8' | 'vNext' | 'web-componen
return {
scope: [...vNextPaths],
groupConfig: {
masterPackageName: '@fluentui/react-components',
mainPackageName: '@fluentui/react-components',
changelogPath: 'packages/react-components/react-components',
include: vNextPaths,
},
Expand Down
3 changes: 1 addition & 2 deletions scripts/beachball/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"allowJs": true,
"checkJs": true,
"sourceMap": true,
"noUnusedLocals": true,
"resolveJsonModule": true
"noUnusedLocals": true
},
"include": [],
"files": [],
Expand Down
2 changes: 1 addition & 1 deletion scripts/update-release-notes/src/changelogsAndTags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function getTagToChangelogMap(maxAgeDays?: number): Map<string, IChangelo
if (fs.existsSync(changelogPath)) {
const changelog: ChangelogJson = fs.readJSONSync(changelogPath);
for (const entry of changelog.entries) {
if (_isNewEnough(entry.date, maxAgeDays)) {
if (entry.tag && _isNewEnough(entry.date, maxAgeDays)) {
map.set(entry.tag, { ...entry, name: changelog.name });
} else {
// changelog entries should be in reverse chronological order, so stop after the first one
Expand Down
Loading
Loading