@cocreate/crdt 1.18.8 → 1.18.10
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 +14 -0
- package/CoCreate.config.js +1 -1
- package/package.json +5 -5
- package/src/index.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.18.10](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.18.9...v1.18.10) (2023-05-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* update packages to latest version. This commit updates various packages in the dependencies section of the package.json file to their latest published versions, thereby fixing multiple bugs and improving overall performance. ([3502d86](https://github.com/CoCreate-app/CoCreate-crdt/commit/3502d8665bc432b780d6d76745c9b7469da28cc7))
|
|
7
|
+
|
|
8
|
+
## [1.18.9](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.18.8...v1.18.9) (2023-05-10)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* apikey renamed to key ([af207fd](https://github.com/CoCreate-app/CoCreate-crdt/commit/af207fd5073e1a08d7b7ae61e4a4384a56a14dab))
|
|
14
|
+
|
|
1
15
|
## [1.18.8](https://github.com/CoCreate-app/CoCreate-crdt/compare/v1.18.7...v1.18.8) (2023-05-06)
|
|
2
16
|
|
|
3
17
|
|
package/CoCreate.config.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/crdt",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.10",
|
|
4
4
|
"description": "CoCreate crdt",
|
|
5
5
|
"author": "CoCreate LLC",
|
|
6
6
|
"license": "SEE LICENSE",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"webpack-log": "^3.0.1"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@cocreate/crud-client": "^1.
|
|
45
|
-
"@cocreate/local-storage": "^1.
|
|
46
|
-
"@cocreate/message-client": "^1.3.
|
|
47
|
-
"@cocreate/utils": "^1.20.
|
|
44
|
+
"@cocreate/crud-client": "^1.21.1",
|
|
45
|
+
"@cocreate/local-storage": "^1.7.1",
|
|
46
|
+
"@cocreate/message-client": "^1.3.8",
|
|
47
|
+
"@cocreate/utils": "^1.20.8"
|
|
48
48
|
}
|
|
49
49
|
}
|
package/src/index.js
CHANGED
|
@@ -140,7 +140,7 @@ function insertChange(data, flag) {
|
|
|
140
140
|
let lastChange = changeLog[changeLog.length - 1];
|
|
141
141
|
if (lastChange && change.datetime && lastChange.datetime){
|
|
142
142
|
if (change.datetime < lastChange.datetime){
|
|
143
|
-
//
|
|
143
|
+
// TODO: insert change at index position and update start and end postions for every element after insert
|
|
144
144
|
console.log('requires changeLog rebuild');
|
|
145
145
|
}
|
|
146
146
|
if (flag != 'replace') {
|
|
@@ -170,7 +170,7 @@ function insertChange(data, flag) {
|
|
|
170
170
|
change.removedValue = string.substring(change.start, change.length);
|
|
171
171
|
|
|
172
172
|
if (flag == 'replace') {
|
|
173
|
-
//
|
|
173
|
+
// TODO get current string and create new changeLog array then push new change
|
|
174
174
|
changeLog = [change];
|
|
175
175
|
doc.set('changeLog', changeLog)
|
|
176
176
|
} else {
|
|
@@ -265,7 +265,7 @@ crud.listen('sync', function(data) {
|
|
|
265
265
|
|
|
266
266
|
doc.set('changeLog', Data.changeLog)
|
|
267
267
|
doc.set('text', Data.text)
|
|
268
|
-
//
|
|
268
|
+
// TODO: compare modified dates to check if arrays need to merged and orderd by date or if we just use server
|
|
269
269
|
localChange(Data.crud, Data.text)
|
|
270
270
|
console.log('crdtSync')
|
|
271
271
|
}
|