couchdb-transactions
Advanced tools
Comparing version 2.0.1 to 3.0.0
{ | ||
"name": "couchdb-transactions", | ||
"version": "2.0.1", | ||
"version": "3.0.0", | ||
"description": "Couchdb all or nothing transactions without deps", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "istanbul cover node_modules/mocha/bin/_mocha -- --bail --check-leaks test", | ||
"test-ci": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage" | ||
"test": "nyc --reporter=html mocha --bail --timeout 10000 --check-leaks test", | ||
"test-ci": "nyc mocha test --timeout 10000 --check-leaks" | ||
}, | ||
@@ -13,6 +13,6 @@ "author": "Pedro Narciso García Revington <p.revington@gmail.com>", | ||
"devDependencies": { | ||
"coveralls": "^3.0.0", | ||
"istanbul": "^0.4.3", | ||
"mocha": "^2.4.5", | ||
"nano": "^6.2.0" | ||
"dotenv": "^10.0.0", | ||
"mocha": "^9.1.2", | ||
"nano": "^9.0.5", | ||
"nyc": "^15.1.0" | ||
}, | ||
@@ -22,15 +22,15 @@ "directories": { | ||
}, | ||
"dependencies": {}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/revington/couchdb-transactions.git" | ||
"url": "git+https://gitlab.com/revington/couchdb-transactions.git" | ||
}, | ||
"keywords": [ | ||
"couchdb", | ||
"transactions" | ||
"transactions", | ||
"txn" | ||
], | ||
"bugs": { | ||
"url": "https://github.com/revington/couchdb-transactions/issues" | ||
"url": "https://gitlab.com/revington/couchdb-transactions/issues" | ||
}, | ||
"homepage": "https://github.com/revington/couchdb-transactions#readme" | ||
"homepage": "https://gitlab.com/revington/couchdb-transactions#readme" | ||
} |
@@ -1,3 +0,1 @@ | ||
[![Build Status](https://travis-ci.org/revington/couchdb-transactions.svg?branch=master)](https://travis-ci.org/revington/couchdb-transactions) | ||
[![Coverage Status](https://coveralls.io/repos/github/revington/couchdb-transactions/badge.svg?branch=master)](https://coveralls.io/github/revington/couchdb-transactions?branch=master) | ||
# Couchdb transactions | ||
@@ -8,3 +6,6 @@ | ||
[![pipeline status](https://gitlab.com/revington/couchdb-transactions/badges/master/pipeline.svg)](https://gitlab.com/revington/couchdb-transactions/-/commits/master) | ||
[![coverage report](https://gitlab.com/revington/couchdb-transactions/badges/master/coverage.svg)](https://gitlab.com/revington/couchdb-transactions/-/commits/master) | ||
## Usage | ||
@@ -29,1 +30,7 @@ | ||
## Contributing | ||
Please respect the `.eslintrc` configuration. | ||
Also, you will need to create a `.env` file with the URL of your CouchDB server. | ||
See [.env.sample](.env.sample) | ||
'use strict'; | ||
require('dotenv').config(); | ||
const assert = require('assert'); | ||
const nano = require('nano'); | ||
const couchdbTxn = require('..'); | ||
const TEST_COUCH_DB = 'http://localhost:5984'; | ||
const assert = require('assert'); | ||
const COUCHDB = process.env.COUCHDB; | ||
assert(COUCHDB, 'COUCHDB env var is mandatory'); | ||
const pkg = require('../package.json'); | ||
console.log('COUCHDB', COUCHDB); | ||
function initSandbox(done) { | ||
var self = this; | ||
self.testDB = pkg.name + '-test-' + Date.now().toString(36); | ||
let myDB = nano(TEST_COUCH_DB); | ||
let myDB = nano(COUCHDB); | ||
myDB.db.create(self.testDB, function (err) { | ||
@@ -23,3 +28,3 @@ if (err) { | ||
var self = this; | ||
let myDB = nano(TEST_COUCH_DB); | ||
let myDB = nano(COUCHDB); | ||
myDB.db.destroy(self.testDB, function (err) { | ||
@@ -26,0 +31,0 @@ if (err) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15645
345
35
1