Comparing version 0.2.0 to 0.2.1
@@ -969,2 +969,3 @@ (function (root, factory) { | ||
operationsSinceBase: function(base) { | ||
if (base === this.base) { return []; } | ||
for (var i = this.canon.list.length - 1; i >= 0; i--) { | ||
@@ -971,0 +972,0 @@ if (this.canon.list[i].mark[0] <= base) { |
{ | ||
"name": "canop", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "Convergent algorithm for collaborative text.", | ||
@@ -5,0 +5,0 @@ "main": "canop.js", |
@@ -37,2 +37,3 @@ `canop` | ||
client.on('change', changeListener); | ||
server.on('change', changeListener); | ||
// Changes from this computer. | ||
@@ -110,3 +111,3 @@ client.on('localChange', changeListener); | ||
*Compound operations* meant to be atomic will usually keep their meaning thanks | ||
*Atomic transactions* will usually keep their meaning thanks | ||
to Canop's intention preservation system. However, it is not guaranteed. For | ||
@@ -123,7 +124,7 @@ instance, assuming we store the money of two bank accounts in a list. We encode | ||
Canop can, in theory, be instructed to send operations that are part of an | ||
atomic compound in bulk, ensuring that no operation will be executed in the | ||
middle. We hope to implement that. Assuming the swap was performed as a move, | ||
that would have been enough for this example. Alternatively, you may add a | ||
custom atomic operation. | ||
Use `client.actAtomically()` to send operations that are part of an atomic | ||
transaction in bulk, ensuring that no operation will be executed in the middle, and | ||
that the data will never be read within operations. | ||
Alternatively, you may add a custom atomic operation (once the primitives for | ||
that are implemented). | ||
@@ -140,4 +141,7 @@ # Contributing | ||
- Signal a list of all currently connected clients and of disconnections | ||
- JSON-compatible protocol | ||
- Array index rebasing | ||
- Autosave of operations to disk | ||
- Separate display hooks from transport hooks | ||
- Allow creating user-defined operations |
@@ -51,3 +51,2 @@ (function(exports, undefined) { | ||
connect: function CCHconnect(options) { | ||
console.log('Connecting…'); | ||
var self = this; | ||
@@ -76,3 +75,2 @@ this.socket = new WebSocket(this.url); | ||
socketReceive: function CCHsocketReceive(event) { | ||
console.log('< ' + event.data); | ||
this.canopClient.receive('' + event.data); | ||
@@ -79,0 +77,0 @@ }, |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
195069
144
0
1427