-
Notifications
You must be signed in to change notification settings - Fork 9
Conversation
8b9776b
to
1baa183
Compare
src/parser.js
Outdated
|
||
if (isDirectory(partHeader.mime)) { | ||
// consume data from stream so we move on to the next header/part | ||
part.on('data', () => {}) |
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.
It looks like we're calling part.on('data', () => {})
for every header
src/parser.js
Outdated
|
||
if (partHeader.mime === applicationSymlink) { | ||
// consume data from stream so we move on to the next header/part | ||
part.on('data', () => {}) |
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.
Same here, should part.on('data')
only be called once rather than for every header?
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.
I could be doing it wrong but in my testing I noticed that setting up a noop for the data
event for all headers caused data to start being read before the calling code had a chance to set a listener up for data from part.content
.
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.
Actually I think there might be a better way, will update this PR today or tomorrow.
1baa183
to
79c916f
Compare
bbce927
to
77438e7
Compare
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.
LGTM 👍
BREAKING CHANGE: This module used to export a class that extended EventEmitter, now it exports a function that returns an async iterable. I also updated the deps to use the latest http api, though it's removed the ability to add whole paths at once, along with some special logic to handle symlinks. The `Dicer` module that this module depends on will still emit events for when it encounters symlinks so I left the handlers in though am unsure if we actually use them.
77438e7
to
cddea6c
Compare
@hugomrdias can has merge and release please 🙏 |
But |
Sorry, I should have updated the message above. I was turning Dicer into an async iterable with the event-iterator module but I kept seeing the Because of the range of events Dicer emits (instead of just |
BREAKING CHANGE: This module used to export a class that extended EventEmitter, now it exports a function that returns an async iterable.
I also updated the deps to use the latest http api, though it's removed the ability to add whole paths at once, along with some special logic to handle symlinks. The
Dicer
module that this module depends on will still emit events for when it encounters symlinks so I left the handlers in though am unsure if we actually use them.