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

couchdb-bulk2

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

couchdb-bulk2 - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

5

cli.js
#!/usr/bin/env node
const fs = require('fs')
const split = require('split')
// Lowest end of the recommended range
// See https://docs.couchdb.org/en/stable/maintenance/performance.html#network
const docsPerBulk = 1000

@@ -48,3 +51,3 @@ const [ url, file ] = process.argv.slice(2)

if (batch.length >= 500) {
if (batch.length >= docsPerBulk) {
this.pause()

@@ -51,0 +54,0 @@ await bulkPost(batch)

3

package.json
{
"name": "couchdb-bulk2",
"version": "2.0.1",
"version": "2.0.2",
"description": "Pipe line-seperated JSON into CouchDB",

@@ -31,2 +31,3 @@ "main": "cli.js",

"dependencies": {
"node-fetch": "^2.6.0",
"split": "^1.0.1"

@@ -33,0 +34,0 @@ },

@@ -9,3 +9,3 @@ # couchdb-bulk2

This is a fork from [couchdb-bulk](https://github.com/jo/couchdb-bulk), with the following modifications:
* posts 500 docs per bulk request (instead of only 1) when the input is newline-delimited JSON
* posts 1000 docs per bulk request (instead of only 1) when the input is newline-delimited JSON
* drops supports for anything else than newline-delimited JSON (1 doc per line), assuming that getting to that data format is the job of another tool, such as [jq](https://stedolan.github.io/jq/)

@@ -12,0 +12,0 @@ * drops supports for the module interface, only the CLI mode remains

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