Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5ca6a93
feat(fluentui-publish): implement new CLI that uses nx release in ord…
Hotell Jan 8, 2024
9c626ed
ci: update setting npmrc for v0
Hotell Jan 12, 2024
1872b9f
feat(fluentui-publish): update implementation based on new nx release…
Hotell Jan 31, 2024
8c4bf18
feat(fluentui-publish): move main invocation to cli.js, leverage prin…
Hotell Feb 2, 2024
89579c9
refactor(fluentui-publish): remove async from gitAdd,move helpers to …
Hotell Feb 2, 2024
fcc2feb
feat(fluentui-publish): execute workpsace generator via programatic a…
Hotell Feb 2, 2024
0453585
chore(fluentui-publish): make tagRelease generic
Hotell Feb 2, 2024
5b72a89
chore(fluentui-publish): add test
Hotell Feb 2, 2024
2eda854
feat: remove nx release version settings that are set as defaults
Hotell Feb 5, 2024
b731ac5
feat: remove lerna from monorepo
Hotell Feb 5, 2024
d916796
feat(fluentui-publish): add changelog update with new version bump tr…
Hotell Feb 5, 2024
72e453d
test: skip expensive test
Hotell Feb 5, 2024
5d2d2ff
refactor(fluentui-publish): de-chunk nx-publish into proper src/* mod…
Hotell Feb 7, 2024
971001b
ci: use northstare-release binary for v0 releases, remove 'releaseVer…
Hotell Feb 7, 2024
e1e8c2d
feat(fluentui-publish): remove old release cli
Hotell Feb 7, 2024
b32d23b
chore: ignore any non standard monorepo setup files within packages/f…
Hotell Feb 7, 2024
de8b832
ci: run only northstar group projects on N* release
Hotell Feb 7, 2024
42feb92
test(fleuntui-publish): make changelog date generatio deterministic
Hotell Feb 7, 2024
b99ac2e
test(fluentui-publish): add more tests
Hotell Feb 8, 2024
6b1774e
feat(fluentui-publish): provide specifier enum for version command an…
Hotell Feb 9, 2024
4c8b9ea
refactor(fluentui-publish): use always createProjectGraphAsync to fet…
Hotell Feb 13, 2024
249e908
ci(northstar-release): add dryRun pipeline configurable variable
Hotell Feb 13, 2024
7a25c07
ci: use agent max cpu for nx --parallel
Hotell Feb 13, 2024
ae46a99
chore: dedupe deps
Hotell Feb 13, 2024
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
1 change: 1 addition & 0 deletions .devops/templates/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ steps:
echo 'deployUrl "$(deployUrl)"'
echo 'isPR "$(isPR)"'
echo 'targetBranch "$(targetBranch)"'
echo number of CPUs "$(getconf _NPROCESSORS_ONLN)"
displayName: Log environment variables (Linux)
condition: eq(variables['Agent.OS'], 'Linux')
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
/jest.preset.ts @microsoft/fluentui-react-build
/jest.config.js @microsoft/fluentui-react-build
/jest.config.ts @microsoft/fluentui-react-build
/lerna.json @microsoft/fluentui-react-build
/package.json @microsoft/fluentui-react-build
/tsconfig.json @microsoft/fluentui-react-build
/tsconfig.*.json @microsoft/fluentui-react-build
Expand Down
3 changes: 1 addition & 2 deletions .nxignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ packages/fluentui/setup-local-development.md
packages/fluentui/CHANGELOG.md
packages/fluentui/CONTRIBUTING.md
packages/fluentui/README.md
packages/fluentui/lerna.json
packages/fluentui/package.json
packages/fluentui/.browserslistrc

**/dist/**
24 changes: 12 additions & 12 deletions azure-pipelines.release-fluentui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ variables:
value: production,externalfacing

# below are variables configurable at queue time, so they cannot appear in yml file
# - name: dryRun # set it to true in order to execute publishing in dry run mode - nothing will be published
# value: false
# - name: publishDocsiteOnly # set it to true to only run Job_build_publish_doc
# value: false
# - name: publishOfficial # set it to true to publish package to npm, and publish docsite for official releases
# value: false
# - name: releaseVersion # version to publish to npm; only make sense when publishOfficial=true
# value: canary # value can only be canary/patch/minor

extends:
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
Expand Down Expand Up @@ -89,27 +89,27 @@ extends:
displayName: yarn

- task: CmdLine@2
displayName: yarn buildci
displayName: build,test,lint northstar packages
inputs:
script: yarn buildci
script: |
yarn nx run-many --targets=build,test,lint,type-check,test-ssr,verify-packaging --projects='packages/fluentui/*' --parallel $(getconf _NPROCESSORS_ONLN) --nxBail --verbose

- task: CmdLine@2
displayName: '[NPM] Publish to NPM'
condition: and(succeeded(), eq(variables.publishOfficial, true))
timeoutInMinutes: 2
inputs:
script: |
yarn logout
npm logout

NPM_TOKEN=$(npmToken)

touch packages/fluentui/.npmrc
echo "registry=https://registry.npmjs.org/" > .npmrc
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc

echo "@fluentui:registry=https://registry.npmjs.org/" > packages/fluentui/.npmrc
echo "registry=https://registry.npmjs.org/" >> packages/fluentui/.npmrc
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> packages/fluentui/.npmrc
npx northstar-release publish --dry-run $(dryRun)

yarn northstar:release bump $(releaseVersion) --yes
git checkout -- .npmrc

- template: .devops/templates/cleanup.yml@self

Expand All @@ -123,7 +123,7 @@ extends:
image: '1ES-PT-Ubuntu-20.04'
os: linux
# run this job when the previous job is succeeded or when publishDocsiteOnly is true
condition: or(succeeded(), eq(variables.publishDocsiteOnly, true))
condition: or(succeeded(), eq(variables.publishDocsiteOnly, true), eq(variables.dryRun, false))

steps:
- template: .devops/templates/tools.yml@self
Expand All @@ -144,7 +144,7 @@ extends:

- task: CmdLine@2
displayName: 'Set base path and version'
condition: and(succeeded(), eq(variables.publishOfficial, true), ne(variables.releaseVersion, 'canary'))
condition: and(succeeded(), eq(variables.publishOfficial, true))
inputs:
script: |
ver=`node -p "require('./packages/fluentui/react-northstar/package.json').version"`
Expand Down
14 changes: 0 additions & 14 deletions lerna.json

This file was deleted.

10 changes: 10 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,15 @@
"!{projectRoot}/src/test-setup.[jt]s"
]
},
"release": {
"projectsRelationship": "independent",
"groups": {
"northstar": {
"releaseTagPattern": "@fluentui/react-northstar_v{version}",
"projectsRelationship": "fixed",
"projects": ["packages/fluentui/*"]
}
}
},
"parallel": 3
}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"preinstall": "node ./scripts/package-manager/use-yarn-please.js",
"publish:beachball": "beachball publish -b origin/master --access public -y",
"rebuild": "node ./scripts/executors/invalidate-just-cache.js && yarn build --reset-cache",
"northstar:release": "node ./scripts/fluentui-publish",
"northstar:release": "northstar-release",
"northstar:build:docs": "yarn workspace @fluentui/docs build",
"northstar:start": "yarn workspace @fluentui/docs start",
"northstar:perf": "yarn workspace @fluentui/perf perf:test",
Expand Down Expand Up @@ -262,7 +262,6 @@
"jsonc-eslint-parser": "2.3.0",
"just-scripts": "1.8.2",
"lage": "1.8.8",
"lerna": "8.0.1",
"license-webpack-plugin": "2.3.10",
"lint-staged": "10.2.10",
"loader-utils": "2.0.4",
Expand Down
11 changes: 3 additions & 8 deletions packages/fluentui/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ In addition to basic focus handling, specific keyboard handlers can be added to

## Packages

We are using [Lerna][14] to manage our packages and [Yarn Workspaces][15] to link them.
We are using [Yarn Workspaces][15] to link workspace packages.

### Add a new package

Expand All @@ -133,11 +133,8 @@ yarn syncpack format

### Add a new dependency

Please always use [`lerna add`][16] to manage all dependencies including internal packages. The command below will add `@fluentui/react-proptypes` as a production dependency to the `@fluentui/react-northstar` package.

```yarn
lerna add @fluentui/react-proptypes packages/fluentui/react-northstar
```
- update `package.json#dependencies`
- if you're adding workspace package make sure it uses the fixed group version

## Development Notes

Expand Down Expand Up @@ -187,7 +184,5 @@ I (@rymeskar) have been part of the FluentUI framework team for the past two mon
[11]: https://github.com/microsoft/fluentui/blob/master/packages/fluentui/react-northstar/src/themes/teams/components/Button/buttonStyles.ts
[12]: https://github.com/microsoft/fluentui/blob/master/packages/fluentui/accessibility/src/behaviors/Menu/MenuItemBehavior.ts
[13]: https://github.com/microsoft/fluentui/blob/master/packages/fluentui/react-northstar/src/components/Menu/MenuItem.tsx
[14]: https://lerna.js.org
[15]: https://yarnpkg.com/en/docs/workspaces
[16]: https://github.com/lerna/lerna/tree/master/commands/add
[17]: https://github.com/microsoft/fluentui/wiki/Contributing
5 changes: 0 additions & 5 deletions packages/fluentui/lerna.json

This file was deleted.

5 changes: 0 additions & 5 deletions packages/fluentui/package.json

This file was deleted.

12 changes: 12 additions & 0 deletions scripts/fluentui-publish/bin/northstar-release.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env node

// @ts-check

const { joinPathFragments } = require('@nx/devkit');
const { registerTsProject } = require('@nx/js/src/internal');

registerTsProject(joinPathFragments(__dirname, '..', 'tsconfig.lib.json'));

const { main } = require('../src/cli');

main();
6 changes: 0 additions & 6 deletions scripts/fluentui-publish/cli.js

This file was deleted.

133 changes: 0 additions & 133 deletions scripts/fluentui-publish/index.ts

This file was deleted.

4 changes: 3 additions & 1 deletion scripts/fluentui-publish/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"name": "@fluentui/scripts-fluentui-publish",
"version": "0.0.1",
"private": true,
"main": "cli.js",
"bin": {
"northstar-release": "./bin/northstar-release.js"
},
"scripts": {
"format": "prettier -w --ignore-path ../../.prettierignore .",
"format:check": "yarn format -c",
Expand Down
2 changes: 1 addition & 1 deletion scripts/fluentui-publish/project.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@fluentui/scripts-fluentui-publish",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "scripts/fluentui-publish",
"sourceRoot": "scripts/fluentui-publish/src",
"projectType": "library",
"tags": ["tools"]
}
Loading