refinedev / refine

A React Framework for building internal tools, admin panels, dashboards & B2B apps with unmatched flexibility.
https://refine.dev
MIT License
28.17k stars 2.19k forks source link

[FEAT] replace `preferred-pm` with `package-manager-detector` #6242

Closed benmccann closed 1 month ago

benmccann commented 2 months ago

Is your feature request related to a problem? Please describe.

preferred-pm pulls in 24 dependencies, which is unnecessary for what it does: https://npmgraph.js.org/?q=preferred-pm

package-manager-detector has no dependencies: https://npmgraph.js.org/?q=package-manager-detector

Describe alternatives you've considered

No response

Additional context

This code has been battle-tested for a long time in the heavily used @antfu/ni. It was recently extracted out into its own library. I am switching Svelte's CLI to use it: https://github.com/svelte-add/svelte-add/pull/535

Describe the thing to improve

Reduce the number of dependencies

BatuhanW commented 2 months ago

Hey @benmccann looks like a good idea, would you like to work on this?

aliemir commented 2 months ago

Thanks to @benmccann, this issue is addressed in #6250 for @refinedev/devtools-server. preferred-pm is also used in @refinedev/cli and same changes can be applied to it as well. If anyone is interested on working on this, please let us know 🙏 We'll be happy to see new contributors 🚀