-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Split up babel-core's File class and add Flowtype annotations #6359
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/5142/ |
47bf597
to
5198972
Compare
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.
🆒
@@ -1,6 +1,5 @@ | |||
export default class Hub { | |||
constructor(file, options) { |
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.
is it even worth having this file if it's just a file? or just move to src/index.js as export class Hub { }
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.
Yeah we can revisit, I just didn't want to change any of the actual transform infrastructure.
5198972
to
f02e684
Compare
@@ -1,39 +1,42 @@ | |||
export File from "./transformation/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.
Can we continue to export File
? I need it in a number of places to create nice error messages
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.
File
.FYI, may be easiest to review by commit. Mostly refactoring. I've removed the parts of the
File
class that weren't part of the user-facing API and moved then to be their own files.Actual features in here:
browser
files for the 2transformFile*
files that actually rely onfs
so Webpack will complain less.babel-core
now exceptbuild-external-helpers
.babel-template