reconcile-text 0.5.0 → 0.6.0
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 +3 -2
- package/dist/reconcile.node.js +58 -2
- package/dist/reconcile.web.js +58 -2
- package/dist/types/index.d.ts +15 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,6 +24,7 @@ A Rust and TypeScript library for merging conflicting text edits without manual
|
|
|
24
24
|
### Rust
|
|
25
25
|
|
|
26
26
|
Install via crates.io:
|
|
27
|
+
|
|
27
28
|
```sh
|
|
28
29
|
cargo add reconcile-text
|
|
29
30
|
```
|
|
@@ -97,7 +98,7 @@ Differential sync is implemented by [universal-sync](https://github.com/invisibl
|
|
|
97
98
|
3. **Diff optimisation** — Operations are reordered and consolidated to maximise chained changes
|
|
98
99
|
4. **Operational Transformation** — Edits are woven together using OT principles, preserving all modifications and updating cursors
|
|
99
100
|
|
|
100
|
-
Whilst the primary goal of `reconcile-text` isn't to implement OT, it provides an elegant way to merge Myers' diff outputs. (For a dedicated Rust OT implementation, see [operational-transform-rs](https://github.com/spebern/operational-transform-rs).) The same could be achieved with CRDTs, which many libraries implement well for text—see [Loro](https://github.com/loro-dev/loro/), [cola](https://github.com/nomad/cola), and [automerge](https://github.com/automerge/automerge) as excellent examples.
|
|
101
|
+
Whilst the primary goal of `reconcile-text` isn't to implement OT, it provides an elegant way to merge Myers' diff outputs. (For a dedicated Rust OT implementation, see [operational-transform-rs](https://github.com/spebern/operational-transform-rs).) The same could be achieved with CRDTs, which many libraries implement well for text—see [Loro](https://github.com/loro-dev/loro/), [cola](https://github.com/nomad/cola), and [automerge](https://github.com/automerge/automerge) as excellent examples.
|
|
101
102
|
|
|
102
103
|
However, when only the end result of concurrent changes is observable, merge quality depends entirely on the quality of the underlying 2-way diffs. For instance, `move` operations cannot be supported because Myers' algorithm decomposes them into separate `insert` and `delete` operations, regardless of the merging algorithm used.
|
|
103
104
|
|
|
@@ -146,7 +147,7 @@ Contributions are welcome!
|
|
|
146
147
|
[MIT](./LICENSE)
|
|
147
148
|
|
|
148
149
|
[1]:https://marijnhaverbeke.nl/blog/collaborative-editing-cm.html
|
|
149
|
-
[2]: https://neil.fraser.name/writing/sync/
|
|
150
|
+
[2]: https://neil.fraser.name/writing/sync/
|
|
150
151
|
[3]: https://www.cis.upenn.edu/~bcpierce/papers/diff3-short.pdf
|
|
151
152
|
[4]: https://blog.jcoglan.com/2017/05/08/merging-with-diff3/
|
|
152
153
|
[5]: https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/35605.pdf
|