Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hyperbee

Package Overview
Dependencies
Maintainers
2
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperbee - npm Package Compare versions

Comparing version 2.13.1 to 2.13.2

15

index.js

@@ -295,2 +295,3 @@ const codecs = require('codecs')

this._view = !!opts._view
this._updated = false

@@ -452,3 +453,3 @@ this._onappendBound = this._view ? null : this._onappend.bind(this)

// TODO: better if we could encapsulate this in hypercore in the future
return this._checkout <= this.core.length ? this.core.snapshot() : this.core.session()
return (this._checkout <= this.core.length || this._checkout <= 1) ? this.core.snapshot() : this.core.session()
}

@@ -461,3 +462,3 @@

? this.core
: version <= this.core.length ? this.core.snapshot() : this.core.session()
: (version <= this.core.length || version <= 1) ? this.core.snapshot() : this.core.session()

@@ -478,3 +479,3 @@ return new Hyperbee(snap, {

snapshot (opts) {
return this.checkout(this.version, opts)
return this.checkout(Math.max(1, this.version), opts)
}

@@ -567,2 +568,3 @@

this.shouldUpdate = this.options.update !== false
this.updating = null
this.encoding = {

@@ -597,3 +599,6 @@ key: options.keyEncoding ? codecs(options.keyEncoding) : tree.keyEncoding,

}
if (this.tree._checkout === 0 && this.shouldUpdate) await this.core.update()
if (this.tree._checkout === 0 && this.shouldUpdate) {
if (this.updating === null) this.updating = this.core.update()
await this.updating
}
if (this.version < 2) return null

@@ -1358,3 +1363,3 @@ return (await this.getBlock(this.version - 1)).getTreeNode(0)

function defaultDiffer (currentSnap, previousSnap, opts) {
return currentSnap.createDiffStream(previousSnap.version, opts)
return currentSnap.createDiffStream(previousSnap, opts)
}

@@ -1361,0 +1366,0 @@

{
"name": "hyperbee",
"version": "2.13.1",
"version": "2.13.2",
"description": "An append-only B-tree running on a Hypercore.",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc