Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

chore: test against go-ipfs 0.4.13 #638

Merged
merged 3 commits into from
Dec 1, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -43,7 +43,7 @@
"peer-id": "~0.10.3",
"peer-info": "~0.11.3",
"promisify-es6": "^1.0.3",
"pump": "^2.0.0",
"pump": "^1.0.3",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@keks @richardschneider this was the culprit! Apologies for taking from your time

"pull-defer": "^0.2.2",
"pull-pushable": "^2.1.1",
"qs": "^6.5.1",
Expand Down
14 changes: 5 additions & 9 deletions src/utils/send-files-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ module.exports = (send, path) => {
let request
let ended = false
let writing = false

if (!options) {
options = {}
}

options = options || {}

const multipart = new Multipart()

Expand All @@ -45,8 +43,8 @@ module.exports = (send, path) => {
retStream._write = (file, enc, _next) => {
const next = once(_next)
try {
const files = prepareFile(file, Object.assign({}, options, options.qs)).map(
(file) => Object.assign({headers: headers(file)}, file))
const files = prepareFile(file, Object.assign({}, options, options.qs))
.map((file) => Object.assign({headers: headers(file)}, file))

writing = true
eachSeries(
Expand Down Expand Up @@ -117,9 +115,7 @@ module.exports = (send, path) => {
}

if (!response) {
// no response object, which means
// everything is ok, so we end the
// return stream
// no response, which means everything is ok, so we end the retStream
return retStream.push(null) // early
}

Expand Down