microsoft / microsoft/fluentui
Add Ability to Annotate Sub-Package Exports As "Internal"
@Hotell is already working on this.
Since May 31, 2022.
- Dominant language
- TypeScript
- Stars
- 20.3k
- Forks
- 2.9k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 46
Description
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
- #23345
Tasks
- create api-stripping approach RFC | https://github.com/microsoft/fluentui/pull/23577
- implement api stripping | https://github.com/microsoft/fluentui/pull/23369
-
migrate packages to api stripping during build| will be closed by https://github.com/microsoft/fluentui/pull/25319, https://github.com/microsoft/fluentui/issues/24129 - remove all gradual migration required code when previous task is done | https://github.com/microsoft/fluentui/pull/24127
- https://github.com/microsoft/fluentui/issues/25694
- use lint rule in v9 packages
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.