antfu-collective / ni

💡 Use the right package manager
MIT License
6.25k stars 208 forks source link

fix: properly detect and install `yarn@>1` and `pnpm@<7` #190

Closed auvred closed 9 months ago

auvred commented 9 months ago

Description

Yarn may have 3.x.x or 4.x.x in packageManager field, but actually it's a 2.x.x version from npm (under the berry tag)

sorry for big diff, eslint forced me to add curly braces to all branches

Linked Issues

Fixes #189

Additional context