Skip to content

Commit c863506

Browse files
committed
chore: deprecate leveldb, memory and localstorage references
1 parent 17ad9f1 commit c863506

10 files changed

Lines changed: 5 additions & 56 deletions

File tree

bin/build-module.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ var AGGRESSIVELY_BUNDLED_PACKAGES =
3131
var BROWSER_ONLY_PACKAGES =
3232
['pouchdb-browser'];
3333
// packages that only use the browser field to ignore dependencies
34-
var BROWSER_DEPENDENCY_ONLY_PACKAGES =
35-
['pouchdb-adapter-leveldb'];
34+
var BROWSER_DEPENDENCY_ONLY_PACKAGES = [];
3635

3736
function buildModule(filepath) {
3837
var pkg = require(path.resolve(filepath, 'package.json'));

bin/build-pouchdb.js

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var builtInModules = require('builtin-modules');
2727
var external = Object.keys(require('../package.json').dependencies)
2828
.concat(builtInModules);
2929

30-
var plugins = ['indexeddb', 'localstorage', 'memory', 'find'];
30+
var plugins = ['indexeddb', 'find'];
3131

3232
var currentYear = new Date().getFullYear();
3333

@@ -42,24 +42,6 @@ var comments = {
4242

4343
'indexeddb': '// PouchDB indexeddb plugin ' + version + '\n',
4444

45-
'memory': '// PouchDB in-memory plugin ' + version +
46-
'\n// Based on MemDOWN: https://github.com/rvagg/memdown' +
47-
'\n// ' +
48-
'\n// (c) 2012-' + currentYear + ' Dale Harvey and the PouchDB team' +
49-
'\n// PouchDB may be freely distributed under the Apache license, ' +
50-
'version 2.0.' +
51-
'\n// For all details and documentation:' +
52-
'\n// http://pouchdb.com\n',
53-
54-
'localstorage': '// PouchDB localStorage plugin ' + version +
55-
'\n// Based on localstorage-down: https://github.com/No9/localstorage-down' +
56-
'\n// ' +
57-
'\n// (c) 2012-' + currentYear + ' Dale Harvey and the PouchDB team' +
58-
'\n// PouchDB may be freely distributed under the Apache license, ' +
59-
'version 2.0.' +
60-
'\n// For all details and documentation:' +
61-
'\n// http://pouchdb.com\n',
62-
6345
'find': '// pouchdb-find plugin ' + version +
6446
'\n// Based on Mango: https://github.com/cloudant/mango' +
6547
'\n// ' +

bin/run-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fi
1616

1717
: "${CLIENT:=node}"
1818
: "${COUCH_HOST:=http://127.0.0.1:5984}"
19-
: "${VIEW_ADAPTERS:=memory}"
19+
: "${VIEW_ADAPTERS:=nodesqlite}"
2020
export VIEW_ADAPTERS
2121

2222
pouchdb-setup-server() {

bin/verify-dependencies.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,10 @@ getReqs('pouchdb/lib/index.js').should.not.contain('pouchdb-core');
2525
getReqs('pouchdb/lib/index-browser.js').should.not.contain('vm');
2626
getReqs('pouchdb/lib/index-browser.js').should.not.contain('pouchdb-mapreduce');
2727
getReqs('pouchdb/lib/index-browser.js').should.not.contain('pouchdb');
28-
getReqs('pouchdb/lib/index-browser.js').should.not.contain('leveldown');
2928
getReqs('pouchdb/lib/index-browser.js').should.not.contain('pouchdb-core');
3029

3130
// pouchdb-node and pouchdb-browser are also aggressively bundled
3231
getReqs('pouchdb-node/lib/index.js').should.not.contain('pouchdb-core');
33-
getReqs('pouchdb-node/lib/index.js').should.contain('leveldown');
3432
getReqs('pouchdb-browser/lib/index.js').should.not.contain('pouchdb-core');
3533

3634
// pouchdb-for-coverage is super-duper aggressively bundled

packages/node_modules/pouchdb-errors/src/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ const NOT_AN_OBJECT = { status:400, name:'bad_request', message:'Document must b
3434
const DB_MISSING = { status:404, name:'not_found', message:'Database not found' };
3535
const IDB_ERROR = { status:500, name:'indexed_db_went_bad', message:'unknown' };
3636
const WSQ_ERROR = { status:500, name:'web_sql_went_bad', message:'unknown' };
37-
const LDB_ERROR = { status:500, name:'levelDB_went_went_bad', message:'unknown' };
3837
const FORBIDDEN = { status:403, name:'forbidden', message:'Forbidden by design doc validate_doc_update function' };
3938
const INVALID_REV = { status:400, name:'bad_request', message:'Invalid rev format' };
4039
const FILE_EXISTS = { status:412, name:'file_exists', message:'The database could not be created, the file already exists.' };
@@ -117,7 +116,6 @@ export {
117116
NOT_AN_OBJECT,
118117
DB_MISSING,
119118
WSQ_ERROR,
120-
LDB_ERROR,
121119
FORBIDDEN,
122120
INVALID_REV,
123121
FILE_EXISTS,

packages/node_modules/pouchdb-for-coverage/src/errors.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {
1616
NOT_AN_OBJECT,
1717
DB_MISSING,
1818
WSQ_ERROR,
19-
LDB_ERROR,
2019
FORBIDDEN,
2120
INVALID_REV,
2221
FILE_EXISTS,
@@ -43,7 +42,6 @@ export default {
4342
NOT_AN_OBJECT,
4443
DB_MISSING,
4544
WSQ_ERROR,
46-
LDB_ERROR,
4745
FORBIDDEN,
4846
INVALID_REV,
4947
FILE_EXISTS,

packages/node_modules/pouchdb-node/src/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import PouchDB from 'pouchdb-core';
22

3-
import LevelPouch from 'pouchdb-adapter-leveldb';
43
import HttpPouch from 'pouchdb-adapter-http';
54
import mapreduce from 'pouchdb-mapreduce';
65
import replication from 'pouchdb-replication';
76

8-
PouchDB.plugin(LevelPouch)
9-
.plugin(HttpPouch)
7+
PouchDB.plugin(HttpPouch)
108
.plugin(mapreduce)
119
.plugin(replication);
1210

packages/node_modules/pouchdb/src/plugins/localstorage.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/node_modules/pouchdb/src/plugins/memory.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

tests/common-utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ commonUtils.plugins = function () {
4141
return plugins ? plugins.split(',') : [];
4242
};
4343

44-
var PLUGIN_ADAPTERS = ['indexeddb', 'localstorage', 'node-websql', 'nodesqlite'];
44+
var PLUGIN_ADAPTERS = ['indexeddb', 'node-websql', 'nodesqlite'];
4545

4646
commonUtils.loadPouchDB = function (opts) {
4747
opts = opts || {};

0 commit comments

Comments
 (0)