-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
stream: move legacy to lib/internal dir #8197
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,11 @@ function Stream() { | |
| util.inherits(Stream, EE); | ||
|
|
||
| // wrap the old-style stream | ||
| require('_stream_legacy')(Stream); | ||
| require('internal/streams/legacy')(Stream); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not clear to me. Basically the definition of How about we move all
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You couldn't just move those files because that would break someone trying to Also, I think the point of this PR was to separate the actual old
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but then why split the definition of it in one file, and the legacy part in another? I'm 👎 in having both |
||
|
|
||
| // Note: export Stream before Readable/Writable/Duplex/... | ||
| // to avoid a cross-reference(require) issues | ||
| module.exports = Stream; | ||
|
|
||
| Stream.Readable = require('_stream_readable'); | ||
| Stream.Writable = require('_stream_writable'); | ||
|
|
@@ -19,6 +23,3 @@ Stream.PassThrough = require('_stream_passthrough'); | |
|
|
||
| // Backwards-compat with node 0.4.x | ||
| Stream.Stream = Stream; | ||
|
|
||
| // export | ||
| module.exports = Stream; | ||
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.
Why can't we put this into the internal/* file so that the code is more exactly like what we're removing, instead of wrapping it?