-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Documentation: Update docs tool to omit private, experimental, unstable APIs #15188
Conversation
* | ||
* @return {boolean} Whether the provided name describes a stable API. | ||
*/ | ||
const isStableExportName = ( name ) => ! /^__(unstable|experimental)/.test( name ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make it case insensitive? I'd like it to cover component names as well:
__UnstableComponent
or __ExperimentalComponent
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make it case insensitive? I'd like it to cover component names as well:
__UnstableComponent
or__ExperimentalComponent
.
AFAIK (and what I'd recommend), it's still capitalized as __experimentalComponent
.
Example:
gutenberg/packages/data/src/index.js
Line 16 in da09d36
export { default as __experimentalAsyncModeProvider } from './components/async-mode-provider'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, let's follow this pattern 👍
#15200 is a step toward this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move forward with it and focus our efforts on moving selectors
and actions
under control of docgen
👍
Closes #15148
This pull request seeks to update the docs tool to omit selectors and actions which are either named as unstable or experimental, or which include a
@private
JSDoc tag.Implementation notes:
There is certainly some overlap / potential for inconsistency between the documentation output by this tool, and that of
@wordpress/docgen
. These should probably be reconciled, but it seemed a larger effort than the immediate goal of excluding APIs not intended to be documented.Testing instructions:
Verify there are no unstable, experimental, or private APIs documented.
Verify there are no local changes after running
npm run docs:build
in this branch.