Skip to content

Commit 69dd37b

Browse files
authored
Merge branch 'master' into update-node-test-environment
2 parents bfc6bb7 + ba74ebe commit 69dd37b

129 files changed

Lines changed: 286 additions & 259 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@
3333
},
3434

3535
"rules": {
36+
"eol-last": "error",
3637
"no-empty": "off",
3738
"no-console": "off",
39+
"no-trailing-spaces": "error",
3840
"semi": ["error", "always"],
3941
"curly": ["error", "all"],
4042
"space-unary-ops": ["error", {"words": true}],

bin/test-browser.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class RemoteRunner {
125125

126126
on(name, handler) {
127127
var handlers = this.handlers;
128-
128+
129129
if (!handlers[name]) {
130130
handlers[name] = [];
131131
}
@@ -134,21 +134,21 @@ class RemoteRunner {
134134

135135
handleEvents(events) {
136136
var handlers = this.handlers;
137-
137+
138138
events.forEach((event) => {
139139
this.completed = this.completed || event.name === 'end';
140140
this.failed = this.failed || event.name === 'fail';
141-
141+
142142
var additionalProps = ['pass', 'fail', 'pending'].indexOf(event.name) === -1 ? {} : {
143143
slow: event.obj.slow ? function () { return event.obj.slow; } : function () { return 60; },
144144
fullTitle: event.obj.fullTitle ? function () { return event.obj.fullTitle; } : undefined
145145
};
146146
var obj = Object.assign({}, event.obj, additionalProps);
147-
147+
148148
handlers[event.name].forEach(function (handler) {
149149
handler(obj, event.err);
150150
});
151-
151+
152152
if (event.logs && event.logs.length > 0) {
153153
event.logs.forEach(function (line) {
154154
if (line.type === 'log') {
@@ -163,14 +163,14 @@ class RemoteRunner {
163163
}
164164
});
165165
}
166-
166+
167167
bail() {
168168
var handlers = this.handlers;
169-
169+
170170
handlers['end'].forEach(function (handler) {
171171
handler();
172172
});
173-
173+
174174
this.completed = true;
175175
}
176176
}

bin/test-webpack.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88

99
npm run build
10-
npm i webpack@5.66.0 -D webpack-cli@4.9.2 # do this on-demand to avoid slow installs
10+
npm i webpack@5.66.0 webpack-cli@4.9.2 # do this on-demand to avoid slow installs
1111
node bin/update-package-json-for-publish.js
1212
./node_modules/.bin/webpack
13-
BUILD_NODE_DONE=0 POUCHDB_SRC='../../pouchdb-webpack.js' npm test
13+
BUILD_NODE_DONE=1 POUCHDB_SRC='../../pouchdb-webpack.js' npm test

bin/verify-build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
npm run build
77

88
node ./bin/verify-dependencies.js
9-
sh ./bin/verify-bundle-size.sh
9+
./bin/verify-bundle-size.sh

docs/_guides/attachments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ input.addEventListener('change', function () {
204204
_id: 'mydoc',
205205
_attachments: {
206206
filename: {
207-
type: file.type,
207+
content_type: file.type,
208208
data: file
209209
}
210210
}

packages/node_modules/pouchdb-abstract-mapreduce/src/createViewSignature.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ function createViewSignature(mapFun, reduceFun) {
2323
return stringify(mapFun) + stringify(reduceFun) + 'undefined';
2424
}
2525

26-
export default createViewSignature;
26+
export default createViewSignature;

packages/node_modules/pouchdb-abstract-mapreduce/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ function createAbstractMapReduce(localDocName, mapper, reducer, ddocValidator) {
708708
view.seq = currentSeq;
709709
view.sourceDB.activeTasks.remove(taskId);
710710
} catch (error) {
711-
view.sourceDB.activeTasks.remove(taskId, error);
711+
view.sourceDB.activeTasks.remove(taskId, error);
712712
}
713713
}
714714

packages/node_modules/pouchdb-adapter-http/src/promise-pool.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ function pool(promiseFactories, limit) {
5050
});
5151
}
5252

53-
export default pool;
53+
export default pool;

packages/node_modules/pouchdb-adapter-idb/src/allDocs.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import runBatchedCursor from './runBatchedCursor';
1818
import getAll from './getAll';
1919

2020
function allDocsKeys(keys, docStore, onBatch) {
21-
// It's not guaranted to be returned in right order
21+
// It's not guaranted to be returned in right order
2222
var valuesBatch = new Array(keys.length);
2323
var count = 0;
2424
keys.forEach(function (key, index) {
@@ -69,17 +69,17 @@ function idbAllDocs(opts, idb, callback) {
6969
var start = 'startkey' in opts ? opts.startkey : false;
7070
var end = 'endkey' in opts ? opts.endkey : false;
7171
var key = 'key' in opts ? opts.key : false;
72-
var keys = 'keys' in opts ? opts.keys : false;
72+
var keys = 'keys' in opts ? opts.keys : false;
7373
var skip = opts.skip || 0;
7474
var limit = typeof opts.limit === 'number' ? opts.limit : -1;
7575
var inclusiveEnd = opts.inclusive_end !== false;
7676

77-
var keyRange ;
77+
var keyRange ;
7878
var keyRangeError;
7979
if (!keys) {
8080
keyRange = createKeyRange(start, end, inclusiveEnd, key, opts.descending);
8181
keyRangeError = keyRange && keyRange.error;
82-
if (keyRangeError &&
82+
if (keyRangeError &&
8383
!(keyRangeError.name === "DataError" && keyRangeError.code === 0)) {
8484
// DataError with error code 0 indicates start is less than end, so
8585
// can just do an empty query. Else need to throw
@@ -114,7 +114,7 @@ function idbAllDocs(opts, idb, callback) {
114114

115115
/* istanbul ignore if */
116116
if (opts.update_seq) {
117-
getMaxUpdateSeq(seqStore, function (e) {
117+
getMaxUpdateSeq(seqStore, function (e) {
118118
if (e.target.result && e.target.result.length > 0) {
119119
updateSeq = e.target.result[0];
120120
}
@@ -127,7 +127,7 @@ function idbAllDocs(opts, idb, callback) {
127127
var maxKey = undefined;
128128
if (cursor && cursor.key) {
129129
maxKey = cursor.key;
130-
}
130+
}
131131
return onSuccess({
132132
target: {
133133
result: [maxKey]
@@ -218,7 +218,7 @@ function idbAllDocs(opts, idb, callback) {
218218
offset: opts.skip,
219219
rows: results
220220
};
221-
221+
222222
/* istanbul ignore if */
223223
if (opts.update_seq && updateSeq !== undefined) {
224224
returnVal.update_seq = updateSeq;
@@ -249,4 +249,4 @@ function idbAllDocs(opts, idb, callback) {
249249
runBatchedCursor(docStore, keyRange, opts.descending, limit + skip, onBatch);
250250
}
251251

252-
export default idbAllDocs;
252+
export default idbAllDocs;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
import { changesHandler as Changes } from 'pouchdb-utils';
2-
export default new Changes();
2+
export default new Changes();

0 commit comments

Comments
 (0)