@pluv/crdt-yjs 2.0.0 → 2.0.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/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +18 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +21 -21
- package/dist/index.mjs +21 -21
- package/package.json +7 -7
- package/src/doc/CrdtYjsDoc.ts +21 -21
- package/src/object/object.ts +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @pluv/crdt-yjs@2.0.
|
|
2
|
+
> @pluv/crdt-yjs@2.0.2 build /home/runner/work/pluv/pluv/packages/crdt-yjs
|
|
3
3
|
> tsup src/index.ts --format esm,cjs --dts
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
[34mCLI[39m Target: es6
|
|
9
9
|
[34mESM[39m Build start
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
|
-
[32mCJS[39m [1mdist/index.js [22m[32m16.33 KB[39m
|
|
12
|
-
[32mCJS[39m ⚡️ Build success in 121ms
|
|
13
11
|
[32mESM[39m [1mdist/index.mjs [22m[32m15.47 KB[39m
|
|
14
|
-
[32mESM[39m ⚡️ Build success in
|
|
12
|
+
[32mESM[39m ⚡️ Build success in 87ms
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m16.33 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 88ms
|
|
15
15
|
[34mDTS[39m Build start
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 4156ms
|
|
17
17
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m5.14 KB[39m
|
|
18
18
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m5.14 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @pluv/crdt-yjs
|
|
2
2
|
|
|
3
|
+
## 2.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 945c47d: Updated deprecation warnings to read that features will be removed in v3 instead of v2.
|
|
8
|
+
|
|
9
|
+
Due to an [extremely unfortunate bug in changesets](https://github.com/changesets/changesets/issues/1011), minor and patch changes will create major releases. This caused an unintended v2 release that had no breaking changes. To avoid backtracking and deleting deprecated functionalities right away, the deprecation warnings have been updated so that those APIs will be removed in v3 instead of v2.
|
|
10
|
+
|
|
11
|
+
- @pluv/crdt@2.0.2
|
|
12
|
+
- @pluv/types@2.0.2
|
|
13
|
+
|
|
14
|
+
## 2.0.1
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- @pluv/crdt@2.0.1
|
|
19
|
+
- @pluv/types@2.0.1
|
|
20
|
+
|
|
3
21
|
## 2.0.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -58,7 +58,7 @@ declare const doc: <TStorage extends Record<string, YjsType<any, any>>>(value?:
|
|
|
58
58
|
declare const map: <T extends unknown>(value?: readonly (readonly [key: string, value: T])[]) => YjsType<Map<T>, Record<string, T>>;
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
|
-
* @deprecated This will be removed in
|
|
61
|
+
* @deprecated This will be removed in v3.0.0. Use yjs.map instead
|
|
62
62
|
* @description Creates a Yjs map, but declare it like it's an object
|
|
63
63
|
* @date May 8, 2025
|
|
64
64
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ declare const doc: <TStorage extends Record<string, YjsType<any, any>>>(value?:
|
|
|
58
58
|
declare const map: <T extends unknown>(value?: readonly (readonly [key: string, value: T])[]) => YjsType<Map<T>, Record<string, T>>;
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
|
-
* @deprecated This will be removed in
|
|
61
|
+
* @deprecated This will be removed in v3.0.0. Use yjs.map instead
|
|
62
62
|
* @description Creates a Yjs map, but declare it like it's an object
|
|
63
63
|
* @date May 8, 2025
|
|
64
64
|
*/
|
package/dist/index.js
CHANGED
|
@@ -208,9 +208,9 @@ var CrdtYjsDoc = class {
|
|
|
208
208
|
if (node instanceof YjsXmlElement) {
|
|
209
209
|
this._warn(oneLine`
|
|
210
210
|
Warning: You are using \`yjs.xmlElement\` to declare top-level storage value \`${key}\`.
|
|
211
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
212
|
-
Please follow the
|
|
213
|
-
https://pluv.io/docs/migration-guides/
|
|
211
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
212
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
213
|
+
https://pluv.io/docs/migration-guides/v3
|
|
214
214
|
`);
|
|
215
215
|
const yXmlElement = this.value.getXmlElement(key);
|
|
216
216
|
if (!!((_a = node.initialValue) == null ? void 0 : _a.length)) {
|
|
@@ -221,9 +221,9 @@ var CrdtYjsDoc = class {
|
|
|
221
221
|
if (node instanceof YjsXmlFragment) {
|
|
222
222
|
this._warn(oneLine`
|
|
223
223
|
Warning: You are using \`yjs.xmlFragment\` to declare top-level storage value \`${key}\`.
|
|
224
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
225
|
-
Please follow the
|
|
226
|
-
https://pluv.io/docs/migration-guides/
|
|
224
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
225
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
226
|
+
https://pluv.io/docs/migration-guides/v3
|
|
227
227
|
`);
|
|
228
228
|
const yXmlFragment = this.value.getXmlFragment(key);
|
|
229
229
|
if (!!((_c = node.initialValue) == null ? void 0 : _c.length)) {
|
|
@@ -234,9 +234,9 @@ var CrdtYjsDoc = class {
|
|
|
234
234
|
if (node instanceof YjsXmlText) {
|
|
235
235
|
this._warn(oneLine`
|
|
236
236
|
Warning: You are using \`yjs.xmlText\` to declare top-level storage value \`${key}\`.
|
|
237
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
238
|
-
Please follow the
|
|
239
|
-
https://pluv.io/docs/migration-guides/
|
|
237
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
238
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
239
|
+
https://pluv.io/docs/migration-guides/v3
|
|
240
240
|
`);
|
|
241
241
|
const yXmlText = this.value.get(key, import_yjs9.XmlText);
|
|
242
242
|
return __spreadProps(__spreadValues({}, acc), { [key]: yXmlText });
|
|
@@ -244,9 +244,9 @@ var CrdtYjsDoc = class {
|
|
|
244
244
|
if (node instanceof YjsArray) {
|
|
245
245
|
this._warn(oneLine`
|
|
246
246
|
Warning: You are using \`yjs.array\` to declare top-level storage value \`${key}\`.
|
|
247
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
248
|
-
Please follow the
|
|
249
|
-
https://pluv.io/docs/migration-guides/
|
|
247
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
248
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
249
|
+
https://pluv.io/docs/migration-guides/v3
|
|
250
250
|
`);
|
|
251
251
|
const yArray = this.value.getArray(key);
|
|
252
252
|
if (!!((_e = node.initialValue) == null ? void 0 : _e.length)) yArray.insert(0, (_f = node.initialValue) == null ? void 0 : _f.slice(0));
|
|
@@ -255,9 +255,9 @@ var CrdtYjsDoc = class {
|
|
|
255
255
|
if (node instanceof YjsMap) {
|
|
256
256
|
this._warn(oneLine`
|
|
257
257
|
Warning: You are using \`yjs.map\` to declare top-level storage value \`${key}\`.
|
|
258
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
259
|
-
Please follow the
|
|
260
|
-
https://pluv.io/docs/migration-guides/
|
|
258
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
259
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
260
|
+
https://pluv.io/docs/migration-guides/v3
|
|
261
261
|
`);
|
|
262
262
|
const yMap = this.value.getMap(key);
|
|
263
263
|
((_g = node.initialValue) != null ? _g : []).forEach(([k, v]) => {
|
|
@@ -268,9 +268,9 @@ var CrdtYjsDoc = class {
|
|
|
268
268
|
if (node instanceof YjsObject) {
|
|
269
269
|
this._warn(oneLine`
|
|
270
270
|
Warning: You are using \`yjs.object\` to declare top-level storage value \`${key}\`.
|
|
271
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
272
|
-
Please follow the
|
|
273
|
-
https://pluv.io/docs/migration-guides/
|
|
271
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
272
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
273
|
+
https://pluv.io/docs/migration-guides/v3
|
|
274
274
|
`);
|
|
275
275
|
const yMap = this.value.getMap(key);
|
|
276
276
|
Object.entries((_h = node.initialValue) != null ? _h : {}).forEach(([k, v]) => {
|
|
@@ -281,9 +281,9 @@ var CrdtYjsDoc = class {
|
|
|
281
281
|
if (node instanceof YjsText) {
|
|
282
282
|
this._warn(oneLine`
|
|
283
283
|
Warning: You are using \`yjs.text\` to declare top-level storage value \`${key}\`.
|
|
284
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
285
|
-
Please follow the
|
|
286
|
-
https://pluv.io/docs/migration-guides/
|
|
284
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
285
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
286
|
+
https://pluv.io/docs/migration-guides/v3
|
|
287
287
|
`);
|
|
288
288
|
const yText = this.value.getText(key);
|
|
289
289
|
if (typeof node.initialValue === "string") yText.insert(0, node.initialValue);
|
package/dist/index.mjs
CHANGED
|
@@ -203,9 +203,9 @@ var CrdtYjsDoc = class {
|
|
|
203
203
|
if (node instanceof YjsXmlElement) {
|
|
204
204
|
this._warn(oneLine`
|
|
205
205
|
Warning: You are using \`yjs.xmlElement\` to declare top-level storage value \`${key}\`.
|
|
206
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
207
|
-
Please follow the
|
|
208
|
-
https://pluv.io/docs/migration-guides/
|
|
206
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
207
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
208
|
+
https://pluv.io/docs/migration-guides/v3
|
|
209
209
|
`);
|
|
210
210
|
const yXmlElement = this.value.getXmlElement(key);
|
|
211
211
|
if (!!((_a = node.initialValue) == null ? void 0 : _a.length)) {
|
|
@@ -216,9 +216,9 @@ var CrdtYjsDoc = class {
|
|
|
216
216
|
if (node instanceof YjsXmlFragment) {
|
|
217
217
|
this._warn(oneLine`
|
|
218
218
|
Warning: You are using \`yjs.xmlFragment\` to declare top-level storage value \`${key}\`.
|
|
219
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
220
|
-
Please follow the
|
|
221
|
-
https://pluv.io/docs/migration-guides/
|
|
219
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
220
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
221
|
+
https://pluv.io/docs/migration-guides/v3
|
|
222
222
|
`);
|
|
223
223
|
const yXmlFragment = this.value.getXmlFragment(key);
|
|
224
224
|
if (!!((_c = node.initialValue) == null ? void 0 : _c.length)) {
|
|
@@ -229,9 +229,9 @@ var CrdtYjsDoc = class {
|
|
|
229
229
|
if (node instanceof YjsXmlText) {
|
|
230
230
|
this._warn(oneLine`
|
|
231
231
|
Warning: You are using \`yjs.xmlText\` to declare top-level storage value \`${key}\`.
|
|
232
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
233
|
-
Please follow the
|
|
234
|
-
https://pluv.io/docs/migration-guides/
|
|
232
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
233
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
234
|
+
https://pluv.io/docs/migration-guides/v3
|
|
235
235
|
`);
|
|
236
236
|
const yXmlText = this.value.get(key, YXmlText3);
|
|
237
237
|
return __spreadProps(__spreadValues({}, acc), { [key]: yXmlText });
|
|
@@ -239,9 +239,9 @@ var CrdtYjsDoc = class {
|
|
|
239
239
|
if (node instanceof YjsArray) {
|
|
240
240
|
this._warn(oneLine`
|
|
241
241
|
Warning: You are using \`yjs.array\` to declare top-level storage value \`${key}\`.
|
|
242
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
243
|
-
Please follow the
|
|
244
|
-
https://pluv.io/docs/migration-guides/
|
|
242
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
243
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
244
|
+
https://pluv.io/docs/migration-guides/v3
|
|
245
245
|
`);
|
|
246
246
|
const yArray = this.value.getArray(key);
|
|
247
247
|
if (!!((_e = node.initialValue) == null ? void 0 : _e.length)) yArray.insert(0, (_f = node.initialValue) == null ? void 0 : _f.slice(0));
|
|
@@ -250,9 +250,9 @@ var CrdtYjsDoc = class {
|
|
|
250
250
|
if (node instanceof YjsMap) {
|
|
251
251
|
this._warn(oneLine`
|
|
252
252
|
Warning: You are using \`yjs.map\` to declare top-level storage value \`${key}\`.
|
|
253
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
254
|
-
Please follow the
|
|
255
|
-
https://pluv.io/docs/migration-guides/
|
|
253
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
254
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
255
|
+
https://pluv.io/docs/migration-guides/v3
|
|
256
256
|
`);
|
|
257
257
|
const yMap = this.value.getMap(key);
|
|
258
258
|
((_g = node.initialValue) != null ? _g : []).forEach(([k, v]) => {
|
|
@@ -263,9 +263,9 @@ var CrdtYjsDoc = class {
|
|
|
263
263
|
if (node instanceof YjsObject) {
|
|
264
264
|
this._warn(oneLine`
|
|
265
265
|
Warning: You are using \`yjs.object\` to declare top-level storage value \`${key}\`.
|
|
266
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
267
|
-
Please follow the
|
|
268
|
-
https://pluv.io/docs/migration-guides/
|
|
266
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
267
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
268
|
+
https://pluv.io/docs/migration-guides/v3
|
|
269
269
|
`);
|
|
270
270
|
const yMap = this.value.getMap(key);
|
|
271
271
|
Object.entries((_h = node.initialValue) != null ? _h : {}).forEach(([k, v]) => {
|
|
@@ -276,9 +276,9 @@ var CrdtYjsDoc = class {
|
|
|
276
276
|
if (node instanceof YjsText) {
|
|
277
277
|
this._warn(oneLine`
|
|
278
278
|
Warning: You are using \`yjs.text\` to declare top-level storage value \`${key}\`.
|
|
279
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
280
|
-
Please follow the
|
|
281
|
-
https://pluv.io/docs/migration-guides/
|
|
279
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
280
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
281
|
+
https://pluv.io/docs/migration-guides/v3
|
|
282
282
|
`);
|
|
283
283
|
const yText = this.value.getText(key);
|
|
284
284
|
if (typeof node.initialValue === "string") yText.insert(0, node.initialValue);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluv/crdt-yjs",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "yjs for @pluv/io",
|
|
5
5
|
"author": "leedavidcs",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,21 +17,21 @@
|
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
+
"@types/node": "^22.15.17",
|
|
20
21
|
"js-base64": "^3.7.7",
|
|
21
|
-
"@pluv/crdt": "^2.0.
|
|
22
|
-
"@pluv/types": "^2.0.
|
|
22
|
+
"@pluv/crdt": "^2.0.2",
|
|
23
|
+
"@pluv/types": "^2.0.2"
|
|
23
24
|
},
|
|
24
25
|
"peerDependencies": {
|
|
25
26
|
"yjs": "^13.0.0"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
|
-
"
|
|
29
|
-
"eslint": "^9.25.1",
|
|
29
|
+
"eslint": "^9.26.0",
|
|
30
30
|
"tsup": "^8.4.0",
|
|
31
31
|
"typescript": "^5.8.3",
|
|
32
32
|
"yjs": "^13.6.26",
|
|
33
|
-
"@pluv/tsconfig": "^2.0.
|
|
34
|
-
"eslint-config-pluv": "^2.0.
|
|
33
|
+
"@pluv/tsconfig": "^2.0.2",
|
|
34
|
+
"eslint-config-pluv": "^2.0.2"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "tsup src/index.ts --format esm,cjs --dts",
|
package/src/doc/CrdtYjsDoc.ts
CHANGED
|
@@ -67,9 +67,9 @@ export class CrdtYjsDoc<TStorage extends Record<string, YjsType<any, any>>>
|
|
|
67
67
|
if (node instanceof YjsXmlElement) {
|
|
68
68
|
this._warn(oneLine`
|
|
69
69
|
Warning: You are using \`yjs.xmlElement\` to declare top-level storage value \`${key}\`.
|
|
70
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
71
|
-
Please follow the
|
|
72
|
-
https://pluv.io/docs/migration-guides/
|
|
70
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
71
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
72
|
+
https://pluv.io/docs/migration-guides/v3
|
|
73
73
|
`);
|
|
74
74
|
|
|
75
75
|
const yXmlElement = this.value.getXmlElement(key);
|
|
@@ -84,9 +84,9 @@ export class CrdtYjsDoc<TStorage extends Record<string, YjsType<any, any>>>
|
|
|
84
84
|
if (node instanceof YjsXmlFragment) {
|
|
85
85
|
this._warn(oneLine`
|
|
86
86
|
Warning: You are using \`yjs.xmlFragment\` to declare top-level storage value \`${key}\`.
|
|
87
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
88
|
-
Please follow the
|
|
89
|
-
https://pluv.io/docs/migration-guides/
|
|
87
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
88
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
89
|
+
https://pluv.io/docs/migration-guides/v3
|
|
90
90
|
`);
|
|
91
91
|
|
|
92
92
|
const yXmlFragment = this.value.getXmlFragment(key);
|
|
@@ -101,9 +101,9 @@ export class CrdtYjsDoc<TStorage extends Record<string, YjsType<any, any>>>
|
|
|
101
101
|
if (node instanceof YjsXmlText) {
|
|
102
102
|
this._warn(oneLine`
|
|
103
103
|
Warning: You are using \`yjs.xmlText\` to declare top-level storage value \`${key}\`.
|
|
104
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
105
|
-
Please follow the
|
|
106
|
-
https://pluv.io/docs/migration-guides/
|
|
104
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
105
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
106
|
+
https://pluv.io/docs/migration-guides/v3
|
|
107
107
|
`);
|
|
108
108
|
|
|
109
109
|
const yXmlText = this.value.get(key, YXmlText) as YXmlText;
|
|
@@ -114,9 +114,9 @@ export class CrdtYjsDoc<TStorage extends Record<string, YjsType<any, any>>>
|
|
|
114
114
|
if (node instanceof YjsArray) {
|
|
115
115
|
this._warn(oneLine`
|
|
116
116
|
Warning: You are using \`yjs.array\` to declare top-level storage value \`${key}\`.
|
|
117
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
118
|
-
Please follow the
|
|
119
|
-
https://pluv.io/docs/migration-guides/
|
|
117
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
118
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
119
|
+
https://pluv.io/docs/migration-guides/v3
|
|
120
120
|
`);
|
|
121
121
|
|
|
122
122
|
const yArray = this.value.getArray(key);
|
|
@@ -129,9 +129,9 @@ export class CrdtYjsDoc<TStorage extends Record<string, YjsType<any, any>>>
|
|
|
129
129
|
if (node instanceof YjsMap) {
|
|
130
130
|
this._warn(oneLine`
|
|
131
131
|
Warning: You are using \`yjs.map\` to declare top-level storage value \`${key}\`.
|
|
132
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
133
|
-
Please follow the
|
|
134
|
-
https://pluv.io/docs/migration-guides/
|
|
132
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
133
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
134
|
+
https://pluv.io/docs/migration-guides/v3
|
|
135
135
|
`);
|
|
136
136
|
|
|
137
137
|
const yMap = this.value.getMap(key);
|
|
@@ -146,9 +146,9 @@ export class CrdtYjsDoc<TStorage extends Record<string, YjsType<any, any>>>
|
|
|
146
146
|
if (node instanceof YjsObject) {
|
|
147
147
|
this._warn(oneLine`
|
|
148
148
|
Warning: You are using \`yjs.object\` to declare top-level storage value \`${key}\`.
|
|
149
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
150
|
-
Please follow the
|
|
151
|
-
https://pluv.io/docs/migration-guides/
|
|
149
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
150
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
151
|
+
https://pluv.io/docs/migration-guides/v3
|
|
152
152
|
`);
|
|
153
153
|
|
|
154
154
|
const yMap = this.value.getMap(key);
|
|
@@ -163,9 +163,9 @@ export class CrdtYjsDoc<TStorage extends Record<string, YjsType<any, any>>>
|
|
|
163
163
|
if (node instanceof YjsText) {
|
|
164
164
|
this._warn(oneLine`
|
|
165
165
|
Warning: You are using \`yjs.text\` to declare top-level storage value \`${key}\`.
|
|
166
|
-
Adding top-level values this way has been deprecated, to be removed in
|
|
167
|
-
Please follow the
|
|
168
|
-
https://pluv.io/docs/migration-guides/
|
|
166
|
+
Adding top-level values this way has been deprecated, to be removed in v3.
|
|
167
|
+
Please follow the v3 migration guide to declare top-level types correctly:
|
|
168
|
+
https://pluv.io/docs/migration-guides/v3
|
|
169
169
|
`);
|
|
170
170
|
|
|
171
171
|
const yText = this.value.getText(key);
|
package/src/object/object.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { YjsType } from "../types";
|
|
|
3
3
|
import { YjsObject } from "./YjsObject";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* @deprecated This will be removed in
|
|
6
|
+
* @deprecated This will be removed in v3.0.0. Use yjs.map instead
|
|
7
7
|
* @description Creates a Yjs map, but declare it like it's an object
|
|
8
8
|
* @date May 8, 2025
|
|
9
9
|
*/
|