Skip to content
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]: Updating @babel/core from 7.17.8 to 7.17.9 caused code to be transpiled incorrectly.. #14520

Closed
1 task
jasonk opened this issue May 3, 2022 · 3 comments
Labels
i: needs triage outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@jasonk
Copy link

jasonk commented May 3, 2022

馃捇

  • Would you like to work on a fix?

How are you using Babel?

@babel/cli

Input code

I tried to reproduce this in the REPL, but 7.17.10 isn't an option there and that's the only version where I've seen this happen.

Configuration file name

babel.config.js

Configuration

No response

Current and expected behavior

I have this simple method that produces a get function that will be used to build an accessor. It' simple enough that up through 7.17.8 it came out of the transpiler with only whitespace changes:

makeGetter() {
  const wrapper = this;
  return function get() { return wrapper.getInfo( this ); };
}

After updating @babel/core from 7.17.8 to 7.17.10 it's getting transpiled to this:

  makeGetter() {
    return function get() {
      return this.getInfo(this);
    };
  }

Environment

@babel/core - 7.17.10
node v16.14.0

Possible solution

No response

Additional context

No response

@babel-bot
Copy link
Collaborator

Hey @jasonk! 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.

@jasonk
Copy link
Author

jasonk commented May 3, 2022

After some additional testing I've determined this actually started with @babel/core 7.17.9 although it still occurs in 7.17.10 as well.

@jasonk jasonk changed the title [Bug]: Updating @babel/core from 7.17.8 to 7.17.10 caused code to be transpiled incorrectly.. [Bug]: Updating @babel/core from 7.17.8 to 7.17.9 caused code to be transpiled incorrectly.. May 3, 2022
@JLHwung
Copy link
Contributor

JLHwung commented May 3, 2022

It seems to me duplicate of babel/minify#1028. Did you use babel-minify plugins?

@JLHwung JLHwung closed this as completed May 12, 2022
@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 12, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
i: needs triage outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

3 participants