nebrelbug / npm-to-yarn

Convert npm CLI commands to yarn, and vice versa
https://nebrelbug.github.io/npm-to-yarn/test.html
MIT License
34 stars 9 forks source link

doen't convert `yarn` command to `pnpm`, `pnpm` to `npm`/`yarn` #40

Open dimaMachina opened 1 year ago

dimaMachina commented 1 year ago
> require('npm-to-yarn')('yarn add foo', 'npm');
'npm install foo'
> require('npm-to-yarn')('yarn add foo', 'pnpm');
'yarn add foo'

pnpm

> require('npm-to-yarn')('pnpm add foo', 'npm');
'pnpm add foo'
> require('npm-to-yarn')('pnpm add foo', 'yarn');
"pnpm add foo\n# couldn't auto-convert command"
nebrelbug commented 1 year ago

This isn't supported by the library right now, but PRs are welcome!

dimaMachina commented 1 year ago

I think the source code should be simplified, and yarnToNpm.ts should be removed (because we already have npmToYarn)

all commands should be translated no matter you pass yarn add or pnpm add

Jay-Karia commented 2 months ago

Here's a list of commands conversion which does not work:

yarn - pnpm yarn - bun

pnpm - npm pnpm - yarn pnpm - bun

bun - npm bun - yarn bun - pnpm

Will send a pull fixing this