Skip to content

Releases: share/sharedb-mongo

v1.0.0-beta.13

17 Mar 21:57
Compare
Choose a tag to compare

v1.0.0-beta.12

27 Feb 02:20
Compare
Choose a tag to compare
  • #86 - Fix unnecessary _type: {$type: 2} added to some $or/$and queries (@ericyhwang)

v1.0.0-beta.11

31 Jan 21:35
Compare
Choose a tag to compare

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

03 Jul 20:42
Compare
Choose a tag to compare
  • #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

12 Oct 21:36
Compare
Choose a tag to compare
  • #71 - Put getCommittedOpVersion onto ShareDbMongo.prototype instead of base DB.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

19 Sep 16:51
Compare
Choose a tag to compare

#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

06 Sep 19:00
Compare
Choose a tag to compare
  • #67 - Always include m property in MongoSnapshot class (@alecgibson)
    • In cases where the m property was previously not set, it is now set to null.
    • This fixes some tests that sharedb-mongo includes from sharedb, whose Snapshot class was changed to always have m.

v1.0.0-beta.5

07 Aug 01:03
Compare
Choose a tag to compare

Changes

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