npm-to-yarn
npm-to-yarn copied to clipboard
doen't convert `yarn` command to `pnpm`, `pnpm` to `npm`/`yarn`
> 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"
This isn't supported by the library right now, but PRs are welcome!
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
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