antfu-collective / ni

💡 Use the right package manager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: ni 's package is wrong

Simon-He95 opened this issue · comments

Describe the bug

image

Reproduction

remove local .lock file and execute ni

System Info

remove local .lock file and execute ni

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

I can not reproduce it. #121 does not seem to be a correct fix to me, as you cd into a sub package, ni should always search up for the closest lock file that occurs.

image

if remove stopAt params ,the lockPath will not be in the current project.

steps to reproduce

  1. delete .lock
  2. run esno ./src/commands/ni

The "packageManager": "pnpm@7.4.0", but will use yarn to install the packages

You should not have a lock in your root outside of the project tbh. For the field, yes I think we should read it up for every package.json until we found one lock or the field.

I think this is not the point, he should read the lock in my current directory instead of from my root directory