New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ipfs-bitswap

Package Overview
Dependencies
Maintainers
6
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipfs-bitswap - npm Package Compare versions

Comparing version 12.0.3 to 12.0.4

2

package.json
{
"name": "ipfs-bitswap",
"version": "12.0.3",
"version": "12.0.4",
"description": "JavaScript implementation of the Bitswap data exchange protocol used by IPFS",

@@ -5,0 +5,0 @@ "license": "Apache-2.0 OR MIT",

@@ -242,20 +242,4 @@ import * as lp from 'it-length-prefixed'

/** @type {Uint8Array} */
let serialized
switch (stream.stat.protocol) {
case BITSWAP100:
serialized = msg.serializeToBitswap100()
break
case BITSWAP110:
case BITSWAP120:
serialized = msg.serializeToBitswap110()
break
default:
throw new Error('Unknown protocol: ' + stream.stat.protocol)
}
await writeMessage(stream, msg, this._log)
await writeMessage(stream, serialized, this._log)
stream.close()
this._updateSentStats(peer, msg.blocks)

@@ -301,3 +285,3 @@ }

* @param {Stream} stream
* @param {Uint8Array} msg
* @param {Message} msg
* @param {*} log

@@ -307,4 +291,18 @@ */

try {
/** @type {Uint8Array} */
let serialized
switch (stream.stat.protocol) {
case BITSWAP100:
serialized = msg.serializeToBitswap100()
break
case BITSWAP110:
case BITSWAP120:
serialized = msg.serializeToBitswap110()
break
default:
throw new Error('Unknown protocol: ' + stream.stat.protocol)
}
await pipe(
[msg],
[serialized],
lp.encode(),

@@ -315,3 +313,5 @@ stream

log(err)
} finally {
stream.close()
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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