Skip to content

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

Merged
JLHwung merged 7 commits into
babel:feat-7.14.0/parser-updatesfrom
JLHwung:materialize-class-features
Apr 20, 2021
Merged

JLHwung merged 7 commits into
babel:feat-7.14.0/parser-updatesfrom
JLHwung:materialize-class-features

Conversation

@JLHwung

@JLHwung JLHwung commented Apr 19, 2021

Copy link
Copy Markdown
Contributor
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
@JLHwung
JLHwung requested a review from nicolo-ribaudo April 19, 2021 19:04
@@ -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
Copy Markdown
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
Copy Markdown
Member

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

@babel-bot

babel-bot commented Apr 19, 2021 •

Copy link
Copy Markdown
Collaborator

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

@codesandbox-ci

codesandbox-ci Bot commented Apr 19, 2021 •

Copy link
Copy Markdown

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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@JLHwung
JLHwung force-pushed the feat-7.14.0/parser-updates branch from 4d58f86 to 654ab5a Compare April 19, 2021 19:40
@JLHwung
JLHwung force-pushed the materialize-class-features branch from f071f02 to 92baa7f Compare April 19, 2021 19:41

@nicolo-ribaudo nicolo-ribaudo left a comment

Copy link
Copy Markdown
Member

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
JLHwung force-pushed the materialize-class-features branch from 92baa7f to 4864069 Compare April 19, 2021 20:22
@JLHwung

JLHwung commented Apr 19, 2021

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
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.

@kaicataldo kaicataldo left a comment

Copy link
Copy Markdown
Member

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
8 of 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.

5 participants