New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

blue-cot

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blue-cot - npm Package Compare versions

Comparing version 5.0.1 to 6.0.0

3

CHANGELOG.md
# CHANGELOG
*versions follow [SemVer](http://semver.org)*
## 6.0.0 - 2020-08-10
**BREAKING CHANGES**: [`db.update`](https://github.com/maxlath/blue-cot#update) stops to create empty (`{ _id }`) docs when the updated doc can't be found, rejecting with a 404 instead.
## 5.0.0 - 2020-08-10

@@ -5,0 +8,0 @@ **BREAKING CHANGES**: [`db.fetch`](https://github.com/maxlath/blue-cot#fetch) now returns a { docs, errors } object

9

lib/db_handle.js

@@ -76,10 +76,5 @@ const querystring = require('querystring')

if (++attempt > 10) throw errors_.new('too many attempts', 400, { docId, fn })
let doc
// Throw if the doc doesn't exist
const doc = await db.get(docId)
try {
doc = await db.get(docId)
} catch (err) {
if (err.statusCode === 404) doc = { _id: docId }
else throw err
}
try {
const res = await db.put(fn(doc))

@@ -86,0 +81,0 @@ if (res.ok) return res

@@ -24,3 +24,3 @@ {

],
"version": "5.0.1",
"version": "6.0.0",
"main": "lib/cot.js",

@@ -27,0 +27,0 @@ "dependencies": {

@@ -207,4 +207,2 @@ [CouchDB](http://couchdb.org/) library with a simple, functional-programing-friendly API.

If `updateFunction` needs to do asynchronous work, it may return a promise.
#### bulk

@@ -211,0 +209,0 @@ `POST /<dbName>/_bulk_docs`

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