Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
react-docgen@7.0.0
Major Changes
#846
82154c3
Thanks @danez! -
getTypeFromReactComponent
nowreturns an array of paths to types instead of just one. This can appear when
multiple type definitions are found for a component, for example:
In this example both the
Props
definition as well as{ some: string }
arenow found and used.
Here is a simple diff to illustrate the change when using
getTypeFromReactComponent
:#848
dda8915
Thanks @danez! - Drop support for Node.js
version 14.
The minimum supported version is now 16.14.0
#846
62e692f
Thanks @danez! -
resolveToValue
will not resolveto
ImportDeclaration
anymore but instead to one of the possible specifiers(
ImportSpecifier
,ImportDefaultSpecifier
orImportNamespaceSpecifier
).This gives better understanding to which specifier exactly
resolveToValue
did resolve a NodePath to.
Here is a possible easy fix for this in a code snippet that uses
resolveToValue
Minor Changes
#862
40ebb00
Thanks @danez! - Support
PropsWithoutRef
,PropsWithRef
andPropsWithChildren
in TypeScript.Component props are now detected correctly when these builtin types are used,
but they do currently not add any props to the documentation.
#846
82154c3
Thanks @danez! - Add support for
React.FC
inTypeScript.
Patch Changes
6312f2f
Thanks @renovate[bot]! - update
dependency @types/doctrine to ^0.0.7
#846
c01d1a0
Thanks @danez! - Fix detection of react class
components when super class is imported via named import.
#861
74b6680
Thanks @renovate! - update dependency
@types/doctrine to ^0.0.8
#846
0641700
Thanks @danez! - Remove unnecessary call to
resolveToValue
when trying to find props type from react components.#858
3be404e
Thanks @danez! - Fix detection of React.Children
with ESM imports
@react-docgen/cli@2.0.0
Major Changes
#848
dda8915
Thanks @danez! - Drop support for Node.js
version 14.
The minimum supported version is now 16.14.0
Minor Changes
b0a46e7
Thanks @danez! - update dependency commander to
v11
Patch Changes
#859
7dd2264
Thanks @renovate! - update dependency
commander to v11.1.0
Updated dependencies
[
82154c3
,6312f2f
,c01d1a0
,dda8915
,62e692f
,74b6680
,0641700
,40ebb00
,82154c3
,3be404e
]: