Socket
Socket
Sign inDemoInstall

webtorrent

Package Overview
Dependencies
Maintainers
0
Versions
529
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webtorrent - npm Package Compare versions

Comparing version 2.4.15 to 2.5.0

13

lib/torrent.js

@@ -13,3 +13,3 @@ import EventEmitter from 'events'

import Discovery from 'torrent-discovery'
import FSChunkStore from 'fs-chunk-store' // browser: `hybrid-chunk-store`
import FSChunkStore from 'fs-chunk-store' // browser: `fsa-chunk-store`
import fetch from 'cross-fetch-ponyfill'

@@ -19,3 +19,2 @@ import ImmediateChunkStore from 'immediate-chunk-store'

import MemoryChunkStore from 'memory-chunk-store'
import HybridChunkStore from 'hybrid-chunk-store'
import joinIterator from 'join-async-iterator'

@@ -63,2 +62,8 @@ import parallel from 'run-parallel'

// if nodejs or browser that supports FSA
const SUPPORTS_FSA = globalThis.navigator?.storage?.getDirectory && globalThis.FileSystemFileHandle?.prototype?.createWritable
const FALLBACK_STORE = !process.browser || SUPPORTS_FSA
? FSChunkStore // Node or browser with FSA
: MemoryChunkStore
let TMP

@@ -87,3 +92,3 @@ try {

this.skipVerify = !!opts.skipVerify
this._store = opts.store || FSChunkStore
this._store = opts.store || FALLBACK_STORE
this._preloadedStore = opts.preloadedStore || null

@@ -545,3 +550,3 @@ this._storeCacheSlots = opts.storeCacheSlots !== undefined ? opts.storeCacheSlots : 20

// don't use the cache if the store is already in memory
if (this._storeCacheSlots > 0 && !(rawStore instanceof MemoryChunkStore || rawStore instanceof HybridChunkStore)) {
if (this._storeCacheSlots > 0 && !(rawStore instanceof MemoryChunkStore)) {
rawStore = new CacheChunkStore(rawStore, {

@@ -548,0 +553,0 @@ max: this._storeCacheSlots

{
"name": "webtorrent",
"description": "Streaming torrent client",
"version": "2.4.15",
"version": "2.5.0",
"author": {

@@ -18,3 +18,3 @@ "name": "WebTorrent LLC",

"fs": false,
"fs-chunk-store": "hybrid-chunk-store",
"fs-chunk-store": "fsa-chunk-store",
"http": false,

@@ -56,3 +56,3 @@ "load-ip-set": false,

"fs-chunk-store": "^4.1.0",
"hybrid-chunk-store": "^1.2.6",
"fsa-chunk-store": "^1.3.0",
"immediate-chunk-store": "^2.2.0",

@@ -59,0 +59,0 @@ "join-async-iterator": "^1.1.1",

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

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

Sorry, the diff of this file is not supported yet

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