diff --git a/.github/workflows/check-packages.yml b/.github/workflows/check-packages.yml index 43ef1e696c728..875957b38b1a3 100644 --- a/.github/workflows/check-packages.yml +++ b/.github/workflows/check-packages.yml @@ -83,4 +83,5 @@ jobs: core.exportVariable('BEACHBALL_VERSION', beachballVersion); - run: | - npx beachball@$BEACHBALL_VERSION check + npx beachball@$BEACHBALL_VERSION check -b web-components-v3 + node ./scripts/beachball/check-wc-3-changefiles diff --git a/apps/stress-test/package.json b/apps/stress-test/package.json index 7398859311d59..4339bbb9544a7 100644 --- a/apps/stress-test/package.json +++ b/apps/stress-test/package.json @@ -13,7 +13,6 @@ "@fluentui/react": "^8.99.0", "@fluentui/react-components": "^9.6.1", "@fluentui/react-icons": "^2.0.175", - "@fluentui/web-components": "^2.5.8", "@microsoft/fast-element": "^1.10.4", "react": "17.0.2", "react-dom": "17.0.2", diff --git a/azure-pipelines.release.web-components.yml b/azure-pipelines.release.web-components.yml new file mode 100644 index 0000000000000..855074ffa1c5f --- /dev/null +++ b/azure-pipelines.release.web-components.yml @@ -0,0 +1,84 @@ +pr: none +trigger: none + +# Customize build number to include major version +# Example: web-components_20201022.1 +name: 'web-components_$(Date:yyyyMMdd)$(Rev:.r)' + +variables: + - group: 'Github and NPM secrets' + - template: .devops/templates/variables.yml + parameters: + skipComponentGovernanceDetection: false + - name: release.web_components # Used to scope beachball to release only vnext packages + value: true + - group: InfoSec-SecurityResults + - name: tags + value: production,externalfacing + +schedules: + # Triggers the nightly release + # minute 0, hour 4 in UTC (5am in UTC+1), any day of month, any month, days 1-5 of week (M-F) + # https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?tabs=yaml&view=azure-devops#supported-cron-syntax + - cron: '0 4 * * 1-5' + displayName: 'Daily release (M-F at 5am UTC+1)' + branches: + include: + - web-components-v3 + +jobs: + - template: .devops/templates/compliance-job.yml + + - job: Release + dependsOn: Compliance + pool: '1ES-Host-Ubuntu' + workspace: + clean: all + steps: + - template: .devops/templates/tools.yml + + - script: | + git config user.name "Fluent UI Build" + git config user.email "fluentui-internal@service.microsoft.com" + displayName: Configure git user (used by beachball) + + - task: Bash@3 + inputs: + filePath: yarn-ci.sh + displayName: yarn + + # --only makes it only run tests (otherwise due to the missing --production arg, lage would re-run the build) + # https://github.com/microsoft/fluentui/issues/21686 + - script: | + yarn lage format:check lint test build --to @fluentui/web-components + displayName: Build, Test, Lint + + - script: | + yarn beachball publish -b origin/web-components-v3 --access public -y -n $(npmToken) --config scripts/beachball/release-web-components.config.js + git reset --hard origin/web-components-v3 + env: + GITHUB_PAT: $(githubPAT) + displayName: Publish changes and bump versions + + - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 + displayName: 📒 Generate Manifest + inputs: + BuildDropPath: $(System.DefaultWorkingDirectory) + + - task: PublishPipelineArtifact@1 + displayName: 📒 Publish Manifest + inputs: + artifactName: SBom-$(System.JobAttempt) + targetPath: $(System.DefaultWorkingDirectory)/_manifest + + - task: ComponentGovernanceComponentDetection@0 + displayName: 'Component governance detection' + inputs: + sourceScanPath: $(Agent.BuildDirectory) + condition: succeeded() + timeoutInMinutes: 5 + continueOnError: true + + - template: .devops/templates/cleanup.yml + parameters: + checkForModifiedFiles: false diff --git a/change/@fluentui-react-aria-5228383f-9887-4ca8-9cc2-53527f839cbf.json b/change/@fluentui-react-aria-5228383f-9887-4ca8-9cc2-53527f839cbf.json deleted file mode 100644 index 53fd2fd1c7fff..0000000000000 --- a/change/@fluentui-react-aria-5228383f-9887-4ca8-9cc2-53527f839cbf.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "minor", - "comment": "exposes internal typings: ARIAButtonAlteredProps and ARIAButtonElement", - "packageName": "@fluentui/react-aria", - "email": "bernardo.sunderhus@gmail.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-avatar-63cc4116-6a81-4306-9fee-0415db150eae.json b/change/@fluentui-react-avatar-63cc4116-6a81-4306-9fee-0415db150eae.json deleted file mode 100644 index c77b17467da5e..0000000000000 --- a/change/@fluentui-react-avatar-63cc4116-6a81-4306-9fee-0415db150eae.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "fix: Removing gaps between ::after pseudo-element and AvatarGroupItem/AvatarGroupPopover.\"", - "packageName": "@fluentui/react-avatar", - "email": "esteban.230@hotmail.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-avatar-73954508-ffed-4bfe-a16f-39fd287dafd4.json b/change/@fluentui-react-avatar-73954508-ffed-4bfe-a16f-39fd287dafd4.json deleted file mode 100644 index d9c1c9e4b8cf8..0000000000000 --- a/change/@fluentui-react-avatar-73954508-ffed-4bfe-a16f-39fd287dafd4.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "none", - "comment": "chore: adds disableButtonEnhancement on triggers", - "packageName": "@fluentui/react-avatar", - "email": "bernardo.sunderhus@gmail.com", - "dependentChangeType": "none" -} diff --git a/change/@fluentui-react-context-selector-23a9c999-a4fe-4e81-849b-27a96d250a13.json b/change/@fluentui-react-context-selector-23a9c999-a4fe-4e81-849b-27a96d250a13.json deleted file mode 100644 index 65c748ff8df8e..0000000000000 --- a/change/@fluentui-react-context-selector-23a9c999-a4fe-4e81-849b-27a96d250a13.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "minor", - "comment": "exposes internal type: ContextSelector", - "packageName": "@fluentui/react-context-selector", - "email": "bernardo.sunderhus@gmail.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-dialog-914ff253-e601-4337-91a3-f7f8648eb1a5.json b/change/@fluentui-react-dialog-914ff253-e601-4337-91a3-f7f8648eb1a5.json deleted file mode 100644 index 784dca56f6ea7..0000000000000 --- a/change/@fluentui-react-dialog-914ff253-e601-4337-91a3-f7f8648eb1a5.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "none", - "comment": "chore: adds disableButtonEnhancement on triggers", - "packageName": "@fluentui/react-dialog", - "email": "bernardo.sunderhus@gmail.com", - "dependentChangeType": "none" -} diff --git a/change/@fluentui-react-dialog-a27523cc-5d13-4fd5-ac46-23fc9218bc73.json b/change/@fluentui-react-dialog-a27523cc-5d13-4fd5-ac46-23fc9218bc73.json deleted file mode 100644 index 7a1a2e6f2034b..0000000000000 --- a/change/@fluentui-react-dialog-a27523cc-5d13-4fd5-ac46-23fc9218bc73.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "minor", - "comment": "removes exposing of internal type FluentTriggerComponent", - "packageName": "@fluentui/react-dialog", - "email": "bernardo.sunderhus@gmail.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-divider-2bfdd93e-d2cd-4f3b-9b89-c452876fb730.json b/change/@fluentui-react-divider-2bfdd93e-d2cd-4f3b-9b89-c452876fb730.json deleted file mode 100644 index 7604a59f9a438..0000000000000 --- a/change/@fluentui-react-divider-2bfdd93e-d2cd-4f3b-9b89-c452876fb730.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "chore: Migrate to new package structure.", - "packageName": "@fluentui/react-divider", - "email": "tristan.watanabe@gmail.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-menu-4dd93206-2702-4680-829c-617e8b250bc0.json b/change/@fluentui-react-menu-4dd93206-2702-4680-829c-617e8b250bc0.json deleted file mode 100644 index 6feeff353b77f..0000000000000 --- a/change/@fluentui-react-menu-4dd93206-2702-4680-829c-617e8b250bc0.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "none", - "comment": "chore: adds disableButtonEnhancement on triggers", - "packageName": "@fluentui/react-menu", - "email": "bernardo.sunderhus@gmail.com", - "dependentChangeType": "none" -} diff --git a/change/@fluentui-react-popover-c9f8a637-4cdc-438c-b74a-b38279f3e1df.json b/change/@fluentui-react-popover-c9f8a637-4cdc-438c-b74a-b38279f3e1df.json deleted file mode 100644 index 262fccf9227b1..0000000000000 --- a/change/@fluentui-react-popover-c9f8a637-4cdc-438c-b74a-b38279f3e1df.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "none", - "comment": "chore: adds disableButtonEnhancement on triggers", - "packageName": "@fluentui/react-popover", - "email": "bernardo.sunderhus@gmail.com", - "dependentChangeType": "none" -} diff --git a/change/@fluentui-react-positioning-12f69b12-6e86-4415-8a0d-b34318f3b71e.json b/change/@fluentui-react-positioning-12f69b12-6e86-4415-8a0d-b34318f3b71e.json deleted file mode 100644 index 1a80439810b10..0000000000000 --- a/change/@fluentui-react-positioning-12f69b12-6e86-4415-8a0d-b34318f3b71e.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "minor", - "comment": "exposes new typings to avoid exposing internal methods", - "packageName": "@fluentui/react-positioning", - "email": "bernardo.sunderhus@gmail.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-select-287be14f-25f7-44e5-b5a7-290b8772638a.json b/change/@fluentui-react-select-287be14f-25f7-44e5-b5a7-290b8772638a.json deleted file mode 100644 index e3e3a66e17ddd..0000000000000 --- a/change/@fluentui-react-select-287be14f-25f7-44e5-b5a7-290b8772638a.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "prerelease", - "comment": "fix: update styles based on design review", - "packageName": "@fluentui/react-select", - "email": "sarah.higley@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-select-be677e57-0564-45b5-9366-0c4bd90d52d9.json b/change/@fluentui-react-select-be677e57-0564-45b5-9366-0c4bd90d52d9.json deleted file mode 100644 index 4248e0263caf9..0000000000000 --- a/change/@fluentui-react-select-be677e57-0564-45b5-9366-0c4bd90d52d9.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "prerelease", - "comment": "chore: Migrate to new package structure.", - "packageName": "@fluentui/react-select", - "email": "tristan.watanabe@gmail.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-shared-contexts-625a6ac7-63ff-4172-a2fd-a4f60b9eff2e.json b/change/@fluentui-react-shared-contexts-625a6ac7-63ff-4172-a2fd-a4f60b9eff2e.json deleted file mode 100644 index 3ee40c1db2e24..0000000000000 --- a/change/@fluentui-react-shared-contexts-625a6ac7-63ff-4172-a2fd-a4f60b9eff2e.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "minor", - "comment": "exposes internal methods and types that are used in the API surface", - "packageName": "@fluentui/react-shared-contexts", - "email": "bernardo.sunderhus@gmail.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-slider-d63d5490-c622-4a65-aadd-13489fb0c0b2.json b/change/@fluentui-react-slider-d63d5490-c622-4a65-aadd-13489fb0c0b2.json deleted file mode 100644 index 16fe8687d292c..0000000000000 --- a/change/@fluentui-react-slider-d63d5490-c622-4a65-aadd-13489fb0c0b2.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "fix: Pad in slider so the thumb does not render outside the bounds of the root element", - "packageName": "@fluentui/react-slider", - "email": "behowell@microsoft.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-react-table-5bfc4866-5bbc-4e35-8b10-38085d13ab4b.json b/change/@fluentui-react-table-5bfc4866-5bbc-4e35-8b10-38085d13ab4b.json deleted file mode 100644 index ab3ac654c8d6c..0000000000000 --- a/change/@fluentui-react-table-5bfc4866-5bbc-4e35-8b10-38085d13ab4b.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "none", - "comment": "chore: Updates folder structure", - "packageName": "@fluentui/react-table", - "email": "lingfangao@hotmail.com", - "dependentChangeType": "none" -} diff --git a/change/@fluentui-react-tabster-59ed64de-6eec-46c5-b0d6-2cd22cba4d0c.json b/change/@fluentui-react-tabster-59ed64de-6eec-46c5-b0d6-2cd22cba4d0c.json deleted file mode 100644 index 98b1703843bd4..0000000000000 --- a/change/@fluentui-react-tabster-59ed64de-6eec-46c5-b0d6-2cd22cba4d0c.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "type": "patch", - "comment": "make allowCondition a optional parameter for findAllFocusable function", - "packageName": "@fluentui/react-tabster", - "email": "marcosvmmoura@gmail.com", - "dependentChangeType": "patch" -} diff --git a/change/@fluentui-web-components-06a3ebaf-3485-4ea9-a024-ff17305e1f88.json b/change/@fluentui-web-components-06a3ebaf-3485-4ea9-a024-ff17305e1f88.json new file mode 100644 index 0000000000000..c2cb4822582aa --- /dev/null +++ b/change/@fluentui-web-components-06a3ebaf-3485-4ea9-a024-ff17305e1f88.json @@ -0,0 +1,7 @@ +{ + "type": "none", + "comment": "chore: bump web-components to 3.0.0-alpha.0", + "packageName": "@fluentui/web-components", + "email": "martinhochel@microsoft.com", + "dependentChangeType": "none" +} diff --git a/package.json b/package.json index 24797c0e76f25..a4f48ec3d07a4 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,8 @@ "buildto:lerna": "node ./scripts/monorepo/buildTo.js", "bundle": "lage bundle --verbose", "bundlesizecollect": "node ./scripts/bundle-size-collect", - "change": "beachball change --no-commit", - "check:change": "beachball check", + "change": "beachball change --no-commit -b web-components-v3", + "check:change": "beachball check -b web-components-v3", "check:modified-files": "yarn workspace @fluentui/scripts just check-for-modified-files", "check:affected-package": "node ./scripts/monorepo/checkIfPackagesAffected.js", "check:installed-dependencies-versions": "satisfied --skip-invalid --ignore \"prettier|angular|lit|sass|@storybook/html|@storybook/mdx2-csf|svelte|@testing-library|vue|@cypress/react|cypress|@swc/wasm|@cactuslab/usepubsub\"", diff --git a/packages/web-components/package.json b/packages/web-components/package.json index e7e1443af3579..253146efed574 100644 --- a/packages/web-components/package.json +++ b/packages/web-components/package.json @@ -2,7 +2,7 @@ "name": "@fluentui/web-components", "description": "A library of Fluent Web Components", "sideEffects": false, - "version": "2.5.8", + "version": "3.0.0-alpha.0", "author": { "name": "Microsoft", "url": "https://discord.gg/FcSNfg4" @@ -77,5 +77,13 @@ "@microsoft/fast-foundation": "^2.47.0", "@microsoft/fast-web-utilities": "^5.4.0", "tslib": "^1.13.0" + }, + "beachball": { + "disallowedChangeTypes": [ + "major", + "minor", + "patch" + ], + "tag": "alpha" } } diff --git a/scripts/beachball/check-wc-3-changefiles.js b/scripts/beachball/check-wc-3-changefiles.js new file mode 100644 index 0000000000000..8ed3ca8301bfb --- /dev/null +++ b/scripts/beachball/check-wc-3-changefiles.js @@ -0,0 +1,65 @@ +const path = require('path'); +const fs = require('fs'); + +/** + * @typedef {{ + type: 'none' | 'prerelease' | 'patch' | 'minor' | 'major'; + comment: string; + packageName: string; + email: string; + dependentChangeType: 'none' | 'patch'; +}} ChangeFile + */ + +const isExecutedFromCli = require.main === module; + +if (isExecutedFromCli) { + const changefilesRootPath = path.resolve(__dirname, '../../change'); + main(changefilesRootPath); +} + +/** + * Utility for web-components-v3 development branch to double check we dont accidentally introduce chain of changes, + * which could result in releasing/bumping monorepo packages beside `@fluentui/web-components` ! + * + * ⚠️ TODO: + * - This functionality NEEDS to be REMOVED prior merging to master + * - Usage needs to be removed from .github/workflows/check-packages.yml + */ +function main(/** @type {string} */ root) { + const changeFiles = fs.readdirSync(root, 'utf8'); + + const invalidChangeFiles = /** @type string [] */ (changeFiles + .map(changeFilePath => { + const filePath = path.join(root, changeFilePath); + /** @type {ChangeFile} */ + const content = JSON.parse(fs.readFileSync(filePath, 'utf-8')); + + if (content.packageName === '@fluentui/web-components') { + return; + } + + if (content.type !== 'none' || content.dependentChangeType !== 'none') { + return changeFilePath; + } + }) + .filter(Boolean)); + + if (invalidChangeFiles.length > 0) { + console.error('================'); + console.error(`You commited changefiles with not allowed type/dependentChangeType!`); + console.error( + `Changefiles that are not for @fluentui/web-components need to have type and dependentChangeType set to "none"`, + ); + console.error(); + console.error('Invalid change files:'); + console.error(invalidChangeFiles.join('\n')); + console.error('================'); + + process.exit(1); + } + + console.log('✅ All changefiles are valid.'); +} + +exports.main = main; diff --git a/scripts/beachball/check-wc-3-changefiles.spec.ts b/scripts/beachball/check-wc-3-changefiles.spec.ts new file mode 100644 index 0000000000000..f53b761cff3d5 --- /dev/null +++ b/scripts/beachball/check-wc-3-changefiles.spec.ts @@ -0,0 +1,104 @@ +import * as fs from 'fs'; +import * as path from 'path'; +import tmp from 'tmp'; +import { main } from './check-wc-3-changefiles'; +import type { ChangeFile } from './check-wc-3-changefiles'; + +tmp.setGracefulCleanup(); + +function setup(changefiles: Array) { + const root = tmp.dirSync({ prefix: 'changefiles', unsafeCleanup: true }).name; + const changesRoot = path.join(root, 'change'); + + fs.mkdirSync(changesRoot); + changefiles.forEach((change, idx) => { + const changeFilePath = path.join(changesRoot, `${change.packageName.replace('/', '-')}-${idx}-abc.json`); + // console.log(`creating: ${changeFilePath}`); + + fs.writeFileSync(changeFilePath, JSON.stringify(change, null, 2), 'utf-8'); + }); + + const consoleErrorSpy = jest.spyOn(console, 'error').mockImplementation(() => {}); + const processExitSpy = jest.spyOn(process, 'exit').mockImplementation((() => {}) as any); + + return { root: changesRoot, consoleErrorSpy, processExitSpy }; +} + +describe(`Name of the group`, () => { + it(`should pass if only valid changefiles exist`, () => { + const changeFiles: Array = [ + { + type: 'none', + comment: 'change one', + email: 'foo@bar.com', + dependentChangeType: 'none', + packageName: '@fluentui/react-text', + }, + { + type: 'prerelease', + comment: 'change one', + email: 'foo@bar.com', + dependentChangeType: 'patch', + packageName: '@fluentui/web-components', + }, + ]; + const { root, consoleErrorSpy, processExitSpy } = setup(changeFiles); + main(root); + + expect(processExitSpy).not.toHaveBeenCalled(); + expect(consoleErrorSpy).not.toHaveBeenCalled(); + }); + + it(`should fail if there is invalid changefile`, () => { + const changeFiles: Array = [ + { + type: 'patch', + comment: 'change one', + email: 'foo@bar.com', + dependentChangeType: 'patch', + packageName: '@fluentui/react-card', + }, + { + type: 'none', + comment: 'change one', + email: 'foo@bar.com', + dependentChangeType: 'patch', + packageName: '@fluentui/react-image', + }, + { + type: 'patch', + comment: 'change one', + email: 'foo@bar.com', + dependentChangeType: 'none', + packageName: '@fluentui/react-text', + }, + { + type: 'prerelease', + comment: 'change one', + email: 'foo@bar.com', + dependentChangeType: 'patch', + packageName: '@fluentui/web-components', + }, + ]; + const { root, consoleErrorSpy, processExitSpy } = setup(changeFiles); + main(root); + + expect(processExitSpy).toHaveBeenCalledWith(1); + + expect(consoleErrorSpy).toHaveBeenCalled(); + const logs = consoleErrorSpy.mock.calls.flat(); + + expect(logs).toMatchInlineSnapshot(` + Array [ + "================", + "You commited changefiles with not allowed type/dependentChangeType!", + "Changefiles that are not for @fluentui/web-components need to have type and dependentChangeType set to \\"none\\"", + "Invalid change files:", + "@fluentui-react-card-0-abc.json + @fluentui-react-image-1-abc.json + @fluentui-react-text-2-abc.json", + "================", + ] + `); + }); +}); diff --git a/scripts/beachball/config.test.ts b/scripts/beachball/config.test.ts index 654f86b71c80a..5722be65434d5 100644 --- a/scripts/beachball/config.test.ts +++ b/scripts/beachball/config.test.ts @@ -1,6 +1,7 @@ import { config as sharedConfig } from './shared.config'; import v8Config from './release-v8.config'; import vNextConfig from './release-vNext.config'; +import webComponentsConfig from './release-web-components.config'; describe(`beachball configs`, () => { it(`should generate shared config`, () => { @@ -71,4 +72,19 @@ describe(`beachball configs`, () => { }, ]); }); + + it(`should generate web-components release config`, () => { + expect(webComponentsConfig.scope).toEqual( + expect.arrayContaining([ + 'packages/web-components', + '!packages/fluentui/*', + '!apps/*', + '!apps/perf-test-react-components', + '!apps/vr-tests-react-components', + '!packages/react-components/react-components', + ]), + ); + expect(webComponentsConfig.scope.some(scope => scope.startsWith('!packages/react-'))).toBe(true); + expect(webComponentsConfig.changelog).toEqual(sharedConfig.changelog); + }); }); diff --git a/scripts/beachball/release-web-components.config.js b/scripts/beachball/release-web-components.config.js new file mode 100644 index 0000000000000..a85e627d58657 --- /dev/null +++ b/scripts/beachball/release-web-components.config.js @@ -0,0 +1,21 @@ +if (process.env.NODE_ENV !== 'test') { + require('../ts-node-register'); +} + +const { getConfig } = require('./utils'); +const { config: sharedConfig } = require('./shared.config'); + +const { scope } = getConfig({ version: 'web-components' }); + +/** + * @type {typeof sharedConfig} + */ +const config = { + ...sharedConfig, + scope: [...sharedConfig.scope, ...scope], + changelog: { + ...sharedConfig.changelog, + }, +}; + +module.exports = config; diff --git a/scripts/beachball/utils.ts b/scripts/beachball/utils.ts index 302317412f6e5..a7707204230c2 100644 --- a/scripts/beachball/utils.ts +++ b/scripts/beachball/utils.ts @@ -7,6 +7,7 @@ import { AllPackageInfo, getAllPackageInfo, isConvergedPackage } from '../monore * vNext scope includes all packages that have version > 8.x and shared internal packages that need versions bumped. * @returns {string[]} Array of package paths for beachball scope */ +export function getConfig({ version }: { version: 'web-components' }): { scope: string[] }; export function getConfig({ version }: { version: 'v8' }): { scope: string[] }; export function getConfig({ version, @@ -20,10 +21,17 @@ export function getConfig({ include: string[]; }; }; -export function getConfig({ version }: { version: 'v8' | 'vNext' }) { +export function getConfig({ version }: { version: 'v8' | 'vNext' | 'web-components' }) { const allPackageInfo = getAllPackageInfo(); const vNextPackagePaths = getVNextPackagePaths(allPackageInfo); + if (version === 'web-components') { + const ignoreVNextScope = vNextPackagePaths.map(path => `!${path}`); + return { + scope: [allPackageInfo['@fluentui/web-components'].packagePath, '!apps/*', ...ignoreVNextScope], + }; + } + if (version === 'vNext') { return { scope: [...vNextPackagePaths],