Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[email protected]: Modern JS already guarantees Array#sort() #1162

Closed
arderyp opened this issue Nov 2, 2022 · 7 comments
Closed

[email protected]: Modern JS already guarantees Array#sort() #1162

arderyp opened this issue Nov 2, 2022 · 7 comments

Comments

@arderyp
Copy link

arderyp commented Nov 2, 2022

related issue: #1144

I'm running @symfony/[email protected]

$ yarn upgrade
yarn upgrade v1.22.19
warning @symfony/webpack-encore > css-minimizer-webpack-plugin > cssnano > cssnano-preset-default > postcss-svgo > svgo > rn 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
$ yarn why stable
yarn why v1.22.19
=> Found "[email protected]"
info Reasons this module exists
   - "@symfony#webpack-encore#css-minimizer-webpack-plugin#cssnano#cssnano-preset-default#postcss-svgo#svgo" depends on it
   - Hoisted from "@symfony#webpack-encore#css-minimizer-webpack-plugin#cssnano#cssnano-preset-default#postcss-svgo#svgo#stable"

This issue has been fixed downstream: svg/svgo#1681

Can we somehow resolve this now? Or do we need to wait on one of our dependencies to update?

@arderyp arderyp changed the title update [email protected]: Modern JS already guarantees Array#sort() Nov 2, 2022
@stof
Copy link
Member

stof commented Nov 2, 2022

This has been resolved in svgo 3.0. So the next step is that postcss-svgo needs to update to the new major version of svgo. this is in progress at cssnano/cssnano#1440, but will need to be part of a new major version of cssnano as well, which will take a bit of time.
There is nothing webpack-encore can do to remove that warning except waiting for the update to propagate in the dependency chain.

@arderyp
Copy link
Author

arderyp commented Nov 2, 2022

Thanks @stof
Is cssnano/cssnano#1440 the only remaining issue for the fullpropogration?

if not, what other issues should I be subscribing to?

@stof
Copy link
Member

stof commented Nov 3, 2022

As they will release that as a major version, I'm quite sure you will need another issue then on css-minimizer-webpack-plugin to update to cssnano 6. But this issue does not exist yet as cssnano does not exist yet. And then maybe a ticket in webpack-encore to update to a new major of css-minimizer-webpack-plugin depending on whether the support for cssnano 6 comes into a major or minor version (we would need it only if they do it in a major version).

@arderyp
Copy link
Author

arderyp commented Nov 3, 2022

Thanks for the clarification @stof.

Do you think it's okay to leave this issue open until the fix percolates upward and consumers of this package no longer experience this issue? Or would you rather I close it?

@iquito
Copy link

iquito commented Jun 14, 2023

As far as I can tell all preceding steps in both cssnano and css-minimizer-webpack-plugin have now happened, webpack-encore just needs to update its dependency of css-minimizer-webpack-plugin from ^4.0.0 to '^5.0.0.

@arderyp
Copy link
Author

arderyp commented Jun 27, 2023

hey @iquito @weaverryan @fabpot can we make the change suggested in the comment above?

@stof
Copy link
Member

stof commented Jul 13, 2023

Closing this as the upgrade has been done in 4.4.0: https://github.com/symfony/webpack-encore/releases/tag/v4.4.0

@stof stof closed this as completed Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants