-
Notifications
You must be signed in to change notification settings - Fork 2k
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
export flow types in build (without test folders) #412
Conversation
Another implementation of @nmn PR Flow types very needed to avoid this trash: https://github.com/nodkz/graphql-compose/blob/master/src/definition.js (and graphql-js as git submodule) Also solved @nmn issue #400 FYI `npm run cp-flow` correctly works if sub-folders exist in `dist/` otherwise it prints `No such file or directory`.
sad that this had to be duplicated! I can close my PR, or add this to my PR. whatever is preferred by the GraphQL team. |
@nmn if you want save authority and think that my changes is better, please check it and change your PR. After that drop me line, and I close my PR. Cause without your solution, my PR was not be created. On my mac you command throw me duplicated lines and files from _tests. So easiest way to fix it for me, was edit package via github interface. And of course one more time bump @leebyron to work with PRs. @nmn don't be sad, you are awesome! |
@leebyron this is not better solution, because following files: Right now I'm using graphql-js as submodule, and remove '@flow' line from above 2 files and have zero errors. So how would be better totally exclude |
Can you explain more about the errors you're seeing? Are they real issues in your usage or are they issues with the type signatures of those files? |
There are some problems with I'll give detailed information tomorrow. Out of work right now. |
Ok - I'll delay on a merge until you report back |
@nodkz @leebyron I tend to think that if there are type errors, its because you're doing things that don't match the types defined in the library itself. I feel like this is the best way to expose flow types in most cases as you get the actual flow types used by the library authors and not something tacked on after the fact. Perhaps some flow types are too specific and cause too many errors, but that means that we should try and fix that in the source of the library itself and not by tacking on inaccurate type definitions. P.S. closing my other PR now. |
Just clone fresh master of graphql-js. So this PR should be delayed until fixing flow errors on 0.27. |
@leebyron I think, it will be cool and realized super fast, if you ask guys from flow to realize a call stack for error, and after that ask guys from nuclide to implement this feature in the atom-nuclide. Cause work with flow cli is very unproductive. And fixing such errors like above cease be a kinda guessing. |
@nodkz @nmn @leebyron Those errors in Flow 0.27 are some errors were ignored in 0.26.
Basically It would be great if there are some inner plan to fix those Flow errors in Facebook,or i can plan to fix them,cause i find some errors in my package(used flow typed graphql) with Flow 0.27 too. 0.27 is great, i should stay in 0.27,should not temporarily rollback to 0.26. |
fix all errors with flow 0.27 in #420 ,will test them tomorrow( and write unit test). |
@iamchenxin awesome work! Thanks for help. |
After your last changes and updating to flow 0.28 all became perfect! Found a little bit clear bash-solution for finding list of js files, without |
@leebyron Your Move!! |
There is no type export in |
…annotations Describe classes via `flow-typed` is too lazy and it may stale with time. The moreover types are already in the code. So let export them, like it done in `graphql-js`. Related: graphql/graphql-js#412
Another implementation of @nmn PR
Flow types very needed to avoid this trash: https://github.com/nodkz/graphql-compose/blob/master/src/definition.js (and graphql-js as git submodule)
Also solved @nmn issue #400
FYI
npm run cp-flow
correctly works if sub-folders exist indist/
otherwise it printsNo such file or directory
.