babel-plugin-inline-react-svg icon indicating copy to clipboard operation
babel-plugin-inline-react-svg copied to clipboard

Update svgo to v3.x.x

Open GamerBene19 opened this issue 2 years ago • 13 comments
trafficstars

Currently when this package is installed you get a warning sth like this:

warning babel-plugin-inline-react-svg > svgo > [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility

The issue in svgo has been solved (https://github.com/svg/svgo/issues/1689), and the fix is included in v3.0.0.

I don't know what breaking-changes v3 causes and how much work is needed here, but it would be nice if svgo could be updated to version >=3.0.0 to get rid of that warning (and make use of new features).

GamerBene19 avatar Jan 24 '23 19:01 GamerBene19

A deprecation warning on a transitive dep is just something you should ignore, always ¯\_(ツ)_/¯

That said, the breaking change of requiring node 14 basically means we likely can't ever upgrade to it.

ljharb avatar Jan 24 '23 19:01 ljharb

Node.js v14 gets retired per https://github.com/nodejs/release#release-schedule, I think you can upgrade it safely..

akirafujiu avatar Jul 26 '23 07:07 akirafujiu

Nope, platform support has zero bearing on what platforms a package should support.

ljharb avatar Jul 26 '23 20:07 ljharb

if a user wants support for older node versions, then just use an older version of this. you should not be required to support deprecated features.

sakgoyal avatar Sep 14 '23 20:09 sakgoyal

Nobody's required to. However, this package does.

ljharb avatar Sep 14 '23 20:09 ljharb

but why? why does this package hold back on old requirements?

sakgoyal avatar Jan 19 '24 05:01 sakgoyal

Currently, users get an annoying warning, but everyone can use the package.

If we dropped support for older environments, then the users who are in the most need - the ones stuck in older environments - would be completely unable to use the package. That's not a worthy or a sensible or compassionate tradeoff.

ljharb avatar Jan 19 '24 05:01 ljharb

who said they have to update the package? they can just use this current version without updating right?

sakgoyal avatar Jan 19 '24 05:01 sakgoyal

Then they're stuck on an older major, not getting security and bug fixes.

ljharb avatar Jan 19 '24 06:01 ljharb