Comparing version 3.1.2 to 3.1.3
@@ -7,3 +7,2 @@ | ||
var kv = require('kv') | ||
var es = require('event-stream') | ||
@@ -31,8 +30,5 @@ var app = connect() | ||
else | ||
s.pipe(docs[s.meta.type].createStream({wrapper: 'raw'})) | ||
.pipe(s) | ||
})) | ||
.pipe(es.log('>>')) | ||
.pipe(sock) | ||
s.pipe(docs[s.meta.type].createStream({wrapper: 'raw'})).pipe(s) | ||
})).pipe(sock) | ||
}).install(app.listen(3000), '/shoe') | ||
@@ -5,3 +5,3 @@ { | ||
"description": "Commutative Replicated Data Types for easy distributed/collaborative apps", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"homepage": "http://github.com/dominictarr/crdt", | ||
@@ -19,3 +19,3 @@ "repository": { | ||
"between": "0.0.0", | ||
"scuttlebutt": "~2.2.0" | ||
"scuttlebutt": "~4.0.0" | ||
}, | ||
@@ -22,0 +22,0 @@ "devDependencies": { |
@@ -13,5 +13,2 @@ 'use strict'; | ||
var ds = crdt.createStream(doc) | ||
var hs = crdt.createStream(hoc) | ||
var piped = false | ||
@@ -23,2 +20,4 @@ var consistent = false | ||
console.log('pipe') | ||
var ds = crdt.createStream(doc) | ||
var hs = crdt.createStream(hoc) | ||
ds.pipe(hs).pipe(ds) | ||
@@ -25,0 +24,0 @@ }, Math.random()*10) |
@@ -10,6 +10,2 @@ var crdt = require('..') | ||
/*function test (name, test) { | ||
exports[name] = test | ||
}*/ | ||
var next = process.nextTick | ||
@@ -26,4 +22,5 @@ | ||
randomUpdates(a) | ||
console.log('simple') | ||
a.createReadStream({wrapper: 'raw'}) | ||
console.log('simple') | ||
a.createReadStream({wrapper: 'raw', tail: false}) | ||
.pipe(es.writeArray(function (err, array) { | ||
@@ -60,3 +57,2 @@ console.log('array', array) | ||
test('JSON', function (t) { | ||
@@ -67,4 +63,4 @@ | ||
randomUpdates(a) | ||
console.log('simple') | ||
a.createReadStream({wrapper: 'json'}) | ||
a.createReadStream({wrapper: 'json', tail: false}) | ||
.pipe(es.writeArray(function (err, array) { | ||
@@ -71,0 +67,0 @@ console.log('array', array) |
@@ -71,4 +71,6 @@ 'use strict'; | ||
}) | ||
hoc.createStream({wrapper: 'json'}).pipe(doc.createStream({wrapper: 'json'})) | ||
var hs | ||
(hs = hoc.createStream({wrapper: 'json'})) | ||
.pipe(doc.createStream({wrapper: 'json'})) | ||
.pipe(hs) | ||
hoc.add({id: 'thing', random: random }) | ||
@@ -90,4 +92,6 @@ } | ||
//this should replicate only one document. | ||
hoc.createStream({id: 'thing', wrapper: 'raw'}) | ||
var hs | ||
(hs = hoc.createStream({id: 'thing', wrapper: 'raw'})) | ||
.pipe(doc.createStream({id: 'thing', wrapper: 'raw'})) | ||
.pipe(hs) | ||
@@ -94,0 +98,0 @@ var thing = hoc.get('thing') |
@@ -28,3 +28,3 @@ var crdt = require('..') | ||
bs.pipe(as) | ||
bs.pipe(as).pipe(bs) | ||
@@ -31,0 +31,0 @@ randomUpdates(b) |
@@ -17,5 +17,3 @@ var es = require('event-stream') | ||
var a = new crdt.Doc() | ||
var as = a.createStream() | ||
var b = new crdt.Doc() | ||
var bs = b.createStream() | ||
@@ -57,2 +55,3 @@ a.sync = b.sync = true | ||
var server = net.createServer(function (sock) { | ||
var as = a.createStream() | ||
toJSON(as, 'A>').pipe(sock).pipe(fromJSON(as, 'A<')) | ||
@@ -83,2 +82,3 @@ | ||
var client | ||
var bs = b.createStream() | ||
toJSON(bs, 'B>').pipe(client = net.connect(6464)).pipe(fromJSON(bs, 'B<')) | ||
@@ -88,2 +88,3 @@ | ||
try { | ||
console.log('updated', a.toJSON(), b.toJSON()) | ||
assert.deepEqual(a.toJSON(), b.toJSON()) | ||
@@ -90,0 +91,0 @@ return allChanges <= 0 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1052404
11993
+ Addedmonotonic-timestamp@0.0.2(transitive)
+ Addedreadable-stream@0.0.4(transitive)
+ Addedscuttlebutt@4.0.3(transitive)
+ Addedstream-serializer@0.0.3(transitive)
- Removedduplexer@0.1.2(transitive)
- Removedevent-stream@3.0.20(transitive)
- Removedfrom@0.1.7(transitive)
- Removedmap-stream@0.0.7(transitive)
- Removedpause-stream@0.0.11(transitive)
- Removedscuttlebutt@2.2.0(transitive)
- Removedsplit@0.2.10(transitive)
- Removedstream-combiner@0.0.4(transitive)
- Removedstream-serializer@0.0.0(transitive)
- Removedthrough@2.3.8(transitive)
Updatedscuttlebutt@~4.0.0