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
Rewrite Hub as interface #8469
Rewrite Hub as interface #8469
Conversation
code: string = ""; | ||
inputMap: Object | null = null; | ||
|
||
hub: HubInterface = { | ||
// keep it for the usage in babel-core, ex: path.hub.file.opts.filename | ||
file: this, |
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.
@loganfsmyth In the other PR you asked to keep file
here, but I think that it can be removed? (people can already get it in visitors using this.file
)
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.
@nicolo-ribaudo Yeah, my concern was avoiding breaking changes. I think my preference would still be to keep it at this point since we're already pretty close to release. I don't think we'd want it as part of the interface, but leaving it in the object is so easy. Can we leave it with a big comment saying that we should remove it in 8.x but it's being left for backward-compat with 6.x during 7.x's lifetime?
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.
Yes, let's avoid breaking things at this point.
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/8810/ |
Ref: #5050. Check #5047 for more details.