Closed oliviertassinari closed 9 years ago
Yes, there are no incompatibilities between 4.0.0 and 5.0.0. If you found an issue, can you describe in more detail what happened?
with PouchDB V5.0.0
and with the basic test :
var pouch = require('pouchdb');
var pouchRepStream = require('pouchdb-replication-stream');
pouch.plugin(pouchRepStream.plugin);
var fs = require('fs');
var url = "https://login:pwd@api.myapp.com/couchDB/DBName";
var db = new pouch(url);
var ws = fs.createWriteStream('output.txt');
return db.dump(ws)
.then(function(res){
console.log("success",res);
}).catch(function(e){
console.log("error",e);
});
I have in theoutput.txt only 1 line :
{"version":"1.2.4","db_type":"http","start_time":"2015-10-08T15:41:05.737Z","db_info":{"db_name":"DBName","doc_count":6,"doc_del_count":1,"update_seq":785,"purge_seq":0,"compact_running":false,"disk_size":8630386,"data_size":39177,"instance_start_time":"1442668989564061","disk_format_version":6,"committed_update_seq":785,"host":"https://api.myapp.com:/couchdb/DBName","auto_compaction":false,"adapter":"http"}}
I confirmed this works fine with PouchDB 4.0.3, but 5.0.0 crashes after writing the first line without ever resolving or rejecting the Promise.
+1 also not finishing here running PouchDB 5.0.0
fixed by fc17211b55037276626d57a8096782ecca4b125d
Thank you very much for fixing this, I had a poke around the code looking for something obvious but your commit shows there was quite a bit more to it. Really appreciated!
No prob! The important part turned out to be not passing in the stream object as a constructor param: https://github.com/nolanlawson/pouchdb-replication-stream/blob/c3b2aef90773c3254f6587f246eaf3390d2f46ec/lib/index.js#L37-L40
Awesome, I will try to use pouchdb@5.0.0 :+1:.
Do we support PouchDB v5.0.0? My first test migrating from v4.0.0 wasn't successful.