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

throw a TypeError if identifier validation fails #10621

Merged
merged 2 commits into from Nov 2, 2019

Conversation

dentrado
Copy link
Contributor

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

I noticed that t.identifier(name) accepts invalid identifiers, this PR fixes that bug. Thanks to @JLHwung for finding the reason so quickly!

@buildsize
Copy link

buildsize bot commented Nov 1, 2019

File name Previous Size New Size Change
babel-preset-env.js 2.77 MB 2.77 MB 815 bytes (0%)
babel-preset-env.min.js 1.67 MB 1.67 MB 399 bytes (0%)
babel.js 2.95 MB 2.95 MB 817 bytes (0%)
babel.min.js 1.63 MB 1.63 MB 400 bytes (0%)
test262.tap 4.84 MB [deleted]

1 similar comment
@buildsize
Copy link

buildsize bot commented Nov 1, 2019

File name Previous Size New Size Change
babel-preset-env.js 2.77 MB 2.77 MB 815 bytes (0%)
babel-preset-env.min.js 1.67 MB 1.67 MB 399 bytes (0%)
babel.js 2.95 MB 2.95 MB 817 bytes (0%)
babel.min.js 1.63 MB 1.63 MB 400 bytes (0%)
test262.tap 4.84 MB [deleted]

@nicolo-ribaudo nicolo-ribaudo added pkg: types PR: Spec Compliance 👓 A type of pull request used for our changelog categories labels Nov 1, 2019
Copy link
Member

@jridgewell jridgewell left a comment

Choose a reason for hiding this comment

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

🙌

I've had to depend on and import esutils in a few projects because this was never exposed. Yay!

@JLHwung
Copy link
Contributor

JLHwung commented Nov 1, 2019

@jridgewell We do have plan to refactor it. In the near future babel-types will not depend on esutils anymore, instead it will reuse the big identifier name regex in babel-parser.

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.

Thanks!

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: types PR: Spec Compliance 👓 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

4 participants