Skip to content

Don't enable class features by default in estree#12867

Merged
nicolo-ribaudo merged 3 commits intobabel:mainfrom
nicolo-ribaudo:regression-3
Feb 23, 2021
Merged

Don't enable class features by default in estree#12867
nicolo-ribaudo merged 3 commits intobabel:mainfrom
nicolo-ribaudo:regression-3

Conversation

@nicolo-ribaudo
Copy link
Copy Markdown
Member

@nicolo-ribaudo nicolo-ribaudo commented Feb 23, 2021

Q                       A
Fixed Issues? Fixes #12864
Patch: Bug Fix? Yes
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

The problem was that:

  • the estree parser option means "give me an estree-compatible AST"
  • the estree spec got the definition for class fields and private elements
  • we updated the estree parser option to produce them
  • this breaks every tool which is not aware of the new estree nodes
  • technically that's ok, because that's exactly what the estree option is for, but this breaks every older version of @babel/eslint-parser or babel-eslint

I put this behind a new option, to revert the regression. Technically this is a breaking change compared to 7.13.0, but semver itself recommends reverting accidental breakages to restore the previous working state.

@nicolo-ribaudo nicolo-ribaudo added PR: Bug Fix 🐛 A type of pull request used for our changelog categories pkg: parser i: regression area: estree area: eslint labels Feb 23, 2021
@babel-bot
Copy link
Copy Markdown
Collaborator

babel-bot commented Feb 23, 2021

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

@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci bot commented Feb 23, 2021

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 11ae89a:

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

@nicolo-ribaudo nicolo-ribaudo merged commit c300390 into babel:main Feb 23, 2021
@nicolo-ribaudo nicolo-ribaudo deleted the regression-3 branch February 23, 2021 10:30
This was referenced Mar 15, 2021
@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 May 26, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: eslint area: estree i: regression outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser PR: Bug Fix 🐛 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

no-undef error after today's babel update

2 participants