@johnhenry/browsermesh-sync 0.2.0 → 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/README.md +12 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
# browsermesh-sync
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@johnhenry/browsermesh-sync)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
|
|
3
6
|
CRDT sync engine, delta sync, file transfer, and real-time collaboration for BrowserMesh.
|
|
4
7
|
|
|
8
|
+
## Why this exists
|
|
9
|
+
|
|
10
|
+
`browsermesh-primitives` ships the raw CRDT types (`VectorClock`, `LWWRegister`, `GCounter`, `PNCounter`, `ORSet`, `RGA`, `LWWMap`) but has no opinion about how a whole *document* made of several of them gets synchronized, chunked into transferable deltas, or reconciled after a schema change. `browsermesh-sync` is that layer: `SyncDocument`/`MeshSyncEngine` compose primitives' CRDT classes into a synchronizable document, `DeltaLog`/`DeltaEncoder`/`SyncCoordinator` turn ongoing changes into transportable deltas instead of resending full state, `MeshFileTransfer`/`ChunkStore` extend the same content-addressed approach to binary files, and `CollabSession`/`YjsAdapter` bridge to real-time collaborative editing. It depends on `browsermesh-primitives` directly -- `SyncDocument`'s field types *are* primitives' CRDT classes, not a reimplementation of them.
|
|
11
|
+
|
|
12
|
+
## Used by
|
|
13
|
+
|
|
14
|
+
`@johnhenry/browsermesh-apps` requires this package as a non-optional peer (unlike `browsermesh-core`/`browsermesh-transport`/`browsermesh-discovery`, which are optional there) -- it's load-bearing, not an add-on. `MeshSyncEngine`/`InMemorySyncStorage` back `mesh-sync.mjs` and `mesh-kv.mjs`'s replicated key-value store; `ChunkStore` backs `mesh-torrent.mjs` and `peer-ipfs.mjs`'s content-addressed chunk storage; and `IndexedDBChunkStore`/`IndexedDBSyncStorage` (this package's durable, browser-persisted storage adapters) back `cloud-storage-backend.mjs` and `manifest-sync.mjs`, the storage layer underneath `browsermesh-apps`'s `CloudStorage` SDK.
|
|
15
|
+
|
|
5
16
|
## Provenance
|
|
6
17
|
|
|
7
18
|
Extracted from the private `clawser` monorepo (previously `packages/browsermesh-sync`), where it was manually published to npm, unscoped, as `browsermesh-sync@0.1.0` (2026-07-17) with no CI ever automating that publish. This is its first release as part of the `@johnhenry/browsermesh` monorepo; the version restarts at `0.0.0` per family convention.
|
|
@@ -28,7 +39,7 @@ npm install @johnhenry/browsermesh-sync @johnhenry/browsermesh-primitives
|
|
|
28
39
|
## Usage
|
|
29
40
|
|
|
30
41
|
```js
|
|
31
|
-
import { MeshSyncEngine, MeshFileTransfer, CollabSession } from 'browsermesh-sync';
|
|
42
|
+
import { MeshSyncEngine, MeshFileTransfer, CollabSession } from '@johnhenry/browsermesh-sync';
|
|
32
43
|
```
|
|
33
44
|
|
|
34
45
|
## License
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@johnhenry/browsermesh-sync",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "CRDT sync engine, delta sync, file transfer, and collaboration for BrowserMesh",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.mjs",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"directory": "packages/browsermesh-sync"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@johnhenry/browsermesh-primitives": ">=0.0
|
|
22
|
+
"@johnhenry/browsermesh-primitives": ">=0.2.0 <1.0.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"fake-indexeddb": "^6.2.5"
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://opensource.johnhenry.me/browsermesh/",
|
|
31
31
|
"engines": {
|
|
32
|
-
"node": ">=
|
|
32
|
+
"node": ">=26.0.0"
|
|
33
33
|
}
|
|
34
34
|
}
|