Skip to content

Releases: share/sharedb

v1.0.0-beta.20

28 Feb 22:48
Compare
Choose a tag to compare
  • #273 - [fix] In Doc._clearInflightOp, clear inflightOp before calling callbacks (@ericyhwang)
    • Fixes #272, a double-callback issue during chained op submissions, where if the second op is invalid, the first op's callback gets called twice.

[UNPUBLISHED] v1.0.0-beta.19

14 Feb 22:46
Compare
Choose a tag to compare

This version was unpublished from NPM, at 2019-02-15, ~02:30 UTC.

It was causing issues in 'readSnapshots' middleware for queryPoll() calls. Single-document fetch and subscribe should not have been affected. See #269 for details.


  • #263 - For readSnapshots middleware, add request method and parameter info - @ericyhwang
    • When ShareDB invokes the readSnapshots middleware function, the first argument now contains new properties method and parameters.
    • These can be useful for logging and monitoring of the response sizes for snapshot read requests.

v1.0.0-beta.18

30 Jan 17:38
Compare
Choose a tag to compare
  • #262 - Add fetch snapshot by time methods (@alecgibson)
    • Connection.fetchSnapshotByTimestamp
    • MilestoneDB.getMilestoneSnapshotAtOrBeforeTime
    • MilestoneDB.getMilestoneSnapshotAtOrAfterTime
  • #264 - Updated example for <textarea> (@urbanspr1nter)

v1.0.0-beta.17

01 Dec 01:24
Compare
Choose a tag to compare
  • #261 - Fix memory leak in agent when subscribing to stream that already has an active subscription (@dcharbonnier)

v1.0.0-beta.16

28 Nov 17:22
Compare
Choose a tag to compare

#259 - Catch synchronous errors in Doc._otApply (@alecgibson)

  • This also changes the Doc._hardRollback error emit behavior - it now emits an error if there was at least one inflight / pending op without a callback, instead of emitting an error if just the inflight op didn't have a callback.

v1.0.0-beta.15

23 Nov 00:06
Compare
Choose a tag to compare

#258 - Allow custom logger overrides (@alecgibson)

v1.0.0-beta.14

19 Sep 16:46
Compare
Choose a tag to compare

(Not an actual published release; this is the same code as the previous release v1.0.0-beta.13, just accidentally pushed as a new tag)

v1.0.0-beta.13

05 Sep 20:52
Compare
Choose a tag to compare

More work by @alecgibson on the under-development fetchSnapshot feature:

  • #237 - [feature] Expose snapshotType (current or byVersion) in readSnapshots middleware, based on whether fetch or fetchSnapshot is being called.
  • #242 - [bugfix] Close milestone database when calling Backend.close.
  • #244 - [refactor] Add a NoOpMilestoneDB implementation, used as default MilestoneDB
    • This introduces a technically backwards-incompatible change for the arguments passed when invoking the callback to MilestoneDB::saveMilestoneSnapshot. The callback was invoked with cb(error, wasSaved), and it's now invoked with cb(error).
    • This shouldn't affect any existing code, as the previous default implementation did not save milestone snapshots, and there are no actual implementations published.

v1.0.0-beta.12

17 Aug 21:16
Compare
Choose a tag to compare

Changes

  • #236 - Add milestone snapshots, which are persisted snapshots of documents at previous versions, used to speed up Backend#fetchSnapshot. (@alecgibson)

About MilestoneDB

This adds a new MilestoneDB class, which handles persisting milestone snapshots, with a default no-op base implementation. Methods:

  • MilestoneDB.getMilestoneSnapshot(collection, id, version, callback): void
  • MilestoneDB.saveMilestoneSnapshot(collection, snapshot, callback): void

To persist milestone snapshots:

  • Pass in a real implementation of MilestoneDB (to come later) when constructing Backend: new Backend({milestoneDb})
  • When constructing a real MilestoneDB, decide whether to save milestone snapshots by default for all collections:
    • Pass in the interval option to save milestone snapshots every interval versions by default.
    • Or don't pass the interval option to turn off saving of milestone snapshots by default.
  • For fine-grained control over when to save a milestone snapshot, register middleware on the 'commit' action and set the request.saveMilestoneSnapshot property to true or false to explicitly enable or disable milestone snapshot saving on that commit. If the property is left at its default value of null, then the default interval is used, if that was specified when constructing the MilestoneDB.

v1.0.0-beta.11

13 Aug 18:49
Compare
Choose a tag to compare

Changes

  • #220 - Add connection.fetchSnapshot(collection, id, version, callback): void method, for fetching a snapshot at a particular version. (@alecgibson)
    • See the README for more API documentation.
    • Performance note: This method could be slow if requesting a very large version number. ShareDB only stores the most recent snapshot, so this method internally fetches all ops up to the requested version and applies each op in sequence to get the snapshot.