sharedb 3.3.0 → 3.3.2
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.
- package/CHANGELOG.md +44 -0
- package/package.json +2 -2
- package/test/milestone-db.js +8 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
## v2.0
|
|
2
|
+
|
|
3
|
+
### Breaking changes
|
|
4
|
+
|
|
5
|
+
* Drop Node.js v10 support
|
|
6
|
+
|
|
7
|
+
## v1.0-beta
|
|
8
|
+
|
|
9
|
+
### Breaking changes
|
|
10
|
+
|
|
11
|
+
* Add options argument to all public database adapter methods that read
|
|
12
|
+
or write from snapshots or ops.
|
|
13
|
+
|
|
14
|
+
* DB methods that get snapshots or ops no longer return metadata unless
|
|
15
|
+
`{metadata: true}` option is passed.
|
|
16
|
+
|
|
17
|
+
* Replace `source` argument with `options` in doc methods. Use `options.source`
|
|
18
|
+
instead.
|
|
19
|
+
|
|
20
|
+
* Backend streams now write objects intead of strings.
|
|
21
|
+
|
|
22
|
+
* MemoryDB.prototype._querySync now returns `{snapshots: ..., extra: ...}`
|
|
23
|
+
instead of just an array of snapshots.
|
|
24
|
+
|
|
25
|
+
### Non-breaking changes
|
|
26
|
+
|
|
27
|
+
* Add options argument to backend.submit.
|
|
28
|
+
|
|
29
|
+
* Add error codes to all errors.
|
|
30
|
+
|
|
31
|
+
* Add `'updated'` event on queries which fires on all query result changes.
|
|
32
|
+
|
|
33
|
+
* In clients, wrap errors in Error objects to they get passed through event
|
|
34
|
+
emitters.
|
|
35
|
+
|
|
36
|
+
* Sanitize stack traces when sending errors to client, but log them on the
|
|
37
|
+
server.
|
|
38
|
+
|
|
39
|
+
## v0.11.37
|
|
40
|
+
|
|
41
|
+
Beginning of changelog.
|
|
42
|
+
|
|
43
|
+
If you're upgrading from ShareJS 0.7 or earlier,
|
|
44
|
+
take a look at the [ShareJS upgrade guide](docs/upgrading-from-sharejs.md).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sharedb",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2",
|
|
4
4
|
"description": "JSON OT database backend",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"dependencies": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"ot-json0-v2": "https://github.com/ottypes/json0#90a3ae26364c4fa3b19b6df34dad46707a704421",
|
|
22
22
|
"ot-json1": "^0.3.0",
|
|
23
23
|
"rich-text": "^4.1.0",
|
|
24
|
-
"sharedb-legacy": "npm:sharedb
|
|
24
|
+
"sharedb-legacy": "npm:sharedb@1.1.0",
|
|
25
25
|
"sinon": "^9.2.4"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
package/test/milestone-db.js
CHANGED
|
@@ -576,8 +576,10 @@ module.exports = function(options) {
|
|
|
576
576
|
});
|
|
577
577
|
|
|
578
578
|
it('only stores even-numbered versions', function(done) {
|
|
579
|
-
|
|
580
|
-
|
|
579
|
+
var snapshotCount = 0;
|
|
580
|
+
db.on('save', function() {
|
|
581
|
+
snapshotCount++;
|
|
582
|
+
if (snapshotCount < 2) return;
|
|
581
583
|
|
|
582
584
|
async.waterfall([
|
|
583
585
|
db.getMilestoneSnapshot.bind(db, 'books', 'catcher-in-the-rye', 1),
|
|
@@ -619,8 +621,10 @@ module.exports = function(options) {
|
|
|
619
621
|
callback();
|
|
620
622
|
});
|
|
621
623
|
|
|
622
|
-
|
|
623
|
-
|
|
624
|
+
var snapshotCount = 0;
|
|
625
|
+
db.on('save', function() {
|
|
626
|
+
snapshotCount++;
|
|
627
|
+
if (snapshotCount < 2) return;
|
|
624
628
|
|
|
625
629
|
async.waterfall([
|
|
626
630
|
db.getMilestoneSnapshot.bind(db, 'books', 'catcher-in-the-rye', 1),
|