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

fix(ext/node): fix duplexify compatibility #21346

Merged
merged 1 commit into from Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -287,8 +287,6 @@ const { Blob } = require('buffer');
duplex.write('test');
}

/*
TODO(kt3k): Enable this test case
{
const through = new PassThrough({ objectMode: true });

Expand All @@ -309,7 +307,6 @@ TODO(kt3k): Enable this test case
assert.strictEqual(res, 'foobar');
})).on('close', common.mustCall());
}
*/

function makeATestReadableStream(value) {
return new ReadableStream({
Expand Down
3 changes: 1 addition & 2 deletions ext/node/polyfills/_stream.mjs
Expand Up @@ -4474,6 +4474,7 @@ var require_duplexify = __commonJS({
readable: false,
});
}

if (typeof body === "function") {
const { value, write, final, destroy } = fromAsyncGen(body);
if (isIterable(value)) {
Expand Down Expand Up @@ -4669,8 +4670,6 @@ var require_duplexify = __commonJS({
cb(err);
} else if (err) {
d.destroy(err);
} else if (!readable && !writable) {
d.destroy();
}
}
d = new Duplexify({
Expand Down