mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
stream,zlib: do not use _stream_* anymore
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
1 parent
25a3204fe2
commit
9ff73fcdbe
3 files changed
+16
-3
No files matched your search
@@ -213,7 +213,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
|
||||
|
||||
+1
-2
@@ -47,7 +47,7 @@ const {
|
||||
},
|
||||
hideStackFrames
|
||||
} = require('internal/errors');
|
||||
const Transform = require('_stream_transform');
|
||||
const { Transform, finished } = require('stream');
|
||||
const {
|
||||
deprecate
|
||||
} = require('internal/util');
|
||||
@@ -57,7 +57,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
|
||||
|
||||
@@ -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');
|
||||
Reference in new issue
Block a user