zkochan / packages

Zoltan Kochan's npm packages
MIT License
99 stars 26 forks source link

fix(preferred-pm): correctly detect npm workspace #183

Closed bluwy closed 8 months ago

bluwy commented 10 months ago

fix https://github.com/zkochan/packages/issues/180

The yarn workspace logic could also be re-used for npm workspace. The workspaces glob syntax are fairly identical: https://docs.npmjs.com/cli/v8/using-npm/workspaces

I did this fix rather safely. Ideally if a workspaces field is found but have no lock file, I think it should fallback as npm, but that's maybe a breaking change for another day.