fix(babel-traverse): automatically provide a hub when traversing a File or Program and no parentPath is given #11350#17672
Merged
JLHwung merged 3 commits intobabel:mainfrom Jan 3, 2026
Merged
Conversation
1 task
Collaborator
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/60567 |
|
commit: |
JLHwung
reviewed
Dec 19, 2025
scutuatua-crypto
approved these changes
Dec 21, 2025
Contributor
Author
|
Not sure why CI / Test on Node.js 24 (pull_request) is failing, this appears not to be related to this PR. |
8d53d1d to
6323ed0
Compare
liuxingbaoyu
reviewed
Jan 2, 2026
Member
liuxingbaoyu
left a comment
There was a problem hiding this comment.
Thanks!
I've moved the fix to prevent an empty NodePath from appearing at the top.
And added a path.getPathLocation() test, which previously returned .program.
liuxingbaoyu
approved these changes
Jan 2, 2026
Member
|
CI is unrelated to this PR and will be fixed at #17692. |
…le or Program and no parentPath is given babel#11350
Member
simbahax
added a commit
to simbahax/babel
that referenced
this pull request
Jan 12, 2026
… parentPath is given (babel#17672) * fix(babel-traverse): automatically provide a hub when traversing a File or Program and no parentPath is given babel#11350 * fix(babel-traverse): test failure for getStatementParent due to 37f3536 * review --------- Co-authored-by: Babel Bot <30521560+liuxingbaoyu@users.noreply.github.com>
meta-codesync bot
pushed a commit
to facebook/metro
that referenced
this pull request
Feb 14, 2026
Summary: Since D92850410 we're guaranteed to be using `babel/traverse` >= 7.29, where the old bug babel/babel#6437 is fixed by babel/babel#17672 We can remove our workaround, which included an awkward second copy of `babel/traverse`. We'll just keep a regression test around in case the upstream fix is reverted. Reviewed By: vzaidman Differential Revision: D92852669 fbshipit-source-id: fa25dc35d529024c783bc4dc2189aa88cf6031cb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements the changes proposed by @JLHwung in #11350 .
I am happy to incorporate any additional feedback :)