Use BuckleScript's native namespacing feature. #182
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for using BuckleScript's native
"namespace: true"
feature. Rather than all of ourmodule
names beingUrql*
and then renamed inReasonUrql.re
, we just use BuckleScript's native"namespace: true"
. This is great – our codebase is easier to traverse and module references are more succint. This to address feedback from #170. Would love to get any feedback or opinions from folks before merging. For the most part, the public API doesn't really change. The one piece that does isUrqlTypes
is now justTypes
. So if you do the following:and you have a local
Types
module, you'd get a conflict. Not a huge deal though, because you can make the (wiser) choice to not globallyopen ReasonUrql
and just reference it as needed. If approved, I'll update our code samples to show that pattern a bit more often.