diff --git a/package.json b/package.json index b0f0a1b..488df03 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,6 @@ "partykit": "^0.0.26", "react": "^18.2.0", "react-dom": "^18.2.0", - "y-partykit": "^0.0.7" + "y-partykit": "^0.0.10" } } diff --git a/packages/playhtml/package.json b/packages/playhtml/package.json index c9dfae5..738371b 100644 --- a/packages/playhtml/package.json +++ b/packages/playhtml/package.json @@ -61,7 +61,7 @@ "dependencies": { "@playhtml/common": "^0.0.2", "y-indexeddb": "^9.0.11", - "y-partykit": "^0.0.7", + "y-partykit": "^0.0.10", "yjs": "^13.6.8" } } diff --git a/partykit/index.ts b/partykit/index.ts index 5a79a1e..c7f192e 100644 --- a/partykit/index.ts +++ b/partykit/index.ts @@ -3,10 +3,10 @@ import { onConnect } from "y-partykit"; export default { async onConnect(ws, room) { - // Yjs method - // @ts-ignore return onConnect(ws, room, { - persist: true, + persist: { + mode: "snapshot", + }, }); }, } satisfies PartyKitServer; diff --git a/yarn.lock b/yarn.lock index 237f4b4..fe9f0a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1728,10 +1728,10 @@ y-indexeddb@^9.0.11: dependencies: lib0 "^0.2.74" -y-partykit@^0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/y-partykit/-/y-partykit-0.0.7.tgz#168eb19d9dd7b61b201a2a857cbb22deb7981fbe" - integrity sha512-v9dFy0or95xHyXnOp5twZWjgvpeGkon1SbrVC7DiE3t80qk6fqi8alGWtJAWsV/n34p22FHuvpmC7tcwAgxcYA== +y-partykit@^0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/y-partykit/-/y-partykit-0.0.10.tgz#7680dc43b287071e556af7d8681299c5d0723623" + integrity sha512-DFzaQbbgUm4jZx8oj3uHigRUKw0sYvq7QQlw/Kq+yOrci+AD0b38cgyWEs5TWYQDCC2a7Wqs33oiJ5YgOCDqVg== dependencies: lib0 "^0.2.86" lodash.debounce "^4.0.8"