-
-
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
Extract @babel/highlight package from @babel/code-frame #7351
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/6846/ |
}, | ||
"devDependencies": { | ||
"chalk": "^2.0.0", |
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 we need chalk as a devdep here?
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.
It's used in the tests.
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 good idea!
"name": "@babel/highlight", | ||
"version": "7.0.0-beta.39", | ||
"description": "Syntax highlight JavaScript strings for output in terminals.", | ||
"author": "Sebastian McKenzie <sebmck@gmail.com>", |
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.
Shouldn't we change the author for new packages? Maybe @hzoo?
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.
I wasn't sure what to put. Since he was listed as the author on code-frame, I assumed most of this code was written by Sebastian, so I kept it the same since I didn't add much.
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 good point ok
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.
I guess it could even be you @suchipi? It's a new package name, not really based on who wrote the most, although even for new packages we have been doing that which I'm not sure about either?
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.
I'm fine changing it to my name 🤷♀️
This creates a new package called @babel/highlight which syntax highlights JavaScript code for terminal output. This functionality was already present in @babel/code-frame, but exposing it as a separate package lets other projects leverage it. @babel/code-frame has been refactored slightly so that it uses @babel/highlight to do its syntax highlighting.
4f2a8b2
to
c9818f1
Compare
🎉 Thanks everyone! |
This creates a new package called
@babel/highlight
which syntax highlightsJavaScript code for terminal output. This functionality was already
present in
@babel/code-frame
, but exposing it as a separate package letsother projects leverage it.
@babel/code-frame
has been refactoredslightly so that it uses
@babel/highlight
to do its syntax highlighting.