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

Avoid empty reexport statements in .cjs.mjs files #558

Merged
merged 3 commits into from
May 18, 2023

Conversation

Andarist
Copy link
Member

No description provided.

@Andarist Andarist requested a review from emmatown May 18, 2023 11:10
@changeset-bot
Copy link

changeset-bot bot commented May 18, 2023

⚠️ No Changeset found

Latest commit: 17f6f6d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov
Copy link

codecov bot commented May 18, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.05 🎉

Comparison is base (00c80bb) 92.11% compared to head (e57898c) 92.17%.

❗ Current head e57898c differs from pull request most recent head 17f6f6d. Consider uploading reports for the commit 17f6f6d to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #558      +/-   ##
==========================================
+ Coverage   92.11%   92.17%   +0.05%     
==========================================
  Files          41       41              
  Lines        1979     1981       +2     
  Branches      584      585       +1     
==========================================
+ Hits         1823     1826       +3     
+ Misses        146      145       -1     
  Partials       10       10              
Impacted Files Coverage Δ
packages/cli/src/utils.ts 98.63% <100.00%> (+0.01%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -336,6 +336,9 @@ export function dtsTemplate(
}

function getReexportStatement(namedExports: string[], source: string): string {
if (!namedExports.length) {
return "";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return "";
return `import ${source};`

An entrypoint could (and likely does if it has no exports) have side-effects so we still need to import it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do u always have to be right? :P pushed out this change with extra tests for this

@emmatown emmatown enabled auto-merge (squash) May 18, 2023 11:42
@emmatown emmatown merged commit 6860429 into main May 18, 2023
8 checks passed
@emmatown emmatown deleted the skip-empty-reexport-stmt branch May 18, 2023 11:46
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