@cocreate/crdt 1.22.0 → 1.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/package.json +4 -4
- package/src/index.js +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [1.22.2](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.22.1...v1.22.2) (2023-10-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* bump cocreate dependency versions ([3ef2751](https://github.com/CoCreate-app/CoCreate-crdt/commit/3ef275172edf3133c2c04a91a76061f85ac7f491))
|
|
7
|
+
* bump dependencies ([fd3a6b4](https://github.com/CoCreate-app/CoCreate-crdt/commit/fd3a6b41413809d81716b49dec16bbf0cf168084))
|
|
8
|
+
|
|
9
|
+
## [1.22.1](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.22.0...v1.22.1) (2023-10-09)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* added listener for update and create ([86c3f43](https://github.com/CoCreate-app/CoCreate-crdt/commit/86c3f43da5027d5a72a4ba4f20e815b53bffc3ad))
|
|
15
|
+
|
|
1
16
|
# [1.22.0](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.21.3...v1.22.0) (2023-09-19)
|
|
2
17
|
|
|
3
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/crdt",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.2",
|
|
4
4
|
"description": "CoCreate crdt",
|
|
5
5
|
"author": "CoCreate LLC",
|
|
6
6
|
"license": "AGPL-3.0",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"webpack-log": "^3.0.1"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@cocreate/crud-client": "^1.
|
|
43
|
+
"@cocreate/crud-client": "^1.28.1",
|
|
44
44
|
"@cocreate/local-storage": "^1.10.2",
|
|
45
|
-
"@cocreate/message-client": "^1.
|
|
46
|
-
"@cocreate/utils": "^1.
|
|
45
|
+
"@cocreate/message-client": "^1.8.0",
|
|
46
|
+
"@cocreate/utils": "^1.25.0"
|
|
47
47
|
}
|
|
48
48
|
}
|
package/src/index.js
CHANGED
|
@@ -222,8 +222,8 @@ function insertChange(data, flag) {
|
|
|
222
222
|
function broadcastChange(data) {
|
|
223
223
|
message.send({
|
|
224
224
|
room: "",
|
|
225
|
-
broadcastSender:
|
|
226
|
-
broadcastBrowser:
|
|
225
|
+
broadcastSender: false,
|
|
226
|
+
broadcastBrowser: true,
|
|
227
227
|
message: "crdt",
|
|
228
228
|
data
|
|
229
229
|
});
|
|
@@ -278,7 +278,10 @@ message.listen('crdt', function (response) {
|
|
|
278
278
|
}
|
|
279
279
|
});
|
|
280
280
|
|
|
281
|
-
crud.listen('
|
|
281
|
+
crud.listen('update.object', (data) => sync(data))
|
|
282
|
+
crud.listen('delete.object', (data) => sync(data))
|
|
283
|
+
|
|
284
|
+
function sync(data) {
|
|
282
285
|
if (data.array.includes('crdt-transactions')) {
|
|
283
286
|
if (data.object && data.object[0]) {
|
|
284
287
|
let Data = data.object[0];
|
|
@@ -297,8 +300,8 @@ crud.listen('sync', function (data) {
|
|
|
297
300
|
}
|
|
298
301
|
}
|
|
299
302
|
}
|
|
300
|
-
});
|
|
301
303
|
|
|
304
|
+
}
|
|
302
305
|
|
|
303
306
|
/*
|
|
304
307
|
crdt.getText({
|