Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[babel 8] Do not skip requeued paths#13291

Merged
nicolo-ribaudo merged 2 commits intobabel:mainfrom
JLHwung:do-not-skip-requeued-path
May 11, 2021
Merged

[babel 8] Do not skip requeued paths#13291
nicolo-ribaudo merged 2 commits intobabel:mainfrom
JLHwung:do-not-skip-requeued-path

Conversation

@JLHwung
Copy link
Contributor

@JLHwung JLHwung commented May 10, 2021

Q                       A
Fixed Issues? Transform-block-scoping falls to infinite loop when we ignore shouldSkip of a requeued path
Patch: Bug Fix?
Major: Breaking Change? Y, behind the BABEL_8_BREAKING flag
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link babel/website#2765
Any Dependency Changes?
License MIT

When a NodePath is skipped and then requeued, we should ignore the shouldSkip otherwise it will not be visited. This is a breaking change because it breaks transform-block-scoping. The intention of path.skip in block-scoping is to avoid revisiting the transformed AST node. In this PR we check whether an AST node is visited before processing. In this way transform-block-scoping can work with both Babel 7 and Babel 8.

@babel-bot
Copy link
Collaborator

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

@nicolo-ribaudo nicolo-ribaudo changed the title Do not skip requeued path [babel 8] Do not skip requeued paths May 10, 2021
@nicolo-ribaudo
Copy link
Member

I added [babel 8] to the title so that it's easier to notice it when skimming through the list of commits.

@codesandbox-ci
Copy link

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 4692c79:

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

@nicolo-ribaudo nicolo-ribaudo merged commit 875fc8e into babel:main May 11, 2021
@nicolo-ribaudo nicolo-ribaudo deleted the do-not-skip-requeued-path branch May 11, 2021 21:55
@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 Aug 11, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2021
@nicolo-ribaudo nicolo-ribaudo added this to the v8.0.0 milestone Aug 8, 2023
@JLHwung JLHwung added PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release and removed babel 8 labels Aug 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: traverse PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants