Releases: reactjs/react-docgen
Releases · reactjs/react-docgen
v3.0.0-beta7
(cherry picked changes released in v2.18.0
)
New
See v2.18.0
.
Fixed
See v2.18.0
.
Other
See v2.18.0
.
- Upgraded babylon to
v7.0.0-beta20
.
You can install this version via npm install react-docgen@next
.
v2.18.0
New
- Add support for flow >=0.53 and the new react definitions (#209).
- Resolve
Object.keys
in PropType.oneOf()
(#211).
For example:
Component.propTypes = { foo: PropTypes.oneOf(Object.keys({ a: 1, b: 2 }))};
// react-docgen will now correctly extract the type of foo being "a" or "b"
v3.0.0-beta6
(cherry picked changes released in v2.17.0
)
New
See v2.17.0
.
Fixed
See v2.17.0
.
Other
See v2.17.0
.
- Upgraded babylon to
v7.0.0-beta17
.
You can install this version via npm install react-docgen@next
.
v2.17.0
New
-
Classes that define a render
public class field are now considered React components. For example:
class Component extends SomeBaseComponent {
render = someFunction;
}
See #193 and fe55485. Thank you @birjolaxew!
-
Functions assigned to public class fields are now considered as methods. I.e. both function in the following example will be picked up by react-docgen:
class Component extends React.Component {
method1() {}
method2 = () => {
};
}
See 1ff84b7 and #182.
Fixed
- Using array destructuring in class method parameters doesn't throw an error anymore. ( #197 )
Other
- Upgraded dependencies, especially
recast
( 760c426 ).
v3.0.0-beta5
(cherry picked changes from v2.16.0)
New
-e
, --exclude
now accepts a regular expression to filter out files by name: -e /.*-test\.js/
The argument will only be treated as a regular expression if the parameter is only passed once ( #164).
You can install this version via npm install react-docgen@next
.
v2.16.0
New
-e
, --exclude
now accepts a regular expression to filter out files by name: -e /.*-test\.js/
The argument will only be treated as a regular expression if the parameter is only passed once ( #164).
Thank you @wallaroo for your contribution!
v3.0.0-beta4
New
- @wcjordan added support for the
create-react-class
module! ( #179 ) (cherry picked) from v2.15.0
You can install this version via npm install react-docgen@next
.
v2.15.0
New
- @wcjordan added support for the
create-react-class
module! ( #179 )
v3.0.0-beta3
- Upgraded to babylon v7.0.0-beta.8
- Cherry-picked some changes released with v2.14.0
You can install this version via npm install react-docgen@next
.