Incorrect Package Manager Detection in npm create pylon@latest
#45
Labels
🕹 aspect: interface
Concerns end-users' experience with the software
🛠 goal: fix
Bug fix
🟨 priority: medium
Not blocking but should be fixed soon
released
🏁 status: ready for de
Ready for work
Description:
The current implementation of the package manager (pm) detection in the
npm create pylon@latest
command always favorsyarn
due to its reliance on the presence of lock files. This is problematic because the Pylon create command does not include lock files.Current Behavior:
yarn.lock
-> resolvesyarn
package-lock.json
-> resolvesnpm
pnpm-lock.yaml
-> resolvespnpm
bun.lockb
-> resolvesbun
yarn
,pnpm
, orbun
commands are available in the environment. If so, it resolves the respective package manager; otherwise, it defaults tonpm
.Expected Behavior:
The package manager detection should:
preferredPm
configuration option. This allows prioritizing a preferred package manager if it's available, such as favoringbun
when using thebun
runtime. This feature is also required for supporting Deno (Provide a starter for Deno/Hono #41).Steps to Reproduce:
npm create pylon@latest
in a directory without any lock files.yarn
is favored if it is available, even if another package manager should be preferred based on the environment or configuration.Proposed Solution:
preferredPm
configuration to allow users to specify their preferred package manager. This option should be checked first before falling back to environment or lock file detection.Additional Context:
npm create pylon@latest
command, especially in environments where multiple package managers are present.The text was updated successfully, but these errors were encountered: