Skip to content
This repository was archived by the owner on Sep 28, 2021. It is now read-only.

Commit ba6a6dd

Browse files
authored
chore: upgrade dependencies (#13)
1 parent 076fde3 commit ba6a6dd

File tree

4 files changed

+28
-28
lines changed

4 files changed

+28
-28
lines changed

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,24 @@
3131
},
3232
"homepage": "https://github.com/ipfs/js-ipfs-http-response#readme",
3333
"dependencies": {
34-
"async": "^2.6.0",
35-
"cids": "~0.5.5",
36-
"debug": "^3.1.0",
34+
"async": "^2.6.1",
35+
"cids": "~0.5.7",
36+
"debug": "^4.1.1",
3737
"file-type": "^8.0.0",
3838
"filesize": "^3.6.1",
3939
"get-stream": "^3.0.0",
40-
"ipfs-unixfs": "~0.1.14",
41-
"mime-types": "^2.1.18",
42-
"multihashes": "~0.4.13",
40+
"ipfs-unixfs": "~0.1.16",
41+
"mime-types": "^2.1.21",
42+
"multihashes": "~0.4.14",
4343
"promisify-es6": "^1.0.3",
4444
"stream-to-blob": "^1.0.1"
4545
},
4646
"devDependencies": {
47-
"aegir": "^13.1.0",
48-
"chai": "^4.1.2",
47+
"aegir": "^18.0.3",
48+
"chai": "^4.2.0",
4949
"dirty-chai": "^2.0.1",
50-
"ipfs": "~0.32.2",
51-
"ipfsd-ctl": "~0.39.1"
50+
"ipfs": "0.34.0",
51+
"ipfsd-ctl": "~0.40.3"
5252
},
5353
"contributors": [
5454
"Alex Potsides <alex@achingbrain.net>",

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const response = (ipfsNode, ipfsPath) => {
6262

6363
resolver.cid(ipfsNode, ipfsPath)
6464
.then((resolvedData) => {
65-
const readableStream = ipfsNode.files.catReadableStream(resolvedData.cid)
65+
const readableStream = ipfsNode.catReadableStream(resolvedData.cid)
6666
const responseStream = new stream.PassThrough({ highWaterMark: 1 })
6767
readableStream.pipe(responseStream)
6868

test/index.spec.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ describe('resolve file (CIDv0)', function () {
3535
ipfsd = _ipfsd
3636
ipfs = ipfsd.api
3737

38-
ipfs.files.add(file.data, {cidVersion: 0}, (err, filesAdded) => {
38+
ipfs.add(file.data, { cidVersion: 0 }, (err, filesAdded) => {
3939
expect(err).to.not.exist()
4040
expect(filesAdded).to.have.length(1)
4141

4242
const retrievedFile = filesAdded[0]
4343
expect(new CID(retrievedFile.hash)).to.deep.equal(new CID(file.cid))
44-
expect(retrievedFile.size, 'ipfs.files.add result size should not be smaller than input buffer').greaterThan(file.data.length)
44+
expect(retrievedFile.size, 'ipfs.add result size should not be smaller than input buffer').greaterThan(file.data.length)
4545

4646
done()
4747
})
@@ -79,12 +79,12 @@ describe('resolve file (CIDv1)', function () {
7979
ipfsd = _ipfsd
8080
ipfs = ipfsd.api
8181

82-
ipfs.files.add(file.data, {cidVersion: 1}, (err, filesAdded) => {
82+
ipfs.add(file.data, { cidVersion: 1 }, (err, filesAdded) => {
8383
expect(err).to.not.exist()
8484
expect(filesAdded).to.have.length(1)
8585
const retrievedFile = filesAdded[0]
8686
expect(new CID(retrievedFile.hash)).to.deep.equal(new CID(file.cid))
87-
// expect(retrievedFile.size, 'ipfs.files.add result size should not be smaller than input buffer').greaterThan(file.data.length)
87+
// expect(retrievedFile.size, 'ipfs.add result size should not be smaller than input buffer').greaterThan(file.data.length)
8888

8989
done()
9090
})
@@ -135,15 +135,15 @@ describe('resolve directory (CIDv0)', function () {
135135
content('holmes.txt')
136136
]
137137

138-
ipfs.files.add(dirs, {cidVersion: 0}, (err, res) => {
138+
ipfs.add(dirs, { cidVersion: 0 }, (err, res) => {
139139
expect(err).to.not.exist()
140140
const root = res[res.length - 1]
141141

142142
expect(root.path).to.equal('test-folder')
143143
expect(new CID(root.hash)).to.deep.equal(new CID(directory.cid))
144144

145-
expect(res[0].size, 'ipfs.files.add 1st result size should not be smaller than 1st input buffer').greaterThan(dirs[0].content.length)
146-
expect(res[1].size, 'ipfs.files.add 2nd result size should not be smaller than 2nd input buffer').greaterThan(dirs[1].content.length)
145+
expect(res[0].size, 'ipfs.add 1st result size should not be smaller than 1st input buffer').greaterThan(dirs[0].content.length)
146+
expect(res[1].size, 'ipfs.add 2nd result size should not be smaller than 2nd input buffer').greaterThan(dirs[1].content.length)
147147

148148
done()
149149
})
@@ -207,7 +207,7 @@ describe('resolve directory (CIDv1)', function () {
207207
content('holmes.txt')
208208
]
209209

210-
ipfs.files.add(dirs, {cidVersion: 1}, (err, res) => {
210+
ipfs.add(dirs, { cidVersion: 1 }, (err, res) => {
211211
expect(err).to.not.exist()
212212
const root = res[res.length - 1]
213213
expect(root.path).to.equal('test-folder')
@@ -278,7 +278,7 @@ describe('resolve web page (CIDv0)', function () {
278278
content('index.html')
279279
]
280280

281-
ipfs.files.add(dirs, {cidVersion: 0}, (err, res) => {
281+
ipfs.add(dirs, { cidVersion: 0 }, (err, res) => {
282282
expect(err).to.not.exist()
283283
const root = res[res.length - 1]
284284

@@ -330,7 +330,7 @@ describe('resolve web page (CIDv1)', function () {
330330
content('index.html')
331331
]
332332

333-
ipfs.files.add(dirs, {cidVersion: 1}, (err, res) => {
333+
ipfs.add(dirs, { cidVersion: 1 }, (err, res) => {
334334
expect(err).to.not.exist()
335335
const root = res[res.length - 1]
336336
expect(root.path).to.equal('test-site')
@@ -386,7 +386,7 @@ describe('mime-types', () => {
386386
content('index.html')
387387
]
388388

389-
ipfs.files.add(dirs, {cidVersion: 0}, (err, res) => {
389+
ipfs.add(dirs, { cidVersion: 0 }, (err, res) => {
390390
expect(err).to.not.exist()
391391
const root = res[res.length - 1]
392392

test/resolver.spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('resolve file (CIDv0)', function () {
3232
ipfsd = _ipfsd
3333
ipfs = ipfsd.api
3434

35-
ipfs.files.add(file.data, {cidVersion: 0}, (err, filesAdded) => {
35+
ipfs.add(file.data, { cidVersion: 0 }, (err, filesAdded) => {
3636
expect(err).to.not.exist()
3737
expect(filesAdded).to.have.length(1)
3838

@@ -81,7 +81,7 @@ describe('resolve file (CIDv1)', function () {
8181
ipfsd = _ipfsd
8282
ipfs = ipfsd.api
8383

84-
ipfs.files.add(file.data, {cidVersion: 1}, (err, filesAdded) => {
84+
ipfs.add(file.data, { cidVersion: 1 }, (err, filesAdded) => {
8585
expect(err).to.not.exist()
8686
expect(filesAdded).to.have.length(1)
8787
// console.log('ipfs.files.add result', filesAdded)
@@ -143,7 +143,7 @@ describe('resolve directory (CIDv0)', function () {
143143
content('holmes.txt')
144144
]
145145

146-
ipfs.files.add(dirs, {cidVersion: 0}, (err, res) => {
146+
ipfs.add(dirs, { cidVersion: 0 }, (err, res) => {
147147
expect(err).to.not.exist()
148148
const root = res[res.length - 1]
149149

@@ -201,7 +201,7 @@ describe('resolve directory (CIDv1)', function () {
201201
content('holmes.txt')
202202
]
203203

204-
ipfs.files.add(dirs, {cidVersion: 1}, (err, res) => {
204+
ipfs.add(dirs, { cidVersion: 1 }, (err, res) => {
205205
expect(err).to.not.exist()
206206
const root = res[res.length - 1]
207207
// console.log('ipfs.files.add result', res)
@@ -264,7 +264,7 @@ describe('resolve web page (CIDv0)', function () {
264264
content('index.html')
265265
]
266266

267-
ipfs.files.add(dirs, {cidVersion: 0}, (err, res) => {
267+
ipfs.add(dirs, { cidVersion: 0 }, (err, res) => {
268268
expect(err).to.not.exist()
269269
const root = res[res.length - 1]
270270

@@ -326,7 +326,7 @@ describe('resolve web page (CIDv1)', function () {
326326
content('index.html')
327327
]
328328

329-
ipfs.files.add(dirs, {cidVersion: 1}, (err, res) => {
329+
ipfs.add(dirs, { cidVersion: 1 }, (err, res) => {
330330
expect(err).to.not.exist()
331331
// console.log(res)
332332
const root = res[res.length - 1]

0 commit comments

Comments
 (0)