Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: automate react-components suite public api #33769

Open
1 task done
Hotell opened this issue Feb 4, 2025 · 0 comments
Open
1 task done

[Feature]: automate react-components suite public api #33769

Hotell opened this issue Feb 4, 2025 · 0 comments

Comments

@Hotell
Copy link
Contributor

Hotell commented Feb 4, 2025

Area

React Components (@fluentui/react-components)

Describe the feature that you would like added

Current process of defining public API of react-components suite is automated only on when propagating preview package to stable

https://github.com/microsoft/fluentui/blob/master/tools/workspace-plugin/src/generators/prepare-initial-release/index.ts#L220-L227

if additional APIs are exported from sub-package after the first stable release it's up to the author to expose this from react-components suite ( a manual task that is not always executed as intended ).

To mitigate this out of sync public API of sub-package and suite we need to automate this process.

Implementation proposal:

We should leverage newly added nx sync generators for this task.

  • create sync generator that would be part of generate-api target for react-components suite
    • @fluentui/workspace-generator:public-api-sync
  • parse sub-packages barrel file, which is specified as dependency of react-components suite within its package.json
    • extract export APIs that are marked as @public ( or to mitigate churn on our side we can go other way - extract all apis beside those marked as @private )
    • emit extracted exports within react-components barel

check in sync functionality:

  • if emit is different generator will fail (blocking PR etc)

Additional context

No response

Have you discussed this feature with our team

@microsoft/fluentui-react-build

Validations

  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Priority

Low

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant