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 formatExportName for single names #548

Merged
merged 1 commit into from
Oct 30, 2021

Conversation

franciscomorais
Copy link
Contributor

Summary

This PR fixes the formatExportName for single names. For example, for names like foo it should export Foo name instead foo as named export in index.js file. This will fix the named exports in index.js.

Actual output:

export { default as foo } from './foo'
export { default as bar } from './bar'
export { default as FooBar } from './foo-bar'

Expected output:

export { default as Foo } from './foo'
export { default as Bar } from './bar'
export { default as FooBar } from './foo-bar'

The PR is motivated by this issue: #481

@vercel
Copy link

vercel bot commented Apr 5, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/gregberge/svgr/6yuQ4C5HwMdcmqUnPuiUg7ghNB2q
✅ Preview: https://svgr-git-fork-franciscomorais-bugfix-format-ex-f1f4dc.vercel.app

@codecov
Copy link

codecov bot commented Apr 5, 2021

Codecov Report

Merging #548 (2be8090) into main (fbb4ee5) will increase coverage by 0.13%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #548      +/-   ##
==========================================
+ Coverage   87.19%   87.32%   +0.13%     
==========================================
  Files          31       31              
  Lines         570      568       -2     
  Branches      160      159       -1     
==========================================
- Hits          497      496       -1     
+ Misses         58       57       -1     
  Partials       15       15              
Impacted Files Coverage Δ
packages/cli/src/util.js 72.22% <100.00%> (+2.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 fbb4ee5...2be8090. Read the comment docs.

@flaviocastro
Copy link

@gregberge Thanks for this incredible tool. Can we have an ETA for this fix?

@stale
Copy link

stale bot commented Jun 4, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jun 4, 2021
@stale stale bot closed this Jun 12, 2021
@calvinwyoung
Copy link

I'm running into this issue now too. Would it be possible to merge in this PR?

@gregberge gregberge reopened this Oct 30, 2021
@stale stale bot removed the wontfix label Oct 30, 2021
@gregberge gregberge merged commit 5decc94 into gregberge:main Oct 30, 2021
@gregberge
Copy link
Owner

Sorry, I merged it. I will probably release v6 soon, stay tuned.

@calvinwyoung
Copy link

Great news! Thank you, we'll be looking out for v6!

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.

4 participants