Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #9045, closes #9935, fixes #8948, fixes #9660
This is another attempt at upgrading SVGO to v3. In order to avoid breaking changes, this moves the dependency from the Parcel plugin to the project. To handle the migration, we attempt to detect the version of SVGO needed by inspecting the config file and determining if any options that were removed in v3 are present. If so, we'll log a warning and install v2. Otherwise we will install v3.
This means that new projects, and existing projects with no config or a config compatible with v3, will be upgraded automatically by installing v3 into their project. Existing projects that are using deprecated options in v2 will install v2 into their project. From then on, Parcel will load svgo relative to the project root (as it probably should have all along).