Discussions related to Shared Editing, Distributed Apps, and Yjs. Questions about Yjs should go to discuss.yjs.dev. Bug reports to the issue tracker.
Hi Dan, bower, npm, and yarn are package managers. But bower had some quirks so that the authors eventually abandoned it. Now it seems that one author picked it up again. I guess you could use bower to download Yjs and its dependencies. You could also use yarn or npm - it really doesn't matter. The only difference is that the bower release doesn't contain cjs files or typescript declarations. But you still need some kind of bundler produce something that the browser can understand.
I think we (the js ecosystem) is heading in a direction where we can simply consume npm modules in the browser. But right now, it's not possible.
On the other hand, you could use a CDN that bundles the npm packages for you. E.g. unpkg. This works in the browser: import * as Y from ''https://unpkg.com/yjs?module''
ydoc.store.pendingDs === null && ydoc.store.pendingStructs === null
that you can be certain that you are missing some updates. Otherwise, you simply have to initialize a fresh sync.
TypeError: Cannot read property 'encrypt' of undefined
Module.encrypt
49 | return /** @type {PromiseLike<Uint8Array>} */ (promise.resolve(data))
50 | }
51 | const iv = crypto.getRandomValues(new Uint8Array(12))
> 52 | return crypto.subtle.encrypt(
| ^ 53 | {
54 | name: 'AES-GCM',
55 | iv
Hey @cbenz_gitlab,
that's really funny and is actually what I thought when I started the project. I was a huge fan of Haskell, but that's pretty useless if you want to create collaborative applications. But why did it have to be JavaScript?? WHYYY JS!!
Now I really like JavaScript. It's a really fun language.
The actual reason is that I named the underlying CRDT algorithm YATA - Yet Another Transformation Approach. So Yjs is the js implementation of the Y(ATA) CRDT. Also, the Y kinda looks like two branches merging, which is what Yjs does. So when I name a variable ytext or ymodel, I immediately know that the data is observable and automatically merges with other peers :)
am I the only one facing this issue after updating y-webrtc?
TypeError: Cannot read property 'encrypt' of undefined Module.encrypt 49 | return /** @type {PromiseLike<Uint8Array>} */ (promise.resolve(data)) 50 | } 51 | const iv = crypto.getRandomValues(new Uint8Array(12)) > 52 | return crypto.subtle.encrypt( | ^ 53 | { 54 | name: 'AES-GCM', 55 | iv
[encrypt] this library only work for https
Hi All, I'm working with y-websocket right now, and i'm wondering if anyone has experience adding messages to the server. I want clients to be aware when someone adds another "room", so that an added room gets added to other connected clients. Initially I thought i could just use the same WebsocketProvider to wrap the other providers to sync the client state using custom message types. I've gotten started but i keep running into issues with the persistence layer and i feel stuck. Any ideas?
The issue is if i just send a regular message like Websocket.send("stateUpdate") the server crashes with an Index out of bounds error.