pouchdb-replication
Advanced tools
Comparing version 6.0.6 to 6.0.7
@@ -12,3 +12,2 @@ 'use strict'; | ||
var pouchdbErrors = require('pouchdb-errors'); | ||
var jsExtend = require('js-extend'); | ||
@@ -139,2 +138,6 @@ function isGenOne(rev) { | ||
function hasConflicts(doc) { | ||
return doc._conflicts && doc._conflicts.length > 0; | ||
} | ||
function fetchRevisionOneDocs(ids) { | ||
@@ -145,3 +148,4 @@ // Optimization: fetch gen-1 docs and attachments in | ||
keys: ids, | ||
include_docs: true | ||
include_docs: true, | ||
conflicts: true | ||
}).then(function (res) { | ||
@@ -153,3 +157,3 @@ if (state.cancelled) { | ||
if (row.deleted || !row.doc || !isGenOne(row.value.rev) || | ||
hasAttachments(row.doc)) { | ||
hasAttachments(row.doc) || hasConflicts(row.doc)) { | ||
// if any of these conditions apply, we need to fetch using get() | ||
@@ -774,4 +778,4 @@ return; | ||
var optsPush = opts.push ? jsExtend.extend({}, opts, opts.push) : opts; | ||
var optsPull = opts.pull ? jsExtend.extend({}, opts, opts.pull) : opts; | ||
var optsPush = opts.push ? pouchdbUtils.jsExtend({}, opts, opts.push) : opts; | ||
var optsPull = opts.pull ? pouchdbUtils.jsExtend({}, opts, opts.pull) : opts; | ||
@@ -778,0 +782,0 @@ this.push = replicate(src, target, optsPush); |
{ | ||
"name": "pouchdb-replication", | ||
"version": "6.0.6", | ||
"version": "6.0.7", | ||
"description": "PouchDB's replication and sync algorithm, as a plugin.", | ||
@@ -17,9 +17,8 @@ "main": "./lib/index.js", | ||
"inherits": "2.0.3", | ||
"js-extend": "1.0.1", | ||
"pouchdb-checkpointer": "6.0.6", | ||
"pouchdb-errors": "6.0.6", | ||
"pouchdb-generate-replication-id": "6.0.6", | ||
"pouchdb-promise": "6.0.6", | ||
"pouchdb-utils": "6.0.6" | ||
"pouchdb-checkpointer": "6.0.7", | ||
"pouchdb-errors": "6.0.7", | ||
"pouchdb-generate-replication-id": "6.0.7", | ||
"pouchdb-promise": "6.0.7", | ||
"pouchdb-utils": "6.0.7" | ||
} | ||
} |
@@ -128,2 +128,6 @@ import { clone, flatten } from 'pouchdb-utils'; | ||
function hasConflicts(doc) { | ||
return doc._conflicts && doc._conflicts.length > 0; | ||
} | ||
function fetchRevisionOneDocs(ids) { | ||
@@ -134,3 +138,4 @@ // Optimization: fetch gen-1 docs and attachments in | ||
keys: ids, | ||
include_docs: true | ||
include_docs: true, | ||
conflicts: true | ||
}).then(function (res) { | ||
@@ -142,3 +147,3 @@ if (state.cancelled) { | ||
if (row.deleted || !row.doc || !isGenOne(row.value.rev) || | ||
hasAttachments(row.doc)) { | ||
hasAttachments(row.doc) || hasConflicts(row.doc)) { | ||
// if any of these conditions apply, we need to fetch using get() | ||
@@ -145,0 +150,0 @@ return; |
@@ -1,2 +0,2 @@ | ||
import { extend } from 'js-extend'; | ||
import { jsExtend as extend } from 'pouchdb-utils'; | ||
import Promise from 'pouchdb-promise'; | ||
@@ -3,0 +3,0 @@ import { |
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
67420
6
1769
+ Addedpouchdb-binary-utils@6.0.7(transitive)
+ Addedpouchdb-checkpointer@6.0.7(transitive)
+ Addedpouchdb-collate@6.0.7(transitive)
+ Addedpouchdb-errors@6.0.7(transitive)
+ Addedpouchdb-generate-replication-id@6.0.7(transitive)
+ Addedpouchdb-md5@6.0.7(transitive)
+ Addedpouchdb-promise@6.0.7(transitive)
+ Addedpouchdb-utils@6.0.7(transitive)
- Removedjs-extend@1.0.1
- Removedjs-extend@1.0.1(transitive)
- Removedpouchdb-binary-utils@6.0.6(transitive)
- Removedpouchdb-checkpointer@6.0.6(transitive)
- Removedpouchdb-collate@6.0.6(transitive)
- Removedpouchdb-errors@6.0.6(transitive)
- Removedpouchdb-generate-replication-id@6.0.6(transitive)
- Removedpouchdb-md5@6.0.6(transitive)
- Removedpouchdb-promise@6.0.6(transitive)
- Removedpouchdb-utils@6.0.6(transitive)
Updatedpouchdb-checkpointer@6.0.7
Updatedpouchdb-errors@6.0.7
Updatedpouchdb-promise@6.0.7
Updatedpouchdb-utils@6.0.7