Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
fix: stream issue, do not use isstream, use is-stream (#937)
Browse files Browse the repository at this point in the history
* fix: stream issue, do not use isstream, use is-stream

* fix: cli options test
  • Loading branch information
daviddias authored Jul 26, 2017
1 parent dd245a8 commit da66b1f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"ipfs-unixfs-engine": "~0.22.0",
"ipld-resolver": "~0.13.0",
"is-ipfs": "^0.3.0",
"isstream": "^0.1.2",
"is-stream": "^1.1.0",
"joi": "^10.6.0",
"libp2p": "^0.11.0",
"libp2p-floodsub": "~0.11.0",
Expand Down
6 changes: 3 additions & 3 deletions src/core/components/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const pushable = require('pull-pushable')
const toStream = require('pull-stream-to-stream')
const toPull = require('stream-to-pull-stream')
const waterfall = require('async/waterfall')
const isStream = require('isstream')
const isStream = require('is-stream')
const Duplex = require('stream').Duplex

module.exports = function files (self) {
Expand Down Expand Up @@ -144,7 +144,7 @@ function normalizeContent (content) {
}

// Readable stream input
if (isStream.isReadable(data)) {
if (isStream.readable(data)) {
data = {
path: '',
content: toPull.source(data)
Expand All @@ -156,7 +156,7 @@ function normalizeContent (content) {
data.content = pull.values([data.content])
}

if (isStream.isReadable(data.content)) {
if (isStream.readable(data.content)) {
data.content = toPull.source(data.content)
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/cli/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
const expect = require('chai').expect
const runOnAndOff = require('../utils/on-and-off')

describe('general cli options', () => runOnAndOff((thing) => {
describe('general cli options', () => runOnAndOff.off((thing) => {
it('should handle --quiet flag', () => {
return thing.ipfs('help --quiet').then((out) => {
expect(out).to.be.empty()
Expand Down

0 comments on commit da66b1f

Please sign in to comment.