Closed benmccann closed 2 weeks ago
https://github.com/userquin/package-manager-detector (will be tranferred to antfu collective)
released initial version v0.0.1: https://github.com/antfu-collective/package-manager-detector/releases
Amazing! Thank you @userquin!
I've renamed this issue to track the remaining portion of using package-manager-detector
here
Clear and concise description of the problem
There are lots of places like create-svelte, svelte-add, shadcn-svelte, changesets, etc. where we've needed to detect the user's package manager. We end up duplicating this logic or using other packages, which are way too heavy
Suggested solution
I would love if the code to detect the user's preferred package manager were refactored out into a separate callable package. This repository could be made into a monorepo holding both packages with the CLI calling the library
Alternative
There is a
preferred-pm
package, but it has 24 dependencies: https://npmgraph.js.org/?q=preferred-pmAdditional context
No response
Validations