Skip to content
Merged
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
3 changes: 2 additions & 1 deletion .github/workflows/check-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion apps/stress-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing for wc3 branch ( v3 WC are not used here ). @miroslavstastny we could undo your commented code and use wc v2 from npm (would need tweaking of the stress-test setup ). Lemme know what do you wanna do. ty

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just forgot to remove the dependency. Let's remove for now.

"@microsoft/fast-element": "^1.10.4",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
84 changes: 84 additions & 0 deletions azure-pipelines.release.web-components.yml
Original file line number Diff line number Diff line change
@@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is probably not needed - remove

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 "[email protected]"
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

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "chore: bump web-components to 3.0.0-alpha.0",
"packageName": "@fluentui/web-components",
"email": "[email protected]",
"dependentChangeType": "none"
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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\"",
Expand Down
10 changes: 9 additions & 1 deletion packages/web-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
}
}
65 changes: 65 additions & 0 deletions scripts/beachball/check-wc-3-changefiles.js
Original file line number Diff line number Diff line change
@@ -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;
Loading