Releases: share/sharedb-mongo
Releases · share/sharedb-mongo
v1.0.0-beta.13
- #87 - Upgrade to async@2 (@ericyhwang)
v1.0.0-beta.12
- #86 - Fix unnecessary
_type: {$type: 2}
added to some$or
/$and
queries (@ericyhwang)
v1.0.0-beta.11
sharedb-mongo now uses the [email protected]
driver
This was published to NPM on Nov 15, 2019.
- #83 - Upgrade to 3.x Mongo driver (@nateps)
- sharedb-mongo is still compatible with the 2.x Mongo driver.
- You can create a Mongo client yourself and pass it to sharedb-mongo, and sharedb-mongo will detect whether it's a 2.x or 3.x driver and behave appropriately.
Upgrade note
When using the provider-function with the mongodb@3 driver, sharedb-mongo now expects a mongodb.MongoClient
, not a mongodb.Db
. This is because mongodb@3 removed the Db#close
function, so sharedb-mongo needs a MongoClient to be able to close the client when sharedb-mongo is closed.
mongodb@2:
const shareDbMongo = new ShareDbMongo({
mongo: (callback) => {
MongoClient.connect('mongodb://localhost:27017/test', (err, db) => {
// In mongodb@2, the result is a mongodb.Db
callback(err, db);
});
}
});
mongodb@3:
const shareDbMongo = new ShareDbMongo({
mongo: (callback) => {
MongoClient.connect('mongodb://localhost:27017/test', (err, client) => {
// In mongodb@3, the result is a mongodb.MongoClient
callback(err, client);
});
}
});
v1.0.0-beta.9
- #63 - Fix TypeError when trying to generate error 4101, "Invalid op version" (@gkubisa)
- #78 - Ignore package-lock.json (@alecgibson)
- #77 - Make
$aggregate
forward-compatible with mongodb@3 (@ericyhwang)
v1.0.0-beta.8
- #71 - Put
getCommittedOpVersion
ontoShareDbMongo.prototype
instead of baseDB.prototype
(@ericyhwang)- This fixes an issue that's only triggered when loading sharedb-mongo and another DB adapter (like sharedb-mingo-memory) into the same process. This likely won't be the case in production, but it could be encountered in a test suite that runs in-memory unit tests and integration tests together.
- Thanks to @danilopao for reporting in share/sharedb-mingo-memory#8
v1.0.0-beta.7
#68 - If getOpsWithoutStrictLinking
option is true, then Share will use a less-strict way of determining op links in getOps
, which can speed up performance of that method, at the cost of perhaps returning a non-canonical op in edge cases involving backing database TTLs on the ops collections. (@alecgibson)
https://github.com/share/sharedb-mongo/tree/v1.0.0-beta.7#dropping-strict-linking
v1.0.0-beta.6
- #67 - Always include
m
property in MongoSnapshot class (@alecgibson)- In cases where the
m
property was previously not set, it is now set tonull
. - This fixes some tests that sharedb-mongo includes from sharedb, whose Snapshot class was changed to always have
m
.
- In cases where the
v1.0.0-beta.5
Changes
- #58 - Improve performance of
getLinkedOps
(@alecgibson)
Tests
- #65 - Test fixes (@alecgibson)
- Upgrade sharedb-mingo-memory from
^1.0.0-beta
to^1.0.1
to fix some in-memory tests - Update Node/Mongo versions for Travis CI
- Upgrade sharedb-mingo-memory from