[Bug]: babel-traverse path.isForAwaitStatement
is broken
#14929
Labels
i: bug
i: regression
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
pkg: traverse
馃捇
How are you using Babel?
Programmatic API (
babel.transform
,babel.parse
)Input code
Configuration file name
No response
Configuration
No response
Current and expected behavior
isForAwaitStatement
on the node for thefor await
statement should returntrue
. It returnsfalse
instead, since@babel/traverse@7.19.0
.Environment
System:
OS: macOS 11.5.2
Binaries:
Node: 18.8.0 - /usr/local/bin/node
npm: 8.18.0 - /usr/local/bin/npm
npmPackages:
@babel/core: 7.19.0 => 7.19.0
@babel/plugin-syntax-jsx: 7.18.6 => 7.18.6
@babel/plugin-transform-runtime: 7.18.10 => 7.18.10
@babel/preset-env: 7.19.0 => 7.19.0
@babel/preset-typescript: 7.18.6 => 7.18.6
babel-plugin-transform-async-to-promises: 0.8.16 => 0.8.16
eslint: 8.23.1 => 8.23.1
jest: 28.1.3 => 28.1.3
Possible solution
It seems that it got broken in the refactoring of #14799. I think
babel/packages/babel-traverse/src/path/lib/virtual-types-validator.ts
Lines 199 to 201 in 091ac3d
isForOfStatement
instead ofisForStatement
.Additional context
No response
The text was updated successfully, but these errors were encountered: