pouchdb-core
Advanced tools
Comparing version 6.4.3 to 7.0.0
@@ -1,2 +0,1 @@ | ||
import Promise from 'pouchdb-promise'; | ||
import getArguments from 'argsarray'; | ||
@@ -9,3 +8,3 @@ import { clone, listenerCount, once, guardedConsole, rev, isRemote, pick, adapterFun, upsert, bulkGetShim, invalidIdError, nextTick, hasLocalStorage, assign } from 'pouchdb-utils'; | ||
import { MISSING_BULK_DOCS, MISSING_DOC, REV_CONFLICT, INVALID_ID, UNKNOWN_ERROR, QUERY_PARSE_ERROR, BAD_REQUEST, NOT_AN_OBJECT, INVALID_REV, createError } from 'pouchdb-errors'; | ||
import pouchDebug from 'pouchdb-debug'; | ||
import { fetch } from 'pouchdb-fetch'; | ||
import pouchChangesFilter from 'pouchdb-changes-filter'; | ||
@@ -338,2 +337,9 @@ | ||
EventEmitter.call(this); | ||
// re-bind prototyped methods | ||
for (var p in AbstractPouchDB.prototype) { | ||
if (typeof this[p] === 'function') { | ||
this[p] = this[p].bind(this); | ||
} | ||
} | ||
} | ||
@@ -731,2 +737,3 @@ | ||
this._getRevisionTree(id, function (err, rev_tree) { | ||
/* istanbul ignore if */ | ||
if (err) { | ||
@@ -931,2 +938,10 @@ return cb(err); | ||
} | ||
opts = opts || {}; | ||
// By default set return_docs to false if the caller has opts.live = true, | ||
// this will prevent us from collecting the set of changes indefinitely | ||
// resulting in growing memory | ||
opts.return_docs = ('return_docs' in opts) ? opts.return_docs : !opts.live; | ||
return new Changes(this, opts, callback); | ||
@@ -1119,3 +1134,3 @@ }; | ||
function TaskQueue$1() { | ||
function TaskQueue() { | ||
this.isReady = false; | ||
@@ -1126,3 +1141,3 @@ this.failed = false; | ||
TaskQueue$1.prototype.execute = function () { | ||
TaskQueue.prototype.execute = function () { | ||
var fun; | ||
@@ -1140,3 +1155,3 @@ if (this.failed) { | ||
TaskQueue$1.prototype.fail = function (err) { | ||
TaskQueue.prototype.fail = function (err) { | ||
this.failed = err; | ||
@@ -1146,3 +1161,3 @@ this.execute(); | ||
TaskQueue$1.prototype.ready = function (db) { | ||
TaskQueue.prototype.ready = function (db) { | ||
this.isReady = true; | ||
@@ -1153,3 +1168,3 @@ this.db = db; | ||
TaskQueue$1.prototype.addTask = function (fun) { | ||
TaskQueue.prototype.addTask = function (fun) { | ||
this.queue.push(fun); | ||
@@ -1250,2 +1265,6 @@ if (this.failed) { | ||
if (opts.deterministic_revs === undefined) { | ||
opts.deterministic_revs = true; | ||
} | ||
this.__opts = opts = clone(opts); | ||
@@ -1276,3 +1295,3 @@ | ||
AbstractPouchDB.call(self); | ||
self.taskqueue = new TaskQueue$1(); | ||
self.taskqueue = new TaskQueue(); | ||
@@ -1412,9 +1431,10 @@ self.adapter = opts.adapter; | ||
PouchDB.fetch = function (url, opts) { | ||
return fetch(url, opts); | ||
}; | ||
// managed automatically by set-version.js | ||
var version = "6.4.3"; | ||
var version = "7.0.0"; | ||
// TODO: remove from pouchdb-core (breaking) | ||
PouchDB.plugin(pouchDebug); | ||
// TODO: remove from pouchdb-core (breaking) | ||
PouchDB.plugin(pouchChangesFilter); | ||
@@ -1421,0 +1441,0 @@ |
@@ -5,3 +5,2 @@ 'use strict'; | ||
var Promise = _interopDefault(require('pouchdb-promise')); | ||
var getArguments = _interopDefault(require('argsarray')); | ||
@@ -14,3 +13,3 @@ var pouchdbUtils = require('pouchdb-utils'); | ||
var pouchdbErrors = require('pouchdb-errors'); | ||
var pouchDebug = _interopDefault(require('pouchdb-debug')); | ||
var pouchdbFetch = require('pouchdb-fetch'); | ||
var pouchChangesFilter = _interopDefault(require('pouchdb-changes-filter')); | ||
@@ -343,2 +342,9 @@ | ||
events.EventEmitter.call(this); | ||
// re-bind prototyped methods | ||
for (var p in AbstractPouchDB.prototype) { | ||
if (typeof this[p] === 'function') { | ||
this[p] = this[p].bind(this); | ||
} | ||
} | ||
} | ||
@@ -736,2 +742,3 @@ | ||
this._getRevisionTree(id, function (err, rev_tree) { | ||
/* istanbul ignore if */ | ||
if (err) { | ||
@@ -936,2 +943,10 @@ return cb(err); | ||
} | ||
opts = opts || {}; | ||
// By default set return_docs to false if the caller has opts.live = true, | ||
// this will prevent us from collecting the set of changes indefinitely | ||
// resulting in growing memory | ||
opts.return_docs = ('return_docs' in opts) ? opts.return_docs : !opts.live; | ||
return new Changes(this, opts, callback); | ||
@@ -1124,3 +1139,3 @@ }; | ||
function TaskQueue$1() { | ||
function TaskQueue() { | ||
this.isReady = false; | ||
@@ -1131,3 +1146,3 @@ this.failed = false; | ||
TaskQueue$1.prototype.execute = function () { | ||
TaskQueue.prototype.execute = function () { | ||
var fun; | ||
@@ -1145,3 +1160,3 @@ if (this.failed) { | ||
TaskQueue$1.prototype.fail = function (err) { | ||
TaskQueue.prototype.fail = function (err) { | ||
this.failed = err; | ||
@@ -1151,3 +1166,3 @@ this.execute(); | ||
TaskQueue$1.prototype.ready = function (db) { | ||
TaskQueue.prototype.ready = function (db) { | ||
this.isReady = true; | ||
@@ -1158,3 +1173,3 @@ this.db = db; | ||
TaskQueue$1.prototype.addTask = function (fun) { | ||
TaskQueue.prototype.addTask = function (fun) { | ||
this.queue.push(fun); | ||
@@ -1255,2 +1270,6 @@ if (this.failed) { | ||
if (opts.deterministic_revs === undefined) { | ||
opts.deterministic_revs = true; | ||
} | ||
this.__opts = opts = pouchdbUtils.clone(opts); | ||
@@ -1281,3 +1300,3 @@ | ||
AbstractPouchDB.call(self); | ||
self.taskqueue = new TaskQueue$1(); | ||
self.taskqueue = new TaskQueue(); | ||
@@ -1417,9 +1436,10 @@ self.adapter = opts.adapter; | ||
PouchDB.fetch = function (url, opts) { | ||
return pouchdbFetch.fetch(url, opts); | ||
}; | ||
// managed automatically by set-version.js | ||
var version = "6.4.3"; | ||
var version = "7.0.0"; | ||
// TODO: remove from pouchdb-core (breaking) | ||
PouchDB.plugin(pouchDebug); | ||
// TODO: remove from pouchdb-core (breaking) | ||
PouchDB.plugin(pouchChangesFilter); | ||
@@ -1426,0 +1446,0 @@ |
{ | ||
"name": "pouchdb-core", | ||
"version": "6.4.3", | ||
"version": "7.0.0", | ||
"description": "The core of PouchDB as a standalone package.", | ||
@@ -14,9 +14,8 @@ "main": "./lib/index.js", | ||
"inherits": "2.0.3", | ||
"pouchdb-changes-filter": "6.4.3", | ||
"pouchdb-collections": "6.4.3", | ||
"pouchdb-debug": "6.4.3", | ||
"pouchdb-errors": "6.4.3", | ||
"pouchdb-merge": "6.4.3", | ||
"pouchdb-promise": "6.4.3", | ||
"pouchdb-utils": "6.4.3" | ||
"pouchdb-changes-filter": "7.0.0", | ||
"pouchdb-collections": "7.0.0", | ||
"pouchdb-errors": "7.0.0", | ||
"pouchdb-fetch": "7.0.0", | ||
"pouchdb-merge": "7.0.0", | ||
"pouchdb-utils": "7.0.0" | ||
}, | ||
@@ -23,0 +22,0 @@ "module": "./lib/index.es.js", |
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
Network access
Supply chain riskThis module accesses the network.
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
91415
8
2548
1
+ Addedpouchdb-fetch@7.0.0
+ Addedbuffer-from@1.1.0(transitive)
+ Addedes6-denodeify@0.1.5(transitive)
+ Addedfetch-cookie@0.7.0(transitive)
+ Addednode-fetch@2.7.0(transitive)
+ Addedpouchdb-binary-utils@7.0.0(transitive)
+ Addedpouchdb-changes-filter@7.0.0(transitive)
+ Addedpouchdb-collate@7.0.0(transitive)
+ Addedpouchdb-collections@7.0.0(transitive)
+ Addedpouchdb-errors@7.0.0(transitive)
+ Addedpouchdb-fetch@7.0.0(transitive)
+ Addedpouchdb-md5@7.0.0(transitive)
+ Addedpouchdb-merge@7.0.0(transitive)
+ Addedpouchdb-selector-core@7.0.0(transitive)
+ Addedpouchdb-utils@7.0.0(transitive)
+ Addedpsl@1.13.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedspark-md5@3.0.0(transitive)
+ Addedtough-cookie@2.5.0(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
- Removedpouchdb-debug@6.4.3
- Removedpouchdb-promise@6.4.3
- Removeddebug@3.1.0(transitive)
- Removedlie@3.1.1(transitive)
- Removedms@2.0.0(transitive)
- Removedpouchdb-changes-filter@6.4.3(transitive)
- Removedpouchdb-collate@6.4.3(transitive)
- Removedpouchdb-collections@6.4.3(transitive)
- Removedpouchdb-debug@6.4.3(transitive)
- Removedpouchdb-errors@6.4.3(transitive)
- Removedpouchdb-merge@6.4.3(transitive)
- Removedpouchdb-promise@6.4.3(transitive)
- Removedpouchdb-selector-core@6.4.3(transitive)
- Removedpouchdb-utils@6.4.3(transitive)
Updatedpouchdb-changes-filter@7.0.0
Updatedpouchdb-collections@7.0.0
Updatedpouchdb-errors@7.0.0
Updatedpouchdb-merge@7.0.0
Updatedpouchdb-utils@7.0.0