Commit graph

6 commits

Author SHA1 Message Date
Tilman Vatteroth
cb5f34aa9a chore: fix yjs patch
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2023-04-26 20:28:12 +02:00
Tilman Vatteroth
54ee492411 fix: suppress yjs double import warning
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>
2023-04-13 10:38:20 +02:00
Tilman Vatteroth
3a06f84af1 refactor: reimplement realtime-communication
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>
2023-03-24 14:06:03 +01:00
Tilman Vatteroth
caa53e3556 feat: add patch to add generic types to eventemitter2
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>
2023-02-09 21:58:41 +01:00
Philip Molares
527881ea16 refactor(patches): remove unnecessary patches for lib0
These patches are now included in the library itself.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2023-01-22 20:42:46 +01:00
Tilman Vatteroth
7320fe2ac1 feat(packages): add commons package
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>
2022-12-11 23:09:10 +01:00