Closed yadvendar closed 7 years ago
I've also had errors introduced by this new version with gulp-imagemin — it now removes viewBox
by default (unless it's explicitly told not to).
This release brings in a new "major" release version of SVGO in semver (1.0 from 0.7), which represents a breaking change. Because of that, this release should also have been marked as a major release (version 6.0.0) to correctly signal the breaking nature of this update.
I think the right thing to do in this scenario would be to either release a new version 5.2.4 which reverts these changes, or remove/unpublish this release from npm (though I believe the former method is generally advised). Then this release can be re-released as a new major release version 6.0.0.
They only released a major because of the Node.js 4 requirement and the switch to a Promise based API. We already did both so I didn't see why it would need a major. Also I don't see any of your issues documented in their release notes either. Are you able to fix your issues by changing your code? I'm going to wait on reverting this one and release a major until we encounter more users with issues.
Never mind, I'll release a major instead. Thanks for reporting guys.
Yeah I couldn't find details in those release notes that would account for the changes we saw either - could only confirm by testing the old vs new version.
Thanks very much for your prompt rerelease! 👍
SVG images has broken style tags, the contents of the tag are deleted, but not the tag itself.
The use of options
removeStyleElement
works correctly and either deletes the tag, or not, but the contents of the tag are cleared against the will of the development. Please refer to this issue.gulp-imagemin relies on imagemin-svgo and it was working fine till 5.2.2 but after 5.2.3 it has started breaking off.