Skip to content
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

Merged
merged 4 commits into from Feb 20, 2021

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Nov 27, 2020

Q                       A
Any Dependency Changes? @babel/helper-hoist-variables now depends on @babel/traverse, from which it imports NodePath type.
License MIT

@JLHwung JLHwung added PR: Internal 🏠 A type of pull request used for our changelog categories Flow -> TS Tracking repository migration from Flow to TS labels Nov 27, 2020
@babel-bot
Copy link
Collaborator

babel-bot commented Nov 27, 2020

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/41299/

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 27, 2020

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:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

@@ -13,6 +13,7 @@
},
"main": "lib/index.js",
"dependencies": {
"@babel/traverse": "workspace:^7.12.9",
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 in @babel/types

Copy link
Member

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.

@JLHwung JLHwung marked this pull request as draft December 1, 2020 15:01
@JLHwung
Copy link
Contributor Author

JLHwung commented Dec 1, 2020

Converted to draft since type checking it depends on transition of @babel/traverse to be done.

@nicolo-ribaudo nicolo-ribaudo removed the PR: Internal 🏠 A type of pull request used for our changelog categories label Dec 10, 2020
@nicolo-ribaudo
Copy link
Member

@JLHwung @babel/traverse has been merged!

@JLHwung JLHwung force-pushed the helper-hoist-variables-to-ts branch from 3c76250 to 3c613b5 Compare January 25, 2021 22:24
@JLHwung JLHwung marked this pull request as ready for review January 25, 2021 22:39
@nicolo-ribaudo nicolo-ribaudo merged commit bfd3f80 into babel:main Feb 20, 2021
@nicolo-ribaudo nicolo-ribaudo deleted the helper-hoist-variables-to-ts branch February 20, 2021 23:30
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label May 23, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Flow -> TS Tracking repository migration from Flow to TS outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants