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 TS import elision for JSX fragments and custom pragmas #403

Merged
merged 1 commit into from
Jan 13, 2019

Conversation

alangpierce
Copy link
Owner

Fixes #395

Previously, we added the React identifier as non-type identifier when seeing
any JSX name, but this meant that fragment syntax didn't keep that import. We
also shouldn't hard-code React, and instead use whatever the pragma base values
are.

Fixes #395

Previously, we added the `React` identifier as non-type identifier when seeing
any JSX name, but this meant that fragment syntax didn't keep that import. We
also shouldn't hard-code React, and instead use whatever the pragma base values
are.
@codecov-io
Copy link

Codecov Report

Merging #403 into master will increase coverage by 0.08%.
The diff coverage is 96.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #403      +/-   ##
==========================================
+ Coverage   79.95%   80.03%   +0.08%     
==========================================
  Files          45       46       +1     
  Lines        5173     5184      +11     
  Branches     1152     1155       +3     
==========================================
+ Hits         4136     4149      +13     
+ Misses        738      737       -1     
+ Partials      299      298       -1
Impacted Files Coverage Δ
src/transformers/RootTransformer.ts 92.48% <ø> (ø) ⬆️
src/index.ts 89.36% <ø> (ø) ⬆️
src/transformers/ESMImportTransformer.ts 79.46% <100%> (+1.78%) ⬆️
src/util/getNonTypeIdentifiers.ts 100% <100%> (ø) ⬆️
src/CJSImportProcessor.ts 90.47% <100%> (ø) ⬆️
src/util/getJSXPragmaInfo.ts 100% <100%> (ø)
src/transformers/JSXTransformer.ts 92.53% <85.71%> (-0.22%) ⬇️

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 b7b9ad1...c248e85. Read the comment docs.

@alangpierce alangpierce merged commit 83f1178 into master Jan 13, 2019
@alangpierce alangpierce deleted the fix-ts-import-elision-with-jsx branch January 13, 2019 06:54
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.

2 participants