-
Notifications
You must be signed in to change notification settings - Fork 20
End export stream on completion. #47
End export stream on completion. #47
Conversation
aeb91e3
to
1d9f043
Compare
@diasdavid @nginnever ping for cr |
1d9f043
to
879f9a8
Compare
This also includes directories in the Exporter. Previously they were omitted (unless the dir had no links), which is unlike go-ipfs, which includes the directories every time. I can split this change into a separate PR if it's easier to review! |
38063d1
to
461c500
Compare
ping @diasdavid @nginnever |
Readable.call(this, { objectMode: true }) | ||
|
||
this.options = options || {} | ||
|
||
this._read = (n) => {} | ||
|
||
let fileExporter = (node, name, callback) => { | ||
let fileExporter = (node, name, done) => { | ||
let init |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we initialize this to false so that L47 and L59 can be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure! Done.
This LGTM, just a few little comments. I also tried testing this in js-ipfs |
This looks good, having the hash prepended kind of grew on me :) Thank you! |
I noticed that the Exporter stream doesn't actually end. This PR fixes that and also adds tests that removes this assumption, and also some timing assumptions. It also cleans up the overall DAG traversal logic.
I also switched us over to
concat-stream
frombl
, just because the former handles object streams nicely too.