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

Commit da66b1f

Browse files
authored
fix: stream issue, do not use isstream, use is-stream (#937)
* fix: stream issue, do not use isstream, use is-stream * fix: cli options test
1 parent dd245a8 commit da66b1f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"ipfs-unixfs-engine": "~0.22.0",
110110
"ipld-resolver": "~0.13.0",
111111
"is-ipfs": "^0.3.0",
112-
"isstream": "^0.1.2",
112+
"is-stream": "^1.1.0",
113113
"joi": "^10.6.0",
114114
"libp2p": "^0.11.0",
115115
"libp2p-floodsub": "~0.11.0",

src/core/components/files.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const pushable = require('pull-pushable')
1111
const toStream = require('pull-stream-to-stream')
1212
const toPull = require('stream-to-pull-stream')
1313
const waterfall = require('async/waterfall')
14-
const isStream = require('isstream')
14+
const isStream = require('is-stream')
1515
const Duplex = require('stream').Duplex
1616

1717
module.exports = function files (self) {
@@ -144,7 +144,7 @@ function normalizeContent (content) {
144144
}
145145

146146
// Readable stream input
147-
if (isStream.isReadable(data)) {
147+
if (isStream.readable(data)) {
148148
data = {
149149
path: '',
150150
content: toPull.source(data)
@@ -156,7 +156,7 @@ function normalizeContent (content) {
156156
data.content = pull.values([data.content])
157157
}
158158

159-
if (isStream.isReadable(data.content)) {
159+
if (isStream.readable(data.content)) {
160160
data.content = toPull.source(data.content)
161161
}
162162
}

test/cli/general.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
const expect = require('chai').expect
55
const runOnAndOff = require('../utils/on-and-off')
66

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

0 commit comments

Comments
 (0)