-
-
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 |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| 'use strict'; | ||
|
|
||
| const EE = require('events'); | ||
| const util = require('util'); | ||
|
|
||
| function Stream() { | ||
| EE.call(this); | ||
| } | ||
| util.inherits(Stream, EE); | ||
|
|
||
| exports.Stream = Stream; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,6 @@ | ||
| 'use strict'; | ||
|
|
||
| const util = require('util'); | ||
|
|
||
| function Stream() { | ||
| EE.call(this); | ||
| } | ||
| var Stream = require('internal/streams/stream').Stream; | ||
|
|
||
| // wrap the old-style 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 |
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
This whole file should be merged with lib/internal/streams/legacy.js
The legacy.js file should then just
module.exports = Stream;and lib/stream.js should justrequire()that.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.
Just saw this, I think we agree.