Problem
The @fluentui/react-components package represents the officially supported public API surface of Fluent UI React v9 yet it is composed on many "sub-packages" that are published on npm and follow semantic versioning, effectively making the APIs of these sub-packages part of Fluent's public API as well. Yet we don't always re-export an entire sub-package's API from @fluentui/react-components as parts of these APIs are meant for internal use only.
For example, @fluentui/react-components imports @fluentui/react-utilities and then re-exports some of its exports. Some of the exports from react-utilities are only meant for internal use and are not part of the public API but we have no way of communicating this to users our even within the Fluent UI team.
Appetite
3~4 weeks. We should have a solution prior to the release of v9 stable at the end of June.
Solution
Provide a mechanism to mark exports from a sub-package as "internal only".
Risks (Rabbit holes)
Out of scope (No-gos)
- No breaking changes allowed
Related
Tasks
Problem
The
@fluentui/react-componentspackage represents the officially supported public API surface of Fluent UI React v9 yet it is composed on many "sub-packages" that are published on npm and follow semantic versioning, effectively making the APIs of these sub-packages part of Fluent's public API as well. Yet we don't always re-export an entire sub-package's API from@fluentui/react-componentsas parts of these APIs are meant for internal use only.For example,
@fluentui/react-componentsimports@fluentui/react-utilitiesand then re-exports some of its exports. Some of the exports fromreact-utilitiesare only meant for internal use and are not part of the public API but we have no way of communicating this to users our even within the Fluent UI team.Appetite
3~4 weeks. We should have a solution prior to the release of v9 stable at the end of June.
Solution
Provide a mechanism to mark exports from a sub-package as "internal only".
Risks (Rabbit holes)
Out of scope (No-gos)
Related
react-componentsExports with Sub-package Exports #23345Tasks
migrate packages to api stripping during build| will be closed by feat: enable@internalapi stripping in all packages and fix export maps #25319, Defined standard for v9 package file organization #24129