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

fix: stream issue, do not use isstream, use is-stream #937

Merged
merged 2 commits into from
Jul 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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