Skip to content

Verify that svgoConfig.plugins is an array#397

Merged
gregberge merged 1 commit into
gregberge:masterfrom
samuelmeuli:validate-svgo-config
Feb 16, 2020
Merged

Verify that svgoConfig.plugins is an array#397
gregberge merged 1 commit into
gregberge:masterfrom
samuelmeuli:validate-svgo-config

Conversation

@samuelmeuli

Copy link
Copy Markdown
Contributor

Summary

#384 introduced a breaking change in the svgoConfig parser. Even if this wasn't intended, using an object for the plugins config used to work, and a lot of people might be using such an incorrect config. The parsing currently fails silently. This PR makes the parser throw an error if anything other than an array is found.

Test plan

I've written a new test case for handling of incorrect plugin configs.

@vercel

vercel Bot commented Feb 10, 2020

Copy link
Copy Markdown

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

🔍 Inspect: https://zeit.co/gregberge/svgr/is9gs9oek
✅ Preview: https://svgr-git-fork-samuelmeuli-validate-svgo-config.gregberge.now.sh

@codecov

codecov Bot commented Feb 10, 2020

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.63%. Comparing base (96966eb) to head (7ad0a28).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #397      +/-   ##
==========================================
+ Coverage   85.52%   85.63%   +0.11%     
==========================================
  Files          30       30              
  Lines         518      522       +4     
  Branches      142      143       +1     
==========================================
+ Hits          443      447       +4     
  Misses         62       62              
  Partials       13       13              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gregberge gregberge merged commit 88110b6 into gregberge:master Feb 16, 2020
@gregberge

Copy link
Copy Markdown
Owner

Thanks!

@samuelmeuli samuelmeuli deleted the validate-svgo-config branch February 16, 2020 15:28
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