Skip to content

Commit

Permalink
fix: replace filestream with fast-blob-stream (#171)
Browse files Browse the repository at this point in the history
* fix: replace filestream fist fast-blob-stream
drops filereader dep and readable-stream dep

* chore: update dep
  • Loading branch information
ThaUnknown authored Jul 3, 2022
1 parent 3f6c3a4 commit d93a718
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const bencode = require('bencode')
const BlockStream = require('block-stream2')
const calcPieceLength = require('piece-length')
const corePath = require('path')
const FileReadStream = require('filestream/read')
const { BlobReadStream } = require('fast-blob-stream')
const isFile = require('is-file')
const junk = require('junk')
const MultiStream = require('multistream')
Expand Down Expand Up @@ -414,7 +414,7 @@ function isReadable (obj) {
* @return {function}
*/
function getBlobStream (file) {
return () => new FileReadStream(file)
return () => new BlobReadStream(file)
}

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"dependencies": {
"bencode": "^2.0.3",
"block-stream2": "^2.1.0",
"filestream": "^5.0.0",
"fast-blob-stream": "^1.0.3",
"is-file": "^1.0.0",
"junk": "^3.1.0",
"minimist": "^1.2.5",
Expand Down

0 comments on commit d93a718

Please sign in to comment.