corestore 7.10.1 → 7.11.1

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.
Files changed (3) hide show
  1. package/README.md +1 -0
  2. package/index.js +5 -4
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -46,6 +46,7 @@ Options:
46
46
  {
47
47
  primaryKey: null, // The primary key to use as the master key for key derivation.
48
48
  writable: true,
49
+ treeCache: { maxSize: 8192 } // Options to use when creating hypercore's default storage
49
50
  }
50
51
  ```
51
52
 
package/index.js CHANGED
@@ -243,7 +243,8 @@ class Corestore extends ReadyResource {
243
243
  id: opts.id,
244
244
  allowBackup: opts.allowBackup,
245
245
  readOnly: opts.readOnly,
246
- wait: opts.wait
246
+ wait: opts.wait,
247
+ treeCache: opts.treeCache
247
248
  })
248
249
  this.streamTracker = this.root ? this.root.streamTracker : new StreamTracker()
249
250
  this.cores = this.root ? this.root.cores : new CoreTracker()
@@ -294,13 +295,13 @@ class Corestore extends ReadyResource {
294
295
  }
295
296
  }
296
297
 
297
- _onGroupActive(topic) {
298
- this.emit('group-active', topic)
298
+ _onGroupActive(topic, update) {
299
+ this.emit('group-active', topic, update)
299
300
 
300
301
  const topicHex = b4a.toString(topic, 'hex')
301
302
  const handles = this._groupNotifiers.get(topicHex)
302
303
  if (!handles) return
303
- for (const handle of handles) handle.emit('update')
304
+ for (const handle of handles) handle.emit('update', update)
304
305
  }
305
306
 
306
307
  notifyGroup(topic) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "corestore",
3
- "version": "7.10.1",
3
+ "version": "7.11.1",
4
4
  "description": "A Hypercore factory that simplifies managing collections of cores.",
5
5
  "main": "index.js",
6
6
  "files": [