You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to detect the package manager (npm, pnpm, yarn, bun?) and the version to use to automatically append the packageManager field in the root package.json?
Ideas:
If engines is set in the root package.json, it might use a package manager as a key
If we have a package-lock.json = npm, pnpm-lock.yaml = pnpm, yarn.lock = yarn
What if we have multiple lockfiles? Does the new versions of yarn have a lockfile?
Run e.g. npm --version to choose the version?
The text was updated successfully, but these errors were encountered:
#71 is adding a (quite simple for now) way to detect the package manager. We would still need to get the version, which should be possible by running <packageManager> --version but is quite prone to errors.
Closing for now as it seems quite hard to have a reliable way to detect the correct package manager and version.
How to detect the package manager (npm, pnpm, yarn, bun?) and the version to use to automatically append the
packageManager
field in the rootpackage.json
?Ideas:
engines
is set in the rootpackage.json
, it might use a package manager as a keypackage-lock.json
= npm,pnpm-lock.yaml
= pnpm,yarn.lock
= yarnnpm --version
to choose the version?The text was updated successfully, but these errors were encountered: