[Bug]: Regression. Babel generates invalid code. #15111
Labels
i: bug
i: regression
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
pkg: generator
馃捇
How are you using Babel?
babel-loader (webpack)
Input code
Configuration file name
babel.config.js
Configuration
Current and expected behavior
After an upgrade from
7.19.3
to7.19.6
I've got a following failure.Babel inserts a new line and breaks async closure (I guess, auto-insertion of semicolon is involved).
The same error is reproducible in an online playground with other versions: 7.17.12 generates correct code while 7.20.1 generates invalid code
Environment
Environment w/o the issue
System:
OS: Linux 6.0 Debian GNU/Linux bookworm/sid
Binaries:
Node: 14.20.0 - ~/apps/nodejs/bin/node
Yarn: 1.22.19 - ~/apps/nodejs/bin/yarn
npm: 6.14.17 - ~/apps/nodejs/bin/npm
npmPackages:
@babel/core: ^7 => 7.19.3
@babel/eslint-parser: ^7 => 7.19.1
@babel/preset-env: ^7 => 7.19.3
@babel/preset-react: ^7 => 7.18.6
babel-jest: ^29 => 29.1.2
babel-loader: ^8.0.0 => 8.2.5
eslint: ^8.2 => 8.24.0
jest: ^29 => 29.1.2
webpack: ^5 => 5.74.0
Environment with the issue (after
yarn upgrade
)System:
OS: Linux 6.0 Debian GNU/Linux bookworm/sid
Binaries:
Node: 14.20.0 - ~/apps/nodejs/bin/node
Yarn: 1.22.19 - ~/apps/nodejs/bin/yarn
npm: 6.14.17 - ~/apps/nodejs/bin/npm
npmPackages:
@babel/core: ^7 => 7.19.6
@babel/eslint-parser: ^7 => 7.19.1
@babel/preset-env: ^7 => 7.19.4
@babel/preset-react: ^7 => 7.18.6
babel-jest: ^29 => 29.2.2
babel-loader: ^8.0.0 => 8.2.5
eslint: ^8.2 => 8.26.0
jest: ^29 => 29.2.2
webpack: ^5 => 5.74.0
Possible solution
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: