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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Materialize the class features in @babel/parser. #13175

Merged

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Apr 19, 2021

Q                       A
Minor: New Feature? Yes
Tests Added + Pass? Yes
License MIT

The following parser plugins will be materialized in Babel 7.14

  • classProperties
  • classPrivateProperties
  • classPrivateMethods

@JLHwung JLHwung added PR: New Feature 🚀 A type of pull request used for our changelog categories pkg: parser labels Apr 19, 2021
@@ -2,7 +2,7 @@
"type": "File",
"start":0,"end":19,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":19}},
"errors": [
"SyntaxError: `new.target` can only be used in functions. or class properties (1:8)"
"SyntaxError: `new.target` can only be used in functions or class properties. (1:8)"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also fixed unexpected . in the error messages lol.

@JLHwung JLHwung requested a review from hzoo April 19, 2021 19:06
@nicolo-ribaudo
Copy link
Member

Can you remove the plugins from the moved options.json files?

@babel-bot
Copy link
Collaborator

babel-bot commented Apr 19, 2021

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

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 19, 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 e703c47:

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

@@ -1,3 +0,0 @@
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(There is a prettier error)

@JLHwung
Copy link
Contributor Author

JLHwung commented Apr 19, 2021

@nicolo-ribaudo fixed in 00f84db

@nicolo-ribaudo nicolo-ribaudo added this to the v7.14.0 milestone Apr 19, 2021
@@ -0,0 +1,63 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh I would of expected these tests to be duplicated given they used to throw with the enable parser plugin error (and thus wouldn't be testing the syntax but the plugin), but I guess they are unique actually? Like we would of had a test for asi that didn't throw as well, so you could delete this one.

Copy link
Member

@kaicataldo kaicataldo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@JLHwung JLHwung merged commit 8e58178 into babel:feat-7.14.0/parser-updates Apr 20, 2021
@JLHwung JLHwung deleted the materialize-class-features branch April 20, 2021 17:00
@JLHwung JLHwung mentioned this pull request Apr 20, 2021
9 tasks
nicolo-ribaudo pushed a commit that referenced this pull request Apr 20, 2021
* feat: materialize class features

* chore: move testcases to es2022

* chore: update test fixtures

* chore: remove classPr\w+ from options.json

* chore: remove empty options.json

* update flow test allowlist

* update typescript allowlist
nicolo-ribaudo pushed a commit that referenced this pull request Apr 20, 2021
* feat: materialize class features

* chore: move testcases to es2022

* chore: update test fixtures

* chore: remove classPr\w+ from options.json

* chore: remove empty options.json

* update flow test allowlist

* update typescript allowlist
nicolo-ribaudo pushed a commit that referenced this pull request Apr 22, 2021
* feat: materialize class features

* chore: move testcases to es2022

* chore: update test fixtures

* chore: remove classPr\w+ from options.json

* chore: remove empty options.json

* update flow test allowlist

* update typescript allowlist
nicolo-ribaudo pushed a commit that referenced this pull request Apr 23, 2021
* feat: materialize class features

* chore: move testcases to es2022

* chore: update test fixtures

* chore: remove classPr\w+ from options.json

* chore: remove empty options.json

* update flow test allowlist

* update typescript allowlist
nicolo-ribaudo pushed a commit that referenced this pull request Apr 26, 2021
* feat: materialize class features

* chore: move testcases to es2022

* chore: update test fixtures

* chore: remove classPr\w+ from options.json

* chore: remove empty options.json

* update flow test allowlist

* update typescript allowlist
nicolo-ribaudo pushed a commit that referenced this pull request Apr 28, 2021
* feat: materialize class features

* chore: move testcases to es2022

* chore: update test fixtures

* chore: remove classPr\w+ from options.json

* chore: remove empty options.json

* update flow test allowlist

* update typescript allowlist
@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 Jul 21, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser PR: New Feature 🚀 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants