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 ASI bug in react-hot-loader transform #384

Merged
merged 1 commit into from Dec 31, 2018
Merged

Conversation

alangpierce
Copy link
Owner

The specific pattern export default function() {} was transformed in such a
way that the parenthesized block afterword looked like a function invocation. To
avoid this, we can start the snippet with a semicolon.

The specific pattern `export default function() {}` was transformed in such a
way that the parenthesized block afterword looked like a function invocation. To
avoid this, we can start the snippet with a semicolon.
@codecov-io
Copy link

Codecov Report

Merging #384 into master will decrease coverage by 0.05%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #384      +/-   ##
=========================================
- Coverage   79.86%   79.8%   -0.06%     
=========================================
  Files          45      45              
  Lines        5159    4937     -222     
  Branches     1147    1147              
=========================================
- Hits         4120    3940     -180     
+ Misses        739     699      -40     
+ Partials      300     298       -2
Impacted Files Coverage Δ
src/transformers/ReactHotLoaderTransformer.ts 100% <ø> (ø) ⬆️
src/util/getNonTypeIdentifiers.ts 75% <0%> (-25%) ⬇️
src/parser/index.ts 77.77% <0%> (-7.94%) ⬇️
src/index.ts 82.85% <0%> (-6.51%) ⬇️
src/computeSourceMap.ts 83.33% <0%> (-5.56%) ⬇️
src/parser/plugins/types.ts 90% <0%> (-4.45%) ⬇️
src/util/getTSImportedNames.ts 81.57% <0%> (-3.79%) ⬇️
src/parser/tokenizer/readWord.ts 82.35% <0%> (-3.02%) ⬇️
src/parser/traverser/util.ts 86.2% <0%> (-2.17%) ⬇️
src/parser/traverser/base.ts 95.45% <0%> (-1.69%) ⬇️
... and 14 more

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 4f42a22...c92999d. Read the comment docs.

@alangpierce alangpierce merged commit 69d9178 into master Dec 31, 2018
@alangpierce alangpierce deleted the fix-rhl-asi-bug branch December 31, 2018 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants