@palantir/pack.state.core 0.1.1 → 0.2.1
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-lint.log +1 -1
- package/.turbo/turbo-transpileBrowser.log +1 -1
- package/.turbo/turbo-transpileCjs.log +1 -1
- package/.turbo/turbo-transpileEsm.log +1 -1
- package/.turbo/turbo-transpileTypes.log +1 -1
- package/.turbo/turbo-typecheck.log +1 -1
- package/CHANGELOG.md +19 -0
- package/build/browser/index.js +7 -5
- package/build/browser/index.js.map +1 -1
- package/build/cjs/index.cjs +7 -5
- package/build/cjs/index.cjs.map +1 -1
- package/build/cjs/index.d.cts +1 -1
- package/build/esm/index.js +7 -5
- package/build/esm/index.js.map +1 -1
- package/build/types/service/BaseYjsDocumentService.d.ts +1 -1
- package/build/types/service/BaseYjsDocumentService.d.ts.map +1 -1
- package/build/types/service/InMemoryDocumentService.d.ts.map +1 -1
- package/build/types/types/RecordRefImpl.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/service/BaseYjsDocumentService.ts +1 -2
- package/src/service/InMemoryDocumentService.ts +1 -3
- package/src/types/RecordRefImpl.ts +2 -0
package/.turbo/turbo-lint.log
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @palantir/pack.state.core
|
|
2
2
|
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [c2012a1]
|
|
8
|
+
- @palantir/pack.document-schema.model-types@0.2.1
|
|
9
|
+
|
|
10
|
+
## 0.2.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- dfeaeb0: Fix bug in core, where multiple yDocs could get created, causing the initial update to be dropped
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [dfeaeb0]
|
|
19
|
+
- @palantir/pack.document-schema.model-types@0.2.0
|
|
20
|
+
- @palantir/pack.core@0.2.0
|
|
21
|
+
|
|
3
22
|
## 0.1.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/build/browser/index.js
CHANGED
|
@@ -303,12 +303,14 @@ var INVALID_RECORD_REF = Object.freeze({
|
|
|
303
303
|
id: INVALID_RECORD_ID,
|
|
304
304
|
model: {},
|
|
305
305
|
[RecordRefBrand]: RecordRefBrand,
|
|
306
|
+
delete: () => Promise.reject(new Error("Invalid record reference")),
|
|
306
307
|
getSnapshot: () => Promise.reject(new Error("Invalid record reference")),
|
|
307
308
|
set: () => Promise.reject(new Error("Invalid record reference")),
|
|
308
309
|
onChange: () => () => {
|
|
309
310
|
},
|
|
310
311
|
onDeleted: () => () => {
|
|
311
|
-
}
|
|
312
|
+
},
|
|
313
|
+
update: () => Promise.reject(new Error("Invalid record reference"))
|
|
312
314
|
});
|
|
313
315
|
var createRecordRef = (documentService, docRef, id, model) => {
|
|
314
316
|
return new RecordRefImpl(documentService, docRef, id, model);
|
|
@@ -530,7 +532,7 @@ var BaseYjsDocumentService = class {
|
|
|
530
532
|
* Called when the last data subscription is closed for a document.
|
|
531
533
|
* Implementation should clean up any resources related to data synchronization.
|
|
532
534
|
*/
|
|
533
|
-
createBaseInternalDoc = (ref, metadata
|
|
535
|
+
createBaseInternalDoc = (ref, metadata) => {
|
|
534
536
|
const schema = ref.schema;
|
|
535
537
|
return {
|
|
536
538
|
ref: new WeakRef(ref),
|
|
@@ -555,7 +557,7 @@ var BaseYjsDocumentService = class {
|
|
|
555
557
|
docStateSubscribers: /* @__PURE__ */ new Set(),
|
|
556
558
|
metadataSubscribers: /* @__PURE__ */ new Set(),
|
|
557
559
|
recordSubscriptions: /* @__PURE__ */ new Map(),
|
|
558
|
-
yDoc:
|
|
560
|
+
yDoc: this.initializeYDoc(schema),
|
|
559
561
|
yDocUpdateHandler: void 0,
|
|
560
562
|
yjsCollectionHandlers: /* @__PURE__ */ new Map()
|
|
561
563
|
};
|
|
@@ -1237,8 +1239,8 @@ var InMemoryDocumentService = class extends BaseYjsDocumentService {
|
|
|
1237
1239
|
}));
|
|
1238
1240
|
this.config = config;
|
|
1239
1241
|
}
|
|
1240
|
-
createInternalDoc(ref, metadata
|
|
1241
|
-
return this.createBaseInternalDoc(ref, metadata
|
|
1242
|
+
createInternalDoc(ref, metadata) {
|
|
1243
|
+
return this.createBaseInternalDoc(ref, metadata);
|
|
1242
1244
|
}
|
|
1243
1245
|
get hasMetadataSubscriptions() {
|
|
1244
1246
|
return Array.from(this.documents.values()).some((doc) => this.hasSubscriptions(doc) && doc.metadataSubscribers.size > 0);
|