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 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 force-pushed the JLHwung:fix-private-name-in-destructuring branch from 77aabfd to 3991864 Jan 11, 2020
@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 added the pkg: parser label 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 JLHwung:fix-private-name-in-destructuring branch from 43907aa to e7619ce Jan 11, 2020
Copy link
Member

existentialism left a comment

👏

JLHwung and others added 2 commits Jan 11, 2020
Co-Authored-By: Brian Ng <bng412@gmail.com>
@JLHwung JLHwung merged commit 81c5f1f into babel:master Jan 11, 2020
5 checks passed
5 checks passed
build (13.x)
Details
Travis CI - Pull Request Build Passed
Details
build-standalone Workflow: build-standalone
Details
e2e Workflow: e2e
Details
test262 Workflow: test262
Details
@JLHwung JLHwung deleted the JLHwung:fix-private-name-in-destructuring branch Jan 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.