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

comdb

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

comdb - npm Package Compare versions

Comparing version 1.1.0-beta to 1.1.1-beta

11

index.js

@@ -31,3 +31,3 @@ 'use strict'

try {
const doc = decrypted.get(newDoc._id)
const doc = await decrypted.get(newDoc._id)
change = isEqual(newDoc, doc) ? undefined : newDoc

@@ -60,3 +60,3 @@ } catch (err) {

const encryptedDoc = { payload }
const latestChanges = await encrypted.changes({ limit: 1, doc_ids: [id] })
const latestChanges = await encrypted.changes({ limit: 1, include_docs: true })
if (latestChanges.results && latestChanges.results.length) {

@@ -123,8 +123,3 @@ const latestChange = latestChanges.results[0].doc

const results = await bulkDocs.call(this, docs, opts)
const ids = results
.map(({ id }) => { return id })
.filter((id) => {
const d = ((docs && docs.docs) || docs)
return !d.map(({ _id }) => { return _id }).includes(id)
})
const ids = results.map(({ id }) => { return id })
await processChange(ids)

@@ -131,0 +126,0 @@ const promise = Promise.resolve(results)

{
"name": "comdb",
"version": "1.1.0-beta",
"version": "1.1.1-beta",
"description": "A PouchDB plugin that transparently encrypts and decrypts its data.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -25,3 +25,2 @@ /* global describe, it, before, after */

it('should encrypt writes', async function () {
this.timeout(4 * 1000) // sometimes runs long
const { id } = await this.db.post({ hello: 'world' })

@@ -28,0 +27,0 @@ const doc = await this.db.get(id)

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