0no-co / wonka

🎩 A tiny but capable push & pull stream library for TypeScript and Flow
MIT License
709 stars 29 forks source link

Remove namespacing from bsconfig.json. Update version in bsconfig.json. #32

Closed parkerziegler closed 5 years ago

parkerziegler commented 5 years ago

Fixes #25.

With the addition of namespace: true in v3, BuckleScript automatically namespaced our Wonka under the Wonka namespace. This meant that, in order to reference functions from the library in Reason, you'd have to do one of the following.

  1. open Wonka and then use Wonka. for access.
open Wonka;

let source = Wonka.fromArray([|1, 2, 3|]);

or 2. open Wonka.Wonka

open Wonka.Wonka;

let source = fromArray([|1, 2, 3|]);

Since the module structure we use already implements namespacing manually via wonka.ml, we can safely remove the namespace field from bsconfig.json. This may necessitate a minor version bump since it would be a breaking change for people currently hacking around this with one of the above solutions.