Merge branch 'yjs:main' into main
This commit is contained in:
commit
22814bbfe6
@ -149,8 +149,8 @@ concepts that can be used to create a custom network protocol:
|
|||||||
|
|
||||||
* `update`: The Yjs document can be encoded to an *update* object that can be
|
* `update`: The Yjs document can be encoded to an *update* object that can be
|
||||||
parsed to reconstruct the document. Also every change on the document fires
|
parsed to reconstruct the document. Also every change on the document fires
|
||||||
an incremental document updates that allows clients to sync with each other.
|
an incremental document update that allows clients to sync with each other.
|
||||||
The update object is an Uint8Array that efficiently encodes `Item` objects and
|
The update object is a Uint8Array that efficiently encodes `Item` objects and
|
||||||
the delete set.
|
the delete set.
|
||||||
* `state vector`: A state vector defines the known state of each user (a set of
|
* `state vector`: A state vector defines the known state of each user (a set of
|
||||||
tuples `(client, clock)`). This object is also efficiently encoded as a
|
tuples `(client, clock)`). This object is also efficiently encoded as a
|
||||||
|
@ -789,7 +789,7 @@ const diff2 = Y.diffUpdate(currentState2, stateVector1)
|
|||||||
|
|
||||||
// sync clients
|
// sync clients
|
||||||
currentState1 = Y.mergeUpdates([currentState1, diff2])
|
currentState1 = Y.mergeUpdates([currentState1, diff2])
|
||||||
currentState1 = Y.mergeUpdates([currentState1, diff1])
|
currentState2 = Y.mergeUpdates([currentState2, diff1])
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Obfuscating Updates
|
#### Obfuscating Updates
|
||||||
|
14
package-lock.json
generated
14
package-lock.json
generated
@ -1,15 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "13.6.7",
|
"version": "13.6.8",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "13.6.7",
|
"version": "13.6.8",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lib0": "^0.2.74"
|
"lib0": "^0.2.86"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-commonjs": "^24.0.1",
|
"@rollup/plugin-commonjs": "^24.0.1",
|
||||||
@ -2481,9 +2481,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/lib0": {
|
"node_modules/lib0": {
|
||||||
"version": "0.2.74",
|
"version": "0.2.86",
|
||||||
"resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.74.tgz",
|
"resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.86.tgz",
|
||||||
"integrity": "sha512-roj9i46/JwG5ik5KNTkxP2IytlnrssAkD/OhlAVtE+GqectrdkfR+pttszVLrOzMDeXNs1MPt6yo66MUolWSiA==",
|
"integrity": "sha512-kxigQTM4Q7NwJkEgdqQvU21qiR37twcqqLmh+/SbiGbRLfPlLVbHyY9sWp7PwXh0Xus9ELDSjsUOwcrdt5yZ4w==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"isomorphic.js": "^0.2.4"
|
"isomorphic.js": "^0.2.4"
|
||||||
},
|
},
|
||||||
@ -2492,7 +2492,7 @@
|
|||||||
"0serve": "bin/0serve.js"
|
"0serve": "bin/0serve.js"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14"
|
"node": ">=16"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"type": "GitHub Sponsors ❤",
|
"type": "GitHub Sponsors ❤",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "13.6.7",
|
"version": "13.6.8",
|
||||||
"description": "Shared Editing Library",
|
"description": "Shared Editing Library",
|
||||||
"main": "./dist/yjs.cjs",
|
"main": "./dist/yjs.cjs",
|
||||||
"module": "./dist/yjs.mjs",
|
"module": "./dist/yjs.mjs",
|
||||||
@ -75,7 +75,7 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://docs.yjs.dev",
|
"homepage": "https://docs.yjs.dev",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lib0": "^0.2.74"
|
"lib0": "^0.2.86"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@rollup/plugin-commonjs": "^24.0.1",
|
"@rollup/plugin-commonjs": "^24.0.1",
|
||||||
|
@ -389,9 +389,8 @@ export class Item extends AbstractStruct {
|
|||||||
}
|
}
|
||||||
if ((this.left && this.left.constructor === GC) || (this.right && this.right.constructor === GC)) {
|
if ((this.left && this.left.constructor === GC) || (this.right && this.right.constructor === GC)) {
|
||||||
this.parent = null
|
this.parent = null
|
||||||
}
|
} else if (!this.parent) {
|
||||||
// only set parent if this shouldn't be garbage collected
|
// only set parent if this shouldn't be garbage collected
|
||||||
if (!this.parent) {
|
|
||||||
if (this.left && this.left.constructor === Item) {
|
if (this.left && this.left.constructor === Item) {
|
||||||
this.parent = this.left.parent
|
this.parent = this.left.parent
|
||||||
this.parentSub = this.left.parentSub
|
this.parentSub = this.left.parentSub
|
||||||
|
Loading…
x
Reference in New Issue
Block a user