Skip to content
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

Merged
merged 14 commits into from
Mar 29, 2024
Merged

Conversation

climba03003
Copy link
Member

@climba03003 climba03003 commented Mar 29, 2024

Fixes #228
Closes #288

Checklist

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
lib/utils.js Outdated Show resolved Hide resolved
lib/utils.js Outdated
}

// Iterator
if (typeof payload === 'object' && typeof payload[Symbol.iterator] === 'function' && !isBuffer) {
Copy link
Contributor

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...

Copy link
Member Author

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.

lib/utils.js Outdated Show resolved Hide resolved
lib/utils.js Outdated Show resolved Hide resolved
lib/utils.js Outdated Show resolved Hide resolved
climba03003 and others added 3 commits March 29, 2024 22:27
Copy link
Contributor

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@gurgunday gurgunday left a 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"
Copy link
Member

@gurgunday gurgunday Mar 29, 2024

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

Copy link
Contributor

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.

@Uzlopak Uzlopak merged commit 848be9d into master Mar 29, 2024
21 checks passed
@Uzlopak Uzlopak deleted the replace-into-stream branch March 29, 2024 18:05
@stanleyxu2005
Copy link
Contributor

@climba03003 I checked out this PR. New test case is failing at my local env. Not sure, why it is passed successfully in pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants