@dabble/patches 0.7.10 → 0.7.11

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.
@@ -8,7 +8,6 @@ import { SizeCalculator } from '../algorithms/ot/shared/changeBatching.js';
8
8
  import { ClientAlgorithm } from '../client/ClientAlgorithm.js';
9
9
  import { Patches } from '../client/Patches.js';
10
10
  import { AlgorithmName } from '../client/PatchesStore.js';
11
- export { isDocLoaded } from '../shared/utils.js';
12
11
  import '../json-patch/JSONPatch.js';
13
12
  import '@dabble/delta';
14
13
  import '../json-patch/types.js';
@@ -32,7 +31,6 @@ interface PatchesSyncOptions {
32
31
  /** Custom size calculator for storage limit. Falls back to patches.docOptions.sizeCalculator. */
33
32
  sizeCalculator?: SizeCalculator;
34
33
  }
35
-
36
34
  /**
37
35
  * Handles WebSocket connection, document subscriptions, and syncing logic between
38
36
  * the Patches instance and the server.
@@ -251,6 +251,7 @@ class PatchesSync {
251
251
  } else {
252
252
  const snapshot = await this.ws.getDoc(docId);
253
253
  await algorithm.store.saveDoc(docId, snapshot);
254
+ this._updateSyncedDoc(docId, { committedRev: snapshot.rev });
254
255
  if (baseDoc) {
255
256
  baseDoc.import({ ...snapshot, changes: [] });
256
257
  }
@@ -526,6 +527,5 @@ __decorateElement(_init, 1, "syncDoc", _syncDoc_dec, PatchesSync);
526
527
  __decorateElement(_init, 1, "_receiveCommittedChanges", __receiveCommittedChanges_dec, PatchesSync);
527
528
  __decoratorMetadata(_init, PatchesSync);
528
529
  export {
529
- PatchesSync,
530
- isDocLoaded
530
+ PatchesSync
531
531
  };
@@ -12,7 +12,6 @@ export { PatchesWebSocket } from './websocket/PatchesWebSocket.js';
12
12
  export { JsonRpcMessage, SignalingService } from './websocket/SignalingService.js';
13
13
  export { WebSocketServer, WebSocketServerOptions } from './websocket/WebSocketServer.js';
14
14
  export { WebSocketOptions, WebSocketTransport } from './websocket/WebSocketTransport.js';
15
- export { isDocLoaded } from '../shared/utils.js';
16
15
  export { CommitChangesOptions } from '../types.js';
17
16
  import '../event-signal.js';
18
17
  import '../algorithms/ot/shared/changeBatching.js';
@@ -16,7 +16,6 @@ import '../net/PatchesClient.js';
16
16
  import '../net/websocket/WebSocketTransport.js';
17
17
  import '../utils/deferred.js';
18
18
  import '../algorithms/ot/shared/changeBatching.js';
19
- import '../shared/utils.js';
20
19
 
21
20
  /**
22
21
  * Context value containing Patches and optional PatchesSync instances.
@@ -16,7 +16,6 @@ import '../net/PatchesClient.js';
16
16
  import '../net/websocket/WebSocketTransport.js';
17
17
  import '../utils/deferred.js';
18
18
  import '../algorithms/ot/shared/changeBatching.js';
19
- import '../shared/utils.js';
20
19
 
21
20
  /**
22
21
  * Injection key for Patches instance.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dabble/patches",
3
- "version": "0.7.10",
3
+ "version": "0.7.11",
4
4
  "description": "Immutable JSON Patch implementation based on RFC 6902 supporting operational transformation and last-writer-wins",
5
5
  "author": "Jacob Wright <jacwright@gmail.com>",
6
6
  "bugs": {