-
-
Notifications
You must be signed in to change notification settings - Fork 303
feat(react): Support new flow 0.53 annotations #209
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
Conversation
Material-UI project is looking forward seeing this PR released. |
Thanks a lot! Any idea when will this be released? |
It is released now as 2.18.0 |
I'm trying out 2.18.0 on I'll see if I can get an isolated test case figured out. |
Do you have an error? Or are the docs incorrect? |
@rosskevin I have been applying the fix locally with success. (a week ago with flow 0.53 no 0.54). |
I have an error, it is failing on a stateless function. @oliviertassinari good to know, I'm using 2.18.0 release on the tip of v1-beta. Looking at the package to see if the change made it. |
This failure originates in react-docgen's babylon at $ rimraf pages/api/* && babel-node ./docs/scripts/buildApi.js
Error parsing src for /Users/kross/projects/material-ui/src/Avatar/Avatar.js
/Users/kross/projects/material-ui/docs/scripts/buildApi.js:87
throw err;
^
SyntaxError: Unexpected token (53:21)
at Parser.pp.raise (/Users/kross/projects/material-ui/node_modules/react-docgen/node_modules/babylon/lib/parser/location.js:24:13)
at Parser.pp.unexpected (/Users/kross/projects/material-ui/node_modules/react-docgen/node_modules/babylon/lib/parser/util.js:82:8)
at Parser.pp.flowParsePrimaryType (/Users/kross/projects/material-ui/node_modules/react-docgen/node_modules/babylon/lib/plugins/flow.js:552:8)
at Parser.pp.flowParsePostfixType (/Users/kross/projects/material-ui/node_modules/react-docgen/node_modules/babylon/lib/plugins/flow.js:557:38)
at Parser.pp.flowParsePrefixType (/Users/kross/projects/material-ui/node_modules/react-docgen/node_modules/babylon/lib/plugins/flow.js:573:17)
at Parser.pp.flowParseIntersectionType (/Users/kross/projects/material-ui/node_modules/react-docgen/node_modules/babylon/lib/plugins/flow.js:579:19)
at Parser.pp.flowParseUnionType (/Users/kross/projects/material-ui/node_modules/react-docgen/node_modules/babylon/lib/plugins/flow.js:589:19)
at Parser.pp.flowParseType (/Users/kross/projects/material-ui/node_modules/react-docgen/node_modules/babylon/lib/plugins/flow.js:600:19)
at Parser.pp.flowParseTypeParameterInstantiation (/Users/kross/projects/material-ui/node_modules/react-docgen/node_modules/babylon/lib/plugins/flow.js:217:27)
at Parser.pp.flowParseGenericType (/Users/kross/projects/material-ui/node_modules/react-docgen/node_modules/babylon/lib/plugins/flow.js:364:32)
error Command failed with exit code 1.
|
Failure is on |
I'm going to pull and add some |
Babylon 5 - which is used by react-docgen v2 - does not support |
Update React Docgen for support of the new Flow 0.53 annotations: reactjs/react-docgen#209
Update React Docgen for support of the new Flow 0.53 annotations: reactjs/react-docgen#209
Update React Docgen for support of the new Flow 0.53 annotations: reactjs/react-docgen#209
Fixes #207