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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: transform error when use two loops in one function with @babel/plugin-transform-block-scoping@7.20.9 #15308
Comments
Hey @Erucy! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly. If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite. |
@babel/plugin-transform-block-scoping@7.20.7 is the first affected version |
The Same issue happened to me锛寃ith the latest version 7.20.11 |
Also having this issue on 7.20.11 |
@hanzooo @aaronhargrove-grub Can you provide a repo to reproduce it? |
@liuxingbaoyu This repl reproduces the issue. Seems to be tied to the type in the file in our case |
There are two problems here.
type SomeLookup = {
[index: number]: FooBarType[];
}; The real fix should be 1, which seems a bit tricky to fix. @nicolo-ribaudo If you plan on doing it too feel free to do it! If not I'll keep trying tomorrow. |
Fixed in v7.20.14. |
馃捇
How are you using Babel?
Programmatic API (
babel.transform
,babel.parse
)Input code
Configuration file name
.babelrc
Configuration
{
"presets": [
"@babel/preset-env"
]
}
Current and expected behavior
current output:
the second
var x = data[i];
should bevar x = data[_i];
Environment
System:
OS: macOS 12.6.2
Binaries:
Node: 14.19.0 - /usr/local/bin/node
Yarn: 1.22.17 - /usr/local/bin/yarn
npm: 6.14.16 - /usr/local/bin/npm
npmPackages:
@babel/cli: ^7.17.6 => 7.17.6
@babel/core: ^7.20.7 => 7.20.7
@babel/node: ^7.16.8 => 7.16.8
@babel/plugin-transform-block-scoping: ^7.20.9 => 7.20.9
@babel/preset-env: ^7.16.11 => 7.16.11
Possible solution
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: