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
refactor: move @babel/helper-hoist-variables to ts #12413
refactor: move @babel/helper-hoist-variables to ts #12413
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/41299/ |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 21f1026:
|
@@ -13,6 +13,7 @@ | |||
}, | |||
"main": "lib/index.js", | |||
"dependencies": { | |||
"@babel/traverse": "workspace:^7.12.9", |
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 really dislike this, but this helper is used only by plugins so there is already a @babel/traverse
dependency somewhere.
I wish yarn
/npm
supported typeDependencies
, only downloaded for TS users.
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.
We can re-export types exports of @babel/traverse
in @babel/core
or @babel/types
. I think NodePath
is the only heavily used type in @babel/traverse
.
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 in @babel/types
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.
Let's re-export this from @babel/core
, since it already depends on @babel/traverse
(@babel/types
doesn't).
I'll add a TODO so that we don't forget to update it after converting @babel/core
.
Converted to draft since type checking it depends on transition of |
@JLHwung |
3c76250
to
3c613b5
Compare
080324e
to
21f1026
Compare
@babel/helper-hoist-variables
now depends on@babel/traverse
, from which it importsNodePath
type.