pouchdb-adapter-leveldb-core
Advanced tools
Comparing version 6.4.3 to 7.0.0
import { blob, readAsBinaryString, atob, binaryStringToBlobOrBuffer } from 'pouchdb-binary-utils'; | ||
import { Set, Map } from 'pouchdb-collections'; | ||
import { nextTick, clone, changesHandler, filterChange, functionName, uuid } from 'pouchdb-utils'; | ||
import Promise from 'pouchdb-promise'; | ||
import levelup from 'levelup'; | ||
@@ -34,7 +33,2 @@ import sublevel from 'sublevel-pouchdb'; | ||
// similar to an idb or websql transaction object | ||
// designed to be passed around. basically just caches | ||
// things in-memory and then does a big batch() operation | ||
// when you're done | ||
function getCacheFor(transaction, store) { | ||
@@ -514,3 +508,3 @@ var prefix = store.prefix()[0]; | ||
} | ||
var newDoc = parseDoc(doc, newEdits); | ||
var newDoc = parseDoc(doc, newEdits, api.__opts); | ||
@@ -1088,15 +1082,5 @@ if (newDoc.metadata && !newDoc.metadata.rev_map) { | ||
var returnDocs; | ||
if ('return_docs' in opts) { | ||
returnDocs = opts.return_docs; | ||
} else if ('returnDocs' in opts) { | ||
// TODO: Remove 'returnDocs' in favor of 'return_docs' in a future release | ||
returnDocs = opts.returnDocs; | ||
} else { | ||
returnDocs = true; | ||
} | ||
function complete() { | ||
opts.done = true; | ||
if (returnDocs && opts.limit) { | ||
if (opts.return_docs && opts.limit) { | ||
/* istanbul ignore if */ | ||
@@ -1110,3 +1094,3 @@ if (opts.limit < results.length) { | ||
if (!opts.continuous && !opts.cancelled) { | ||
if (opts.include_docs && opts.attachments) { | ||
if (opts.include_docs && opts.attachments && opts.return_docs) { | ||
fetchAttachments(results, stores, opts).then(function () { | ||
@@ -1170,3 +1154,3 @@ opts.complete(null, {results: results, last_seq: lastSeq}); | ||
if (returnDocs) { | ||
if (opts.return_docs) { | ||
results.push(change); | ||
@@ -1216,3 +1200,3 @@ } | ||
} | ||
if (returnDocs && opts.limit) { | ||
if (opts.return_docs && opts.limit) { | ||
/* istanbul ignore if */ | ||
@@ -1566,3 +1550,6 @@ if (opts.limit < results.length) { | ||
function callDestroy(name, cb) { | ||
leveldown.destroy(name, cb); | ||
// May not exist if leveldown is backed by memory adapter | ||
if ('destroy' in leveldown) { | ||
leveldown.destroy(name, cb); | ||
} | ||
} | ||
@@ -1569,0 +1556,0 @@ } |
@@ -8,3 +8,2 @@ 'use strict'; | ||
var pouchdbUtils = require('pouchdb-utils'); | ||
var Promise = _interopDefault(require('pouchdb-promise')); | ||
var levelup = _interopDefault(require('levelup')); | ||
@@ -39,7 +38,2 @@ var sublevel = _interopDefault(require('sublevel-pouchdb')); | ||
// similar to an idb or websql transaction object | ||
// designed to be passed around. basically just caches | ||
// things in-memory and then does a big batch() operation | ||
// when you're done | ||
function getCacheFor(transaction, store) { | ||
@@ -519,3 +513,3 @@ var prefix = store.prefix()[0]; | ||
} | ||
var newDoc = pouchdbAdapterUtils.parseDoc(doc, newEdits); | ||
var newDoc = pouchdbAdapterUtils.parseDoc(doc, newEdits, api.__opts); | ||
@@ -1093,15 +1087,5 @@ if (newDoc.metadata && !newDoc.metadata.rev_map) { | ||
var returnDocs; | ||
if ('return_docs' in opts) { | ||
returnDocs = opts.return_docs; | ||
} else if ('returnDocs' in opts) { | ||
// TODO: Remove 'returnDocs' in favor of 'return_docs' in a future release | ||
returnDocs = opts.returnDocs; | ||
} else { | ||
returnDocs = true; | ||
} | ||
function complete() { | ||
opts.done = true; | ||
if (returnDocs && opts.limit) { | ||
if (opts.return_docs && opts.limit) { | ||
/* istanbul ignore if */ | ||
@@ -1115,3 +1099,3 @@ if (opts.limit < results.length) { | ||
if (!opts.continuous && !opts.cancelled) { | ||
if (opts.include_docs && opts.attachments) { | ||
if (opts.include_docs && opts.attachments && opts.return_docs) { | ||
fetchAttachments(results, stores, opts).then(function () { | ||
@@ -1175,3 +1159,3 @@ opts.complete(null, {results: results, last_seq: lastSeq}); | ||
if (returnDocs) { | ||
if (opts.return_docs) { | ||
results.push(change); | ||
@@ -1221,3 +1205,3 @@ } | ||
} | ||
if (returnDocs && opts.limit) { | ||
if (opts.return_docs && opts.limit) { | ||
/* istanbul ignore if */ | ||
@@ -1571,3 +1555,6 @@ if (opts.limit < results.length) { | ||
function callDestroy(name, cb) { | ||
leveldown.destroy(name, cb); | ||
// May not exist if leveldown is backed by memory adapter | ||
if ('destroy' in leveldown) { | ||
leveldown.destroy(name, cb); | ||
} | ||
} | ||
@@ -1574,0 +1561,0 @@ } |
import { typedBuffer, atob, binaryStringToBlobOrBuffer } from 'pouchdb-binary-utils'; | ||
import { Set, Map } from 'pouchdb-collections'; | ||
import { nextTick, clone, changesHandler, filterChange, functionName, uuid } from 'pouchdb-utils'; | ||
import Promise from 'pouchdb-promise'; | ||
import levelup from 'levelup'; | ||
@@ -32,7 +31,2 @@ import sublevel from 'sublevel-pouchdb'; | ||
// similar to an idb or websql transaction object | ||
// designed to be passed around. basically just caches | ||
// things in-memory and then does a big batch() operation | ||
// when you're done | ||
function getCacheFor(transaction, store) { | ||
@@ -512,3 +506,3 @@ var prefix = store.prefix()[0]; | ||
} | ||
var newDoc = parseDoc(doc, newEdits); | ||
var newDoc = parseDoc(doc, newEdits, api.__opts); | ||
@@ -1086,15 +1080,5 @@ if (newDoc.metadata && !newDoc.metadata.rev_map) { | ||
var returnDocs; | ||
if ('return_docs' in opts) { | ||
returnDocs = opts.return_docs; | ||
} else if ('returnDocs' in opts) { | ||
// TODO: Remove 'returnDocs' in favor of 'return_docs' in a future release | ||
returnDocs = opts.returnDocs; | ||
} else { | ||
returnDocs = true; | ||
} | ||
function complete() { | ||
opts.done = true; | ||
if (returnDocs && opts.limit) { | ||
if (opts.return_docs && opts.limit) { | ||
/* istanbul ignore if */ | ||
@@ -1108,3 +1092,3 @@ if (opts.limit < results.length) { | ||
if (!opts.continuous && !opts.cancelled) { | ||
if (opts.include_docs && opts.attachments) { | ||
if (opts.include_docs && opts.attachments && opts.return_docs) { | ||
fetchAttachments(results, stores, opts).then(function () { | ||
@@ -1168,3 +1152,3 @@ opts.complete(null, {results: results, last_seq: lastSeq}); | ||
if (returnDocs) { | ||
if (opts.return_docs) { | ||
results.push(change); | ||
@@ -1214,3 +1198,3 @@ } | ||
} | ||
if (returnDocs && opts.limit) { | ||
if (opts.return_docs && opts.limit) { | ||
/* istanbul ignore if */ | ||
@@ -1564,3 +1548,6 @@ if (opts.limit < results.length) { | ||
function callDestroy(name, cb) { | ||
leveldown.destroy(name, cb); | ||
// May not exist if leveldown is backed by memory adapter | ||
if ('destroy' in leveldown) { | ||
leveldown.destroy(name, cb); | ||
} | ||
} | ||
@@ -1567,0 +1554,0 @@ } |
@@ -8,3 +8,2 @@ 'use strict'; | ||
var pouchdbUtils = require('pouchdb-utils'); | ||
var Promise = _interopDefault(require('pouchdb-promise')); | ||
var levelup = _interopDefault(require('levelup')); | ||
@@ -37,7 +36,2 @@ var sublevel = _interopDefault(require('sublevel-pouchdb')); | ||
// similar to an idb or websql transaction object | ||
// designed to be passed around. basically just caches | ||
// things in-memory and then does a big batch() operation | ||
// when you're done | ||
function getCacheFor(transaction, store) { | ||
@@ -517,3 +511,3 @@ var prefix = store.prefix()[0]; | ||
} | ||
var newDoc = pouchdbAdapterUtils.parseDoc(doc, newEdits); | ||
var newDoc = pouchdbAdapterUtils.parseDoc(doc, newEdits, api.__opts); | ||
@@ -1091,15 +1085,5 @@ if (newDoc.metadata && !newDoc.metadata.rev_map) { | ||
var returnDocs; | ||
if ('return_docs' in opts) { | ||
returnDocs = opts.return_docs; | ||
} else if ('returnDocs' in opts) { | ||
// TODO: Remove 'returnDocs' in favor of 'return_docs' in a future release | ||
returnDocs = opts.returnDocs; | ||
} else { | ||
returnDocs = true; | ||
} | ||
function complete() { | ||
opts.done = true; | ||
if (returnDocs && opts.limit) { | ||
if (opts.return_docs && opts.limit) { | ||
/* istanbul ignore if */ | ||
@@ -1113,3 +1097,3 @@ if (opts.limit < results.length) { | ||
if (!opts.continuous && !opts.cancelled) { | ||
if (opts.include_docs && opts.attachments) { | ||
if (opts.include_docs && opts.attachments && opts.return_docs) { | ||
fetchAttachments(results, stores, opts).then(function () { | ||
@@ -1173,3 +1157,3 @@ opts.complete(null, {results: results, last_seq: lastSeq}); | ||
if (returnDocs) { | ||
if (opts.return_docs) { | ||
results.push(change); | ||
@@ -1219,3 +1203,3 @@ } | ||
} | ||
if (returnDocs && opts.limit) { | ||
if (opts.return_docs && opts.limit) { | ||
/* istanbul ignore if */ | ||
@@ -1569,3 +1553,6 @@ if (opts.limit < results.length) { | ||
function callDestroy(name, cb) { | ||
leveldown.destroy(name, cb); | ||
// May not exist if leveldown is backed by memory adapter | ||
if ('destroy' in leveldown) { | ||
leveldown.destroy(name, cb); | ||
} | ||
} | ||
@@ -1572,0 +1559,0 @@ } |
{ | ||
"name": "pouchdb-adapter-leveldb-core", | ||
"version": "6.4.3", | ||
"version": "7.0.0", | ||
"description": "Core PouchDB adapter code for LevelDOWN-based adapters", | ||
@@ -17,15 +17,14 @@ "main": "./lib/index.js", | ||
"argsarray": "0.0.1", | ||
"buffer-from": "0.1.1", | ||
"buffer-from": "1.1.0", | ||
"double-ended-queue": "2.1.0-0", | ||
"levelup": "2.0.1", | ||
"pouchdb-adapter-utils": "6.4.3", | ||
"pouchdb-binary-utils": "6.4.3", | ||
"pouchdb-collections": "6.4.3", | ||
"pouchdb-errors": "6.4.3", | ||
"pouchdb-json": "6.4.3", | ||
"pouchdb-md5": "6.4.3", | ||
"pouchdb-merge": "6.4.3", | ||
"pouchdb-promise": "6.4.3", | ||
"pouchdb-utils": "6.4.3", | ||
"sublevel-pouchdb": "6.4.3", | ||
"levelup": "3.0.1", | ||
"pouchdb-adapter-utils": "7.0.0", | ||
"pouchdb-binary-utils": "7.0.0", | ||
"pouchdb-collections": "7.0.0", | ||
"pouchdb-errors": "7.0.0", | ||
"pouchdb-json": "7.0.0", | ||
"pouchdb-md5": "7.0.0", | ||
"pouchdb-merge": "7.0.0", | ||
"pouchdb-utils": "7.0.0", | ||
"sublevel-pouchdb": "7.0.0", | ||
"through2": "2.0.3" | ||
@@ -32,0 +31,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
14
190475
5592
+ Addedabstract-leveldown@5.0.0(transitive)
+ Addedbuffer-from@1.1.0(transitive)
+ Addeddeferred-leveldown@4.0.2(transitive)
+ Addedlevel-errors@2.0.1(transitive)
+ Addedlevelup@3.0.1(transitive)
+ Addedltgt@2.2.1(transitive)
+ Addedpouchdb-adapter-utils@7.0.0(transitive)
+ Addedpouchdb-binary-utils@7.0.0(transitive)
+ Addedpouchdb-collections@7.0.0(transitive)
+ Addedpouchdb-errors@7.0.0(transitive)
+ Addedpouchdb-json@7.0.0(transitive)
+ Addedpouchdb-md5@7.0.0(transitive)
+ Addedpouchdb-merge@7.0.0(transitive)
+ Addedpouchdb-utils@7.0.0(transitive)
+ Addedsublevel-pouchdb@7.0.0(transitive)
- Removedpouchdb-promise@6.4.3
- Removedabstract-leveldown@3.0.0(transitive)
- Removedattempt-x@1.1.3(transitive)
- Removedbuffer-from@0.1.1(transitive)
- Removedcached-constructors-x@1.0.2(transitive)
- Removeddeferred-leveldown@2.0.3(transitive)
- Removedhas-own-property-x@3.2.0(transitive)
- Removedhas-symbol-support-x@1.4.2(transitive)
- Removedhas-symbols@1.0.3(transitive)
- Removedhas-to-string-tag-x@1.4.1(transitive)
- Removedhas-tostringtag@1.0.2(transitive)
- Removedinfinity-x@1.0.2(transitive)
- Removedis-array-buffer-x@1.7.0(transitive)
- Removedis-date-object@1.0.5(transitive)
- Removedis-falsey-x@1.0.3(transitive)
- Removedis-finite-x@3.0.4(transitive)
- Removedis-function-x@3.3.0(transitive)
- Removedis-index-x@1.1.0(transitive)
- Removedis-nan-x@1.0.3(transitive)
- Removedis-nil-x@1.4.2(transitive)
- Removedis-object-like-x@1.7.1(transitive)
- Removedis-primitive@2.0.03.0.1(transitive)
- Removedis-string@1.0.7(transitive)
- Removedis-symbol@1.0.4(transitive)
- Removedlevel-errors@1.1.2(transitive)
- Removedlevelup@2.0.1(transitive)
- Removedlie@3.1.1(transitive)
- Removedlodash.isnull@3.0.0(transitive)
- Removedltgt@2.2.0(transitive)
- Removedmath-clamp-x@1.2.0(transitive)
- Removedmath-sign-x@3.0.0(transitive)
- Removedmax-safe-integer@1.0.1(transitive)
- Removednan-x@1.0.2(transitive)
- Removednormalize-space-x@3.0.0(transitive)
- Removedobject-get-own-property-descriptor-x@3.2.0(transitive)
- Removedparse-int-x@2.0.0(transitive)
- Removedpouchdb-adapter-utils@6.4.3(transitive)
- Removedpouchdb-binary-utils@6.4.3(transitive)
- Removedpouchdb-collections@6.4.3(transitive)
- Removedpouchdb-errors@6.4.3(transitive)
- Removedpouchdb-json@6.4.3(transitive)
- Removedpouchdb-md5@6.4.3(transitive)
- Removedpouchdb-merge@6.4.3(transitive)
- Removedpouchdb-promise@6.4.3(transitive)
- Removedpouchdb-utils@6.4.3(transitive)
- Removedproperty-is-enumerable-x@1.1.0(transitive)
- Removedreplace-comments-x@2.0.0(transitive)
- Removedrequire-coercible-to-string-x@1.0.2(transitive)
- Removedrequire-object-coercible-x@1.4.3(transitive)
- Removedsublevel-pouchdb@6.4.3(transitive)
- Removedto-boolean-x@1.0.3(transitive)
- Removedto-integer-x@3.0.0(transitive)
- Removedto-number-x@2.0.0(transitive)
- Removedto-object-x@1.5.0(transitive)
- Removedto-primitive-x@1.1.0(transitive)
- Removedto-property-key-x@2.0.2(transitive)
- Removedto-string-symbols-supported-x@1.0.2(transitive)
- Removedto-string-tag-x@1.4.3(transitive)
- Removedto-string-x@1.4.5(transitive)
- Removedtrim-left-x@3.0.0(transitive)
- Removedtrim-right-x@3.0.0(transitive)
- Removedtrim-x@3.0.0(transitive)
- Removedvalidate.io-undefined@1.0.3(transitive)
- Removedwhite-space-x@3.0.1(transitive)
Updatedbuffer-from@1.1.0
Updatedlevelup@3.0.1
Updatedpouchdb-adapter-utils@7.0.0
Updatedpouchdb-binary-utils@7.0.0
Updatedpouchdb-collections@7.0.0
Updatedpouchdb-errors@7.0.0
Updatedpouchdb-json@7.0.0
Updatedpouchdb-md5@7.0.0
Updatedpouchdb-merge@7.0.0
Updatedpouchdb-utils@7.0.0
Updatedsublevel-pouchdb@7.0.0