Open
Description
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
- In
ni.ts
, support--peer
from Yarn 1 (Classic), Yarn 2+ and bun. - In
ni.ts
, omit the comment indicating that installing peer dependencies using Yarn and Bun programmatically is impossible. - In command parsing logic, add support for
--save-peer
(pnpm, npm) and--peer
(Yarn, Bun). - Add a new subcommand for saving peers:
ni -P
(in line withni -D
). - Add docs for step (4) into the
README.md
.
Alternative
- In step 4 of the solution, use
ni -p
instead, in line withni -g
.
Additional context
Workarounds
- (Only supports pnpm and npm) call the interactive mode
ni
, choose the package and choosepeer
mode. - (Works differently for pnpm/npm and yarn/bun) call
ni --save-peer
for pnpm/pnpm,ni --peer
for Yarn/bun.
Validations
- Follow our Code of Conduct
- Read the Contributing Guide.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.