Skip to content
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

Add MongoMemoryReplSet class, tests, and docs #81

Merged
merged 6 commits into from Sep 30, 2018

Conversation

jloveridge
Copy link
Contributor

@jloveridge jloveridge commented Sep 30, 2018

I have implemented the MongoMemoryReplSet feature roughly as I described in #79. Please review and let me know if there is anything you feel needs to be changed. This, in combination with my previously merged PR should complete #74.

On a side note, flow typings still really seem to be much less robust/complete than what is available for TypeScript. I would have expected them to have caught up by now. Glad I use TypeScript normally, the more accurate code insight/completion it provides is amazing.

@nodkz
Copy link
Owner

nodkz commented Sep 30, 2018

Impressive changes!

Also, I saw your pain with flow typescript and vscode ))) 4 days ago I did the same thing.

Historically my open-source libs started from graphql-compose. It takes graphql-js package from Facebook and provides a more convenient way for type creation. And I should have deep static type checking between this libs for fast catching of changes and resolving new problems. And works amazingly cool, i need several hours to determine what need to do with breaking changes introduced in an upstream package which written with Flow.

Anyway, I feel that both TypeScript and Flowtype are amazing tools. And we as lib authors should support both of them as close to code as possible. Flow is younger than Typescript, but if there was no such competition between them, we would have had something much worse than now.

@nodkz nodkz merged commit 5911cdc into nodkz:master Sep 30, 2018
@nodkz
Copy link
Owner

nodkz commented Sep 30, 2018

We should move fast, I see that your code is very clear and stable.

Real testing I will do tomorrow at work. And if I'll found any problems then make them via small additional fixes ;)

Thanks for the AMAZING work!!!!

@nodkz
Copy link
Owner

nodkz commented Sep 30, 2018

🎉 This PR is included in version 2.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jloveridge jloveridge deleted the feature/mongomemoryreplset branch September 30, 2018 14:04
@jloveridge
Copy link
Contributor Author

As to supporting both type systems I think that if I bother to do such a thing in my future projects I will write the code in TypeScript, which has better typings available today, and then make an equivalent Flowtype interface definition file, which would be easily adapted from the .d.ts files that compiling the TypeScript would create. In most cases it would simply require a duplication of the file as filename.js.flow with only minor adjustments (such as the import type syntax). Added benefit, the generated JavaScript would also have source maps to improve the debugging experience.

It would be awesome if the transformation could be handled automatically but when I tried to use flowgen to do such a transformation it died a horrible death.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants