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

Add full support for saving peer dependencies #248

Open
3 tasks done
yamcodes opened this issue Jan 20, 2025 · 0 comments · May be fixed by #253
Open
3 tasks done

Add full support for saving peer dependencies #248

yamcodes opened this issue Jan 20, 2025 · 0 comments · May be fixed by #253
Labels
enhancement New feature or request

Comments

@yamcodes
Copy link

yamcodes commented Jan 20, 2025

Clear and concise description of the problem

As a developer using this project, I want to install peer dependencies easily so that I can manage them using this tool.

I intend to submit a PR for this issue.

Suggested solution

  1. In ni.ts, support --peer from Yarn 1 (Classic), Yarn 2+ and bun.
  2. In ni.ts, omit the comment indicating that installing peer dependencies using Yarn and Bun programmatically is impossible.
  3. In command parsing logic, add support for --save-peer (pnpm, npm) and --peer (Yarn, Bun).
  4. Add a new subcommand for saving peers: ni -P (in line with ni -D).
  5. Add docs for step (4) into the README.md.

Alternative

  1. In step 4 of the solution, use ni -p instead, in line with ni -g.

Additional context

Workarounds

  1. (Only supports pnpm and npm) call the interactive mode ni, choose the package and choose peer mode.
  2. (Works differently for pnpm/npm and yarn/bun) call ni --save-peer for pnpm/pnpm, ni --peer for Yarn/bun.

Validations

@yamcodes yamcodes added the enhancement New feature or request label Jan 20, 2025
@yamcodes yamcodes linked a pull request Jan 26, 2025 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant