Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ var isObject = require('lodash.isobject');
var sharedbMongoUtils = require('./sharedb-mongo-utils');
var util = require('sharedb/lib/util');

// This is designed for use in tests, so load all Mingo query operators
require('mingo/init/system');
// This is designed for use in tests, so load all Mingo query operators. Mingo 7
// removed this subpath and auto-loads every operator from the default module, so
// the explicit require is only needed for Mingo 6.
try {
require('mingo/init/system');
} catch (error) {
if (error.code !== 'ERR_PACKAGE_PATH_NOT_EXPORTED') throw error;
}

// Snapshot properties added to the root doc by `castToDoc()` in sharedb-mongo
var MONGO_DOC_PROPERTIES = {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"lodash.clonedeep": "^4.5.0",
"lodash.isobject": "^3.0.2",
"mingo": "6.1.0 - 6.2.1"
"mingo": "6.1.0 - 7.2.3"
},
"peerDependencies": {
"sharedb": "^1.0.0-beta || ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0"
Expand Down
Loading