This warning should indicate that you mix cjs and mjs imports.
While this is a nice feature it has a weird side effect:
Jest triggers this check and floods the console every time a test imports yjs.
This happens between all test suites and every time you call jest.resetModules().
Nothing breaks here. Jest does what it should.
Therefore this commit suppresses this warning in test mode.
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit refactors a lot of things that are not easy to separate.
It replaces the binary protocol of y-protocols with json.
It introduces event based message processing.
It implements our own code mirror plugins for synchronisation of content and remote cursors
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
EventEmitter2 has types, but they're very basic and not very type safe.
I created this patch, because my improved types haven't been merged into the official package.
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This is an import of 166ca8da12
with some changes to make it fit into the mono repo.
- TypedEventEmitter has been replaced with EventEmitter2 because EventEmitter2 is faster and TypedEventEmitter had some troubles with the new way of compiling.
- tsc-esm has been replaced with microbundle. The problems that lib0 doesn't export its types correctly has been solved using yarn patch.
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>