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

Align batch warning for UNUSED_EXTERNAL_IMPORT to individual warning #4194

Merged
merged 7 commits into from Jul 29, 2021

Conversation

benmccann
Copy link
Contributor

@benmccann benmccann commented Jul 28, 2021

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:

The original issue which was closed is #4052. This finishes addressing that issue

Description

PR #4054 improved the individual warning, but did not update the batch warning. When I build SvelteKit with Vite, which uses Rollup, I get a warning that I can't understand the origin of or how to fix

After using a locally modified copy, I was quickly able to track down the culprit: ampproject/amphtml#35435

@codecov
Copy link

codecov bot commented Jul 28, 2021

Codecov Report

Merging #4194 (ec2ac8f) into master (e88c5c8) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4194   +/-   ##
=======================================
  Coverage   98.34%   98.34%           
=======================================
  Files         202      202           
  Lines        7243     7244    +1     
  Branches     2123     2123           
=======================================
+ Hits         7123     7124    +1     
  Misses         58       58           
  Partials       62       62           
Impacted Files Coverage Δ
cli/run/batchWarnings.ts 99.20% <100.00%> (+<0.01%) ⬆️

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 e88c5c8...ec2ac8f. Read the comment docs.

Copy link
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

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

A nice addition, just a small potential cleanup (that should also fix coverage).

cli/run/batchWarnings.ts Outdated Show resolved Hide resolved
@@ -16,7 +16,7 @@ module.exports = {
assertIncludes(
stderr,
'(!) Unused external imports\n' +
"default imported from external module 'external' but never used\n"
`default imported from external module 'external' but never used in "main.js"\n`
Copy link
Member

Choose a reason for hiding this comment

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

While you are at it, maybe we could align on using double quotes " also for the module name. This is also what most other errors use.

Copy link
Member

@lukastaegert lukastaegert left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

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