hypercore 11.0.13 → 11.0.14

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/index.js CHANGED
@@ -342,7 +342,7 @@ class Hypercore extends EventEmitter {
342
342
  this._setupSession(parent)
343
343
  }
344
344
 
345
- if (opts.exclusive) {
345
+ if (opts.exclusive && opts.writable !== false) {
346
346
  this.exclusive = true
347
347
  await this.core.lockExclusive()
348
348
  }
@@ -555,7 +555,8 @@ module.exports = class SessionState {
555
555
  return
556
556
  }
557
557
 
558
- if (b.start !== p.start + p.length) {
558
+ const start = p.truncated === -1 ? p.start : p.truncated
559
+ if (b.start !== start + p.length) {
559
560
  throw INVALID_OPERATION('Atomic operations must be contiguous')
560
561
  }
561
562
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore",
3
- "version": "11.0.13",
3
+ "version": "11.0.14",
4
4
  "description": "Hypercore is a secure, distributed append-only log",
5
5
  "main": "index.js",
6
6
  "scripts": {