-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: replace into-stream
to Readable.from
#290
Conversation
lib/utils.js
Outdated
} | ||
|
||
// Iterator | ||
if (typeof payload === 'object' && typeof payload[Symbol.iterator] === 'function' && !isBuffer) { |
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.
Mayba add fast path if Buffer...
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 doesn't provides any goods but one more branch and ===
check.
Co-authored-by: Aras Abbasi <[email protected]> Signed-off-by: KaKa <[email protected]>
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
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.
Looks good to me
"mime-db": "^1.52.0", | ||
"minipass": "^7.0.2", | ||
"peek-stream": "^1.1.3", | ||
"pump": "^3.0.0", | ||
"pumpify": "^2.0.1" | ||
"pumpify": "^2.0.1", | ||
"readable-stream": "^4.5.2" |
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.
Not blocking but I just don't see the reason for adding readable-stream if the test suit is passing without it, I remember PRs that removed that package being merged as well
I get the stability argument, however with the same point of view one could say that any part of node's API can change in a breaking manner between major versions, no? Then why not install every single built-in module as a package?
But maybe readable-stream is special, so just asking to learn
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.
We can ensure that bugs in streams not solved in older node versions, like in node14, are not affecting our implementation.
@climba03003 I checked out this PR. New test case is failing at my local env. Not sure, why it is passed successfully in pipeline. |
Fixes #228
Closes #288
Checklist
npm run test
andnpm run benchmark
and the Code of conduct