airbnb / babel-plugin-inline-react-svg

A babel plugin that optimizes and inlines SVGs for your React Components.
MIT License
473 stars 91 forks source link

Update svgo to v3.x.x #118

Open GamerBene19 opened 1 year ago

GamerBene19 commented 1 year ago

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

warning babel-plugin-inline-react-svg > svgo > stable@0.1.8: 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).

ljharb commented 1 year ago

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.

akirafujiu commented 1 year ago

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

ljharb commented 1 year ago

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

sakgoyal commented 11 months ago

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.

ljharb commented 11 months ago

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

sakgoyal commented 7 months ago

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

ljharb commented 7 months ago

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.

sakgoyal commented 7 months ago

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

ljharb commented 7 months ago

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