Skip to content

Commit

Permalink
Release v0.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
acurrieclark committed Jun 7, 2023
1 parent 6cb7a8c commit 5a4a3dc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 27 deletions.
44 changes: 22 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onsetsoftware/automerge-store",
"version": "0.8.0-alpha.1",
"version": "0.7.4",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -26,8 +26,8 @@
"automerge-repo": "0.0.52"
},
"dependencies": {
"@automerge/automerge": "2.1.0-alpha.3",
"@onsetsoftware/automerge-patcher": "0.8.0-alpha.1"
"@automerge/automerge": "2.0.3",
"@onsetsoftware/automerge-patcher": "^0.7.3"
},
"files": [
"dist"
Expand Down
6 changes: 4 additions & 2 deletions src/automerge-repo-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import type {
PatchCallback,
} from "@automerge/automerge";

import type { PatchInfo } from "@automerge/automerge-wasm";

export class AutomergeRepoStore<T> extends AutomergeStore<T> {
private patchCallbacks: Set<PatchCallback<T>> = new Set();
private subscriberCount = 0;
Expand All @@ -36,7 +38,7 @@ export class AutomergeRepoStore<T> extends AutomergeStore<T> {
this.handle.once(
"patch",
({ patches, handle, ...patchInfo }: DocHandlePatchPayload<T>) => {
patchCallback(patches, patchInfo);
patchCallback(patches, patchInfo as PatchInfo<T>);
},
);
} else {
Expand All @@ -59,7 +61,7 @@ export class AutomergeRepoStore<T> extends AutomergeStore<T> {
...patchInfo
}: DocHandlePatchPayload<T>) => {
this.patchCallbacks.forEach((cb) => {
cb(patches, patchInfo);
cb(patches, patchInfo as PatchInfo<T>);
this.patchCallbacks.delete(cb);
});
};
Expand Down

0 comments on commit 5a4a3dc

Please sign in to comment.