Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pouchdb-adapter-leveldb-core

Package Overview
Dependencies
Maintainers
0
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pouchdb-adapter-leveldb-core - npm Package Compare versions

Comparing version 8.0.1 to 9.0.0

24

lib/index-browser.es.js

@@ -5,3 +5,2 @@ import levelup from 'levelup';

import Deque from 'double-ended-queue';
import bufferFrom from 'buffer-from';
import PouchDB from 'pouchdb-core';

@@ -13,3 +12,2 @@ import { allDocsKeysQuery, isDeleted, isLocalId, parseDoc, processDocs } from 'pouchdb-adapter-utils';

import { blob, readAsBinaryString, atob, binaryStringToBlobOrBuffer } from 'pouchdb-binary-utils';
import { Map, Set } from 'pouchdb-collections';
import { nextTick, clone, changesHandler, filterChange, functionName, uuid } from 'pouchdb-utils';

@@ -23,3 +21,3 @@ import { MISSING_DOC, REV_CONFLICT, NOT_OPEN, BAD_ARG, MISSING_STUB, createError } from 'pouchdb-errors';

var byteArray = new Uint8Array(storedObject);
return blob([byteArray], {type: type});
return blob([byteArray], {type});
}

@@ -33,5 +31,7 @@

function createEmptyBlobOrBuffer(type) {
return blob([''], {type: type});
return blob([''], {type});
}
// similar to an idb or websql transaction object
function getCacheFor(transaction, store) {

@@ -391,4 +391,4 @@ var prefix = store.prefix()[0];

db._queue.push({
fun: fun,
args: args,
fun,
args,
type: 'write'

@@ -407,4 +407,4 @@ });

db._queue.push({
fun: fun,
args: args,
fun,
args,
type: 'read'

@@ -469,3 +469,3 @@ });

}
return callback(null, {doc: doc, metadata: metadata});
return callback(null, {doc, metadata});
});

@@ -847,3 +847,3 @@ });

key: digest,
value: bufferFrom(data, 'binary')
value: Buffer.from(data, 'binary')
}]);

@@ -1102,6 +1102,6 @@ callback();

fetchAttachments(results, stores, opts).then(function () {
opts.complete(null, {results: results, last_seq: lastSeq});
opts.complete(null, {results, last_seq: lastSeq});
});
} else {
opts.complete(null, {results: results, last_seq: lastSeq});
opts.complete(null, {results, last_seq: lastSeq});
}

@@ -1108,0 +1108,0 @@ }

@@ -9,3 +9,2 @@ 'use strict';

var Deque = _interopDefault(require('double-ended-queue'));
var bufferFrom = _interopDefault(require('buffer-from'));
var PouchDB = _interopDefault(require('pouchdb-core'));

@@ -17,3 +16,2 @@ var pouchdbAdapterUtils = require('pouchdb-adapter-utils');

var pouchdbBinaryUtils = require('pouchdb-binary-utils');
var pouchdbCollections = require('pouchdb-collections');
var pouchdbUtils = require('pouchdb-utils');

@@ -27,3 +25,3 @@ var pouchdbErrors = require('pouchdb-errors');

var byteArray = new Uint8Array(storedObject);
return pouchdbBinaryUtils.blob([byteArray], {type: type});
return pouchdbBinaryUtils.blob([byteArray], {type});
}

@@ -37,5 +35,7 @@

function createEmptyBlobOrBuffer(type) {
return pouchdbBinaryUtils.blob([''], {type: type});
return pouchdbBinaryUtils.blob([''], {type});
}
// similar to an idb or websql transaction object
function getCacheFor(transaction, store) {

@@ -46,3 +46,3 @@ var prefix = store.prefix()[0];

if (!subCache) {
subCache = new pouchdbCollections.Map();
subCache = new Map();
cache.set(prefix, subCache);

@@ -56,3 +56,3 @@ }

this._batch = [];
this._cache = new pouchdbCollections.Map();
this._cache = new Map();
}

@@ -102,3 +102,3 @@

execute(db, callback) {
var keys = new pouchdbCollections.Set();
var keys = new Set();
var uniqBatches = [];

@@ -130,3 +130,3 @@

// so we cache opened connections here for initstore()
var dbStores = new pouchdbCollections.Map();
var dbStores = new Map();

@@ -235,3 +235,3 @@ // store the value of update_seq in the by-sequence store the key name will

} else {
dbStore = new pouchdbCollections.Map();
dbStore = new Map();
dbStores.set(leveldownName, dbStore);

@@ -400,4 +400,4 @@ }

db._queue.push({
fun: fun,
args: args,
fun,
args,
type: 'write'

@@ -416,4 +416,4 @@ });

db._queue.push({
fun: fun,
args: args,
fun,
args,
type: 'read'

@@ -478,3 +478,3 @@ });

}
return callback(null, {doc: doc, metadata: metadata});
return callback(null, {doc, metadata});
});

@@ -511,4 +511,4 @@ });

var results = new Array(req.docs.length);
var fetchedDocs = new pouchdbCollections.Map();
var stemmedRevs = new pouchdbCollections.Map();
var fetchedDocs = new Map();
var stemmedRevs = new Map();

@@ -639,3 +639,3 @@ var txn = new LevelTransaction();

function autoCompact(callback) {
var revsMap = new pouchdbCollections.Map();
var revsMap = new Map();
fetchedDocs.forEach(function (metadata, docId) {

@@ -858,3 +858,3 @@ revsMap.set(docId, pouchdbMerge.compactTree(metadata));

key: digest,
value: bufferFrom(data, 'binary')
value: Buffer.from(data, 'binary')
}]);

@@ -1096,5 +1096,5 @@ callback();

var docIds = opts.doc_ids && new pouchdbCollections.Set(opts.doc_ids);
var docIds = opts.doc_ids && new Set(opts.doc_ids);
var filter = pouchdbUtils.filterChange(opts);
var docIdsToMetadata = new pouchdbCollections.Map();
var docIdsToMetadata = new Map();

@@ -1114,6 +1114,6 @@ function complete() {

fetchAttachments(results, stores, opts).then(function () {
opts.complete(null, {results: results, last_seq: lastSeq});
opts.complete(null, {results, last_seq: lastSeq});
});
} else {
opts.complete(null, {results: results, last_seq: lastSeq});
opts.complete(null, {results, last_seq: lastSeq});
}

@@ -1364,3 +1364,3 @@ }

}
var refsToDelete = new pouchdbCollections.Map();
var refsToDelete = new Map();
revs.forEach(function (rev) {

@@ -1367,0 +1367,0 @@ refsToDelete.set(docId + '@' + rev, true);

@@ -5,3 +5,2 @@ import levelup from 'levelup';

import Deque from 'double-ended-queue';
import bufferFrom from 'buffer-from';
import PouchDB from 'pouchdb-core';

@@ -13,3 +12,2 @@ import { allDocsKeysQuery, isDeleted, isLocalId, parseDoc, processDocs } from 'pouchdb-adapter-utils';

import { typedBuffer, atob, binaryStringToBlobOrBuffer } from 'pouchdb-binary-utils';
import { Map, Set } from 'pouchdb-collections';
import { nextTick, clone, changesHandler, filterChange, functionName, uuid } from 'pouchdb-utils';

@@ -33,2 +31,4 @@ import { MISSING_DOC, REV_CONFLICT, NOT_OPEN, BAD_ARG, MISSING_STUB, createError } from 'pouchdb-errors';

// similar to an idb or websql transaction object
function getCacheFor(transaction, store) {

@@ -388,4 +388,4 @@ var prefix = store.prefix()[0];

db._queue.push({
fun: fun,
args: args,
fun,
args,
type: 'write'

@@ -404,4 +404,4 @@ });

db._queue.push({
fun: fun,
args: args,
fun,
args,
type: 'read'

@@ -466,3 +466,3 @@ });

}
return callback(null, {doc: doc, metadata: metadata});
return callback(null, {doc, metadata});
});

@@ -844,3 +844,3 @@ });

key: digest,
value: bufferFrom(data, 'binary')
value: Buffer.from(data, 'binary')
}]);

@@ -1099,6 +1099,6 @@ callback();

fetchAttachments(results, stores, opts).then(function () {
opts.complete(null, {results: results, last_seq: lastSeq});
opts.complete(null, {results, last_seq: lastSeq});
});
} else {
opts.complete(null, {results: results, last_seq: lastSeq});
opts.complete(null, {results, last_seq: lastSeq});
}

@@ -1105,0 +1105,0 @@ }

@@ -9,3 +9,2 @@ 'use strict';

var Deque = _interopDefault(require('double-ended-queue'));
var bufferFrom = _interopDefault(require('buffer-from'));
var PouchDB = _interopDefault(require('pouchdb-core'));

@@ -17,3 +16,2 @@ var pouchdbAdapterUtils = require('pouchdb-adapter-utils');

var pouchdbBinaryUtils = require('pouchdb-binary-utils');
var pouchdbCollections = require('pouchdb-collections');
var pouchdbUtils = require('pouchdb-utils');

@@ -37,2 +35,4 @@ var pouchdbErrors = require('pouchdb-errors');

// similar to an idb or websql transaction object
function getCacheFor(transaction, store) {

@@ -43,3 +43,3 @@ var prefix = store.prefix()[0];

if (!subCache) {
subCache = new pouchdbCollections.Map();
subCache = new Map();
cache.set(prefix, subCache);

@@ -53,3 +53,3 @@ }

this._batch = [];
this._cache = new pouchdbCollections.Map();
this._cache = new Map();
}

@@ -99,3 +99,3 @@

execute(db, callback) {
var keys = new pouchdbCollections.Set();
var keys = new Set();
var uniqBatches = [];

@@ -127,3 +127,3 @@

// so we cache opened connections here for initstore()
var dbStores = new pouchdbCollections.Map();
var dbStores = new Map();

@@ -232,3 +232,3 @@ // store the value of update_seq in the by-sequence store the key name will

} else {
dbStore = new pouchdbCollections.Map();
dbStore = new Map();
dbStores.set(leveldownName, dbStore);

@@ -397,4 +397,4 @@ }

db._queue.push({
fun: fun,
args: args,
fun,
args,
type: 'write'

@@ -413,4 +413,4 @@ });

db._queue.push({
fun: fun,
args: args,
fun,
args,
type: 'read'

@@ -475,3 +475,3 @@ });

}
return callback(null, {doc: doc, metadata: metadata});
return callback(null, {doc, metadata});
});

@@ -508,4 +508,4 @@ });

var results = new Array(req.docs.length);
var fetchedDocs = new pouchdbCollections.Map();
var stemmedRevs = new pouchdbCollections.Map();
var fetchedDocs = new Map();
var stemmedRevs = new Map();

@@ -636,3 +636,3 @@ var txn = new LevelTransaction();

function autoCompact(callback) {
var revsMap = new pouchdbCollections.Map();
var revsMap = new Map();
fetchedDocs.forEach(function (metadata, docId) {

@@ -855,3 +855,3 @@ revsMap.set(docId, pouchdbMerge.compactTree(metadata));

key: digest,
value: bufferFrom(data, 'binary')
value: Buffer.from(data, 'binary')
}]);

@@ -1093,5 +1093,5 @@ callback();

var docIds = opts.doc_ids && new pouchdbCollections.Set(opts.doc_ids);
var docIds = opts.doc_ids && new Set(opts.doc_ids);
var filter = pouchdbUtils.filterChange(opts);
var docIdsToMetadata = new pouchdbCollections.Map();
var docIdsToMetadata = new Map();

@@ -1111,6 +1111,6 @@ function complete() {

fetchAttachments(results, stores, opts).then(function () {
opts.complete(null, {results: results, last_seq: lastSeq});
opts.complete(null, {results, last_seq: lastSeq});
});
} else {
opts.complete(null, {results: results, last_seq: lastSeq});
opts.complete(null, {results, last_seq: lastSeq});
}

@@ -1361,3 +1361,3 @@ }

}
var refsToDelete = new pouchdbCollections.Map();
var refsToDelete = new Map();
revs.forEach(function (rev) {

@@ -1364,0 +1364,0 @@ refsToDelete.set(docId + '@' + rev, true);

{
"name": "pouchdb-adapter-leveldb-core",
"version": "8.0.1",
"version": "9.0.0",
"description": "Core PouchDB adapter code for LevelDOWN-based adapters",

@@ -14,3 +14,3 @@ "main": "./lib/index.js",

},
"jsnext:main": "./lib/index.es.js",
"module": "./lib/index.es.js",
"browser": {

@@ -21,23 +21,19 @@ "./lib/index.js": "./lib/index-browser.js",

"dependencies": {
"buffer-from": "1.1.2",
"double-ended-queue": "2.1.0-0",
"levelup": "4.4.0",
"pouchdb-adapter-utils": "8.0.1",
"pouchdb-binary-utils": "8.0.1",
"pouchdb-collections": "8.0.1",
"pouchdb-core": "8.0.1",
"pouchdb-errors": "8.0.1",
"pouchdb-json": "8.0.1",
"pouchdb-md5": "8.0.1",
"pouchdb-merge": "8.0.1",
"pouchdb-utils": "8.0.1",
"sublevel-pouchdb": "8.0.1",
"pouchdb-adapter-utils": "9.0.0",
"pouchdb-binary-utils": "9.0.0",
"pouchdb-core": "9.0.0",
"pouchdb-errors": "9.0.0",
"pouchdb-json": "9.0.0",
"pouchdb-md5": "9.0.0",
"pouchdb-merge": "9.0.0",
"pouchdb-utils": "9.0.0",
"sublevel-pouchdb": "9.0.0",
"through2": "3.0.2"
},
"module": "./lib/index.es.js",
"files": [
"lib",
"dist",
"tonic-example.js"
"dist"
]
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc