Closed forticulous closed 5 years ago
How can one use any
as a default value at all if that's the Flow keyword? 😮 I hope (given the patch is correct) that this will be merged soon, since this issue holds us from updating to Flow 0.70+.
Sorry, don't have time to maintain this package. I'd glad to add more collaborators to the repo.
@andreypopp can you add me as a collaborator? I might not be able to do much dev on it, but responding to issues and PRs I can manage. I would like to accept this fix and get a new version published, because it's currently blocking me.
I've published a working version. For now, you can either change to it or do as I've done, and set your version like this: "validated": "npm:@alxandr/validated@2.0.0"
. Works with latest flow version.
I made a major version bump, not because the API has changed, but because of flow updates, there might be new flow errors in your project with the update (ie. flow got better basically).
@andreypopp could you please merge this or consider adding @Alxandr to collaborators.
Added @Alxandr as a collaborator.
Thank you @andreypopp.
@Alxandr I've installed your fork and all warnings are gone! Now given you're a collaborator on this project, could you please merge this PR to master and tag the next release so we could keep using the official repo?
@Alxandr I need your npm handle as well to add on npm.
@andreypopp it's the same as on GitHub. https://www.npmjs.com/~alxandr.
I'm on a work trip atm, which ends tomorrow, so I'll likely not be able to merge anything in before Friday unfortunately. Writing this on my phone.
Done.
I've published 1.3.0.
But it errors with flow 0.77 :(
I'd suggest moving to using ReasonML/OCaml for those who want type safety + fast iteration speed. This is what I did.
@andreypopp thanks for releasing 1.3.0!
I feel you man, I had better experience with TypeScript than Flow. But the project we have is knee-deep in Flow so it's not something we can replace in a day.
I am not sure what errors you see on Flow 0.77, it works very well for me. You mean tests fail in validated?
@pronebird yes, you can clone the repo, upgrade flow to 0.77 and run it.
@andreypopp the branch I released works with newer versions
@Alxandr that’s cool, did you identify the root issue of such breakages?
I fixed multiple things. First off, * has been deprecated. Also, I added explicit typings to some things I think. It's been a few weeks, and I only on a phone right now, but it's all public, so you can check out the commits over at my fork if you'd like.
Thank you.
This addresses issue #29
It looks like there was a problem with the
AnyNode
variable namedany
. It's declared as the existential type and is used in the different node builder functions as the default value. But even if the type isn't declared it can only have one type so it can't work for all the node builder functions. I replaced the usage of the same variable with a newAnyNode
and that seemed to resolve the issue