svgo icon indicating copy to clipboard operation
svgo copied to clipboard

Modern JS already guarantees Array#sort() is a stable sort and `stable` is deprecated

Open coderaiser opened this issue 2 years ago • 3 comments

Describe the bug

warning react-scripts > css-minimizer-webpack-plugin > cssnano > cssnano-preset-default > postcss-svgo > 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

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • SVGO Version [e.g. 2.0.3]
  • NodeJs Version [e.g 14.0.4]
  • OS: [e.g. iOS]

Additional context Add any other context about the problem here.

coderaiser avatar Jul 12 '22 17:07 coderaiser

Someone already did the work! 🎉 #1681

We just need the PR to be merged

kevinkhill avatar Jul 24 '22 15:07 kevinkhill

Hey, man. sre you alive? You make us suffer.

zdm avatar Aug 28 '22 18:08 zdm

Any news?

mahnunchik avatar Sep 15 '22 20:09 mahnunchik

I might be misunderstanding something here, but should this package not have received a version bump once https://github.com/svg/svgo/commit/2ea65860f01d4ad6f1f56bee484015c615cb5f9e was merged?

Currently I have installed svgo v2.8.0 but it still has the old stable "^0.1.8" dependency - how should yarn (in my case) know that that dependency is not needed anymore when stable svgo did not have a version bump?

GamerBene19 avatar Oct 17 '22 22:10 GamerBene19

@GamerBene19 The main branch is 44 commits ahead of the v2.8.0 release: https://github.com/svg/svgo/compare/v2.8.0...main. This fix will be included in the next release when it’s released, not retroactively in the existing release. This is how software development normally works.

andersk avatar Oct 17 '22 22:10 andersk

@GamerBene19 The main branch is 44 commits ahead of the v2.8.0 release: v2.8.0...main. This fix will be included in the next release when it’s released, not retroactively in the existing release. This is how software development normally works.

Makes sense, thanks for the explanation!

GamerBene19 avatar Oct 17 '22 22:10 GamerBene19

So we are looking forward for the next release...

mahnunchik avatar Oct 18 '22 07:10 mahnunchik

w00t w00t! Thanks for the merge peeps!

rodoabad avatar Oct 22 '22 23:10 rodoabad

Fixed in https://github.com/svg/svgo/releases/tag/v3.0.0

TrySound avatar Oct 23 '22 14:10 TrySound