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

Support pnpm #34

Closed Zamiell closed 1 year ago

Zamiell commented 1 year ago

Hello,

It would be great if this library could support pnpm! In other words, the signature for the export should be changed from:

export default function convert(str: string, to: 'npm' | 'yarn'): string;

To:

export default function convert(str: string, to: 'npm' | 'yarn' | 'pnpm'): string;

From what I can gather, the syntax of pnpm is mostly the same as that of yarn. So this should be pretty easy.

For example:

It's the same.

And:

It's also the same.

However, there are some differences. For example:

I'm by no means an expert in pnpm, so I'm sure there are more differences.

nebrelbug commented 1 year ago

@Zamiell thanks for the idea! Would you be interested in submitting a PR?

Zamiell commented 1 year ago

I dont think I have time right now, sorry, but I just wanted to raise the issue.

nebrelbug commented 1 year ago

@Zamiell no problem! I don't quite have time right now either, but I'll mark this as a feature request.