Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
stream,zlib: do not use _stream_* anymore
PR-URL: #36618
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
  • Loading branch information
mcollina authored and aduh95 committed Dec 29, 2020
commit e57d8af7e2890b03d865c6edac279e234c43b0ae
2 changes: 1 addition & 1 deletion lib/internal/streams/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ function pipeline(...streams) {
}
} else {
if (!PassThrough) {
PassThrough = require('_stream_passthrough');
PassThrough = require('internal/streams/passthrough');
}

// If the last argument to pipeline is not a stream
Expand Down
3 changes: 1 addition & 2 deletions lib/zlib.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const {
},
hideStackFrames
} = require('internal/errors');
const Transform = require('_stream_transform');
const { Transform, finished } = require('stream');
const {
deprecate
} = require('internal/util');
Expand All @@ -62,7 +62,6 @@ const {
} = require('internal/util/types');
const binding = internalBinding('zlib');
const assert = require('internal/assert');
const finished = require('internal/streams/end-of-stream');
const {
Buffer,
kMaxLength
Expand Down
14 changes: 14 additions & 0 deletions test/parallel/test-zlib-no-stream.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* eslint-disable node-core/required-modules */
/* eslint-disable node-core/require-common-first */

'use strict';

// We are not loading common because it will load the stream module,
// defeating the purpose of this test.

const { gzipSync } = require('zlib');

// Avoid regressions such as https://github.com/nodejs/node/issues/36615

// This must not throw
gzipSync('fooobar');