Skip to content

Commit 7a53c22

Browse files
committed
feat: 🎸 update JSON CRDT to the latest
1 parent 97187d5 commit 7a53c22

File tree

3 files changed

+48
-20
lines changed

3 files changed

+48
-20
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@
5050
"crdt"
5151
],
5252
"dependencies": {
53-
"collaborative-editor": "^2.8.0",
54-
"react-use": "^17.5.1"
53+
"collaborative-editor": "^2.9.0",
54+
"json-joy": "^17.42.0",
55+
"react-use": "^17.6.0"
5556
},
5657
"peerDependencies": {
5758
"@monaco-editor/react": "*",
58-
"json-joy": "*",
5959
"monaco-editor": "*",
6060
"tslib": "2"
6161
},

src/CollaborativeMonaco.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const CollaborativeMonaco: React.FC<CollaborativeMonacoProps> = ({str, ..
1616
}, []);
1717

1818
const handleMount = (editor: any, monaco: any) => {
19+
unbind.current?.();
1920
unbind.current = bind(str, editor, true);
2021
rest.onMount?.(editor, monaco);
2122
};

yarn.lock

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5937,15 +5937,14 @@ __metadata:
59375937
languageName: node
59385938
linkType: hard
59395939

5940-
"collaborative-editor@npm:^2.8.0":
5941-
version: 2.8.0
5942-
resolution: "collaborative-editor@npm:2.8.0"
5940+
"collaborative-editor@npm:^2.9.0":
5941+
version: 2.9.0
5942+
resolution: "collaborative-editor@npm:2.9.0"
59435943
dependencies:
5944-
fast-diff: "npm:^1.3.0"
5944+
json-joy: "npm:^17.42.0"
59455945
peerDependencies:
5946-
json-joy: "*"
59475946
tslib: 2
5948-
checksum: 10c0/a865597853b92ebbff2246b29cf4c68e45029213d7989d1e97ee59086302d2eab78a06b219d628f664d634392cdbe77afe99f1f0e08edd8b5f7afbd2f147c877
5947+
checksum: 10c0/77755b89c2daa7658ebc43c2279c7ce453790042b2e12b39ac3de97483b87731edae05dccefacb90567943277a754227fc01979f6d82c6568bfc684927672305
59495948
languageName: node
59505949
linkType: hard
59515950

@@ -5969,7 +5968,7 @@ __metadata:
59695968
"@types/react": "npm:^18.3.3"
59705969
"@typescript-eslint/eslint-plugin": "npm:^6.13.1"
59715970
"@typescript-eslint/parser": "npm:^6.13.1"
5972-
collaborative-editor: "npm:^2.8.0"
5971+
collaborative-editor: "npm:^2.9.0"
59735972
eslint: "npm:^8.54.0"
59745973
eslint-plugin-react: "npm:^7.33.2"
59755974
eslint-plugin-storybook: "npm:^0.6.15"
@@ -5979,15 +5978,14 @@ __metadata:
59795978
prettier: "npm:^3.3.3"
59805979
react: "npm:^18.3.1"
59815980
react-dom: "npm:^18.3.1"
5982-
react-use: "npm:^17.5.1"
5981+
react-use: "npm:^17.6.0"
59835982
rimraf: "npm:^6.0.1"
59845983
storybook: "npm:^7.6.2"
59855984
ts-jest: "npm:^29.1.1"
59865985
tslib: "npm:^2.7.0"
59875986
typescript: "npm:^5.6.3"
59885987
peerDependencies:
59895988
"@monaco-editor/react": "*"
5990-
json-joy: "*"
59915989
monaco-editor: "*"
59925990
tslib: 2
59935991
languageName: unknown
@@ -7483,13 +7481,6 @@ __metadata:
74837481
languageName: node
74847482
linkType: hard
74857483

7486-
"fast-diff@npm:^1.3.0":
7487-
version: 1.3.0
7488-
resolution: "fast-diff@npm:1.3.0"
7489-
checksum: 10c0/5c19af237edb5d5effda008c891a18a585f74bf12953be57923f17a3a4d0979565fc64dbc73b9e20926b9d895f5b690c618cbb969af0cf022e3222471220ad29
7490-
languageName: node
7491-
linkType: hard
7492-
74937484
"fast-glob@npm:^3.2.9":
74947485
version: 3.3.3
74957486
resolution: "fast-glob@npm:3.3.3"
@@ -9665,6 +9656,42 @@ __metadata:
96659656
languageName: node
96669657
linkType: hard
96679658

9659+
"json-joy@npm:^17.42.0":
9660+
version: 17.42.0
9661+
resolution: "json-joy@npm:17.42.0"
9662+
dependencies:
9663+
"@jsonjoy.com/base64": "npm:^1.1.2"
9664+
"@jsonjoy.com/json-expression": "npm:^1.0.0"
9665+
"@jsonjoy.com/json-pack": "npm:^1.1.0"
9666+
"@jsonjoy.com/json-pointer": "npm:^1.0.0"
9667+
"@jsonjoy.com/json-type": "npm:^1.0.0"
9668+
"@jsonjoy.com/util": "npm:^1.6.0"
9669+
arg: "npm:^5.0.2"
9670+
hyperdyperid: "npm:^1.2.0"
9671+
nano-css: "npm:^5.6.2"
9672+
sonic-forest: "npm:^1.2.0"
9673+
thingies: "npm:^2.1.1"
9674+
tree-dump: "npm:^1.0.2"
9675+
very-small-parser: "npm:^1.12.0"
9676+
peerDependencies:
9677+
rxjs: 7
9678+
tslib: 2
9679+
peerDependenciesMeta:
9680+
rxjs:
9681+
optional: true
9682+
bin:
9683+
jj: bin/jj.js
9684+
json-pack: bin/json-pack.js
9685+
json-pack-test: bin/json-pack-test.js
9686+
json-patch: bin/json-patch.js
9687+
json-patch-test: bin/json-patch-test.js
9688+
json-pointer: bin/json-pointer.js
9689+
json-pointer-test: bin/json-pointer-test.js
9690+
json-unpack: bin/json-unpack.js
9691+
checksum: 10c0/d015c8c9a92cfe91172311b5eaae7a46e51d91649084331dcdb4573bd3315db0542d4dfa83d5d691ec296cb437434809fd458e754c5710c8e8f1d4c9264658fe
9692+
languageName: node
9693+
linkType: hard
9694+
96689695
"json-parse-even-better-errors@npm:^2.3.0, json-parse-even-better-errors@npm:^2.3.1":
96699696
version: 2.3.1
96709697
resolution: "json-parse-even-better-errors@npm:2.3.1"
@@ -11618,7 +11645,7 @@ __metadata:
1161811645
languageName: node
1161911646
linkType: hard
1162011647

11621-
"react-use@npm:^17.5.1":
11648+
"react-use@npm:^17.6.0":
1162211649
version: 17.6.0
1162311650
resolution: "react-use@npm:17.6.0"
1162411651
dependencies:

0 commit comments

Comments
 (0)