Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to autofix the root-package-manager-field rule #36

Closed
QuiiBz opened this issue Nov 25, 2023 · 1 comment
Closed

How to autofix the root-package-manager-field rule #36

QuiiBz opened this issue Nov 25, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@QuiiBz
Copy link
Owner

QuiiBz commented Nov 25, 2023

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?
@QuiiBz QuiiBz added the enhancement New feature or request label Nov 25, 2023
@QuiiBz
Copy link
Owner Author

QuiiBz commented Aug 10, 2024

#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.

@QuiiBz QuiiBz closed this as not planned Won't fix, can't repro, duplicate, stale Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant