sharedb-mongo 3.0.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,9 +20,9 @@ jobs:
20
20
  fail-fast: false
21
21
  matrix:
22
22
  node:
23
- - 14
24
23
  - 16
25
24
  - 18
25
+ - 20
26
26
  mongodb:
27
27
  - 4.0
28
28
  - 4.2
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "sharedb-mongo",
3
- "version": "3.0.0",
3
+ "version": "4.0.0",
4
4
  "description": "MongoDB database adapter for ShareDB",
5
5
  "main": "index.js",
6
6
  "dependencies": {
7
7
  "mongodb": "^3.1.13 || ^4.0.0 || ^5.0.0",
8
- "sharedb": "^1.9.1 || ^2.0.0 || ^3.0.0"
8
+ "sharedb": "^1.9.1 || ^2.0.0 || ^3.0.0 || ^4.0.0"
9
9
  },
10
10
  "devDependencies": {
11
11
  "async": "^3.2.4",
@@ -19,8 +19,8 @@
19
19
  "mongodb5": "npm:mongodb@^5.0.0",
20
20
  "nyc": "^14.1.1",
21
21
  "ot-json1": "^1.0.1",
22
- "sharedb-mingo-memory": "^1.1.1",
23
- "sinon": "^6.1.5",
22
+ "sharedb-mingo-memory": "^1.0.0 || ^2.0.0 || ^3.0.0",
23
+ "sinon": "^9.2.4",
24
24
  "sinon-chai": "^3.7.0"
25
25
  },
26
26
  "scripts": {
@@ -334,9 +334,10 @@ describe('mongo db', function() {
334
334
  });
335
335
 
336
336
  it('$mapReduce queries should work when allowJavaScriptQuery == true', function(done) {
337
- if (process.env._SHAREDB_MONGODB_DRIVER === 'mongodb5') {
338
- // This function was removed in mongodb5:
339
- // https://github.com/mongodb/node-mongodb-native/pull/3511
337
+ // This function was removed in mongodb5:
338
+ // https://github.com/mongodb/node-mongodb-native/pull/3511
339
+ var mapReduceSupported = typeof this.db.mongo.collection('test').mapReduce === 'function';
340
+ if (!mapReduceSupported) {
340
341
  return done();
341
342
  }
342
343
  var snapshots = [