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

pouchdb-adapter-idb

Package Overview
Dependencies
Maintainers
5
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pouchdb-adapter-idb - npm Package Compare versions

Comparing version 6.4.2 to 6.4.3

44

lib/index.es.js

@@ -52,6 +52,6 @@ import { assign, pick, changesHandler, nextTick, clone, filterChange, uuid, guardedConsole, toPromise, hasLocalStorage } from 'pouchdb-utils';

// format for the revision trees other than JSON.
function encodeMetadata(metadata, winningRev, deleted) {
function encodeMetadata(metadata, winningRev$$1, deleted) {
return {
data: safeJsonStringify(metadata),
winningRev: winningRev,
winningRev: winningRev$$1,
deletedOrLocal: deleted ? '1' : '0',

@@ -439,6 +439,6 @@ seq: metadata.seq, // highest seq for this doc

function writeDoc(docInfo, winningRev, winningRevIsDeleted, newRevIsDeleted,
function writeDoc(docInfo, winningRev$$1, winningRevIsDeleted, newRevIsDeleted,
isUpdate, delta, resultsIdx, callback) {
docInfo.metadata.winningRev = winningRev;
docInfo.metadata.winningRev = winningRev$$1;
docInfo.metadata.deleted = winningRevIsDeleted;

@@ -457,3 +457,3 @@

if (hasAttachments) {
return writeAttachments(docInfo, winningRev, winningRevIsDeleted,
return writeAttachments(docInfo, winningRev$$1, winningRevIsDeleted,
isUpdate, resultsIdx, callback);

@@ -465,7 +465,7 @@ }

finishDoc(docInfo, winningRev, winningRevIsDeleted,
finishDoc(docInfo, winningRev$$1, winningRevIsDeleted,
isUpdate, resultsIdx, callback);
}
function finishDoc(docInfo, winningRev, winningRevIsDeleted,
function finishDoc(docInfo, winningRev$$1, winningRevIsDeleted,
isUpdate, resultsIdx, callback) {

@@ -494,3 +494,3 @@

// delete metadata.rev;
var metadataToStore = encodeMetadata(metadata, winningRev,
var metadataToStore = encodeMetadata(metadata, winningRev$$1,
winningRevIsDeleted);

@@ -529,3 +529,3 @@ var metaDataReq = docStore.put(metadataToStore);

function writeAttachments(docInfo, winningRev, winningRevIsDeleted,
function writeAttachments(docInfo, winningRev$$1, winningRevIsDeleted,
isUpdate, resultsIdx, callback) {

@@ -541,3 +541,3 @@

if (numDone === attachments.length) {
finishDoc(docInfo, winningRev, winningRevIsDeleted,
finishDoc(docInfo, winningRev$$1, winningRevIsDeleted,
isUpdate, resultsIdx, callback);

@@ -557,3 +557,3 @@ }

delete att.data;
att.revpos = parseInt(winningRev, 10);
att.revpos = parseInt(winningRev$$1, 10);
var digest = att.digest;

@@ -856,4 +856,4 @@ saveAttachment(digest, data, attachmentSaved);

// want to block the main cursor while we're fetching the doc
function fetchDocAsynchronously(metadata, row, winningRev) {
var key = metadata.id + "::" + winningRev;
function fetchDocAsynchronously(metadata, row, winningRev$$1) {
var key = metadata.id + "::" + winningRev$$1;
docIdRevIndex.get(key).onsuccess = function onGetDoc(e) {

@@ -871,3 +871,3 @@ row.doc = decodeDoc(e.target.result);

function allDocsInner(winningRev, metadata) {
function allDocsInner(winningRev$$1, metadata) {
var row = {

@@ -877,3 +877,3 @@ id: metadata.id,

value: {
rev: winningRev
rev: winningRev$$1
}

@@ -892,3 +892,3 @@ };

if (opts.include_docs) {
fetchDocAsynchronously(metadata, row, winningRev);
fetchDocAsynchronously(metadata, row, winningRev$$1);
}

@@ -910,4 +910,4 @@ }

var metadata = decodeMetadata(batchValue);
var winningRev = metadata.winningRev;
allDocsInner(winningRev, metadata);
var winningRev$$1 = metadata.winningRev;
allDocsInner(winningRev$$1, metadata);
}

@@ -985,4 +985,4 @@ }

return new Promise(function (resolve) {
var blob = blob(['']);
var req = txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');
var blob$$1 = blob(['']);
var req = txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob$$1, 'key');

@@ -1669,6 +1669,6 @@ req.onsuccess = function () {

compactRevs(revs, docId, txn);
var winningRev = metadata.winningRev;
var winningRev$$1 = metadata.winningRev;
var deleted = metadata.deleted;
txn.objectStore(DOC_STORE).put(
encodeMetadata(metadata, winningRev, deleted));
encodeMetadata(metadata, winningRev$$1, deleted));
};

@@ -1675,0 +1675,0 @@ txn.onabort = idbError(callback);

{
"name": "pouchdb-adapter-idb",
"version": "6.4.2",
"version": "6.4.3",
"description": "PouchDB adapter using IndexedDB as its data store.",

@@ -12,10 +12,10 @@ "main": "./lib/index.js",

"dependencies": {
"pouchdb-adapter-utils": "6.4.2",
"pouchdb-binary-utils": "6.4.2",
"pouchdb-collections": "6.4.2",
"pouchdb-errors": "6.4.2",
"pouchdb-json": "6.4.2",
"pouchdb-merge": "6.4.2",
"pouchdb-promise": "6.4.2",
"pouchdb-utils": "6.4.2"
"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-merge": "6.4.3",
"pouchdb-promise": "6.4.3",
"pouchdb-utils": "6.4.3"
},

@@ -22,0 +22,0 @@ "module": "./lib/index.es.js",

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