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

Fix removal of quotes from property names #543

Merged
merged 4 commits into from Jun 13, 2017
Merged

Fix removal of quotes from property names #543

merged 4 commits into from Jun 13, 2017

Conversation

@boopathi
Copy link
Member Author

@mathiasbynens Would like you to review this. There are a few more corner cases missing I suppose - for example - .123. But, is there a esutils API like - isPropertyNameES5 like isIdentifierES5 ?

@boopathi
Copy link
Member Author

boopathi commented May 22, 2017

Or would it suffice to only transform valid Identifiers (esutils.keyword.isIdentifierNameES5) and not care about the other corner cases for property names - for example .12e3 or 12e34, default, import ?

@boopathi boopathi added the Tag: Bug Fix Pull Request fixes a bug label May 22, 2017
@mathiasbynens
Copy link
Contributor

There’s no isPropertyName* API in esutils (yet). I wonder how @Constellation and @michaelficarra feel about potentially adding it.

@mathiasbynens
Copy link
Contributor

@michaelficarra Exactly!

@codecov
Copy link

codecov bot commented Jun 13, 2017

Codecov Report

Merging #543 into master will decrease coverage by 0.52%.
The diff coverage is 54%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #543      +/-   ##
==========================================
- Coverage   83.39%   82.86%   -0.53%     
==========================================
  Files          42       44       +2     
  Lines        2860     2900      +40     
  Branches     1003     1012       +9     
==========================================
+ Hits         2385     2403      +18     
- Misses        284      303      +19     
- Partials      191      194       +3
Impacted Files Coverage Δ
...n-transform-property-literals/src/property-name.js 100% <100%> (ø)
...el-plugin-transform-property-literals/src/index.js 100% <100%> (ø) ⬆️
...orm-property-literals/src/escape-string-literal.js 30.3% <30.3%> (ø)
packages/babel-plugin-minify-simplify/src/index.js 80.74% <0%> (+0.12%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7e2b315...8cc15b7. Read the comment docs.

@boopathi
Copy link
Member Author

@michaelficarra Thanks a lot. I used the code from that repository and have also added the license. Please review the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tag: Bug Fix Pull Request fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants