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

chore: move mfs and multipart files into core #2811

Merged
merged 23 commits into from
Mar 19, 2020
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
28fea6a
chore: move mfs files into core
achingbrain Feb 29, 2020
25d9a05
chore: start to fix up http tests
achingbrain Mar 13, 2020
11a15cd
chore: fix paths
achingbrain Mar 13, 2020
70e02a5
fix: http interface tests passing against js-ipfs
achingbrain Mar 14, 2020
88c6b0d
chore: almost all the http tests passing against go-ipfs
achingbrain Mar 14, 2020
57180ba
fix: tests passing against go-ipfs
achingbrain Mar 14, 2020
bc9d702
fix: interop tests passing with js-ipfs too
achingbrain Mar 15, 2020
0812670
fix: fix up tests
achingbrain Mar 16, 2020
35d285f
fix: skip test that breaks go-ipfs
achingbrain Mar 16, 2020
dcd5b9b
chore: make multipart parser one file
achingbrain Mar 17, 2020
78a3d80
chore: move parser into core
achingbrain Mar 17, 2020
803873c
chore: merge multipart into core
achingbrain Mar 17, 2020
ca118e3
chore: add missing dep
achingbrain Mar 17, 2020
aa6b3de
chore: update packages/ipfs-utils/src/http.js
achingbrain Mar 18, 2020
ee6f28f
chore: replace hat with nanoid
achingbrain Mar 18, 2020
45f6b6f
chore: replace crypto with iso-random-stream
achingbrain Mar 18, 2020
fc3fa4e
chore: remove use of assert
achingbrain Mar 18, 2020
566d106
fix: abort request on request body error
achingbrain Mar 18, 2020
064cacb
chore: add missing deps and fix linting
achingbrain Mar 18, 2020
1555443
chore: revert streaming body error handling
achingbrain Mar 18, 2020
f912060
fix: remove unused dep
achingbrain Mar 19, 2020
36193d8
fix: pin aegir version until ipfs/aegir#533 is fixed
achingbrain Mar 19, 2020
3d0c8a2
fix skip tests broken by node-fetch
achingbrain Mar 19, 2020
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
5 changes: 3 additions & 2 deletions packages/interface-ipfs-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"dependencies": {
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"chai-things": "^0.2.0",
"chai-subset": "^1.6.0",
"cids": "^0.7.3",
"delay": "^4.3.0",
"dirty-chai": "^2.0.1",
Expand All @@ -52,7 +52,8 @@
"multihashes": "^0.4.14",
"multihashing-async": "^0.8.0",
"peer-id": "^0.13.5",
"readable-stream": "^3.4.0"
"readable-stream": "^3.4.0",
"temp-write": "^4.0.0"
},
"devDependencies": {
"aegir": "^21.3.0",
Expand Down
9 changes: 3 additions & 6 deletions packages/interface-ipfs-core/src/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
const { fixtures } = require('./utils')
const { Readable } = require('readable-stream')
const all = require('it-all')
const last = require('it-last')
const fs = require('fs')
const os = require('os')
const path = require('path')
Expand All @@ -13,7 +14,6 @@ const urlSource = require('ipfs-utils/src/files/url-source')
const { isNode } = require('ipfs-utils/src/env')
const { getDescribe, getIt, expect } = require('./utils/mocha')
const { echoUrl, redirectUrl } = require('./utils/echo-http-server')

const fixturesPath = path.join(__dirname, '..', 'test', 'fixtures')

/** @typedef { import("ipfsd-ctl/src/factory") } Factory */
Expand Down Expand Up @@ -221,9 +221,8 @@ module.exports = (common, options) => {
emptyDir('files/empty')
]

const res = await all(ipfs.add(dirs))
const root = await last(ipfs.add(dirs))

const root = res[res.length - 1]
expect(root.path).to.equal('test-folder')
expect(root.cid.toString()).to.equal(fixtures.directory.cid)
})
Expand Down Expand Up @@ -258,9 +257,7 @@ module.exports = (common, options) => {
accumProgress += p
}

const filesAdded = await all(ipfs.add(dirs, { progress: handler }))

const root = filesAdded[filesAdded.length - 1]
const root = await last(ipfs.add(dirs, { progress: handler }))
expect(progCalled).to.be.true()
expect(accumProgress).to.be.at.least(total)
expect(root.path).to.equal('test-folder')
Expand Down
Loading