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

Disallow private name in object elements and TS type elements #10980

Merged
merged 7 commits into from Jan 11, 2020

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Jan 10, 2020

Q                       A
Tests Added + Pass? Yes
License MIT

In this PR we add a new boolean argument isPrivateNameAllowed for parseMaybePrivateName so that we can throw if private name is not allowed in the current grammar context.

This PR also clears the test262 whitelist, which marks the milestone where babel-parser is now 100% test262 compliant.

@JLHwung JLHwung added PR: Spec Compliance 👓 A type of pull request used for our changelog categories Spec: Private Methods labels Jan 10, 2020
@JLHwung JLHwung force-pushed the fix-private-name-in-destructuring branch from 77aabfd to 3991864 Compare January 11, 2020 03:27
@JLHwung JLHwung changed the title Private name should not be accessed in destructuring patterns Private name should not be allowed in object member and TS type elements Jan 11, 2020
@JLHwung JLHwung changed the title Private name should not be allowed in object member and TS type elements Disallow private name in object elements and TS type elements Jan 11, 2020
@JLHwung JLHwung force-pushed the fix-private-name-in-destructuring branch from 43907aa to e7619ce Compare January 11, 2020 14:47
Copy link
Member

@existentialism existentialism left a comment

Choose a reason for hiding this comment

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

👏

@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 Apr 12, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 12, 2020
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: Spec Compliance 👓 A type of pull request used for our changelog categories Spec: Private Methods
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants